12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- import{ao as Km,_ as Jl,d as Ql,p as Om,w as fo,x as Zm,u as zt,r as Bi,o as nn,c as co,a as Un,b as on,F as rd,D as Jm,U as Em,a8 as Qm,l as Ko,C as Zo,N as Sm,B as qm,L as CC,ap as RC,aq as IC,ai as _C,G as nd,ar as sd,M as xm,J as BC,Q as LC,R as zC}from"./index.1d5f2f42.js";const FC=[{incoming:[],outgoing:["Flow_33inf2k"],dockers:[],type:2,properties:{a:"efrwe",b:"wewe",name:"\u5F00\u59CB",x:280,y:200,text:{x:280,y:200,value:"\u5F00\u59CB"},logicFlowType:"bpmn:startEvent"},key:"Event_1d42u4p"},{incoming:["Flow_379e0o9"],outgoing:[],dockers:[],type:3,properties:{a:"efrwe",b:"wewe",name:"\u7ED3\u675F",x:920,y:200,text:{x:920,y:200,value:"\u7ED3\u675F"},logicFlowType:"bpmn:endEvent"},key:"Event_08p8i6q"},{incoming:["Flow_0pfouf0"],outgoing:["Flow_3918lhh"],dockers:[],type:6,properties:{a:"efrwe",b:"wewe",name:"\u7F51\u5173",x:580,y:200,text:{x:580,y:200,value:"\u7F51\u5173"},logicFlowType:"bpmn:exclusiveGateway"},key:"Gateway_1fngqgj"},{incoming:["Flow_33inf2k"],outgoing:["Flow_0pfouf0"],dockers:[],type:4,properties:{a:"efrwe",b:"wewe",name:"\u7528\u6237",x:420,y:200,text:{x:420,y:200,value:"\u7528\u6237"},logicFlowType:"bpmn:userTask"},key:"Activity_2mgtaia"},{incoming:["Flow_3918lhh"],outgoing:["Flow_379e0o9"],dockers:[],type:5,properties:{a:"efrwe",b:"wewe",name:"\u670D\u52A1",x:760,y:200,text:{x:760,y:200,value:"\u670D\u52A1"},logicFlowType:"bpmn:serviceTask"},key:"Activity_1sp8qc8"},{incoming:["Event_1d42u4p"],outgoing:["Activity_2mgtaia"],type:1,dockers:[],properties:{name:"\u8FB9",text:{x:331,y:200,value:"\u8FB9"},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:"\u8FB92",text:{x:507,y:200,value:"\u8FB92"},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:"\u8FB93",text:{x:664,y:200,value:"\u8FB93"},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:"\u8FB94",text:{x:871,y:200,value:"\u8FB94"},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"}];var HC={flowElementList:FC};var Je={exports:{}};(function(m,v){(function(c,i){m.exports=i()})(window,function(){return function(u){var c={};function i(l){if(c[l])return c[l].exports;var s=c[l]={i:l,l:!1,exports:{}};return u[l].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=u,i.c=c,i.d=function(l,s,y){i.o(l,s)||Object.defineProperty(l,s,{enumerable:!0,get:y})},i.r=function(l){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(l,"__esModule",{value:!0})},i.t=function(l,s){if(s&1&&(l=i(l)),s&8||s&4&&typeof l=="object"&&l&&l.__esModule)return l;var y=Object.create(null);if(i.r(y),Object.defineProperty(y,"default",{enumerable:!0,value:l}),s&2&&typeof l!="string")for(var b in l)i.d(y,b,function(x){return l[x]}.bind(null,b));return y},i.n=function(l){var s=l&&l.__esModule?function(){return l.default}:function(){return l};return i.d(s,"a",s),s},i.o=function(l,s){return Object.prototype.hasOwnProperty.call(l,s)},i.p="",i(i.s=215)}([function(u,c,i){(function(l,s){i.d(c,"a",function(){return D}),i.d(c,"b",function(){return ai}),i.d(c,"c",function(){return sn}),i.d(c,"d",function(){return cr}),i.d(c,"e",function(){return Xe}),i.d(c,"f",function(){return je}),i.d(c,"g",function(){return ki}),i.d(c,"h",function(){return qn}),i.d(c,"i",function(){return at}),i.d(c,"j",function(){return Mr}),i.d(c,"k",function(){return Yr}),i.d(c,"l",function(){return Br}),i.d(c,"m",function(){return wr}),i.d(c,"n",function(){return ys}),i.d(c,"o",function(){return se}),i.d(c,"p",function(){return Ss}),i.d(c,"q",function(){return ii}),i.d(c,"r",function(){return ms}),i.d(c,"s",function(){return jr}),i.d(c,"t",function(){return ea}),i.d(c,"u",function(){return ds}),i.d(c,"v",function(){return bs}),i.d(c,"w",function(){return Os}),i.d(c,"x",function(){return wn}),i.d(c,"y",function(){return zr}),i.d(c,"z",function(){return Xt}),i.d(c,"A",function(){return Or}),i.d(c,"B",function(){return Mn}),i.d(c,"C",function(){return bt}),i.d(c,"D",function(){return xs}),i.d(c,"E",function(){return oi}),i.d(c,"F",function(){return hs}),i.d(c,"G",function(){return cs}),i.d(c,"H",function(){return Ki}),i.d(c,"I",function(){return ws}),i.d(c,"J",function(){return Ar}),i.d(c,"K",function(){return re}),i.d(c,"L",function(){return Es}),i.d(c,"M",function(){return Nn});var y="An invariant failed, however the error is obfuscated because this is a production build.",b=[];Object.freeze(b);var x={};Object.freeze(x);function S(){return++ke.mobxGuid}function T(d){throw N(!1,d),"X"}function N(d,h){if(!d)throw new Error("[mobx] "+(h||y))}function A(d){var h=!1;return function(){if(!h)return h=!0,d.apply(this,arguments)}}var R=function(){};function I(d){var h=[];return d.forEach(function(E){h.indexOf(E)===-1&&h.push(E)}),h}function _(d){return d!==null&&typeof d=="object"}function F(d){if(d===null||typeof d!="object")return!1;var h=Object.getPrototypeOf(d);return h===Object.prototype||h===null}function Y(d){if(q(d)||Xt(d))return d;if(Array.isArray(d))return new Map(d);if(F(d)){var h=new Map;for(var E in d)h.set(E,d[E]);return h}else return T("Cannot convert to map from '"+d+"'")}function V(d,h,E){Object.defineProperty(d,h,{enumerable:!1,writable:!0,configurable:!0,value:E})}function ce(d,h,E){Object.defineProperty(d,h,{enumerable:!1,writable:!1,configurable:!0,value:E})}function ue(d,h){var E=Object.getOwnPropertyDescriptor(d,h);return!E||E.configurable!==!1&&E.writable!==!1}function te(d,h){var E="isMobX"+d;return h.prototype[E]=!0,function(C){return _(C)&&C[E]===!0}}function q(d){return d instanceof Map}function ee(d){return d instanceof Set}function B(d){var h=new Set;for(var E in d)h.add(E);return Object.getOwnPropertySymbols(d).forEach(function(C){Object.getOwnPropertyDescriptor(d,C).enumerable&&h.add(C)}),Array.from(h)}function X(d){return d&&d.toString?d.toString():new String(d).toString()}function P(d){return d===null?null:typeof d=="object"?""+d:d}var w=typeof Reflect!="undefined"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols?function(d){return Object.getOwnPropertyNames(d).concat(Object.getOwnPropertySymbols(d))}:Object.getOwnPropertyNames,D=Symbol("mobx administration"),k=function(){function d(h){h===void 0&&(h="Atom@"+S()),this.name=h,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=new Set,this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=nt.NOT_TRACKING}return d.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(h){return h()})},d.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(h){return h()})},d.prototype.reportObserved=function(){return Yi(this)},d.prototype.reportChanged=function(){wt(),ns(this),mr()},d.prototype.toString=function(){return this.name},d}(),K=te("Atom",k);function se(d,h,E){h===void 0&&(h=R),E===void 0&&(E=R);var C=new k(d);return h!==R&&vs(C,h),E!==R&&oi(C,E),C}function Pe(d,h){return d===h}function ve(d,h){return So(d,h)}function me(d,h){return So(d,h,1)}function be(d,h){return Object.is(d,h)}var Oe={identity:Pe,structural:ve,default:be,shallow:me};/*! *****************************************************************************
- Copyright (c) Microsoft Corporation. All rights reserved.
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use
- this file except in compliance with the License. You may obtain a copy of the
- License at http://www.apache.org/licenses/LICENSE-2.0
- THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
- WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
- MERCHANTABLITY OR NON-INFRINGEMENT.
- See the Apache Version 2.0 License for specific language governing permissions
- and limitations under the License.
- ***************************************************************************** */var we=function(d,h){return we=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,C){E.__proto__=C}||function(E,C){for(var H in C)C.hasOwnProperty(H)&&(E[H]=C[H])},we(d,h)};function ze(d,h){we(d,h);function E(){this.constructor=d}d.prototype=h===null?Object.create(h):(E.prototype=h.prototype,new E)}var Ye=function(){return Ye=Object.assign||function(h){for(var E,C=1,H=arguments.length;C<H;C++){E=arguments[C];for(var J in E)Object.prototype.hasOwnProperty.call(E,J)&&(h[J]=E[J])}return h},Ye.apply(this,arguments)};function Le(d){var h=typeof Symbol=="function"&&d[Symbol.iterator],E=0;return h?h.call(d):{next:function(){return d&&E>=d.length&&(d=void 0),{value:d&&d[E++],done:!d}}}}function Se(d,h){var E=typeof Symbol=="function"&&d[Symbol.iterator];if(!E)return d;var C=E.call(d),H,J=[],pe;try{for(;(h===void 0||h-- >0)&&!(H=C.next()).done;)J.push(H.value)}catch(Te){pe={error:Te}}finally{try{H&&!H.done&&(E=C.return)&&E.call(C)}finally{if(pe)throw pe.error}}return J}function Fe(){for(var d=[],h=0;h<arguments.length;h++)d=d.concat(Se(arguments[h]));return d}var He=Symbol("mobx did run lazy initializers"),G=Symbol("mobx pending decorators"),L={},W={};function fe(d,h){var E=h?L:W;return E[d]||(E[d]={configurable:!0,enumerable:h,get:function(){return ge(this),this[d]},set:function(C){ge(this),this[d]=C}})}function ge(d){var h,E;if(d[He]!==!0){var C=d[G];if(C){V(d,He,!0);var H=Fe(Object.getOwnPropertySymbols(C),Object.keys(C));try{for(var J=Le(H),pe=J.next();!pe.done;pe=J.next()){var Te=pe.value,$e=C[Te];$e.propertyCreator(d,$e.prop,$e.descriptor,$e.decoratorTarget,$e.decoratorArguments)}}catch(dt){h={error:dt}}finally{try{pe&&!pe.done&&(E=J.return)&&E.call(J)}finally{if(h)throw h.error}}}}}function de(d,h){return function(){var C,H=function(pe,Te,$e,dt){if(dt===!0)return h(pe,Te,$e,pe,C),null;if(!Object.prototype.hasOwnProperty.call(pe,G)){var pt=pe[G];V(pe,G,Ye({},pt))}return pe[G][Te]={prop:Te,propertyCreator:h,descriptor:$e,decoratorTarget:pe,decoratorArguments:C},fe(Te,d)};return Ie(arguments)?(C=b,H.apply(null,arguments)):(C=Array.prototype.slice.call(arguments),H)}}function Ie(d){return(d.length===2||d.length===3)&&(typeof d[1]=="string"||typeof d[1]=="symbol")||d.length===4&&d[3]===!0}function Ve(d,h,E){return wn(d)?d:Array.isArray(d)?bt.array(d,{name:E}):F(d)?bt.object(d,void 0,{name:E}):q(d)?bt.map(d,{name:E}):ee(d)?bt.set(d,{name:E}):d}function We(d,h,E){return d==null||Or(d)||zr(d)||Xt(d)||dr(d)?d:Array.isArray(d)?bt.array(d,{name:E,deep:!1}):F(d)?bt.object(d,void 0,{name:E,deep:!1}):q(d)?bt.map(d,{name:E,deep:!1}):ee(d)?bt.set(d,{name:E,deep:!1}):T(!1)}function qe(d){return d}function ye(d,h,E){return So(d,h)?h:d}function lt(d){N(d);var h=de(!0,function(C,H,J,pe,Te){var $e=J?J.initializer?J.initializer.call(C):J.value:void 0;ui(C).addObservableProp(H,$e,d)}),E=(typeof l!="undefined"&&l.env,h);return E.enhancer=d,E}var Ze={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(Ze);function Ge(d){return d==null?Ze:typeof d=="string"?{name:d,deep:!0,proxy:!0}:d}var et=lt(Ve),St=lt(We),st=lt(qe),gt=lt(ye);function ae(d){return d.defaultDecorator?d.defaultDecorator.enhancer:d.deep===!1?qe:Ve}function jt(d,h,E){if(typeof arguments[1]=="string"||typeof arguments[1]=="symbol")return et.apply(null,arguments);if(wn(d))return d;var C=F(d)?bt.object(d,h,E):Array.isArray(d)?bt.array(d,h):q(d)?bt.map(d,h):ee(d)?bt.set(d,h):d;if(C!==d)return C;T(!1)}var Pt={box:function(d,h){arguments.length>2&&Kt("box");var E=Ge(h);return new ln(d,ae(E),E.name,!0,E.equals)},array:function(d,h){arguments.length>2&&Kt("array");var E=Ge(h);return Cs(d,ae(E),E.name)},map:function(d,h){arguments.length>2&&Kt("map");var E=Ge(h);return new ai(d,ae(E),E.name)},set:function(d,h){arguments.length>2&&Kt("set");var E=Ge(h);return new fa(d,ae(E),E.name)},object:function(d,h,E){typeof arguments[1]=="string"&&Kt("object");var C=Ge(E);if(C.proxy===!1)return ii({},d,h,C);var H=Qi(C),J=ii({},void 0,void 0,C),pe=jn(J);return qi(pe,d,h,H),pe},ref:st,shallow:St,deep:et,struct:gt},bt=jt;Object.keys(Pt).forEach(function(d){return bt[d]=Pt[d]});function Kt(d){T("Expected one or two arguments to observable."+d+". Did you accidentally try to use observable."+d+" as decorator?")}var gr=de(!1,function(d,h,E,C,H){var J=E.get,pe=E.set,Te=H[0]||{};ui(d).addComputedProp(d,h,Ye({get:J,set:pe,context:d},Te))}),Qt=gr({equals:Oe.structural}),wr=function(h,E,C){if(typeof E=="string"||h!==null&&typeof h=="object"&&arguments.length===1)return gr.apply(null,arguments);var H=typeof E=="object"?E:{};return H.get=h,H.set=typeof E=="function"?E:H.set,H.name=H.name||h.name||"",new Sn(H)};wr.struct=Qt;var nt;(function(d){d[d.NOT_TRACKING=-1]="NOT_TRACKING",d[d.UP_TO_DATE=0]="UP_TO_DATE",d[d.POSSIBLY_STALE=1]="POSSIBLY_STALE",d[d.STALE=2]="STALE"})(nt||(nt={}));var Tt;(function(d){d[d.NONE=0]="NONE",d[d.LOG=1]="LOG",d[d.BREAK=2]="BREAK"})(Tt||(Tt={}));var ar=function(){function d(h){this.cause=h}return d}();function Re(d){return d instanceof ar}function Ke(d){switch(d.dependenciesState){case nt.UP_TO_DATE:return!1;case nt.NOT_TRACKING:case nt.STALE:return!0;case nt.POSSIBLY_STALE:{for(var h=je(!0),E=ne(),C=d.observing,H=C.length,J=0;J<H;J++){var pe=C[J];if(xn(pe)){if(ke.disableErrorBoundaries)pe.get();else try{pe.get()}catch{return Me(E),Xe(h),!0}if(d.dependenciesState===nt.STALE)return Me(E),Xe(h),!0}}return yt(d),Me(E),Xe(h),!1}}}function at(){return ke.trackingDerivation!==null}function tt(d){var h=d.observers.size>0;ke.computationDepth>0&&h&&T(!1),!ke.allowStateChanges&&(h||ke.enforceActions==="strict")&&T(!1)}function ct(d,h,E){var C=je(!0);yt(d),d.newObserving=new Array(d.observing.length+100),d.unboundDepsCount=0,d.runId=++ke.runId;var H=ke.trackingDerivation;ke.trackingDerivation=d;var J;if(ke.disableErrorBoundaries===!0)J=h.call(E);else try{J=h.call(E)}catch(pe){J=new ar(pe)}return ke.trackingDerivation=H,U(d),Xe(C),J}function U(d){for(var h=d.observing,E=d.observing=d.newObserving,C=nt.UP_TO_DATE,H=0,J=d.unboundDepsCount,pe=0;pe<J;pe++){var Te=E[pe];Te.diffValue===0&&(Te.diffValue=1,H!==pe&&(E[H]=Te),H++),Te.dependenciesState>C&&(C=Te.dependenciesState)}for(E.length=H,d.newObserving=null,J=h.length;J--;){var Te=h[J];Te.diffValue===0&&Xr(Te,d),Te.diffValue=0}for(;H--;){var Te=E[H];Te.diffValue===1&&(Te.diffValue=0,rs(Te,d))}C!==nt.UP_TO_DATE&&(d.dependenciesState=C,d.onBecomeStale())}function Q(d){var h=d.observing;d.observing=[];for(var E=h.length;E--;)Xr(h[E],d);d.dependenciesState=nt.NOT_TRACKING}function re(d){var h=ne();try{return d()}finally{Me(h)}}function ne(){var d=ke.trackingDerivation;return ke.trackingDerivation=null,d}function Me(d){ke.trackingDerivation=d}function je(d){var h=ke.allowStateReads;return ke.allowStateReads=d,h}function Xe(d){ke.allowStateReads=d}function yt(d){if(d.dependenciesState!==nt.UP_TO_DATE){d.dependenciesState=nt.UP_TO_DATE;for(var h=d.observing,E=h.length;E--;)h[E].lowestObserverState=nt.UP_TO_DATE}}var qt=0,er=1,Yn=Object.getOwnPropertyDescriptor(function(){},"name");Yn&&Yn.configurable;function Ur(d,h,E){var C=function(){return Gi(d,h,E||this,arguments)};return C.isMobxAction=!0,C}function Gi(d,h,E,C){var H=Mr();try{return h.apply(E,C)}catch(J){throw H.error=J,J}finally{ki(H)}}function Mr(d,h,E){var C=Ct(),H=0,J=ne();wt();var pe=En(!0),Te=je(!0),$e={prevDerivation:J,prevAllowStateChanges:pe,prevAllowStateReads:Te,notifySpy:C,startTime:H,actionId:er++,parentActionId:qt};return qt=$e.actionId,$e}function ki(d){qt!==d.actionId&&T("invalid action stack. did you forget to finish an action?"),qt=d.parentActionId,d.error!==void 0&&(ke.suppressReactionErrors=!0),Wn(d.prevAllowStateChanges),Xe(d.prevAllowStateReads),mr(),Me(d.prevDerivation),d.notifySpy,ke.suppressReactionErrors=!1}function cr(d,h){var E=En(d),C;try{C=h()}finally{Wn(E)}return C}function En(d){var h=ke.allowStateChanges;return ke.allowStateChanges=d,h}function Wn(d){ke.allowStateChanges=d}var ln=function(d){ze(h,d);function h(E,C,H,J,pe){H===void 0&&(H="ObservableValue@"+S()),J===void 0&&(J=!0),pe===void 0&&(pe=Oe.default);var Te=d.call(this,H)||this;return Te.enhancer=C,Te.name=H,Te.equals=pe,Te.hasUnreportedChange=!1,Te.value=C(E,void 0,H),J&&Ct(),Te}return h.prototype.dehanceValue=function(E){return this.dehancer!==void 0?this.dehancer(E):E},h.prototype.set=function(E){var C=this.value;if(E=this.prepareNewValue(E),E!==ke.UNCHANGED){var H=Ct();this.setNewValue(E)}},h.prototype.prepareNewValue=function(E){if(tt(this),Nr(this)){var C=Dr(this,{object:this,type:"update",newValue:E});if(!C)return ke.UNCHANGED;E=C.newValue}return E=this.enhancer(E,this.value,this.name),this.equals(this.value,E)?ke.UNCHANGED:E},h.prototype.setNewValue=function(E){var C=this.value;this.value=E,this.reportChanged(),br(this)&&tr(this,{type:"update",object:this,newValue:E,oldValue:C})},h.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},h.prototype.intercept=function(E){return Jn(this,E)},h.prototype.observe=function(E,C){return C&&E({object:this,type:"update",newValue:this.value,oldValue:void 0}),Qn(this,E)},h.prototype.toJSON=function(){return this.get()},h.prototype.toString=function(){return this.name+"["+this.value+"]"},h.prototype.valueOf=function(){return P(this.get())},h.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},h}(k),Vn=te("ObservableValue",ln),Sn=function(){function d(h){this.dependenciesState=nt.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=nt.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+S(),this.value=new ar(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=Tt.NONE,N(h.get,"missing option for computed: get"),this.derivation=h.get,this.name=h.name||"ComputedValue@"+S(),h.set&&(this.setter=Ur(this.name+"-setter",h.set)),this.equals=h.equals||(h.compareStructural||h.struct?Oe.structural:Oe.default),this.scope=h.context,this.requiresReaction=!!h.requiresReaction,this.keepAlive=!!h.keepAlive}return d.prototype.onBecomeStale=function(){is(this)},d.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(h){return h()})},d.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(h){return h()})},d.prototype.get=function(){this.isComputing&&T("Cycle detected in computation "+this.name+": "+this.derivation),ke.inBatch===0&&this.observers.size===0&&!this.keepAlive?Ke(this)&&(this.warnAboutUntrackedRead(),wt(),this.value=this.computeValue(!1),mr()):(Yi(this),Ke(this)&&this.trackAndCompute()&&os(this));var h=this.value;if(Re(h))throw h.cause;return h},d.prototype.peek=function(){var h=this.computeValue(!1);if(Re(h))throw h.cause;return h},d.prototype.set=function(h){if(this.setter){N(!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,h)}finally{this.isRunningSetter=!1}}else N(!1,!1)},d.prototype.trackAndCompute=function(){var h=this.value,E=this.dependenciesState===nt.NOT_TRACKING,C=this.computeValue(!0),H=E||Re(h)||Re(C)||!this.equals(h,C);return H&&(this.value=C),H},d.prototype.computeValue=function(h){this.isComputing=!0,ke.computationDepth++;var E;if(h)E=ct(this,this.derivation,this.scope);else if(ke.disableErrorBoundaries===!0)E=this.derivation.call(this.scope);else try{E=this.derivation.call(this.scope)}catch(C){E=new ar(C)}return ke.computationDepth--,this.isComputing=!1,E},d.prototype.suspend=function(){this.keepAlive||(Q(this),this.value=void 0)},d.prototype.observe=function(h,E){var C=this,H=!0,J=void 0;return Br(function(){var pe=C.get();if(!H||E){var Te=ne();h({type:"update",object:C,newValue:pe,oldValue:J}),Me(Te)}H=!1,J=pe})},d.prototype.warnAboutUntrackedRead=function(){},d.prototype.toJSON=function(){return this.get()},d.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},d.prototype.valueOf=function(){return P(this.get())},d.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},d}(),xn=te("ComputedValue",Sn),ho=function(){function d(){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}return d}(),ts={};function vo(){return typeof window!="undefined"?window:typeof s!="undefined"?s:typeof self!="undefined"?self:ts}var yo=!0,$i=!1,ke=function(){var d=vo();return d.__mobxInstanceCount>0&&!d.__mobxGlobals&&(yo=!1),d.__mobxGlobals&&d.__mobxGlobals.version!==new ho().version&&(yo=!1),yo?d.__mobxGlobals?(d.__mobxInstanceCount+=1,d.__mobxGlobals.UNCHANGED||(d.__mobxGlobals.UNCHANGED={}),d.__mobxGlobals):(d.__mobxInstanceCount=1,d.__mobxGlobals=new ho):(setTimeout(function(){$i||T("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new ho)}();function Ui(){(ke.pendingReactions.length||ke.inBatch||ke.isRunningReactions)&&T("isolateGlobalState should be called before MobX is running any reactions"),$i=!0,yo&&(--vo().__mobxInstanceCount===0&&(vo().__mobxGlobals=void 0),ke=new ho)}function rs(d,h){d.observers.add(h),d.lowestObserverState>h.dependenciesState&&(d.lowestObserverState=h.dependenciesState)}function Xr(d,h){d.observers.delete(h),d.observers.size===0&&Xi(d)}function Xi(d){d.isPendingUnobservation===!1&&(d.isPendingUnobservation=!0,ke.pendingUnobservations.push(d))}function wt(){ke.inBatch++}function mr(){if(--ke.inBatch===0){Vi();for(var d=ke.pendingUnobservations,h=0;h<d.length;h++){var E=d[h];E.isPendingUnobservation=!1,E.observers.size===0&&(E.isBeingObserved&&(E.isBeingObserved=!1,E.onBecomeUnobserved()),E instanceof Sn&&E.suspend())}ke.pendingUnobservations=[]}}function Yi(d){var h=ke.trackingDerivation;return h!==null?(h.runId!==d.lastAccessedBy&&(d.lastAccessedBy=h.runId,h.newObserving[h.unboundDepsCount++]=d,d.isBeingObserved||(d.isBeingObserved=!0,d.onBecomeObserved())),!0):(d.observers.size===0&&ke.inBatch>0&&Xi(d),!1)}function ns(d){d.lowestObserverState!==nt.STALE&&(d.lowestObserverState=nt.STALE,d.observers.forEach(function(h){h.dependenciesState===nt.UP_TO_DATE&&(h.isTracing!==Tt.NONE&&go(h,d),h.onBecomeStale()),h.dependenciesState=nt.STALE}))}function os(d){d.lowestObserverState!==nt.STALE&&(d.lowestObserverState=nt.STALE,d.observers.forEach(function(h){h.dependenciesState===nt.POSSIBLY_STALE?h.dependenciesState=nt.STALE:h.dependenciesState===nt.UP_TO_DATE&&(d.lowestObserverState=nt.UP_TO_DATE)}))}function is(d){d.lowestObserverState===nt.UP_TO_DATE&&(d.lowestObserverState=nt.POSSIBLY_STALE,d.observers.forEach(function(h){h.dependenciesState===nt.UP_TO_DATE&&(h.dependenciesState=nt.POSSIBLY_STALE,h.isTracing!==Tt.NONE&&go(h,d),h.onBecomeStale())}))}function go(d,h){if(console.log("[mobx.trace] '"+d.name+"' is invalidated due to a change in: '"+h.name+"'"),d.isTracing===Tt.BREAK){var E=[];Wi(ea(d),E,1),new Function(`debugger;
- /*
- Tracing '`+d.name+`'
- You are entering this break point because derivation '`+d.name+"' is being traced and '"+h.name+`' is now forcing it to update.
- Just follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update
- The stackframe you are looking for is at least ~6-8 stack-frames up.
- `+(d instanceof Sn?d.derivation.toString().replace(/[*]\//g,"/"):"")+`
- The dependencies for this derivation are:
- `+E.join(`
- `)+`
- */
- `)()}}function Wi(d,h,E){if(h.length>=1e3){h.push("(and many more)");return}h.push(""+new Array(E).join(" ")+d.name),d.dependencies&&d.dependencies.forEach(function(C){return Wi(C,h,E+1)})}var sn=function(){function d(h,E,C,H){h===void 0&&(h="Reaction@"+S()),H===void 0&&(H=!1),this.name=h,this.onInvalidate=E,this.errorHandler=C,this.requiresObservable=H,this.observing=[],this.newObserving=[],this.dependenciesState=nt.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+S(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=Tt.NONE}return d.prototype.onBecomeStale=function(){this.schedule()},d.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,ke.pendingReactions.push(this),Vi())},d.prototype.isScheduled=function(){return this._isScheduled},d.prototype.runReaction=function(){if(!this.isDisposed){if(wt(),this._isScheduled=!1,Ke(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending&&Ct()}catch(h){this.reportExceptionInDerivation(h)}}mr()}},d.prototype.track=function(h){if(!this.isDisposed){wt(),this._isRunning=!0;var E=ct(this,h,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&Q(this),Re(E)&&this.reportExceptionInDerivation(E.cause),mr()}},d.prototype.reportExceptionInDerivation=function(h){var E=this;if(this.errorHandler){this.errorHandler(h,this);return}if(ke.disableErrorBoundaries)throw h;var C="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";ke.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(C,h),ke.globalReactionErrorHandlers.forEach(function(H){return H(h,E)})},d.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(wt(),Q(this),mr()))},d.prototype.getDisposer=function(){var h=this.dispose.bind(this);return h[D]=this,h},d.prototype.toString=function(){return"Reaction["+this.name+"]"},d.prototype.trace=function(h){h===void 0&&(h=!1),Ms(this,h)},d}(),ti=100,ri=function(d){return d()};function Vi(){ke.inBatch>0||ke.isRunningReactions||ri(as)}function as(){ke.isRunningReactions=!0;for(var d=ke.pendingReactions,h=0;d.length>0;){++h===ti&&(console.error("Reaction doesn't converge to a stable state after "+ti+" iterations."+(" Probably there is a cycle in the reactive function: "+d[0])),d.splice(0));for(var E=d.splice(0),C=0,H=E.length;C<H;C++)E[C].runReaction()}ke.isRunningReactions=!1}var mo=te("Reaction",sn);function us(d){var h=ri;ri=function(E){return d(function(){return h(E)})}}function Ct(){return!1}function hd(d){}function vd(d){}function yd(d){}function Ki(d){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}function ls(){T(!1)}function Zi(d){return function(h,E,C){if(C){if(C.value)return{value:Ur(d,C.value),enumerable:!1,configurable:!0,writable:!0};var H=C.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return Ur(d,H.call(this))}}}return ss(d).apply(this,arguments)}}function ss(d){return function(h,E,C){Object.defineProperty(h,E,{configurable:!0,enumerable:!1,get:function(){},set:function(H){V(this,E,Yr(d,H))}})}}function fs(d,h,E,C){return C===!0?(ni(d,h,E.value),null):E?{configurable:!0,enumerable:!1,get:function(){return ni(this,h,E.value||E.initializer.call(this)),this[h]},set:ls}:{enumerable:!1,configurable:!0,set:function(H){ni(this,h,H)},get:function(){}}}var Yr=function(h,E,C,H){if(arguments.length===1&&typeof h=="function")return Ur(h.name||"<unnamed action>",h);if(arguments.length===2&&typeof E=="function")return Ur(h,E);if(arguments.length===1&&typeof h=="string")return Zi(h);if(H===!0)V(h,E,Ur(h.name||E,C.value,this));else return Zi(E).apply(null,arguments)};Yr.bound=fs;function cs(d,h){var E=typeof d=="string"?d:d.name||"<unnamed action>",C=typeof d=="function"?d:h;return Gi(E,C,this,void 0)}function ds(d){return typeof d=="function"&&d.isMobxAction===!0}function ni(d,h,E){V(d,h,Ur(h,E.bind(d)))}function Br(d,h){h===void 0&&(h=x);var E=h&&h.name||d.name||"Autorun@"+S(),C=!h.scheduler&&!h.delay,H;if(C)H=new sn(E,function(){this.track(Te)},h.onError,h.requiresObservable);else{var J=Pn(h),pe=!1;H=new sn(E,function(){pe||(pe=!0,J(function(){pe=!1,H.isDisposed||H.track(Te)}))},h.onError,h.requiresObservable)}function Te(){d(H)}return H.schedule(),H.getDisposer()}var ps=function(d){return d()};function Pn(d){return d.scheduler?d.scheduler:d.delay?function(h){return setTimeout(h,d.delay)}:ps}function hs(d,h,E){E===void 0&&(E=x);var C=E.name||"Reaction@"+S(),H=Yr(C,E.onError?Kn(E.onError,h):h),J=!E.scheduler&&!E.delay,pe=Pn(E),Te=!0,$e=!1,dt,pt=E.compareStructural?Oe.structural:E.equals||Oe.default,Et=new sn(C,function(){Te||J?xt():$e||($e=!0,pe(xt))},E.onError,E.requiresObservable);function xt(){if($e=!1,!Et.isDisposed){var _t=!1;Et.track(function(){var Yt=d(Et);_t=Te||!pt(dt,Yt),dt=Yt}),Te&&E.fireImmediately&&H(dt,Et),!Te&&_t===!0&&H(dt,Et),Te&&(Te=!1)}}return Et.schedule(),Et.getDisposer()}function Kn(d,h){return function(){try{return h.apply(this,arguments)}catch(E){d.call(this,E)}}}function vs(d,h,E){return Ji("onBecomeObserved",d,h,E)}function oi(d,h,E){return Ji("onBecomeUnobserved",d,h,E)}function Ji(d,h,E,C){var H=typeof C=="function"?jr(h,E):jr(h),J=typeof C=="function"?C:E,pe=d+"Listeners";H[pe]?H[pe].add(J):H[pe]=new Set([J]);var Te=H[d];return typeof Te!="function"?T(!1):function(){var $e=H[pe];$e&&($e.delete(J),$e.size===0&&delete H[pe])}}function ys(d){var h=d.enforceActions,E=d.computedRequiresReaction,C=d.computedConfigurable,H=d.disableErrorBoundaries,J=d.reactionScheduler,pe=d.reactionRequiresObservable,Te=d.observableRequiresReaction;if(d.isolateGlobalState===!0&&Ui(),h!==void 0){var $e=void 0;switch(h){case!0:case"observed":$e=!0;break;case!1:case"never":$e=!1;break;case"strict":case"always":$e="strict";break;default:T("Invalid value for 'enforceActions': '"+h+"', expected 'never', 'always' or 'observed'")}ke.enforceActions=$e,ke.allowStateChanges=!($e===!0||$e==="strict")}E!==void 0&&(ke.computedRequiresReaction=!!E),pe!==void 0&&(ke.reactionRequiresObservable=!!pe),Te!==void 0&&(ke.observableRequiresReaction=!!Te,ke.allowStateReads=!ke.observableRequiresReaction),C!==void 0&&(ke.computedConfigurable=!!C),H!==void 0&&(H===!0&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."),ke.disableErrorBoundaries=!!H),J&&us(J)}function ii(d,h,E,C){C=Ge(C);var H=Qi(C);return ge(d),ui(d,C.name,H.enhancer),h&&qi(d,h,E,H),d}function Qi(d){return d.defaultDecorator||(d.deep===!1?st:et)}function qi(d,h,E,C){var H,J,pe,Te;wt();try{var Te=w(h);try{for(var $e=Le(Te),dt=$e.next();!dt.done;dt=$e.next()){var pe=dt.value,pt=Object.getOwnPropertyDescriptor(h,pe),Et=E&&pe in E?E[pe]:pt.get?gr:C,xt=Et(d,pe,pt,!0);xt&&Object.defineProperty(d,pe,xt)}}catch(Yt){H={error:Yt}}finally{try{dt&&!dt.done&&(J=$e.return)&&J.call($e)}finally{if(H)throw H.error}}}finally{mr()}}function ea(d,h){return ta(jr(d,h))}function ta(d){var h={name:d.name};return d.observing&&d.observing.length>0&&(h.dependencies=I(d.observing).map(ta)),h}var gs=0;function ra(){this.message="FLOW_CANCELLED"}ra.prototype=Object.create(Error.prototype);function ms(d){arguments.length!==1&&T("Flow expects 1 argument and cannot be used as decorator");var h=d.name||"<unnamed flow>";return function(){var E=this,C=arguments,H=++gs,J=Yr(h+" - runid: "+H+" - init",d).apply(E,C),pe,Te=void 0,$e=new Promise(function(dt,pt){var Et=0;pe=pt;function xt(Mt){Te=void 0;var Er;try{Er=Yr(h+" - runid: "+H+" - yield "+Et++,J.next).call(J,Mt)}catch(Cn){return pt(Cn)}Yt(Er)}function _t(Mt){Te=void 0;var Er;try{Er=Yr(h+" - runid: "+H+" - yield "+Et++,J.throw).call(J,Mt)}catch(Cn){return pt(Cn)}Yt(Er)}function Yt(Mt){if(Mt&&typeof Mt.then=="function"){Mt.then(Yt,pt);return}return Mt.done?dt(Mt.value):(Te=Promise.resolve(Mt.value),Te.then(xt,_t))}xt(void 0)});return $e.cancel=Yr(h+" - runid: "+H+" - cancel",function(){try{Te&&na(Te);var dt=J.return(void 0),pt=Promise.resolve(dt.value);pt.then(R,R),na(pt),pe(new ra)}catch(Et){pe(Et)}}),$e}}function na(d){typeof d.cancel=="function"&&d.cancel()}function oa(d,h){if(d==null)return!1;if(h!==void 0){if(Or(d)===!1||!d[D].values.has(h))return!1;var E=jr(d,h);return xn(E)}return xn(d)}function bs(d){return arguments.length>1?T(!1):oa(d)}function Os(d,h){return typeof h!="string"?T(!1):oa(d,h)}function Tn(d,h){return d==null?!1:h!==void 0?Or(d)?d[D].values.has(h):!1:Or(d)||!!d[D]||K(d)||mo(d)||xn(d)}function wn(d){return arguments.length!==1&&T(!1),Tn(d)}function Mn(d){return Or(d)?d[D].getKeys():Xt(d)||dr(d)?Array.from(d.keys()):zr(d)?d.map(function(h,E){return E}):T(!1)}function Es(d){return Or(d)?Mn(d).map(function(h){return d[h]}):Xt(d)?Mn(d).map(function(h){return d.get(h)}):dr(d)?Array.from(d.values()):zr(d)?d.slice():T(!1)}function Ss(d){return Or(d)?Mn(d).map(function(h){return[h,d[h]]}):Xt(d)?Mn(d).map(function(h){return[h,d.get(h)]}):dr(d)?Array.from(d.entries()):zr(d)?d.map(function(h,E){return[E,h]}):T(!1)}function ia(d,h,E){if(arguments.length===2&&!dr(d)){wt();var C=h;try{for(var H in C)ia(d,H,C[H])}finally{mr()}return}if(Or(d)){var J=d[D],pe=J.values.get(h);pe?J.write(h,E):J.addObservableProp(h,E,J.defaultEnhancer)}else if(Xt(d))d.set(h,E);else if(dr(d))d.add(h);else if(zr(d))typeof h!="number"&&(h=parseInt(h,10)),N(h>=0,"Not a valid index: '"+h+"'"),wt(),h>=d.length&&(d.length=h+1),d[h]=E,mr();else return T(!1)}function xs(d,h,E,C){return typeof E=="function"?Ps(d,h,E,C):bo(d,h,E)}function bo(d,h,E){return qn(d).observe(h,E)}function Ps(d,h,E,C){return qn(d,h).observe(E,C)}var Ts={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function An(d,h,E,C){return C.detectCycles&&d.set(h,E),E}function Wr(d,h,E){if(!h.recurseEverything&&!wn(d)||typeof d!="object")return d;if(d===null)return null;if(d instanceof Date)return d;if(Vn(d))return Wr(d.get(),h,E);wn(d)&&Mn(d);var C=h.detectCycles===!0;if(C&&d!==null&&E.has(d))return E.get(d);if(zr(d)||Array.isArray(d)){var H=An(E,d,[],h),J=d.map(function(_t){return Wr(_t,h,E)});H.length=J.length;for(var pe=0,Te=J.length;pe<Te;pe++)H[pe]=J[pe];return H}if(dr(d)||Object.getPrototypeOf(d)===Set.prototype)if(h.exportMapsAsObjects===!1){var $e=An(E,d,new Set,h);return d.forEach(function(_t){$e.add(Wr(_t,h,E))}),$e}else{var dt=An(E,d,[],h);return d.forEach(function(_t){dt.push(Wr(_t,h,E))}),dt}if(Xt(d)||Object.getPrototypeOf(d)===Map.prototype)if(h.exportMapsAsObjects===!1){var pt=An(E,d,new Map,h);return d.forEach(function(_t,Yt){pt.set(Yt,Wr(_t,h,E))}),pt}else{var Et=An(E,d,{},h);return d.forEach(function(_t,Yt){Et[Yt]=Wr(_t,h,E)}),Et}var xt=An(E,d,{},h);return B(d).forEach(function(_t){xt[_t]=Wr(d[_t],h,E)}),xt}function ws(d,h){typeof h=="boolean"&&(h={detectCycles:h}),h||(h=Ts),h.detectCycles=h.detectCycles===void 0?h.recurseEverything===!0:h.detectCycles===!0;var E;return h.detectCycles&&(E=new Map),Wr(d,h,E)}function Ms(){for(var d=[],h=0;h<arguments.length;h++)d[h]=arguments[h];var E=!1;typeof d[d.length-1]=="boolean"&&(E=d.pop());var C=As(d);if(!C)return T(!1);C.isTracing===Tt.NONE&&console.log("[mobx.trace] '"+C.name+"' tracing enabled"),C.isTracing=E?Tt.BREAK:Tt.LOG}function As(d){switch(d.length){case 0:return ke.trackingDerivation;case 1:return jr(d[0]);case 2:return jr(d[0],d[1])}}function Ar(d,h){h===void 0&&(h=void 0),wt();try{return d.apply(h)}finally{mr()}}function Nn(d,h,E){return arguments.length===1||h&&typeof h=="object"?Ns(d,h):Zn(d,h,E||{})}function Zn(d,h,E){var C;typeof E.timeout=="number"&&(C=setTimeout(function(){if(!J[D].isDisposed){J();var pe=new Error("WHEN_TIMEOUT");if(E.onError)E.onError(pe);else throw pe}},E.timeout)),E.name=E.name||"When@"+S();var H=Ur(E.name+"-effect",h),J=Br(function(pe){d()&&(pe.dispose(),C&&clearTimeout(C),H())},E);return J}function Ns(d,h){var E,C=new Promise(function(H,J){var pe=Zn(d,H,Ye(Ye({},h),{onError:J}));E=function(){pe(),J("WHEN_CANCELLED")}});return C.cancel=E,C}function Oo(d){return d[D]}function Eo(d){return typeof d=="string"||typeof d=="number"||typeof d=="symbol"}var Dn={has:function(d,h){if(h===D||h==="constructor"||h===He)return!0;var E=Oo(d);return Eo(h)?E.has(h):h in d},get:function(d,h){if(h===D||h==="constructor"||h===He)return d[h];var E=Oo(d),C=E.values.get(h);if(C instanceof k){var H=C.get();return H===void 0&&E.has(h),H}return Eo(h)&&E.has(h),d[h]},set:function(d,h,E){return Eo(h)?(ia(d,h,E),!0):!1},deleteProperty:function(d,h){if(!Eo(h))return!1;var E=Oo(d);return E.remove(h),!0},ownKeys:function(d){var h=Oo(d);return h.keysAtom.reportObserved(),Reflect.ownKeys(d)},preventExtensions:function(d){return T("Dynamic observable objects cannot be frozen"),!1}};function jn(d){var h=new Proxy(d,Dn);return d[D].proxy=h,h}function Nr(d){return d.interceptors!==void 0&&d.interceptors.length>0}function Jn(d,h){var E=d.interceptors||(d.interceptors=[]);return E.push(h),A(function(){var C=E.indexOf(h);C!==-1&&E.splice(C,1)})}function Dr(d,h){var E=ne();try{for(var C=Fe(d.interceptors||[]),H=0,J=C.length;H<J&&(h=C[H](h),N(!h||h.type,"Intercept handlers should return nothing or a change object"),!!h);H++);return h}finally{Me(E)}}function br(d){return d.changeListeners!==void 0&&d.changeListeners.length>0}function Qn(d,h){var E=d.changeListeners||(d.changeListeners=[]);return E.push(h),A(function(){var C=E.indexOf(h);C!==-1&&E.splice(C,1)})}function tr(d,h){var E=ne(),C=d.changeListeners;if(!!C){C=C.slice();for(var H=0,J=C.length;H<J;H++)C[H](h);Me(E)}}var Ds=1e4,js={get:function(d,h){return h===D?d[D]:h==="length"?d[D].getArrayLength():typeof h=="number"?Lr.get.call(d,h):typeof h=="string"&&!isNaN(h)?Lr.get.call(d,parseInt(h)):Lr.hasOwnProperty(h)?Lr[h]:d[h]},set:function(d,h,E){return h==="length"&&d[D].setArrayLength(E),typeof h=="number"&&Lr.set.call(d,h,E),typeof h=="symbol"||isNaN(h)?d[h]=E:Lr.set.call(d,parseInt(h),E),!0},preventExtensions:function(d){return T("Observable arrays cannot be frozen"),!1}};function Cs(d,h,E,C){E===void 0&&(E="ObservableArray@"+S()),C===void 0&&(C=!1);var H=new aa(E,h,C);ce(H.values,D,H);var J=new Proxy(H.values,js);if(H.proxy=J,d&&d.length){var pe=En(!0);H.spliceWithArray(0,0,d),Wn(pe)}return J}var aa=function(){function d(h,E,C){this.owned=C,this.values=[],this.proxy=void 0,this.lastKnownLength=0,this.atom=new k(h||"ObservableArray@"+S()),this.enhancer=function(H,J){return E(H,J,h+"[..]")}}return d.prototype.dehanceValue=function(h){return this.dehancer!==void 0?this.dehancer(h):h},d.prototype.dehanceValues=function(h){return this.dehancer!==void 0&&h.length>0?h.map(this.dehancer):h},d.prototype.intercept=function(h){return Jn(this,h)},d.prototype.observe=function(h,E){return E===void 0&&(E=!1),E&&h({object:this.proxy,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),Qn(this,h)},d.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},d.prototype.setArrayLength=function(h){if(typeof h!="number"||h<0)throw new Error("[mobx.array] Out of range: "+h);var E=this.values.length;if(h!==E)if(h>E){for(var C=new Array(h-E),H=0;H<h-E;H++)C[H]=void 0;this.spliceWithArray(E,0,C)}else this.spliceWithArray(h,E-h)},d.prototype.updateArrayLength=function(h,E){if(h!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed.");this.lastKnownLength+=E},d.prototype.spliceWithArray=function(h,E,C){var H=this;tt(this.atom);var J=this.values.length;if(h===void 0?h=0:h>J?h=J:h<0&&(h=Math.max(0,J+h)),arguments.length===1?E=J-h:E==null?E=0:E=Math.max(0,Math.min(E,J-h)),C===void 0&&(C=b),Nr(this)){var pe=Dr(this,{object:this.proxy,type:"splice",index:h,removedCount:E,added:C});if(!pe)return b;E=pe.removedCount,C=pe.added}C=C.length===0?C:C.map(function($e){return H.enhancer($e,void 0)});var Te=this.spliceItemsIntoValues(h,E,C);return(E!==0||C.length!==0)&&this.notifyArraySplice(h,C,Te),this.dehanceValues(Te)},d.prototype.spliceItemsIntoValues=function(h,E,C){var H;if(C.length<Ds)return(H=this.values).splice.apply(H,Fe([h,E],C));var J=this.values.slice(h,h+E);return this.values=this.values.slice(0,h).concat(C,this.values.slice(h+E)),J},d.prototype.notifyArrayChildUpdate=function(h,E,C){var H=!this.owned&&Ct(),J=br(this),pe=J||H?{object:this.proxy,type:"update",index:h,newValue:E,oldValue:C}:null;this.atom.reportChanged(),J&&tr(this,pe)},d.prototype.notifyArraySplice=function(h,E,C){var H=!this.owned&&Ct(),J=br(this),pe=J||H?{object:this.proxy,type:"splice",index:h,removed:C,added:E,removedCount:C.length,addedCount:E.length}:null;this.atom.reportChanged(),J&&tr(this,pe)},d}(),Lr={intercept:function(d){return this[D].intercept(d)},observe:function(d,h){h===void 0&&(h=!1);var E=this[D];return E.observe(d,h)},clear:function(){return this.splice(0)},replace:function(d){var h=this[D];return h.spliceWithArray(0,h.values.length,d)},toJS:function(){return this.slice()},toJSON:function(){return this.toJS()},splice:function(d,h){for(var E=[],C=2;C<arguments.length;C++)E[C-2]=arguments[C];var H=this[D];switch(arguments.length){case 0:return[];case 1:return H.spliceWithArray(d);case 2:return H.spliceWithArray(d,h)}return H.spliceWithArray(d,h,E)},spliceWithArray:function(d,h,E){var C=this[D];return C.spliceWithArray(d,h,E)},push:function(){for(var d=[],h=0;h<arguments.length;h++)d[h]=arguments[h];var E=this[D];return E.spliceWithArray(E.values.length,0,d),E.values.length},pop:function(){return this.splice(Math.max(this[D].values.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var d=[],h=0;h<arguments.length;h++)d[h]=arguments[h];var E=this[D];return E.spliceWithArray(0,0,d),E.values.length},reverse:function(){var d=this.slice();return d.reverse.apply(d,arguments)},sort:function(d){var h=this.slice();return h.sort.apply(h,arguments)},remove:function(d){var h=this[D],E=h.dehanceValues(h.values).indexOf(d);return E>-1?(this.splice(E,1),!0):!1},get:function(d){var h=this[D];if(h){if(d<h.values.length)return h.atom.reportObserved(),h.dehanceValue(h.values[d]);console.warn("[mobx.array] Attempt to read an array index ("+d+") that is out of bounds ("+h.values.length+"). Please check length first. Out of bound indices will not be tracked by MobX")}},set:function(d,h){var E=this[D],C=E.values;if(d<C.length){tt(E.atom);var H=C[d];if(Nr(E)){var J=Dr(E,{type:"update",object:E.proxy,index:d,newValue:h});if(!J)return;h=J.newValue}h=E.enhancer(h,H);var pe=h!==H;pe&&(C[d]=h,E.notifyArrayChildUpdate(d,h,H))}else if(d===C.length)E.spliceWithArray(d,0,[h]);else throw new Error("[mobx.array] Index out of bounds, "+d+" is larger than "+C.length)}};["concat","flat","includes","indexOf","join","lastIndexOf","slice","toString","toLocaleString"].forEach(function(d){typeof Array.prototype[d]=="function"&&(Lr[d]=function(){var h=this[D];h.atom.reportObserved();var E=h.dehanceValues(h.values);return E[d].apply(E,arguments)})}),["every","filter","find","findIndex","flatMap","forEach","map","some"].forEach(function(d){typeof Array.prototype[d]=="function"&&(Lr[d]=function(h,E){var C=this,H=this[D];H.atom.reportObserved();var J=H.dehanceValues(H.values);return J[d](function(pe,Te){return h.call(E,pe,Te,C)},E)})}),["reduce","reduceRight"].forEach(function(d){Lr[d]=function(){var h=this,E=this[D];E.atom.reportObserved();var C=arguments[0];return arguments[0]=function(H,J,pe){return J=E.dehanceValue(J),C(H,J,pe,h)},E.values[d].apply(E.values,arguments)}});var Rs=te("ObservableArrayAdministration",aa);function zr(d){return _(d)&&Rs(d[D])}var ua,la={},ai=function(){function d(h,E,C){if(E===void 0&&(E=Ve),C===void 0&&(C="ObservableMap@"+S()),this.enhancer=E,this.name=C,this[ua]=la,this._keysAtom=se(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(h)}return d.prototype._has=function(h){return this._data.has(h)},d.prototype.has=function(h){var E=this;if(!ke.trackingDerivation)return this._has(h);var C=this._hasMap.get(h);if(!C){var H=C=new ln(this._has(h),qe,this.name+"."+X(h)+"?",!1);this._hasMap.set(h,H),oi(H,function(){return E._hasMap.delete(h)})}return C.get()},d.prototype.set=function(h,E){var C=this._has(h);if(Nr(this)){var H=Dr(this,{type:C?"update":"add",object:this,newValue:E,name:h});if(!H)return this;E=H.newValue}return C?this._updateValue(h,E):this._addValue(h,E),this},d.prototype.delete=function(h){var E=this;if(tt(this._keysAtom),Nr(this)){var C=Dr(this,{type:"delete",object:this,name:h});if(!C)return!1}if(this._has(h)){var H=Ct(),J=br(this),C=J||H?{type:"delete",object:this,oldValue:this._data.get(h).value,name:h}:null;return Ar(function(){E._keysAtom.reportChanged(),E._updateHasMapEntry(h,!1);var Te=E._data.get(h);Te.setNewValue(void 0),E._data.delete(h)}),J&&tr(this,C),!0}return!1},d.prototype._updateHasMapEntry=function(h,E){var C=this._hasMap.get(h);C&&C.setNewValue(E)},d.prototype._updateValue=function(h,E){var C=this._data.get(h);if(E=C.prepareNewValue(E),E!==ke.UNCHANGED){var H=Ct(),J=br(this),pe=J||H?{type:"update",object:this,oldValue:C.value,name:h,newValue:E}:null;C.setNewValue(E),J&&tr(this,pe)}},d.prototype._addValue=function(h,E){var C=this;tt(this._keysAtom),Ar(function(){var Te=new ln(E,C.enhancer,C.name+"."+X(h),!1);C._data.set(h,Te),E=Te.value,C._updateHasMapEntry(h,!0),C._keysAtom.reportChanged()});var H=Ct(),J=br(this),pe=J||H?{type:"add",object:this,name:h,newValue:E}:null;J&&tr(this,pe)},d.prototype.get=function(h){return this.has(h)?this.dehanceValue(this._data.get(h).get()):this.dehanceValue(void 0)},d.prototype.dehanceValue=function(h){return this.dehancer!==void 0?this.dehancer(h):h},d.prototype.keys=function(){return this._keysAtom.reportObserved(),this._data.keys()},d.prototype.values=function(){var h=this,E=this.keys();return xo({next:function(){var C=E.next(),H=C.done,J=C.value;return{done:H,value:H?void 0:h.get(J)}}})},d.prototype.entries=function(){var h=this,E=this.keys();return xo({next:function(){var C=E.next(),H=C.done,J=C.value;return{done:H,value:H?void 0:[J,h.get(J)]}}})},d.prototype[ua=D,Symbol.iterator]=function(){return this.entries()},d.prototype.forEach=function(h,E){var C,H;try{for(var J=Le(this),pe=J.next();!pe.done;pe=J.next()){var Te=Se(pe.value,2),$e=Te[0],dt=Te[1];h.call(E,dt,$e,this)}}catch(pt){C={error:pt}}finally{try{pe&&!pe.done&&(H=J.return)&&H.call(J)}finally{if(C)throw C.error}}},d.prototype.merge=function(h){var E=this;return Xt(h)&&(h=h.toJS()),Ar(function(){var C=En(!0);try{F(h)?B(h).forEach(function(H){return E.set(H,h[H])}):Array.isArray(h)?h.forEach(function(H){var J=Se(H,2),pe=J[0],Te=J[1];return E.set(pe,Te)}):q(h)?(h.constructor!==Map&&T("Cannot initialize from classes that inherit from Map: "+h.constructor.name),h.forEach(function(H,J){return E.set(J,H)})):h!=null&&T("Cannot initialize map from "+h)}finally{Wn(C)}}),this},d.prototype.clear=function(){var h=this;Ar(function(){re(function(){var E,C;try{for(var H=Le(h.keys()),J=H.next();!J.done;J=H.next()){var pe=J.value;h.delete(pe)}}catch(Te){E={error:Te}}finally{try{J&&!J.done&&(C=H.return)&&C.call(H)}finally{if(E)throw E.error}}})})},d.prototype.replace=function(h){var E=this;return Ar(function(){var C,H,J,pe,Te=Y(h),$e=new Map,dt=!1;try{for(var pt=Le(E._data.keys()),Et=pt.next();!Et.done;Et=pt.next()){var xt=Et.value;if(!Te.has(xt)){var _t=E.delete(xt);if(_t)dt=!0;else{var Yt=E._data.get(xt);$e.set(xt,Yt)}}}}catch(fn){C={error:fn}}finally{try{Et&&!Et.done&&(H=pt.return)&&H.call(pt)}finally{if(C)throw C.error}}try{for(var Mt=Le(Te.entries()),Er=Mt.next();!Er.done;Er=Mt.next()){var Cn=Se(Er.value,2),xt=Cn[0],Yt=Cn[1],ma=E._data.has(xt);if(E.set(xt,Yt),E._data.has(xt)){var ba=E._data.get(xt);$e.set(xt,ba),ma||(dt=!0)}}}catch(fn){J={error:fn}}finally{try{Er&&!Er.done&&(pe=Mt.return)&&pe.call(Mt)}finally{if(J)throw J.error}}if(!dt)if(E._data.size!==$e.size)E._keysAtom.reportChanged();else for(var Oa=E._data.keys(),Ea=$e.keys(),si=Oa.next(),Rn=Ea.next();!si.done;){if(si.value!==Rn.value){E._keysAtom.reportChanged();break}si=Oa.next(),Rn=Ea.next()}E._data=$e}),this},Object.defineProperty(d.prototype,"size",{get:function(){return this._keysAtom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),d.prototype.toPOJO=function(){var h,E,C={};try{for(var H=Le(this),J=H.next();!J.done;J=H.next()){var pe=Se(J.value,2),Te=pe[0],$e=pe[1];C[typeof Te=="symbol"?Te:X(Te)]=$e}}catch(dt){h={error:dt}}finally{try{J&&!J.done&&(E=H.return)&&E.call(H)}finally{if(h)throw h.error}}return C},d.prototype.toJS=function(){return new Map(this)},d.prototype.toJSON=function(){return this.toPOJO()},d.prototype.toString=function(){var h=this;return this.name+"[{ "+Array.from(this.keys()).map(function(E){return X(E)+": "+(""+h.get(E))}).join(", ")+" }]"},d.prototype.observe=function(h,E){return Qn(this,h)},d.prototype.intercept=function(h){return Jn(this,h)},d}(),Xt=te("ObservableMap",ai),sa,Is={},fa=function(){function d(h,E,C){if(E===void 0&&(E=Ve),C===void 0&&(C="ObservableSet@"+S()),this.name=C,this[sa]=Is,this._data=new Set,this._atom=se(this.name),this[Symbol.toStringTag]="Set",typeof Set!="function")throw new Error("mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js");this.enhancer=function(H,J){return E(H,J,C)},h&&this.replace(h)}return d.prototype.dehanceValue=function(h){return this.dehancer!==void 0?this.dehancer(h):h},d.prototype.clear=function(){var h=this;Ar(function(){re(function(){var E,C;try{for(var H=Le(h._data.values()),J=H.next();!J.done;J=H.next()){var pe=J.value;h.delete(pe)}}catch(Te){E={error:Te}}finally{try{J&&!J.done&&(C=H.return)&&C.call(H)}finally{if(E)throw E.error}}})})},d.prototype.forEach=function(h,E){var C,H;try{for(var J=Le(this),pe=J.next();!pe.done;pe=J.next()){var Te=pe.value;h.call(E,Te,Te,this)}}catch($e){C={error:$e}}finally{try{pe&&!pe.done&&(H=J.return)&&H.call(J)}finally{if(C)throw C.error}}},Object.defineProperty(d.prototype,"size",{get:function(){return this._atom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),d.prototype.add=function(h){var E=this;if(tt(this._atom),Nr(this)){var C=Dr(this,{type:"add",object:this,newValue:h});if(!C)return this}if(!this.has(h)){Ar(function(){E._data.add(E.enhancer(h,void 0)),E._atom.reportChanged()});var H=Ct(),J=br(this),C=J||H?{type:"add",object:this,newValue:h}:null;J&&tr(this,C)}return this},d.prototype.delete=function(h){var E=this;if(Nr(this)){var C=Dr(this,{type:"delete",object:this,oldValue:h});if(!C)return!1}if(this.has(h)){var H=Ct(),J=br(this),C=J||H?{type:"delete",object:this,oldValue:h}:null;return Ar(function(){E._atom.reportChanged(),E._data.delete(h)}),J&&tr(this,C),!0}return!1},d.prototype.has=function(h){return this._atom.reportObserved(),this._data.has(this.dehanceValue(h))},d.prototype.entries=function(){var h=0,E=Array.from(this.keys()),C=Array.from(this.values());return xo({next:function(){var H=h;return h+=1,H<C.length?{value:[E[H],C[H]],done:!1}:{done:!0}}})},d.prototype.keys=function(){return this.values()},d.prototype.values=function(){this._atom.reportObserved();var h=this,E=0,C=Array.from(this._data.values());return xo({next:function(){return E<C.length?{value:h.dehanceValue(C[E++]),done:!1}:{done:!0}}})},d.prototype.replace=function(h){var E=this;return dr(h)&&(h=h.toJS()),Ar(function(){var C=En(!0);try{Array.isArray(h)?(E.clear(),h.forEach(function(H){return E.add(H)})):ee(h)?(E.clear(),h.forEach(function(H){return E.add(H)})):h!=null&&T("Cannot initialize set from "+h)}finally{Wn(C)}}),this},d.prototype.observe=function(h,E){return Qn(this,h)},d.prototype.intercept=function(h){return Jn(this,h)},d.prototype.toJS=function(){return new Set(this)},d.prototype.toString=function(){return this.name+"[ "+Array.from(this).join(", ")+" ]"},d.prototype[sa=D,Symbol.iterator]=function(){return this.values()},d}(),dr=te("ObservableSet",fa),ca=function(){function d(h,E,C,H){E===void 0&&(E=new Map),this.target=h,this.values=E,this.name=C,this.defaultEnhancer=H,this.keysAtom=new k(C+".keys")}return d.prototype.read=function(h){return this.values.get(h).get()},d.prototype.write=function(h,E){var C=this.target,H=this.values.get(h);if(H instanceof Sn){H.set(E);return}if(Nr(this)){var J=Dr(this,{type:"update",object:this.proxy||C,name:h,newValue:E});if(!J)return;E=J.newValue}if(E=H.prepareNewValue(E),E!==ke.UNCHANGED){var pe=br(this),Te=Ct(),J=pe||Te?{type:"update",object:this.proxy||C,oldValue:H.value,name:h,newValue:E}:null;H.setNewValue(E),pe&&tr(this,J)}},d.prototype.has=function(h){var E=this.pendingKeys||(this.pendingKeys=new Map),C=E.get(h);if(C)return C.get();var H=!!this.values.get(h);return C=new ln(H,qe,this.name+"."+X(h)+"?",!1),E.set(h,C),C.get()},d.prototype.addObservableProp=function(h,E,C){C===void 0&&(C=this.defaultEnhancer);var H=this.target;if(Nr(this)){var J=Dr(this,{object:this.proxy||H,name:h,type:"add",newValue:E});if(!J)return;E=J.newValue}var pe=new ln(E,C,this.name+"."+X(h),!1);this.values.set(h,pe),E=pe.value,Object.defineProperty(H,h,_s(h)),this.notifyPropertyAddition(h,E)},d.prototype.addComputedProp=function(h,E,C){var H=this.target;C.name=C.name||this.name+"."+X(E),this.values.set(E,new Sn(C)),(h===H||ue(h,E))&&Object.defineProperty(h,E,Bs(E))},d.prototype.remove=function(h){if(!!this.values.has(h)){var E=this.target;if(Nr(this)){var C=Dr(this,{object:this.proxy||E,name:h,type:"remove"});if(!C)return}try{wt();var H=br(this),J=Ct(),pe=this.values.get(h),Te=pe&&pe.get();if(pe&&pe.set(void 0),this.keysAtom.reportChanged(),this.values.delete(h),this.pendingKeys){var $e=this.pendingKeys.get(h);$e&&$e.set(!1)}delete this.target[h];var C=H||J?{type:"remove",object:this.proxy||E,oldValue:Te,name:h}:null;H&&tr(this,C)}finally{mr()}}},d.prototype.illegalAccess=function(h,E){console.warn("Property '"+E+"' of '"+h+"' was accessed through the prototype chain. Use 'decorate' instead to declare the prop or access it statically through it's owner")},d.prototype.observe=function(h,E){return Qn(this,h)},d.prototype.intercept=function(h){return Jn(this,h)},d.prototype.notifyPropertyAddition=function(h,E){var C=br(this),H=Ct(),J=C||H?{type:"add",object:this.proxy||this.target,name:h,newValue:E}:null;if(C&&tr(this,J),this.pendingKeys){var pe=this.pendingKeys.get(h);pe&&pe.set(!0)}this.keysAtom.reportChanged()},d.prototype.getKeys=function(){var h,E;this.keysAtom.reportObserved();var C=[];try{for(var H=Le(this.values),J=H.next();!J.done;J=H.next()){var pe=Se(J.value,2),Te=pe[0],$e=pe[1];$e instanceof ln&&C.push(Te)}}catch(dt){h={error:dt}}finally{try{J&&!J.done&&(E=H.return)&&E.call(H)}finally{if(h)throw h.error}}return C},d}();function ui(d,h,E){if(h===void 0&&(h=""),E===void 0&&(E=Ve),Object.prototype.hasOwnProperty.call(d,D))return d[D];F(d)||(h=(d.constructor.name||"ObservableObject")+"@"+S()),h||(h="ObservableObject@"+S());var C=new ca(d,new Map,X(h),E);return V(d,D,C),C}var da=Object.create(null),pa=Object.create(null);function _s(d){return da[d]||(da[d]={configurable:!0,enumerable:!0,get:function(){return this[D].read(d)},set:function(h){this[D].write(d,h)}})}function ha(d){var h=d[D];return h||(ge(d),d[D])}function Bs(d){return pa[d]||(pa[d]={configurable:ke.computedConfigurable,enumerable:!1,get:function(){return ha(this).read(d)},set:function(h){ha(this).write(d,h)}})}var Ls=te("ObservableObjectAdministration",ca);function Or(d){return _(d)?(ge(d),Ls(d[D])):!1}function jr(d,h){if(typeof d=="object"&&d!==null){if(zr(d))return h!==void 0&&T(!1),d[D].atom;if(dr(d))return d[D];if(Xt(d)){var E=d;if(h===void 0)return E._keysAtom;var C=E._data.get(h)||E._hasMap.get(h);return C||T(!1),C}if(ge(d),h&&!d[D]&&d[h],Or(d)){if(!h)return T(!1);var C=d[D].values.get(h);return C||T(!1),C}if(K(d)||xn(d)||mo(d))return d}else if(typeof d=="function"&&mo(d[D]))return d[D];return T(!1)}function qn(d,h){if(d||T("Expecting some object"),h!==void 0)return qn(jr(d,h));if(K(d)||xn(d)||mo(d)||Xt(d)||dr(d))return d;if(ge(d),d[D])return d[D];T(!1)}function zs(d,h){var E;return h!==void 0?E=jr(d,h):Or(d)||Xt(d)||dr(d)?E=qn(d):E=jr(d),E.name}var va=Object.prototype.toString;function So(d,h,E){return E===void 0&&(E=-1),eo(d,h,E)}function eo(d,h,E,C,H){if(d===h)return d!==0||1/d===1/h;if(d==null||h==null)return!1;if(d!==d)return h!==h;var J=typeof d;if(J!=="function"&&J!=="object"&&typeof h!="object")return!1;var pe=va.call(d);if(pe!==va.call(h))return!1;switch(pe){case"[object RegExp]":case"[object String]":return""+d==""+h;case"[object Number]":return+d!=+d?+h!=+h:+d==0?1/+d===1/h:+d==+h;case"[object Date]":case"[object Boolean]":return+d==+h;case"[object Symbol]":return typeof Symbol!="undefined"&&Symbol.valueOf.call(d)===Symbol.valueOf.call(h);case"[object Map]":case"[object Set]":E>=0&&E++;break}d=ya(d),h=ya(h);var Te=pe==="[object Array]";if(!Te){if(typeof d!="object"||typeof h!="object")return!1;var $e=d.constructor,dt=h.constructor;if($e!==dt&&!(typeof $e=="function"&&$e instanceof $e&&typeof dt=="function"&&dt instanceof dt)&&"constructor"in d&&"constructor"in h)return!1}if(E===0)return!1;E<0&&(E=-1),C=C||[],H=H||[];for(var pt=C.length;pt--;)if(C[pt]===d)return H[pt]===h;if(C.push(d),H.push(h),Te){if(pt=d.length,pt!==h.length)return!1;for(;pt--;)if(!eo(d[pt],h[pt],E-1,C,H))return!1}else{var Et=Object.keys(d),xt=void 0;if(pt=Et.length,Object.keys(h).length!==pt)return!1;for(;pt--;)if(xt=Et[pt],!(Fs(h,xt)&&eo(d[xt],h[xt],E-1,C,H)))return!1}return C.pop(),H.pop(),!0}function ya(d){return zr(d)?d.slice():q(d)||Xt(d)||ee(d)||dr(d)?Array.from(d.entries()):d}function Fs(d,h){return Object.prototype.hasOwnProperty.call(d,h)}function xo(d){return d[Symbol.iterator]=li,d}function li(){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.");try{}catch{var ga=vo();typeof l=="undefined"&&(ga.process={}),ga.process.env={}}(function(){function d(){}if(d.name!=="testCodeMinification"&&!1)var h})(),typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:Ki,extras:{getDebugName:zs},$mobx:D})}).call(this,i(155),i(82))},function(u,c,i){i.d(c,"a",function(){return ue}),i.d(c,"b",function(){return ce}),i.d(c,"c",function(){return Fe}),i.d(c,"d",function(){return He}),i.d(c,"e",function(){return F}),i.d(c,"f",function(){return V}),i.d(c,"g",function(){return F}),i.d(c,"h",function(){return Se}),i.d(c,"i",function(){return s}),i.d(c,"j",function(){return Le}),i.d(c,"k",function(){return w});var l,s,y,b,x,S,T,N={},A=[],R=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function I(G,L){for(var W in L)G[W]=L[W];return G}function _(G){var L=G.parentNode;L&&L.removeChild(G)}function F(G,L,W){var fe,ge,de,Ie={};for(de in L)de=="key"?fe=L[de]:de=="ref"?ge=L[de]:Ie[de]=L[de];if(arguments.length>2&&(Ie.children=arguments.length>3?l.call(arguments,2):W),typeof G=="function"&&G.defaultProps!=null)for(de in G.defaultProps)Ie[de]===void 0&&(Ie[de]=G.defaultProps[de]);return Y(G,Ie,fe,ge,null)}function Y(G,L,W,fe,ge){var de={type:G,props:L,key:W,ref:fe,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:ge==null?++y:ge};return ge==null&&s.vnode!=null&&s.vnode(de),de}function V(){return{current:null}}function ce(G){return G.children}function ue(G,L){this.props=G,this.context=L}function te(G,L){if(L==null)return G.__?te(G.__,G.__.__k.indexOf(G)+1):null;for(var W;L<G.__k.length;L++)if((W=G.__k[L])!=null&&W.__e!=null)return W.__e;return typeof G.type=="function"?te(G):null}function q(G){var L,W;if((G=G.__)!=null&&G.__c!=null){for(G.__e=G.__c.base=null,L=0;L<G.__k.length;L++)if((W=G.__k[L])!=null&&W.__e!=null){G.__e=G.__c.base=W.__e;break}return q(G)}}function ee(G){(!G.__d&&(G.__d=!0)&&b.push(G)&&!B.__r++||S!==s.debounceRendering)&&((S=s.debounceRendering)||x)(B)}function B(){for(var G;B.__r=b.length;)G=b.sort(function(L,W){return L.__v.__b-W.__v.__b}),b=[],G.some(function(L){var W,fe,ge,de,Ie,Ve;L.__d&&(Ie=(de=(W=L).__v).__e,(Ve=W.__P)&&(fe=[],(ge=I({},de)).__v=de.__v+1,me(Ve,de,ge,W.__n,Ve.ownerSVGElement!==void 0,de.__h!=null?[Ie]:null,fe,Ie==null?te(de):Ie,de.__h),be(fe,de),de.__e!=Ie&&q(de)))})}function X(G,L,W,fe,ge,de,Ie,Ve,We,qe){var ye,lt,Ze,Ge,et,St,st,gt=fe&&fe.__k||A,ae=gt.length;for(W.__k=[],ye=0;ye<L.length;ye++)if((Ge=W.__k[ye]=(Ge=L[ye])==null||typeof Ge=="boolean"?null:typeof Ge=="string"||typeof Ge=="number"||typeof Ge=="bigint"?Y(null,Ge,null,null,Ge):Array.isArray(Ge)?Y(ce,{children:Ge},null,null,null):Ge.__b>0?Y(Ge.type,Ge.props,Ge.key,null,Ge.__v):Ge)!=null){if(Ge.__=W,Ge.__b=W.__b+1,(Ze=gt[ye])===null||Ze&&Ge.key==Ze.key&&Ge.type===Ze.type)gt[ye]=void 0;else for(lt=0;lt<ae;lt++){if((Ze=gt[lt])&&Ge.key==Ze.key&&Ge.type===Ze.type){gt[lt]=void 0;break}Ze=null}me(G,Ge,Ze=Ze||N,ge,de,Ie,Ve,We,qe),et=Ge.__e,(lt=Ge.ref)&&Ze.ref!=lt&&(st||(st=[]),Ze.ref&&st.push(Ze.ref,null,Ge),st.push(lt,Ge.__c||et,Ge)),et!=null?(St==null&&(St=et),typeof Ge.type=="function"&&Ge.__k===Ze.__k?Ge.__d=We=P(Ge,We,G):We=D(G,Ge,Ze,gt,et,We),typeof W.type=="function"&&(W.__d=We)):We&&Ze.__e==We&&We.parentNode!=G&&(We=te(Ze))}for(W.__e=St,ye=ae;ye--;)gt[ye]!=null&&(typeof W.type=="function"&>[ye].__e!=null&>[ye].__e==W.__d&&(W.__d=te(fe,ye+1)),ze(gt[ye],gt[ye]));if(st)for(ye=0;ye<st.length;ye++)we(st[ye],st[++ye],st[++ye])}function P(G,L,W){for(var fe,ge=G.__k,de=0;ge&&de<ge.length;de++)(fe=ge[de])&&(fe.__=G,L=typeof fe.type=="function"?P(fe,L,W):D(W,fe,fe,ge,fe.__e,L));return L}function w(G,L){return L=L||[],G==null||typeof G=="boolean"||(Array.isArray(G)?G.some(function(W){w(W,L)}):L.push(G)),L}function D(G,L,W,fe,ge,de){var Ie,Ve,We;if(L.__d!==void 0)Ie=L.__d,L.__d=void 0;else if(W==null||ge!=de||ge.parentNode==null)e:if(de==null||de.parentNode!==G)G.appendChild(ge),Ie=null;else{for(Ve=de,We=0;(Ve=Ve.nextSibling)&&We<fe.length;We+=2)if(Ve==ge)break e;G.insertBefore(ge,de),Ie=de}return Ie!==void 0?Ie:ge.nextSibling}function k(G,L,W,fe,ge){var de;for(de in W)de==="children"||de==="key"||de in L||se(G,de,null,W[de],fe);for(de in L)ge&&typeof L[de]!="function"||de==="children"||de==="key"||de==="value"||de==="checked"||W[de]===L[de]||se(G,de,L[de],W[de],fe)}function K(G,L,W){L[0]==="-"?G.setProperty(L,W):G[L]=W==null?"":typeof W!="number"||R.test(L)?W:W+"px"}function se(G,L,W,fe,ge){var de;e:if(L==="style")if(typeof W=="string")G.style.cssText=W;else{if(typeof fe=="string"&&(G.style.cssText=fe=""),fe)for(L in fe)W&&L in W||K(G.style,L,"");if(W)for(L in W)fe&&W[L]===fe[L]||K(G.style,L,W[L])}else if(L[0]==="o"&&L[1]==="n")de=L!==(L=L.replace(/Capture$/,"")),L=L.toLowerCase()in G?L.toLowerCase().slice(2):L.slice(2),G.l||(G.l={}),G.l[L+de]=W,W?fe||G.addEventListener(L,de?ve:Pe,de):G.removeEventListener(L,de?ve:Pe,de);else if(L!=="dangerouslySetInnerHTML"){if(ge)L=L.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if(L!=="href"&&L!=="list"&&L!=="form"&&L!=="tabIndex"&&L!=="download"&&L in G)try{G[L]=W==null?"":W;break e}catch{}typeof W=="function"||(W!=null&&(W!==!1||L[0]==="a"&&L[1]==="r")?G.setAttribute(L,W):G.removeAttribute(L))}}function Pe(G){this.l[G.type+!1](s.event?s.event(G):G)}function ve(G){this.l[G.type+!0](s.event?s.event(G):G)}function me(G,L,W,fe,ge,de,Ie,Ve,We){var qe,ye,lt,Ze,Ge,et,St,st,gt,ae,jt,Pt=L.type;if(L.constructor!==void 0)return null;W.__h!=null&&(We=W.__h,Ve=L.__e=W.__e,L.__h=null,de=[Ve]),(qe=s.__b)&&qe(L);try{e:if(typeof Pt=="function"){if(st=L.props,gt=(qe=Pt.contextType)&&fe[qe.__c],ae=qe?gt?gt.props.value:qe.__:fe,W.__c?St=(ye=L.__c=W.__c).__=ye.__E:("prototype"in Pt&&Pt.prototype.render?L.__c=ye=new Pt(st,ae):(L.__c=ye=new ue(st,ae),ye.constructor=Pt,ye.render=Ye),gt&>.sub(ye),ye.props=st,ye.state||(ye.state={}),ye.context=ae,ye.__n=fe,lt=ye.__d=!0,ye.__h=[]),ye.__s==null&&(ye.__s=ye.state),Pt.getDerivedStateFromProps!=null&&(ye.__s==ye.state&&(ye.__s=I({},ye.__s)),I(ye.__s,Pt.getDerivedStateFromProps(st,ye.__s))),Ze=ye.props,Ge=ye.state,lt)Pt.getDerivedStateFromProps==null&&ye.componentWillMount!=null&&ye.componentWillMount(),ye.componentDidMount!=null&&ye.__h.push(ye.componentDidMount);else{if(Pt.getDerivedStateFromProps==null&&st!==Ze&&ye.componentWillReceiveProps!=null&&ye.componentWillReceiveProps(st,ae),!ye.__e&&ye.shouldComponentUpdate!=null&&ye.shouldComponentUpdate(st,ye.__s,ae)===!1||L.__v===W.__v){ye.props=st,ye.state=ye.__s,L.__v!==W.__v&&(ye.__d=!1),ye.__v=L,L.__e=W.__e,L.__k=W.__k,L.__k.forEach(function(bt){bt&&(bt.__=L)}),ye.__h.length&&Ie.push(ye);break e}ye.componentWillUpdate!=null&&ye.componentWillUpdate(st,ye.__s,ae),ye.componentDidUpdate!=null&&ye.__h.push(function(){ye.componentDidUpdate(Ze,Ge,et)})}ye.context=ae,ye.props=st,ye.state=ye.__s,(qe=s.__r)&&qe(L),ye.__d=!1,ye.__v=L,ye.__P=G,qe=ye.render(ye.props,ye.state,ye.context),ye.state=ye.__s,ye.getChildContext!=null&&(fe=I(I({},fe),ye.getChildContext())),lt||ye.getSnapshotBeforeUpdate==null||(et=ye.getSnapshotBeforeUpdate(Ze,Ge)),jt=qe!=null&&qe.type===ce&&qe.key==null?qe.props.children:qe,X(G,Array.isArray(jt)?jt:[jt],L,W,fe,ge,de,Ie,Ve,We),ye.base=L.__e,L.__h=null,ye.__h.length&&Ie.push(ye),St&&(ye.__E=ye.__=null),ye.__e=!1}else de==null&&L.__v===W.__v?(L.__k=W.__k,L.__e=W.__e):L.__e=Oe(W.__e,L,W,fe,ge,de,Ie,We);(qe=s.diffed)&&qe(L)}catch(bt){L.__v=null,(We||de!=null)&&(L.__e=Ve,L.__h=!!We,de[de.indexOf(Ve)]=null),s.__e(bt,L,W)}}function be(G,L){s.__c&&s.__c(L,G),G.some(function(W){try{G=W.__h,W.__h=[],G.some(function(fe){fe.call(W)})}catch(fe){s.__e(fe,W.__v)}})}function Oe(G,L,W,fe,ge,de,Ie,Ve){var We,qe,ye,lt=W.props,Ze=L.props,Ge=L.type,et=0;if(Ge==="svg"&&(ge=!0),de!=null){for(;et<de.length;et++)if((We=de[et])&&"setAttribute"in We==!!Ge&&(Ge?We.localName===Ge:We.nodeType===3)){G=We,de[et]=null;break}}if(G==null){if(Ge===null)return document.createTextNode(Ze);G=ge?document.createElementNS("http://www.w3.org/2000/svg",Ge):document.createElement(Ge,Ze.is&&Ze),de=null,Ve=!1}if(Ge===null)lt===Ze||Ve&&G.data===Ze||(G.data=Ze);else{if(de=de&&l.call(G.childNodes),qe=(lt=W.props||N).dangerouslySetInnerHTML,ye=Ze.dangerouslySetInnerHTML,!Ve){if(de!=null)for(lt={},et=0;et<G.attributes.length;et++)lt[G.attributes[et].name]=G.attributes[et].value;(ye||qe)&&(ye&&(qe&&ye.__html==qe.__html||ye.__html===G.innerHTML)||(G.innerHTML=ye&&ye.__html||""))}if(k(G,Ze,lt,ge,Ve),ye)L.__k=[];else if(et=L.props.children,X(G,Array.isArray(et)?et:[et],L,W,fe,ge&&Ge!=="foreignObject",de,Ie,de?de[0]:W.__k&&te(W,0),Ve),de!=null)for(et=de.length;et--;)de[et]!=null&&_(de[et]);Ve||("value"in Ze&&(et=Ze.value)!==void 0&&(et!==lt.value||et!==G.value||Ge==="progress"&&!et)&&se(G,"value",et,lt.value,!1),"checked"in Ze&&(et=Ze.checked)!==void 0&&et!==G.checked&&se(G,"checked",et,lt.checked,!1))}return G}function we(G,L,W){try{typeof G=="function"?G(L):G.current=L}catch(fe){s.__e(fe,W)}}function ze(G,L,W){var fe,ge;if(s.unmount&&s.unmount(G),(fe=G.ref)&&(fe.current&&fe.current!==G.__e||we(fe,null,L)),(fe=G.__c)!=null){if(fe.componentWillUnmount)try{fe.componentWillUnmount()}catch(de){s.__e(de,L)}fe.base=fe.__P=null}if(fe=G.__k)for(ge=0;ge<fe.length;ge++)fe[ge]&&ze(fe[ge],L,typeof G.type!="function");W||G.__e==null||_(G.__e),G.__e=G.__d=void 0}function Ye(G,L,W){return this.constructor(G,W)}function Le(G,L,W){var fe,ge,de;s.__&&s.__(G,L),ge=(fe=typeof W=="function")?null:W&&W.__k||L.__k,de=[],me(L,G=(!fe&&W||L).__k=F(ce,null,[G]),ge||N,N,L.ownerSVGElement!==void 0,!fe&&W?[W]:ge?null:L.firstChild?l.call(L.childNodes):null,de,!fe&&W?W:ge?ge.__e:L.firstChild,fe),be(de,G)}function Se(G,L){Le(G,L,Se)}function Fe(G,L,W){var fe,ge,de,Ie=I({},G.props);for(de in L)de=="key"?fe=L[de]:de=="ref"?ge=L[de]:Ie[de]=L[de];return arguments.length>2&&(Ie.children=arguments.length>3?l.call(arguments,2):W),Y(G.type,Ie,fe||G.key,ge||G.ref,null)}function He(G,L){var W={__c:L="__cC"+T++,__:G,Consumer:function(fe,ge){return fe.children(ge)},Provider:function(fe){var ge,de;return this.getChildContext||(ge=[],(de={})[L]=this,this.getChildContext=function(){return de},this.shouldComponentUpdate=function(Ie){this.props.value!==Ie.value&&ge.some(ee)},this.sub=function(Ie){ge.push(Ie);var Ve=Ie.componentWillUnmount;Ie.componentWillUnmount=function(){ge.splice(ge.indexOf(Ie),1),Ve&&Ve.call(Ie)}}),fe.children}};return W.Provider.__=W.Consumer.contextType=W}l=A.slice,s={__e:function(G,L){for(var W,fe,ge;L=L.__;)if((W=L.__c)&&!W.__)try{if((fe=W.constructor)&&fe.getDerivedStateFromError!=null&&(W.setState(fe.getDerivedStateFromError(G)),ge=W.__d),W.componentDidCatch!=null&&(W.componentDidCatch(G),ge=W.__d),ge)return W.__E=W}catch(de){G=de}throw G}},y=0,ue.prototype.setState=function(G,L){var W;W=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=I({},this.state),typeof G=="function"&&(G=G(I({},W),this.props)),G&&I(W,G),G!=null&&this.__v&&(L&&this.__h.push(L),ee(this))},ue.prototype.forceUpdate=function(G){this.__v&&(this.__e=!0,G&&this.__h.push(G),ee(this))},ue.prototype.render=ce,b=[],x=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,B.__r=0,T=0},function(u,c,i){var l=i(116),s=i(44),y=i(178);l||s(Object.prototype,"toString",y,{unsafe:!0})},function(u,c,i){var l=i(39),s=i(83),y=i(71),b=i(56),x=i(111),S="Array Iterator",T=b.set,N=b.getterFor(S);u.exports=x(Array,"Array",function(A,R){T(this,{type:S,target:l(A),index:0,kind:R})},function(){var A=N(this),R=A.target,I=A.kind,_=A.index++;return!R||_>=R.length?(A.target=void 0,{value:void 0,done:!0}):I=="keys"?{value:_,done:!1}:I=="values"?{value:R[_],done:!1}:{value:[_,R[_]],done:!1}},"values"),y.Arguments=y.Array,s("keys"),s("values"),s("entries")},function(u,c,i){var l=i(7),s=i(147),y=i(148),b=i(3),x=i(57),S=i(27),T=S("iterator"),N=S("toStringTag"),A=b.values,R=function(_,F){if(_){if(_[T]!==A)try{x(_,T,A)}catch{_[T]=A}if(_[N]||x(_,N,F),s[F]){for(var Y in b)if(_[Y]!==b[Y])try{x(_,Y,b[Y])}catch{_[Y]=b[Y]}}}};for(var I in s)R(l[I]&&l[I].prototype,I);R(y,"DOMTokenList")},function(u,c,i){var l=i(16),s=i(7),y=i(46),b=i(77),x=i(35),S=i(15),T=i(65),N=i(36),A=i(109),R=i(18),I=i(34),_=i(99),F=i(28),Y=i(33),V=i(58),ce=i(88),ue=i(32),te=i(38),q=i(39),ee=i(87),B=i(40),X=i(72),P=i(54),w=i(67),D=i(73),k=i(139),K=i(112),se=i(51),Pe=i(37),ve=i(93),me=i(101),be=i(44),Oe=i(84),we=i(91),ze=i(70),Ye=i(85),Le=i(27),Se=i(149),Fe=i(150),He=i(74),G=i(56),L=i(75).forEach,W=we("hidden"),fe="Symbol",ge="prototype",de=Le("toPrimitive"),Ie=G.set,Ve=G.getterFor(fe),We=Object[ge],qe=s.Symbol,ye=qe&&qe[ge],lt=s.TypeError,Ze=s.QObject,Ge=y("JSON","stringify"),et=se.f,St=Pe.f,st=k.f,gt=ve.f,ae=S([].push),jt=Oe("symbols"),Pt=Oe("op-symbols"),bt=Oe("string-to-symbol-registry"),Kt=Oe("symbol-to-string-registry"),gr=Oe("wks"),Qt=!Ze||!Ze[ge]||!Ze[ge].findChild,wr=N&&R(function(){return P(St({},"a",{get:function(){return St(this,"a",{value:7}).a}})).a!=7})?function(re,ne,Me){var je=et(We,ne);je&&delete We[ne],St(re,ne,Me),je&&re!==We&&St(We,ne,je)}:St,nt=function(re,ne){var Me=jt[re]=P(ye);return Ie(Me,{type:fe,tag:re,description:ne}),N||(Me.description=ne),Me},Tt=function(ne,Me,je){ne===We&&Tt(Pt,Me,je),ue(ne);var Xe=ee(Me);return ue(je),I(jt,Xe)?(je.enumerable?(I(ne,W)&&ne[W][Xe]&&(ne[W][Xe]=!1),je=P(je,{enumerable:X(0,!1)})):(I(ne,W)||St(ne,W,X(1,{})),ne[W][Xe]=!0),wr(ne,Xe,je)):St(ne,Xe,je)},ar=function(ne,Me){ue(ne);var je=q(Me),Xe=w(je).concat(ct(je));return L(Xe,function(yt){(!N||x(Ke,je,yt))&&Tt(ne,yt,je[yt])}),ne},Re=function(ne,Me){return Me===void 0?P(ne):ar(P(ne),Me)},Ke=function(ne){var Me=ee(ne),je=x(gt,this,Me);return this===We&&I(jt,Me)&&!I(Pt,Me)?!1:je||!I(this,Me)||!I(jt,Me)||I(this,W)&&this[W][Me]?je:!0},at=function(ne,Me){var je=q(ne),Xe=ee(Me);if(!(je===We&&I(jt,Xe)&&!I(Pt,Xe))){var yt=et(je,Xe);return yt&&I(jt,Xe)&&!(I(je,W)&&je[W][Xe])&&(yt.enumerable=!0),yt}},tt=function(ne){var Me=st(q(ne)),je=[];return L(Me,function(Xe){!I(jt,Xe)&&!I(ze,Xe)&&ae(je,Xe)}),je},ct=function(ne){var Me=ne===We,je=st(Me?Pt:q(ne)),Xe=[];return L(je,function(yt){I(jt,yt)&&(!Me||I(We,yt))&&ae(Xe,jt[yt])}),Xe};if(A||(qe=function(){if(V(ye,this))throw lt("Symbol is not a constructor");var ne=!arguments.length||arguments[0]===void 0?void 0:B(arguments[0]),Me=Ye(ne),je=function(Xe){this===We&&x(je,Pt,Xe),I(this,W)&&I(this[W],Me)&&(this[W][Me]=!1),wr(this,Me,X(1,Xe))};return N&&Qt&&wr(We,Me,{configurable:!0,set:je}),nt(Me,ne)},ye=qe[ge],be(ye,"toString",function(){return Ve(this).tag}),be(qe,"withoutSetter",function(re){return nt(Ye(re),re)}),ve.f=Ke,Pe.f=Tt,se.f=at,D.f=k.f=tt,K.f=ct,Se.f=function(re){return nt(Le(re),re)},N&&(St(ye,"description",{configurable:!0,get:function(){return Ve(this).description}}),T||be(We,"propertyIsEnumerable",Ke,{unsafe:!0}))),l({global:!0,wrap:!0,forced:!A,sham:!A},{Symbol:qe}),L(w(gr),function(re){Fe(re)}),l({target:fe,stat:!0,forced:!A},{for:function(re){var ne=B(re);if(I(bt,ne))return bt[ne];var Me=qe(ne);return bt[ne]=Me,Kt[Me]=ne,Me},keyFor:function(ne){if(!ce(ne))throw lt(ne+" is not a symbol");if(I(Kt,ne))return Kt[ne]},useSetter:function(){Qt=!0},useSimple:function(){Qt=!1}}),l({target:"Object",stat:!0,forced:!A,sham:!N},{create:Re,defineProperty:Tt,defineProperties:ar,getOwnPropertyDescriptor:at}),l({target:"Object",stat:!0,forced:!A},{getOwnPropertyNames:tt,getOwnPropertySymbols:ct}),l({target:"Object",stat:!0,forced:R(function(){K.f(1)})},{getOwnPropertySymbols:function(ne){return K.f(te(ne))}}),Ge){var U=!A||R(function(){var re=qe();return Ge([re])!="[null]"||Ge({a:re})!="{}"||Ge(Object(re))!="{}"});l({target:"JSON",stat:!0,forced:U},{stringify:function(ne,Me,je){var Xe=me(arguments),yt=Me;if(!(!Y(Me)&&ne===void 0||ce(ne)))return _(Me)||(Me=function(qt,er){if(F(yt)&&(er=x(yt,this,qt,er)),!ce(er))return er}),Xe[1]=Me,b(Ge,null,Xe)}})}if(!ye[de]){var Q=ye.valueOf;be(ye,de,function(re){return x(Q,this)})}He(qe,fe),ze[W]=!0},function(u,c,i){var l=i(146).charAt,s=i(40),y=i(56),b=i(111),x="String Iterator",S=y.set,T=y.getterFor(x);b(String,"String",function(N){S(this,{type:x,string:s(N),index:0})},function(){var A=T(this),R=A.string,I=A.index,_;return I>=R.length?{value:void 0,done:!0}:(_=l(R,I),A.index+=_.length,{value:_,done:!1})})},function(u,c,i){(function(l){var s=function(y){return y&&y.Math==Math&&y};u.exports=s(typeof globalThis=="object"&&globalThis)||s(typeof window=="object"&&window)||s(typeof self=="object"&&self)||s(typeof l=="object"&&l)||function(){return this}()||Function("return this")()}).call(this,i(82))},function(u,c,i){var l=i(16),s=i(36),y=i(7),b=i(15),x=i(34),S=i(28),T=i(58),N=i(40),A=i(37).f,R=i(134),I=y.Symbol,_=I&&I.prototype;if(s&&S(I)&&(!("description"in _)||I().description!==void 0)){var F={},Y=function(){var X=arguments.length<1||arguments[0]===void 0?void 0:N(arguments[0]),P=T(_,this)?new I(X):X===void 0?I():I(X);return X===""&&(F[P]=!0),P};R(Y,I),Y.prototype=_,_.constructor=Y;var V=String(I("test"))=="Symbol(test)",ce=b(_.toString),ue=b(_.valueOf),te=/^Symbol\((.*)\)[^)]+$/,q=b("".replace),ee=b("".slice);A(_,"description",{configurable:!0,get:function(){var X=ue(this),P=ce(X);if(x(F,X))return"";var w=V?ee(P,7,-1):q(P,te,"$1");return w===""?void 0:w}}),l({global:!0,forced:!0},{Symbol:Y})}},function(u,c,i){var l=i(150);l("iterator")},function(u,c,i){i.d(c,"a",function(){return l.a}),i.d(c,"c",function(){return l.e}),i.d(c,"h",function(){return ee}),i.d(c,"i",function(){return V}),i.d(c,"j",function(){return F}),i.d(c,"b",function(){return be}),i.d(c,"e",function(){return Ye}),i.d(c,"f",function(){return Oe}),i.d(c,"g",function(){return Ke});var l=i(1),s,y,b,x=0,S=[],T=l.i.__b,N=l.i.__r,A=l.i.diffed,R=l.i.__c,I=l.i.unmount;function _(U,Q){l.i.__h&&l.i.__h(y,U,x||Q),x=0;var re=y.__H||(y.__H={__:[],__h:[]});return U>=re.__.length&&re.__.push({}),re.__[U]}function F(U){return x=1,Y(Pe,U)}function Y(U,Q,re){var ne=_(s++,2);return ne.t=U,ne.__c||(ne.__=[re?re(Q):Pe(void 0,Q),function(Me){var je=ne.t(ne.__[0],Me);ne.__[0]!==je&&(ne.__=[je,ne.__[1]],ne.__c.setState({}))}],ne.__c=y),ne.__}function V(U,Q){var re=_(s++,3);!l.i.__s&&se(re.__H,Q)&&(re.__=U,re.__H=Q,y.__H.__h.push(re))}function ce(U,Q){var re=_(s++,4);!l.i.__s&&se(re.__H,Q)&&(re.__=U,re.__H=Q,y.__h.push(re))}function ue(U){return x=5,q(function(){return{current:U}},[])}function te(U,Q,re){x=6,ce(function(){typeof U=="function"?U(Q()):U&&(U.current=Q())},re==null?re:re.concat(U))}function q(U,Q){var re=_(s++,7);return se(re.__H,Q)&&(re.__=U(),re.__H=Q,re.__h=U),re.__}function ee(U,Q){return x=8,q(function(){return U},Q)}function B(U){var Q=y.context[U.__c],re=_(s++,9);return re.c=U,Q?(re.__==null&&(re.__=!0,Q.sub(y)),Q.props.value):U.__}function X(U,Q){l.i.useDebugValue&&l.i.useDebugValue(Q?Q(U):U)}function P(){var U;for(S.sort(function(Q,re){return Q.__v.__b-re.__v.__b});U=S.pop();)if(U.__P)try{U.__H.__h.forEach(k),U.__H.__h.forEach(K),U.__H.__h=[]}catch(Q){U.__H.__h=[],l.i.__e(Q,U.__v)}}l.i.__b=function(U){y=null,T&&T(U)},l.i.__r=function(U){N&&N(U),s=0;var Q=(y=U.__c).__H;Q&&(Q.__h.forEach(k),Q.__h.forEach(K),Q.__h=[])},l.i.diffed=function(U){A&&A(U);var Q=U.__c;Q&&Q.__H&&Q.__H.__h.length&&(S.push(Q)!==1&&b===l.i.requestAnimationFrame||((b=l.i.requestAnimationFrame)||D)(P)),y=null},l.i.__c=function(U,Q){Q.some(function(re){try{re.__h.forEach(k),re.__h=re.__h.filter(function(ne){return!ne.__||K(ne)})}catch(ne){Q.some(function(Me){Me.__h&&(Me.__h=[])}),Q=[],l.i.__e(ne,re.__v)}}),R&&R(U,Q)},l.i.unmount=function(U){I&&I(U);var Q,re=U.__c;re&&re.__H&&(re.__H.__.forEach(function(ne){try{k(ne)}catch(Me){Q=Me}}),Q&&l.i.__e(Q,re.__v))};var w=typeof requestAnimationFrame=="function";function D(U){var Q,re=function(){clearTimeout(ne),w&&cancelAnimationFrame(Q),setTimeout(U)},ne=setTimeout(re,100);w&&(Q=requestAnimationFrame(re))}function k(U){var Q=y,re=U.__c;typeof re=="function"&&(U.__c=void 0,re()),y=Q}function K(U){var Q=y;U.__c=U.__(),y=Q}function se(U,Q){return!U||U.length!==Q.length||Q.some(function(re,ne){return re!==U[ne]})}function Pe(U,Q){return typeof Q=="function"?Q(U):Q}function ve(U,Q){for(var re in Q)U[re]=Q[re];return U}function me(U,Q){for(var re in U)if(re!=="__source"&&!(re in Q))return!0;for(var ne in Q)if(ne!=="__source"&&U[ne]!==Q[ne])return!0;return!1}function be(U){this.props=U}function Oe(U,Q){function re(Me){var je=this.props.ref,Xe=je==Me.ref;return!Xe&&je&&(je.call?je(null):je.current=null),Q?!Q(this.props,Me)||!Xe:me(this.props,Me)}function ne(Me){return this.shouldComponentUpdate=re,Object(l.e)(U,Me)}return ne.displayName="Memo("+(U.displayName||U.name)+")",ne.prototype.isReactComponent=!0,ne.__f=!0,ne}(be.prototype=new l.a).isPureReactComponent=!0,be.prototype.shouldComponentUpdate=function(U,Q){return me(this.props,U)||me(this.state,Q)};var we=l.i.__b;l.i.__b=function(U){U.type&&U.type.__f&&U.ref&&(U.props.ref=U.ref,U.ref=null),we&&we(U)};var ze=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Ye(U){function Q(re,ne){var Me=ve({},re);return delete Me.ref,U(Me,!(ne=re.ref||ne)||typeof ne=="object"&&!("current"in ne)?null:ne)}return Q.$$typeof=ze,Q.render=Q,Q.prototype.isReactComponent=Q.__f=!0,Q.displayName="ForwardRef("+(U.displayName||U.name)+")",Q}var Le=function(U,Q){return U==null?null:Object(l.k)(Object(l.k)(U).map(Q))},Se={map:Le,forEach:Le,count:function(U){return U?Object(l.k)(U).length:0},only:function(U){var Q=Object(l.k)(U);if(Q.length!==1)throw"Children.only";return Q[0]},toArray:l.k},Fe=l.i.__e;l.i.__e=function(U,Q,re){if(U.then){for(var ne,Me=Q;Me=Me.__;)if((ne=Me.__c)&&ne.__c)return Q.__e==null&&(Q.__e=re.__e,Q.__k=re.__k),ne.__c(U,Q)}Fe(U,Q,re)};var He=l.i.unmount;function G(U,Q,re){return U&&(U.__c&&U.__c.__H&&(U.__c.__H.__.forEach(function(ne){typeof ne.__c=="function"&&ne.__c()}),U.__c.__H=null),(U=ve({},U)).__c!=null&&(U.__c.__P===re&&(U.__c.__P=Q),U.__c=null),U.__k=U.__k&&U.__k.map(function(ne){return G(ne,Q,re)})),U}function L(U,Q,re){return U&&(U.__v=null,U.__k=U.__k&&U.__k.map(function(ne){return L(ne,Q,re)}),U.__c&&U.__c.__P===Q&&(U.__e&&re.insertBefore(U.__e,U.__d),U.__c.__e=!0,U.__c.__P=re)),U}function W(){this.__u=0,this.t=null,this.__b=null}function fe(U){var Q=U.__.__c;return Q&&Q.__e&&Q.__e(U)}function ge(U){var Q,re,ne;function Me(je){if(Q||(Q=U()).then(function(Xe){re=Xe.default||Xe},function(Xe){ne=Xe}),ne)throw ne;if(!re)throw Q;return Object(l.e)(re,je)}return Me.displayName="Lazy",Me.__f=!0,Me}function de(){this.u=null,this.o=null}l.i.unmount=function(U){var Q=U.__c;Q&&Q.__R&&Q.__R(),Q&&U.__h===!0&&(U.type=null),He&&He(U)},(W.prototype=new l.a).__c=function(U,Q){var re=Q.__c,ne=this;ne.t==null&&(ne.t=[]),ne.t.push(re);var Me=fe(ne.__v),je=!1,Xe=function(){je||(je=!0,re.__R=null,Me?Me(yt):yt())};re.__R=Xe;var yt=function(){if(!--ne.__u){if(ne.state.__e){var er=ne.state.__e;ne.__v.__k[0]=L(er,er.__c.__P,er.__c.__O)}var Yn;for(ne.setState({__e:ne.__b=null});Yn=ne.t.pop();)Yn.forceUpdate()}},qt=Q.__h===!0;ne.__u++||qt||ne.setState({__e:ne.__b=ne.__v.__k[0]}),U.then(Xe,Xe)},W.prototype.componentWillUnmount=function(){this.t=[]},W.prototype.render=function(U,Q){if(this.__b){if(this.__v.__k){var re=document.createElement("div"),ne=this.__v.__k[0].__c;this.__v.__k[0]=G(this.__b,re,ne.__O=ne.__P)}this.__b=null}var Me=Q.__e&&Object(l.e)(l.b,null,U.fallback);return Me&&(Me.__h=null),[Object(l.e)(l.b,null,Q.__e?null:U.children),Me]};var Ie=function(U,Q,re){if(++re[1]===re[0]&&U.o.delete(Q),U.props.revealOrder&&(U.props.revealOrder[0]!=="t"||!U.o.size))for(re=U.u;re;){for(;re.length>3;)re.pop()();if(re[1]<re[0])break;U.u=re=re[2]}};function Ve(U){return this.getChildContext=function(){return U.context},U.children}function We(U){var Q=this,re=U.i;Q.componentWillUnmount=function(){Object(l.j)(null,Q.l),Q.l=null,Q.i=null},Q.i&&Q.i!==re&&Q.componentWillUnmount(),U.__v?(Q.l||(Q.i=re,Q.l={nodeType:1,parentNode:re,childNodes:[],appendChild:function(ne){this.childNodes.push(ne),Q.i.appendChild(ne)},insertBefore:function(ne,Me){this.childNodes.push(ne),Q.i.appendChild(ne)},removeChild:function(ne){this.childNodes.splice(this.childNodes.indexOf(ne)>>>1,1),Q.i.removeChild(ne)}}),Object(l.j)(Object(l.e)(Ve,{context:Q.context},U.__v),Q.l)):Q.l&&Q.componentWillUnmount()}function qe(U,Q){return Object(l.e)(We,{__v:U,i:Q})}(de.prototype=new l.a).__e=function(U){var Q=this,re=fe(Q.__v),ne=Q.o.get(U);return ne[0]++,function(Me){var je=function(){Q.props.revealOrder?(ne.push(Me),Ie(Q,U,ne)):Me()};re?re(je):je()}},de.prototype.render=function(U){this.u=null,this.o=new Map;var Q=Object(l.k)(U.children);U.revealOrder&&U.revealOrder[0]==="b"&&Q.reverse();for(var re=Q.length;re--;)this.o.set(Q[re],this.u=[1,0,this.u]);return U.children},de.prototype.componentDidUpdate=de.prototype.componentDidMount=function(){var U=this;this.o.forEach(function(Q,re){Ie(U,re,Q)})};var ye=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,lt=/^(?: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]/,Ze=typeof document!="undefined",Ge=function(U){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(U)};function et(U,Q,re){return Q.__k==null&&(Q.textContent=""),Object(l.j)(U,Q),typeof re=="function"&&re(),U?U.__c:null}function St(U,Q,re){return Object(l.h)(U,Q),typeof re=="function"&&re(),U?U.__c:null}l.a.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(U){Object.defineProperty(l.a.prototype,U,{configurable:!0,get:function(){return this["UNSAFE_"+U]},set:function(Q){Object.defineProperty(this,U,{configurable:!0,writable:!0,value:Q})}})});var st=l.i.event;function gt(){}function ae(){return this.cancelBubble}function jt(){return this.defaultPrevented}l.i.event=function(U){return st&&(U=st(U)),U.persist=gt,U.isPropagationStopped=ae,U.isDefaultPrevented=jt,U.nativeEvent=U};var Pt,bt={configurable:!0,get:function(){return this.class}},Kt=l.i.vnode;l.i.vnode=function(U){var Q=U.type,re=U.props,ne=re;if(typeof Q=="string"){var Me=Q.indexOf("-")===-1;for(var je in ne={},re){var Xe=re[je];Ze&&je==="children"&&Q==="noscript"||je==="value"&&"defaultValue"in re&&Xe==null||(je==="defaultValue"&&"value"in re&&re.value==null?je="value":je==="download"&&Xe===!0?Xe="":/ondoubleclick/i.test(je)?je="ondblclick":/^onchange(textarea|input)/i.test(je+Q)&&!Ge(re.type)?je="oninput":/^onfocus$/i.test(je)?je="onfocusin":/^onblur$/i.test(je)?je="onfocusout":/^on(Ani|Tra|Tou|BeforeInp)/.test(je)?je=je.toLowerCase():Me&<.test(je)?je=je.replace(/[A-Z0-9]/,"-$&").toLowerCase():Xe===null&&(Xe=void 0),ne[je]=Xe)}Q=="select"&&ne.multiple&&Array.isArray(ne.value)&&(ne.value=Object(l.k)(re.children).forEach(function(yt){yt.props.selected=ne.value.indexOf(yt.props.value)!=-1})),Q=="select"&&ne.defaultValue!=null&&(ne.value=Object(l.k)(re.children).forEach(function(yt){yt.props.selected=ne.multiple?ne.defaultValue.indexOf(yt.props.value)!=-1:ne.defaultValue==yt.props.value})),U.props=ne,re.class!=re.className&&(bt.enumerable="className"in re,re.className!=null&&(ne.class=re.className),Object.defineProperty(ne,"className",bt))}U.$$typeof=ye,Kt&&Kt(U)};var gr=l.i.__r;l.i.__r=function(U){gr&&gr(U),Pt=U.__c};var Qt={ReactCurrentDispatcher:{current:{readContext:function(U){return Pt.__n[U.__c].props.value}}}};function wr(U){return l.e.bind(null,U)}function nt(U){return!!U&&U.$$typeof===ye}function Tt(U){return nt(U)?l.c.apply(null,arguments):U}function ar(U){return!!U.__k&&(Object(l.j)(null,U),!0)}function Re(U){return U&&(U.base||U.nodeType===1&&U)||null}var Ke=function(U,Q){return U(Q)},at=function(U,Q){return U(Q)},tt=l.b,ct={useState:F,useReducer:Y,useEffect:V,useLayoutEffect:ce,useRef:ue,useImperativeHandle:te,useMemo:q,useCallback:ee,useContext:B,useDebugValue:X,version:"17.0.2",Children:Se,render:et,hydrate:St,unmountComponentAtNode:ar,createPortal:qe,createElement:l.e,createContext:l.d,createFactory:wr,cloneElement:Tt,createRef:l.f,Fragment:l.b,isValidElement:nt,findDOMNode:Re,Component:l.a,PureComponent:be,memo:Oe,forwardRef:Ye,flushSync:at,unstable_batchedUpdates:Ke,StrictMode:tt,Suspense:W,SuspenseList:de,lazy:ge,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Qt};c.d=ct},function(u,c,i){var l=i(7),s=i(147),y=i(148),b=i(179),x=i(57),S=function(N){if(N&&N.forEach!==b)try{x(N,"forEach",b)}catch{N.forEach=b}};for(var T in s)s[T]&&S(l[T]&&l[T].prototype);S(y)},function(u,c,i){var l=i(16),s=i(97);l({target:"Object",stat:!0},{setPrototypeOf:s})},function(u,c,i){var l=i(16),s=i(18),y=i(38),b=i(96),x=i(137),S=s(function(){b(1)});l({target:"Object",stat:!0,forced:S,sham:!x},{getPrototypeOf:function(N){return b(y(N))}})},function(u,c,i){var l=i(16),s=i(46),y=i(77),b=i(199),x=i(157),S=i(32),T=i(33),N=i(54),A=i(18),R=s("Reflect","construct"),I=Object.prototype,_=[].push,F=A(function(){function ce(){}return!(R(function(){},[],ce)instanceof ce)}),Y=!A(function(){R(function(){})}),V=F||Y;l({target:"Reflect",stat:!0,forced:V,sham:V},{construct:function(ue,te){x(ue),S(te);var q=arguments.length<3?ue:x(arguments[2]);if(Y&&!F)return R(ue,te,q);if(ue==q){switch(te.length){case 0:return new ue;case 1:return new ue(te[0]);case 2:return new ue(te[0],te[1]);case 3:return new ue(te[0],te[1],te[2]);case 4:return new ue(te[0],te[1],te[2],te[3])}var ee=[null];return y(_,ee,te),new(y(b,ue,ee))}var B=q.prototype,X=N(T(B)?B:I),P=y(ue,X,te);return T(P)?P:X}})},function(u,c){var i=Function.prototype,l=i.bind,s=i.call,y=l&&l.bind(s);u.exports=l?function(b){return b&&y(s,b)}:function(b){return b&&function(){return s.apply(b,arguments)}}},function(u,c,i){var l=i(7),s=i(51).f,y=i(57),b=i(44),x=i(108),S=i(134),T=i(95);u.exports=function(N,A){var R=N.target,I=N.global,_=N.stat,F,Y,V,ce,ue,te;if(I?Y=l:_?Y=l[R]||x(R,{}):Y=(l[R]||{}).prototype,Y)for(V in A){if(ue=A[V],N.noTargetGet?(te=s(Y,V),ce=te&&te.value):ce=Y[V],F=T(I?V:R+(_?".":"#")+V,N.forced),!F&&ce!==void 0){if(typeof ue==typeof ce)continue;S(ue,ce)}(N.sham||ce&&ce.sham)&&y(ue,"sham",!0),b(Y,V,ue,N)}}},function(u,c,i){var l=i(16),s=i(7),y=i(99),b=i(100),x=i(33),S=i(68),T=i(43),N=i(39),A=i(61),R=i(27),I=i(76),_=i(101),F=I("slice"),Y=R("species"),V=s.Array,ce=Math.max;l({target:"Array",proto:!0,forced:!F},{slice:function(te,q){var ee=N(this),B=T(ee),X=S(te,B),P=S(q===void 0?B:q,B),w,D,k;if(y(ee)&&(w=ee.constructor,b(w)&&(w===V||y(w.prototype))?w=void 0:x(w)&&(w=w[Y],w===null&&(w=void 0)),w===V||w===void 0))return _(ee,X,P);for(D=new(w===void 0?V:w)(ce(P-X,0)),k=0;X<P;X++,k++)X in ee&&A(D,k,ee[X]);return D.length=k,D}})},function(u,c){u.exports=function(i){try{return!!i()}catch{return!0}}},function(u,c,i){var l=i(16),s=i(102);l({target:"RegExp",proto:!0,forced:/./.exec!==s},{exec:s})},function(u,c,i){var l=i(16),s=i(38),y=i(67),b=i(18),x=b(function(){y(1)});l({target:"Object",stat:!0,forced:x},{keys:function(T){return y(s(T))}})},function(u,c,i){var l=i(16),s=i(18),y=i(39),b=i(51).f,x=i(36),S=s(function(){b(1)}),T=!x||S;l({target:"Object",stat:!0,forced:T,sham:!x},{getOwnPropertyDescriptor:function(A,R){return b(y(A),R)}})},function(u,c,i){var l=i(16),s=i(75).filter,y=i(76),b=y("filter");l({target:"Array",proto:!0,forced:!b},{filter:function(S){return s(this,S,arguments.length>1?arguments[1]:void 0)}})},function(u,c,i){var l=i(36),s=i(94).EXISTS,y=i(15),b=i(37).f,x=Function.prototype,S=y(x.toString),T=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,N=y(T.exec),A="name";l&&!s&&b(x,A,{configurable:!0,get:function(){try{return N(T,S(this))[1]}catch{return""}}})},function(u,c,i){var l=i(16),s=i(36),y=i(135),b=i(39),x=i(51),S=i(61);l({target:"Object",stat:!0,sham:!s},{getOwnPropertyDescriptors:function(N){for(var A=b(N),R=x.f,I=y(A),_={},F=0,Y,V;I.length>F;)V=R(A,Y=I[F++]),V!==void 0&&S(_,Y,V);return _}})},function(u,c,i){var l=i(16),s=i(182),y=i(118),b=!y(function(x){Array.from(x)});l({target:"Array",stat:!0,forced:b},{from:s})},,function(u,c,i){var l=i(7),s=i(84),y=i(34),b=i(85),x=i(109),S=i(128),T=s("wks"),N=l.Symbol,A=N&&N.for,R=S?N:N&&N.withoutSetter||b;u.exports=function(I){if(!y(T,I)||!(x||typeof T[I]=="string")){var _="Symbol."+I;x&&y(N,I)?T[I]=N[I]:S&&A?T[I]=A(_):T[I]=R(_)}return T[I]}},function(u,c){u.exports=function(i){return typeof i=="function"}},function(u,c,i){var l=i(16),s=i(7),y=i(18),b=i(99),x=i(33),S=i(38),T=i(43),N=i(61),A=i(119),R=i(76),I=i(27),_=i(66),F=I("isConcatSpreadable"),Y=9007199254740991,V="Maximum allowed index exceeded",ce=s.TypeError,ue=_>=51||!y(function(){var B=[];return B[F]=!1,B.concat()[0]!==B}),te=R("concat"),q=function(B){if(!x(B))return!1;var X=B[F];return X!==void 0?!!X:b(B)},ee=!ue||!te;l({target:"Array",proto:!0,forced:ee},{concat:function(X){var P=S(this),w=A(P,0),D=0,k,K,se,Pe,ve;for(k=-1,se=arguments.length;k<se;k++)if(ve=k===-1?P:arguments[k],q(ve)){if(Pe=T(ve),D+Pe>Y)throw ce(V);for(K=0;K<Pe;K++,D++)K in ve&&N(w,D,ve[K])}else{if(D>=Y)throw ce(V);N(w,D++,ve)}return w.length=D,w}})},function(u,c,i){var l=i(16),s=i(198);l({target:"Object",stat:!0,forced:Object.assign!==s},{assign:s})},function(u,c,i){var l=i(105),s=typeof self=="object"&&self&&self.Object===Object&&self,y=l.a||s||Function("return this")();c.a=y},function(u,c,i){var l=i(7),s=i(33),y=l.String,b=l.TypeError;u.exports=function(x){if(s(x))return x;throw b(y(x)+" is not an object")}},function(u,c,i){var l=i(28);u.exports=function(s){return typeof s=="object"?s!==null:l(s)}},function(u,c,i){var l=i(15),s=i(38),y=l({}.hasOwnProperty);u.exports=Object.hasOwn||function(x,S){return y(s(x),S)}},function(u,c){var i=Function.prototype.call;u.exports=i.bind?i.bind(i):function(){return i.apply(i,arguments)}},function(u,c,i){var l=i(18);u.exports=!l(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},function(u,c,i){var l=i(7),s=i(36),y=i(129),b=i(32),x=i(87),S=l.TypeError,T=Object.defineProperty;c.f=s?T:function(A,R,I){if(b(A),R=x(R),b(I),y)try{return T(A,R,I)}catch{}if("get"in I||"set"in I)throw S("Accessors not supported");return"value"in I&&(A[R]=I.value),A}},function(u,c,i){var l=i(7),s=i(45),y=l.Object;u.exports=function(b){return y(s(b))}},function(u,c,i){var l=i(81),s=i(45);u.exports=function(y){return l(s(y))}},function(u,c,i){var l=i(7),s=i(98),y=l.String;u.exports=function(b){if(s(b)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return y(b)}},function(u,c,i){var l=i(16),s=i(75).map,y=i(76),b=y("map");l({target:"Array",proto:!0,forced:!b},{map:function(S){return s(this,S,arguments.length>1?arguments[1]:void 0)}})},function(u,c,i){(function(l){i.d(c,"d",function(){return b}),i.d(c,"c",function(){return x}),i.d(c,"b",function(){return S}),i.d(c,"a",function(){return N});var s=i(10),y=function(A,R){var I=typeof Symbol=="function"&&A[Symbol.iterator];if(!I)return A;var _=I.call(A),F,Y=[],V;try{for(;(R===void 0||R-- >0)&&!(F=_.next()).done;)Y.push(F.value)}catch(ce){V={error:ce}}finally{try{F&&!F.done&&(I=_.return)&&I.call(_)}finally{if(V)throw V.error}}return Y};function b(){var A=y(Object(s.j)(0),2),R=A[1],I=Object(s.h)(function(){R(function(_){return _+1})},[]);return I}function x(A){if(!A||typeof A!="object")return!1;var R=Object.getPrototypeOf(A);return!R||R===Object.prototype}function S(A){return typeof Symbol=="function"?Symbol.for(A):"__$mobx-react "+A+"__"}var T={};function N(){return typeof window!="undefined"?window:typeof l!="undefined"?l:typeof self!="undefined"?self:T}}).call(this,i(82))},function(u,c,i){var l=i(90);u.exports=function(s){return l(s.length)}},function(u,c,i){var l=i(7),s=i(28),y=i(34),b=i(57),x=i(108),S=i(92),T=i(56),N=i(94).CONFIGURABLE,A=T.get,R=T.enforce,I=String(String).split("String");(u.exports=function(_,F,Y,V){var ce=V?!!V.unsafe:!1,ue=V?!!V.enumerable:!1,te=V?!!V.noTargetGet:!1,q=V&&V.name!==void 0?V.name:F,ee;if(s(Y)&&(String(q).slice(0,7)==="Symbol("&&(q="["+String(q).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!y(Y,"name")||N&&Y.name!==q)&&b(Y,"name",q),ee=R(Y),ee.source||(ee.source=I.join(typeof q=="string"?q:""))),_===l){ue?_[F]=Y:x(F,Y);return}else ce?!te&&_[F]&&(ue=!0):delete _[F];ue?_[F]=Y:b(_,F,Y)})(Function.prototype,"toString",function(){return s(this)&&A(this).source||S(this)})},function(u,c,i){var l=i(7),s=l.TypeError;u.exports=function(y){if(y==null)throw s("Can't call method on "+y);return y}},function(u,c,i){var l=i(7),s=i(28),y=function(b){return s(b)?b:void 0};u.exports=function(b,x){return arguments.length<2?y(l[b]):l[b]&&l[b][x]}},function(u,c,i){var l=i(16),s=i(35),y=i(33),b=i(32),x=i(200),S=i(51),T=i(96);function N(A,R){var I=arguments.length<3?A:arguments[2],_,F;if(b(A)===I)return A[R];if(_=S.f(A,R),_)return x(_)?_.value:_.get===void 0?void 0:s(_.get,I);if(y(F=T(A)))return N(F,R,I)}l({target:"Reflect",stat:!0},{get:N})},function(u,c,i){(function(l){var s=i(31),y=i(165),b=v&&!v.nodeType&&v,x=b&&typeof l=="object"&&l&&!l.nodeType&&l,S=x&&x.exports===b,T=S?s.a.Buffer:void 0,N=T?T.isBuffer:void 0,A=N||y.a;c.a=A}).call(this,i(121)(u))},function(u,c,i){(function(l){var s=i(105),y=v&&!v.nodeType&&v,b=y&&typeof l=="object"&&l&&!l.nodeType&&l,x=b&&b.exports===y,S=x&&s.a.process,T=function(){try{var N=b&&b.require&&b.require("util").types;return N||S&&S.binding&&S.binding("util")}catch{}}();c.a=T}).call(this,i(121)(u))},function(u,c,i){var l=i(15),s=l({}.toString),y=l("".slice);u.exports=function(b){return y(s(b),8,-1)}},function(u,c,i){var l=i(36),s=i(35),y=i(93),b=i(72),x=i(39),S=i(87),T=i(34),N=i(129),A=Object.getOwnPropertyDescriptor;c.f=l?A:function(I,_){if(I=x(I),_=S(_),N)try{return A(I,_)}catch{}if(T(I,_))return b(!s(y.f,I,_),I[_])}},function(u,c,i){var l=i(16),s=i(213).entries;l({target:"Object",stat:!0},{entries:function(b){return s(b)}})},function(u,c,i){var l=i(46);u.exports=l("navigator","userAgent")||""},function(u,c,i){var l=i(32),s=i(168),y=i(110),b=i(70),x=i(133),S=i(86),T=i(91),N=">",A="<",R="prototype",I="script",_=T("IE_PROTO"),F=function(){},Y=function(q){return A+I+N+q+A+"/"+I+N},V=function(q){q.write(Y("")),q.close();var ee=q.parentWindow.Object;return q=null,ee},ce=function(){var q=S("iframe"),ee="java"+I+":",B;return q.style.display="none",x.appendChild(q),q.src=String(ee),B=q.contentWindow.document,B.open(),B.write(Y("document.F=Object")),B.close(),B.F},ue,te=function(){try{ue=new ActiveXObject("htmlfile")}catch{}te=typeof document!="undefined"?document.domain&&ue?V(ue):ce():V(ue);for(var q=y.length;q--;)delete te[R][y[q]];return te()};b[_]=!0,u.exports=Object.create||function(ee,B){var X;return ee!==null?(F[R]=l(ee),X=new F,F[R]=null,X[_]=ee):X=te(),B===void 0?X:s(X,B)}},function(u,c,i){var l=i(7),s=i(28),y=i(89),b=l.TypeError;u.exports=function(x){if(s(x))return x;throw b(y(x)+" is not a function")}},function(u,c,i){var l=i(170),s=i(7),y=i(15),b=i(33),x=i(57),S=i(34),T=i(107),N=i(91),A=i(70),R="Object already initialized",I=s.TypeError,_=s.WeakMap,F,Y,V,ce=function(P){return V(P)?Y(P):F(P,{})},ue=function(P){return function(w){var D;if(!b(w)||(D=Y(w)).type!==P)throw I("Incompatible receiver, "+P+" required");return D}};if(l||T.state){var te=T.state||(T.state=new _),q=y(te.get),ee=y(te.has),B=y(te.set);F=function(P,w){if(ee(te,P))throw new I(R);return w.facade=P,B(te,P,w),w},Y=function(P){return q(te,P)||{}},V=function(P){return ee(te,P)}}else{var X=N("state");A[X]=!0,F=function(P,w){if(S(P,X))throw new I(R);return w.facade=P,x(P,X,w),w},Y=function(P){return S(P,X)?P[X]:{}},V=function(P){return S(P,X)}}u.exports={set:F,get:Y,has:V,enforce:ce,getterFor:ue}},function(u,c,i){var l=i(36),s=i(37),y=i(72);u.exports=l?function(b,x,S){return s.f(b,x,y(1,S))}:function(b,x,S){return b[x]=S,b}},function(u,c,i){var l=i(15);u.exports=l({}.isPrototypeOf)},function(u,c,i){var l=i(55);u.exports=function(s,y){var b=s[y];return b==null?void 0:l(b)}},function(u,c,i){var l=i(173),s=i(177);l("Map",function(y){return function(){return y(this,arguments.length?arguments[0]:void 0)}},s)},function(u,c,i){var l=i(87),s=i(37),y=i(72);u.exports=function(b,x,S){var T=l(x);T in b?s.f(b,T,y(0,S)):b[T]=S}},function(u,c,i){var l=i(15),s=i(55),y=l(l.bind);u.exports=function(b,x){return s(b),x===void 0?b:y?y(b,x):function(){return b.apply(x,arguments)}}},function(u,c,i){var l=i(16),s=i(15),y=i(81),b=i(39),x=i(120),S=s([].join),T=y!=Object,N=x("join",",");l({target:"Array",proto:!0,forced:T||!N},{join:function(R){return S(b(this),R===void 0?",":R)}})},function(u,c,i){var l=i(16),s=i(214),y=i(83);l({target:"Array",proto:!0},{fill:s}),y("fill")},function(u,c){u.exports=!1},function(u,c,i){var l=i(7),s=i(53),y=l.process,b=l.Deno,x=y&&y.versions||b&&b.version,S=x&&x.v8,T,N;S&&(T=S.split("."),N=T[0]>0&&T[0]<4?1:+(T[0]+T[1])),!N&&s&&(T=s.match(/Edge\/(\d+)/),(!T||T[1]>=74)&&(T=s.match(/Chrome\/(\d+)/),T&&(N=+T[1]))),u.exports=N},function(u,c,i){var l=i(131),s=i(110);u.exports=Object.keys||function(b){return l(b,s)}},function(u,c,i){var l=i(69),s=Math.max,y=Math.min;u.exports=function(b,x){var S=l(b);return S<0?s(S+x,0):y(S,x)}},function(u,c){var i=Math.ceil,l=Math.floor;u.exports=function(s){var y=+s;return y!==y||y===0?0:(y>0?l:i)(y)}},function(u,c){u.exports={}},function(u,c){u.exports={}},function(u,c){u.exports=function(i,l){return{enumerable:!(i&1),configurable:!(i&2),writable:!(i&4),value:l}}},function(u,c,i){var l=i(131),s=i(110),y=s.concat("length","prototype");c.f=Object.getOwnPropertyNames||function(x){return l(x,y)}},function(u,c,i){var l=i(37).f,s=i(34),y=i(27),b=y("toStringTag");u.exports=function(x,S,T){x&&!s(x=T?x:x.prototype,b)&&l(x,b,{configurable:!0,value:S})}},function(u,c,i){var l=i(62),s=i(15),y=i(81),b=i(38),x=i(43),S=i(119),T=s([].push),N=function(A){var R=A==1,I=A==2,_=A==3,F=A==4,Y=A==6,V=A==7,ce=A==5||Y;return function(ue,te,q,ee){for(var B=b(ue),X=y(B),P=l(te,q),w=x(X),D=0,k=ee||S,K=R?k(ue,w):I||V?k(ue,0):void 0,se,Pe;w>D;D++)if((ce||D in X)&&(se=X[D],Pe=P(se,D,B),A))if(R)K[D]=Pe;else if(Pe)switch(A){case 3:return!0;case 5:return se;case 6:return D;case 2:T(K,se)}else switch(A){case 4:return!1;case 7:T(K,se)}return Y?-1:_||F?F:K}};u.exports={forEach:N(0),map:N(1),filter:N(2),some:N(3),every:N(4),find:N(5),findIndex:N(6),filterReject:N(7)}},function(u,c,i){var l=i(18),s=i(27),y=i(66),b=s("species");u.exports=function(x){return y>=51||!l(function(){var S=[],T=S.constructor={};return T[b]=function(){return{foo:1}},S[x](Boolean).foo!==1})}},function(u,c){var i=Function.prototype,l=i.apply,s=i.bind,y=i.call;u.exports=typeof Reflect=="object"&&Reflect.apply||(s?y.bind(l):function(){return y.apply(l,arguments)})},function(u,c,i){var l=i(77),s=i(35),y=i(15),b=i(122),x=i(154),S=i(32),T=i(45),N=i(156),A=i(123),R=i(90),I=i(40),_=i(59),F=i(113),Y=i(124),V=i(102),ce=i(151),ue=i(18),te=ce.UNSUPPORTED_Y,q=4294967295,ee=Math.min,B=[].push,X=y(/./.exec),P=y(B),w=y("".slice),D=!ue(function(){var k=/(?:)/,K=k.exec;k.exec=function(){return K.apply(this,arguments)};var se="ab".split(k);return se.length!==2||se[0]!=="a"||se[1]!=="b"});b("split",function(k,K,se){var Pe;return"abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?Pe=function(ve,me){var be=I(T(this)),Oe=me===void 0?q:me>>>0;if(Oe===0)return[];if(ve===void 0)return[be];if(!x(ve))return s(K,be,ve,Oe);for(var we=[],ze=(ve.ignoreCase?"i":"")+(ve.multiline?"m":"")+(ve.unicode?"u":"")+(ve.sticky?"y":""),Ye=0,Le=new RegExp(ve.source,ze+"g"),Se,Fe,He;(Se=s(V,Le,be))&&(Fe=Le.lastIndex,!(Fe>Ye&&(P(we,w(be,Ye,Se.index)),Se.length>1&&Se.index<be.length&&l(B,we,F(Se,1)),He=Se[0].length,Ye=Fe,we.length>=Oe)));)Le.lastIndex===Se.index&&Le.lastIndex++;return Ye===be.length?(He||!X(Le,""))&&P(we,""):P(we,w(be,Ye)),we.length>Oe?F(we,0,Oe):we}:"0".split(void 0,0).length?Pe=function(ve,me){return ve===void 0&&me===0?[]:s(K,this,ve,me)}:Pe=K,[function(me,be){var Oe=T(this),we=me==null?void 0:_(me,k);return we?s(we,me,Oe,be):s(Pe,I(Oe),me,be)},function(ve,me){var be=S(this),Oe=I(ve),we=se(Pe,be,Oe,me,Pe!==K);if(we.done)return we.value;var ze=N(be,RegExp),Ye=be.unicode,Le=(be.ignoreCase?"i":"")+(be.multiline?"m":"")+(be.unicode?"u":"")+(te?"g":"y"),Se=new ze(te?"^(?:"+be.source+")":be,Le),Fe=me===void 0?q:me>>>0;if(Fe===0)return[];if(Oe.length===0)return Y(Se,Oe)===null?[Oe]:[];for(var He=0,G=0,L=[];G<Oe.length;){Se.lastIndex=te?0:G;var W=Y(Se,te?w(Oe,G):Oe),fe;if(W===null||(fe=ee(R(Se.lastIndex+(te?G:0)),Oe.length))===He)G=A(Oe,G,Ye);else{if(P(L,w(Oe,He,G)),L.length===Fe)return L;for(var ge=1;ge<=W.length-1;ge++)if(P(L,W[ge]),L.length===Fe)return L;G=He=fe}}return P(L,w(Oe,He)),L}]},!D,te)},function(u,c,i){var l=i(36),s=i(7),y=i(15),b=i(95),x=i(44),S=i(34),T=i(143),N=i(58),A=i(88),R=i(130),I=i(18),_=i(73).f,F=i(51).f,Y=i(37).f,V=i(196),ce=i(159).trim,ue="Number",te=s[ue],q=te.prototype,ee=s.TypeError,B=y("".slice),X=y("".charCodeAt),P=function(Pe){var ve=R(Pe,"number");return typeof ve=="bigint"?ve:w(ve)},w=function(Pe){var ve=R(Pe,"number"),me,be,Oe,we,ze,Ye,Le,Se;if(A(ve))throw ee("Cannot convert a Symbol value to a number");if(typeof ve=="string"&&ve.length>2){if(ve=ce(ve),me=X(ve,0),me===43||me===45){if(be=X(ve,2),be===88||be===120)return NaN}else if(me===48){switch(X(ve,1)){case 66:case 98:Oe=2,we=49;break;case 79:case 111:Oe=8,we=55;break;default:return+ve}for(ze=B(ve,2),Ye=ze.length,Le=0;Le<Ye;Le++)if(Se=X(ze,Le),Se<48||Se>we)return NaN;return parseInt(ze,Oe)}}return+ve};if(b(ue,!te(" 0o1")||!te("0b1")||te("+0x1"))){for(var D=function(ve){var me=arguments.length<1?0:te(P(ve)),be=this;return N(q,be)&&I(function(){V(be)})?T(Object(me),be,D):me},k=l?_(te):"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(","),K=0,se;k.length>K;K++)S(te,se=k[K])&&!S(D,se)&&Y(D,se,F(te,se));D.prototype=q,q.constructor=D,x(s,ue,D)}},function(u,c,i){var l=i(16);l({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(u,c,i){var l=i(7),s=i(15),y=i(18),b=i(50),x=l.Object,S=s("".split);u.exports=y(function(){return!x("z").propertyIsEnumerable(0)})?function(T){return b(T)=="String"?S(T,""):x(T)}:x},function(u,c){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch{typeof window=="object"&&(i=window)}u.exports=i},function(u,c,i){var l=i(27),s=i(54),y=i(37),b=l("unscopables"),x=Array.prototype;x[b]==null&&y.f(x,b,{configurable:!0,value:s(null)}),u.exports=function(S){x[b][S]=!0}},function(u,c,i){var l=i(65),s=i(107);(u.exports=function(y,b){return s[y]||(s[y]=b!==void 0?b:{})})("versions",[]).push({version:"3.19.3",mode:l?"pure":"global",copyright:"\xA9 2021 Denis Pushkarev (zloirock.ru)"})},function(u,c,i){var l=i(15),s=0,y=Math.random(),b=l(1 .toString);u.exports=function(x){return"Symbol("+(x===void 0?"":x)+")_"+b(++s+y,36)}},function(u,c,i){var l=i(7),s=i(33),y=l.document,b=s(y)&&s(y.createElement);u.exports=function(x){return b?y.createElement(x):{}}},function(u,c,i){var l=i(130),s=i(88);u.exports=function(y){var b=l(y,"string");return s(b)?b:b+""}},function(u,c,i){var l=i(7),s=i(46),y=i(28),b=i(58),x=i(128),S=l.Object;u.exports=x?function(T){return typeof T=="symbol"}:function(T){var N=s("Symbol");return y(N)&&b(N.prototype,S(T))}},function(u,c,i){var l=i(7),s=l.String;u.exports=function(y){try{return s(y)}catch{return"Object"}}},function(u,c,i){var l=i(69),s=Math.min;u.exports=function(y){return y>0?s(l(y),9007199254740991):0}},function(u,c,i){var l=i(84),s=i(85),y=l("keys");u.exports=function(b){return y[b]||(y[b]=s(b))}},function(u,c,i){var l=i(15),s=i(28),y=i(107),b=l(Function.toString);s(y.inspectSource)||(y.inspectSource=function(x){return b(x)}),u.exports=y.inspectSource},function(u,c,i){var l={}.propertyIsEnumerable,s=Object.getOwnPropertyDescriptor,y=s&&!l.call({1:2},1);c.f=y?function(x){var S=s(this,x);return!!S&&S.enumerable}:l},function(u,c,i){var l=i(36),s=i(34),y=Function.prototype,b=l&&Object.getOwnPropertyDescriptor,x=s(y,"name"),S=x&&function(){}.name==="something",T=x&&(!l||l&&b(y,"name").configurable);u.exports={EXISTS:x,PROPER:S,CONFIGURABLE:T}},function(u,c,i){var l=i(18),s=i(28),y=/#|\.prototype\./,b=function(A,R){var I=S[x(A)];return I==N?!0:I==T?!1:s(R)?l(R):!!R},x=b.normalize=function(A){return String(A).replace(y,".").toLowerCase()},S=b.data={},T=b.NATIVE="N",N=b.POLYFILL="P";u.exports=b},function(u,c,i){var l=i(7),s=i(34),y=i(28),b=i(38),x=i(91),S=i(137),T=x("IE_PROTO"),N=l.Object,A=N.prototype;u.exports=S?N.getPrototypeOf:function(R){var I=b(R);if(s(I,T))return I[T];var _=I.constructor;return y(_)&&I instanceof _?_.prototype:I instanceof N?A:null}},function(u,c,i){var l=i(15),s=i(32),y=i(172);u.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var b=!1,x={},S;try{S=l(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),S(x,[]),b=x instanceof Array}catch{}return function(N,A){return s(N),y(A),b?S(N,A):N.__proto__=A,N}}():void 0)},function(u,c,i){var l=i(7),s=i(116),y=i(28),b=i(50),x=i(27),S=x("toStringTag"),T=l.Object,N=b(function(){return arguments}())=="Arguments",A=function(R,I){try{return R[I]}catch{}};u.exports=s?b:function(R){var I,_,F;return R===void 0?"Undefined":R===null?"Null":typeof(_=A(I=T(R),S))=="string"?_:N?b(I):(F=b(I))=="Object"&&y(I.callee)?"Arguments":F}},function(u,c,i){var l=i(50);u.exports=Array.isArray||function(y){return l(y)=="Array"}},function(u,c,i){var l=i(15),s=i(18),y=i(28),b=i(98),x=i(46),S=i(92),T=function(){},N=[],A=x("Reflect","construct"),R=/^\s*(?:class|function)\b/,I=l(R.exec),_=!R.exec(T),F=function(V){if(!y(V))return!1;try{return A(T,N,V),!0}catch{return!1}},Y=function(V){if(!y(V))return!1;switch(b(V)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return _||!!I(R,S(V))};u.exports=!A||s(function(){var V;return F(F.call)||!F(Object)||!F(function(){V=!0})||V})?Y:F},function(u,c,i){var l=i(15);u.exports=l([].slice)},function(u,c,i){var l=i(35),s=i(15),y=i(40),b=i(184),x=i(151),S=i(84),T=i(54),N=i(56).get,A=i(185),R=i(186),I=S("native-string-replace",String.prototype.replace),_=RegExp.prototype.exec,F=_,Y=s("".charAt),V=s("".indexOf),ce=s("".replace),ue=s("".slice),te=function(){var X=/a/,P=/b*/g;return l(_,X,"a"),l(_,P,"a"),X.lastIndex!==0||P.lastIndex!==0}(),q=x.BROKEN_CARET,ee=/()??/.exec("")[1]!==void 0,B=te||ee||q||A||R;B&&(F=function(P){var w=this,D=N(w),k=y(P),K=D.raw,se,Pe,ve,me,be,Oe,we;if(K)return K.lastIndex=w.lastIndex,se=l(F,K,k),w.lastIndex=K.lastIndex,se;var ze=D.groups,Ye=q&&w.sticky,Le=l(b,w),Se=w.source,Fe=0,He=k;if(Ye&&(Le=ce(Le,"y",""),V(Le,"g")===-1&&(Le+="g"),He=ue(k,w.lastIndex),w.lastIndex>0&&(!w.multiline||w.multiline&&Y(k,w.lastIndex-1)!==`
- `)&&(Se="(?: "+Se+")",He=" "+He,Fe++),Pe=new RegExp("^(?:"+Se+")",Le)),ee&&(Pe=new RegExp("^"+Se+"$(?!\\s)",Le)),te&&(ve=w.lastIndex),me=l(_,Ye?Pe:w,He),Ye?me?(me.input=ue(me.input,Fe),me[0]=ue(me[0],Fe),me.index=w.lastIndex,w.lastIndex+=me[0].length):w.lastIndex=0:te&&me&&(w.lastIndex=w.global?me.index+me[0].length:ve),ee&&me&&me.length>1&&l(I,me[0],Pe,function(){for(be=1;be<arguments.length-2;be++)arguments[be]===void 0&&(me[be]=void 0)}),me&&ze)for(me.groups=Oe=T(null),be=0;be<ze.length;be++)we=ze[be],Oe[we[0]]=me[we[1]];return me}),u.exports=F},function(u,c,i){var l=i(16),s=i(7),y=i(68),b=i(69),x=i(43),S=i(38),T=i(119),N=i(61),A=i(76),R=A("splice"),I=s.TypeError,_=Math.max,F=Math.min,Y=9007199254740991,V="Maximum allowed length exceeded";l({target:"Array",proto:!0,forced:!R},{splice:function(ue,te){var q=S(this),ee=x(q),B=y(ue,ee),X=arguments.length,P,w,D,k,K,se;if(X===0?P=w=0:X===1?(P=0,w=ee-B):(P=X-2,w=F(_(b(te),0),ee-B)),ee+P-w>Y)throw I(V);for(D=T(q,w),k=0;k<w;k++)K=B+k,K in q&&N(D,k,q[K]);if(D.length=w,P<w){for(k=B;k<ee-w;k++)K=k+w,se=k+P,K in q?q[se]=q[K]:delete q[se];for(k=ee;k>ee-w+P;k--)delete q[k-1]}else if(P>w)for(k=ee-w;k>B;k--)K=k+w-1,se=k+P-1,K in q?q[se]=q[K]:delete q[se];for(k=0;k<P;k++)q[k+B]=arguments[k+2];return q.length=ee-w+P,D}})},function(u,c,i){var l=i(16),s=i(201),y=i(202);l({target:"String",proto:!0,forced:y("anchor")},{anchor:function(x){return s(this,"a","name",x)}})},function(u,c,i){(function(l){var s=typeof l=="object"&&l&&l.Object===Object&&l;c.a=s}).call(this,i(82))},function(u,c,i){(function(l){var s=i(31),y=v&&!v.nodeType&&v,b=y&&typeof l=="object"&&l&&!l.nodeType&&l,x=b&&b.exports===y,S=x?s.a.Buffer:void 0,T=S?S.allocUnsafe:void 0;function N(A,R){if(R)return A.slice();var I=A.length,_=T?T(I):new A.constructor(I);return A.copy(_),_}c.a=N}).call(this,i(121)(u))},function(u,c,i){var l=i(7),s=i(108),y="__core-js_shared__",b=l[y]||s(y,{});u.exports=b},function(u,c,i){var l=i(7),s=Object.defineProperty;u.exports=function(y,b){try{s(l,y,{value:b,configurable:!0,writable:!0})}catch{l[y]=b}return b}},function(u,c,i){var l=i(66),s=i(18);u.exports=!!Object.getOwnPropertySymbols&&!s(function(){var y=Symbol();return!String(y)||!(Object(y)instanceof Symbol)||!Symbol.sham&&l&&l<41})},function(u,c){u.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(u,c,i){var l=i(16),s=i(35),y=i(65),b=i(94),x=i(28),S=i(171),T=i(96),N=i(97),A=i(74),R=i(57),I=i(44),_=i(27),F=i(71),Y=i(136),V=b.PROPER,ce=b.CONFIGURABLE,ue=Y.IteratorPrototype,te=Y.BUGGY_SAFARI_ITERATORS,q=_("iterator"),ee="keys",B="values",X="entries",P=function(){return this};u.exports=function(w,D,k,K,se,Pe,ve){S(k,D,K);var me=function(G){if(G===se&&Ye)return Ye;if(!te&&G in we)return we[G];switch(G){case ee:return function(){return new k(this,G)};case B:return function(){return new k(this,G)};case X:return function(){return new k(this,G)}}return function(){return new k(this)}},be=D+" Iterator",Oe=!1,we=w.prototype,ze=we[q]||we["@@iterator"]||se&&we[se],Ye=!te&&ze||me(se),Le=D=="Array"&&we.entries||ze,Se,Fe,He;if(Le&&(Se=T(Le.call(new w)),Se!==Object.prototype&&Se.next&&(!y&&T(Se)!==ue&&(N?N(Se,ue):x(Se[q])||I(Se,q,P)),A(Se,be,!0,!0),y&&(F[be]=P))),V&&se==B&&ze&&ze.name!==B&&(!y&&ce?R(we,"name",B):(Oe=!0,Ye=function(){return s(ze,this)})),se)if(Fe={values:me(B),keys:Pe?Ye:me(ee),entries:me(X)},ve)for(He in Fe)(te||Oe||!(He in we))&&I(we,He,Fe[He]);else l({target:D,proto:!0,forced:te||Oe},Fe);return(!y||ve)&&we[q]!==Ye&&I(we,q,Ye,{name:se}),F[D]=Ye,Fe}},function(u,c){c.f=Object.getOwnPropertySymbols},function(u,c,i){var l=i(7),s=i(68),y=i(43),b=i(61),x=l.Array,S=Math.max;u.exports=function(T,N,A){for(var R=y(T),I=s(N,R),_=s(A===void 0?R:A,R),F=x(S(_-I,0)),Y=0;I<_;I++,Y++)b(F,Y,T[I]);return F.length=Y,F}},function(u,c,i){var l=i(7),s=i(62),y=i(35),b=i(32),x=i(89),S=i(140),T=i(43),N=i(58),A=i(141),R=i(115),I=i(142),_=l.TypeError,F=function(V,ce){this.stopped=V,this.result=ce},Y=F.prototype;u.exports=function(V,ce,ue){var te=ue&&ue.that,q=!!(ue&&ue.AS_ENTRIES),ee=!!(ue&&ue.IS_ITERATOR),B=!!(ue&&ue.INTERRUPTED),X=s(ce,te),P,w,D,k,K,se,Pe,ve=function(be){return P&&I(P,"normal",be),new F(!0,be)},me=function(be){return q?(b(be),B?X(be[0],be[1],ve):X(be[0],be[1])):B?X(be,ve):X(be)};if(ee)P=V;else{if(w=R(V),!w)throw _(x(V)+" is not iterable");if(S(w)){for(D=0,k=T(V);k>D;D++)if(K=me(V[D]),K&&N(Y,K))return K;return new F(!1)}P=A(V,w)}for(se=P.next;!(Pe=y(se,P)).done;){try{K=me(Pe.value)}catch(be){I(P,"throw",be)}if(typeof K=="object"&&K&&N(Y,K))return K}return new F(!1)}},function(u,c,i){var l=i(98),s=i(59),y=i(71),b=i(27),x=b("iterator");u.exports=function(S){if(S!=null)return s(S,x)||s(S,"@@iterator")||y[l(S)]}},function(u,c,i){var l=i(27),s=l("toStringTag"),y={};y[s]="z",u.exports=String(y)==="[object z]"},function(u,c,i){var l=i(7),s=i(58),y=l.TypeError;u.exports=function(b,x){if(s(x,b))return b;throw y("Incorrect invocation")}},function(u,c,i){var l=i(27),s=l("iterator"),y=!1;try{var b=0,x={next:function(){return{done:!!b++}},return:function(){y=!0}};x[s]=function(){return this},Array.from(x,function(){throw 2})}catch{}u.exports=function(S,T){if(!T&&!y)return!1;var N=!1;try{var A={};A[s]=function(){return{next:function(){return{done:N=!0}}}},S(A)}catch{}return N}},function(u,c,i){var l=i(180);u.exports=function(s,y){return new(l(s))(y===0?0:y)}},function(u,c,i){var l=i(18);u.exports=function(s,y){var b=[][s];return!!b&&l(function(){b.call(null,y||function(){throw 1},1)})}},function(u,c){u.exports=function(i){if(!i.webpackPolyfill){var l=Object.create(i);l.children||(l.children=[]),Object.defineProperty(l,"loaded",{enumerable:!0,get:function(){return l.l}}),Object.defineProperty(l,"id",{enumerable:!0,get:function(){return l.i}}),Object.defineProperty(l,"exports",{enumerable:!0}),l.webpackPolyfill=1}return l}},function(u,c,i){i(19);var l=i(15),s=i(44),y=i(102),b=i(18),x=i(27),S=i(57),T=x("species"),N=RegExp.prototype;u.exports=function(A,R,I,_){var F=x(A),Y=!b(function(){var te={};return te[F]=function(){return 7},""[A](te)!=7}),V=Y&&!b(function(){var te=!1,q=/a/;return A==="split"&&(q={},q.constructor={},q.constructor[T]=function(){return q},q.flags="",q[F]=/./[F]),q.exec=function(){return te=!0,null},q[F](""),!te});if(!Y||!V||I){var ce=l(/./[F]),ue=R(F,""[A],function(te,q,ee,B,X){var P=l(te),w=q.exec;return w===y||w===N.exec?Y&&!X?{done:!0,value:ce(q,ee,B)}:{done:!0,value:P(ee,q,B)}:{done:!1}});s(String.prototype,A,ue[0]),s(N,F,ue[1])}_&&S(N[F],"sham",!0)}},function(u,c,i){var l=i(146).charAt;u.exports=function(s,y,b){return y+(b?l(s,y).length:1)}},function(u,c,i){var l=i(7),s=i(35),y=i(32),b=i(28),x=i(50),S=i(102),T=l.TypeError;u.exports=function(N,A){var R=N.exec;if(b(R)){var I=s(R,N,A);return I!==null&&y(I),I}if(x(N)==="RegExp")return s(S,N,A);throw T("RegExp#exec called on incompatible receiver")}},function(u,c,i){var l=i(77),s=i(35),y=i(15),b=i(122),x=i(18),S=i(32),T=i(28),N=i(69),A=i(90),R=i(40),I=i(45),_=i(123),F=i(59),Y=i(197),V=i(124),ce=i(27),ue=ce("replace"),te=Math.max,q=Math.min,ee=y([].concat),B=y([].push),X=y("".indexOf),P=y("".slice),w=function(se){return se===void 0?se:String(se)},D=function(){return"a".replace(/./,"$0")==="$0"}(),k=function(){return/./[ue]?/./[ue]("a","$0")==="":!1}(),K=!x(function(){var se=/./;return se.exec=function(){var Pe=[];return Pe.groups={a:"7"},Pe},"".replace(se,"$<a>")!=="7"});b("replace",function(se,Pe,ve){var me=k?"$":"$0";return[function(Oe,we){var ze=I(this),Ye=Oe==null?void 0:F(Oe,ue);return Ye?s(Ye,Oe,ze,we):s(Pe,R(ze),Oe,we)},function(be,Oe){var we=S(this),ze=R(be);if(typeof Oe=="string"&&X(Oe,me)===-1&&X(Oe,"$<")===-1){var Ye=ve(Pe,we,ze,Oe);if(Ye.done)return Ye.value}var Le=T(Oe);Le||(Oe=R(Oe));var Se=we.global;if(Se){var Fe=we.unicode;we.lastIndex=0}for(var He=[];;){var G=V(we,ze);if(G===null||(B(He,G),!Se))break;var L=R(G[0]);L===""&&(we.lastIndex=_(ze,A(we.lastIndex),Fe))}for(var W="",fe=0,ge=0;ge<He.length;ge++){G=He[ge];for(var de=R(G[0]),Ie=te(q(N(G.index),ze.length),0),Ve=[],We=1;We<G.length;We++)B(Ve,w(G[We]));var qe=G.groups;if(Le){var ye=ee([de],Ve,Ie,ze);qe!==void 0&&B(ye,qe);var lt=R(l(Oe,void 0,ye))}else lt=Y(de,ze,Ie,Ve,qe,Oe);Ie>=fe&&(W+=P(ze,fe,Ie)+lt,fe=Ie+de.length)}return W+P(ze,fe)}]},!K||!D||k)},function(u,c,i){var l=i(50),s=i(7);u.exports=l(s.process)=="process"},function(u,c,i){var l=i(16);l({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(u,c,i){var l=i(109);u.exports=l&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},function(u,c,i){var l=i(36),s=i(18),y=i(86);u.exports=!l&&!s(function(){return Object.defineProperty(y("div"),"a",{get:function(){return 7}}).a!=7})},function(u,c,i){var l=i(7),s=i(35),y=i(33),b=i(88),x=i(59),S=i(169),T=i(27),N=l.TypeError,A=T("toPrimitive");u.exports=function(R,I){if(!y(R)||b(R))return R;var _=x(R,A),F;if(_){if(I===void 0&&(I="default"),F=s(_,R,I),!y(F)||b(F))return F;throw N("Can't convert object to primitive value")}return I===void 0&&(I="number"),S(R,I)}},function(u,c,i){var l=i(15),s=i(34),y=i(39),b=i(132).indexOf,x=i(70),S=l([].push);u.exports=function(T,N){var A=y(T),R=0,I=[],_;for(_ in A)!s(x,_)&&s(A,_)&&S(I,_);for(;N.length>R;)s(A,_=N[R++])&&(~b(I,_)||S(I,_));return I}},function(u,c,i){var l=i(39),s=i(68),y=i(43),b=function(x){return function(S,T,N){var A=l(S),R=y(A),I=s(N,R),_;if(x&&T!=T){for(;R>I;)if(_=A[I++],_!=_)return!0}else for(;R>I;I++)if((x||I in A)&&A[I]===T)return x||I||0;return!x&&-1}};u.exports={includes:b(!0),indexOf:b(!1)}},function(u,c,i){var l=i(46);u.exports=l("document","documentElement")},function(u,c,i){var l=i(34),s=i(135),y=i(51),b=i(37);u.exports=function(x,S){for(var T=s(S),N=b.f,A=y.f,R=0;R<T.length;R++){var I=T[R];l(x,I)||N(x,I,A(S,I))}}},function(u,c,i){var l=i(46),s=i(15),y=i(73),b=i(112),x=i(32),S=s([].concat);u.exports=l("Reflect","ownKeys")||function(N){var A=y.f(x(N)),R=b.f;return R?S(A,R(N)):A}},function(u,c,i){var l=i(18),s=i(28),y=i(54),b=i(96),x=i(44),S=i(27),T=i(65),N=S("iterator"),A=!1,R,I,_;[].keys&&(_=[].keys(),"next"in _?(I=b(b(_)),I!==Object.prototype&&(R=I)):A=!0);var F=R==null||l(function(){var Y={};return R[N].call(Y)!==Y});F?R={}:T&&(R=y(R)),s(R[N])||x(R,N,function(){return this}),u.exports={IteratorPrototype:R,BUGGY_SAFARI_ITERATORS:A}},function(u,c,i){var l=i(18);u.exports=!l(function(){function s(){}return s.prototype.constructor=null,Object.getPrototypeOf(new s)!==s.prototype})},function(u,c,i){var l=i(16),s=i(15),y=i(70),b=i(33),x=i(34),S=i(37).f,T=i(73),N=i(139),A=i(174),R=i(85),I=i(176),_=!1,F=R("meta"),Y=0,V=function(B){S(B,F,{value:{objectID:"O"+Y++,weakData:{}}})},ce=function(B,X){if(!b(B))return typeof B=="symbol"?B:(typeof B=="string"?"S":"P")+B;if(!x(B,F)){if(!A(B))return"F";if(!X)return"E";V(B)}return B[F].objectID},ue=function(B,X){if(!x(B,F)){if(!A(B))return!0;if(!X)return!1;V(B)}return B[F].weakData},te=function(B){return I&&_&&A(B)&&!x(B,F)&&V(B),B},q=function(){ee.enable=function(){},_=!0;var B=T.f,X=s([].splice),P={};P[F]=1,B(P).length&&(T.f=function(w){for(var D=B(w),k=0,K=D.length;k<K;k++)if(D[k]===F){X(D,k,1);break}return D},l({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:N.f}))},ee=u.exports={enable:q,fastKey:ce,getWeakData:ue,onFreeze:te};y[F]=!0},function(u,c,i){var l=i(50),s=i(39),y=i(73).f,b=i(113),x=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],S=function(T){try{return y(T)}catch{return b(x)}};u.exports.f=function(N){return x&&l(N)=="Window"?S(N):y(s(N))}},function(u,c,i){var l=i(27),s=i(71),y=l("iterator"),b=Array.prototype;u.exports=function(x){return x!==void 0&&(s.Array===x||b[y]===x)}},function(u,c,i){var l=i(7),s=i(35),y=i(55),b=i(32),x=i(89),S=i(115),T=l.TypeError;u.exports=function(N,A){var R=arguments.length<2?S(N):A;if(y(R))return b(s(R,N));throw T(x(N)+" is not iterable")}},function(u,c,i){var l=i(35),s=i(32),y=i(59);u.exports=function(b,x,S){var T,N;s(b);try{if(T=y(b,"return"),!T){if(x==="throw")throw S;return S}T=l(T,b)}catch(A){N=!0,T=A}if(x==="throw")throw S;if(N)throw T;return s(T),S}},function(u,c,i){var l=i(28),s=i(33),y=i(97);u.exports=function(b,x,S){var T,N;return y&&l(T=x.constructor)&&T!==S&&s(N=T.prototype)&&N!==S.prototype&&y(b,N),b}},function(u,c,i){var l=i(44);u.exports=function(s,y,b){for(var x in y)l(s,x,y[x],b);return s}},function(u,c,i){var l=i(46),s=i(37),y=i(27),b=i(36),x=y("species");u.exports=function(S){var T=l(S),N=s.f;b&&T&&!T[x]&&N(T,x,{configurable:!0,get:function(){return this}})}},function(u,c,i){var l=i(15),s=i(69),y=i(40),b=i(45),x=l("".charAt),S=l("".charCodeAt),T=l("".slice),N=function(A){return function(R,I){var _=y(b(R)),F=s(I),Y=_.length,V,ce;return F<0||F>=Y?A?"":void 0:(V=S(_,F),V<55296||V>56319||F+1===Y||(ce=S(_,F+1))<56320||ce>57343?A?x(_,F):V:A?T(_,F,F+2):(V-55296<<10)+(ce-56320)+65536)}};u.exports={codeAt:N(!1),charAt:N(!0)}},function(u,c){u.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(u,c,i){var l=i(86),s=l("span").classList,y=s&&s.constructor&&s.constructor.prototype;u.exports=y===Object.prototype?void 0:y},function(u,c,i){var l=i(27);c.f=l},function(u,c,i){var l=i(181),s=i(34),y=i(149),b=i(37).f;u.exports=function(x){var S=l.Symbol||(l.Symbol={});s(S,x)||b(S,x,{value:y.f(x)})}},function(u,c,i){var l=i(18),s=i(7),y=s.RegExp,b=l(function(){var T=y("a","y");return T.lastIndex=2,T.exec("abcd")!=null}),x=b||l(function(){return!y("a","y").sticky}),S=b||l(function(){var T=y("^r","gy");return T.lastIndex=2,T.exec("str")!=null});u.exports={BROKEN_CARET:S,MISSED_STICKY:x,UNSUPPORTED_Y:b}},function(u,c,i){var l=i(16),s=i(132).includes,y=i(83);l({target:"Array",proto:!0},{includes:function(x){return s(this,x,arguments.length>1?arguments[1]:void 0)}}),y("includes")},function(u,c,i){var l=i(16),s=i(15),y=i(193),b=i(45),x=i(40),S=i(194),T=s("".indexOf);l({target:"String",proto:!0,forced:!S("includes")},{includes:function(A){return!!~T(x(b(this)),x(y(A)),arguments.length>1?arguments[1]:void 0)}})},function(u,c,i){var l=i(33),s=i(50),y=i(27),b=y("match");u.exports=function(x){var S;return l(x)&&((S=x[b])!==void 0?!!S:s(x)=="RegExp")}},function(u,c){var i=u.exports={},l,s;function y(){throw new Error("setTimeout has not been defined")}function b(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?l=setTimeout:l=y}catch{l=y}try{typeof clearTimeout=="function"?s=clearTimeout:s=b}catch{s=b}})();function x(V){if(l===setTimeout)return setTimeout(V,0);if((l===y||!l)&&setTimeout)return l=setTimeout,setTimeout(V,0);try{return l(V,0)}catch{try{return l.call(null,V,0)}catch{return l.call(this,V,0)}}}function S(V){if(s===clearTimeout)return clearTimeout(V);if((s===b||!s)&&clearTimeout)return s=clearTimeout,clearTimeout(V);try{return s(V)}catch{try{return s.call(null,V)}catch{return s.call(this,V)}}}var T=[],N=!1,A,R=-1;function I(){!N||!A||(N=!1,A.length?T=A.concat(T):R=-1,T.length&&_())}function _(){if(!N){var V=x(I);N=!0;for(var ce=T.length;ce;){for(A=T,T=[];++R<ce;)A&&A[R].run();R=-1,ce=T.length}A=null,N=!1,S(V)}}i.nextTick=function(V){var ce=new Array(arguments.length-1);if(arguments.length>1)for(var ue=1;ue<arguments.length;ue++)ce[ue-1]=arguments[ue];T.push(new F(V,ce)),T.length===1&&!N&&x(_)};function F(V,ce){this.fun=V,this.array=ce}F.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={};function Y(){}i.on=Y,i.addListener=Y,i.once=Y,i.off=Y,i.removeListener=Y,i.removeAllListeners=Y,i.emit=Y,i.prependListener=Y,i.prependOnceListener=Y,i.listeners=function(V){return[]},i.binding=function(V){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(V){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(u,c,i){var l=i(32),s=i(157),y=i(27),b=y("species");u.exports=function(x,S){var T=l(x).constructor,N;return T===void 0||(N=l(T)[b])==null?S:s(N)}},function(u,c,i){var l=i(7),s=i(100),y=i(89),b=l.TypeError;u.exports=function(x){if(s(x))return x;throw b(y(x)+" is not a constructor")}},function(u,c,i){var l=i(16),s=i(159).trim,y=i(195);l({target:"String",proto:!0,forced:y("trim")},{trim:function(){return s(this)}})},function(u,c,i){var l=i(15),s=i(45),y=i(40),b=i(160),x=l("".replace),S="["+b+"]",T=RegExp("^"+S+S+"*"),N=RegExp(S+S+"*$"),A=function(R){return function(I){var _=y(s(I));return R&1&&(_=x(_,T,"")),R&2&&(_=x(_,N,"")),_}};u.exports={start:A(1),end:A(2),trim:A(3)}},function(u,c){u.exports=`
- \v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`},function(u,c,i){var l=i(35),s=i(122),y=i(32),b=i(90),x=i(40),S=i(45),T=i(59),N=i(123),A=i(124);s("match",function(R,I,_){return[function(Y){var V=S(this),ce=Y==null?void 0:T(Y,R);return ce?l(ce,Y,V):new RegExp(Y)[R](x(V))},function(F){var Y=y(this),V=x(F),ce=_(I,Y,V);if(ce.done)return ce.value;if(!Y.global)return A(Y,V);var ue=Y.unicode;Y.lastIndex=0;for(var te=[],q=0,ee;(ee=A(Y,V))!==null;){var B=x(ee[0]);te[q]=B,B===""&&(Y.lastIndex=N(V,b(Y.lastIndex),ue)),q++}return q===0?null:te}]})},function(u,c,i){var l=i(7),s=i(77),y=i(62),b=i(28),x=i(34),S=i(18),T=i(133),N=i(101),A=i(86),R=i(163),I=i(126),_=l.setImmediate,F=l.clearImmediate,Y=l.process,V=l.Dispatch,ce=l.Function,ue=l.MessageChannel,te=l.String,q=0,ee={},B="onreadystatechange",X,P,w,D;try{X=l.location}catch{}var k=function(ve){if(x(ee,ve)){var me=ee[ve];delete ee[ve],me()}},K=function(ve){return function(){k(ve)}},se=function(ve){k(ve.data)},Pe=function(ve){l.postMessage(te(ve),X.protocol+"//"+X.host)};(!_||!F)&&(_=function(me){var be=N(arguments,1);return ee[++q]=function(){s(b(me)?me:ce(me),void 0,be)},P(q),q},F=function(me){delete ee[me]},I?P=function(ve){Y.nextTick(K(ve))}:V&&V.now?P=function(ve){V.now(K(ve))}:ue&&!R?(w=new ue,D=w.port2,w.port1.onmessage=se,P=y(D.postMessage,D)):l.addEventListener&&b(l.postMessage)&&!l.importScripts&&X&&X.protocol!=="file:"&&!S(Pe)?(P=Pe,l.addEventListener("message",se,!1)):B in A("script")?P=function(ve){T.appendChild(A("script"))[B]=function(){T.removeChild(this),k(ve)}}:P=function(ve){setTimeout(K(ve),0)}),u.exports={set:_,clear:F}},function(u,c,i){var l=i(53);u.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(l)},function(u,c,i){var l=i(55),s=function(y){var b,x;this.promise=new y(function(S,T){if(b!==void 0||x!==void 0)throw TypeError("Bad Promise constructor");b=S,x=T}),this.resolve=l(b),this.reject=l(x)};u.exports.f=function(y){return new s(y)}},function(u,c,i){function l(){return!1}c.a=l},function(u,c,i){(function(l){i.d(c,"a",function(){return q});var s=i(0);function y(B){throw new Error("[mobx-utils] "+B)}function b(B,X){X===void 0&&(X="Illegal state"),B||y(X)}var x=function(B){return B&&B!==Object.prototype&&Object.getOwnPropertyNames(B).concat(x(Object.getPrototypeOf(B))||[])},S=function(B){var X=x(B),P=X.filter(function(w,D){return X.indexOf(w)===D});return P},T=function(B){return S(B).filter(function(X){return X!=="constructor"&&!~X.indexOf("__")})},N="pending",A="fulfilled",R="rejected";function I(B){switch(this.state){case N:return B.pending&&B.pending(this.value);case R:return B.rejected&&B.rejected(this.value);case A:return B.fulfilled?B.fulfilled(this.value):this.value}}function _(B,X){if(b(arguments.length<=2,"fromPromise expects up to two arguments"),b(typeof B=="function"||typeof B=="object"&&B&&typeof B.then=="function","Please pass a promise or function to fromPromise"),B.isPromiseBasedObservable===!0)return B;typeof B=="function"&&(B=new Promise(B));var P=B;B.then(Object(s.k)("observableFromPromise-resolve",function(D){P.value=D,P.state=A}),Object(s.k)("observableFromPromise-reject",function(D){P.value=D,P.state=R})),P.isPromiseBasedObservable=!0,P.case=I;var w=X&&X.state===A?X.value:void 0;return Object(s.q)(P,{value:w,state:N},{},{deep:!1}),P}(function(B){B.reject=Object(s.k)("fromPromise.reject",function(P){var w=B(Promise.reject(P));return w.state=R,w.value=P,w});function X(P){P===void 0&&(P=void 0);var w=B(Promise.resolve(P));return w.state=A,w.value=P,w}B.resolve=Object(s.k)("fromPromise.resolve",X)})(_||(_={}));var F=function(B,X,P,w){var D=arguments.length,k=D<3?X:w===null?w=Object.getOwnPropertyDescriptor(X,P):w,K;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(B,X,P,w);else for(var se=B.length-1;se>=0;se--)(K=B[se])&&(k=(D<3?K(k):D>3?K(X,P,k):K(X,P))||k);return D>3&&k&&Object.defineProperty(X,P,k),k};(function(){function B(X,P){var w=this;Object(s.G)(function(){w.current=P,w.subscription=X.subscribe(w)})}return B.prototype.dispose=function(){this.subscription&&this.subscription.unsubscribe()},B.prototype.next=function(X){this.current=X},B.prototype.complete=function(){this.dispose()},B.prototype.error=function(X){this.current=X,this.dispose()},F([s.C.ref],B.prototype,"current",void 0),F([s.k.bound],B.prototype,"next",null),F([s.k.bound],B.prototype,"complete",null),F([s.k.bound],B.prototype,"error",null),B})();var Y=function(){return Y=Object.assign||function(B){for(var X,P=1,w=arguments.length;P<w;P++){X=arguments[P];for(var D in X)Object.prototype.hasOwnProperty.call(X,D)&&(B[D]=X[D])}return B},Y.apply(this,arguments)},V=function(B,X,P,w){var D=arguments.length,k=D<3?X:w===null?w=Object.getOwnPropertyDescriptor(X,P):w,K;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(B,X,P,w);else for(var se=B.length-1;se>=0;se--)(K=B[se])&&(k=(D<3?K(k):D>3?K(X,P,k):K(X,P))||k);return D>3&&k&&Object.defineProperty(X,P,k),k},ce=["model","reset","submit","isDirty","isPropertyDirty","resetProperty"];(function(){function B(X){var P=this;this.model=X,this.localValues=s.C.map({}),this.localComputedValues=s.C.map({}),this.isPropertyDirty=function(w){return P.localValues.has(w)},b(Object(s.A)(X),"createViewModel expects an observable object"),T(X).forEach(function(w){if(!(w===s.a||w==="__mobxDidRunLazyInitializers")){if(b(ce.indexOf(w)===-1,"The propertyname "+w+" is reserved and cannot be used with viewModels"),Object(s.w)(X,w)){var D=Object(s.h)(X,w).derivation;P.localComputedValues.set(w,Object(s.m)(D.bind(P)))}var k=Object.getOwnPropertyDescriptor(X,w),K=k?{enumerable:k.enumerable}:{};Object.defineProperty(P,w,Y(Y({},K),{configurable:!0,get:function(){return Object(s.w)(X,w)?P.localComputedValues.get(w).get():P.isPropertyDirty(w)?P.localValues.get(w):P.model[w]},set:Object(s.k)(function(se){se!==P.model[w]?P.localValues.set(w,se):P.localValues.delete(w)})}))}})}return Object.defineProperty(B.prototype,"isDirty",{get:function(){return this.localValues.size>0},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"changedValues",{get:function(){return this.localValues.toJS()},enumerable:!1,configurable:!0}),B.prototype.submit=function(){var X=this;Object(s.B)(this.localValues).forEach(function(P){var w=X.localValues.get(P),D=X.model[P];Object(s.y)(D)?D.replace(w):Object(s.z)(D)?(D.clear(),D.merge(w)):Object(s.v)(w)||(X.model[P]=w)}),this.localValues.clear()},B.prototype.reset=function(){this.localValues.clear()},B.prototype.resetProperty=function(X){this.localValues.delete(X)},V([s.m],B.prototype,"isDirty",null),V([s.m],B.prototype,"changedValues",null),V([s.k.bound],B.prototype,"submit",null),V([s.k.bound],B.prototype,"reset",null),V([s.k.bound],B.prototype,"resetProperty",null),B})();function ue(B){if(!B)return"ROOT";for(var X=[];B.parent;)X.push(B.path),B=B.parent;return X.reverse().join("/")}function te(B){return Object(s.A)(B)||Object(s.y)(B)||Object(s.z)(B)}function q(B,X){var P=new WeakMap;function w(se){var Pe=P.get(se.object);D(se,Pe),X(se,ue(Pe),B)}function D(se,Pe){switch(se.type){case"add":k(se.newValue,Pe,se.name);break;case"update":K(se.oldValue),k(se.newValue,Pe,se.name||""+se.index);break;case"remove":case"delete":K(se.oldValue);break;case"splice":se.removed.map(K),se.added.forEach(function(be,Oe){return k(be,Pe,""+(se.index+Oe))});for(var ve=se.index+se.addedCount;ve<se.object.length;ve++)if(te(se.object[ve])){var me=P.get(se.object[ve]);me&&(me.path=""+ve)}break}}function k(se,Pe,ve){if(te(se)){var me=P.get(se);if(me){if(me.parent!==Pe||me.path!==ve)throw new Error("The same observable object cannot appear twice in the same tree,"+(" trying to assign it to '"+ue(Pe)+"/"+ve+"',")+(" but it already exists at '"+ue(me.parent)+"/"+me.path+"'"))}else{var be={parent:Pe,path:ve,dispose:Object(s.D)(se,w)};P.set(se,be),Object(s.p)(se).forEach(function(Oe){var we=Oe[0],ze=Oe[1];return k(ze,be,we)})}}}function K(se){if(te(se)){var Pe=P.get(se);if(!Pe)return;P.delete(se),Pe.dispose(),Object(s.L)(se).forEach(K)}}return k(B,void 0,""),function(){K(B)}}var ee=function(){var B=function(X,P){return B=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,D){w.__proto__=D}||function(w,D){for(var k in D)D.hasOwnProperty(k)&&(w[k]=D[k])},B(X,P)};return function(X,P){B(X,P);function w(){this.constructor=X}X.prototype=P===null?Object.create(P):(w.prototype=P.prototype,new w)}}();(function(B){ee(X,B);function X(P,w,D){var k=D===void 0?{}:D,K=k.name,se=K===void 0?"ogm"+(Math.random()*1e3|0):K,Pe=k.keyToName,ve=Pe===void 0?function(Oe){return""+Oe}:Pe,me=B.call(this)||this;me._keyToName=ve,me._groupBy=w,me._ogmInfoKey=Symbol("ogmInfo"+se),me._base=P;for(var be=0;be<P.length;be++)me._addItem(P[be]);return me._disposeBaseObserver=Object(s.D)(me._base,function(Oe){if(Oe.type==="splice")Object(s.J)(function(){for(var we=0,ze=Oe.removed;we<ze.length;we++){var Ye=ze[we];me._removeItem(Ye)}for(var Le=0,Se=Oe.added;Le<Se.length;Le++){var Fe=Se[Le];me._addItem(Fe)}});else if(Oe.type==="update")Object(s.J)(function(){me._removeItem(Oe.oldValue),me._addItem(Oe.newValue)});else throw new Error("illegal state")}),me}return X.prototype.clear=function(){throw new Error("not supported")},X.prototype.delete=function(P){throw new Error("not supported")},X.prototype.set=function(P,w){throw new Error("not supported")},X.prototype.dispose=function(){this._disposeBaseObserver();for(var P=0;P<this._base.length;P++){var w=this._base[P],D=w[this._ogmInfoKey];D.reaction(),delete w[this._ogmInfoKey]}},X.prototype._getGroupArr=function(P){var w=B.prototype.get.call(this,P);return w===void 0&&(w=Object(s.C)([],{name:"GroupArray["+this._keyToName(P)+"]",deep:!1}),B.prototype.set.call(this,P,w)),w},X.prototype._removeFromGroupArr=function(P,w){var D=B.prototype.get.call(this,P);D.length===1?B.prototype.delete.call(this,P):(w===D.length-1||(D[w]=D[D.length-1],D[w][this._ogmInfoKey].groupArrIndex=w),D.length--)},X.prototype._addItem=function(P){var w=this,D=this._groupBy(P),k=this._getGroupArr(D),K={groupByValue:D,groupArrIndex:k.length,reaction:Object(s.F)(function(){return w._groupBy(P)},function(se,Pe){var ve=P[w._ogmInfoKey];w._removeFromGroupArr(ve.groupByValue,ve.groupArrIndex);var me=w._getGroupArr(se),be=me.length;me.push(P),ve.groupByValue=se,ve.groupArrIndex=be})};Object.defineProperty(P,this._ogmInfoKey,{configurable:!0,enumerable:!1,value:K}),k.push(P)},X.prototype._removeItem=function(P){var w=P[this._ogmInfoKey];this._removeFromGroupArr(w.groupByValue,w.groupArrIndex),w.reaction(),delete P[this._ogmInfoKey]},X})(s.b),Promise.resolve(),typeof queueMicrotask!="undefined"||typeof l!="undefined"&&l.nextTick}).call(this,i(155))},function(u,c,i){var l;(function(s,y,b){if(!s)return;for(var x={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},S={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},T={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},N={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},A,R=1;R<20;++R)x[111+R]="f"+R;for(R=0;R<=9;++R)x[R+96]=R.toString();function I(w,D,k){if(w.addEventListener){w.addEventListener(D,k,!1);return}w.attachEvent("on"+D,k)}function _(w){if(w.type=="keypress"){var D=String.fromCharCode(w.which);return w.shiftKey||(D=D.toLowerCase()),D}return x[w.which]?x[w.which]:S[w.which]?S[w.which]:String.fromCharCode(w.which).toLowerCase()}function F(w,D){return w.sort().join(",")===D.sort().join(",")}function Y(w){var D=[];return w.shiftKey&&D.push("shift"),w.altKey&&D.push("alt"),w.ctrlKey&&D.push("ctrl"),w.metaKey&&D.push("meta"),D}function V(w){if(w.preventDefault){w.preventDefault();return}w.returnValue=!1}function ce(w){if(w.stopPropagation){w.stopPropagation();return}w.cancelBubble=!0}function ue(w){return w=="shift"||w=="ctrl"||w=="alt"||w=="meta"}function te(){if(!A){A={};for(var w in x)w>95&&w<112||x.hasOwnProperty(w)&&(A[x[w]]=w)}return A}function q(w,D,k){return k||(k=te()[w]?"keydown":"keypress"),k=="keypress"&&D.length&&(k="keydown"),k}function ee(w){return w==="+"?["+"]:(w=w.replace(/\+{2}/g,"+plus"),w.split("+"))}function B(w,D){var k,K,se,Pe=[];for(k=ee(w),se=0;se<k.length;++se)K=k[se],N[K]&&(K=N[K]),D&&D!="keypress"&&T[K]&&(K=T[K],Pe.push("shift")),ue(K)&&Pe.push(K);return D=q(K,Pe,D),{key:K,modifiers:Pe,action:D}}function X(w,D){return w===null||w===y?!1:w===D?!0:X(w.parentNode,D)}function P(w){var D=this;if(w=w||y,!(D instanceof P))return new P(w);D.target=w,D._callbacks={},D._directMap={};var k={},K,se=!1,Pe=!1,ve=!1;function me(Se){Se=Se||{};var Fe=!1,He;for(He in k){if(Se[He]){Fe=!0;continue}k[He]=0}Fe||(ve=!1)}function be(Se,Fe,He,G,L,W){var fe,ge,de=[],Ie=He.type;if(!D._callbacks[Se])return[];for(Ie=="keyup"&&ue(Se)&&(Fe=[Se]),fe=0;fe<D._callbacks[Se].length;++fe)if(ge=D._callbacks[Se][fe],!(!G&&ge.seq&&k[ge.seq]!=ge.level)&&Ie==ge.action&&(Ie=="keypress"&&!He.metaKey&&!He.ctrlKey||F(Fe,ge.modifiers))){var Ve=!G&&ge.combo==L,We=G&&ge.seq==G&&ge.level==W;(Ve||We)&&D._callbacks[Se].splice(fe,1),de.push(ge)}return de}function Oe(Se,Fe,He,G){D.stopCallback(Fe,Fe.target||Fe.srcElement,He,G)||Se(Fe,He)===!1&&(V(Fe),ce(Fe))}D._handleKey=function(Se,Fe,He){var G=be(Se,Fe,He),L,W={},fe=0,ge=!1;for(L=0;L<G.length;++L)G[L].seq&&(fe=Math.max(fe,G[L].level));for(L=0;L<G.length;++L){if(G[L].seq){if(G[L].level!=fe)continue;ge=!0,W[G[L].seq]=1,Oe(G[L].callback,He,G[L].combo,G[L].seq);continue}ge||Oe(G[L].callback,He,G[L].combo)}var de=He.type=="keypress"&&Pe;He.type==ve&&!ue(Se)&&!de&&me(W),Pe=ge&&He.type=="keydown"};function we(Se){typeof Se.which!="number"&&(Se.which=Se.keyCode);var Fe=_(Se);if(!!Fe){if(Se.type=="keyup"&&se===Fe){se=!1;return}D.handleKey(Fe,Y(Se),Se)}}function ze(){clearTimeout(K),K=setTimeout(me,1e3)}function Ye(Se,Fe,He,G){k[Se]=0;function L(Ie){return function(){ve=Ie,++k[Se],ze()}}function W(Ie){Oe(He,Ie,Se),G!=="keyup"&&(se=_(Ie)),setTimeout(me,10)}for(var fe=0;fe<Fe.length;++fe){var ge=fe+1===Fe.length,de=ge?W:L(G||B(Fe[fe+1]).action);Le(Fe[fe],de,G,Se,fe)}}function Le(Se,Fe,He,G,L){D._directMap[Se+":"+He]=Fe,Se=Se.replace(/\s+/g," ");var W=Se.split(" "),fe;if(W.length>1){Ye(Se,W,Fe,He);return}fe=B(Se,He),D._callbacks[fe.key]=D._callbacks[fe.key]||[],be(fe.key,fe.modifiers,{type:fe.action},G,Se,L),D._callbacks[fe.key][G?"unshift":"push"]({callback:Fe,modifiers:fe.modifiers,action:fe.action,seq:G,level:L,combo:Se})}D._bindMultiple=function(Se,Fe,He){for(var G=0;G<Se.length;++G)Le(Se[G],Fe,He)},I(w,"keypress",we),I(w,"keydown",we),I(w,"keyup",we)}P.prototype.bind=function(w,D,k){var K=this;return w=w instanceof Array?w:[w],K._bindMultiple.call(K,w,D,k),K},P.prototype.unbind=function(w,D){var k=this;return k.bind.call(k,w,function(){},D)},P.prototype.trigger=function(w,D){var k=this;return k._directMap[w+":"+D]&&k._directMap[w+":"+D]({},w),k},P.prototype.reset=function(){var w=this;return w._callbacks={},w._directMap={},w},P.prototype.stopCallback=function(w,D){var k=this;if((" "+D.className+" ").indexOf(" mousetrap ")>-1||X(D,k.target))return!1;if("composedPath"in w&&typeof w.composedPath=="function"){var K=w.composedPath()[0];K!==w.target&&(D=K)}return D.tagName=="INPUT"||D.tagName=="SELECT"||D.tagName=="TEXTAREA"||D.isContentEditable},P.prototype.handleKey=function(){var w=this;return w._handleKey.apply(w,arguments)},P.addKeycodes=function(w){for(var D in w)w.hasOwnProperty(D)&&(x[D]=w[D]);A=null},P.init=function(){var w=P(y);for(var D in w)D.charAt(0)!=="_"&&(P[D]=function(k){return function(){return w[k].apply(w,arguments)}}(D))},P.init(),s.Mousetrap=P,u.exports&&(u.exports=P),l=function(){return P}.call(c,i,c,u),l!==b&&(u.exports=l)})(typeof window!="undefined"?window:null,typeof window!="undefined"?document:null)},function(u,c,i){var l=i(36),s=i(37),y=i(32),b=i(39),x=i(67);u.exports=l?Object.defineProperties:function(T,N){y(T);for(var A=b(N),R=x(N),I=R.length,_=0,F;I>_;)s.f(T,F=R[_++],A[F]);return T}},function(u,c,i){var l=i(7),s=i(35),y=i(28),b=i(33),x=l.TypeError;u.exports=function(S,T){var N,A;if(T==="string"&&y(N=S.toString)&&!b(A=s(N,S))||y(N=S.valueOf)&&!b(A=s(N,S))||T!=="string"&&y(N=S.toString)&&!b(A=s(N,S)))return A;throw x("Can't convert object to primitive value")}},function(u,c,i){var l=i(7),s=i(28),y=i(92),b=l.WeakMap;u.exports=s(b)&&/native code/.test(y(b))},function(u,c,i){var l=i(136).IteratorPrototype,s=i(54),y=i(72),b=i(74),x=i(71),S=function(){return this};u.exports=function(T,N,A,R){var I=N+" Iterator";return T.prototype=s(l,{next:y(+!R,A)}),b(T,I,!1,!0),x[I]=S,T}},function(u,c,i){var l=i(7),s=i(28),y=l.String,b=l.TypeError;u.exports=function(x){if(typeof x=="object"||s(x))return x;throw b("Can't set "+y(x)+" as a prototype")}},function(u,c,i){var l=i(16),s=i(7),y=i(15),b=i(95),x=i(44),S=i(138),T=i(114),N=i(117),A=i(28),R=i(33),I=i(18),_=i(118),F=i(74),Y=i(143);u.exports=function(V,ce,ue){var te=V.indexOf("Map")!==-1,q=V.indexOf("Weak")!==-1,ee=te?"set":"add",B=s[V],X=B&&B.prototype,P=B,w={},D=function(be){var Oe=y(X[be]);x(X,be,be=="add"?function(ze){return Oe(this,ze===0?0:ze),this}:be=="delete"?function(we){return q&&!R(we)?!1:Oe(this,we===0?0:we)}:be=="get"?function(ze){return q&&!R(ze)?void 0:Oe(this,ze===0?0:ze)}:be=="has"?function(ze){return q&&!R(ze)?!1:Oe(this,ze===0?0:ze)}:function(ze,Ye){return Oe(this,ze===0?0:ze,Ye),this})},k=b(V,!A(B)||!(q||X.forEach&&!I(function(){new B().entries().next()})));if(k)P=ue.getConstructor(ce,V,te,ee),S.enable();else if(b(V,!0)){var K=new P,se=K[ee](q?{}:-0,1)!=K,Pe=I(function(){K.has(1)}),ve=_(function(be){new B(be)}),me=!q&&I(function(){for(var be=new B,Oe=5;Oe--;)be[ee](Oe,Oe);return!be.has(-0)});ve||(P=ce(function(be,Oe){N(be,X);var we=Y(new B,be,P);return Oe!=null&&T(Oe,we[ee],{that:we,AS_ENTRIES:te}),we}),P.prototype=X,X.constructor=P),(Pe||me)&&(D("delete"),D("has"),te&&D("get")),(me||se)&&D(ee),q&&X.clear&&delete X.clear}return w[V]=P,l({global:!0,forced:P!=B},w),F(P,V),q||ue.setStrong(P,V,te),P}},function(u,c,i){var l=i(18),s=i(33),y=i(50),b=i(175),x=Object.isExtensible,S=l(function(){});u.exports=S||b?function(N){return!s(N)||b&&y(N)=="ArrayBuffer"?!1:x?x(N):!0}:x},function(u,c,i){var l=i(18);u.exports=l(function(){if(typeof ArrayBuffer=="function"){var s=new ArrayBuffer(8);Object.isExtensible(s)&&Object.defineProperty(s,"a",{value:8})}})},function(u,c,i){var l=i(18);u.exports=!l(function(){return Object.isExtensible(Object.preventExtensions({}))})},function(u,c,i){var l=i(37).f,s=i(54),y=i(144),b=i(62),x=i(117),S=i(114),T=i(111),N=i(145),A=i(36),R=i(138).fastKey,I=i(56),_=I.set,F=I.getterFor;u.exports={getConstructor:function(Y,V,ce,ue){var te=Y(function(P,w){x(P,q),_(P,{type:V,index:s(null),first:void 0,last:void 0,size:0}),A||(P.size=0),w!=null&&S(w,P[ue],{that:P,AS_ENTRIES:ce})}),q=te.prototype,ee=F(V),B=function(P,w,D){var k=ee(P),K=X(P,w),se,Pe;return K?K.value=D:(k.last=K={index:Pe=R(w,!0),key:w,value:D,previous:se=k.last,next:void 0,removed:!1},k.first||(k.first=K),se&&(se.next=K),A?k.size++:P.size++,Pe!=="F"&&(k.index[Pe]=K)),P},X=function(P,w){var D=ee(P),k=R(w),K;if(k!=="F")return D.index[k];for(K=D.first;K;K=K.next)if(K.key==w)return K};return y(q,{clear:function(){for(var w=this,D=ee(w),k=D.index,K=D.first;K;)K.removed=!0,K.previous&&(K.previous=K.previous.next=void 0),delete k[K.index],K=K.next;D.first=D.last=void 0,A?D.size=0:w.size=0},delete:function(P){var w=this,D=ee(w),k=X(w,P);if(k){var K=k.next,se=k.previous;delete D.index[k.index],k.removed=!0,se&&(se.next=K),K&&(K.previous=se),D.first==k&&(D.first=K),D.last==k&&(D.last=se),A?D.size--:w.size--}return!!k},forEach:function(w){for(var D=ee(this),k=b(w,arguments.length>1?arguments[1]:void 0),K;K=K?K.next:D.first;)for(k(K.value,K.key,this);K&&K.removed;)K=K.previous},has:function(w){return!!X(this,w)}}),y(q,ce?{get:function(w){var D=X(this,w);return D&&D.value},set:function(w,D){return B(this,w===0?0:w,D)}}:{add:function(w){return B(this,w=w===0?0:w,w)}}),A&&l(q,"size",{get:function(){return ee(this).size}}),te},setStrong:function(Y,V,ce){var ue=V+" Iterator",te=F(V),q=F(ue);T(Y,V,function(ee,B){_(this,{type:ue,target:ee,state:te(ee),kind:B,last:void 0})},function(){for(var ee=q(this),B=ee.kind,X=ee.last;X&&X.removed;)X=X.previous;return!ee.target||!(ee.last=X=X?X.next:ee.state.first)?(ee.target=void 0,{value:void 0,done:!0}):B=="keys"?{value:X.key,done:!1}:B=="values"?{value:X.value,done:!1}:{value:[X.key,X.value],done:!1}},ce?"entries":"values",!ce,!0),N(V)}}},function(u,c,i){var l=i(116),s=i(98);u.exports=l?{}.toString:function(){return"[object "+s(this)+"]"}},function(u,c,i){var l=i(75).forEach,s=i(120),y=s("forEach");u.exports=y?[].forEach:function(x){return l(this,x,arguments.length>1?arguments[1]:void 0)}},function(u,c,i){var l=i(7),s=i(99),y=i(100),b=i(33),x=i(27),S=x("species"),T=l.Array;u.exports=function(N){var A;return s(N)&&(A=N.constructor,y(A)&&(A===T||s(A.prototype))?A=void 0:b(A)&&(A=A[S],A===null&&(A=void 0))),A===void 0?T:A}},function(u,c,i){var l=i(7);u.exports=l},function(u,c,i){var l=i(7),s=i(62),y=i(35),b=i(38),x=i(183),S=i(140),T=i(100),N=i(43),A=i(61),R=i(141),I=i(115),_=l.Array;u.exports=function(Y){var V=b(Y),ce=T(this),ue=arguments.length,te=ue>1?arguments[1]:void 0,q=te!==void 0;q&&(te=s(te,ue>2?arguments[2]:void 0));var ee=I(V),B=0,X,P,w,D,k,K;if(ee&&!(this==_&&S(ee)))for(D=R(V,ee),k=D.next,P=ce?new this:[];!(w=y(k,D)).done;B++)K=q?x(D,te,[w.value,B],!0):w.value,A(P,B,K);else for(X=N(V),P=ce?new this(X):_(X);X>B;B++)K=q?te(V[B],B):V[B],A(P,B,K);return P.length=B,P}},function(u,c,i){var l=i(32),s=i(142);u.exports=function(y,b,x,S){try{return S?b(l(x)[0],x[1]):b(x)}catch(T){s(y,"throw",T)}}},function(u,c,i){var l=i(32);u.exports=function(){var s=l(this),y="";return s.global&&(y+="g"),s.ignoreCase&&(y+="i"),s.multiline&&(y+="m"),s.dotAll&&(y+="s"),s.unicode&&(y+="u"),s.sticky&&(y+="y"),y}},function(u,c,i){var l=i(18),s=i(7),y=s.RegExp;u.exports=l(function(){var b=y(".","s");return!(b.dotAll&&b.exec(`
- `)&&b.flags==="s")})},function(u,c,i){var l=i(18),s=i(7),y=s.RegExp;u.exports=l(function(){var b=y("(?<a>b)","g");return b.exec("b").groups.a!=="b"||"b".replace(b,"$<a>c")!=="bc"})},function(u,c,i){var l=i(16),s=i(15),y=i(55),b=i(38),x=i(43),S=i(40),T=i(18),N=i(188),A=i(120),R=i(189),I=i(190),_=i(66),F=i(191),Y=[],V=s(Y.sort),ce=s(Y.push),ue=T(function(){Y.sort(void 0)}),te=T(function(){Y.sort(null)}),q=A("sort"),ee=!T(function(){if(_)return _<70;if(!(R&&R>3)){if(I)return!0;if(F)return F<603;var P="",w,D,k,K;for(w=65;w<76;w++){switch(D=String.fromCharCode(w),w){case 66:case 69:case 70:case 72:k=3;break;case 68:case 71:k=4;break;default:k=2}for(K=0;K<47;K++)Y.push({k:D+K,v:k})}for(Y.sort(function(se,Pe){return Pe.v-se.v}),K=0;K<Y.length;K++)D=Y[K].k.charAt(0),P.charAt(P.length-1)!==D&&(P+=D);return P!=="DGBEFHACIJK"}}),B=ue||!te||!q||!ee,X=function(P){return function(w,D){return D===void 0?-1:w===void 0?1:P!==void 0?+P(w,D)||0:S(w)>S(D)?1:-1}};l({target:"Array",proto:!0,forced:B},{sort:function(w){w!==void 0&&y(w);var D=b(this);if(ee)return w===void 0?V(D):V(D,w);var k=[],K=x(D),se,Pe;for(Pe=0;Pe<K;Pe++)Pe in D&&ce(k,D[Pe]);for(N(k,X(w)),se=k.length,Pe=0;Pe<se;)D[Pe]=k[Pe++];for(;Pe<K;)delete D[Pe++];return D}})},function(u,c,i){var l=i(113),s=Math.floor,y=function(S,T){var N=S.length,A=s(N/2);return N<8?b(S,T):x(S,y(l(S,0,A),T),y(l(S,A),T),T)},b=function(S,T){for(var N=S.length,A=1,R,I;A<N;){for(I=A,R=S[A];I&&T(S[I-1],R)>0;)S[I]=S[--I];I!==A++&&(S[I]=R)}return S},x=function(S,T,N,A){for(var R=T.length,I=N.length,_=0,F=0;_<R||F<I;)S[_+F]=_<R&&F<I?A(T[_],N[F])<=0?T[_++]:N[F++]:_<R?T[_++]:N[F++];return S};u.exports=y},function(u,c,i){var l=i(53),s=l.match(/firefox\/(\d+)/i);u.exports=!!s&&+s[1]},function(u,c,i){var l=i(53);u.exports=/MSIE|Trident/.test(l)},function(u,c,i){var l=i(53),s=l.match(/AppleWebKit\/(\d+)\./);u.exports=!!s&&+s[1]},function(u,c,i){var l=i(16),s=i(75).find,y=i(83),b="find",x=!0;b in[]&&Array(1)[b](function(){x=!1}),l({target:"Array",proto:!0,forced:x},{find:function(T){return s(this,T,arguments.length>1?arguments[1]:void 0)}}),y(b)},function(u,c,i){var l=i(7),s=i(154),y=l.TypeError;u.exports=function(b){if(s(b))throw y("The method doesn't accept regular expressions");return b}},function(u,c,i){var l=i(27),s=l("match");u.exports=function(y){var b=/./;try{"/./"[y](b)}catch{try{return b[s]=!1,"/./"[y](b)}catch{}}return!1}},function(u,c,i){var l=i(94).PROPER,s=i(18),y=i(160),b="\u200B\x85\u180E";u.exports=function(x){return s(function(){return!!y[x]()||b[x]()!==b||l&&y[x].name!==x})}},function(u,c,i){var l=i(15);u.exports=l(1 .valueOf)},function(u,c,i){var l=i(15),s=i(38),y=Math.floor,b=l("".charAt),x=l("".replace),S=l("".slice),T=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,N=/\$([$&'`]|\d{1,2})/g;u.exports=function(A,R,I,_,F,Y){var V=I+A.length,ce=_.length,ue=N;return F!==void 0&&(F=s(F),ue=T),x(Y,ue,function(te,q){var ee;switch(b(q,0)){case"$":return"$";case"&":return A;case"`":return S(R,0,I);case"'":return S(R,V);case"<":ee=F[S(q,1,-1)];break;default:var B=+q;if(B===0)return te;if(B>ce){var X=y(B/10);return X===0?te:X<=ce?_[X-1]===void 0?b(q,1):_[X-1]+b(q,1):te}ee=_[B-1]}return ee===void 0?"":ee})}},function(u,c,i){var l=i(36),s=i(15),y=i(35),b=i(18),x=i(67),S=i(112),T=i(93),N=i(38),A=i(81),R=Object.assign,I=Object.defineProperty,_=s([].concat);u.exports=!R||b(function(){if(l&&R({b:1},R(I({},"a",{enumerable:!0,get:function(){I(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var F={},Y={},V=Symbol(),ce="abcdefghijklmnopqrst";return F[V]=7,ce.split("").forEach(function(ue){Y[ue]=ue}),R({},F)[V]!=7||x(R({},Y)).join("")!=ce})?function(Y,V){for(var ce=N(Y),ue=arguments.length,te=1,q=S.f,ee=T.f;ue>te;)for(var B=A(arguments[te++]),X=q?_(x(B),q(B)):x(B),P=X.length,w=0,D;P>w;)D=X[w++],(!l||y(ee,B,D))&&(ce[D]=B[D]);return ce}:R},function(u,c,i){var l=i(7),s=i(15),y=i(55),b=i(33),x=i(34),S=i(101),T=l.Function,N=s([].concat),A=s([].join),R={},I=function(_,F,Y){if(!x(R,F)){for(var V=[],ce=0;ce<F;ce++)V[ce]="a["+ce+"]";R[F]=T("C,a","return new C("+A(V,",")+")")}return R[F](_,Y)};u.exports=T.bind||function(F){var Y=y(this),V=Y.prototype,ce=S(arguments,1),ue=function(){var q=N(ce,S(arguments));return this instanceof ue?I(Y,q.length,q):Y.apply(F,q)};return b(V)&&(ue.prototype=V),ue}},function(u,c,i){var l=i(34);u.exports=function(s){return s!==void 0&&(l(s,"value")||l(s,"writable"))}},function(u,c,i){var l=i(15),s=i(45),y=i(40),b=/"/g,x=l("".replace);u.exports=function(S,T,N,A){var R=y(s(S)),I="<"+T;return N!==""&&(I+=" "+N+'="'+x(y(A),b,""")+'"'),I+">"+R+"</"+T+">"}},function(u,c,i){var l=i(18);u.exports=function(s){return l(function(){var y=""[s]('"');return y!==y.toLowerCase()||y.split('"').length>3})}},function(u,c,i){var l=i(16),s=Math.hypot,y=Math.abs,b=Math.sqrt,x=!!s&&s(1/0,NaN)!==1/0;l({target:"Math",stat:!0,forced:x},{hypot:function(T,N){for(var A=0,R=0,I=arguments.length,_=0,F,Y;R<I;)F=y(arguments[R++]),_<F?(Y=_/F,A=A*Y*Y+1,_=F):F>0?(Y=F/_,A+=Y*Y):A+=F;return _===1/0?1/0:_*b(A)}})},function(u,c,i){var l=i(16),s=i(65),y=i(7),b=i(46),x=i(35),S=i(205),T=i(44),N=i(144),A=i(97),R=i(74),I=i(145),_=i(55),F=i(28),Y=i(33),V=i(117),ce=i(92),ue=i(114),te=i(118),q=i(156),ee=i(162).set,B=i(206),X=i(209),P=i(210),w=i(164),D=i(211),k=i(56),K=i(95),se=i(27),Pe=i(212),ve=i(126),me=i(66),be=se("species"),Oe="Promise",we=k.getterFor(Oe),ze=k.set,Ye=k.getterFor(Oe),Le=S&&S.prototype,Se=S,Fe=Le,He=y.TypeError,G=y.document,L=y.process,W=w.f,fe=W,ge=!!(G&&G.createEvent&&y.dispatchEvent),de=F(y.PromiseRejectionEvent),Ie="unhandledrejection",Ve="rejectionhandled",We=0,qe=1,ye=2,lt=1,Ze=2,Ge=!1,et,St,st,gt,ae=K(Oe,function(){var Re=ce(Se),Ke=Re!==String(Se);if(!Ke&&me===66||s&&!Fe.finally)return!0;if(me>=51&&/native code/.test(Re))return!1;var at=new Se(function(U){U(1)}),tt=function(U){U(function(){},function(){})},ct=at.constructor={};return ct[be]=tt,Ge=at.then(function(){})instanceof tt,Ge?!Ke&&Pe&&!de:!0}),jt=ae||!te(function(Re){Se.all(Re).catch(function(){})}),Pt=function(Re){var Ke;return Y(Re)&&F(Ke=Re.then)?Ke:!1},bt=function(Re,Ke){if(!Re.notified){Re.notified=!0;var at=Re.reactions;B(function(){for(var tt=Re.value,ct=Re.state==qe,U=0;at.length>U;){var Q=at[U++],re=ct?Q.ok:Q.fail,ne=Q.resolve,Me=Q.reject,je=Q.domain,Xe,yt,qt;try{re?(ct||(Re.rejection===Ze&&wr(Re),Re.rejection=lt),re===!0?Xe=tt:(je&&je.enter(),Xe=re(tt),je&&(je.exit(),qt=!0)),Xe===Q.promise?Me(He("Promise-chain cycle")):(yt=Pt(Xe))?x(yt,Xe,ne,Me):ne(Xe)):Me(tt)}catch(er){je&&!qt&&je.exit(),Me(er)}}Re.reactions=[],Re.notified=!1,Ke&&!Re.rejection&&gr(Re)})}},Kt=function(Re,Ke,at){var tt,ct;ge?(tt=G.createEvent("Event"),tt.promise=Ke,tt.reason=at,tt.initEvent(Re,!1,!0),y.dispatchEvent(tt)):tt={promise:Ke,reason:at},!de&&(ct=y["on"+Re])?ct(tt):Re===Ie&&P("Unhandled promise rejection",at)},gr=function(Re){x(ee,y,function(){var Ke=Re.facade,at=Re.value,tt=Qt(Re),ct;if(tt&&(ct=D(function(){ve?L.emit("unhandledRejection",at,Ke):Kt(Ie,Ke,at)}),Re.rejection=ve||Qt(Re)?Ze:lt,ct.error))throw ct.value})},Qt=function(Re){return Re.rejection!==lt&&!Re.parent},wr=function(Re){x(ee,y,function(){var Ke=Re.facade;ve?L.emit("rejectionHandled",Ke):Kt(Ve,Ke,Re.value)})},nt=function(Re,Ke,at){return function(tt){Re(Ke,tt,at)}},Tt=function(Re,Ke,at){Re.done||(Re.done=!0,at&&(Re=at),Re.value=Ke,Re.state=ye,bt(Re,!0))},ar=function(Re,Ke,at){if(!Re.done){Re.done=!0,at&&(Re=at);try{if(Re.facade===Ke)throw He("Promise can't be resolved itself");var tt=Pt(Ke);tt?B(function(){var ct={done:!1};try{x(tt,Ke,nt(ar,ct,Re),nt(Tt,ct,Re))}catch(U){Tt(ct,U,Re)}}):(Re.value=Ke,Re.state=qe,bt(Re,!1))}catch(ct){Tt({done:!1},ct,Re)}}};if(ae&&(Se=function(Ke){V(this,Fe),_(Ke),x(et,this);var at=we(this);try{Ke(nt(ar,at),nt(Tt,at))}catch(tt){Tt(at,tt)}},Fe=Se.prototype,et=function(Ke){ze(this,{type:Oe,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:We,value:void 0})},et.prototype=N(Fe,{then:function(Ke,at){var tt=Ye(this),ct=tt.reactions,U=W(q(this,Se));return U.ok=F(Ke)?Ke:!0,U.fail=F(at)&&at,U.domain=ve?L.domain:void 0,tt.parent=!0,ct[ct.length]=U,tt.state!=We&&bt(tt,!1),U.promise},catch:function(Re){return this.then(void 0,Re)}}),St=function(){var Re=new et,Ke=we(Re);this.promise=Re,this.resolve=nt(ar,Ke),this.reject=nt(Tt,Ke)},w.f=W=function(Re){return Re===Se||Re===st?new St(Re):fe(Re)},!s&&F(S)&&Le!==Object.prototype)){gt=Le.then,Ge||(T(Le,"then",function(Ke,at){var tt=this;return new Se(function(ct,U){x(gt,tt,ct,U)}).then(Ke,at)},{unsafe:!0}),T(Le,"catch",Fe.catch,{unsafe:!0}));try{delete Le.constructor}catch{}A&&A(Le,Fe)}l({global:!0,wrap:!0,forced:ae},{Promise:Se}),R(Se,Oe,!1,!0),I(Oe),st=b(Oe),l({target:Oe,stat:!0,forced:ae},{reject:function(Ke){var at=W(this);return x(at.reject,void 0,Ke),at.promise}}),l({target:Oe,stat:!0,forced:s||ae},{resolve:function(Ke){return X(s&&this===st?Se:this,Ke)}}),l({target:Oe,stat:!0,forced:jt},{all:function(Ke){var at=this,tt=W(at),ct=tt.resolve,U=tt.reject,Q=D(function(){var re=_(at.resolve),ne=[],Me=0,je=1;ue(Ke,function(Xe){var yt=Me++,qt=!1;je++,x(re,at,Xe).then(function(er){qt||(qt=!0,ne[yt]=er,--je||ct(ne))},U)}),--je||ct(ne)});return Q.error&&U(Q.value),tt.promise},race:function(Ke){var at=this,tt=W(at),ct=tt.reject,U=D(function(){var Q=_(at.resolve);ue(Ke,function(re){x(Q,at,re).then(tt.resolve,ct)})});return U.error&&ct(U.value),tt.promise}})},function(u,c,i){var l=i(7);u.exports=l.Promise},function(u,c,i){var l=i(7),s=i(62),y=i(51).f,b=i(162).set,x=i(163),S=i(207),T=i(208),N=i(126),A=l.MutationObserver||l.WebKitMutationObserver,R=l.document,I=l.process,_=l.Promise,F=y(l,"queueMicrotask"),Y=F&&F.value,V,ce,ue,te,q,ee,B,X;Y||(V=function(){var P,w;for(N&&(P=I.domain)&&P.exit();ce;){w=ce.fn,ce=ce.next;try{w()}catch(D){throw ce?te():ue=void 0,D}}ue=void 0,P&&P.enter()},!x&&!N&&!T&&A&&R?(q=!0,ee=R.createTextNode(""),new A(V).observe(ee,{characterData:!0}),te=function(){ee.data=q=!q}):!S&&_&&_.resolve?(B=_.resolve(void 0),B.constructor=_,X=s(B.then,B),te=function(){X(V)}):N?te=function(){I.nextTick(V)}:(b=s(b,l),te=function(){b(V)})),u.exports=Y||function(P){var w={fn:P,next:void 0};ue&&(ue.next=w),ce||(ce=w,te()),ue=w}},function(u,c,i){var l=i(53),s=i(7);u.exports=/ipad|iphone|ipod/i.test(l)&&s.Pebble!==void 0},function(u,c,i){var l=i(53);u.exports=/web0s(?!.*chrome)/i.test(l)},function(u,c,i){var l=i(32),s=i(33),y=i(164);u.exports=function(b,x){if(l(b),s(x)&&x.constructor===b)return x;var S=y.f(b),T=S.resolve;return T(x),S.promise}},function(u,c,i){var l=i(7);u.exports=function(s,y){var b=l.console;b&&b.error&&(arguments.length==1?b.error(s):b.error(s,y))}},function(u,c){u.exports=function(i){try{return{error:!1,value:i()}}catch(l){return{error:!0,value:l}}}},function(u,c){u.exports=typeof window=="object"},function(u,c,i){var l=i(36),s=i(15),y=i(67),b=i(39),x=i(93).f,S=s(x),T=s([].push),N=function(A){return function(R){for(var I=b(R),_=y(I),F=_.length,Y=0,V=[],ce;F>Y;)ce=_[Y++],(!l||S(I,ce))&&T(V,A?[ce,I[ce]]:I[ce]);return V}};u.exports={entries:N(!0),values:N(!1)}},function(u,c,i){var l=i(38),s=i(68),y=i(43);u.exports=function(x){for(var S=l(this),T=y(S),N=arguments.length,A=s(N>1?arguments[1]:void 0,T),R=N>2?arguments[2]:void 0,I=R===void 0?T:s(R,T);I>A;)S[A++]=x;return S}},function(u,c,i){i.r(c),i.d(c,"observer",function(){return $r}),i.d(c,"LogicFlow",function(){return ed}),i.d(c,"h",function(){return ae.g}),i.d(c,"LogicFlowUtil",function(){return l}),i.d(c,"BaseNode",function(){return yn}),i.d(c,"RectNode",function(){return pc}),i.d(c,"CircleNode",function(){return yc}),i.d(c,"PolygonNode",function(){return bc}),i.d(c,"DiamondNode",function(){return Sc}),i.d(c,"EllipseNode",function(){return Tc}),i.d(c,"TextNode",function(){return Mc}),i.d(c,"HtmlNode",function(){return Dc}),i.d(c,"BaseEdge",function(){return Ai}),i.d(c,"LineEdge",function(){return Fc}),i.d(c,"PolylineEdge",function(){return kc}),i.d(c,"BezierEdge",function(){return Xc}),i.d(c,"Arrow",function(){return vj}),i.d(c,"BaseEdgeModel",function(){return vf}),i.d(c,"BezierEdgeModel",function(){return Gf}),i.d(c,"LineEdgeModel",function(){return mf}),i.d(c,"PolylineEdgeModel",function(){return Ef}),i.d(c,"BaseNodeModel",function(){return hn}),i.d(c,"CircleNodeModel",function(){return Uf}),i.d(c,"DiamondNodeModel",function(){return Wf}),i.d(c,"EllipseNodeModel",function(){return Kf}),i.d(c,"PolygonNodeModel",function(){return Qf}),i.d(c,"RectNodeModel",function(){return tc}),i.d(c,"TextNodeModel",function(){return nc}),i.d(c,"HtmlNodeModel",function(){return ic}),i.d(c,"EditConfigModel",function(){return lp}),i.d(c,"GraphModel",function(){return iv}),i.d(c,"SnaplineModel",function(){return ig}),i.d(c,"Keyboard",function(){return cm}),i.d(c,"get",function(){return Fv}),i.d(c,"defaults",function(){return Hv}),i.d(c,"ElementState",function(){return Ot}),i.d(c,"ModelType",function(){return ht}),i.d(c,"ElementType",function(){return Ft}),i.d(c,"EventType",function(){return ot});var l={};i.r(l),i.d(l,"createUuid",function(){return _n}),i.d(l,"refreshGraphId",function(){return EP}),i.d(l,"createDrag",function(){return MT}),i.d(l,"StepDrag",function(){return cn});var s=i(0),y=i(10);if(!y.j)throw new Error("mobx-react-lite requires React with Hooks support");if(!s.H)throw new Error("mobx-react-lite requires mobx at least version 4 to be available");var b=i(42),x=Object(b.b)("observerBatching");function S(e){e()}function T(e){e||(e=S),Object(s.n)({reactionScheduler:e}),Object(b.a)()[x]=!0}function N(e){return Object(s.t)(e)}function A(e){var r={cleanAt:Date.now()+R,reaction:e};return r}var R=1e4,I=1e4,_=new Set,F;function Y(){F===void 0&&(F=setTimeout(ue,I))}function V(e){_.add(e),Y()}function ce(e){_.delete(e)}function ue(){F=void 0;var e=Date.now();_.forEach(function(r){var t=r.current;t&&e>=t.cleanAt&&(t.reaction.dispose(),r.current=null,_.delete(r))}),_.size>0&&Y()}var te=!1,q=[];function ee(e){return function(){te?q.push(e):e()}}function B(e){te=!0,q=[];try{var r=e();te=!1;var t=q.length>0?q:void 0;return y.d.useLayoutEffect(function(){t&&t.forEach(function(n){return n()})},[t]),r}finally{te=!1}}var X={};function P(e){return"observer"+e}function w(e,r,t){r===void 0&&(r="observed"),t===void 0&&(t=X);var n=t.useForceUpdate||b.d,o=n(),a=ee(o),f=y.d.useRef(null);if(!f.current){var p=new s.c(P(r),function(){g.mounted?a():(p.dispose(),f.current=null)}),g=A(p);f.current=g,V(f)}var O=f.current.reaction;return y.d.useDebugValue(O,N),y.d.useEffect(function(){return ce(f),f.current?f.current.mounted=!0:(f.current={reaction:new s.c(P(r),function(){a()}),cleanAt:1/0},a()),function(){f.current.reaction.dispose(),f.current=null}},[]),B(function(){var M,j;if(O.track(function(){try{M=e()}catch(z){j=z}}),j)throw j;return M})}var D=function(){return D=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++){r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},D.apply(this,arguments)};function k(e,r){var t=D({forwardRef:!1},r),n=e.displayName||e.name,o=function(f,p){return w(function(){return e(f,p)},n)};o.displayName=n;var a;return t.forwardRef?a=Object(y.f)(Object(y.e)(o)):a=Object(y.f)(o),se(e,a),a.displayName=n,a}var K={$$typeof:!0,render:!0,compare:!0,type:!0};function se(e,r){Object.keys(e).forEach(function(t){K[t]||Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))})}function Pe(e){var r=e.children,t=e.render,n=r||t;return typeof n!="function"?null:w(n)}Pe.propTypes={children:ve,render:ve},Pe.displayName="Observer";function ve(e,r,t,n,o){var a=r==="children"?"render":"children",f=typeof e[r]=="function",p=typeof e[a]=="function";return f&&p?new Error("MobX Observer: Do not use children and render in the same time in`"+t):f||p?null:new Error("Invalid prop `"+o+"` of type `"+typeof e[r]+"` supplied to `"+t+"`, expected `function`.")}T(y.g);var me=0;function be(e){if(typeof Symbol=="function")return Symbol(e);var r="__$mobx-react "+e+" ("+me+")";return me++,r}var Oe={};function we(e){return Oe[e]||(Oe[e]=be(e)),Oe[e]}function ze(e,r){if(Ye(e,r))return!0;if(typeof e!="object"||e===null||typeof r!="object"||r===null)return!1;var t=Object.keys(e),n=Object.keys(r);if(t.length!==n.length)return!1;for(var o=0;o<t.length;o++)if(!Object.hasOwnProperty.call(r,t[o])||!Ye(e[t[o]],r[t[o]]))return!1;return!0}function Ye(e,r){return e===r?e!==0||1/e===1/r:e!==e&&r!==r}function Le(e,r,t){Object.hasOwnProperty.call(e,r)?e[r]=t:Object.defineProperty(e,r,{enumerable:!1,configurable:!0,writable:!0,value:t})}var Se=we("patchMixins"),Fe=we("patchedDefinition");function He(e,r){var t=e[Se]=e[Se]||{},n=t[r]=t[r]||{};return n.locks=n.locks||0,n.methods=n.methods||[],n}function G(e,r){for(var t=this,n=arguments.length,o=new Array(n>2?n-2:0),a=2;a<n;a++)o[a-2]=arguments[a];r.locks++;try{var f;return e!=null&&(f=e.apply(this,o)),f}finally{r.locks--,r.locks===0&&r.methods.forEach(function(p){p.apply(t,o)})}}function L(e,r){var t=function(){for(var o=arguments.length,a=new Array(o),f=0;f<o;f++)a[f]=arguments[f];G.call.apply(G,[this,e,r].concat(a))};return t}function W(e,r,t){var n=He(e,r);n.methods.indexOf(t)<0&&n.methods.push(t);var o=Object.getOwnPropertyDescriptor(e,r);if(!(o&&o[Fe])){var a=e[r],f=fe(e,r,o?o.enumerable:void 0,n,a);Object.defineProperty(e,r,f)}}function fe(e,r,t,n,o){var a,f=L(o,n);return a={},a[Fe]=!0,a.get=function(){return f},a.set=function(g){if(this===e)f=L(g,n);else{var O=fe(this,r,t,n,g);Object.defineProperty(this,r,O)}},a.configurable=!0,a.enumerable=t,a}var ge=s.a||"$mobx",de=we("isMobXReactObserver"),Ie=we("isUnmounted"),Ve=we("skipRender"),We=we("isForcingUpdate");function qe(e){var r=e.prototype;if(e[de]){var t=ye(r);console.warn("The provided component class ("+t+`)
- has already been declared as an observer component.`)}else e[de]=!0;if(r.componentWillReact)throw new Error("The componentWillReact life-cycle event is no longer supported");if(e.__proto__!==y.b){if(!r.shouldComponentUpdate)r.shouldComponentUpdate=Ze;else if(r.shouldComponentUpdate!==Ze)throw new Error("It is not allowed to use shouldComponentUpdate in observer based components.")}Ge(r,"props"),Ge(r,"state");var n=r.render;return r.render=function(){return lt.call(this,n)},W(r,"componentWillUnmount",function(){var o;if((o=this.render[ge])===null||o===void 0||o.dispose(),this[Ie]=!0,!this.render[ge]){var a=ye(this);console.warn("The reactive render of an observer class component ("+a+`)
- was overriden after MobX attached. This may result in a memory leak if the
- overriden reactive render was not properly disposed.`)}}),e}function ye(e){return e.displayName||e.name||e.constructor&&(e.constructor.displayName||e.constructor.name)||"<component>"}function lt(e){var r=this;Le(this,Ve,!1),Le(this,We,!1);var t=ye(this),n=e.bind(this),o=!1,a=new s.c(t+".render()",function(){if(!o&&(o=!0,r[Ie]!==!0)){var p=!0;try{Le(r,We,!0),r[Ve]||y.a.prototype.forceUpdate.call(r),p=!1}finally{Le(r,We,!1),p&&a.dispose()}}});a.reactComponent=this,f[ge]=a,this.render=f;function f(){o=!1;var p=void 0,g=void 0;if(a.track(function(){try{g=Object(s.d)(!1,n)}catch(O){p=O}}),p)throw p;return g}return f.call(this)}function Ze(e,r){return this.state!==r?!0:!ze(this.props,e)}function Ge(e,r){var t=we("reactProp_"+r+"_valueHolder"),n=we("reactProp_"+r+"_atomHolder");function o(){return this[n]||Le(this,n,Object(s.o)("reactive "+r)),this[n]}Object.defineProperty(e,r,{configurable:!0,enumerable:!0,get:function(){var f=!1;return s.f&&s.e&&(f=Object(s.f)(!0)),o.call(this).reportObserved(),s.f&&s.e&&Object(s.e)(f),this[t]},set:function(f){!this[We]&&!ze(this[t],f)?(Le(this,t,f),Le(this,Ve,!0),o.call(this).reportChanged(),Le(this,Ve,!1)):Le(this,t,f)}})}var et=typeof Symbol=="function"&&Symbol.for,St=et?Symbol.for("react.forward_ref"):typeof y.e=="function"&&Object(y.e)(function(e){return null}).$$typeof,st=et?Symbol.for("react.memo"):typeof y.f=="function"&&Object(y.f)(function(e){return null}).$$typeof;function gt(e){if(e.isMobxInjector===!0&&console.warn("Mobx observer: You are trying to use 'observer' on a component that already has 'inject'. Please apply 'observer' before applying 'inject'"),st&&e.$$typeof===st)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(St&&e.$$typeof===St){var r=e.render;if(typeof r!="function")throw new Error("render property of ForwardRef was not a function");return Object(y.e)(function(){var n=arguments;return Object(y.c)(Pe,null,function(){return r.apply(void 0,n)})})}return typeof e=="function"&&(!e.prototype||!e.prototype.render)&&!e.isReactClass&&!Object.prototype.isPrototypeOf.call(y.a,e)?k(e):qe(e)}if(!y.a)throw new Error("mobx-react requires React to be available");if(!s.C)throw new Error("mobx-react requires mobx to be available");var ae=i(1);i(3),i(60),i(2),i(6),i(4),i(11),i(41),i(23),i(20),i(5),i(22),i(21),i(24),i(8),i(9),i(17),i(25),i(19),i(29),i(187),i(192),i(103),i(152),i(153);function jt(e,r){for(var t=-1,n=e==null?0:e.length,o=Array(n);++t<n;)o[t]=r(e[t],t,e);return o}var Pt=jt;function bt(){this.__data__=[],this.size=0}var Kt=bt;function gr(e,r){return e===r||e!==e&&r!==r}var Qt=gr;function wr(e,r){for(var t=e.length;t--;)if(Qt(e[t][0],r))return t;return-1}var nt=wr,Tt=Array.prototype,ar=Tt.splice;function Re(e){var r=this.__data__,t=nt(r,e);if(t<0)return!1;var n=r.length-1;return t==n?r.pop():ar.call(r,t,1),--this.size,!0}var Ke=Re;function at(e){var r=this.__data__,t=nt(r,e);return t<0?void 0:r[t][1]}var tt=at;function ct(e){return nt(this.__data__,e)>-1}var U=ct;function Q(e,r){var t=this.__data__,n=nt(t,e);return n<0?(++this.size,t.push([e,r])):t[n][1]=r,this}var re=Q;function ne(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}ne.prototype.clear=Kt,ne.prototype.delete=Ke,ne.prototype.get=tt,ne.prototype.has=U,ne.prototype.set=re;var Me=ne;function je(){this.__data__=new Me,this.size=0}var Xe=je;function yt(e){var r=this.__data__,t=r.delete(e);return this.size=r.size,t}var qt=yt;function er(e){return this.__data__.get(e)}var Yn=er;function Ur(e){return this.__data__.has(e)}var Gi=Ur,Mr=i(31),ki=Mr.a.Symbol,cr=ki,En=Object.prototype,Wn=En.hasOwnProperty,ln=En.toString,Vn=cr?cr.toStringTag:void 0;function Sn(e){var r=Wn.call(e,Vn),t=e[Vn];try{e[Vn]=void 0;var n=!0}catch{}var o=ln.call(e);return n&&(r?e[Vn]=t:delete e[Vn]),o}var xn=Sn,ho=Object.prototype,ts=ho.toString;function vo(e){return ts.call(e)}var yo=vo,$i="[object Null]",ke="[object Undefined]",Ui=cr?cr.toStringTag:void 0;function rs(e){return e==null?e===void 0?ke:$i:Ui&&Ui in Object(e)?xn(e):yo(e)}var Xr=rs;function Xi(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}var wt=Xi,mr="[object AsyncFunction]",Yi="[object Function]",ns="[object GeneratorFunction]",os="[object Proxy]";function is(e){if(!wt(e))return!1;var r=Xr(e);return r==Yi||r==ns||r==mr||r==os}var go=is,Wi=Mr.a["__core-js_shared__"],sn=Wi,ti=function(){var e=/[^.]+$/.exec(sn&&sn.keys&&sn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function ri(e){return!!ti&&ti in e}var Vi=ri,as=Function.prototype,mo=as.toString;function us(e){if(e!=null){try{return mo.call(e)}catch{}try{return e+""}catch{}}return""}var Ct=us,hd=/[\\^$.*+?()[\]{}|]/g,vd=/^\[object .+?Constructor\]$/,yd=Function.prototype,Ki=Object.prototype,ls=yd.toString,Zi=Ki.hasOwnProperty,ss=RegExp("^"+ls.call(Zi).replace(hd,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function fs(e){if(!wt(e)||Vi(e))return!1;var r=go(e)?ss:vd;return r.test(Ct(e))}var Yr=fs;function cs(e,r){return e==null?void 0:e[r]}var ds=cs;function ni(e,r){var t=ds(e,r);return Yr(t)?t:void 0}var Br=ni,ps=Br(Mr.a,"Map"),Pn=ps,hs=Br(Object,"create"),Kn=hs;function vs(){this.__data__=Kn?Kn(null):{},this.size=0}var oi=vs;function Ji(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}var ys=Ji,ii="__lodash_hash_undefined__",Qi=Object.prototype,qi=Qi.hasOwnProperty;function ea(e){var r=this.__data__;if(Kn){var t=r[e];return t===ii?void 0:t}return qi.call(r,e)?r[e]:void 0}var ta=ea,gs=Object.prototype,ra=gs.hasOwnProperty;function ms(e){var r=this.__data__;return Kn?r[e]!==void 0:ra.call(r,e)}var na=ms,oa="__lodash_hash_undefined__";function bs(e,r){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=Kn&&r===void 0?oa:r,this}var Os=bs;function Tn(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}Tn.prototype.clear=oi,Tn.prototype.delete=ys,Tn.prototype.get=ta,Tn.prototype.has=na,Tn.prototype.set=Os;var wn=Tn;function Mn(){this.size=0,this.__data__={hash:new wn,map:new(Pn||Me),string:new wn}}var Es=Mn;function Ss(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}var ia=Ss;function xs(e,r){var t=e.__data__;return ia(r)?t[typeof r=="string"?"string":"hash"]:t.map}var bo=xs;function Ps(e){var r=bo(this,e).delete(e);return this.size-=r?1:0,r}var Ts=Ps;function An(e){return bo(this,e).get(e)}var Wr=An;function ws(e){return bo(this,e).has(e)}var Ms=ws;function As(e,r){var t=bo(this,e),n=t.size;return t.set(e,r),this.size+=t.size==n?0:1,this}var Ar=As;function Nn(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}Nn.prototype.clear=Es,Nn.prototype.delete=Ts,Nn.prototype.get=Wr,Nn.prototype.has=Ms,Nn.prototype.set=Ar;var Zn=Nn,Ns=200;function Oo(e,r){var t=this.__data__;if(t instanceof Me){var n=t.__data__;if(!Pn||n.length<Ns-1)return n.push([e,r]),this.size=++t.size,this;t=this.__data__=new Zn(n)}return t.set(e,r),this.size=t.size,this}var Eo=Oo;function Dn(e){var r=this.__data__=new Me(e);this.size=r.size}Dn.prototype.clear=Xe,Dn.prototype.delete=qt,Dn.prototype.get=Yn,Dn.prototype.has=Gi,Dn.prototype.set=Eo;var jn=Dn,Nr="__lodash_hash_undefined__";function Jn(e){return this.__data__.set(e,Nr),this}var Dr=Jn;function br(e){return this.__data__.has(e)}var Qn=br;function tr(e){var r=-1,t=e==null?0:e.length;for(this.__data__=new Zn;++r<t;)this.add(e[r])}tr.prototype.add=tr.prototype.push=Dr,tr.prototype.has=Qn;var Ds=tr;function js(e,r){for(var t=-1,n=e==null?0:e.length;++t<n;)if(r(e[t],t,e))return!0;return!1}var Cs=js;function aa(e,r){return e.has(r)}var Lr=aa,Rs=1,zr=2;function ua(e,r,t,n,o,a){var f=t&Rs,p=e.length,g=r.length;if(p!=g&&!(f&&g>p))return!1;var O=a.get(e),M=a.get(r);if(O&&M)return O==r&&M==e;var j=-1,z=!0,$=t&zr?new Ds:void 0;for(a.set(e,r),a.set(r,e);++j<p;){var Z=e[j],ie=r[j];if(n)var oe=f?n(ie,Z,j,r,e,a):n(Z,ie,j,e,r,a);if(oe!==void 0){if(oe)continue;z=!1;break}if($){if(!Cs(r,function(le,Ae){if(!Lr($,Ae)&&(Z===le||o(Z,le,t,n,a)))return $.push(Ae)})){z=!1;break}}else if(!(Z===ie||o(Z,ie,t,n,a))){z=!1;break}}return a.delete(e),a.delete(r),z}var la=ua,ai=Mr.a.Uint8Array,Xt=ai;function sa(e){var r=-1,t=Array(e.size);return e.forEach(function(n,o){t[++r]=[o,n]}),t}var Is=sa;function fa(e){var r=-1,t=Array(e.size);return e.forEach(function(n){t[++r]=n}),t}var dr=fa,ca=1,ui=2,da="[object Boolean]",pa="[object Date]",_s="[object Error]",ha="[object Map]",Bs="[object Number]",Ls="[object RegExp]",Or="[object Set]",jr="[object String]",qn="[object Symbol]",zs="[object ArrayBuffer]",va="[object DataView]",So=cr?cr.prototype:void 0,eo=So?So.valueOf:void 0;function ya(e,r,t,n,o,a,f){switch(t){case va:if(e.byteLength!=r.byteLength||e.byteOffset!=r.byteOffset)return!1;e=e.buffer,r=r.buffer;case zs:return!(e.byteLength!=r.byteLength||!a(new Xt(e),new Xt(r)));case da:case pa:case Bs:return Qt(+e,+r);case _s:return e.name==r.name&&e.message==r.message;case Ls:case jr:return e==r+"";case ha:var p=Is;case Or:var g=n&ca;if(p||(p=dr),e.size!=r.size&&!g)return!1;var O=f.get(e);if(O)return O==r;n|=ui,f.set(e,r);var M=la(p(e),p(r),n,o,a,f);return f.delete(e),M;case qn:if(eo)return eo.call(e)==eo.call(r)}return!1}var Fs=ya;function xo(e,r){for(var t=-1,n=r.length,o=e.length;++t<n;)e[o+t]=r[t];return e}var li=xo,ga=Array.isArray,d=ga;function h(e,r,t){var n=r(e);return d(e)?n:li(n,t(e))}var E=h;function C(e,r){for(var t=-1,n=e==null?0:e.length,o=0,a=[];++t<n;){var f=e[t];r(f,t,e)&&(a[o++]=f)}return a}var H=C;function J(){return[]}var pe=J,Te=Object.prototype,$e=Te.propertyIsEnumerable,dt=Object.getOwnPropertySymbols,pt=dt?function(e){return e==null?[]:(e=Object(e),H(dt(e),function(r){return $e.call(e,r)}))}:pe,Et=pt;function xt(e,r){for(var t=-1,n=Array(e);++t<e;)n[t]=r(t);return n}var _t=xt;function Yt(e){return e!=null&&typeof e=="object"}var Mt=Yt,Er="[object Arguments]";function Cn(e){return Mt(e)&&Xr(e)==Er}var ma=Cn,ba=Object.prototype,Oa=ba.hasOwnProperty,Ea=ba.propertyIsEnumerable,si=ma(function(){return arguments}())?ma:function(e){return Mt(e)&&Oa.call(e,"callee")&&!Ea.call(e,"callee")},Rn=si,fn=i(48),Ab=9007199254740991,Nb=/^(?:0|[1-9]\d*)$/;function Db(e,r){var t=typeof e;return r=r==null?Ab:r,!!r&&(t=="number"||t!="symbol"&&Nb.test(e))&&e>-1&&e%1==0&&e<r}var Sa=Db,jb=9007199254740991;function Cb(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=jb}var Hs=Cb,Rb="[object Arguments]",Ib="[object Array]",_b="[object Boolean]",Bb="[object Date]",Lb="[object Error]",zb="[object Function]",Fb="[object Map]",Hb="[object Number]",Gb="[object Object]",kb="[object RegExp]",$b="[object Set]",Ub="[object String]",Xb="[object WeakMap]",Yb="[object ArrayBuffer]",Wb="[object DataView]",Vb="[object Float32Array]",Kb="[object Float64Array]",Zb="[object Int8Array]",Jb="[object Int16Array]",Qb="[object Int32Array]",qb="[object Uint8Array]",eO="[object Uint8ClampedArray]",tO="[object Uint16Array]",rO="[object Uint32Array]",Nt={};Nt[Vb]=Nt[Kb]=Nt[Zb]=Nt[Jb]=Nt[Qb]=Nt[qb]=Nt[eO]=Nt[tO]=Nt[rO]=!0,Nt[Rb]=Nt[Ib]=Nt[Yb]=Nt[_b]=Nt[Wb]=Nt[Bb]=Nt[Lb]=Nt[zb]=Nt[Fb]=Nt[Hb]=Nt[Gb]=Nt[kb]=Nt[$b]=Nt[Ub]=Nt[Xb]=!1;function nO(e){return Mt(e)&&Hs(e.length)&&!!Nt[Xr(e)]}var oO=nO;function iO(e){return function(r){return e(r)}}var Gs=iO,Po=i(49),gd=Po.a&&Po.a.isTypedArray,aO=gd?Gs(gd):oO,ks=aO,uO=Object.prototype,lO=uO.hasOwnProperty;function sO(e,r){var t=d(e),n=!t&&Rn(e),o=!t&&!n&&Object(fn.a)(e),a=!t&&!n&&!o&&ks(e),f=t||n||o||a,p=f?_t(e.length,String):[],g=p.length;for(var O in e)(r||lO.call(e,O))&&!(f&&(O=="length"||o&&(O=="offset"||O=="parent")||a&&(O=="buffer"||O=="byteLength"||O=="byteOffset")||Sa(O,g)))&&p.push(O);return p}var md=sO,fO=Object.prototype;function cO(e){var r=e&&e.constructor,t=typeof r=="function"&&r.prototype||fO;return e===t}var xa=cO;function dO(e,r){return function(t){return e(r(t))}}var bd=dO,pO=bd(Object.keys,Object),hO=pO,vO=Object.prototype,yO=vO.hasOwnProperty;function gO(e){if(!xa(e))return hO(e);var r=[];for(var t in Object(e))yO.call(e,t)&&t!="constructor"&&r.push(t);return r}var mO=gO;function bO(e){return e!=null&&Hs(e.length)&&!go(e)}var to=bO;function OO(e){return to(e)?md(e):mO(e)}var To=OO;function EO(e){return E(e,To,Et)}var $s=EO,SO=1,xO=Object.prototype,PO=xO.hasOwnProperty;function TO(e,r,t,n,o,a){var f=t&SO,p=$s(e),g=p.length,O=$s(r),M=O.length;if(g!=M&&!f)return!1;for(var j=g;j--;){var z=p[j];if(!(f?z in r:PO.call(r,z)))return!1}var $=a.get(e),Z=a.get(r);if($&&Z)return $==r&&Z==e;var ie=!0;a.set(e,r),a.set(r,e);for(var oe=f;++j<g;){z=p[j];var le=e[z],Ae=r[z];if(n)var Ce=f?n(Ae,le,z,r,e,a):n(le,Ae,z,e,r,a);if(!(Ce===void 0?le===Ae||o(le,Ae,t,n,a):Ce)){ie=!1;break}oe||(oe=z=="constructor")}if(ie&&!oe){var Ee=e.constructor,Be=r.constructor;Ee!=Be&&"constructor"in e&&"constructor"in r&&!(typeof Ee=="function"&&Ee instanceof Ee&&typeof Be=="function"&&Be instanceof Be)&&(ie=!1)}return a.delete(e),a.delete(r),ie}var wO=TO,MO=Br(Mr.a,"DataView"),Us=MO,AO=Br(Mr.a,"Promise"),Xs=AO,NO=Br(Mr.a,"Set"),Ys=NO,DO=Br(Mr.a,"WeakMap"),Ws=DO,Od="[object Map]",jO="[object Object]",Ed="[object Promise]",Sd="[object Set]",xd="[object WeakMap]",Pd="[object DataView]",CO=Ct(Us),RO=Ct(Pn),IO=Ct(Xs),_O=Ct(Ys),BO=Ct(Ws),ro=Xr;(Us&&ro(new Us(new ArrayBuffer(1)))!=Pd||Pn&&ro(new Pn)!=Od||Xs&&ro(Xs.resolve())!=Ed||Ys&&ro(new Ys)!=Sd||Ws&&ro(new Ws)!=xd)&&(ro=function(e){var r=Xr(e),t=r==jO?e.constructor:void 0,n=t?Ct(t):"";if(n)switch(n){case CO:return Pd;case RO:return Od;case IO:return Ed;case _O:return Sd;case BO:return xd}return r});var fi=ro,LO=1,Td="[object Arguments]",wd="[object Array]",Pa="[object Object]",zO=Object.prototype,Md=zO.hasOwnProperty;function FO(e,r,t,n,o,a){var f=d(e),p=d(r),g=f?wd:fi(e),O=p?wd:fi(r);g=g==Td?Pa:g,O=O==Td?Pa:O;var M=g==Pa,j=O==Pa,z=g==O;if(z&&Object(fn.a)(e)){if(!Object(fn.a)(r))return!1;f=!0,M=!1}if(z&&!M)return a||(a=new jn),f||ks(e)?la(e,r,t,n,o,a):Fs(e,r,g,t,n,o,a);if(!(t&LO)){var $=M&&Md.call(e,"__wrapped__"),Z=j&&Md.call(r,"__wrapped__");if($||Z){var ie=$?e.value():e,oe=Z?r.value():r;return a||(a=new jn),o(ie,oe,t,n,a)}}return z?(a||(a=new jn),wO(e,r,t,n,o,a)):!1}var HO=FO;function Ad(e,r,t,n,o){return e===r?!0:e==null||r==null||!Mt(e)&&!Mt(r)?e!==e&&r!==r:HO(e,r,t,n,Ad,o)}var Vs=Ad,GO=1,kO=2;function $O(e,r,t,n){var o=t.length,a=o,f=!n;if(e==null)return!a;for(e=Object(e);o--;){var p=t[o];if(f&&p[2]?p[1]!==e[p[0]]:!(p[0]in e))return!1}for(;++o<a;){p=t[o];var g=p[0],O=e[g],M=p[1];if(f&&p[2]){if(O===void 0&&!(g in e))return!1}else{var j=new jn;if(n)var z=n(O,M,g,e,r,j);if(!(z===void 0?Vs(M,O,GO|kO,n,j):z))return!1}}return!0}var UO=$O;function XO(e){return e===e&&!wt(e)}var Nd=XO;function YO(e){for(var r=To(e),t=r.length;t--;){var n=r[t],o=e[n];r[t]=[n,o,Nd(o)]}return r}var WO=YO;function VO(e,r){return function(t){return t==null?!1:t[e]===r&&(r!==void 0||e in Object(t))}}var Dd=VO;function KO(e){var r=WO(e);return r.length==1&&r[0][2]?Dd(r[0][0],r[0][1]):function(t){return t===e||UO(t,e,r)}}var ZO=KO,JO="[object Symbol]";function QO(e){return typeof e=="symbol"||Mt(e)&&Xr(e)==JO}var Ta=QO,qO=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,eE=/^\w*$/;function tE(e,r){if(d(e))return!1;var t=typeof e;return t=="number"||t=="symbol"||t=="boolean"||e==null||Ta(e)?!0:eE.test(e)||!qO.test(e)||r!=null&&e in Object(r)}var Ks=tE,rE="Expected a function";function Zs(e,r){if(typeof e!="function"||r!=null&&typeof r!="function")throw new TypeError(rE);var t=function(){var n=arguments,o=r?r.apply(this,n):n[0],a=t.cache;if(a.has(o))return a.get(o);var f=e.apply(this,n);return t.cache=a.set(o,f)||a,f};return t.cache=new(Zs.Cache||Zn),t}Zs.Cache=Zn;var nE=Zs,oE=500;function iE(e){var r=nE(e,function(n){return t.size===oE&&t.clear(),n}),t=r.cache;return r}var aE=iE,uE=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,lE=/\\(\\)?/g,sE=aE(function(e){var r=[];return e.charCodeAt(0)===46&&r.push(""),e.replace(uE,function(t,n,o,a){r.push(o?a.replace(lE,"$1"):n||t)}),r}),fE=sE,cE=1/0,jd=cr?cr.prototype:void 0,Cd=jd?jd.toString:void 0;function Rd(e){if(typeof e=="string")return e;if(d(e))return Pt(e,Rd)+"";if(Ta(e))return Cd?Cd.call(e):"";var r=e+"";return r=="0"&&1/e==-cE?"-0":r}var dE=Rd;function pE(e){return e==null?"":dE(e)}var hE=pE;function vE(e,r){return d(e)?e:Ks(e,r)?[e]:fE(hE(e))}var wa=vE,yE=1/0;function gE(e){if(typeof e=="string"||Ta(e))return e;var r=e+"";return r=="0"&&1/e==-yE?"-0":r}var ci=gE;function mE(e,r){r=wa(r,e);for(var t=0,n=r.length;e!=null&&t<n;)e=e[ci(r[t++])];return t&&t==n?e:void 0}var Js=mE;function bE(e,r,t){var n=e==null?void 0:Js(e,r);return n===void 0?t:n}var Id=bE;function OE(e,r){return e!=null&&r in Object(e)}var EE=OE;function SE(e,r,t){r=wa(r,e);for(var n=-1,o=r.length,a=!1;++n<o;){var f=ci(r[n]);if(!(a=e!=null&&t(e,f)))break;e=e[f]}return a||++n!=o?a:(o=e==null?0:e.length,!!o&&Hs(o)&&Sa(f,o)&&(d(e)||Rn(e)))}var xE=SE;function PE(e,r){return e!=null&&xE(e,r,EE)}var _d=PE,TE=1,wE=2;function ME(e,r){return Ks(e)&&Nd(r)?Dd(ci(e),r):function(t){var n=Id(t,e);return n===void 0&&n===r?_d(t,e):Vs(r,n,TE|wE)}}var AE=ME;function NE(e){return e}var Qs=NE;function DE(e){return function(r){return r==null?void 0:r[e]}}var jE=DE;function CE(e){return function(r){return Js(r,e)}}var RE=CE;function IE(e){return Ks(e)?jE(ci(e)):RE(e)}var _E=IE;function BE(e){return typeof e=="function"?e:e==null?Qs:typeof e=="object"?d(e)?AE(e[0],e[1]):ZO(e):_E(e)}var LE=BE;function zE(e){return function(r,t,n){for(var o=-1,a=Object(r),f=n(r),p=f.length;p--;){var g=f[e?p:++o];if(t(a[g],g,a)===!1)break}return r}}var FE=zE,HE=FE(),Bd=HE;function GE(e,r){return e&&Bd(e,r,To)}var kE=GE;function $E(e,r){return function(t,n){if(t==null)return t;if(!to(t))return e(t,n);for(var o=t.length,a=r?o:-1,f=Object(t);(r?a--:++a<o)&&n(f[a],a,f)!==!1;);return t}}var UE=$E,XE=UE(kE),YE=XE;function WE(e,r){var t=-1,n=to(e)?Array(e.length):[];return YE(e,function(o,a,f){n[++t]=r(o,a,f)}),n}var VE=WE;function KE(e,r){var t=d(e)?Pt:VE;return t(e,LE(r))}var Ma=KE,ZE=function(){try{var e=Br(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Aa=ZE;function JE(e,r,t){r=="__proto__"&&Aa?Aa(e,r,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[r]=t}var qs=JE,QE=Object.prototype,qE=QE.hasOwnProperty;function eS(e,r,t){var n=e[r];(!(qE.call(e,r)&&Qt(n,t))||t===void 0&&!(r in e))&&qs(e,r,t)}var Na=eS;function tS(e,r,t,n){var o=!t;t||(t={});for(var a=-1,f=r.length;++a<f;){var p=r[a],g=n?n(t[p],e[p],p,t,e):void 0;g===void 0&&(g=e[p]),o?qs(t,p,g):Na(t,p,g)}return t}var wo=tS;function rS(e,r,t){switch(t.length){case 0:return e.call(r);case 1:return e.call(r,t[0]);case 2:return e.call(r,t[0],t[1]);case 3:return e.call(r,t[0],t[1],t[2])}return e.apply(r,t)}var nS=rS,Ld=Math.max;function oS(e,r,t){return r=Ld(r===void 0?e.length-1:r,0),function(){for(var n=arguments,o=-1,a=Ld(n.length-r,0),f=Array(a);++o<a;)f[o]=n[r+o];o=-1;for(var p=Array(r+1);++o<r;)p[o]=n[o];return p[r]=t(f),nS(e,this,p)}}var zd=oS;function iS(e){return function(){return e}}var aS=iS,uS=Aa?function(e,r){return Aa(e,"toString",{configurable:!0,enumerable:!1,value:aS(r),writable:!0})}:Qs,lS=uS,sS=800,fS=16,cS=Date.now;function dS(e){var r=0,t=0;return function(){var n=cS(),o=fS-(n-t);if(t=n,o>0){if(++r>=sS)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}var pS=dS,hS=pS(lS),Fd=hS;function vS(e,r){return Fd(zd(e,r,Qs),e+"")}var yS=vS;function gS(e,r,t){if(!wt(t))return!1;var n=typeof r;return(n=="number"?to(t)&&Sa(r,t.length):n=="string"&&r in t)?Qt(t[r],e):!1}var mS=gS;function bS(e){return yS(function(r,t){var n=-1,o=t.length,a=o>1?t[o-1]:void 0,f=o>2?t[2]:void 0;for(a=e.length>3&&typeof a=="function"?(o--,a):void 0,f&&mS(t[0],t[1],f)&&(a=o<3?void 0:a,o=1),r=Object(r);++n<o;){var p=t[n];p&&e(r,p,n,a)}return r})}var Hd=bS,OS=Object.prototype,ES=OS.hasOwnProperty,SS=Hd(function(e,r){if(xa(r)||to(r)){wo(r,To(r),e);return}for(var t in r)ES.call(r,t)&&Na(e,t,r[t])}),ur=SS;function xS(e,r,t,n){if(!wt(e))return e;r=wa(r,e);for(var o=-1,a=r.length,f=a-1,p=e;p!=null&&++o<a;){var g=ci(r[o]),O=t;if(g==="__proto__"||g==="constructor"||g==="prototype")return e;if(o!=f){var M=p[g];O=n?n(M,g,p):void 0,O===void 0&&(O=wt(M)?M:Sa(r[o+1])?[]:{})}Na(p,g,O),p=p[g]}return e}var PS=xS;function TS(e,r,t){for(var n=-1,o=r.length,a={};++n<o;){var f=r[n],p=Js(e,f);t(p,f)&&PS(a,wa(f,e),p)}return a}var wS=TS;function MS(e,r){return wS(e,r,function(t,n){return _d(e,n)})}var AS=MS,Gd=cr?cr.isConcatSpreadable:void 0;function NS(e){return d(e)||Rn(e)||!!(Gd&&e&&e[Gd])}var DS=NS;function kd(e,r,t,n,o){var a=-1,f=e.length;for(t||(t=DS),o||(o=[]);++a<f;){var p=e[a];r>0&&t(p)?r>1?kd(p,r-1,t,n,o):li(o,p):n||(o[o.length]=p)}return o}var jS=kd;function CS(e){var r=e==null?0:e.length;return r?jS(e,1):[]}var RS=CS;function IS(e){return Fd(zd(e,void 0,RS),e+"")}var _S=IS,BS=_S(function(e,r){return e==null?{}:AS(e,r)}),di=BS,Rt,$d,Ud,Xd,Yd,Wd,Vd,Kd,Zd,Jd,Qd,qd,ep,tp,rp,np,op,ip;function Zt(e,r,t,n){!t||Object.defineProperty(e,r,{enumerable:t.enumerable,configurable:t.configurable,writable:t.writable,value:t.initializer?t.initializer.call(n):void 0})}function LS(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function ap(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function zS(e,r,t){return r&&ap(e.prototype,r),t&&ap(e,t),e}function up(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Wt(e,r,t,n,o){var a={};return Object.keys(n).forEach(function(f){a[f]=n[f]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=t.slice().reverse().reduce(function(f,p){return p(e,r,f)||f},a),o&&a.initializer!==void 0&&(a.value=a.initializer?a.initializer.call(o):void 0,a.initializer=void 0),a.initializer===void 0&&(Object.defineProperty(e,r,a),a=null),a}var FS={stopZoomGraph:!1,stopScrollGraph:!1,stopMoveGraph:!1,adjustEdge:!1,adjustEdgeStartAndEnd:!1,adjustNodePosition:!1,hideAnchors:!0,nodeSelectedOutline:!0,nodeTextEdit:!1,edgeTextEdit:!1,nodeTextDraggable:!1,edgeTextDraggable:!1},ef=["isSilentMode","stopZoomGraph","stopScrollGraph","stopMoveGraph","adjustEdge","adjustEdgeMiddle","adjustEdgeStartAndEnd","adjustNodePosition","hideAnchors","hoverOutline","nodeSelectedOutline","edgeSelectedOutline","nodeTextEdit","edgeTextEdit","nodeTextDraggable","edgeTextDraggable","multipleSelectKey","autoExpand"],lp=(Rt=function(){function e(r){LS(this,e),Zt(this,"isSilentMode",$d,this),Zt(this,"stopZoomGraph",Ud,this),Zt(this,"stopScrollGraph",Xd,this),Zt(this,"stopMoveGraph",Yd,this),Zt(this,"adjustEdge",Wd,this),Zt(this,"adjustEdgeMiddle",Vd,this),Zt(this,"adjustEdgeStartAndEnd",Kd,this),Zt(this,"adjustNodePosition",Zd,this),Zt(this,"hideAnchors",Jd,this),Zt(this,"hoverOutline",Qd,this),Zt(this,"nodeSelectedOutline",qd,this),Zt(this,"edgeSelectedOutline",ep,this),Zt(this,"nodeTextEdit",tp,this),Zt(this,"edgeTextEdit",rp,this),Zt(this,"nodeTextDraggable",np,this),Zt(this,"edgeTextDraggable",op,this),Zt(this,"autoExpand",ip,this),up(this,"multipleSelectKey",""),up(this,"defaultConfig",{}),ur(this,this.getConfigDetail(r))}return zS(e,[{key:"updateEditConfig",value:function(t){var n=this.getConfigDetail(t);ur(this,n)}},{key:"getConfigDetail",value:function(t){var n=t.isSilentMode,o=t.textEdit,a={};if(n===!1&&ur(a,this.defaultConfig),n===!0){var f=di(FS,ef);this.defaultConfig={stopZoomGraph:this.stopZoomGraph,stopScrollGraph:this.stopScrollGraph,stopMoveGraph:this.stopMoveGraph,adjustEdge:this.adjustEdge,adjustEdgeMiddle:this.adjustEdgeMiddle,adjustEdgeStartAndEnd:this.adjustEdgeStartAndEnd,adjustNodePosition:this.adjustNodePosition,hideAnchors:this.hideAnchors,hoverOutline:this.hoverOutline,nodeSelectedOutline:this.nodeSelectedOutline,edgeSelectedOutline:this.edgeSelectedOutline,nodeTextEdit:this.nodeTextEdit,edgeTextEdit:this.edgeTextEdit,nodeTextDraggable:this.nodeTextDraggable,edgeTextDraggable:this.edgeTextDraggable,autoExpand:this.autoExpand},ur(a,f)}o===!1&&ur(a,{nodeTextEdit:!1,edgeTextEdit:!1});var p=di(t,ef);return ur(a,p)}},{key:"getConfig",value:function(){return di(this,ef)}}]),e}(),$d=Wt(Rt.prototype,"isSilentMode",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Ud=Wt(Rt.prototype,"stopZoomGraph",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Xd=Wt(Rt.prototype,"stopScrollGraph",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Yd=Wt(Rt.prototype,"stopMoveGraph",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Wd=Wt(Rt.prototype,"adjustEdge",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Vd=Wt(Rt.prototype,"adjustEdgeMiddle",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Kd=Wt(Rt.prototype,"adjustEdgeStartAndEnd",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Zd=Wt(Rt.prototype,"adjustNodePosition",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Jd=Wt(Rt.prototype,"hideAnchors",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Qd=Wt(Rt.prototype,"hoverOutline",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),qd=Wt(Rt.prototype,"nodeSelectedOutline",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),ep=Wt(Rt.prototype,"edgeSelectedOutline",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),tp=Wt(Rt.prototype,"nodeTextEdit",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),rp=Wt(Rt.prototype,"edgeTextEdit",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),np=Wt(Rt.prototype,"nodeTextDraggable",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),op=Wt(Rt.prototype,"edgeTextDraggable",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),ip=Wt(Rt.prototype,"autoExpand",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Wt(Rt.prototype,"updateEditConfig",[s.k],Object.getOwnPropertyDescriptor(Rt.prototype,"updateEditConfig"),Rt.prototype),Rt);i(63);var Ot;(function(e){e[e.DEFAULT=1]="DEFAULT",e[e.TEXT_EDIT=2]="TEXT_EDIT",e[e.SHOW_MENU=3]="SHOW_MENU",e[e.ALLOW_CONNECT=4]="ALLOW_CONNECT",e[e.NOT_ALLOW_CONNECT=5]="NOT_ALLOW_CONNECT"})(Ot||(Ot={}));var sp;(function(e){e.KEY="logic-flow",e.NODE_NAME="lf-node",e.EDGE_NAME="lf-edge"})(sp||(sp={}));var ht;(function(e){e.NODE="node",e.CIRCLE_NODE="circle-node",e.POLYGON_NODE="polygon-node",e.RECT_NODE="rect-node",e.TEXT_NODE="text-node",e.ELLIPSE_NODE="ellipse-node",e.DIAMOND_NODE="diamond-node",e.HTML_NODE="html-node",e.EDGE="edge",e.LINE_EDGE="line-edge",e.POLYLINE_EDGE="polyline-edge",e.BEZIER_EDGE="bezier-edge",e.GRAPH="graph"})(ht||(ht={}));var Ft;(function(e){e.NODE="node",e.EDGE="edge",e.GRAPH="graph"})(Ft||(Ft={}));var ot;(function(e){e.ELEMENT_CLICK="element:click",e.NODE_CLICK="node:click",e.NODE_DBCLICK="node:dbclick",e.NODE_DELETE="node:delete",e.NODE_ADD="node:add",e.NODE_DND_ADD="node:dnd-add",e.NODE_DND_DRAG="node:dnd-drag",e.NODE_MOUSEDOWN="node:mousedown",e.NODE_DRAGSTART="node:dragstart",e.NODE_DRAG="node:drag",e.NODE_DROP="node:drop",e.NODE_MOUSEUP="node:mouseup",e.NODE_MOUSEMOVE="node:mousemove",e.NODE_MOUSEENTER="node:mouseenter",e.NODE_MOUSELEAVE="node:mouseleave",e.NODE_CONTEXTMENU="node:contextmenu",e.EDGE_DELETE="edge:delete",e.EDGE_ADD="edge:add",e.EDGE_CLICK="edge:click",e.EDGE_DBCLICK="edge:dbclick",e.EDGE_MOUSEENTER="edge:mouseenter",e.EDGE_MOUSELEAVE="edge:mouseleave",e.EDGE_CONTEXTMENU="edge:contextmenu",e.EDGE_ADJUST="edge:adjust",e.EDGE_EXCHANGE_NODE="edge:exchange-node",e.ANCHOR_DRAGSTART="anchor:dragstart",e.ANCHOR_DRAG="anchor:drag",e.ANCHOR_DROP="anchor:drop",e.ANCHOR_DRAGEND="anchor:dragend",e.ADJUST_POINT_MOUSEDOWN="adjustPoint:mousedown",e.ADJUST_POINT_MOUSEUP="adjustPoint:mouseup",e.ADJUST_POINT_MOUSEMOVE="adjustPoint:mousemove",e.ADJUST_POINT_DRAGSTART="adjustPoint:dragstart",e.ADJUST_POINT_DRAG="adjustPoint:drag",e.ADJUST_POINT_DROP="adjustPoint:drop",e.ADJUST_POINT_DRAGEND="adjustPoint:dragend",e.BLANK_MOUSEDOWN="blank:mousedown",e.BLANK_DRAGSTART="blank:dragstart",e.BLANK_DRAG="blank:drag",e.BLANK_DROP="blank:drop",e.BLANK_MOUSEMOVE="blank:mousemove",e.BLANK_MOUSEUP="blank:mouseup",e.BLANK_CLICK="blank:click",e.BLANK_CONTEXTMENU="blank:contextmenu",e.SELECTION_MOUSEDOWN="selection:mousedown",e.SELECTION_DRAGSTART="selection:dragstart",e.SELECTION_DRAG="selection:drag",e.SELECTION_DROP="selection:drop",e.SELECTION_MOUSEMOVE="selection:mousemove",e.SELECTION_MOUSEUP="selection:mouseup",e.SELECTION_CONTEXTMENU="selection:contextmenu",e.CONNECTION_NOT_ALLOWED="connection:not-allowed",e.HISTORY_CHANGE="history:change",e.TEXT_UPDATE="text:update",e.GRAPH_TRANSFORM="graph:transform",e.GRAPH_RENDERED="graph:rendered"})(ot||(ot={}));var Dt;(function(e){e.HORIZONTAL="horizontal",e.VERTICAL="vertical"})(Dt||(Dt={}));var HS=9999,Sr;(function(e){e[e.DEFAULT=0]="DEFAULT",e[e.INCREASE=1]="INCREASE"})(Sr||(Sr={}));var Bt,fp,cp,dp,pp,hp,vp,yp;function Da(e,r){return US(e)||$S(e,r)||kS(e,r)||GS()}function GS(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kS(e,r){if(!!e){if(typeof e=="string")return gp(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return gp(e,r)}}function gp(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function $S(e,r){var t=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,f,p;try{for(t=t.call(e);!(o=(f=t.next()).done)&&(n.push(f.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function US(e){if(Array.isArray(e))return e}function no(e,r,t,n){!t||Object.defineProperty(e,r,{enumerable:t.enumerable,configurable:t.configurable,writable:t.writable,value:t.initializer?t.initializer.call(n):void 0})}function XS(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function mp(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function YS(e,r,t){return r&&mp(e.prototype,r),t&&mp(e,t),e}function tf(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Fr(e,r,t,n,o){var a={};return Object.keys(n).forEach(function(f){a[f]=n[f]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=t.slice().reverse().reduce(function(f,p){return p(e,r,f)||f},a),o&&a.initializer!==void 0&&(a.value=a.initializer?a.initializer.call(o):void 0,a.initializer=void 0),a.initializer===void 0&&(Object.defineProperty(e,r,a),a=null),a}var WS=(Bt=function(){function e(r){XS(this,e),tf(this,"MINI_SCALE_SIZE",.2),tf(this,"MAX_SCALE_SIZE",16),no(this,"SCALE_X",fp,this),no(this,"SKEW_Y",cp,this),no(this,"SKEW_X",dp,this),no(this,"SCALE_Y",pp,this),no(this,"TRANSLATE_X",hp,this),no(this,"TRANSLATE_Y",vp,this),no(this,"ZOOM_SIZE",yp,this),tf(this,"eventCenter",void 0),this.eventCenter=r}return YS(e,[{key:"setZoomMiniSize",value:function(t){this.MINI_SCALE_SIZE=t}},{key:"setZoomMaxSize",value:function(t){this.MAX_SCALE_SIZE=t}},{key:"HtmlPointToCanvasPoint",value:function(t){var n=Da(t,2),o=n[0],a=n[1];return[(o-this.TRANSLATE_X)/this.SCALE_X,(a-this.TRANSLATE_Y)/this.SCALE_Y]}},{key:"CanvasPointToHtmlPoint",value:function(t){var n=Da(t,2),o=n[0],a=n[1];return[o*this.SCALE_X+this.TRANSLATE_X,a*this.SCALE_Y+this.TRANSLATE_Y]}},{key:"moveCanvasPointByHtml",value:function(t,n,o){var a=Da(t,2),f=a[0],p=a[1];return[f+n/this.SCALE_X,p+o/this.SCALE_Y]}},{key:"fixDeltaXY",value:function(t,n){return[t/this.SCALE_X,n/this.SCALE_Y]}},{key:"getTransformStyle",value:function(){var t=[this.SCALE_X,this.SKEW_Y,this.SKEW_X,this.SCALE_Y,this.TRANSLATE_X,this.TRANSLATE_Y].join(",");return{transform:"matrix(".concat(t,")")}}},{key:"zoom",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,n=arguments.length>1?arguments[1]:void 0,o=this.SCALE_X,a=this.SCALE_Y;return t===!0?(o+=this.ZOOM_SIZE,a+=this.ZOOM_SIZE):t===!1?(o-=this.ZOOM_SIZE,a-=this.ZOOM_SIZE):typeof t=="number"&&(o=t,a=t),o<this.MINI_SCALE_SIZE||o>this.MAX_SCALE_SIZE?"".concat(this.SCALE_X*100,"%"):(n&&(this.TRANSLATE_X-=(o-this.SCALE_X)*n[0],this.TRANSLATE_Y-=(a-this.SCALE_Y)*n[1]),this.SCALE_X=o,this.SCALE_Y=a,this.emitGraphTransform("zoom"),"".concat(this.SCALE_X*100,"%"))}},{key:"emitGraphTransform",value:function(t){this.eventCenter.emit(ot.GRAPH_TRANSFORM,{type:t,transform:{SCALE_X:this.SCALE_X,SKEW_Y:this.SKEW_Y,SKEW_X:this.SKEW_X,SCALE_Y:this.SCALE_Y,TRANSLATE_X:this.TRANSLATE_X,TRANSLATE_Y:this.TRANSLATE_Y}})}},{key:"resetZoom",value:function(){this.SCALE_X=1,this.SCALE_Y=1,this.emitGraphTransform("resetZoom")}},{key:"translate",value:function(t,n){this.TRANSLATE_X+=t,this.TRANSLATE_Y+=n,this.emitGraphTransform("translate")}},{key:"focusOn",value:function(t,n,o,a){var f=this.CanvasPointToHtmlPoint([t,n]),p=Da(f,2),g=p[0],O=p[1],M=o/2-g,j=a/2-O;this.TRANSLATE_X+=M,this.TRANSLATE_Y+=j,this.emitGraphTransform("focusOn")}}]),e}(),fp=Fr(Bt.prototype,"SCALE_X",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),cp=Fr(Bt.prototype,"SKEW_Y",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),dp=Fr(Bt.prototype,"SKEW_X",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),pp=Fr(Bt.prototype,"SCALE_Y",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),hp=Fr(Bt.prototype,"TRANSLATE_X",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),vp=Fr(Bt.prototype,"TRANSLATE_Y",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),yp=Fr(Bt.prototype,"ZOOM_SIZE",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return .04}}),Fr(Bt.prototype,"zoom",[s.k],Object.getOwnPropertyDescriptor(Bt.prototype,"zoom"),Bt.prototype),Fr(Bt.prototype,"resetZoom",[s.k],Object.getOwnPropertyDescriptor(Bt.prototype,"resetZoom"),Bt.prototype),Fr(Bt.prototype,"translate",[s.k],Object.getOwnPropertyDescriptor(Bt.prototype,"translate"),Bt.prototype),Fr(Bt.prototype,"focusOn",[s.k],Object.getOwnPropertyDescriptor(Bt.prototype,"focusOn"),Bt.prototype),Bt);function VS(e,r){for(var t=-1,n=e==null?0:e.length;++t<n&&r(e[t],t,e)!==!1;);return e}var KS=VS;function ZS(e,r){return e&&wo(r,To(r),e)}var JS=ZS;function QS(e){var r=[];if(e!=null)for(var t in Object(e))r.push(t);return r}var qS=QS,ex=Object.prototype,tx=ex.hasOwnProperty;function rx(e){if(!wt(e))return qS(e);var r=xa(e),t=[];for(var n in e)n=="constructor"&&(r||!tx.call(e,n))||t.push(n);return t}var nx=rx;function ox(e){return to(e)?md(e,!0):nx(e)}var pi=ox;function ix(e,r){return e&&wo(r,pi(r),e)}var ax=ix,bp=i(106);function ux(e,r){var t=-1,n=e.length;for(r||(r=Array(n));++t<n;)r[t]=e[t];return r}var Op=ux;function lx(e,r){return wo(e,Et(e),r)}var sx=lx,fx=bd(Object.getPrototypeOf,Object),rf=fx,cx=Object.getOwnPropertySymbols,dx=cx?function(e){for(var r=[];e;)li(r,Et(e)),e=rf(e);return r}:pe,Ep=dx;function px(e,r){return wo(e,Ep(e),r)}var hx=px;function vx(e){return E(e,pi,Ep)}var yx=vx,gx=Object.prototype,mx=gx.hasOwnProperty;function bx(e){var r=e.length,t=new e.constructor(r);return r&&typeof e[0]=="string"&&mx.call(e,"index")&&(t.index=e.index,t.input=e.input),t}var Ox=bx;function Ex(e){var r=new e.constructor(e.byteLength);return new Xt(r).set(new Xt(e)),r}var nf=Ex;function Sx(e,r){var t=r?nf(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.byteLength)}var xx=Sx,Px=/\w*$/;function Tx(e){var r=new e.constructor(e.source,Px.exec(e));return r.lastIndex=e.lastIndex,r}var wx=Tx,Sp=cr?cr.prototype:void 0,xp=Sp?Sp.valueOf:void 0;function Mx(e){return xp?Object(xp.call(e)):{}}var Ax=Mx;function Nx(e,r){var t=r?nf(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)}var Pp=Nx,Dx="[object Boolean]",jx="[object Date]",Cx="[object Map]",Rx="[object Number]",Ix="[object RegExp]",_x="[object Set]",Bx="[object String]",Lx="[object Symbol]",zx="[object ArrayBuffer]",Fx="[object DataView]",Hx="[object Float32Array]",Gx="[object Float64Array]",kx="[object Int8Array]",$x="[object Int16Array]",Ux="[object Int32Array]",Xx="[object Uint8Array]",Yx="[object Uint8ClampedArray]",Wx="[object Uint16Array]",Vx="[object Uint32Array]";function Kx(e,r,t){var n=e.constructor;switch(r){case zx:return nf(e);case Dx:case jx:return new n(+e);case Fx:return xx(e,t);case Hx:case Gx:case kx:case $x:case Ux:case Xx:case Yx:case Wx:case Vx:return Pp(e,t);case Cx:return new n;case Rx:case Bx:return new n(e);case Ix:return wx(e);case _x:return new n;case Lx:return Ax(e)}}var Zx=Kx,Tp=Object.create,Jx=function(){function e(){}return function(r){if(!wt(r))return{};if(Tp)return Tp(r);e.prototype=r;var t=new e;return e.prototype=void 0,t}}(),Qx=Jx;function qx(e){return typeof e.constructor=="function"&&!xa(e)?Qx(rf(e)):{}}var wp=qx,e0="[object Map]";function t0(e){return Mt(e)&&fi(e)==e0}var r0=t0,Mp=Po.a&&Po.a.isMap,n0=Mp?Gs(Mp):r0,o0=n0,i0="[object Set]";function a0(e){return Mt(e)&&fi(e)==i0}var u0=a0,Ap=Po.a&&Po.a.isSet,l0=Ap?Gs(Ap):u0,s0=l0,f0=1,c0=2,d0=4,Np="[object Arguments]",p0="[object Array]",h0="[object Boolean]",v0="[object Date]",y0="[object Error]",Dp="[object Function]",g0="[object GeneratorFunction]",m0="[object Map]",b0="[object Number]",jp="[object Object]",O0="[object RegExp]",E0="[object Set]",S0="[object String]",x0="[object Symbol]",P0="[object WeakMap]",T0="[object ArrayBuffer]",w0="[object DataView]",M0="[object Float32Array]",A0="[object Float64Array]",N0="[object Int8Array]",D0="[object Int16Array]",j0="[object Int32Array]",C0="[object Uint8Array]",R0="[object Uint8ClampedArray]",I0="[object Uint16Array]",_0="[object Uint32Array]",At={};At[Np]=At[p0]=At[T0]=At[w0]=At[h0]=At[v0]=At[M0]=At[A0]=At[N0]=At[D0]=At[j0]=At[m0]=At[b0]=At[jp]=At[O0]=At[E0]=At[S0]=At[x0]=At[C0]=At[R0]=At[I0]=At[_0]=!0,At[y0]=At[Dp]=At[P0]=!1;function ja(e,r,t,n,o,a){var f,p=r&f0,g=r&c0,O=r&d0;if(t&&(f=o?t(e,n,o,a):t(e)),f!==void 0)return f;if(!wt(e))return e;var M=d(e);if(M){if(f=Ox(e),!p)return Op(e,f)}else{var j=fi(e),z=j==Dp||j==g0;if(Object(fn.a)(e))return Object(bp.a)(e,p);if(j==jp||j==Np||z&&!o){if(f=g||z?{}:wp(e),!p)return g?hx(e,ax(f,e)):sx(e,JS(f,e))}else{if(!At[j])return o?e:{};f=Zx(e,j,p)}}a||(a=new jn);var $=a.get(e);if($)return $;a.set(e,f),s0(e)?e.forEach(function(oe){f.add(ja(oe,r,t,oe,e,a))}):o0(e)&&e.forEach(function(oe,le){f.set(le,ja(oe,r,t,le,e,a))});var Z=O?g?yx:$s:g?pi:To,ie=M?void 0:Z(e);return KS(ie||e,function(oe,le){ie&&(le=oe,oe=e[le]),Na(f,le,ja(oe,r,t,le,e,a))}),f}var B0=ja,L0=1,z0=4;function F0(e){return B0(e,L0|z0)}var It=F0;function H0(e,r,t){(t!==void 0&&!Qt(e[r],t)||t===void 0&&!(r in e))&&qs(e,r,t)}var of=H0;function G0(e){return Mt(e)&&to(e)}var k0=G0,$0="[object Object]",U0=Function.prototype,X0=Object.prototype,Cp=U0.toString,Y0=X0.hasOwnProperty,W0=Cp.call(Object);function V0(e){if(!Mt(e)||Xr(e)!=$0)return!1;var r=rf(e);if(r===null)return!0;var t=Y0.call(r,"constructor")&&r.constructor;return typeof t=="function"&&t instanceof t&&Cp.call(t)==W0}var K0=V0;function Z0(e,r){if(!(r==="constructor"&&typeof e[r]=="function")&&r!="__proto__")return e[r]}var af=Z0;function J0(e){return wo(e,pi(e))}var Q0=J0;function q0(e,r,t,n,o,a,f){var p=af(e,t),g=af(r,t),O=f.get(g);if(O){of(e,t,O);return}var M=a?a(p,g,t+"",e,r,f):void 0,j=M===void 0;if(j){var z=d(g),$=!z&&Object(fn.a)(g),Z=!z&&!$&&ks(g);M=g,z||$||Z?d(p)?M=p:k0(p)?M=Op(p):$?(j=!1,M=Object(bp.a)(g,!0)):Z?(j=!1,M=Pp(g,!0)):M=[]:K0(g)||Rn(g)?(M=p,Rn(p)?M=Q0(p):(!wt(p)||go(p))&&(M=wp(g))):j=!1}j&&(f.set(g,M),o(M,g,n,a,f),f.delete(g)),of(e,t,M)}var eP=q0;function Rp(e,r,t,n,o){e!==r&&Bd(r,function(a,f){if(o||(o=new jn),wt(a))eP(e,r,f,t,Rp,n,o);else{var p=n?n(af(e,f),a,f+"",e,r,o):void 0;p===void 0&&(p=a),of(e,f,p)}},pi)}var tP=Rp,rP=Hd(function(e,r,t){tP(e,r,t)}),Ip=rP,nP={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"}},_p=function(r){var t=It(nP);return r&&(t=Ip(t,r)),t};i(78),i(158);function oP(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Bp(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function iP(e,r,t){return r&&Bp(e.prototype,r),t&&Bp(e,t),e}function aP(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var uP="*",lP=function(){function e(){oP(this,e),aP(this,"_events",{})}return iP(e,[{key:"on",value:function(t,n,o){var a=this;return t==null||t.split(",").forEach(function(f){f=f.trim(),a._events[f]||(a._events[f]=[]),a._events[f].push({callback:n,once:!!o})}),this}},{key:"once",value:function(t,n){var o=this;t==null||t.split(",").forEach(function(a){return a=a.trim(),o.on(a,n,!0)})}},{key:"emit",value:function(t,n){var o=this;t==null||t.split(",").forEach(function(a){var f=o._events[a]||[],p=o._events[uP]||[],g=function(M){for(var j=M.length,z=0;z<j;z++)if(!!M[z]){var $=M[z],Z=$.callback,ie=$.once;ie&&(M.splice(z,1),M.length===0&&delete o._events[a],j--,z--),Z.apply(o,[n])}};g(f),g(p)})}},{key:"off",value:function(t,n){var o=this;return t||(this._events={}),t.split(",").forEach(function(a){if(!n)delete o._events[a];else{for(var f=o._events[a]||[],p=f.length,g=0;g<p;g++)f[g].callback===n&&(f.splice(g,1),p--,g--);f.length===0&&delete o._events[a]}}),this}},{key:"getEvents",value:function(){return this._events}}]),e}();function In(e,r){return r*Math.round(e/r)||e}function Lp(e,r){return e%r}function uf(e,r){return dP(e)||cP(e,r)||fP(e,r)||sP()}function sP(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fP(e,r){if(!!e){if(typeof e=="string")return zp(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return zp(e,r)}}function zp(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function cP(e,r){var t=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,f,p;try{for(t=t.call(e);!(o=(f=t.next()).done)&&(n.push(f.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function dP(e){if(Array.isArray(e))return e}var lf=function(r,t,n){var o=uf(r,2),a=o[0],f=o[1],p=uf(t,2),g=p[0],O=p[1],M=uf(n,2),j=M[0],z=M[1];return a>g&&a<j&&f>O&&f<z},Fp=function(r,t){var n=t.multipleSelectKey,o=!1;switch(n){case"meta":o=r.metaKey;break;case"alt":o=r.altKey;break;case"shift":o=r.shiftKey;break;case"ctrl":o=r.ctrlKey;break;default:o=!1;break}return o};i(79),i(161),i(125),i(80),i(30),i(12),i(13),i(14),i(47);var Ca,pP=new Uint8Array(16);function hP(){if(!Ca&&(Ca=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Ca))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ca(pP)}var vP=/^(?:[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;function yP(e){return typeof e=="string"&&vP.test(e)}for(var gP=yP,Jt=[],sf=0;sf<256;++sf)Jt.push((sf+256).toString(16).substr(1));function mP(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=(Jt[e[r+0]]+Jt[e[r+1]]+Jt[e[r+2]]+Jt[e[r+3]]+"-"+Jt[e[r+4]]+Jt[e[r+5]]+"-"+Jt[e[r+6]]+Jt[e[r+7]]+"-"+Jt[e[r+8]]+Jt[e[r+9]]+"-"+Jt[e[r+10]]+Jt[e[r+11]]+Jt[e[r+12]]+Jt[e[r+13]]+Jt[e[r+14]]+Jt[e[r+15]]).toLowerCase();if(!gP(t))throw TypeError("Stringified UUID is invalid");return t}var bP=mP;function OP(e,r,t){e=e||{};var n=e.random||(e.rng||hP)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,r){t=t||0;for(var o=0;o<16;++o)r[t+o]=n[o];return r}return bP(n)}var ff=OP,_n=function(){var r=ff();return r},EP=function(r){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=r.nodes.reduce(function(o,a){return o[a.id]=t+ff(),a.id=o[a.id],o},{});return r.edges.forEach(function(o){o.id=t+ff(),o.sourceNodeId=n[o.sourceNodeId],o.targetNodeId=n[o.targetNodeId]}),r};i(104),i(203);var SP=function(r,t,n,o){var a=(t.y-r.y)*(o.x-n.x)-(r.x-t.x)*(n.y-o.y);if(a===0)return!1;var f=((t.x-r.x)*(o.x-n.x)*(n.y-r.y)+(t.y-r.y)*(o.x-n.x)*r.x-(o.y-n.y)*(t.x-r.x)*n.x)/a,p=-((t.y-r.y)*(o.y-n.y)*(n.x-r.x)+(t.x-r.x)*(o.y-n.y)*r.y-(o.x-n.x)*(t.y-r.y)*n.y)/a;return(f-r.x)*(f-t.x)<=0&&(p-r.y)*(p-t.y)<=0&&(f-n.x)*(f-o.x)<=0&&(p-n.y)*(p-o.y)<=0?{x:f,y:p}:!1},hi=function(r,t,n){var o=r.x,a=r.y;return(o-t.x)*(o-n.x)<=0&&(a-t.y)*(a-n.y)<=0};function Ra(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ra=function(t){return typeof t}:Ra=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ra(e)}function Hp(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function Gp(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Hp(Object(t),!0).forEach(function(n){xP(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Hp(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function xP(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var cf=function(r){var t=r.anchors;return t},Ia=function(r,t){for(var n=t.nodes,o,a=n.length-1;a>=0;a--){var f=n[a],p=wP(r,f);if(p){var g=f.getTargetAnchor(r);if(g){var O={node:f,anchorIndex:g.index,anchor:g.anchor};(!o||PP(f,o.node,t))&&(o=O)}}}return o},PP=function(r,t,n){return r.zIndex>t.zIndex||n.nodesMap[r.id].index>n.nodesMap[t.id].index},TP=function(r,t){for(var n=cf(t),o,a=Number.MAX_SAFE_INTEGER,f=0;f<n.length;f++){var p=Vr(r.x,r.y,n[f].x,n[f].y);p<a&&(a=p,o={index:f,anchor:Gp(Gp({},n[f]),{},{x:n[f].x,y:n[f].y,id:n[f].id})})}return o},Vr=function(r,t,n,o){return Math.hypot(r-n,t-o)},Bn=function(r,t){var n=!1,o=0,a=xr(t);return r.x>=a.minX-o&&r.x<=a.maxX+o&&r.y>=a.minY-o&&r.y<=a.maxY+o&&(n=!0),n},wP=function(r,t){var n=!1,o=5,a=xr(t);return r.x>=a.minX-o&&r.x<=a.maxX+o&&r.y>=a.minY-o&&r.y<=a.maxY+o&&(n=!0),n},xr=function(r){var t=r.x,n=r.y,o=r.width,a=r.height,f={minX:t-o/2,minY:n-a/2,maxX:t+o/2,maxY:n+a/2,x:t,y:n,width:o,height:a,centerX:t,centerY:n};return f},MP=function(r){var t=r,n=t.x,o=t.y,a=t.width,f=t.height,p=t.radius,g=[{x:n-a/2+p,y:o-f/2+p,r:p},{x:n+a/2-p,y:o-f/2+p,r:p},{x:n-a/2+p,y:o+f/2-p,r:p},{x:n+a/2-p,y:o+f/2-p,r:p}];return g},kp=function(r,t,n){var o=MP(n),a,f=Number.MAX_SAFE_INTEGER;o.forEach(function(g){var O=Vr(r.x,r.y,g.x,g.y);O<f&&(f=O,a=g)});var p=df(r,t,a);return p},df=function(r,t,n){var o,a=n,f=a.x,p=a.y,g=a.r;if(t===Dt.HORIZONTAL){var O=f-Math.sqrt(g*g-(r.y-p)*(r.y-p)),M=f+Math.sqrt(g*g-(r.y-p)*(r.y-p)),j=Math.abs(O-r.x)<Math.abs(M-r.x)?O:M;o={x:j,y:r.y}}else if(t===Dt.VERTICAL){var z=p-Math.sqrt(g*g-(r.x-f)*(r.x-f)),$=p+Math.sqrt(g*g-(r.x-f)*(r.x-f)),Z=Math.abs(z-r.y)<Math.abs($-r.y)?z:$;o={x:r.x,y:Z}}return o},$p=function(r,t){var n=t,o=!1,a={minX:n.x-n.width/2+n.radius,maxX:n.x+n.width/2-n.radius,minY:n.y-n.height/2+n.radius,maxY:n.y+n.height/2-n.radius},f=n.x,p=n.y,g=n.width,O=n.height;return r.y===p+O/2||r.y===p-O/2?o=r.x>a.minX&&r.x<a.maxX:(r.x===f+g/2||r.x===f-g/2)&&(o=r.y>a.minY&&r.y<a.maxY),o},Up=function(r,t,n){var o,a=n,f=a.x,p=a.y,g=a.rx,O=a.ry;if(t===Dt.HORIZONTAL){var M=f-Math.sqrt(g*g-(r.y-p)*(r.y-p)*g*g/(O*O)),j=f+Math.sqrt(g*g-(r.y-p)*(r.y-p)*g*g/(O*O)),z=Math.abs(M-r.x)<Math.abs(j-r.x)?M:j;o={x:z,y:r.y}}else if(t===Dt.VERTICAL){var $=p-Math.sqrt(O*O-(r.x-f)*(r.x-f)*O*O/(g*g)),Z=p+Math.sqrt(O*O-(r.x-f)*(r.x-f)*O*O/(g*g)),ie=Math.abs($-r.y)<Math.abs(Z-r.y)?$:Z;o={x:r.x,y:ie}}return o},_a=function(r,t,n){for(var o=n,a=o.pointsPosition,f=Number.MAX_SAFE_INTEGER,p,g=[],O=0;O<a.length;O++)g.push({start:a[O],end:a[(O+1)%a.length]});return g.forEach(function(M){var j=M.start,z=M.end,$=j,Z=z;j.x>z.x&&($=z,Z=j);var ie={x:r.x,y:r.y};if($.x===Z.x&&t===Dt.HORIZONTAL&&(ie={x:$.x,y:r.y}),$.y===Z.y&&t===Dt.VERTICAL&&(ie={x:r.x,y:$.y}),$.x!==Z.x&&$.y!==Z.y){var oe=(Z.y-$.y)/(Z.x-$.x),le=($.x*Z.y-Z.x*$.y)/($.x-Z.x);t===Dt.HORIZONTAL?ie={x:(r.y-le)/oe,y:r.y}:t===Dt.VERTICAL&&(ie={x:r.x,y:oe*r.x+le})}var Ae=hi(ie,j,z);if(Ae){var Ce=Vr(ie.x,ie.y,r.x,r.y);Ce<f&&(f=Ce,p=ie)}}),p},AP=function(r){var t=di(r,["id","type","x","y","text","properties","virtual"]);return t},Xp=function(r,t,n,o){var a=r.x,f=r.y;return t.x>r.x?a=r.x+n/2:t.x<r.x&&(a=r.x-n/2),t.y>r.y?f=r.y+o/2:t.y<r.y&&(f=r.y-o/2),{x:a,y:f}},Yp=function(r){var t=r.rows,n=r.style,o=r.rowsLength,a=r.className,f=document.createElement("div");f.style.fontSize=n.fontSize,f.style.width=n.width,f.className=a,f.style.lineHeight=n.lineHeight,f.style.padding=n.padding,n.fontFamily&&(f.style.fontFamily=n.fontFamily),o>1?t.forEach(function(g){var O=document.createElement("div");O.textContent=g,f.appendChild(O)}):f.textContent=t,document.body.appendChild(f);var p=f.clientHeight;return document.body.removeChild(f),p},pf=function(r){var t=r.rows,n=r.rowsLength,o=r.fontSize,a=0;return t&&t.forEach(function(f){var p=Lh(f);a=p>a?p:a}),{width:Math.ceil(a/2)*o+o/4,height:n*(o+2)+o/4}},Ba=function(r){return Ra(r)!=="object"?{isAllPass:!!r,msg:r?"":"\u4E0D\u5141\u8BB8\u8FDE\u63A5"}:r},rr=function(r){try{return JSON.parse(JSON.stringify(r))}catch{return r}},NP=1e3,DP=999,hf=function(){return++NP},jP=function(){return--DP},xe,Wp,Vp,Kp,Zp,Jp,Qp,qp,eh,th,rh,nh,oh,ih,ah,uh,lh,sh,fh,ch,dh;function ph(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function pr(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?ph(Object(t),!0).forEach(function(n){Cr(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ph(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Ht(e,r,t,n){!t||Object.defineProperty(e,r,{enumerable:t.enumerable,configurable:t.configurable,writable:t.writable,value:t.initializer?t.initializer.call(n):void 0})}function CP(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function hh(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function RP(e,r,t){return r&&hh(e.prototype,r),t&&hh(e,t),e}function Cr(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function rt(e,r,t,n,o){var a={};return Object.keys(n).forEach(function(f){a[f]=n[f]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=t.slice().reverse().reduce(function(f,p){return p(e,r,f)||f},a),o&&a.initializer!==void 0&&(a.value=a.initializer?a.initializer.call(o):void 0,a.initializer=void 0),a.initializer===void 0&&(Object.defineProperty(e,r,a),a=null),a}var vf=(xe=function(){function e(r,t){CP(this,e),Cr(this,"id",""),Ht(this,"type",Wp,this),Ht(this,"sourceNodeId",Vp,this),Ht(this,"targetNodeId",Kp,this),Ht(this,"startPoint",Zp,this),Ht(this,"endPoint",Jp,this),Ht(this,"text",Qp,this),Ht(this,"properties",qp,this),Ht(this,"points",eh,this),Ht(this,"pointsList",th,this),Ht(this,"isSelected",rh,this),Ht(this,"isHovered",nh,this),Ht(this,"isHitable",oh,this),Ht(this,"draggable",ih,this),Ht(this,"visible",ah,this),Cr(this,"virtual",!1),Ht(this,"isAnimation",uh,this),Ht(this,"isShowAdjustPoint",lh,this),Cr(this,"graphModel",void 0),Ht(this,"zIndex",sh,this),Cr(this,"BaseType",Ft.EDGE),Cr(this,"modelType",ht.EDGE),Ht(this,"state",fh,this),Cr(this,"additionStateData",void 0),Cr(this,"sourceAnchorId",""),Cr(this,"targetAnchorId",""),Cr(this,"menu",void 0),Cr(this,"customTextPosition",!1),Ht(this,"style",ch,this),Ht(this,"arrowConfig",dh,this),this.graphModel=t,this.initEdgeData(r),this.setAttributes()}return RP(e,[{key:"initEdgeData",value:function(t){if(t.properties||(t.properties={}),!t.id){var n=this.graphModel.idGenerator,o=n&&n(t.type),a=this.createId();t.id=a||o||_n()}this.arrowConfig.markerEnd="url(#marker-end-".concat(t.id,")");var f=this.graphModel.editConfigModel.adjustEdgeStartAndEnd;this.isShowAdjustPoint=f,ur(this,ST(t));var p=this.graphModel.overlapMode;p===Sr.INCREASE&&(this.zIndex=t.zIndex||hf()),this.setAnchors(),this.initPoints(),this.formatText(t)}},{key:"setAttributes",value:function(){}},{key:"createId",value:function(){return null}},{key:"getEdgeStyle",value:function(){return pr(pr({},this.graphModel.theme.baseEdge),this.style)}},{key:"getAdjustPointStyle",value:function(){return pr({},this.graphModel.theme.edgeAdjust)}},{key:"getTextStyle",value:function(){var t=this.graphModel.theme.edgeText;return It(t)}},{key:"getEdgeAnimationStyle",value:function(){var t=this.graphModel.theme.edgeAnimation;return It(t)}},{key:"getArrowStyle",value:function(){var t=this.getEdgeStyle(),n=this.getEdgeAnimationStyle(),o=this.graphModel.theme.arrow,a=this.isAnimation?n.stroke:t.stroke;return pr(pr({},t),{},{fill:a,stroke:a},o)}},{key:"getOutlineStyle",value:function(){var t=this.graphModel,n=t.theme.outline;return It(n)}},{key:"getTextPosition",value:function(){return{x:0,y:0}}},{key:"sourceNode",get:function(){var t,n;return(t=this.graphModel)===null||t===void 0||(n=t.nodesMap[this.sourceNodeId])===null||n===void 0?void 0:n.model}},{key:"targetNode",get:function(){var t,n;return(t=this.graphModel)===null||t===void 0||(n=t.nodesMap[this.targetNodeId])===null||n===void 0?void 0:n.model}},{key:"textPosition",get:function(){return this.getTextPosition()}},{key:"getBeginAnchor",value:function(t,n){var o,a,f=cf(t);return f.forEach(function(p){var g=Hh(p,n);(a===void 0||g<a)&&(a=g,o=p)}),o}},{key:"getEndAnchor",value:function(t){var n=this,o,a,f=cf(t);return f.forEach(function(p){var g=Hh(p,n.startPoint);(a===void 0||g<a)&&(a=g,o=p)}),o}},{key:"getProperties",value:function(){return Object(s.I)(this.properties)}},{key:"getData",value:function(){var t=this.text,n=t.x,o=t.y,a=t.value,f={id:this.id,type:this.type,sourceNodeId:this.sourceNode.id,targetNodeId:this.targetNode.id,startPoint:Object.assign({},this.startPoint),endPoint:Object.assign({},this.endPoint),properties:Object(s.I)(this.properties)};return a&&(f.text={x:n,y:o,value:a}),this.graphModel.overlapMode===Sr.INCREASE&&(f.zIndex=this.zIndex),f}},{key:"getHistoryData",value:function(){return this.getData()}},{key:"setProperty",value:function(t,n){this.properties[t]=rr(n),this.setAttributes()}},{key:"deleteProperty",value:function(t){delete this.properties[t],this.setAttributes()}},{key:"setProperties",value:function(t){this.properties=pr(pr({},this.properties),rr(t)),this.setAttributes()}},{key:"changeEdgeId",value:function(t){var n=this.arrowConfig,o=n.markerEnd,a=n.markerStart;a&&a==="url(#marker-start-".concat(this.id,")")&&(this.arrowConfig.markerStart="url(#marker-start-".concat(t,")")),o&&o==="url(#marker-end-".concat(this.id,")")&&(this.arrowConfig.markerEnd="url(#marker-end-".concat(t,")")),this.id=t}},{key:"setStyle",value:function(t,n){this.style=pr(pr({},this.style),{},Cr({},t,rr(n)))}},{key:"setStyles",value:function(t){this.style=pr(pr({},this.style),rr(t))}},{key:"updateStyles",value:function(t){this.style=pr({},rr(t))}},{key:"formatText",value:function(t){var n=this.textPosition,o=n.x,a=n.y;if(!t.text||typeof t.text=="string"){this.text={value:t.text||"",x:o,y:a,draggable:this.text.draggable,editable:this.text.editable};return}Object.prototype.toString.call(t.text)==="[object Object]"&&(this.text={x:t.text.x||o,y:t.text.y||a,value:t.text.value||"",draggable:this.text.draggable,editable:this.text.editable})}},{key:"resetTextPosition",value:function(){var t=this.textPosition,n=t.x,o=t.y;this.text.x=n,this.text.y=o}},{key:"moveText",value:function(t,n){if(this.text){var o=this.text,a=o.x,f=o.y,p=o.value,g=o.draggable,O=o.editable;this.text={value:p,draggable:g,x:a+t,y:f+n,editable:O}}}},{key:"setText",value:function(t){t&&ur(this.text,t)}},{key:"updateText",value:function(t){this.text=pr(pr({},this.text),{},{value:t})}},{key:"setAnchors",value:function(){if(!this.sourceAnchorId||!this.startPoint){var t=this.getBeginAnchor(this.sourceNode,this.targetNode);this.startPoint||(this.startPoint={x:t.x,y:t.y}),this.sourceAnchorId||(this.sourceAnchorId=t.id)}if(!this.targetAnchorId||!this.endPoint){var n=this.getEndAnchor(this.targetNode);this.endPoint||(this.endPoint={x:n.x,y:n.y}),this.targetAnchorId||(this.targetAnchorId=n.id)}}},{key:"setSelected",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.isSelected=t}},{key:"setHovered",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.isHovered=t}},{key:"setHitable",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.isHitable=t}},{key:"openEdgeAnimation",value:function(){this.isAnimation=!0}},{key:"closeEdgeAnimation",value:function(){this.isAnimation=!1}},{key:"setElementState",value:function(t,n){this.state=t,this.additionStateData=n}},{key:"updateStartPoint",value:function(t){this.startPoint=t}},{key:"moveStartPoint",value:function(t,n){this.startPoint.x+=t,this.startPoint.y+=n}},{key:"updateEndPoint",value:function(t){this.endPoint=t}},{key:"moveEndPoint",value:function(t,n){this.endPoint.x+=t,this.endPoint.y+=n}},{key:"setZIndex",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.zIndex=t}},{key:"initPoints",value:function(){}},{key:"updateAttributes",value:function(t){ur(this,t)}},{key:"getAdjustStart",value:function(){return this.startPoint}},{key:"getAdjustEnd",value:function(){return this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(t){var n=t.startPoint,o=t.endPoint;this.updateStartPoint({x:n.x,y:n.y}),this.updateEndPoint({x:o.x,y:o.y})}}]),e}(),Wp=rt(xe.prototype,"type",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Vp=rt(xe.prototype,"sourceNodeId",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Kp=rt(xe.prototype,"targetNodeId",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Zp=rt(xe.prototype,"startPoint",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),Jp=rt(xe.prototype,"endPoint",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),Qp=rt(xe.prototype,"text",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{value:"",x:0,y:0,draggable:!1,editable:!0}}}),qp=rt(xe.prototype,"properties",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),eh=rt(xe.prototype,"points",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),th=rt(xe.prototype,"pointsList",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),rh=rt(xe.prototype,"isSelected",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),nh=rt(xe.prototype,"isHovered",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),oh=rt(xe.prototype,"isHitable",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),ih=rt(xe.prototype,"draggable",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),ah=rt(xe.prototype,"visible",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),uh=rt(xe.prototype,"isAnimation",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),lh=rt(xe.prototype,"isShowAdjustPoint",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),sh=rt(xe.prototype,"zIndex",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),fh=rt(xe.prototype,"state",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),ch=rt(xe.prototype,"style",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),dh=rt(xe.prototype,"arrowConfig",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{markerEnd:"url(#marker-end-".concat(this.id,")"),markerStart:""}}}),rt(xe.prototype,"sourceNode",[s.m],Object.getOwnPropertyDescriptor(xe.prototype,"sourceNode"),xe.prototype),rt(xe.prototype,"targetNode",[s.m],Object.getOwnPropertyDescriptor(xe.prototype,"targetNode"),xe.prototype),rt(xe.prototype,"textPosition",[s.m],Object.getOwnPropertyDescriptor(xe.prototype,"textPosition"),xe.prototype),rt(xe.prototype,"setProperty",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"setProperty"),xe.prototype),rt(xe.prototype,"deleteProperty",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"deleteProperty"),xe.prototype),rt(xe.prototype,"setProperties",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"setProperties"),xe.prototype),rt(xe.prototype,"changeEdgeId",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"changeEdgeId"),xe.prototype),rt(xe.prototype,"setStyle",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"setStyle"),xe.prototype),rt(xe.prototype,"setStyles",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"setStyles"),xe.prototype),rt(xe.prototype,"updateStyles",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"updateStyles"),xe.prototype),rt(xe.prototype,"formatText",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"formatText"),xe.prototype),rt(xe.prototype,"resetTextPosition",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"resetTextPosition"),xe.prototype),rt(xe.prototype,"moveText",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"moveText"),xe.prototype),rt(xe.prototype,"setText",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"setText"),xe.prototype),rt(xe.prototype,"updateText",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"updateText"),xe.prototype),rt(xe.prototype,"setAnchors",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"setAnchors"),xe.prototype),rt(xe.prototype,"setSelected",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"setSelected"),xe.prototype),rt(xe.prototype,"setHovered",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"setHovered"),xe.prototype),rt(xe.prototype,"setHitable",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"setHitable"),xe.prototype),rt(xe.prototype,"openEdgeAnimation",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"openEdgeAnimation"),xe.prototype),rt(xe.prototype,"closeEdgeAnimation",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"closeEdgeAnimation"),xe.prototype),rt(xe.prototype,"setElementState",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"setElementState"),xe.prototype),rt(xe.prototype,"updateStartPoint",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"updateStartPoint"),xe.prototype),rt(xe.prototype,"moveStartPoint",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"moveStartPoint"),xe.prototype),rt(xe.prototype,"updateEndPoint",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"updateEndPoint"),xe.prototype),rt(xe.prototype,"moveEndPoint",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"moveEndPoint"),xe.prototype),rt(xe.prototype,"setZIndex",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"setZIndex"),xe.prototype),rt(xe.prototype,"initPoints",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"initPoints"),xe.prototype),rt(xe.prototype,"updateAttributes",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"updateAttributes"),xe.prototype),rt(xe.prototype,"getAdjustStart",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"getAdjustStart"),xe.prototype),rt(xe.prototype,"getAdjustEnd",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"getAdjustEnd"),xe.prototype),rt(xe.prototype,"updateAfterAdjustStartAndEnd",[s.k],Object.getOwnPropertyDescriptor(xe.prototype,"updateAfterAdjustStartAndEnd"),xe.prototype),xe),yf=vf;function La(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?La=function(t){return typeof t}:La=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},La(e)}function vh(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function yh(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?vh(Object(t),!0).forEach(function(n){bh(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):vh(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function IP(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function gh(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _P(e,r,t){return r&&gh(e.prototype,r),t&&gh(e,t),e}function za(){return typeof Reflect!="undefined"&&Reflect.get?za=Reflect.get:za=function(r,t,n){var o=BP(r,t);if(!!o){var a=Object.getOwnPropertyDescriptor(o,t);return a.get?a.get.call(arguments.length<3?r:n):a.value}},za.apply(this,arguments)}function BP(e,r){for(;!Object.prototype.hasOwnProperty.call(e,r)&&(e=Mo(e),e!==null););return e}function LP(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&gf(e,r)}function gf(e,r){return gf=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},gf(e,r)}function zP(e){var r=HP();return function(){var n=Mo(e),o;if(r){var a=Mo(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return FP(this,o)}}function FP(e,r){if(r&&(La(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mh(e)}function mh(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function HP(){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{return!1}}function Mo(e){return Mo=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Mo(e)}function bh(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var mf=function(e){LP(t,e);var r=zP(t);function t(){var n;IP(this,t);for(var o=arguments.length,a=new Array(o),f=0;f<o;f++)a[f]=arguments[f];return n=r.call.apply(r,[this].concat(a)),bh(mh(n),"modelType",ht.LINE_EDGE),n}return _P(t,[{key:"getEdgeStyle",value:function(){var o=this.graphModel.theme.line,a=za(Mo(t.prototype),"getEdgeStyle",this).call(this);return yh(yh({},a),It(o))}},{key:"getTextPosition",value:function(){return{x:(this.startPoint.x+this.endPoint.x)/2,y:(this.startPoint.y+this.endPoint.y)/2}}}]),t}(yf);function Fa(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Fa=function(t){return typeof t}:Fa=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fa(e)}var ut,Oh;function GP(e,r){return XP(e)||UP(e,r)||$P(e,r)||kP()}function kP(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $P(e,r){if(!!e){if(typeof e=="string")return Eh(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Eh(e,r)}}function Eh(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function UP(e,r){var t=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,f,p;try{for(t=t.call(e);!(o=(f=t.next()).done)&&(n.push(f.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function XP(e){if(Array.isArray(e))return e}function Sh(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function xh(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Sh(Object(t),!0).forEach(function(n){Of(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Sh(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function YP(e,r,t,n){!t||Object.defineProperty(e,r,{enumerable:t.enumerable,configurable:t.configurable,writable:t.writable,value:t.initializer?t.initializer.call(n):void 0})}function WP(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Ph(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function VP(e,r,t){return r&&Ph(e.prototype,r),t&&Ph(e,t),e}function Ao(){return typeof Reflect!="undefined"&&Reflect.get?Ao=Reflect.get:Ao=function(r,t,n){var o=KP(r,t);if(!!o){var a=Object.getOwnPropertyDescriptor(o,t);return a.get?a.get.call(arguments.length<3?r:n):a.value}},Ao.apply(this,arguments)}function KP(e,r){for(;!Object.prototype.hasOwnProperty.call(e,r)&&(e=Ln(e),e!==null););return e}function ZP(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&bf(e,r)}function bf(e,r){return bf=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},bf(e,r)}function JP(e){var r=qP();return function(){var n=Ln(e),o;if(r){var a=Ln(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return QP(this,o)}}function QP(e,r){if(r&&(Fa(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vi(e)}function vi(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qP(){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{return!1}}function Ln(e){return Ln=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ln(e)}function Of(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function lr(e,r,t,n,o){var a={};return Object.keys(n).forEach(function(f){a[f]=n[f]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=t.slice().reverse().reduce(function(f,p){return p(e,r,f)||f},a),o&&a.initializer!==void 0&&(a.value=a.initializer?a.initializer.call(o):void 0,a.initializer=void 0),a.initializer===void 0&&(Object.defineProperty(e,r,a),a=null),a}var Ef=(ut=function(e){ZP(t,e);var r=JP(t);function t(){var n;WP(this,t);for(var o=arguments.length,a=new Array(o),f=0;f<o;f++)a[f]=arguments[f];return n=r.call.apply(r,[this].concat(a)),Of(vi(n),"modelType",ht.POLYLINE_EDGE),Of(vi(n),"draggingPointList",void 0),YP(vi(n),"dbClickPosition",Oh,vi(n)),n}return VP(t,[{key:"initEdgeData",value:function(o){this.offset=30,Ao(Ln(t.prototype),"initEdgeData",this).call(this,o)}},{key:"getEdgeStyle",value:function(){var o=this.graphModel.theme.polyline,a=Ao(Ln(t.prototype),"getEdgeStyle",this).call(this);return xh(xh({},a),It(o))}},{key:"getTextPosition",value:function(){var o,a=(o=this.text)===null||o===void 0?void 0:o.value;if(this.dbClickPosition&&!a){var f=this.dbClickPosition,p=f.x,g=f.y;return{x:p,y:g}}var O=No(this.points),M=mT(O),j=GP(M,2),z=j[0],$=j[1];return{x:(z.x+$.x)/2,y:(z.y+$.y)/2}}},{key:"getAfterAnchor",value:function(o,a,f){var p,g;return f.forEach(function(O){var M;o===Dt.HORIZONTAL?M=Math.abs(a.y-O.y):o===Dt.VERTICAL&&(M=Math.abs(a.x-O.x)),(!g||g>M)&&(g=M,p=O)}),p}},{key:"getCrossPoint",value:function(o,a,f){var p;return o===Dt.HORIZONTAL?p={x:f.x,y:a.y}:o===Dt.VERTICAL&&(p={x:a.x,y:f.y}),p}},{key:"removeCrossPoints",value:function(o,a,f){var p=f.map(function(Ne){return Ne});if(o===1){var g=p[o],O=p[a],M=p[o-1],j=Rh(M,g,this.sourceNode);if(j){var z=Ih(g,O,this.sourceNode);if(z){var $=_h(g,O,this.sourceNode);$&&(p[o]=$,p.splice(o-1,1),o--,a--)}}else{var Z=this.sourceNode.anchors;Z.forEach(function(Ne){if(Ne.x===M.x&&Ne.x===g.x||Ne.y===M.y&&Ne.y===g.y){var Ue=Vr(Ne.x,Ne.y,g.x,g.y),De=Vr(M.x,M.y,g.x,g.y);Ue<De&&(p[o-1]=Ne)}})}}if(a===f.length-2){var ie=p[o],oe=p[a],le=p[a+1],Ae=Rh(oe,le,this.targetNode);if(Ae){var Ce=Ih(ie,oe,this.targetNode);if(Ce){var Ee=_h(ie,oe,this.targetNode);Ee&&(p[a]=Ee,p.splice(a+1,1))}}else{var Be=this.targetNode.anchors;Be.forEach(function(Ne){if(Ne.x===le.x&&Ne.x===oe.x||Ne.y===le.y&&Ne.y===oe.y){var Ue=Vr(Ne.x,Ne.y,oe.x,oe.y),De=Vr(le.x,le.y,oe.x,oe.y);Ue<De&&(p[a+1]=Ne)}})}}return p}},{key:"getDraggingPoints",value:function(o,a,f,p,g){var O=g.map(function(z){return z}),M=this.getAfterAnchor(o,f,p),j=this.getCrossPoint(o,f,M);return a==="start"?(O.unshift(j),O.unshift(M)):(O.push(j),O.push(M)),O}},{key:"updateCrossPoints",value:function(o){var a=o.map(function(Ee){return Ee}),f=o[0],p=o[1],g=o[a.length-2],O=o[a.length-1],M=this.sourceNode,j=this.targetNode,z=M.modelType,$=j.modelType,Z=Ya(f,p),ie=a[0];switch(z){case ht.RECT_NODE:if(M.radius!==0){var oe=$p(f,M);oe||(ie=kp(f,Z,M))}break;case ht.CIRCLE_NODE:ie=df(f,Z,M);break;case ht.ELLIPSE_NODE:ie=Up(f,Z,M);break;case ht.DIAMOND_NODE:ie=_a(f,Z,M);break;case ht.POLYGON_NODE:ie=_a(f,Z,M);break}a[0]=ie;var le=Ya(g,O),Ae=a[a.length-1];switch($){case ht.RECT_NODE:if(j.radius!==0){var Ce=$p(O,j);Ce||(Ae=kp(O,le,j))}break;case ht.CIRCLE_NODE:Ae=df(O,le,j);break;case ht.ELLIPSE_NODE:Ae=Up(O,le,j);break;case ht.DIAMOND_NODE:Ae=_a(O,le,j);break;case ht.POLYGON_NODE:Ae=_a(O,le,j);break}return a[a.length-1]=Ae,a}},{key:"getData",value:function(){var o=Ao(Ln(t.prototype),"getData",this).call(this),a=this.pointsList.map(function(f){var p=f.x,g=f.y;return{x:p,y:g}});return Object.assign({},o,{pointsList:a})}},{key:"initPoints",value:function(){this.pointsList.length>0?this.points=this.pointsList.map(function(o){return"".concat(o.x,",").concat(o.y)}).join(" "):this.updatePoints()}},{key:"updatePoints",value:function(){var o=Ch({x:this.startPoint.x,y:this.startPoint.y},{x:this.endPoint.x,y:this.endPoint.y},this.sourceNode,this.targetNode,this.offset||0);this.pointsList=o,this.points=o.map(function(a){return"".concat(a.x,",").concat(a.y)}).join(" ")}},{key:"updateStartPoint",value:function(o){this.startPoint=o,this.updatePoints()}},{key:"moveStartPoint",value:function(o,a){this.startPoint.x+=o,this.startPoint.y+=a,this.updatePoints()}},{key:"updateEndPoint",value:function(o){this.endPoint=o,this.updatePoints()}},{key:"moveEndPoint",value:function(o,a){this.endPoint.x+=o,this.endPoint.y+=a,this.updatePoints()}},{key:"dragAppendStart",value:function(){this.draggingPointList=this.pointsList.map(function(o){return o})}},{key:"dragAppendSimple",value:function(o,a){this.isDragging=!0;var f=o.start,p=o.end,g=o.startIndex,O=o.endIndex,M=o.direction,j=this.pointsList,z=j;return M===Dt.HORIZONTAL?(j[g]={x:f.x,y:f.y+a.y},j[O]={x:p.x,y:p.y+a.y},z=this.pointsList.map(function($){return $})):M===Dt.VERTICAL&&(j[g]={x:f.x+a.x,y:f.y},j[O]={x:p.x+a.x,y:p.y},z=this.pointsList.map(function($){return $})),this.updatePointsAfterDrag(z),this.draggingPointList=z,this.setText(Object.assign({},this.text,this.textPosition)),{start:Object.assign({},j[g]),end:Object.assign({},j[O]),startIndex:g,endIndex:O,direction:M}}},{key:"dragAppend",value:function(o,a){this.isDragging=!0;var f=o.start,p=o.end,g=o.startIndex,O=o.endIndex,M=o.direction,j=this.pointsList;if(M===Dt.HORIZONTAL){j[g]={x:f.x,y:f.y+a.y},j[O]={x:p.x,y:p.y+a.y};var z=this.pointsList.map(function(vt){return vt});if(g!==0&&O!==this.pointsList.length-1&&(z=this.removeCrossPoints(g,O,z)),g===0){var $={x:f.x,y:f.y+a.y},Z=Bn($,this.sourceNode);if(!Z){var ie=this.sourceNode.anchors;z=this.getDraggingPoints(M,"start",$,ie,z)}}if(O===this.pointsList.length-1){var oe={x:p.x,y:p.y+a.y},le=Bn(oe,this.targetNode);if(!le){var Ae=this.targetNode.anchors;z=this.getDraggingPoints(M,"end",oe,Ae,z)}}this.updatePointsAfterDrag(z),this.draggingPointList=z}else if(M===Dt.VERTICAL){j[g]={x:f.x+a.x,y:f.y},j[O]={x:p.x+a.x,y:p.y};var Ce=this.pointsList.map(function(vt){return vt});if(g!==0&&O!==this.pointsList.length-1&&(Ce=this.removeCrossPoints(g,O,Ce)),g===0){var Ee={x:f.x+a.x,y:f.y},Be=Bn(Ee,this.sourceNode);if(!Be){var Ne=this.sourceNode.anchors;Ce=this.getDraggingPoints(M,"start",Ee,Ne,Ce)}}if(O===this.pointsList.length-1){var Ue={x:p.x+a.x,y:p.y},De=Bn(Ue,this.targetNode);if(!De){var it=this.targetNode.anchors;Ce=this.getDraggingPoints(M,"end",Ue,it,Ce)}}this.updatePointsAfterDrag(Ce),this.draggingPointList=Ce}return this.setText(Object.assign({},this.text,this.textPosition)),{start:Object.assign({},j[g]),end:Object.assign({},j[O]),startIndex:g,endIndex:O,direction:M}}},{key:"dragAppendEnd",value:function(){if(this.draggingPointList){var o=jh(No(this.points));this.pointsList=o.map(function(p){return p}),this.draggingPointList=[];var a=o[0];this.startPoint=Object.assign({},a);var f=o[o.length-1];this.endPoint=Object.assign({},f)}this.isDragging=!1}},{key:"updatePointsAfterDrag",value:function(o){var a=this.updateCrossPoints(o);this.points=a.map(function(f){return"".concat(f.x,",").concat(f.y)}).join(" ")}},{key:"getAdjustStart",value:function(){return this.pointsList[0]||this.startPoint}},{key:"getAdjustEnd",value:function(){var o=this.pointsList;return o[o.length-1]||this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(o){var a=o.startPoint,f=o.endPoint,p=o.sourceNode,g=o.targetNode,O=Ch({x:a.x,y:a.y},{x:f.x,y:f.y},p,g,this.offset||0);this.pointsList=O,this.initPoints()}}]),t}(yf),Oh=lr(ut.prototype,"dbClickPosition",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),lr(ut.prototype,"initPoints",[s.k],Object.getOwnPropertyDescriptor(ut.prototype,"initPoints"),ut.prototype),lr(ut.prototype,"updatePoints",[s.k],Object.getOwnPropertyDescriptor(ut.prototype,"updatePoints"),ut.prototype),lr(ut.prototype,"updateStartPoint",[s.k],Object.getOwnPropertyDescriptor(ut.prototype,"updateStartPoint"),ut.prototype),lr(ut.prototype,"moveStartPoint",[s.k],Object.getOwnPropertyDescriptor(ut.prototype,"moveStartPoint"),ut.prototype),lr(ut.prototype,"updateEndPoint",[s.k],Object.getOwnPropertyDescriptor(ut.prototype,"updateEndPoint"),ut.prototype),lr(ut.prototype,"moveEndPoint",[s.k],Object.getOwnPropertyDescriptor(ut.prototype,"moveEndPoint"),ut.prototype),lr(ut.prototype,"dragAppendStart",[s.k],Object.getOwnPropertyDescriptor(ut.prototype,"dragAppendStart"),ut.prototype),lr(ut.prototype,"dragAppendSimple",[s.k],Object.getOwnPropertyDescriptor(ut.prototype,"dragAppendSimple"),ut.prototype),lr(ut.prototype,"dragAppend",[s.k],Object.getOwnPropertyDescriptor(ut.prototype,"dragAppend"),ut.prototype),lr(ut.prototype,"dragAppendEnd",[s.k],Object.getOwnPropertyDescriptor(ut.prototype,"dragAppendEnd"),ut.prototype),lr(ut.prototype,"updatePointsAfterDrag",[s.k],Object.getOwnPropertyDescriptor(ut.prototype,"updatePointsAfterDrag"),ut.prototype),lr(ut.prototype,"getAdjustStart",[s.k],Object.getOwnPropertyDescriptor(ut.prototype,"getAdjustStart"),ut.prototype),lr(ut.prototype,"getAdjustEnd",[s.k],Object.getOwnPropertyDescriptor(ut.prototype,"getAdjustEnd"),ut.prototype),lr(ut.prototype,"updateAfterAdjustStartAndEnd",[s.k],Object.getOwnPropertyDescriptor(ut.prototype,"updateAfterAdjustStartAndEnd"),ut.prototype),ut),yi=function(r){var t=r.start,n=r.end,o=r.offset,a=r.verticalLength,f=r.type,p={leftX:0,leftY:0,rightX:0,rightY:0},g=Math.atan((n.y-t.y)/(n.x-t.x)),O=Math.atan(o/a),M=Math.sqrt(a*a+o*o);return f==="start"?n.x>=t.x?(p.leftX=t.x+M*Math.sin(g+O),p.leftY=t.y-M*Math.cos(g+O),p.rightX=t.x-M*Math.sin(g-O),p.rightY=t.y+M*Math.cos(g-O)):(p.leftX=t.x-M*Math.sin(g+O),p.leftY=t.y+M*Math.cos(g+O),p.rightX=t.x+M*Math.sin(g-O),p.rightY=t.y-M*Math.cos(g-O)):f==="end"&&(n.x>=t.x?(p.leftX=n.x+M*Math.sin(g-O),p.leftY=n.y-M*Math.cos(g-O),p.rightX=n.x-M*Math.sin(g+O),p.rightY=n.y+M*Math.cos(g+O)):(p.leftX=n.x-M*Math.sin(g-O),p.leftY=n.y+M*Math.cos(g-O),p.rightX=n.x+M*Math.sin(g+O),p.rightY=n.y-M*Math.cos(g+O))),p};function Th(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function Ha(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Th(Object(t),!0).forEach(function(n){eT(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Th(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function eT(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function tT(e){return oT(e)||nT(e)||wh(e)||rT()}function rT(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nT(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function oT(e){if(Array.isArray(e))return xf(e)}function Ga(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ga=function(t){return typeof t}:Ga=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ga(e)}function Sf(e,r){return uT(e)||aT(e,r)||wh(e,r)||iT()}function iT(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wh(e,r){if(!!e){if(typeof e=="string")return xf(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return xf(e,r)}}function xf(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function aT(e,r){var t=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,f,p;try{for(t=t.call(e);!(o=(f=t.next()).done)&&(n.push(f.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function uT(e){if(Array.isArray(e))return e}var lT=function(r,t){return Math.abs(r.centerX-t.centerX)*2<r.width+t.width&&Math.abs(r.centerY-t.centerY)*2<r.height+t.height},Pf=function(r){var t=[],n={};return r.forEach(function(o){var a="".concat(o.x,"-").concat(o.y);o.id=a,n[a]=o}),Object.keys(n).forEach(function(o){t.push(n[o])}),t},ka=function(r,t){return r.width===0&&r.height===0?r:{centerX:r.centerX,centerY:r.centerY,minX:r.minX-t,minY:r.minY-t,maxX:r.maxX+t,maxY:r.maxY+t,height:r.height+2*t,width:r.width+2*t}},sT=function(r,t){var n=Math.abs(r.x-t.centerX),o=Math.abs(r.y-t.centerY);return n/t.width>o/t.height?Dt.HORIZONTAL:Dt.VERTICAL},$a=function(r,t){var n=sT(t,r);return n===Dt.HORIZONTAL?{x:t.x>r.centerX?r.maxX:r.minX,y:t.y}:{x:t.x,y:t.y>r.centerY?r.maxY:r.minY}},Mh=function(r,t){var n=Math.min(r.minX,t.minX),o=Math.min(r.minY,t.minY),a=Math.max(r.maxX,t.maxX),f=Math.max(r.maxY,t.maxY);return{centerX:(n+a)/2,centerY:(o+f)/2,minX:n,minY:o,maxX:a,maxY:f,height:f-o,width:a-n}},gi=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=[],o=[];r.forEach(function(j){n.push(j.x),o.push(j.y)});var a=Math.min.apply(Math,n),f=Math.max.apply(Math,n),p=Math.min.apply(Math,o),g=Math.max.apply(Math,o),O=f-a,M=g-p;return t&&(O+=t,M+=t),{centerX:(a+f)/2,centerY:(p+g)/2,maxX:f,maxY:g,minX:a,minY:p,x:(a+f)/2,y:(p+g)/2,height:M,width:O}},Ua=function(r){var t=r.minX,n=r.minY,o=r.maxX,a=r.maxY;return[{x:t,y:n},{x:o,y:n},{x:o,y:a},{x:t,y:a}]},Xa=function(r,t){var n=r.x,o=r.y;return n<t.minX||n>t.maxX||o<t.minY||o>t.maxY},fT=function(r,t){return t<r.minX||t>r.maxX?[]:[{x:t,y:r.minY},{x:t,y:r.maxY}]},cT=function(r,t){return t<r.minY||t>r.maxY?[]:[{x:r.minX,y:t},{x:r.maxX,y:t}]},dT=function(r,t){return fT(r,t.x).concat(cT(r,t.y))},Tf=function(r,t){return Math.abs(r.x-t.x)+Math.abs(r.y-t.y)},pT=function(r,t){var n=-2,o=0;return t.forEach(function(a){a&&(r.x===a.x&&(o+=n),r.y===a.y&&(o+=n))}),o},Ah=function(r,t,n,o,a){return Tf(r,t)+Tf(r,n)+pT(r,[t,n,o,a])},hT=function e(r,t,n,o,a){a||(a=0),r.unshift(t[o]),n[o]&&n[o]!==o&&a<=100&&e(r,t,n,n[o],a+1)},vT=function(r,t){var n=r.indexOf(t);n>-1&&r.splice(n,1)},mi=function(r,t,n,o){var a=t.x-r.x,f=t.y-r.y,p=o.x-n.x,g=o.y-n.y,O=(-f*(r.x-n.x)+a*(r.y-n.y))/(-p*f+a*g),M=(p*(r.y-n.y)-g*(r.x-n.x))/(-p*f+a*g);return O>=0&&O<=1&&M>=0&&M<=1},Nh=function(r,t,n){if(n.width===0&&n.height===0)return!1;var o=Ua(n),a=Sf(o,4),f=a[0],p=a[1],g=a[2],O=a[3];return mi(r,t,f,p)||mi(r,t,f,O)||mi(r,t,p,g)||mi(r,t,g,O)},yT=function(r,t,n,o){var a=[];return r.forEach(function(f){f!==t&&(f.x===t.x||f.y===t.y)&&!Nh(f,t,n)&&!Nh(f,t,o)&&a.push(f)}),Pf(a)},gT=function(r,t,n,o,a,f,p){var g=[],O=[t],M={},j={},z={};j[t.id]=0,z[t.id]=Ah(t,n,t);var $={};r.forEach(function(oe){$[oe.id]=oe});for(var Z=function(){var le=void 0,Ae=1/0;if(O.forEach(function(Ee){z[Ee.id]<Ae&&(Ae=z[Ee.id],le=Ee)}),le===n){var Ce=[];return hT(Ce,$,M,n.id),{v:Ce}}vT(O,le),g.push(le),yT(r,le,o,a).forEach(function(Ee){if(g.indexOf(Ee)===-1){O.indexOf(Ee)===-1&&O.push(Ee);var Be=z[le.id]+Tf(le,Ee);j[Ee.id]&&Be>=j[Ee.id]||(M[Ee.id]=le.id,j[Ee.id]=Be,z[Ee.id]=j[Ee.id]+Ah(Ee,n,t,f,p))}})};O.length;){var ie=Z();if(Ga(ie)==="object")return ie.v}return[t,n]},Dh=function(r){var t=xr(r);return t},jh=function(r){for(var t=1;t<r.length-1;){var n=r[t-1],o=r[t],a=r[t+1];n.x===o.x&&o.x===a.x||n.y===o.y&&o.y===a.y?r.splice(t,1):t++}return r},Ch=function(r,t,n,o,a){var f=Dh(n),p=Dh(o),g=ka(f,a),O=ka(p,a),M=$a(g,r),j=$a(O,t);if(lT(g,O)){var z=bT(r,t,M,j);return[r,M].concat(tT(z),[j,t])}var $=gi([M,j]),Z=Mh(g,$),ie=Mh(O,$),oe=[];oe=oe.concat(Ua(Z)),oe=oe.concat(Ua(ie));var le={x:(r.x+t.x)/2,y:(r.y+t.y)/2};[$,Z,ie].forEach(function(Ce){oe=oe.concat(dT(Ce,le).filter(function(Ee){return Xa(Ee,g)&&Xa(Ee,O)}))}),[{x:M.x,y:j.y},{x:j.x,y:M.y}].forEach(function(Ce){Xa(Ce,g)&&Xa(Ce,O)&&oe.push(Ce)}),oe.unshift(M),oe.push(j),oe=Pf(oe);var Ae=gT(oe,M,j,f,p,r,t);return Ae.unshift(r),Ae.push(t),Ae.length>2&&(Ae=jh(Ae)),Pf(Ae)},mT=function(r){var t;if(r.length===1)t=[r[0],r[0]];else if(r.length>=2){for(var n=r[0],o=r[1],a=Vr(n.x,n.y,o.x,o.y),f=1;f<r.length-1;f++){var p=r[f],g=r[f+1],O=Vr(p.x,p.y,g.x,g.y);O>a&&(a=O,n=p,o=g)}t=[n,o]}return t},Rh=function(r,t,n){var o=Bn(r,n),a=Bn(t,n);return o&&a},Ih=function(r,t,n){var o=Bn(r,n),a=Bn(t,n),f=o&&a,p=o||a;return!f&&p},_h=function(r,t,n){for(var o,a,f=xr(n),p=Ua(f),g=0;g<p.length;g++){var O=mi(r,t,p[g],p[(g+1)%p.length]);O&&(a=[p[g],p[(g+1)%p.length]])}return a&&(o=SP(r,t,a[0],a[1])),o},Ya=function(r,t){var n;return r.x===t.x?n=Dt.VERTICAL:r.y===t.y&&(n=Dt.HORIZONTAL),n},No=function(r){var t=r.split(" "),n=[];return t&&t.forEach(function(o){var a=o.split(","),f=Sf(a,2),p=f[0],g=f[1];n.push({x:Number(p),y:Number(g)})}),n},bT=function(r,t,n,o){var a=[],f=Ya(r,n),p=Ya(t,o);if(f===p)r.y===n.y?(a.push({x:n.x,y:(n.y+o.y)/2}),a.push({x:o.x,y:(n.y+o.y)/2})):(a.push({x:(n.x+o.x)/2,y:n.y}),a.push({x:(n.x+o.x)/2,y:o.y}));else{var g={x:n.x,y:o.y},O=hi(g,r,n),M=hi(g,t,o);if(O||M)g={x:o.x,y:n.y};else{var j=Bh(g,r,n),z=Bh(g,t,o);j&&z&&(g={x:o.x,y:n.y})}a.push(g)}return a},Bh=function(r,t,n){return r.x===t.x&&r.x===n.x||r.y===t.y&&r.y===n.y},Lh=function(r){if(!r)return 0;for(var t=0,n=0;n<r.length;n++){var o=r.charCodeAt(n);r.match(/[A-Z]/)?t+=1.5:o>=1&&o<=126||o>=65376&&o<=65439?t+=1:t+=2}return t},OT=function(r){var t=r.start,n=r.end,o;if(t.x===n.x&&t.y===n.y)o="";else{var a={start:t,end:n,offset:10,verticalLength:5},f=yi(Ha(Ha({},a),{},{type:"start"})),p=yi(Ha(Ha({},a),{},{type:"end"}));o="M".concat(f.leftX," ").concat(f.leftY,`
- L`).concat(f.rightX," ").concat(f.rightY,`
- L`).concat(p.rightX," ").concat(p.rightY,`
- L`).concat(p.leftX," ").concat(p.leftY," z")}return{d:o,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}},zh=function(r){var t=r.start,n=r.end,o=r.sourceNode,a=r.targetNode,f=r.offset,p=xr(o),g=xr(a),O=ka(p,f),M=ka(g,f),j=$a(O,t),z=$a(M,n);return{sNext:j,ePre:z}},Wa=function(r){var t=r.replace(/M/g,"").replace(/C/g,",").split(","),n=Va(t[0]),o=Va(t[1]),a=Va(t[2]),f=Va(t[3]);return[n,o,a,f]},Va=function(r){var t=r.replace(/(^\s*)/g,"").split(" "),n=Sf(t,2),o=n[0],a=n[1];return{x:+o,y:+a}},ET=function(r){var t=Wa(r);return[t[2],t[3]]},Fh=function(r,t){for(var n=r.x,o=r.y,a=No(t),f=Number.MAX_SAFE_INTEGER,p,g=[],O=0;O<a.length;O++)g.push({start:a[O],end:a[(O+1)%a.length]});if(g.forEach(function($){var Z=$.start,ie=$.end;if(Z.x===ie.x){var oe={x:Z.x,y:o},le=hi(oe,Z,ie);if(le){var Ae=Math.abs(Z.x-n);Ae<f&&(f=Ae,p=oe)}}else if(Z.y===ie.y){var Ce={x:n,y:Z.y},Ee=hi(Ce,Z,ie);if(Ee){var Be=Math.abs(Z.y-o);Be<f&&(f=Be,p=Ce)}}}),!p){var M=g[0],j=M.start,z=M.end;p={x:j.x+(z.x-j.x)/2,y:j.y+(z.y-j.y)/2}}return p},ST=function(r){return di(r,["id","type","sourceNodeId","sourceAnchorId","targetNodeId","targetAnchorId","pointsList","startPoint","endPoint","properties"])},Hh=function(r,t){return Math.sqrt(Math.pow(r.x-t.x,2)+Math.pow(r.y-t.y,2))};function xT(e,r){return typeof r!="function"?function(t,n,o){return Object.assign({type:e.edgeType},o)}:function(t,n,o){var a=r(t,n,o);return a?typeof a=="string"?Object.assign({},o,{type:a}):Object.assign({type:a},o):{type:e.edgeType}}}i(204);function PT(){}var Do=PT;function TT(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Gh(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function wT(e,r,t){return r&&Gh(e.prototype,r),t&&Gh(e,t),e}function Gt(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var Kr=window.document,kh=0;function MT(e){var r=e.onDragStart,t=r===void 0?Do:r,n=e.onDragging,o=n===void 0?Do:n,a=e.onDragEnd,f=a===void 0?Do:a,p=e.step,g=p===void 0?1:p,O=e.isStopPropagation,M=O===void 0?!0:O,j=!1,z=!1,$=0,Z=0,ie=0,oe=0;function le(Ee){if(M&&Ee.stopPropagation(),!!z&&(j=!0,ie+=Ee.clientX-$,oe+=Ee.clientY-Z,$=Ee.clientX,Z=Ee.clientY,Math.abs(ie)>g||Math.abs(oe)>g)){var Be=ie%g,Ne=oe%g,Ue=ie-Be,De=oe-Ne;ie=Be,oe=Ne,o({deltaX:Ue,deltaY:De,event:Ee})}}function Ae(Ee){if(M&&Ee.stopPropagation(),z=!1,Kr.removeEventListener("mousemove",le,!1),Kr.removeEventListener("mouseup",Ae,!1),!!j)return j=!1,f({event:Ee})}function Ce(Ee){if(Ee.button===kh)return M&&Ee.stopPropagation(),z=!0,$=Ee.clientX,Z=Ee.clientY,Kr.addEventListener("mousemove",le,!1),Kr.addEventListener("mouseup",Ae,!1),t({event:Ee})}return Ce}var cn=function(){function e(r){var t=this,n=r.onDragStart,o=n===void 0?Do:n,a=r.onDragging,f=a===void 0?Do:a,p=r.onDragEnd,g=p===void 0?Do:p,O=r.eventType,M=O===void 0?"":O,j=r.eventCenter,z=j===void 0?null:j,$=r.step,Z=$===void 0?1:$,ie=r.isStopPropagation,oe=ie===void 0?!0:ie,le=r.model,Ae=le===void 0?null:le,Ce=r.data,Ee=Ce===void 0?null:Ce;TT(this,e),Gt(this,"onDragStart",void 0),Gt(this,"onDragging",void 0),Gt(this,"onDragEnd",void 0),Gt(this,"step",void 0),Gt(this,"isStopPropagation",void 0),Gt(this,"isDragging",!1),Gt(this,"isStartDragging",!1),Gt(this,"startX",0),Gt(this,"startY",0),Gt(this,"sumDeltaX",0),Gt(this,"sumDeltaY",0),Gt(this,"eventType",void 0),Gt(this,"eventCenter",void 0),Gt(this,"model",void 0),Gt(this,"data",void 0),Gt(this,"startTime",void 0),Gt(this,"handleMouseDown",function(Be){var Ne,Ue;if(Be.button===kh){t.isStopPropagation&&Be.stopPropagation(),t.isStartDragging=!0,t.startX=Be.clientX,t.startY=Be.clientY,Kr.addEventListener("mousemove",t.handleMouseMove,!1),Kr.addEventListener("mouseup",t.handleMouseUp,!1);var De=(Ne=t.model)===null||Ne===void 0?void 0:Ne.getData();(Ue=t.eventCenter)===null||Ue===void 0||Ue.emit(ot["".concat(t.eventType,"_MOUSEDOWN")],{e:Be,data:t.data||De}),t.startTime=new Date().getTime()}}),Gt(this,"handleMouseMove",function(Be){if(t.isStopPropagation&&Be.stopPropagation(),!!t.isStartDragging&&(t.sumDeltaX+=Be.clientX-t.startX,t.sumDeltaY+=Be.clientY-t.startY,t.startX=Be.clientX,t.startY=Be.clientY,t.step<=1||Math.abs(t.sumDeltaX)>t.step||Math.abs(t.sumDeltaY)>t.step)){var Ne,Ue=t.sumDeltaX%t.step,De=t.sumDeltaY%t.step,it=t.sumDeltaX-Ue,vt=t.sumDeltaY-De;t.sumDeltaX=Ue,t.sumDeltaY=De;var kt=(Ne=t.model)===null||Ne===void 0?void 0:Ne.getData();if(!t.isDragging){var Vt;(Vt=t.eventCenter)===null||Vt===void 0||Vt.emit(ot["".concat(t.eventType,"_DRAGSTART")],{e:Be,data:t.data||kt}),t.onDragStart({event:Be})}t.isDragging=!0,Promise.resolve().then(function(){var ir,vr;t.onDragging({deltaX:it,deltaY:vt,event:Be}),(ir=t.eventCenter)===null||ir===void 0||ir.emit(ot["".concat(t.eventType,"_MOUSEMOVE")],{e:Be,data:t.data||kt}),(vr=t.eventCenter)===null||vr===void 0||vr.emit(ot["".concat(t.eventType,"_DRAG")],{e:Be,data:t.data||kt})})}}),Gt(this,"handleMouseUp",function(Be){t.isStartDragging=!1,t.isStopPropagation&&Be.stopPropagation(),Promise.resolve().then(function(){var Ne,Ue,De;Kr.removeEventListener("mousemove",t.handleMouseMove,!1),Kr.removeEventListener("mouseup",t.handleMouseUp,!1);var it=(Ne=t.model)===null||Ne===void 0?void 0:Ne.getData();(Ue=t.eventCenter)===null||Ue===void 0||Ue.emit(ot["".concat(t.eventType,"_MOUSEUP")],{e:Be,data:t.data||it}),t.isDragging&&(t.isDragging=!1,t.onDragEnd({event:Be}),(De=t.eventCenter)===null||De===void 0||De.emit(ot["".concat(t.eventType,"_DROP")],{e:Be,data:t.data||it}))})}),Gt(this,"cancelDrag",function(){Kr.removeEventListener("mousemove",t.handleMouseMove,!1),Kr.removeEventListener("mouseup",t.handleMouseUp,!1),t.onDragEnd({event:null}),t.isDragging=!1}),this.onDragStart=o,this.onDragging=f,this.onDragEnd=g,this.step=Z,this.isStopPropagation=oe,this.eventType=M,this.eventCenter=z,this.model=Ae,this.data=Ee}return wT(e,[{key:"setStep",value:function(t){this.step=t}}]),e}(),$h={node:!1,edge:!1},AT={node:!0,edge:!0},NT=function(r){return!r||typeof r=="boolean"?It(r===!0?AT:$h):Ip(It($h),r)},he,Uh,Xh,Yh,Wh,Vh,Kh,Zh,Jh,Qh,qh,ev,tv;function rv(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function Ka(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?rv(Object(t),!0).forEach(function(n){Zr(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):rv(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function bi(e,r){return CT(e)||jT(e,r)||nv(e,r)||DT()}function DT(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jT(e,r){var t=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,f,p;try{for(t=t.call(e);!(o=(f=t.next()).done)&&(n.push(f.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function CT(e){if(Array.isArray(e))return e}function jo(e){return _T(e)||IT(e)||nv(e)||RT()}function RT(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nv(e,r){if(!!e){if(typeof e=="string")return wf(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return wf(e,r)}}function IT(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _T(e){if(Array.isArray(e))return wf(e)}function wf(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function Oi(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Oi=function(t){return typeof t}:Oi=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oi(e)}function Rr(e,r,t,n){!t||Object.defineProperty(e,r,{enumerable:t.enumerable,configurable:t.configurable,writable:t.writable,value:t.initializer?t.initializer.call(n):void 0})}function BT(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function ov(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function LT(e,r,t){return r&&ov(e.prototype,r),t&&ov(e,t),e}function Zr(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Qe(e,r,t,n,o){var a={};return Object.keys(n).forEach(function(f){a[f]=n[f]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=t.slice().reverse().reduce(function(f,p){return p(e,r,f)||f},a),o&&a.initializer!==void 0&&(a.value=a.initializer?a.initializer.call(o):void 0,a.initializer=void 0),a.initializer===void 0&&(Object.defineProperty(e,r,a),a=null),a}var Za=200,iv=(he=function(){function e(r){BT(this,e),Zr(this,"rootEl",void 0),Rr(this,"width",Uh,this),Rr(this,"height",Xh,this),Zr(this,"theme",void 0),Zr(this,"eventCenter",void 0),Zr(this,"modelMap",new Map),Zr(this,"topElement",void 0),Zr(this,"animation",void 0),Zr(this,"idGenerator",void 0),Zr(this,"edgeGenerator",void 0),Zr(this,"nodeMoveRules",[]),Rr(this,"edgeType",Yh,this),Rr(this,"nodes",Wh,this),Rr(this,"edges",Vh,this),Rr(this,"overlapMode",Kh,this),Rr(this,"background",Zh,this),Rr(this,"transformModel",Jh,this),Rr(this,"editConfigModel",Qh,this),Rr(this,"gridSize",qh,this),Rr(this,"partial",ev,this),Rr(this,"fakerNode",tv,this);var t=r.container,n=r.background,o=n===void 0?{}:n,a=r.grid,f=r.idGenerator,p=r.edgeGenerator,g=r.animation;this.background=o,Oi(a)==="object"&&(this.gridSize=a.size),this.rootEl=t,this.editConfigModel=new lp(r),this.eventCenter=new lP,this.transformModel=new WS(this.eventCenter),this.theme=_p(r.style),this.edgeType=r.edgeType||"polyline",this.width=r.width,this.height=r.height,this.animation=NT(g),this.partial=r.partial,this.overlapMode=r.overlapMode||0,this.idGenerator=f,this.edgeGenerator=xT(this,p),this.width=r.width||this.rootEl.getBoundingClientRect().width,this.height=r.height||this.rootEl.getBoundingClientRect().height,this.flowId=_n()}return LT(e,[{key:"nodesMap",get:function(){return this.nodes.reduce(function(t,n,o){return t[n.id]={index:o,model:n},t},{})}},{key:"edgesMap",get:function(){return this.edges.reduce(function(t,n,o){return t[n.id]={index:o,model:n},t},{})}},{key:"modelsMap",get:function(){return[].concat(jo(this.nodes),jo(this.edges)).reduce(function(t,n){return t[n.id]=n,t},{})}},{key:"sortElements",get:function(){var t=[];this.nodes.forEach(function(g){return t.push(g)}),this.edges.forEach(function(g){return t.push(g)}),t=t.sort(function(g,O){return g.zIndex-O.zIndex});for(var n=[],o=[-Za,-Za],a=[this.width+Za,this.height+Za],f=0;f<t.length;f++){var p=t[f];p.visible&&(!this.partial||p.isSelected||this.isElementInArea(p,o,a,!1,!1))&&n.push(p)}return n}},{key:"textEditElement",get:function(){var t=this.nodes.find(function(o){return o.state===Ot.TEXT_EDIT}),n=this.edges.find(function(o){return o.state===Ot.TEXT_EDIT});return t||n}},{key:"selectElements",get:function(){var t=new Map;return this.nodes.forEach(function(n){n.isSelected&&t.set(n.id,n)}),this.edges.forEach(function(n){n.isSelected&&t.set(n.id,n)}),t}},{key:"getAreaElement",value:function(t,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,p=[],g=[];this.nodes.forEach(function(j){return g.push(j)}),this.edges.forEach(function(j){return g.push(j)});for(var O=0;O<g.length;O++){var M=g[O];(!f||M.visible)&&this.isElementInArea(M,t,n,o,a)&&p.push(M)}return p}},{key:"getModel",value:function(t){return this.modelMap.get(t)}},{key:"getNodeModelById",value:function(t){var n;return this.fakerNode&&t===this.fakerNode.id?this.fakerNode:(n=this.nodesMap[t])===null||n===void 0?void 0:n.model}},{key:"getPointByClient",value:function(t){var n=t.x,o=t.y,a=this.rootEl.getBoundingClientRect(),f={x:n-a.left,y:o-a.top},p=this.transformModel.HtmlPointToCanvasPoint([f.x,f.y]),g=bi(p,2),O=g[0],M=g[1];return{domOverlayPosition:f,canvasOverlayPosition:{x:O,y:M}}}},{key:"isElementInArea",value:function(t,n,o){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;if(t.BaseType===Ft.NODE){t=t;for(var p=xr(t),g=p.minX,O=p.minY,M=p.maxX,j=p.maxY,z=[{x:g,y:O},{x:M,y:O},{x:M,y:j},{x:g,y:j}],$=f,Z=0;Z<z.length;Z++){var ie=z[Z],oe=ie.x,le=ie.y,Ae=this.transformModel.CanvasPointToHtmlPoint([oe,le]),Ce=bi(Ae,2);if(oe=Ce[0],le=Ce[1],lf([oe,le],n,o)!==f){$=!f;break}}return $}if(t.BaseType===Ft.EDGE){t=t;var Ee=t,Be=Ee.startPoint,Ne=Ee.endPoint,Ue=this.transformModel.CanvasPointToHtmlPoint([Be.x,Be.y]),De=this.transformModel.CanvasPointToHtmlPoint([Ne.x,Ne.y]),it=lf(Ue,n,o),vt=lf(De,n,o);return a?it&&vt:it||vt}return!1}},{key:"graphDataToModel",value:function(t){var n=this;(!this.width||!this.height)&&this.resize(),this.nodes=Ma(t.nodes,function(o){var a=n.getModel(o.type);if(!a)throw new Error("\u627E\u4E0D\u5230".concat(o.type,"\u5BF9\u5E94\u7684\u8282\u70B9\u3002"));var f=o.x,p=o.y;return f&&p&&(o.x=In(f,n.gridSize),o.y=In(p,n.gridSize),Oi(o.text)==="object"&&(o.text.x-=Lp(f,n.gridSize),o.text.y-=Lp(p,n.gridSize))),new a(o,n)}),this.edges=Ma(t.edges,function(o){var a=n.getModel(o.type);if(!a)throw new Error("\u627E\u4E0D\u5230".concat(o.type,"\u5BF9\u5E94\u7684\u8FB9\u3002"));return new a(o,n)})}},{key:"modelToGraphData",value:function(){var t=[];this.edges.forEach(function(o){var a=o.getData();a&&!o.virtual&&t.push(a)});var n=[];return this.nodes.forEach(function(o){var a=o.getData();a&&!o.virtual&&n.push(a)}),{nodes:n,edges:t}}},{key:"modelToHistoryData",value:function(){for(var t=!1,n=[],o=0;o<this.nodes.length;o++){var a=this.nodes[o];if(a.isDragging){t=!0;break}else n.push(a.getHistoryData())}if(t)return!1;for(var f=!1,p=[],g=0;g<this.edges.length;g++){var O=this.edges[g];if(O.isDragging){f=!0;break}else p.push(O.getHistoryData())}return f?!1:{nodes:n,edges:p}}},{key:"getEdgeModelById",value:function(t){var n;return(n=this.edgesMap[t])===null||n===void 0?void 0:n.model}},{key:"getElement",value:function(t){return this.modelsMap[t]}},{key:"getNodeEdges",value:function(t){for(var n=[],o=0;o<this.edges.length;o++){var a=this.edges[o],f=this.edges[o].sourceNodeId===t,p=this.edges[o].targetNodeId===t;(f||p)&&n.push(a)}return n}},{key:"getSelectElements",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,n=this.selectElements,o={nodes:[],edges:[]};return n.forEach(function(a){if(a.BaseType===Ft.NODE&&o.nodes.push(a.getData()),a.BaseType===Ft.EDGE){var f=a.getData(),p=n.get(f.sourceNodeId)&&n.get(f.targetNodeId);(t||p)&&o.edges.push(f)}}),o}},{key:"updateAttributes",value:function(t,n){var o=this.getElement(t);o.updateAttributes(n)}},{key:"changeNodeId",value:function(t,n){return n||(n=_n()),this.nodesMap[n]?(console.warn("\u5F53\u524D\u6D41\u7A0B\u56FE\u5DF2\u5B58\u5728\u8282\u70B9".concat(n,", \u4FEE\u6539\u5931\u8D25")),""):this.nodesMap[t]?(this.edges.forEach(function(o){o.sourceNodeId===t&&(o.sourceNodeId=n),o.targetNodeId===t&&(o.targetNodeId=n)}),this.nodesMap[t].model.id=n,n):(console.warn("\u5F53\u524D\u6D41\u7A0B\u56FE\u627E\u4E0D\u5230\u8282\u70B9".concat(n,", \u4FEE\u6539\u5931\u8D25")),"")}},{key:"changeEdgeId",value:function(t,n){return n||(n=_n()),this.edgesMap[n]?(console.warn("\u5F53\u524D\u6D41\u7A0B\u56FE\u5DF2\u5B58\u5728\u8FB9: ".concat(n,", \u4FEE\u6539\u5931\u8D25")),""):this.edgesMap[t]?(this.edges.forEach(function(o){o.id===t&&o.changeEdgeId(n)}),n):(console.warn("\u5F53\u524D\u6D41\u7A0B\u56FE\u627E\u4E0D\u5230\u8FB9: ".concat(n,", \u4FEE\u6539\u5931\u8D25")),"")}},{key:"setFakerNode",value:function(t){this.fakerNode=t}},{key:"removeFakerNode",value:function(){this.fakerNode=null}},{key:"setModel",value:function(t,n){return this.modelMap.set(t,n)}},{key:"toFront",value:function(t){var n,o,a=((n=this.nodesMap[t])===null||n===void 0?void 0:n.model)||((o=this.edgesMap[t])===null||o===void 0?void 0:o.model);if(a){if(this.overlapMode===Sr.DEFAULT){var f;(f=this.topElement)===null||f===void 0||f.setZIndex(),a.setZIndex(HS),this.topElement=a}this.overlapMode===Sr.INCREASE&&this.setElementZIndex(t,"top")}}},{key:"setElementZIndex",value:function(t,n){var o,a,f=((o=this.nodesMap[t])===null||o===void 0?void 0:o.model)||((a=this.edgesMap[t])===null||a===void 0?void 0:a.model);if(f){var p;typeof n=="number"&&(p=n),n==="top"&&(p=hf()),n==="bottom"&&(p=jP()),f.setZIndex(p)}}},{key:"deleteNode",value:function(t){var n=this.nodesMap[t].model.getData();this.deleteEdgeBySource(t),this.deleteEdgeByTarget(t),this.nodes.splice(this.nodesMap[t].index,1),this.eventCenter.emit(ot.NODE_DELETE,{data:n})}},{key:"addNode",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ot.NODE_ADD,o=rr(t);o.id&&this.nodesMap[t.id]&&delete o.id;var a=this.getModel(o.type);if(!a)throw new Error("\u627E\u4E0D\u5230".concat(o.type,"\u5BF9\u5E94\u7684\u8282\u70B9\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u5DF2\u6CE8\u518C\u6B64\u7C7B\u578B\u8282\u70B9\u3002"));o.x=In(o.x,this.gridSize),o.y=In(o.y,this.gridSize);var f=new a(o,this);this.nodes.push(f);var p=f.getData();return this.eventCenter.emit(n,{data:p}),f}},{key:"cloneNode",value:function(t){var n=this.getNodeModelById(t),o=n.getData();o.x+=30,o.y+=30,delete o.id,o.text&&(o.text.x+=30,o.text.y+=30);var a=this.addNode(o);return a.setSelected(!0),n.setSelected(!1),a.getData()}},{key:"moveNode",value:function(t,n,o){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,f=this.nodesMap[t];if(!f){console.warn("\u4E0D\u5B58\u5728id\u4E3A".concat(t,"\u7684\u8282\u70B9"));return}var p=f.model,g=p.getMoveDistance(n,o,a),O=bi(g,2);n=O[0],o=O[1],this.moveEdge(t,n,o)}},{key:"moveNode2Coordinate",value:function(t,n,o){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,f=this.nodesMap[t];if(!f){console.warn("\u4E0D\u5B58\u5728id\u4E3A".concat(t,"\u7684\u8282\u70B9"));return}var p=f.model,g=p.x,O=p.y,M=n-g,j=o-O;this.moveNode(t,M,j,a)}},{key:"editText",value:function(t){this.setElementStateById(t,Ot.TEXT_EDIT)}},{key:"addEdge",value:function(t){var n=rr(t),o=n.type;o||(o=this.edgeType),n.id&&this.edgesMap[n.id]&&delete n.id;var a=this.getModel(o);if(!a)throw new Error("\u627E\u4E0D\u5230".concat(o,"\u5BF9\u5E94\u7684\u8FB9\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u5DF2\u6CE8\u518C\u6B64\u7C7B\u578B\u8FB9\u3002"));var f=new a(Ka(Ka({},n),{},{type:o}),this),p=f.getData();return this.edges.push(f),this.eventCenter.emit(ot.EDGE_ADD,{data:p}),f}},{key:"moveEdge",value:function(t,n,o){for(var a=0;a<this.edges.length;a++){var f=this.edges[a],p=f.textPosition,g=p.x,O=p.y,M=this.edges[a].sourceNodeId===t,j=this.edges[a].targetNodeId===t;if(M&&f.moveStartPoint(n,o),j&&f.moveEndPoint(n,o),M||j){var z;if(f.customTextPosition===!0)f.resetTextPosition();else if(f.modelType===ht.POLYLINE_EDGE&&(z=f.text)!==null&&z!==void 0&&z.value){var $=f.text,Z=Fh($,f.points);f.moveText(Z.x-$.x,Z.y-$.y)}else{var ie=f.textPosition,oe=ie.x,le=ie.y;f.moveText(oe-g,le-O)}}}}},{key:"deleteEdgeBySourceAndTarget",value:function(t,n){for(var o=0;o<this.edges.length;o++)if(this.edges[o].sourceNodeId===t&&this.edges[o].targetNodeId===n){var a=this.edges[o].getData();this.edges.splice(o,1),o--,this.eventCenter.emit(ot.EDGE_DELETE,{data:a})}}},{key:"deleteEdgeById",value:function(t){var n=this.edgesMap[t];if(!!n){var o=this.edgesMap[t].index,a=this.edgesMap[t].model.getData();this.edges.splice(o,1),this.eventCenter.emit(ot.EDGE_DELETE,{data:a})}}},{key:"deleteEdgeBySource",value:function(t){for(var n=0;n<this.edges.length;n++)if(this.edges[n].sourceNodeId===t){var o=this.edges[n].getData();this.edges.splice(n,1),n--,this.eventCenter.emit(ot.EDGE_DELETE,{data:o})}}},{key:"deleteEdgeByTarget",value:function(t){for(var n=0;n<this.edges.length;n++)if(this.edges[n].targetNodeId===t){var o=this.edges[n].getData();this.edges.splice(n,1),n--,this.eventCenter.emit(ot.EDGE_DELETE,{data:o})}}},{key:"setElementStateById",value:function(t,n,o){this.nodes.forEach(function(a){a.id===t?a.setElementState(n,o):a.setElementState(Ot.DEFAULT)}),this.edges.forEach(function(a){a.id===t?a.setElementState(n,o):a.setElementState(Ot.DEFAULT)})}},{key:"updateText",value:function(t,n){this.nodes.forEach(function(o){o.id===t&&o.updateText(n)}),this.edges.forEach(function(o){o.id===t&&o.updateText(n)})}},{key:"selectNodeById",value:function(t){var n,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;o||this.clearSelectElements();var a=(n=this.nodesMap[t])===null||n===void 0?void 0:n.model;a==null||a.setSelected(!0)}},{key:"selectEdgeById",value:function(t){var n,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;o||this.clearSelectElements();var a=(n=this.edgesMap[t])===null||n===void 0?void 0:n.model;a==null||a.setSelected(!0)}},{key:"selectElementById",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;n||this.clearSelectElements();var o=this.getElement(t);o==null||o.setSelected(!0)}},{key:"clearSelectElements",value:function(){if(this.selectElements.forEach(function(n){n==null||n.setSelected(!1)}),this.selectElements.clear(),this.overlapMode===Sr.DEFAULT){var t;(t=this.topElement)===null||t===void 0||t.setZIndex()}}},{key:"moveNodes",value:function(t,n,o){for(var a=this,f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,p=t.reduce(function(oe,le){var Ae=a.nodesMap[le].model,Ce=Ae.getMoveDistance(n,o,f);return oe[le]=Ce,oe},{}),g=0;g<this.edges.length;g++){var O=this.edges[g],M=p[O.sourceNodeId],j=void 0,z=void 0;if(M){var $=bi(M,2);j=$[0],z=$[1],O.moveStartPoint(j,z)}var Z=p[O.sourceNodeId];if(Z){var ie=bi(Z,2);j=ie[0],z=ie[1],O.moveEndPoint(j,z)}(M||Z)&&O.moveText(j,z)}}},{key:"addNodeMoveRules",value:function(t){this.nodeMoveRules.includes(t)||this.nodeMoveRules.push(t)}},{key:"setDefaultEdgeType",value:function(t){this.edgeType=t}},{key:"changeNodeType",value:function(t,n){var o=this.getNodeModelById(t);if(!o){console.warn("\u627E\u4E0D\u5230id\u4E3A".concat(t,"\u7684\u8282\u70B9"));return}var a=o.getData();a.type=n;var f=this.getModel(n);if(!f)throw new Error("\u627E\u4E0D\u5230".concat(n,"\u5BF9\u5E94\u7684\u8282\u70B9\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u5DF2\u6CE8\u518C\u6B64\u7C7B\u578B\u8282\u70B9\u3002"));var p=new f(a,this);this.nodes.splice(this.nodesMap[t].index,1,p);var g=this.getNodeEdges(t);g.forEach(function(O){if(O.sourceNodeId===t){var M=Xp(p,O.startPoint,p.width,p.height);O.updateStartPoint(M)}if(O.targetNodeId===t){var j=Xp(p,O.endPoint,p.width,p.height);O.updateEndPoint(j)}})}},{key:"changeEdgeType",value:function(t,n){var o=this.getEdgeModelById(t);if(!o){console.warn("\u627E\u4E0D\u5230id\u4E3A".concat(t,"\u7684\u8FB9"));return}if(o.type!==n){var a=o.getData();a.type=n;var f=this.getModel(n);if(!f)throw new Error("\u627E\u4E0D\u5230".concat(n,"\u5BF9\u5E94\u7684\u8282\u70B9\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u5DF2\u6CE8\u518C\u6B64\u7C7B\u578B\u8282\u70B9\u3002"));delete a.pointsList;var p=new f(a,this);this.edges.splice(this.edgesMap[t].index,1,p)}}},{key:"getNodeIncomingEdge",value:function(t){var n=[];return this.edges.forEach(function(o){o.targetNodeId===t&&n.push(o)}),n}},{key:"getNodeOutgoingEdge",value:function(t){var n=[];return this.edges.forEach(function(o){o.sourceNodeId===t&&n.push(o)}),n}},{key:"getNodeIncomingNode",value:function(t){var n=this,o=[];return this.edges.forEach(function(a){a.targetNodeId===t&&o.push(n.nodesMap[a.sourceNodeId].model)}),o}},{key:"getNodeOutgoingNode",value:function(t){var n=this,o=[];return this.edges.forEach(function(a){a.sourceNodeId===t&&o.push(n.nodesMap[a.targetNodeId].model)}),o}},{key:"setTheme",value:function(t){this.theme=_p(Ka(Ka({},this.theme),t))}},{key:"resize",value:function(t,n){this.width=t||this.rootEl.getBoundingClientRect().width,this.height=n||this.rootEl.getBoundingClientRect().height,(!this.width||!this.height)&&console.warn("\u6E32\u67D3\u753B\u5E03\u7684\u65F6\u5019\u65E0\u6CD5\u83B7\u53D6\u753B\u5E03\u5BBD\u9AD8\uFF0C\u8BF7\u786E\u8BA4\u5728container\u5DF2\u6302\u8F7D\u5230DOM\u3002@see https://github.com/didi/LogicFlow/issues/675")}},{key:"clearData",value:function(){this.nodes=[],this.edges=[]}},{key:"getVirtualRectSize",value:function(){var t=this.nodes,n=[],o=[];t.forEach(function($){var Z=$.x,ie=$.y,oe=$.width,le=$.height,Ae=$.getNodeStyle(),Ce=Ae.strokeWidth,Ee=Ce===void 0?0:Ce;n=n.concat([Z+oe/2+Ee,Z-oe/2-Ee]),o=o.concat([ie+le/2+Ee,ie-le/2-Ee])});var a=Math.min.apply(Math,jo(n)),f=Math.max.apply(Math,jo(n)),p=Math.min.apply(Math,jo(o)),g=Math.max.apply(Math,jo(o)),O=f-a||0,M=g-p||0,j=a+O/2,z=p+M/2;return{virtualRectWidth:O,virtualRectHeight:M,virtualRectCenterPositionX:j,virtualRectCenterPositionY:z}}},{key:"translateCenter",value:function(){var t=this.nodes,n=this.width,o=this.height,a=this.rootEl,f=this.transformModel;if(!!t.length){var p=n||a.clientWidth,g=o||a.clientHeight,O=this.getVirtualRectSize(),M=O.virtualRectCenterPositionX,j=O.virtualRectCenterPositionY;f.focusOn(M,j,p,g)}}},{key:"fitView",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:20,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:20,o=this.nodes,a=this.width,f=this.height,p=this.rootEl,g=this.transformModel;if(!!o.length){var O=a||p.clientWidth,M=f||p.clientHeight,j=this.getVirtualRectSize(),z=j.virtualRectWidth,$=j.virtualRectHeight,Z=j.virtualRectCenterPositionX,ie=j.virtualRectCenterPositionY,oe=(z+n)/O,le=($+t)/M,Ae=0;Ae=1/Math.max(oe,le);var Ce=[O/2,M/2];g.zoom(Ae,Ce),g.focusOn(Z,ie,O,M)}}},{key:"openEdgeAnimation",value:function(t){var n=this.getEdgeModelById(t);n.openEdgeAnimation()}},{key:"closeEdgeAnimation",value:function(t){var n=this.getEdgeModelById(t);n.closeEdgeAnimation()}}]),e}(),Uh=Qe(he.prototype,"width",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Xh=Qe(he.prototype,"height",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Yh=Qe(he.prototype,"edgeType",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Wh=Qe(he.prototype,"nodes",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Vh=Qe(he.prototype,"edges",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Kh=Qe(he.prototype,"overlapMode",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Sr.DEFAULT}}),Zh=Qe(he.prototype,"background",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Jh=Qe(he.prototype,"transformModel",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Qh=Qe(he.prototype,"editConfigModel",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),qh=Qe(he.prototype,"gridSize",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),ev=Qe(he.prototype,"partial",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),tv=Qe(he.prototype,"fakerNode",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Qe(he.prototype,"nodesMap",[s.m],Object.getOwnPropertyDescriptor(he.prototype,"nodesMap"),he.prototype),Qe(he.prototype,"edgesMap",[s.m],Object.getOwnPropertyDescriptor(he.prototype,"edgesMap"),he.prototype),Qe(he.prototype,"modelsMap",[s.m],Object.getOwnPropertyDescriptor(he.prototype,"modelsMap"),he.prototype),Qe(he.prototype,"sortElements",[s.m],Object.getOwnPropertyDescriptor(he.prototype,"sortElements"),he.prototype),Qe(he.prototype,"textEditElement",[s.m],Object.getOwnPropertyDescriptor(he.prototype,"textEditElement"),he.prototype),Qe(he.prototype,"selectElements",[s.m],Object.getOwnPropertyDescriptor(he.prototype,"selectElements"),he.prototype),Qe(he.prototype,"setFakerNode",[s.k],Object.getOwnPropertyDescriptor(he.prototype,"setFakerNode"),he.prototype),Qe(he.prototype,"removeFakerNode",[s.k],Object.getOwnPropertyDescriptor(he.prototype,"removeFakerNode"),he.prototype),Qe(he.prototype,"setModel",[s.k],Object.getOwnPropertyDescriptor(he.prototype,"setModel"),he.prototype),Qe(he.prototype,"toFront",[s.k],Object.getOwnPropertyDescriptor(he.prototype,"toFront"),he.prototype),Qe(he.prototype,"setElementZIndex",[s.k],Object.getOwnPropertyDescriptor(he.prototype,"setElementZIndex"),he.prototype),Qe(he.prototype,"deleteNode",[s.k],Object.getOwnPropertyDescriptor(he.prototype,"deleteNode"),he.prototype),Qe(he.prototype,"addNode",[s.k],Object.getOwnPropertyDescriptor(he.prototype,"addNode"),he.prototype),Qe(he.prototype,"cloneNode",[s.k],Object.getOwnPropertyDescriptor(he.prototype,"cloneNode"),he.prototype),Qe(he.prototype,"moveNode",[s.k],Object.getOwnPropertyDescriptor(he.prototype,"moveNode"),he.prototype),Qe(he.prototype,"moveNode2Coordinate",[s.k],Object.getOwnPropertyDescriptor(he.prototype,"moveNode2Coordinate"),he.prototype),Qe(he.prototype,"editText",[s.k],Object.getOwnPropertyDescriptor(he.prototype,"editText"),he.prototype),Qe(he.prototype,"addEdge",[s.k],Object.getOwnPropertyDescriptor(he.prototype,"addEdge"),he.prototype),Qe(he.prototype,"moveEdge",[s.k],Object.getOwnPropertyDescriptor(he.prototype,"moveEdge"),he.prototype),Qe(he.prototype,"deleteEdgeBySourceAndTarget",[s.k],Object.getOwnPropertyDescriptor(he.prototype,"deleteEdgeBySourceAndTarget"),he.prototype),Qe(he.prototype,"deleteEdgeById",[s.k],Object.getOwnPropertyDescriptor(he.prototype,"deleteEdgeById"),he.prototype),Qe(he.prototype,"deleteEdgeBySource",[s.k],Object.getOwnPropertyDescriptor(he.prototype,"deleteEdgeBySource"),he.prototype),Qe(he.prototype,"deleteEdgeByTarget",[s.k],Object.getOwnPropertyDescriptor(he.prototype,"deleteEdgeByTarget"),he.prototype),Qe(he.prototype,"setElementStateById",[s.k],Object.getOwnPropertyDescriptor(he.prototype,"setElementStateById"),he.prototype),Qe(he.prototype,"updateText",[s.k],Object.getOwnPropertyDescriptor(he.prototype,"updateText"),he.prototype),Qe(he.prototype,"selectNodeById",[s.k],Object.getOwnPropertyDescriptor(he.prototype,"selectNodeById"),he.prototype),Qe(he.prototype,"selectEdgeById",[s.k],Object.getOwnPropertyDescriptor(he.prototype,"selectEdgeById"),he.prototype),Qe(he.prototype,"selectElementById",[s.k],Object.getOwnPropertyDescriptor(he.prototype,"selectElementById"),he.prototype),Qe(he.prototype,"clearSelectElements",[s.k],Object.getOwnPropertyDescriptor(he.prototype,"clearSelectElements"),he.prototype),Qe(he.prototype,"moveNodes",[s.k],Object.getOwnPropertyDescriptor(he.prototype,"moveNodes"),he.prototype),Qe(he.prototype,"setDefaultEdgeType",[s.k],Object.getOwnPropertyDescriptor(he.prototype,"setDefaultEdgeType"),he.prototype),Qe(he.prototype,"changeNodeType",[s.k],Object.getOwnPropertyDescriptor(he.prototype,"changeNodeType"),he.prototype),Qe(he.prototype,"changeEdgeType",[s.k],Object.getOwnPropertyDescriptor(he.prototype,"changeEdgeType"),he.prototype),Qe(he.prototype,"getNodeIncomingEdge",[s.k],Object.getOwnPropertyDescriptor(he.prototype,"getNodeIncomingEdge"),he.prototype),Qe(he.prototype,"getNodeOutgoingEdge",[s.k],Object.getOwnPropertyDescriptor(he.prototype,"getNodeOutgoingEdge"),he.prototype),Qe(he.prototype,"getNodeIncomingNode",[s.k],Object.getOwnPropertyDescriptor(he.prototype,"getNodeIncomingNode"),he.prototype),Qe(he.prototype,"getNodeOutgoingNode",[s.k],Object.getOwnPropertyDescriptor(he.prototype,"getNodeOutgoingNode"),he.prototype),Qe(he.prototype,"setTheme",[s.k],Object.getOwnPropertyDescriptor(he.prototype,"setTheme"),he.prototype),Qe(he.prototype,"resize",[s.k],Object.getOwnPropertyDescriptor(he.prototype,"resize"),he.prototype),Qe(he.prototype,"clearData",[s.k],Object.getOwnPropertyDescriptor(he.prototype,"clearData"),he.prototype),Qe(he.prototype,"translateCenter",[s.k],Object.getOwnPropertyDescriptor(he.prototype,"translateCenter"),he.prototype),Qe(he.prototype,"fitView",[s.k],Object.getOwnPropertyDescriptor(he.prototype,"fitView"),he.prototype),Qe(he.prototype,"openEdgeAnimation",[s.k],Object.getOwnPropertyDescriptor(he.prototype,"openEdgeAnimation"),he.prototype),Qe(he.prototype,"closeEdgeAnimation",[s.k],Object.getOwnPropertyDescriptor(he.prototype,"closeEdgeAnimation"),he.prototype),he),zT=iv;function Ja(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ja=function(t){return typeof t}:Ja=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ja(e)}var av;function Mf(){return Mf=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Mf.apply(this,arguments)}function FT(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function uv(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function HT(e,r,t){return r&&uv(e.prototype,r),t&&uv(e,t),e}function GT(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&Af(e,r)}function Af(e,r){return Af=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Af(e,r)}function kT(e){var r=UT();return function(){var n=Qa(e),o;if(r){var a=Qa(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return $T(this,o)}}function $T(e,r){if(r&&(Ja(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Jr(e)}function Jr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function UT(){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{return!1}}function Qa(e){return Qa=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Qa(e)}function dn(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var XT=$r(av=function(e){GT(t,e);var r=kT(t);function t(n){var o;FT(this,t),o=r.call(this),dn(Jr(o),"stepDrag",void 0),dn(Jr(o),"stepScrollX",0),dn(Jr(o),"stepScrollY",0),dn(Jr(o),"onDragging",function(g){var O=g.deltaX,M=g.deltaY;o.setState({isDragging:!0});var j=o.props.graphModel,z=j.transformModel,$=j.editConfigModel;$.stopMoveGraph||z.translate(O,M)}),dn(Jr(o),"onDragEnd",function(){o.setState({isDragging:!1})}),dn(Jr(o),"zoomHandler",function(g){var O=o.props,M=O.graphModel,j=M.editConfigModel,z=M.transformModel,$=M.gridSize,Z=O.graphModel,ie=g.deltaX,oe=g.deltaY;if(!j.stopScrollGraph&&g.ctrlKey!==!0){if(g.preventDefault(),o.stepScrollX+=ie,o.stepScrollY+=oe,Math.abs(o.stepScrollX)>=$){var le=o.stepScrollX%$,Ae=o.stepScrollX-le;z.translate(-Ae*z.SCALE_X,0),o.stepScrollX=le}if(Math.abs(o.stepScrollY)>=$){var Ce=o.stepScrollY%$,Ee=o.stepScrollY-Ce;z.translate(0,-Ee*z.SCALE_Y),o.stepScrollY=Ce}return}if(!j.stopZoomGraph){g.preventDefault();var Be=Z.getPointByClient({x:g.clientX,y:g.clientY}),Ne=Be.canvasOverlayPosition,Ue=Ne.x,De=Ne.y;z.zoom(g.deltaY<0,[Ue,De])}}),dn(Jr(o),"clickHandler",function(g){var O=g.target;if(O.getAttribute("name")==="canvas-overlay"){var M=o.props.graphModel,j=M.selectElements;j.size>0&&M.clearSelectElements(),M.eventCenter.emit(ot.BLANK_CLICK,{e:g})}}),dn(Jr(o),"handleContextMenu",function(g){var O=g.target;if(O.getAttribute("name")==="canvas-overlay"){g.preventDefault();var M=o.props.graphModel,j=M.getPointByClient({x:g.clientX,y:g.clientY});M.eventCenter.emit(ot.BLANK_CONTEXTMENU,{e:g,position:j})}}),dn(Jr(o),"mouseDownHandler",function(g){var O=o.props.graphModel,M=O.eventCenter,j=O.editConfigModel,z=O.transformModel.SCALE_X,$=O.gridSize,Z=g.target,ie=!j.adjustEdge&&!j.adjustNodePosition;(Z.getAttribute("name")==="canvas-overlay"||ie)&&(j.stopMoveGraph?M.emit(ot.BLANK_MOUSEDOWN,{e:g}):(o.stepDrag.setStep($*z),o.stepDrag.handleMouseDown(g)),o.clickHandler(g))});var a=n.graphModel,f=a.gridSize,p=a.eventCenter;return o.stepDrag=new cn({onDragging:o.onDragging,onDragEnd:o.onDragEnd,step:f,eventType:"BLANK",isStopPropagation:!1,eventCenter:p,model:null}),o.state={isDragging:!1},o}return HT(t,[{key:"render",value:function(){var o=this.props.graphModel.transformModel,a=o.getTransformStyle(),f=a.transform,p=this.props,g=p.children,O=p.dnd,M=this.state.isDragging;return Object(ae.g)("svg",Mf({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",name:"canvas-overlay",onWheel:this.zoomHandler,onMouseDown:this.mouseDownHandler,onContextMenu:this.handleContextMenu,className:M?"lf-canvas-overlay lf-dragging":"lf-canvas-overlay lf-drag-able"},O.eventMap()),Object(ae.g)("g",{transform:f},g))}}]),t}(ae.a))||av,YT=XT;function qa(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?qa=function(t){return typeof t}:qa=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qa(e)}var lv;function WT(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function sv(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function VT(e,r,t){return r&&sv(e.prototype,r),t&&sv(e,t),e}function KT(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&Nf(e,r)}function Nf(e,r){return Nf=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Nf(e,r)}function ZT(e){var r=qT();return function(){var n=eu(e),o;if(r){var a=eu(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return JT(this,o)}}function JT(e,r){if(r&&(qa(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return QT(e)}function QT(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qT(){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{return!1}}function eu(e){return eu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},eu(e)}var ew=$r(lv=function(e){KT(t,e);var r=ZT(t);function t(){return WT(this,t),r.apply(this,arguments)}return VT(t,[{key:"componentDidMount",value:function(){this.triggerToolRender()}},{key:"componentDidUpdate",value:function(){this.triggerToolRender()}},{key:"getTools",value:function(){var o=this.props,a=o.tool,f=o.graphModel,p=a.getTools(),g=p.map(function(O){return Object(ae.g)(O,{graphModel:f,logicFlow:a.instance})});return a.components=g,g}},{key:"triggerToolRender",value:function(){var o=this.props,a=o.tool,f=o.graphModel,p=document.querySelector("#ToolOverlay_".concat(f.flowId)),g=a.getInstance();g.components.forEach(function(O){return O(g,p)}),g.components=[]}},{key:"render",value:function(){var o=this.props.graphModel;return Object(ae.g)("div",{className:"lf-tool-overlay",id:"ToolOverlay_".concat(o.flowId)},this.getTools())}}]),t}(ae.a))||lv;function tu(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?tu=function(t){return typeof t}:tu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tu(e)}function tw(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function fv(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function rw(e,r,t){return r&&fv(e.prototype,r),t&&fv(e,t),e}function nw(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&Df(e,r)}function Df(e,r){return Df=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Df(e,r)}function ow(e){var r=uw();return function(){var n=ru(e),o;if(r){var a=ru(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return iw(this,o)}}function iw(e,r){if(r&&(tu(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return aw(e)}function aw(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uw(){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{return!1}}function ru(e){return ru=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ru(e)}var lw=function(e){nw(t,e);var r=ow(t);function t(){return tw(this,t),r.apply(this,arguments)}return rw(t,[{key:"render",value:function(){var o=this.props.background;return Object(ae.g)("div",{className:"lf-background"},Object(ae.g)("div",{style:o,className:"lf-background-area"}))}}]),t}(ae.a);function nu(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?nu=function(t){return typeof t}:nu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nu(e)}var cv;function sw(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function dv(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function fw(e,r,t){return r&&dv(e.prototype,r),t&&dv(e,t),e}function cw(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&jf(e,r)}function jf(e,r){return jf=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},jf(e,r)}function dw(e){var r=hw();return function(){var n=ou(e),o;if(r){var a=ou(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return pw(this,o)}}function pw(e,r){if(r&&(nu(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return pv(e)}function pv(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hw(){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{return!1}}function ou(e){return ou=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ou(e)}function vw(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var hv=$r(cv=function(e){cw(t,e);var r=dw(t);function t(){var n;sw(this,t);for(var o=arguments.length,a=new Array(o),f=0;f<o;f++)a[f]=arguments[f];return n=r.call.apply(r,[this].concat(a)),vw(pv(n),"id",_n()),n}return fw(t,[{key:"renderDot",value:function(){var o=this.props,a=o.config,f=a.color,p=a.thickness,g=p===void 0?2:p,O=o.size,M=o.visible,j=Math.min(Math.max(2,g),O/2),z=1;return M||(z=0),Object(ae.g)("rect",{width:j,height:j,rx:j/2,ry:j/2,fill:f,opacity:z})}},{key:"renderMesh",value:function(){var o=this.props,a=o.config,f=a.color,p=a.thickness,g=p===void 0?1:p,O=o.size,M=o.visible,j=Math.min(Math.max(1,g),O/2),z="M ".concat(O," 0 H0 M0 0 V0 ").concat(O),$=1;return M||($=0),Object(ae.g)("path",{d:z,stroke:f,strokeWidth:j,opacity:$})}},{key:"render",value:function(){var o=this.props,a=o.type,f=o.size,p=o.graphModel.transformModel,g=p.SCALE_X,O=p.SKEW_Y,M=p.SKEW_X,j=p.SCALE_Y,z=p.TRANSLATE_X,$=p.TRANSLATE_Y,Z=[g,O,M,j,z,$].join(","),ie="matrix(".concat(Z,")");return Object(ae.g)("div",{className:"lf-grid"},Object(ae.g)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%"},Object(ae.g)("defs",null,Object(ae.g)("pattern",{id:this.id,patternUnits:"userSpaceOnUse",patternTransform:ie,x:"0",y:"0",width:f,height:f},a==="dot"&&this.renderDot(),a==="mesh"&&this.renderMesh())),Object(ae.g)("rect",{width:"100%",height:"100%",fill:"url(#".concat(this.id,")")})))}}]),t}(ae.a))||cv;hv.defaultProps={size:20,visible:!0,type:"dot",config:{color:"#ababab",thickness:1}},i(52);function iu(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?iu=function(t){return typeof t}:iu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},iu(e)}function yw(e,r){return Ow(e)||bw(e,r)||mw(e,r)||gw()}function gw(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mw(e,r){if(!!e){if(typeof e=="string")return vv(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return vv(e,r)}}function vv(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function bw(e,r){var t=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,f,p;try{for(t=t.call(e);!(o=(f=t.next()).done)&&(n.push(f.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function Ow(e){if(Array.isArray(e))return e}function Ew(e){var r={x1:10,y1:10,x2:20,y2:20,stroke:"black"};return Object.entries(e).forEach(function(t){var n=yw(t,2),o=n[0],a=n[1];if(o==="style")r[o]=a;else{var f=iu(a);f!=="object"&&(r[o]=a)}}),Object(ae.g)("line",r)}var Co=Ew;function au(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?au=function(t){return typeof t}:au=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},au(e)}var yv;function gv(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function uu(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?gv(Object(t),!0).forEach(function(n){Sw(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):gv(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Sw(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function xw(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function mv(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Pw(e,r,t){return r&&mv(e.prototype,r),t&&mv(e,t),e}function Tw(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&Cf(e,r)}function Cf(e,r){return Cf=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Cf(e,r)}function ww(e){var r=Nw();return function(){var n=lu(e),o;if(r){var a=lu(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return Mw(this,o)}}function Mw(e,r){if(r&&(au(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Aw(e)}function Aw(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Nw(){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{return!1}}function lu(e){return lu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},lu(e)}var Dw=$r(yv=function(e){Tw(t,e);var r=ww(t);function t(){return xw(this,t),r.apply(this,arguments)}return Pw(t,[{key:"render",value:function(){var o=this.props.snaplineModel,a=o.position,f=o.isShowHorizontal,p=o.isShowVertical,g=o.getStyle(),O=a.x,M=O===void 0?0:O,j=a.y,z=j===void 0?0:j,$=uu(uu({x1:-1e5,y1:z,x2:1e5,y2:z},g),{},{stroke:f?g.stroke:"none"}),Z=uu(uu({x1:M,y1:-1e5,x2:M,y2:1e5},g),{},{stroke:p?g.stroke:"none"});return Object(ae.g)("g",{className:"lf-snapline"},Object(ae.g)(Co,$),Object(ae.g)(Co,Z))}}]),t}(ae.a))||yv;function su(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?su=function(t){return typeof t}:su=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},su(e)}function jw(e,r){return _w(e)||Iw(e,r)||Rw(e,r)||Cw()}function Cw(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Rw(e,r){if(!!e){if(typeof e=="string")return bv(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return bv(e,r)}}function bv(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function Iw(e,r){var t=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,f,p;try{for(t=t.call(e);!(o=(f=t.next()).done)&&(n.push(f.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function _w(e){if(Array.isArray(e))return e}function zn(e){var r=e.x,t=e.y,n=e.width,o=e.height,a=e.className,f=e.radius,p=r-n/2,g=t-o/2,O={};return Object.entries(e).forEach(function(M){var j=jw(M,2),z=j[0],$=j[1],Z=su($);Z!=="object"&&(O[z]=$)}),a?O.className="lf-basic-shape ".concat(a):O.className="lf-basic-shape",f&&(O.rx=f,O.ry=f),O.x=p,O.y=g,Object(ae.g)("rect",O)}zn.defaultProps={className:"",radius:""};function fu(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?fu=function(t){return typeof t}:fu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fu(e)}var Ov;function Ro(){return Ro=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Ro.apply(this,arguments)}function Ev(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function Sv(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Ev(Object(t),!0).forEach(function(n){Bw(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ev(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Bw(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Lw(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function xv(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function zw(e,r,t){return r&&xv(e.prototype,r),t&&xv(e,t),e}function Fw(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&Rf(e,r)}function Rf(e,r){return Rf=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Rf(e,r)}function Hw(e){var r=$w();return function(){var n=cu(e),o;if(r){var a=cu(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return Gw(this,o)}}function Gw(e,r){if(r&&(fu(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return kw(e)}function kw(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $w(){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{return!1}}function cu(e){return cu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},cu(e)}var Uw=$r(Ov=function(e){Fw(t,e);var r=Hw(t);function t(){return Lw(this,t),r.apply(this,arguments)}return zw(t,[{key:"getNodesOutline",value:function(){var o=this.props.graphModel,a=o.nodes,f=o.editConfigModel,p=f.hoverOutline,g=f.nodeSelectedOutline,O=[];return a.forEach(function(M){if(M.isHovered||M.isSelected){var j=M.isHovered,z=M.isSelected,$=M.x,Z=M.y,ie=M.width,oe=M.height;if(g&&z||p&&j){var le=M.getOutlineStyle(),Ae={};if(Object.keys(le).forEach(function(Ee){Ee!=="hover"&&(Ae[Ee]=le[Ee])}),j){var Ce=le.hover;Ae=Sv(Sv({},Ae),Ce)}O.push(Object(ae.g)(zn,Ro({className:"lf-outline-node",x:$,y:Z,width:ie+10,height:oe+10},Ae)))}}}),O}},{key:"getEdgeOutline",value:function(){for(var o=this.props.graphModel,a=o.edges,f=o.editConfigModel,p=f.edgeSelectedOutline,g=f.hoverOutline,O=[],M=0;M<a.length;M++){var j=a[M];(p&&j.isSelected||g&&j.isHovered)&&(j.modelType===ht.LINE_EDGE?O.push(this.getLineOutline(j)):j.modelType===ht.POLYLINE_EDGE?O.push(this.getPolylineOutline(j)):j.modelType===ht.BEZIER_EDGE&&O.push(this.getBezierOutline(j)))}return O}},{key:"getLineOutline",value:function(o){var a=o.startPoint,f=o.endPoint,p=(a.x+f.x)/2,g=(a.y+f.y)/2,O=Math.abs(a.x-f.x)+10,M=Math.abs(a.y-f.y)+10,j=o.getOutlineStyle();return Object(ae.g)(zn,Ro({className:"lf-outline-edge",x:p,y:g,width:O,height:M},j))}},{key:"getPolylineOutline",value:function(o){var a=o.points,f=No(a),p=gi(f,8),g=p.x,O=p.y,M=p.width,j=p.height,z=o.getOutlineStyle();return Object(ae.g)(zn,Ro({className:"lf-outline",x:g,y:O,width:M,height:j},z))}},{key:"getBezierOutline",value:function(o){var a=o.path,f=Wa(a),p=gi(f,8),g=p.x,O=p.y,M=p.width,j=p.height,z=o.getOutlineStyle();return Object(ae.g)(zn,Ro({className:"lf-outline",x:g,y:O,width:M,height:j},z))}},{key:"render",value:function(){return Object(ae.g)("g",{className:"lf-outline"},this.getNodesOutline(),this.getEdgeOutline())}}]),t}(ae.a))||Ov;function du(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?du=function(t){return typeof t}:du=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},du(e)}function Xw(e,r){return Kw(e)||Vw(e,r)||Ww(e,r)||Yw()}function Yw(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ww(e,r){if(!!e){if(typeof e=="string")return Pv(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Pv(e,r)}}function Pv(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function Vw(e,r){var t=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,f,p;try{for(t=t.call(e);!(o=(f=t.next()).done)&&(n.push(f.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function Kw(e){if(Array.isArray(e))return e}function Ei(e){var r=e.x,t=r===void 0?0:r,n=e.y,o=n===void 0?0:n,a=e.r,f=a===void 0?4:a,p=e.className,g={cx:t,cy:o,r:f,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(e).forEach(function(O){var M=Xw(O,2),j=M[0],z=M[1],$=du(z);$!=="object"&&(g[j]=z)}),p?g.className="lf-basic-shape ".concat(p):g.className="lf-basic-shape",Object(ae.g)("circle",g)}function pu(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?pu=function(t){return typeof t}:pu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pu(e)}var Tv;function Zw(e,r){return eM(e)||qw(e,r)||Qw(e,r)||Jw()}function Jw(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qw(e,r){if(!!e){if(typeof e=="string")return wv(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return wv(e,r)}}function wv(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function qw(e,r){var t=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,f,p;try{for(t=t.call(e);!(o=(f=t.next()).done)&&(n.push(f.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function eM(e){if(Array.isArray(e))return e}function Si(){return Si=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Si.apply(this,arguments)}function Mv(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Av(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Nv(e,r,t){return r&&Av(e.prototype,r),t&&Av(e,t),e}function Dv(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&If(e,r)}function If(e,r){return If=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},If(e,r)}function jv(e){var r=rM();return function(){var n=vu(e),o;if(r){var a=vu(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return tM(this,o)}}function tM(e,r){if(r&&(pu(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hu(e)}function hu(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rM(){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{return!1}}function vu(e){return vu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},vu(e)}function _f(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var Cv=function(e){Dv(t,e);var r=jv(t);function t(){var n;return Mv(this,t),n=r.call(this),_f(hu(n),"dragHandler",void 0),_f(hu(n),"onDragging",function(o){var a=o.event,f=n.props,p=f.graphModel,g=f.bezierModel,O=f.type,M=p.getPointByClient({x:a.clientX,y:a.clientY}),j=M.canvasOverlayPosition,z=j.x,$=j.y;g.updateAdjustAnchor({x:z,y:$},O)}),_f(hu(n),"onDragEnd",function(){var o=n.props.bezierModel;o.isDragging=!1}),n.dragHandler=new cn({onDragging:n.onDragging,onDragEnd:n.onDragEnd}),n}return Nv(t,[{key:"render",value:function(){var o=this,a=this.props.position,f=a.x,p=a.y,g=this.props.bezierModel,O=g.getEdgeStyle(),M=O.adjustAnchor;return Object(ae.g)(Ei,Si({className:"lf-bezier-adjust-anchor",x:f,y:p},M,{onMouseDown:function(z){o.dragHandler.handleMouseDown(z)}}))}}]),t}(ae.a),nM=$r(Tv=function(e){Dv(t,e);var r=jv(t);function t(){return Mv(this,t),r.apply(this,arguments)}return Nv(t,[{key:"getBezierAdjust",value:function(o,a){var f=o.path,p=o.id,g=Wa(f),O=Zw(g,4),M=O[0],j=O[1],z=O[2],$=O[3],Z=o.getEdgeStyle(),ie=Z.adjustLine,oe=[];return oe.push(Object(ae.g)(Co,Si({x1:M.x,y1:M.y,x2:j.x,y2:j.y},ie))),oe.push(Object(ae.g)(Cv,{position:j,bezierModel:o,graphModel:a,key:"".concat(p,"_ePre"),type:"sNext"})),oe.push(Object(ae.g)(Co,Si({x1:$.x,y1:$.y,x2:z.x,y2:z.y},ie))),oe.push(Object(ae.g)(Cv,{position:z,bezierModel:o,graphModel:a,key:"".concat(p,"_sNext"),type:"ePre"})),oe}},{key:"selectedBezierEdge",value:function(){for(var o=this.props.graphModel,a=o.edges,f=[],p=0;p<a.length;p++){var g=a[p];g.isSelected&&g.modelType===ht.BEZIER_EDGE&&g.draggable&&f.push(this.getBezierAdjust(g,o))}return f}},{key:"render",value:function(){return Object(ae.g)("g",{className:"lf-bezier-adjust"},this.selectedBezierEdge())}}]),t}(ae.a))||Tv;function yu(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?yu=function(t){return typeof t}:yu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yu(e)}var Rv;function oM(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Iv(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function iM(e,r,t){return r&&Iv(e.prototype,r),t&&Iv(e,t),e}function aM(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&Bf(e,r)}function Bf(e,r){return Bf=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Bf(e,r)}function uM(e){var r=fM();return function(){var n=gu(e),o;if(r){var a=gu(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return lM(this,o)}}function lM(e,r){if(r&&(yu(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sM(e)}function sM(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fM(){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{return!1}}function gu(e){return gu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},gu(e)}var cM=$r(Rv=function(e){aM(t,e);var r=uM(t);function t(){return oM(this,t),r.apply(this,arguments)}return iM(t,[{key:"render",value:function(){var o=this.props.graphModel.transformModel,a=o.getTransformStyle(),f=a.transform,p=this.props.children;return Object(ae.g)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",className:"modification-overlay"},Object(ae.g)("g",{transform:f},p))}}]),t}(ae.a))||Rv;function mu(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?mu=function(t){return typeof t}:mu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mu(e)}var _v;function Lf(){return Lf=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Lf.apply(this,arguments)}function dM(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Bv(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function pM(e,r,t){return r&&Bv(e.prototype,r),t&&Bv(e,t),e}function hM(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&zf(e,r)}function zf(e,r){return zf=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},zf(e,r)}function vM(e){var r=mM();return function(){var n=bu(e),o;if(r){var a=bu(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return yM(this,o)}}function yM(e,r){if(r&&(mu(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return gM(e)}function gM(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mM(){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{return!1}}function bu(e){return bu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},bu(e)}var bM=$r(_v=function(e){hM(t,e);var r=vM(t);function t(){return dM(this,t),r.apply(this,arguments)}return pM(t,[{key:"getComponent",value:function(o,a){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"canvas-overlay",p=this.props.getView,g=p(o.type);return Object(ae.g)(g,{key:o.id,model:o,graphModel:a,overlay:f})}},{key:"render",value:function(){var o=this,a=this.props,f=a.graphModel,p=a.tool,g=a.options,O=a.dnd,M=a.snaplineModel,j={};g.width&&(j.width="".concat(f.width,"px")),g.height&&(j.height="".concat(f.height,"px"));var z=g.grid,$=f.fakerNode,Z=f.editConfigModel,ie=Z.adjustEdge;return Object(ae.g)("div",{className:"lf-graph","flow-id":f.flowId,style:j},Object(ae.g)(YT,{graphModel:f,dnd:O},Object(ae.g)("g",{className:"lf-base"},Ma(f.sortElements,function(oe){return o.getComponent(oe,f)})),$?this.getComponent($,f):""),Object(ae.g)(cM,{graphModel:f},Object(ae.g)(Uw,{graphModel:f}),ie?Object(ae.g)(nM,{graphModel:f}):"",g.snapline!==!1?Object(ae.g)(Dw,{snaplineModel:M}):""),Object(ae.g)(ew,{graphModel:f,tool:p}),g.background&&Object(ae.g)(lw,{background:g.background}),g.grid&&Object(ae.g)(hv,Lf({},z,{graphModel:f})))}}]),t}(ae.a))||_v,OM=bM;function Lv(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function Ou(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Lv(Object(t),!0).forEach(function(n){pn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Lv(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function EM(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function zv(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function SM(e,r,t){return r&&zv(e.prototype,r),t&&zv(e,t),e}function pn(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var xM=function(){function e(r){var t=this;EM(this,e),pn(this,"nodeConfig",void 0),pn(this,"lf",void 0),pn(this,"fakerNode",void 0),pn(this,"stopDrag",function(){t.nodeConfig=null,window.document.removeEventListener("mouseup",t.stopDrag)}),pn(this,"dragEnter",function(o){!t.nodeConfig||t.fakerNode||(t.fakerNode=t.lf.createFakerNode(Ou(Ou({},t.nodeConfig),t.clientToLocalPoint({x:o.clientX,y:o.clientY}))))}),pn(this,"onDragOver",function(o){if(o.preventDefault(),t.fakerNode){var a=t.clientToLocalPoint({x:o.clientX,y:o.clientY}),f=a.x,p=a.y;t.fakerNode.moveTo(f,p);var g=t.fakerNode.getData();t.lf.setNodeSnapLine(g),t.lf.graphModel.eventCenter.emit(ot.NODE_DND_DRAG,{data:g})}return!1}),pn(this,"onDragLeave",function(){t.fakerNode&&(t.lf.removeNodeSnapLine(),t.lf.graphModel.removeFakerNode(),t.fakerNode=null)}),pn(this,"onDrop",function(o){if(!(!t.lf.graphModel||!o||!t.nodeConfig)){var a=t.lf.addNode(Ou(Ou({},t.nodeConfig),t.clientToLocalPoint({x:o.clientX,y:o.clientY})),ot.NODE_DND_ADD);o.preventDefault(),o.stopPropagation(),t.nodeConfig=null,t.lf.removeNodeSnapLine(),t.lf.graphModel.removeFakerNode(),t.fakerNode=null,a.getData()}});var n=r.lf;this.lf=n}return SM(e,[{key:"clientToLocalPoint",value:function(t){var n=t.x,o=t.y,a=Id(this.lf.options,["grid","size"]),f=this.lf.graphModel.getPointByClient({x:n,y:o}),p=f.canvasOverlayPosition,g=p.x,O=p.y;return{x:In(g,a),y:In(O,a)}}},{key:"startDrag",value:function(t){this.nodeConfig=t,window.document.addEventListener("mouseup",this.stopDrag)}},{key:"eventMap",value:function(){return{onMouseEnter:this.dragEnter,onMouseOver:this.dragEnter,onMouseMove:this.onDragOver,onMouseLeave:this.onDragLeave,onMouseUp:this.onDrop}}}]),e}();function Fv(e){var r=e.container,t=e.grid,n=e.width,o=e.height;if(!r)throw new Error("\u8BF7\u68C0\u67E5 container \u53C2\u6570\u662F\u5426\u6709\u6548");if(typeof n=="string"||typeof o=="string")throw new Error("width\u6216height\u4E0D\u652F\u6301\u4F20\u5165\u5B57\u7B26\u4E32\uFF0C\u8BF7\u4F20\u6570\u5B57");return t&&(e.grid=ur({size:20,type:"dot",visible:!0,config:{color:"#ababab",thickness:1}},t)),ur({},Hv,e)}var Hv={background:!1,grid:!1,textEdit:!0,disabledTools:[]};function Eu(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Eu=function(t){return typeof t}:Eu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Eu(e)}var mt,Gv;function Ff(e,r){return MM(e)||wM(e,r)||TM(e,r)||PM()}function PM(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TM(e,r){if(!!e){if(typeof e=="string")return kv(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return kv(e,r)}}function kv(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function wM(e,r){var t=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,f,p;try{for(t=t.call(e);!(o=(f=t.next()).done)&&(n.push(f.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function MM(e){if(Array.isArray(e))return e}function $v(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function Su(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?$v(Object(t),!0).forEach(function(n){Xv(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):$v(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function AM(e,r,t,n){!t||Object.defineProperty(e,r,{enumerable:t.enumerable,configurable:t.configurable,writable:t.writable,value:t.initializer?t.initializer.call(n):void 0})}function NM(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Uv(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function DM(e,r,t){return r&&Uv(e.prototype,r),t&&Uv(e,t),e}function Io(){return typeof Reflect!="undefined"&&Reflect.get?Io=Reflect.get:Io=function(r,t,n){var o=jM(r,t);if(!!o){var a=Object.getOwnPropertyDescriptor(o,t);return a.get?a.get.call(arguments.length<3?r:n):a.value}},Io.apply(this,arguments)}function jM(e,r){for(;!Object.prototype.hasOwnProperty.call(e,r)&&(e=Fn(e),e!==null););return e}function CM(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&Hf(e,r)}function Hf(e,r){return Hf=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Hf(e,r)}function RM(e){var r=_M();return function(){var n=Fn(e),o;if(r){var a=Fn(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return IM(this,o)}}function IM(e,r){if(r&&(Eu(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return xu(e)}function xu(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _M(){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{return!1}}function Fn(e){return Fn=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Fn(e)}function Xv(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Hr(e,r,t,n,o){var a={};return Object.keys(n).forEach(function(f){a[f]=n[f]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=t.slice().reverse().reduce(function(f,p){return p(e,r,f)||f},a),o&&a.initializer!==void 0&&(a.value=a.initializer?a.initializer.call(o):void 0,a.initializer=void 0),a.initializer===void 0&&(Object.defineProperty(e,r,a),a=null),a}var Gf=(mt=function(e){CM(t,e);var r=RM(t);function t(){var n;NM(this,t);for(var o=arguments.length,a=new Array(o),f=0;f<o;f++)a[f]=arguments[f];return n=r.call.apply(r,[this].concat(a)),Xv(xu(n),"modelType",ht.BEZIER_EDGE),AM(xu(n),"path",Gv,xu(n)),n}return DM(t,[{key:"initEdgeData",value:function(o){this.offset=100,Io(Fn(t.prototype),"initEdgeData",this).call(this,o)}},{key:"getEdgeStyle",value:function(){var o=this.graphModel.theme.bezier,a=Io(Fn(t.prototype),"getEdgeStyle",this).call(this);return Su(Su({},a),It(o))}},{key:"getTextPosition",value:function(){if(this.pointsList&&this.pointsList.length>0){var o=0,a=0;return this.pointsList.forEach(function(f){var p=f.x,g=f.y;o+=p,a+=g}),{x:o/this.pointsList.length,y:a/this.pointsList.length}}return{x:(this.startPoint.x+this.endPoint.x)/2,y:(this.startPoint.y+this.endPoint.y)/2}}},{key:"getData",value:function(){var o=Io(Fn(t.prototype),"getData",this).call(this),a=this.pointsList.map(function(f){var p=f.x,g=f.y;return{x:p,y:g}});return Su(Su({},o),{},{pointsList:a})}},{key:"getControls",value:function(){var o=this.startPoint,a=this.endPoint,f=zh({start:o,end:a,sourceNode:this.sourceNode,targetNode:this.targetNode,offset:this.offset});return f}},{key:"getPath",value:function(o){var a=Ff(o,4),f=a[0],p=a[1],g=a[2],O=a[3];return"M ".concat(f.x," ").concat(f.y,`
- C `).concat(p.x," ").concat(p.y,`,
- `).concat(g.x," ").concat(g.y,`,
- `).concat(O.x," ").concat(O.y)}},{key:"initPoints",value:function(){this.pointsList.length>0?this.path=this.getPath(this.pointsList):this.updatePoints()}},{key:"updatePoints",value:function(){var o=this.getControls(),a=o.sNext,f=o.ePre;this.updatePath(a,f)}},{key:"updatePath",value:function(o,a){var f={x:this.startPoint.x,y:this.startPoint.y},p={x:this.endPoint.x,y:this.endPoint.y};if(!o||!a){var g=this.getControls();o=g.sNext,a=g.ePre}this.pointsList=[f,o,a,p],this.path=this.getPath(this.pointsList)}},{key:"updateStartPoint",value:function(o){this.startPoint=o,this.updatePoints()}},{key:"updateEndPoint",value:function(o){this.endPoint=o,this.updatePoints()}},{key:"moveStartPoint",value:function(o,a){this.startPoint.x+=o,this.startPoint.y+=a;var f=Ff(this.pointsList,3),p=f[1],g=f[2];p.x+=o,p.y+=a,this.updatePath(p,g)}},{key:"moveEndPoint",value:function(o,a){this.endPoint.x+=o,this.endPoint.y+=a;var f=Ff(this.pointsList,3),p=f[1],g=f[2];g.x+=o,g.y+=a,this.updatePath(p,g)}},{key:"updateAdjustAnchor",value:function(o,a){a==="sNext"?this.pointsList[1]=o:a==="ePre"&&(this.pointsList[2]=o),this.path=this.getPath(this.pointsList),this.setText(Object.assign({},this.text,this.textPosition))}},{key:"getAdjustStart",value:function(){return this.pointsList[0]||this.startPoint}},{key:"getAdjustEnd",value:function(){var o=this.pointsList;return o[o.length-1]||this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(o){var a=o.startPoint,f=o.endPoint,p=o.sourceNode,g=o.targetNode,O=zh({start:a,end:f,sourceNode:p,targetNode:g,offset:this.offset}),M=O.sNext,j=O.ePre;this.pointsList=[a,M,j,f],this.initPoints()}}]),t}(yf),Gv=Hr(mt.prototype,"path",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Hr(mt.prototype,"initPoints",[s.k],Object.getOwnPropertyDescriptor(mt.prototype,"initPoints"),mt.prototype),Hr(mt.prototype,"updatePoints",[s.k],Object.getOwnPropertyDescriptor(mt.prototype,"updatePoints"),mt.prototype),Hr(mt.prototype,"updateStartPoint",[s.k],Object.getOwnPropertyDescriptor(mt.prototype,"updateStartPoint"),mt.prototype),Hr(mt.prototype,"updateEndPoint",[s.k],Object.getOwnPropertyDescriptor(mt.prototype,"updateEndPoint"),mt.prototype),Hr(mt.prototype,"moveStartPoint",[s.k],Object.getOwnPropertyDescriptor(mt.prototype,"moveStartPoint"),mt.prototype),Hr(mt.prototype,"moveEndPoint",[s.k],Object.getOwnPropertyDescriptor(mt.prototype,"moveEndPoint"),mt.prototype),Hr(mt.prototype,"updateAdjustAnchor",[s.k],Object.getOwnPropertyDescriptor(mt.prototype,"updateAdjustAnchor"),mt.prototype),Hr(mt.prototype,"getAdjustStart",[s.k],Object.getOwnPropertyDescriptor(mt.prototype,"getAdjustStart"),mt.prototype),Hr(mt.prototype,"getAdjustEnd",[s.k],Object.getOwnPropertyDescriptor(mt.prototype,"getAdjustEnd"),mt.prototype),Hr(mt.prototype,"updateAfterAdjustStartAndEnd",[s.k],Object.getOwnPropertyDescriptor(mt.prototype,"updateAfterAdjustStartAndEnd"),mt.prototype),mt);function BM(e){return e==null}var LM=BM,_e,Yv,Wv,Vv,Kv,Zv,Jv,Qv,qv,ey,ty,ry,ny,oy,iy,ay,uy,ly,sy,fy;function Pu(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Pu=function(t){return typeof t}:Pu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pu(e)}function zM(e,r){var t=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=FM(e))||r&&e&&typeof e.length=="number"){t&&(e=t);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(O){throw O},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,f=!1,p;return{s:function(){t=t.call(e)},n:function(){var O=t.next();return a=O.done,O},e:function(O){f=!0,p=O},f:function(){try{!a&&t.return!=null&&t.return()}finally{if(f)throw p}}}}function FM(e,r){if(!!e){if(typeof e=="string")return cy(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return cy(e,r)}}function cy(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function dy(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function sr(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?dy(Object(t),!0).forEach(function(n){hr(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):dy(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Ut(e,r,t,n){!t||Object.defineProperty(e,r,{enumerable:t.enumerable,configurable:t.configurable,writable:t.writable,value:t.initializer?t.initializer.call(n):void 0})}function HM(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function py(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function GM(e,r,t){return r&&py(e.prototype,r),t&&py(e,t),e}function hr(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function ft(e,r,t,n,o){var a={};return Object.keys(n).forEach(function(f){a[f]=n[f]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=t.slice().reverse().reduce(function(f,p){return p(e,r,f)||f},a),o&&a.initializer!==void 0&&(a.value=a.initializer?a.initializer.call(o):void 0,a.initializer=void 0),a.initializer===void 0&&(Object.defineProperty(e,r,a),a=null),a}var hn=(_e=function(){function e(r,t){HM(this,e),hr(this,"id",""),Ut(this,"type",Yv,this),Ut(this,"x",Wv,this),Ut(this,"y",Vv,this),Ut(this,"text",Kv,this),Ut(this,"properties",Zv,this),Ut(this,"_width",Jv,this),Ut(this,"_height",Qv,this),Ut(this,"anchorsOffset",qv,this),Ut(this,"isSelected",ey,this),Ut(this,"isHovered",ty,this),Ut(this,"isShowAnchor",ry,this),Ut(this,"isDragging",ny,this),Ut(this,"isHitable",oy,this),Ut(this,"draggable",iy,this),Ut(this,"visible",ay,this),hr(this,"virtual",!1),hr(this,"graphModel",void 0),Ut(this,"zIndex",uy,this),Ut(this,"state",ly,this),Ut(this,"autoToFront",sy,this),Ut(this,"style",fy,this),hr(this,"BaseType",Ft.NODE),hr(this,"modelType",ht.NODE),hr(this,"additionStateData",void 0),hr(this,"targetRules",[]),hr(this,"sourceRules",[]),hr(this,"moveRules",[]),hr(this,"hasSetTargetRules",!1),hr(this,"hasSetSourceRules",!1),this.graphModel=t,this.initNodeData(r),this.setAttributes()}return GM(e,[{key:"width",get:function(){return this._width},set:function(t){this._width=t}},{key:"height",get:function(){return this._height},set:function(t){this._height=t}},{key:"incoming",get:function(){return{nodes:this.graphModel.getNodeIncomingNode(this.id),edges:this.graphModel.getNodeIncomingEdge(this.id)}}},{key:"outgoing",get:function(){return{nodes:this.graphModel.getNodeOutgoingNode(this.id),edges:this.graphModel.getNodeOutgoingEdge(this.id)}}},{key:"initNodeData",value:function(t){if(t.properties||(t.properties={}),!t.id){var n=this.graphModel.idGenerator,o=n&&n(t.type),a=this.createId();t.id=a||o||_n()}this.formatText(t),ur(this,AP(t));var f=this.graphModel.overlapMode;f===Sr.INCREASE&&(this.zIndex=t.zIndex||hf())}},{key:"setAttributes",value:function(){}},{key:"createId",value:function(){return null}},{key:"formatText",value:function(t){t.text||(t.text={value:"",x:t.x,y:t.y,draggable:!1,editable:!0}),t.text&&typeof t.text=="string"?t.text={value:t.text,x:t.x,y:t.y,draggable:!1,editable:!0}:t.text&&t.text.editable===void 0&&(t.text.editable=!0)}},{key:"getData",value:function(){var t=this.text,n=t.x,o=t.y,a=t.value,f=this.properties;Object(s.x)(f)&&(f=Object(s.I)(f));var p={id:this.id,type:this.type,x:this.x,y:this.y,properties:f};return this.graphModel.overlapMode===Sr.INCREASE&&(p.zIndex=this.zIndex),a&&(p.text={x:n,y:o,value:a}),p}},{key:"getHistoryData",value:function(){return this.getData()}},{key:"getProperties",value:function(){return Object(s.I)(this.properties)}},{key:"getNodeStyle",value:function(){return sr(sr({},this.graphModel.theme.baseNode),this.style)}},{key:"getTextStyle",value:function(){var t=this.graphModel.theme.nodeText;return It(t)}},{key:"getAnchorStyle",value:function(t){var n=this.graphModel.theme.anchor;return It(n)}},{key:"getAnchorLineStyle",value:function(t){var n=this.graphModel.theme.anchorLine;return It(n)}},{key:"getOutlineStyle",value:function(){var t=this.graphModel.theme.outline;return It(t)}},{key:"isAllowConnectedAsSource",value:function(t,n,o,a){var f=this.hasSetSourceRules?this.sourceRules:this.getConnectedSourceRules();this.hasSetSourceRules=!0;for(var p=!0,g,O=0;O<f.length;O++){var M=f[O];if(!M.validate.call(this,this,t,n,o,a)){p=!1,g=M.message;break}}return{isAllPass:p,msg:g}}},{key:"getConnectedSourceRules",value:function(){return this.sourceRules}},{key:"isAllowConnectedAsTarget",value:function(t,n,o,a){var f=this.hasSetTargetRules?this.targetRules:this.getConnectedTargetRules();this.hasSetTargetRules=!0;for(var p=!0,g,O=0;O<f.length;O++){var M=f[O];if(!M.validate.call(this,t,this,n,o,a)){p=!1,g=M.message;break}}return{isAllPass:p,msg:g}}},{key:"isAllowMoveNode",value:function(t,n){var o=!0,a=!0,f=this.moveRules.concat(this.graphModel.nodeMoveRules),p=zM(f),g;try{for(p.s();!(g=p.n()).done;){var O=g.value,M=O(this,t,n);if(!M)return!1;if(Pu(M)==="object"){var j=M;if(j.x===!1&&j.y===!1)return!1;o=o&&j.x,a=a&&j.y}}}catch(z){p.e(z)}finally{p.f()}return{x:o,y:a}}},{key:"getConnectedTargetRules",value:function(){return this.targetRules}},{key:"getAnchorsByOffset",value:function(){var t=this.anchorsOffset,n=this.id,o=this.x,a=this.y;return t&&t.length>0?t.map(function(f,p){return f.length?(f=f,{id:"".concat(n,"_").concat(p),x:o+f[0],y:a+f[1]}):(f=f,sr(sr({},f),{},{x:o+f.x,y:a+f.y,id:f.id||"".concat(n,"_").concat(p)}))}):this.getDefaultAnchor()}},{key:"getDefaultAnchor",value:function(){return[]}},{key:"getTargetAnchor",value:function(t){return TP(t,this)}},{key:"getBounds",value:function(){return{x1:this.x-this.width/2,y1:this.y-this.height/2,x2:this.x+this.width/2,y2:this.y+this.height/2}}},{key:"anchors",get:function(){return this.getAnchorsByOffset()}},{key:"getAnchorInfo",value:function(t){if(!LM(t))for(var n=0;n<this.anchors.length;n++){var o=this.anchors[n];if(o.id===t)return o}}},{key:"addNodeMoveRules",value:function(t){this.moveRules.includes(t)||this.moveRules.push(t)}},{key:"move",value:function(t,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=!1,f=!1;if(o)a=!0,f=!0;else{var p=this.isAllowMoveNode(t,n);typeof p=="boolean"?(a=p,f=p):(a=p.x,f=p.y)}if(a){var g=this.x+t;this.x=g,this.text&&this.moveText(t,0)}if(f){var O=this.y+n;this.y=O,this.text&&this.moveText(0,n)}return a||f}},{key:"getMoveDistance",value:function(t,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=!1,f=!1,p=0,g=0;if(o)a=!0,f=!0;else{var O=this.isAllowMoveNode(t,n);typeof O=="boolean"?(a=O,f=O):(a=O.x,f=O.y)}if(a&&t){var M=this.x+t;this.x=M,this.text&&this.moveText(t,0),p=t}if(f&&n){var j=this.y+n;this.y=j,this.text&&this.moveText(0,n),g=n}return[p,g]}},{key:"moveTo",value:function(t,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=t-this.x,f=n-this.y;return!o&&!this.isAllowMoveNode(a,f)?!1:(this.text&&this.text&&this.moveText(a,f),this.x=t,this.y=n,!0)}},{key:"moveText",value:function(t,n){var o=this.text,a=o.x,f=o.y,p=o.value,g=o.draggable,O=o.editable;this.text={value:p,editable:O,draggable:g,x:a+t,y:f+n}}},{key:"updateText",value:function(t){this.text=sr(sr({},this.text),{},{value:t})}},{key:"setSelected",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.isSelected=t}},{key:"setHovered",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.isHovered=t,this.setIsShowAnchor(t)}},{key:"setIsShowAnchor",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.isShowAnchor=t}},{key:"setHitable",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.isHitable=t}},{key:"setElementState",value:function(t,n){this.state=t,this.additionStateData=n}},{key:"setProperty",value:function(t,n){this.properties=sr(sr({},this.properties),{},hr({},t,rr(n))),this.setAttributes()}},{key:"setProperties",value:function(t){this.properties=sr(sr({},this.properties),rr(t)),this.setAttributes()}},{key:"deleteProperty",value:function(t){delete this.properties[t],this.setAttributes()}},{key:"setStyle",value:function(t,n){this.style=sr(sr({},this.style),{},hr({},t,rr(n)))}},{key:"setStyles",value:function(t){this.style=sr(sr({},this.style),rr(t))}},{key:"updateStyles",value:function(t){this.style=sr({},rr(t))}},{key:"setZIndex",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;this.zIndex=t}},{key:"updateAttributes",value:function(t){ur(this,t)}}]),e}(),Yv=ft(_e.prototype,"type",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Wv=ft(_e.prototype,"x",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Vv=ft(_e.prototype,"y",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Kv=ft(_e.prototype,"text",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{value:"",x:0,y:0,draggable:!1,editable:!0}}}),Zv=ft(_e.prototype,"properties",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),Jv=ft(_e.prototype,"_width",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 100}}),Qv=ft(_e.prototype,"_height",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 80}}),qv=ft(_e.prototype,"anchorsOffset",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),ey=ft(_e.prototype,"isSelected",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),ty=ft(_e.prototype,"isHovered",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),ry=ft(_e.prototype,"isShowAnchor",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),ny=ft(_e.prototype,"isDragging",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),oy=ft(_e.prototype,"isHitable",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),iy=ft(_e.prototype,"draggable",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),ay=ft(_e.prototype,"visible",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),uy=ft(_e.prototype,"zIndex",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),ly=ft(_e.prototype,"state",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),sy=ft(_e.prototype,"autoToFront",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),fy=ft(_e.prototype,"style",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),ft(_e.prototype,"incoming",[s.m],Object.getOwnPropertyDescriptor(_e.prototype,"incoming"),_e.prototype),ft(_e.prototype,"outgoing",[s.m],Object.getOwnPropertyDescriptor(_e.prototype,"outgoing"),_e.prototype),ft(_e.prototype,"addNodeMoveRules",[s.k],Object.getOwnPropertyDescriptor(_e.prototype,"addNodeMoveRules"),_e.prototype),ft(_e.prototype,"move",[s.k],Object.getOwnPropertyDescriptor(_e.prototype,"move"),_e.prototype),ft(_e.prototype,"getMoveDistance",[s.k],Object.getOwnPropertyDescriptor(_e.prototype,"getMoveDistance"),_e.prototype),ft(_e.prototype,"moveTo",[s.k],Object.getOwnPropertyDescriptor(_e.prototype,"moveTo"),_e.prototype),ft(_e.prototype,"moveText",[s.k],Object.getOwnPropertyDescriptor(_e.prototype,"moveText"),_e.prototype),ft(_e.prototype,"updateText",[s.k],Object.getOwnPropertyDescriptor(_e.prototype,"updateText"),_e.prototype),ft(_e.prototype,"setSelected",[s.k],Object.getOwnPropertyDescriptor(_e.prototype,"setSelected"),_e.prototype),ft(_e.prototype,"setHovered",[s.k],Object.getOwnPropertyDescriptor(_e.prototype,"setHovered"),_e.prototype),ft(_e.prototype,"setIsShowAnchor",[s.k],Object.getOwnPropertyDescriptor(_e.prototype,"setIsShowAnchor"),_e.prototype),ft(_e.prototype,"setHitable",[s.k],Object.getOwnPropertyDescriptor(_e.prototype,"setHitable"),_e.prototype),ft(_e.prototype,"setElementState",[s.k],Object.getOwnPropertyDescriptor(_e.prototype,"setElementState"),_e.prototype),ft(_e.prototype,"setProperty",[s.k],Object.getOwnPropertyDescriptor(_e.prototype,"setProperty"),_e.prototype),ft(_e.prototype,"setProperties",[s.k],Object.getOwnPropertyDescriptor(_e.prototype,"setProperties"),_e.prototype),ft(_e.prototype,"deleteProperty",[s.k],Object.getOwnPropertyDescriptor(_e.prototype,"deleteProperty"),_e.prototype),ft(_e.prototype,"setStyle",[s.k],Object.getOwnPropertyDescriptor(_e.prototype,"setStyle"),_e.prototype),ft(_e.prototype,"setStyles",[s.k],Object.getOwnPropertyDescriptor(_e.prototype,"setStyles"),_e.prototype),ft(_e.prototype,"updateStyles",[s.k],Object.getOwnPropertyDescriptor(_e.prototype,"updateStyles"),_e.prototype),ft(_e.prototype,"setZIndex",[s.k],Object.getOwnPropertyDescriptor(_e.prototype,"setZIndex"),_e.prototype),ft(_e.prototype,"updateAttributes",[s.k],Object.getOwnPropertyDescriptor(_e.prototype,"updateAttributes"),_e.prototype),_e);function Tu(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Tu=function(t){return typeof t}:Tu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tu(e)}var vn,hy;function vy(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function yy(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?vy(Object(t),!0).forEach(function(n){my(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):vy(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function kM(e,r,t,n){!t||Object.defineProperty(e,r,{enumerable:t.enumerable,configurable:t.configurable,writable:t.writable,value:t.initializer?t.initializer.call(n):void 0})}function $M(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function gy(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function UM(e,r,t){return r&&gy(e.prototype,r),t&&gy(e,t),e}function wu(){return typeof Reflect!="undefined"&&Reflect.get?wu=Reflect.get:wu=function(r,t,n){var o=XM(r,t);if(!!o){var a=Object.getOwnPropertyDescriptor(o,t);return a.get?a.get.call(arguments.length<3?r:n):a.value}},wu.apply(this,arguments)}function XM(e,r){for(;!Object.prototype.hasOwnProperty.call(e,r)&&(e=_o(e),e!==null););return e}function YM(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&kf(e,r)}function kf(e,r){return kf=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},kf(e,r)}function WM(e){var r=KM();return function(){var n=_o(e),o;if(r){var a=_o(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return VM(this,o)}}function VM(e,r){if(r&&(Tu(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Mu(e)}function Mu(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function KM(){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{return!1}}function _o(e){return _o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},_o(e)}function my(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function $f(e,r,t,n,o){var a={};return Object.keys(n).forEach(function(f){a[f]=n[f]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=t.slice().reverse().reduce(function(f,p){return p(e,r,f)||f},a),o&&a.initializer!==void 0&&(a.value=a.initializer?a.initializer.call(o):void 0,a.initializer=void 0),a.initializer===void 0&&(Object.defineProperty(e,r,a),a=null),a}var Uf=(vn=function(e){YM(t,e);var r=WM(t);function t(){var n;$M(this,t);for(var o=arguments.length,a=new Array(o),f=0;f<o;f++)a[f]=arguments[f];return n=r.call.apply(r,[this].concat(a)),my(Mu(n),"modelType",ht.CIRCLE_NODE),kM(Mu(n),"r",hy,Mu(n)),n}return UM(t,[{key:"width",get:function(){return this.r*2}},{key:"height",get:function(){return this.r*2}},{key:"getNodeStyle",value:function(){var o=wu(_o(t.prototype),"getNodeStyle",this).call(this),a=this.graphModel.theme.circle;return yy(yy({},o),It(a))}},{key:"getDefaultAnchor",value:function(){var o=this.x,a=this.y,f=this.r;return[{x:o,y:a-f,id:"".concat(this.id,"_0")},{x:o+f,y:a,id:"".concat(this.id,"_1")},{x:o,y:a+f,id:"".concat(this.id,"_2")},{x:o-f,y:a,id:"".concat(this.id,"_3")}]}}]),t}(hn),hy=$f(vn.prototype,"r",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 50}}),$f(vn.prototype,"width",[s.m],Object.getOwnPropertyDescriptor(vn.prototype,"width"),vn.prototype),$f(vn.prototype,"height",[s.m],Object.getOwnPropertyDescriptor(vn.prototype,"height"),vn.prototype),vn);i(127);function Au(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Au=function(t){return typeof t}:Au=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Au(e)}var nr,by,Oy;function Xf(e,r){return qM(e)||QM(e,r)||JM(e,r)||ZM()}function ZM(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function JM(e,r){if(!!e){if(typeof e=="string")return Ey(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ey(e,r)}}function Ey(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function QM(e,r){var t=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,f,p;try{for(t=t.call(e);!(o=(f=t.next()).done)&&(n.push(f.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function qM(e){if(Array.isArray(e))return e}function Sy(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function xy(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Sy(Object(t),!0).forEach(function(n){wy(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Sy(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Py(e,r,t,n){!t||Object.defineProperty(e,r,{enumerable:t.enumerable,configurable:t.configurable,writable:t.writable,value:t.initializer?t.initializer.call(n):void 0})}function eA(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Ty(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function tA(e,r,t){return r&&Ty(e.prototype,r),t&&Ty(e,t),e}function Nu(){return typeof Reflect!="undefined"&&Reflect.get?Nu=Reflect.get:Nu=function(r,t,n){var o=rA(r,t);if(!!o){var a=Object.getOwnPropertyDescriptor(o,t);return a.get?a.get.call(arguments.length<3?r:n):a.value}},Nu.apply(this,arguments)}function rA(e,r){for(;!Object.prototype.hasOwnProperty.call(e,r)&&(e=Lo(e),e!==null););return e}function nA(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&Yf(e,r)}function Yf(e,r){return Yf=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Yf(e,r)}function oA(e){var r=aA();return function(){var n=Lo(e),o;if(r){var a=Lo(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return iA(this,o)}}function iA(e,r){if(r&&(Au(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Bo(e)}function Bo(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function aA(){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{return!1}}function Lo(e){return Lo=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Lo(e)}function wy(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function zo(e,r,t,n,o){var a={};return Object.keys(n).forEach(function(f){a[f]=n[f]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=t.slice().reverse().reduce(function(f,p){return p(e,r,f)||f},a),o&&a.initializer!==void 0&&(a.value=a.initializer?a.initializer.call(o):void 0,a.initializer=void 0),a.initializer===void 0&&(Object.defineProperty(e,r,a),a=null),a}var Wf=(nr=function(e){nA(t,e);var r=oA(t);function t(){var n;eA(this,t);for(var o=arguments.length,a=new Array(o),f=0;f<o;f++)a[f]=arguments[f];return n=r.call.apply(r,[this].concat(a)),wy(Bo(n),"modelType",ht.DIAMOND_NODE),Py(Bo(n),"rx",by,Bo(n)),Py(Bo(n),"ry",Oy,Bo(n)),n}return tA(t,[{key:"getNodeStyle",value:function(){var o=Nu(Lo(t.prototype),"getNodeStyle",this).call(this),a=this.graphModel.theme.diamond;return xy(xy({},o),It(a))}},{key:"points",get:function(){var o=this.x,a=this.y,f=this.rx,p=this.ry;return[[o,a-p],[o+f,a],[o,a+p],[o-f,a]]}},{key:"pointsPosition",get:function(){var o=this.points.map(function(a){return{x:a[0],y:a[1]}});return o}},{key:"width",get:function(){var o=Number.MAX_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(f){var p=Xf(f,1),g=p[0];g<o&&(o=g),g>a&&(a=g)}),a-o}},{key:"height",get:function(){var o=Number.MAX_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(f){var p=Xf(f,2),g=p[1];g<o&&(o=g),g>a&&(a=g)}),a-o}},{key:"getDefaultAnchor",value:function(){var o=this;return this.points.map(function(a,f){var p=Xf(a,2),g=p[0],O=p[1];return{x:g,y:O,id:"".concat(o.id,"_").concat(f)}})}}]),t}(hn),by=zo(nr.prototype,"rx",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 30}}),Oy=zo(nr.prototype,"ry",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 50}}),zo(nr.prototype,"points",[s.m],Object.getOwnPropertyDescriptor(nr.prototype,"points"),nr.prototype),zo(nr.prototype,"pointsPosition",[s.m],Object.getOwnPropertyDescriptor(nr.prototype,"pointsPosition"),nr.prototype),zo(nr.prototype,"width",[s.m],Object.getOwnPropertyDescriptor(nr.prototype,"width"),nr.prototype),zo(nr.prototype,"height",[s.m],Object.getOwnPropertyDescriptor(nr.prototype,"height"),nr.prototype),nr);function Du(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Du=function(t){return typeof t}:Du=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Du(e)}var Qr,My,Ay;function Ny(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function Dy(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Ny(Object(t),!0).forEach(function(n){Ry(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ny(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function jy(e,r,t,n){!t||Object.defineProperty(e,r,{enumerable:t.enumerable,configurable:t.configurable,writable:t.writable,value:t.initializer?t.initializer.call(n):void 0})}function uA(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Cy(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function lA(e,r,t){return r&&Cy(e.prototype,r),t&&Cy(e,t),e}function ju(){return typeof Reflect!="undefined"&&Reflect.get?ju=Reflect.get:ju=function(r,t,n){var o=sA(r,t);if(!!o){var a=Object.getOwnPropertyDescriptor(o,t);return a.get?a.get.call(arguments.length<3?r:n):a.value}},ju.apply(this,arguments)}function sA(e,r){for(;!Object.prototype.hasOwnProperty.call(e,r)&&(e=Ho(e),e!==null););return e}function fA(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&Vf(e,r)}function Vf(e,r){return Vf=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Vf(e,r)}function cA(e){var r=pA();return function(){var n=Ho(e),o;if(r){var a=Ho(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return dA(this,o)}}function dA(e,r){if(r&&(Du(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Fo(e)}function Fo(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pA(){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{return!1}}function Ho(e){return Ho=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ho(e)}function Ry(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Cu(e,r,t,n,o){var a={};return Object.keys(n).forEach(function(f){a[f]=n[f]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=t.slice().reverse().reduce(function(f,p){return p(e,r,f)||f},a),o&&a.initializer!==void 0&&(a.value=a.initializer?a.initializer.call(o):void 0,a.initializer=void 0),a.initializer===void 0&&(Object.defineProperty(e,r,a),a=null),a}var Kf=(Qr=function(e){fA(t,e);var r=cA(t);function t(){var n;uA(this,t);for(var o=arguments.length,a=new Array(o),f=0;f<o;f++)a[f]=arguments[f];return n=r.call.apply(r,[this].concat(a)),Ry(Fo(n),"modelType",ht.ELLIPSE_NODE),jy(Fo(n),"rx",My,Fo(n)),jy(Fo(n),"ry",Ay,Fo(n)),n}return lA(t,[{key:"getNodeStyle",value:function(){var o=ju(Ho(t.prototype),"getNodeStyle",this).call(this),a=this.graphModel.theme.ellipse;return Dy(Dy({},o),It(a))}},{key:"width",get:function(){return this.rx*2}},{key:"height",get:function(){return this.ry*2}},{key:"getDefaultAnchor",value:function(){var o=this.x,a=this.y,f=this.rx,p=this.ry;return[{x:o,y:a-p,id:"".concat(this.id,"_0")},{x:o+f,y:a,id:"".concat(this.id,"_1")},{x:o,y:a+p,id:"".concat(this.id,"_2")},{x:o-f,y:a,id:"".concat(this.id,"_3")}]}}]),t}(hn),My=Cu(Qr.prototype,"rx",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 30}}),Ay=Cu(Qr.prototype,"ry",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 45}}),Cu(Qr.prototype,"width",[s.m],Object.getOwnPropertyDescriptor(Qr.prototype,"width"),Qr.prototype),Cu(Qr.prototype,"height",[s.m],Object.getOwnPropertyDescriptor(Qr.prototype,"height"),Qr.prototype),Qr);function Ru(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ru=function(t){return typeof t}:Ru=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ru(e)}var Ir,Iy;function Zf(e,r){return gA(e)||yA(e,r)||vA(e,r)||hA()}function hA(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vA(e,r){if(!!e){if(typeof e=="string")return _y(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return _y(e,r)}}function _y(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function yA(e,r){var t=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,f,p;try{for(t=t.call(e);!(o=(f=t.next()).done)&&(n.push(f.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function gA(e){if(Array.isArray(e))return e}function By(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function Ly(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?By(Object(t),!0).forEach(function(n){Fy(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):By(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function mA(e,r,t,n){!t||Object.defineProperty(e,r,{enumerable:t.enumerable,configurable:t.configurable,writable:t.writable,value:t.initializer?t.initializer.call(n):void 0})}function bA(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function zy(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function OA(e,r,t){return r&&zy(e.prototype,r),t&&zy(e,t),e}function Iu(){return typeof Reflect!="undefined"&&Reflect.get?Iu=Reflect.get:Iu=function(r,t,n){var o=EA(r,t);if(!!o){var a=Object.getOwnPropertyDescriptor(o,t);return a.get?a.get.call(arguments.length<3?r:n):a.value}},Iu.apply(this,arguments)}function EA(e,r){for(;!Object.prototype.hasOwnProperty.call(e,r)&&(e=Go(e),e!==null););return e}function SA(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&Jf(e,r)}function Jf(e,r){return Jf=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Jf(e,r)}function xA(e){var r=TA();return function(){var n=Go(e),o;if(r){var a=Go(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return PA(this,o)}}function PA(e,r){if(r&&(Ru(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _u(e)}function _u(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function TA(){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{return!1}}function Go(e){return Go=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Go(e)}function Fy(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Bu(e,r,t,n,o){var a={};return Object.keys(n).forEach(function(f){a[f]=n[f]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=t.slice().reverse().reduce(function(f,p){return p(e,r,f)||f},a),o&&a.initializer!==void 0&&(a.value=a.initializer?a.initializer.call(o):void 0,a.initializer=void 0),a.initializer===void 0&&(Object.defineProperty(e,r,a),a=null),a}var Qf=(Ir=function(e){SA(t,e);var r=xA(t);function t(){var n;bA(this,t);for(var o=arguments.length,a=new Array(o),f=0;f<o;f++)a[f]=arguments[f];return n=r.call.apply(r,[this].concat(a)),Fy(_u(n),"modelType",ht.POLYGON_NODE),mA(_u(n),"points",Iy,_u(n)),n}return OA(t,[{key:"getNodeStyle",value:function(){var o=Iu(Go(t.prototype),"getNodeStyle",this).call(this),a=this.graphModel.theme.polygon;return Ly(Ly({},o),It(a))}},{key:"pointsPosition",get:function(){var o=this.x,a=this.y,f=this.width,p=this.height,g=this.points.map(function(O){return{x:O[0]+o-f/2,y:O[1]+a-p/2}});return g}},{key:"width",get:function(){var o=Number.MAX_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(f){var p=Zf(f,1),g=p[0];g<o&&(o=g),g>a&&(a=g)}),a-o}},{key:"height",get:function(){var o=Number.MAX_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(f){var p=Zf(f,2),g=p[1];g<o&&(o=g),g>a&&(a=g)}),a-o}},{key:"getDefaultAnchor",value:function(){var o=this,a=this.x,f=this.y,p=this.width,g=this.height,O=this.points;return O.map(function(M,j){var z=Zf(M,2),$=z[0],Z=z[1];return{x:a+$-p/2,y:f+Z-g/2,id:"".concat(o.id,"_").concat(j)}})}}]),t}(hn),Iy=Bu(Ir.prototype,"points",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[[50,0],[100,50],[50,100],[0,50]]}}),Bu(Ir.prototype,"pointsPosition",[s.m],Object.getOwnPropertyDescriptor(Ir.prototype,"pointsPosition"),Ir.prototype),Bu(Ir.prototype,"width",[s.m],Object.getOwnPropertyDescriptor(Ir.prototype,"width"),Ir.prototype),Bu(Ir.prototype,"height",[s.m],Object.getOwnPropertyDescriptor(Ir.prototype,"height"),Ir.prototype),Ir);function Lu(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Lu=function(t){return typeof t}:Lu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lu(e)}var qf,Hy;function Gy(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function ky(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Gy(Object(t),!0).forEach(function(n){Uy(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Gy(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function wA(e,r,t,n){!t||Object.defineProperty(e,r,{enumerable:t.enumerable,configurable:t.configurable,writable:t.writable,value:t.initializer?t.initializer.call(n):void 0})}function MA(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function $y(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function AA(e,r,t){return r&&$y(e.prototype,r),t&&$y(e,t),e}function zu(){return typeof Reflect!="undefined"&&Reflect.get?zu=Reflect.get:zu=function(r,t,n){var o=NA(r,t);if(!!o){var a=Object.getOwnPropertyDescriptor(o,t);return a.get?a.get.call(arguments.length<3?r:n):a.value}},zu.apply(this,arguments)}function NA(e,r){for(;!Object.prototype.hasOwnProperty.call(e,r)&&(e=ko(e),e!==null););return e}function DA(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&ec(e,r)}function ec(e,r){return ec=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},ec(e,r)}function jA(e){var r=RA();return function(){var n=ko(e),o;if(r){var a=ko(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return CA(this,o)}}function CA(e,r){if(r&&(Lu(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Fu(e)}function Fu(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function RA(){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{return!1}}function ko(e){return ko=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ko(e)}function Uy(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function IA(e,r,t,n,o){var a={};return Object.keys(n).forEach(function(f){a[f]=n[f]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=t.slice().reverse().reduce(function(f,p){return p(e,r,f)||f},a),o&&a.initializer!==void 0&&(a.value=a.initializer?a.initializer.call(o):void 0,a.initializer=void 0),a.initializer===void 0&&(Object.defineProperty(e,r,a),a=null),a}var tc=(qf=function(e){DA(t,e);var r=jA(t);function t(){var n;MA(this,t);for(var o=arguments.length,a=new Array(o),f=0;f<o;f++)a[f]=arguments[f];return n=r.call.apply(r,[this].concat(a)),Uy(Fu(n),"modelType",ht.RECT_NODE),wA(Fu(n),"radius",Hy,Fu(n)),n}return AA(t,[{key:"getDefaultAnchor",value:function(){var o=this.x,a=this.y,f=this.width,p=this.height;return[{x:o,y:a-p/2,id:"".concat(this.id,"_0")},{x:o+f/2,y:a,id:"".concat(this.id,"_1")},{x:o,y:a+p/2,id:"".concat(this.id,"_2")},{x:o-f/2,y:a,id:"".concat(this.id,"_3")}]}},{key:"getNodeStyle",value:function(){var o=zu(ko(t.prototype),"getNodeStyle",this).call(this),a=this.graphModel.theme.rect;return ky(ky({},o),It(a))}}]),t}(hn),Hy=IA(qf.prototype,"radius",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),qf);function Hu(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Hu=function(t){return typeof t}:Hu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hu(e)}var Hn;function Xy(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function Yy(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Xy(Object(t),!0).forEach(function(n){Ky(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Xy(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function _A(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Wy(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function BA(e,r,t){return r&&Wy(e.prototype,r),t&&Wy(e,t),e}function Gu(){return typeof Reflect!="undefined"&&Reflect.get?Gu=Reflect.get:Gu=function(r,t,n){var o=LA(r,t);if(!!o){var a=Object.getOwnPropertyDescriptor(o,t);return a.get?a.get.call(arguments.length<3?r:n):a.value}},Gu.apply(this,arguments)}function LA(e,r){for(;!Object.prototype.hasOwnProperty.call(e,r)&&(e=$o(e),e!==null););return e}function zA(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&rc(e,r)}function rc(e,r){return rc=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},rc(e,r)}function FA(e){var r=GA();return function(){var n=$o(e),o;if(r){var a=$o(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return HA(this,o)}}function HA(e,r){if(r&&(Hu(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Vy(e)}function Vy(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function GA(){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{return!1}}function $o(e){return $o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},$o(e)}function Ky(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Zy(e,r,t,n,o){var a={};return Object.keys(n).forEach(function(f){a[f]=n[f]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=t.slice().reverse().reduce(function(f,p){return p(e,r,f)||f},a),o&&a.initializer!==void 0&&(a.value=a.initializer?a.initializer.call(o):void 0,a.initializer=void 0),a.initializer===void 0&&(Object.defineProperty(e,r,a),a=null),a}var nc=(Hn=function(e){zA(t,e);var r=FA(t);function t(){var n;_A(this,t);for(var o=arguments.length,a=new Array(o),f=0;f<o;f++)a[f]=arguments[f];return n=r.call.apply(r,[this].concat(a)),Ky(Vy(n),"modelType",ht.TEXT_NODE),n}return BA(t,[{key:"getTextStyle",value:function(){var o=Gu($o(t.prototype),"getTextStyle",this).call(this),a=this.graphModel.theme.text;return Yy(Yy({},o),It(a))}},{key:"width",get:function(){var o=String(this.text.value).split(/[\r\n]/g),a=this.getTextStyle(),f=a.fontSize,p=pf({rows:o,fontSize:f,rowsLength:o.length}),g=p.width;return g}},{key:"height",get:function(){var o=String(this.text.value).split(/[\r\n]/g),a=this.getTextStyle(),f=a.fontSize,p=pf({rows:o,fontSize:f,rowsLength:o.length}),g=p.height;return g}}]),t}(hn),Zy(Hn.prototype,"width",[s.m],Object.getOwnPropertyDescriptor(Hn.prototype,"width"),Hn.prototype),Zy(Hn.prototype,"height",[s.m],Object.getOwnPropertyDescriptor(Hn.prototype,"height"),Hn.prototype),Hn);function ku(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ku=function(t){return typeof t}:ku=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ku(e)}function kA(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Jy(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function $A(e,r,t){return r&&Jy(e.prototype,r),t&&Jy(e,t),e}function UA(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&oc(e,r)}function oc(e,r){return oc=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},oc(e,r)}function XA(e){var r=WA();return function(){var n=$u(e),o;if(r){var a=$u(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return YA(this,o)}}function YA(e,r){if(r&&(ku(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Qy(e)}function Qy(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function WA(){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{return!1}}function $u(e){return $u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},$u(e)}function VA(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var ic=function(e){UA(t,e);var r=XA(t);function t(){var n;kA(this,t);for(var o=arguments.length,a=new Array(o),f=0;f<o;f++)a[f]=arguments[f];return n=r.call.apply(r,[this].concat(a)),VA(Qy(n),"modelType",ht.HTML_NODE),n}return $A(t,[{key:"getDefaultAnchor",value:function(){var o=this.x,a=this.y,f=this.width,p=this.height;return[{x:o,y:a-p/2,id:"".concat(this.id,"_0")},{x:o+f/2,y:a,id:"".concat(this.id,"_1")},{x:o,y:a+p/2,id:"".concat(this.id,"_2")},{x:o-f/2,y:a,id:"".concat(this.id,"_3")}]}}]),t}(hn),Gr,qy,eg,tg;function rg(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function KA(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?rg(Object(t),!0).forEach(function(n){og(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):rg(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function ac(e,r,t,n){!t||Object.defineProperty(e,r,{enumerable:t.enumerable,configurable:t.configurable,writable:t.writable,value:t.initializer?t.initializer.call(n):void 0})}function ZA(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function ng(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function JA(e,r,t){return r&&ng(e.prototype,r),t&&ng(e,t),e}function og(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function xi(e,r,t,n,o){var a={};return Object.keys(n).forEach(function(f){a[f]=n[f]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=t.slice().reverse().reduce(function(f,p){return p(e,r,f)||f},a),o&&a.initializer!==void 0&&(a.value=a.initializer?a.initializer.call(o):void 0,a.initializer=void 0),a.initializer===void 0&&(Object.defineProperty(e,r,a),a=null),a}var ig=(Gr=function(){function e(r){ZA(this,e),og(this,"graphModel",void 0),ac(this,"isShowHorizontal",qy,this),ac(this,"isShowVertical",eg,this),ac(this,"position",tg,this),this.isShowHorizontal=!1,this.isShowVertical=!1,this.position={x:0,y:0},this.graphModel=r}return JA(e,[{key:"getStyle",value:function(){return KA({},this.graphModel.theme.snapline)}},{key:"getCenterSnapLine",value:function(t,n){for(var o=t.x,a=t.y,f=!1,p=!1,g=0;g<n.length;g++){var O=n[g];if(O.id!==t.id&&(o===O.x&&(f=!0),a===O.y&&(p=!0),f&&p))break}return{isShowVertical:f,isShowHorizontal:p,position:{x:o,y:a}}}},{key:"getHorizontalSnapline",value:function(t,n){var o=!1,a,f=t.id,p;if(f){var g=this.graphModel.fakerNode;if(g&&g.id===f)p=xr(g);else{var O=this.graphModel.getNodeModelById(f);p=xr(O)}}for(var M=0;M<n.length;M++){var j=n[M];if(j.id!==t.id){var z=xr(j);if(z.minY===p.minY||z.maxY===p.minY){o=!0,a=p.minY;break}if(z.minY===p.maxY||z.maxY===p.maxY){o=!0,a=p.maxY;break}}}return ur({isShowHorizontal:o,position:{y:a}})}},{key:"getVerticalSnapline",value:function(t,n){var o=!1,a,f=t.id,p;if(f){var g=this.graphModel.fakerNode;if(g&&g.id===f)p=xr(g);else{var O=this.graphModel.getNodeModelById(f);p=xr(O)}}for(var M=0;M<n.length;M++){var j=n[M];if(j.id!==t.id){var z=xr(j);if(z.minX===p.minX||z.maxX===p.minX){o=!0,a=p.minX;break}if(z.minX===p.maxX||z.maxX===p.maxX){o=!0,a=p.maxX;break}}}return ur({isShowVertical:o,position:{x:a}})}},{key:"getSnapLinePosition",value:function(t,n){var o=this.getCenterSnapLine(t,n),a=o.isShowHorizontal,f=o.isShowVertical;if(!a){var p=this.getHorizontalSnapline(t,n);p.isShowHorizontal&&(o.isShowHorizontal=p.isShowHorizontal,o.position.y=p.position.y)}if(!f){var g=this.getVerticalSnapline(t,n);g.isShowVertical&&(o.isShowVertical=g.isShowVertical,o.position.x=g.position.x)}return o}},{key:"setSnaplineInfo",value:function(t){var n=t.isShowHorizontal,o=t.isShowVertical,a=t.position;this.position=a,this.isShowHorizontal=n,this.isShowVertical=o}},{key:"clearSnapline",value:function(){this.position={x:0,y:0},this.isShowHorizontal=!1,this.isShowVertical=!1}},{key:"setNodeSnapLine",value:function(t){var n=this.graphModel.nodes,o=this.getSnapLinePosition(t,n);this.setSnaplineInfo(o)}}]),e}(),qy=xi(Gr.prototype,"isShowHorizontal",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),eg=xi(Gr.prototype,"isShowVertical",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),tg=xi(Gr.prototype,"position",[s.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),xi(Gr.prototype,"clearSnapline",[s.k],Object.getOwnPropertyDescriptor(Gr.prototype,"clearSnapline"),Gr.prototype),xi(Gr.prototype,"setNodeSnapLine",[s.k],Object.getOwnPropertyDescriptor(Gr.prototype,"setNodeSnapLine"),Gr.prototype),Gr),Pi=new Map,ag=function(r){var t=_n();function n(){r();var a=Pi.get(t);if(a){var f=window.requestAnimationFrame(n);Pi.set(t,f)}}var o=window.requestAnimationFrame(n);return Pi.set(t,o),t},Uu=function(r){var t=Pi.get(r);t&&(window.cancelAnimationFrame(t),Pi.delete(r))};function Xu(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Xu=function(t){return typeof t}:Xu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xu(e)}function Ti(){return Ti=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Ti.apply(this,arguments)}function ug(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function Yu(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?ug(Object(t),!0).forEach(function(n){en(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ug(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function QA(e,r){return r1(e)||t1(e,r)||e1(e,r)||qA()}function qA(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function e1(e,r){if(!!e){if(typeof e=="string")return lg(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return lg(e,r)}}function lg(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function t1(e,r){var t=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,f,p;try{for(t=t.call(e);!(o=(f=t.next()).done)&&(n.push(f.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function r1(e){if(Array.isArray(e))return e}function n1(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function sg(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o1(e,r,t){return r&&sg(e.prototype,r),t&&sg(e,t),e}function i1(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&uc(e,r)}function uc(e,r){return uc=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},uc(e,r)}function a1(e){var r=l1();return function(){var n=Wu(e),o;if(r){var a=Wu(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return u1(this,o)}}function u1(e,r){if(r&&(Xu(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return qr(e)}function qr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l1(){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{return!1}}function Wu(e){return Wu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Wu(e)}function en(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var s1=function(e){i1(t,e);var r=a1(t);function t(){var n;return n1(this,t),n=r.call(this),en(qr(n),"preTargetNode",void 0),en(qr(n),"sourceRuleResults",void 0),en(qr(n),"targetRuleResults",void 0),en(qr(n),"dragHandler",void 0),en(qr(n),"t",void 0),en(qr(n),"onDragStart",function(o){var a=o.event,f=n.props,p=f.anchorData,g=f.nodeModel,O=f.graphModel,M=O.overlapMode;O.selectNodeById(g.id),M!==Sr.INCREASE&&g.autoToFront&&O.toFront(g.id),O.eventCenter.emit(ot.ANCHOR_DRAGSTART,{data:p,e:a,nodeModel:g}),n.setState({startX:p.x,startY:p.y,endX:p.x,endY:p.y})}),en(qr(n),"onDragging",function(o){var a=o.event,f=n.props,p=f.graphModel,g=f.nodeModel,O=f.anchorData,M=p.transformModel,j=p.eventCenter,z=p.width,$=p.height,Z=p.editConfigModel,ie=Z.autoExpand,oe=Z.stopMoveGraph,le=a.clientX,Ae=a.clientY,Ce=p.getPointByClient({x:le,y:Ae}),Ee=Ce.domOverlayPosition,Be=Ee.x,Ne=Ee.y,Ue=Ce.canvasOverlayPosition,De=Ue.x,it=Ue.y;n.t&&Uu(n.t);var vt=[],kt=10;Be<10?vt=[kt,0]:Be+10>z?vt=[-kt,0]:Ne<10?vt=[0,kt]:Ne+10>$&&(vt=[0,-kt]),n.setState({endX:De,endY:it,dragging:!0}),n.moveAnchorEnd(De,it),vt.length>0&&!oe&&ie&&(n.t=ag(function(){var Vt=vt,ir=QA(Vt,2),vr=ir[0],uo=ir[1];M.translate(vr,uo);var Yo=n.state,$n=Yo.endX,Wo=Yo.endY;n.setState({endX:$n-vr,endY:Wo-uo}),n.moveAnchorEnd($n-vr,Wo-uo)})),j.emit(ot.ANCHOR_DRAG,{data:O,e:a,nodeModel:g})}),en(qr(n),"onDragEnd",function(o){var a=o.event;n.t&&Uu(n.t),n.checkEnd(a),n.setState({startX:0,startY:0,endX:0,endY:0,dragging:!1}),n.sourceRuleResults.clear(),n.targetRuleResults.clear();var f=n.props,p=f.graphModel,g=f.nodeModel,O=f.anchorData;p.eventCenter.emit(ot.ANCHOR_DRAGEND,{data:O,e:a,nodeModel:g})}),en(qr(n),"checkEnd",function(o){var a=n.props,f=a.graphModel,p=a.nodeModel,g=a.anchorData,O=g.x,M=g.y,j=g.id;f.edgeType;var z=n.state,$=z.endX,Z=z.endY,ie=z.dragging,oe=Ia({x:$,y:Z},f);if(n.preTargetNode&&n.preTargetNode.state!==Ot.DEFAULT&&n.preTargetNode.setElementState(Ot.DEFAULT),!!ie&&oe&&oe.node){var le=oe.node,Ae=oe.anchor.id,Ce="".concat(p.id,"_").concat(le.id,"_").concat(Ae,"_").concat(j),Ee=n.sourceRuleResults.get(Ce)||{},Be=Ee.isAllPass,Ne=Ee.msg,Ue=n.targetRuleResults.get(Ce)||{},De=Ue.isAllPass,it=Ue.msg;if(Be&&De){le.setElementState(Ot.DEFAULT);var vt=f.edgeGenerator(p.getData(),f.getNodeModelById(oe.node.id).getData()),kt=f.addEdge(Yu(Yu({},vt),{},{sourceNodeId:p.id,sourceAnchorId:j,startPoint:{x:O,y:M},targetNodeId:oe.node.id,targetAnchorId:oe.anchor.id,endPoint:{x:oe.anchor.x,y:oe.anchor.y}})),Vt=n.props.anchorData;f.eventCenter.emit(ot.ANCHOR_DROP,{data:Vt,e:o,nodeModel:p,edgeModel:kt})}else{var ir=le.getData();f.eventCenter.emit(ot.CONNECTION_NOT_ALLOWED,{data:ir,msg:it||Ne})}}}),n.sourceRuleResults=new Map,n.targetRuleResults=new Map,n.state={startX:0,startY:0,endX:0,endY:0,dragging:!1},n.dragHandler=new cn({onDragStart:n.onDragStart,onDragging:n.onDragging,onDragEnd:n.onDragEnd}),n}return o1(t,[{key:"getAnchorShape",value:function(){var o=this.props,a=o.anchorData,f=o.style,p=o.node,g=p.getAnchorShape(a);if(g)return g;var O=a.x,M=a.y,j=Yu(Yu({},f),f.hover);return Object(ae.g)("g",null,Object(ae.g)(Ei,Ti({className:"lf-node-anchor-hover"},j,{x:O,y:M})),Object(ae.g)(Ei,Ti({className:"lf-node-anchor"},f,{x:O,y:M})))}},{key:"moveAnchorEnd",value:function(o,a){var f=this.props,p=f.graphModel,g=f.nodeModel,O=f.anchorData,M=Ia({x:o,y:a},p);if(M){var j=M.node,z=M.anchor.id;if(this.preTargetNode&&this.preTargetNode!==M.node&&this.preTargetNode.setElementState(Ot.DEFAULT),O.id===z)return;this.preTargetNode=j;var $="".concat(g.id,"_").concat(j.id,"_").concat(z,"_").concat(O.id);if(!this.targetRuleResults.has($)){var Z=M.anchor,ie=g.isAllowConnectedAsSource(j,O,Z),oe=j.isAllowConnectedAsTarget(g,O,Z);this.sourceRuleResults.set($,Ba(ie)),this.targetRuleResults.set($,Ba(oe))}var le=this.sourceRuleResults.get($),Ae=le.isAllPass,Ce=this.targetRuleResults.get($),Ee=Ce.isAllPass;Ae&&Ee?j.setElementState(Ot.ALLOW_CONNECT):j.setElementState(Ot.NOT_ALLOW_CONNECT)}else this.preTargetNode&&this.preTargetNode.state!==Ot.DEFAULT&&this.preTargetNode.setElementState(Ot.DEFAULT)}},{key:"isShowLine",value:function(){var o=this.state,a=o.startX,f=o.startY,p=o.endX,g=o.endY,O=Vr(a,f,p,g);return O>10}},{key:"render",value:function(){var o=this,a=this.state,f=a.startX,p=a.startY,g=a.endX,O=a.endY,M=this.props,j=M.anchorData.edgeAddable,z=M.edgeStyle;return Object(ae.g)("g",{className:"lf-anchor"},Object(ae.g)("g",{onMouseDown:function(Z){j!==!1&&o.dragHandler.handleMouseDown(Z)}},this.getAnchorShape()),this.isShowLine()&&Object(ae.g)(Co,Ti({x1:f,y1:p,x2:g,y2:O},z,{"pointer-events":"none"})))}}]),t}(ae.a),f1=s1;i(64);function fg(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function c1(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?fg(Object(t),!0).forEach(function(n){d1(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):fg(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function d1(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Vu(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Vu=function(t){return typeof t}:Vu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vu(e)}function p1(e,r){return g1(e)||y1(e,r)||v1(e,r)||h1()}function h1(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function v1(e,r){if(!!e){if(typeof e=="string")return cg(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return cg(e,r)}}function cg(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function y1(e,r){var t=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,f,p;try{for(t=t.call(e);!(o=(f=t.next()).done)&&(n.push(f.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function g1(e){if(Array.isArray(e))return e}function dg(e){var r=e.x,t=r===void 0?0:r,n=e.y,o=n===void 0?0:n,a=e.value,f=e.fontSize,p=e.fill,g=p===void 0?"currentColor":p,O=e.overflowMode,M=O===void 0?"default":O,j=e.textWidth,z=j===void 0?"":j,$=e.model,Z={textAnchor:"middle","dominant-baseline":"middle",x:t,y:o,fill:g};if(Object.entries(e).forEach(function(Ee){var Be=p1(Ee,2),Ne=Be[0],Ue=Be[1],De=Vu(Ue);De!=="object"&&(Z[Ne]=Ue)}),a){var ie=String(a).split(/[\r\n]/g),oe=ie.length;if(M!=="default"){var le=$.BaseType,Ae=$.modelType;if(le===Ft.NODE&&Ae!==ht.TEXT_NODE||le===Ft.EDGE&&z)return m1(e)}if(oe>1){var Ce=ie.map(function(Ee,Be){var Ne=f+2,Ue=(Be-(oe-1)/2)*Ne;return Object(ae.g)("tspan",{className:"lf-text-tspan",x:t,y:o+Ue},Ee)});return Object(ae.g)("text",Z,Ce)}return Object(ae.g)("text",Z,a)}}function m1(e){var r=e.value,t=e.fontSize,n=e.model,o=e.fontFamily,a=o===void 0?"":o,f=e.lineHeight,p=e.wrapPadding,g=p===void 0?"0, 0":p,O=e.overflowMode,M=e.x,j=e.y,z=n.width,$=n.textHeight,Z=e.textWidth||z,ie=String(r).split(/[\r\n]/g),oe=ie.length,le=Yp({rows:ie,style:{fontSize:"".concat(t,"px"),width:"".concat(Z,"px"),fontFamily:a,lineHeight:f,padding:g},rowsLength:oe,className:"lf-get-text-height"}),Ae=n.height>le?n.height:le;$&&(Ae=$);var Ce=O==="ellipsis";return Object(ae.g)("g",null,Object(ae.g)("foreignObject",{width:Z,height:Ae,x:M-Z/2,y:j-Ae/2},Object(ae.g)("div",{className:"lf-node-text-auto-wrap",style:{minHeight:Ae,width:Z,padding:g}},Object(ae.g)("div",{className:Ce?"lf-node-text-ellipsis-content":"lf-node-text-auto-wrap-content",title:Ce?ie.join(""):"",style:c1({},e)},ie.map(function(Ee){return Object(ae.g)("div",{className:"lf-node-text--auto-wrap-inner"},Ee)})))))}function Ku(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ku=function(t){return typeof t}:Ku=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ku(e)}function lc(){return lc=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},lc.apply(this,arguments)}function b1(e,r){return x1(e)||S1(e,r)||E1(e,r)||O1()}function O1(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function E1(e,r){if(!!e){if(typeof e=="string")return pg(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return pg(e,r)}}function pg(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function S1(e,r){var t=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,f,p;try{for(t=t.call(e);!(o=(f=t.next()).done)&&(n.push(f.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function x1(e){if(Array.isArray(e))return e}function P1(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function hg(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function T1(e,r,t){return r&&hg(e.prototype,r),t&&hg(e,t),e}function w1(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&sc(e,r)}function sc(e,r){return sc=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},sc(e,r)}function M1(e){var r=N1();return function(){var n=Zu(e),o;if(r){var a=Zu(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return A1(this,o)}}function A1(e,r){if(r&&(Ku(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Gn(e)}function Gn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function N1(){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{return!1}}function Zu(e){return Zu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Zu(e)}function oo(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var vg=function(e){w1(t,e);var r=M1(t);function t(n){var o;P1(this,t),o=r.call(this),oo(Gn(o),"dragHandler",void 0),oo(Gn(o),"sumDeltaX",0),oo(Gn(o),"sumDeltaY",0),oo(Gn(o),"stepDrag",void 0),oo(Gn(o),"onDragging",function(p){var g=p.deltaX,O=p.deltaY,M=o.props,j=M.model,z=M.graphModel.transformModel,$=z.fixDeltaXY(g,O),Z=b1($,2),ie=Z[0],oe=Z[1];j.moveText(ie,oe)}),oo(Gn(o),"dblClickHandler",function(){var p=o.props.editable;if(p){var g=o.props.model;g.setElementState(Ot.TEXT_EDIT)}}),oo(Gn(o),"mouseDownHandle",function(p){var g=o.props,O=g.draggable,M=g.graphModel.editConfigModel.nodeTextDraggable;(O||M)&&o.stepDrag.handleMouseDown(p)});var a=n.model,f=n.draggable;return o.stepDrag=new cn({onDragging:o.onDragging,step:1,model:a,isStopPropagation:f}),o}return T1(t,[{key:"getShape",value:function(){var o=this.props,a=o.model,f=o.graphModel,p=a.text,g=f.editConfigModel,O=p.value,M=p.x,j=p.y,z=p.editable,$=p.draggable,Z={x:M,y:j,className:"",value:O};z?Z.className="lf-element-text":$||g.nodeTextDraggable?Z.className="lf-text-draggable":Z.className="lf-text-disabled";var ie=a.getTextStyle();return Object(ae.g)(dg,lc({},Z,ie,{model:a}))}},{key:"render",value:function(){var o=this.props.model.text;if(o)return Object(ae.g)("g",{onMouseDown:this.mouseDownHandle,onDblClick:this.dblClickHandler},this.getShape())}}]),t}(ae.a),D1=window.navigator.userAgent.match(/MSIE|Trident/)!==null;function Ju(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ju=function(t){return typeof t}:Ju=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ju(e)}function Qu(e,r){return I1(e)||R1(e,r)||C1(e,r)||j1()}function j1(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function C1(e,r){if(!!e){if(typeof e=="string")return yg(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return yg(e,r)}}function yg(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function R1(e,r){var t=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,f,p;try{for(t=t.call(e);!(o=(f=t.next()).done)&&(n.push(f.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function I1(e){if(Array.isArray(e))return e}function _1(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function gg(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function B1(e,r,t){return r&&gg(e.prototype,r),t&&gg(e,t),e}function L1(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&fc(e,r)}function fc(e,r){return fc=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},fc(e,r)}function z1(e){var r=H1();return function(){var n=qu(e),o;if(r){var a=qu(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return F1(this,o)}}function F1(e,r){if(r&&(Ju(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return or(e)}function or(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function H1(){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{return!1}}function qu(e){return qu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},qu(e)}function fr(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var yn=function(e){L1(t,e);var r=z1(t);function t(n){var o;_1(this,t),o=r.call(this),fr(or(o),"t",void 0),fr(or(o),"moveOffset",void 0),fr(or(o),"stepDrag",void 0),fr(or(o),"contextMenuTime",void 0),fr(or(o),"startTime",void 0),fr(or(o),"clickTimer",void 0),fr(or(o),"onDragStart",function(O){var M=O.event,j=M.clientX,z=M.clientY,$=o.props,Z=$.model,ie=$.graphModel,oe=ie.getPointByClient({x:j,y:z}),le=oe.canvasOverlayPosition,Ae=le.x,Ce=le.y;o.moveOffset={x:Z.x-Ae,y:Z.y-Ce}}),fr(or(o),"onDragging",function(O){var M=O.event,j=o.props,z=j.model,$=j.graphModel,Z=$.editConfigModel,ie=Z.stopMoveGraph,oe=Z.autoExpand,le=$.transformModel,Ae=$.width,Ce=$.height,Ee=$.gridSize;z.isDragging=!0;var Be=M.clientX,Ne=M.clientY,Ue=$.getPointByClient({x:Be,y:Ne}),De=Ue.canvasOverlayPosition,it=De.x,vt=De.y,kt=le.CanvasPointToHtmlPoint([it,vt]),Vt=Qu(kt,2),ir=Vt[0],vr=Vt[1];if(it=it+o.moveOffset.x,vt=vt+o.moveOffset.y,it=In(it,Ee),vt=In(vt,Ee),!Ae||!Ce){$.moveNode2Coordinate(z.id,it,vt);return}var uo=ir<0||vr<0||ir>Ae||vr>Ce;if(!(oe&&!ie&&uo)){var Yo=le.CanvasPointToHtmlPoint([it-z.width/2,vt-z.height/2]),$n=Qu(Yo,2),Wo=$n[0],td=$n[1],AC=le.CanvasPointToHtmlPoint([it+z.width/2,vt+z.height/2]),ym=Qu(AC,2),NC=ym[0],DC=ym[1],Gl=Math.max(Ee,20),Vo=[];Wo<0?Vo=[Gl,0]:NC>$.width?Vo=[-Gl,0]:td<0?Vo=[0,Gl]:DC>$.height&&(Vo=[0,-Gl]),o.t&&Uu(o.t),Vo.length>0&&!ie&&oe?o.t=ag(function(){var jC=Vo,gm=Qu(jC,2),mm=gm[0],bm=gm[1];le.translate(mm,bm),$.moveNode(z.id,-mm/le.SCALE_X,-bm/le.SCALE_X)}):$.moveNode2Coordinate(z.id,it,vt)}}),fr(or(o),"onDragEnd",function(){o.t&&Uu(o.t);var O=o.props.model;O.isDragging=!1}),fr(or(o),"handleClick",function(O){if(!!o.startTime){var M=new Date().getTime()-o.startTime;if(!(M>200)){var j=o.props,z=j.model,$=j.graphModel,Z=z.getData(),ie=$.getPointByClient({x:O.clientX,y:O.clientY}),oe={data:Z,e:O,position:ie,isSelected:!1,isMultiple:!1},le=O.button===2,Ae=O.detail===2;if(!le){var Ce=$.editConfigModel,Ee=Fp(O,Ce);oe.isMultiple=Ee,z.isSelected&&!Ae&&Ee?(oe.isSelected=!1,z.setSelected(!1)):($.selectNodeById(z.id,Ee),oe.isSelected=!0,o.toFront()),Ae?(Ce.nodeTextEdit&&z.text.editable&&(z.setSelected(!1),$.setElementStateById(z.id,Ot.TEXT_EDIT)),$.eventCenter.emit(ot.NODE_DBCLICK,oe)):($.eventCenter.emit(ot.ELEMENT_CLICK,oe),$.eventCenter.emit(ot.NODE_CLICK,oe))}}}}),fr(or(o),"handleContextMenu",function(O){O.preventDefault();var M=o.props,j=M.model,z=M.graphModel,$=j.getData(),Z=z.getPointByClient({x:O.clientX,y:O.clientY});z.setElementStateById(j.id,Ot.SHOW_MENU,Z.domOverlayPosition),j.isSelected||z.selectNodeById(j.id),z.eventCenter.emit(ot.NODE_CONTEXTMENU,{data:$,e:O,position:Z}),o.toFront()}),fr(or(o),"handleMouseDown",function(O){var M=o.props,j=M.model,z=M.graphModel;o.startTime=new Date().getTime();var $=z.editConfigModel;$.adjustNodePosition&&j.draggable&&o.stepDrag&&o.stepDrag.handleMouseDown(O)}),fr(or(o),"setHoverON",function(O){var M=o.props,j=M.model,z=M.graphModel;if(!j.isHovered){var $=j.getData();j.setHovered(!0),z.eventCenter.emit(ot.NODE_MOUSEENTER,{data:$,e:O})}}),fr(or(o),"setHoverOFF",function(O){var M=o.props,j=M.model,z=M.graphModel,$=j.getData();!j.isHovered||(j.setHovered(!1),z.eventCenter.emit(ot.NODE_MOUSELEAVE,{data:$,e:O}))}),fr(or(o),"onMouseOut",function(O){D1&&o.setHoverOFF(O)});var a=n.graphModel,f=a.gridSize,p=a.eventCenter,g=n.model;return o.stepDrag=new cn({onDragStart:o.onDragStart,onDragging:o.onDragging,onDragEnd:o.onDragEnd,step:f,eventType:"NODE",isStopPropagation:!1,eventCenter:p,model:g}),o}return B1(t,[{key:"getAnchorShape",value:function(o){return null}},{key:"getAnchors",value:function(){var o=this,a=this.props,f=a.model,p=a.graphModel,g=f.isSelected,O=f.isHitable,M=f.isDragging,j=f.isShowAnchor;return O&&(g||j)&&!M?Ma(f.anchors,function(z,$){var Z=f.getAnchorLineStyle(z),ie=f.getAnchorStyle(z);return Object(ae.g)(f1,{anchorData:z,node:o,style:ie,edgeStyle:Z,anchorIndex:$,nodeModel:f,graphModel:p,setHoverOFF:o.setHoverOFF})}):[]}},{key:"getText",value:function(){var o=this.props,a=o.model,f=o.graphModel;if(a.state===Ot.TEXT_EDIT)return"";if(a.text){var p=f.editConfigModel,g=!1;return(a.text.draggable||p.nodeTextDraggable)&&(g=!0),Object(ae.g)(vg,{editable:p.nodeTextEdit&&a.text.editable,model:a,graphModel:f,draggable:g})}}},{key:"getStateClassName",value:function(){var o=this.props.model,a=o.state,f=o.isDragging,p=o.isSelected,g="lf-node";switch(a){case Ot.ALLOW_CONNECT:g+=" lf-node-allow";break;case Ot.NOT_ALLOW_CONNECT:g+=" lf-node-not-allow";break;default:g+=" lf-node-default";break}return f&&(g+=" lf-isDragging"),p&&(g+=" lf-node-selected"),g}},{key:"toFront",value:function(){var o=this.props,a=o.model,f=o.graphModel,p=f.overlapMode;p!==Sr.INCREASE&&a.autoToFront&&f.toFront(a.id)}},{key:"render",value:function(){var o=this.props,a=o.model,f=o.graphModel,p=f.editConfigModel,g=p.hideAnchors,O=p.adjustNodePosition,M=f.gridSize,j=f.transformModel.SCALE_X,z=a.isHitable,$=a.draggable,Z=Object(ae.g)("g",{className:"lf-node-content"},this.getShape(),this.getText(),g?null:this.getAnchors()),ie;return z?(O&&$&&this.stepDrag.setStep(M*j),ie=Object(ae.g)("g",{className:this.getStateClassName(),onMouseDown:this.handleMouseDown,onClick:this.handleClick,onMouseEnter:this.setHoverON,onMouseOver:this.setHoverON,onMouseLeave:this.setHoverOFF,onMouseOut:this.onMouseOut,onContextMenu:this.handleContextMenu},Z)):ie=Object(ae.g)("g",{className:this.getStateClassName()},Z),ie}}],[{key:"getModel",value:function(o){return o}}]),t}(ae.a);function el(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?el=function(t){return typeof t}:el=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},el(e)}function cc(){return cc=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},cc.apply(this,arguments)}function G1(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function mg(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function k1(e,r,t){return r&&mg(e.prototype,r),t&&mg(e,t),e}function $1(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&dc(e,r)}function dc(e,r){return dc=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},dc(e,r)}function U1(e){var r=W1();return function(){var n=tl(e),o;if(r){var a=tl(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return X1(this,o)}}function X1(e,r){if(r&&(el(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Y1(e)}function Y1(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function W1(){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{return!1}}function tl(e){return tl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},tl(e)}var pc=function(e){$1(t,e);var r=U1(t);function t(){return G1(this,t),r.apply(this,arguments)}return k1(t,[{key:"getShape",value:function(){var o=this.props.model,a=o.getNodeStyle();return Object(ae.g)(zn,cc({},a,{x:o.x,y:o.y,width:o.width,height:o.height,radius:o.radius}))}}]),t}(yn);function rl(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?rl=function(t){return typeof t}:rl=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rl(e)}function hc(){return hc=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},hc.apply(this,arguments)}function V1(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function bg(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function K1(e,r,t){return r&&bg(e.prototype,r),t&&bg(e,t),e}function Z1(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&vc(e,r)}function vc(e,r){return vc=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},vc(e,r)}function J1(e){var r=eN();return function(){var n=nl(e),o;if(r){var a=nl(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return Q1(this,o)}}function Q1(e,r){if(r&&(rl(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return q1(e)}function q1(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eN(){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{return!1}}function nl(e){return nl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},nl(e)}var yc=function(e){Z1(t,e);var r=J1(t);function t(){return V1(this,t),r.apply(this,arguments)}return K1(t,[{key:"getShape",value:function(){var o=this.props.model,a=o.x,f=o.y,p=o.r,g=o.getNodeStyle();return Object(ae.g)(Ei,hc({},g,{x:a,y:f,r:p}))}}]),t}(yn);function ol(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ol=function(t){return typeof t}:ol=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ol(e)}function tN(e,r){return iN(e)||oN(e,r)||nN(e,r)||rN()}function rN(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nN(e,r){if(!!e){if(typeof e=="string")return Og(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Og(e,r)}}function Og(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function oN(e,r){var t=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,f,p;try{for(t=t.call(e);!(o=(f=t.next()).done)&&(n.push(f.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function iN(e){if(Array.isArray(e))return e}function Eg(e){var r=e.points,t=e.className,n={fill:"transparent",fillOpacity:1,strokeWidth:1,stroke:"#000",strokeOpacity:1,points:""};return Object.entries(e).forEach(function(o){var a=tN(o,2),f=a[0],p=a[1],g=ol(p);g!=="object"&&(n[f]=p)}),t?n.className="lf-basic-shape ".concat(t):n.className="lf-basic-shape",n.points=r.map(function(o){return o.join(",")}).join(" "),Object(ae.g)("polygon",n)}function il(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?il=function(t){return typeof t}:il=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},il(e)}function gc(){return gc=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},gc.apply(this,arguments)}function aN(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Sg(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function uN(e,r,t){return r&&Sg(e.prototype,r),t&&Sg(e,t),e}function lN(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&mc(e,r)}function mc(e,r){return mc=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},mc(e,r)}function sN(e){var r=dN();return function(){var n=al(e),o;if(r){var a=al(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return fN(this,o)}}function fN(e,r){if(r&&(il(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return cN(e)}function cN(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dN(){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{return!1}}function al(e){return al=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},al(e)}var bc=function(e){lN(t,e);var r=sN(t);function t(){return aN(this,t),r.apply(this,arguments)}return uN(t,[{key:"getShape",value:function(){var o=this.props.model,a=o.x,f=o.y,p=o.width,g=o.height,O=o.points,M=o.getNodeStyle(),j={transform:"matrix(1 0 0 1 ".concat(a-p/2," ").concat(f-g/2,")")};return Object(ae.g)("g",j,Object(ae.g)(Eg,gc({},M,{points:O,x:a,y:f})))}}]),t}(yn);function ul(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ul=function(t){return typeof t}:ul=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ul(e)}function Oc(){return Oc=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Oc.apply(this,arguments)}function pN(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function xg(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function hN(e,r,t){return r&&xg(e.prototype,r),t&&xg(e,t),e}function vN(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&Ec(e,r)}function Ec(e,r){return Ec=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Ec(e,r)}function yN(e){var r=bN();return function(){var n=ll(e),o;if(r){var a=ll(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return gN(this,o)}}function gN(e,r){if(r&&(ul(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mN(e)}function mN(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bN(){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{return!1}}function ll(e){return ll=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ll(e)}var Sc=function(e){vN(t,e);var r=yN(t);function t(){return pN(this,t),r.apply(this,arguments)}return hN(t,[{key:"getShape",value:function(){var o=this.props.model,a=o.getNodeStyle();return Object(ae.g)("g",null,Object(ae.g)(Eg,Oc({},a,{points:o.points,x:o.x,y:o.y})))}}]),t}(yn);function sl(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?sl=function(t){return typeof t}:sl=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sl(e)}function ON(e,r){return PN(e)||xN(e,r)||SN(e,r)||EN()}function EN(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function SN(e,r){if(!!e){if(typeof e=="string")return Pg(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Pg(e,r)}}function Pg(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function xN(e,r){var t=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,f,p;try{for(t=t.call(e);!(o=(f=t.next()).done)&&(n.push(f.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function PN(e){if(Array.isArray(e))return e}function TN(e){var r=e.x,t=r===void 0?0:r,n=e.y,o=n===void 0?0:n,a=e.rx,f=a===void 0?4:a,p=e.ry,g=p===void 0?4:p,O=e.className,M={cx:t,cy:o,rx:f,ry:g,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(e).forEach(function(j){var z=ON(j,2),$=z[0],Z=z[1],ie=sl(Z);ie!=="object"&&(M[$]=Z)}),O?M.className="lf-basic-shape ".concat(O):M.className="lf-basic-shape",Object(ae.g)("ellipse",M)}function fl(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?fl=function(t){return typeof t}:fl=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fl(e)}function xc(){return xc=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},xc.apply(this,arguments)}function wN(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Tg(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function MN(e,r,t){return r&&Tg(e.prototype,r),t&&Tg(e,t),e}function AN(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&Pc(e,r)}function Pc(e,r){return Pc=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Pc(e,r)}function NN(e){var r=CN();return function(){var n=cl(e),o;if(r){var a=cl(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return DN(this,o)}}function DN(e,r){if(r&&(fl(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return jN(e)}function jN(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function CN(){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{return!1}}function cl(e){return cl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},cl(e)}var Tc=function(e){AN(t,e);var r=NN(t);function t(){return wN(this,t),r.apply(this,arguments)}return MN(t,[{key:"getShape",value:function(){var o=this.props.model,a=o.getNodeStyle();return Object(ae.g)(TN,xc({},a,{x:o.x,y:o.y,rx:o.rx,ry:o.ry}))}}]),t}(yn);function dl(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?dl=function(t){return typeof t}:dl=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dl(e)}function wg(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function Mg(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?wg(Object(t),!0).forEach(function(n){RN(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):wg(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function RN(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function IN(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Ag(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _N(e,r,t){return r&&Ag(e.prototype,r),t&&Ag(e,t),e}function BN(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&wc(e,r)}function wc(e,r){return wc=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},wc(e,r)}function LN(e){var r=HN();return function(){var n=pl(e),o;if(r){var a=pl(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return zN(this,o)}}function zN(e,r){if(r&&(dl(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return FN(e)}function FN(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function HN(){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{return!1}}function pl(e){return pl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},pl(e)}var Mc=function(e){BN(t,e);var r=LN(t);function t(){return IN(this,t),r.apply(this,arguments)}return _N(t,[{key:"getBackground",value:function(){var o=this.props.model,a=o.getTextStyle(),f=o.text;if(f&&f.value&&a.background&&a.background.fill!=="transparent"){var p=f.x,g=f.y,O=o.width,M=o.height,j=Mg(Mg({},a.background),{},{x:p,y:g-1,width:O,height:M});return Object(ae.g)(zn,j)}}},{key:"getShape",value:function(){return Object(ae.g)("g",null,this.getBackground())}}]),t}(yn);function hl(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?hl=function(t){return typeof t}:hl=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hl(e)}function Ac(){return Ac=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Ac.apply(this,arguments)}function GN(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Ng(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function kN(e,r,t){return r&&Ng(e.prototype,r),t&&Ng(e,t),e}function $N(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&Nc(e,r)}function Nc(e,r){return Nc=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Nc(e,r)}function UN(e){var r=YN();return function(){var n=vl(e),o;if(r){var a=vl(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return XN(this,o)}}function XN(e,r){if(r&&(hl(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return wi(e)}function wi(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function YN(){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{return!1}}function vl(e){return vl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},vl(e)}function yl(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var Dc=function(e){$N(t,e);var r=UN(t);function t(){var n;GN(this,t);for(var o=arguments.length,a=new Array(o),f=0;f<o;f++)a[f]=arguments[f];return n=r.call.apply(r,[this].concat(a)),yl(wi(n),"ref",void 0),yl(wi(n),"currentProperties",void 0),yl(wi(n),"preProperties",void 0),yl(wi(n),"setRef",function(p){n.ref=p}),n}return kN(t,[{key:"rootEl",get:function(){return this.ref}},{key:"setHtml",value:function(o){o.appendChild(document.createElement("div"))}},{key:"shouldUpdate",value:function(){if(!(this.preProperties&&this.preProperties===this.currentProperties))return this.preProperties=this.currentProperties,!0}},{key:"componentDidMount",value:function(){this.shouldUpdate()&&this.setHtml(this.rootEl)}},{key:"componentDidUpdate",value:function(){this.shouldUpdate()&&this.setHtml(this.rootEl)}},{key:"getShape",value:function(){var o=this.props.model,a=o.x,f=o.y,p=o.height,g=o.width,O=o.getNodeStyle();return this.currentProperties=JSON.stringify(o.properties),Object(ae.g)("foreignObject",Ac({},O,{x:a-g/2,y:f-p/2,width:g,height:p,ref:this.setRef}))}}]),t}(yn);function gl(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?gl=function(t){return typeof t}:gl=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gl(e)}function jc(){return jc=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},jc.apply(this,arguments)}function Dg(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function io(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Dg(Object(t),!0).forEach(function(n){Ic(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Dg(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function WN(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function jg(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function VN(e,r,t){return r&&jg(e.prototype,r),t&&jg(e,t),e}function KN(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&Cc(e,r)}function Cc(e,r){return Cc=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Cc(e,r)}function ZN(e){var r=QN();return function(){var n=ml(e),o;if(r){var a=ml(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return JN(this,o)}}function JN(e,r){if(r&&(gl(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Rc(e)}function Rc(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function QN(){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{return!1}}function ml(e){return ml=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ml(e)}function Ic(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var qN=function(e){KN(t,e);var r=ZN(t);function t(n){var o;return WN(this,t),o=r.call(this,n),Ic(Rc(o),"setHoverON",function(){o.setState({isHovered:!0})}),Ic(Rc(o),"setHoverOFF",function(){o.setState({isHovered:!1})}),o.state={isHovered:!1},o}return VN(t,[{key:"getBackground",value:function(){var o=this.props.model,a=o.getTextStyle(),f=o.text,p=a.background||{},g=this.state.isHovered;if(g&&a.hover&&a.hover.background&&(p=io(io({},p),a.hover.background)),f&&f.value&&p.fill!=="transparent"){var O=a.fontSize,M=a.overflowMode,j=a.lineHeight,z=a.wrapPadding,$=a.textWidth,Z=f.value,ie=f.x,oe=f.y,le=String(Z).split(/[\r\n]/g),Ae=le.length,Ce;if(M==="autoWrap"&&$){var Ee=Yp({rows:le,style:{fontSize:"".concat(O,"px"),width:"".concat($,"px"),lineHeight:j,padding:z},rowsLength:Ae,className:"lf-get-text-height"});Ce=io(io({},p),{},{x:ie-1,y:oe-1,width:$,height:Ee})}else{le&&le.forEach(function(it){Lh(it)});var Be=pf({rows:le,fontSize:O,rowsLength:Ae}),Ne=Be.width,Ue=Be.height;if(typeof p.wrapPadding=="string"){var De=p.wrapPadding.split(",").filter(function(it){return it.trim()}).map(function(it){return parseFloat(it.trim())});De.length>0&&De.length<=4&&(De.length===1?De=[De[0],De[0],De[0],De[0]]:De.length===2?De=[De[0],De[1],De[0],De[1]]:De.length===3&&(De=[De[0],De[1],De[2],De[1]]),Ne+=De[1]+De[3],Ue+=De[0]+De[2],ie=ie+(De[1]-De[3])/2,oe=oe+(De[2]-De[0])/2)}Ce=io(io({},p),{},{x:ie-1,y:oe-1,width:Ne,height:Ue})}return Object(ae.g)(zn,Ce)}}},{key:"getShape",value:function(){var o=this.props.model,a=o.text,f=a.value,p=a.x,g=a.y;if(!!f){var O=o.getTextStyle(),M=io({x:p,y:g,className:"lf-element-text",value:f},O);return Object(ae.g)("g",{className:"lf-line-text",onMouseEnter:this.setHoverON,onMouseLeave:this.setHoverOFF},this.getBackground(),Object(ae.g)(dg,jc({},M,{model:o})))}}}]),t}(vg);function bl(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?bl=function(t){return typeof t}:bl=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bl(e)}function Cg(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function gn(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Cg(Object(t),!0).forEach(function(n){Tr(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Cg(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function eD(e,r){return oD(e)||nD(e,r)||rD(e,r)||tD()}function tD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rD(e,r){if(!!e){if(typeof e=="string")return Rg(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Rg(e,r)}}function Rg(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function nD(e,r){var t=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,f,p;try{for(t=t.call(e);!(o=(f=t.next()).done)&&(n.push(f.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function oD(e){if(Array.isArray(e))return e}function iD(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Ig(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function aD(e,r,t){return r&&Ig(e.prototype,r),t&&Ig(e,t),e}function uD(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&_c(e,r)}function _c(e,r){return _c=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},_c(e,r)}function lD(e){var r=fD();return function(){var n=Ol(e),o;if(r){var a=Ol(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return sD(this,o)}}function sD(e,r){if(r&&(bl(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Pr(e)}function Pr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fD(){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{return!1}}function Ol(e){return Ol=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ol(e)}function Tr(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var tn;(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(tn||(tn={}));var _g=function(e){uD(t,e);var r=lD(t);function t(n){var o;iD(this,t),o=r.call(this),Tr(Pr(o),"stepDragData",void 0),Tr(Pr(o),"stepDrag",void 0),Tr(Pr(o),"oldEdge",void 0),Tr(Pr(o),"preTargetNode",void 0),Tr(Pr(o),"targetRuleResults",void 0),Tr(Pr(o),"sourceRuleResults",void 0),Tr(Pr(o),"handleMouseDown",function(O){o.stepDrag&&o.stepDrag.handleMouseDown(O)}),Tr(Pr(o),"onDragStart",function(){var O=o.props,M=O.x,j=O.y,z=O.edgeModel,$=z.startPoint,Z=z.endPoint,ie=z.pointsList;o.oldEdge={startPoint:$,endPoint:Z,pointsList:ie},o.setState({endX:M,endY:j,dragging:!0})}),Tr(Pr(o),"onDragging",function(O){var M=O.deltaX,j=O.deltaY,z=o.state,$=z.endX,Z=z.endY,ie=o.props,oe=ie.graphModel,le=ie.type,Ae=oe.transformModel,Ce=oe.editConfigModel,Ee=Ae.moveCanvasPointByHtml([$,Z],M,j),Be=eD(Ee,2),Ne=Be[0],Ue=Be[1];o.setState({endX:Ne,endY:Ue,dragging:!0});var De=o.props.edgeModel,it=Ia({x:$,y:Z},oe);if(it&&it.node&&o.isAllowAdjust(it)){var vt,kt=De.startPoint,Vt=De.endPoint,ir=De.sourceNode,vr=De.targetNode;le===tn.SOURCE?vt={startPoint:{x:it.anchor.x,y:it.anchor.y},endPoint:{x:Vt.x,y:Vt.y},sourceNode:it.node,targetNode:vr}:le===tn.TARGET&&(vt={startPoint:{x:kt.x,y:kt.y},endPoint:{x:it.anchor.x,y:it.anchor.y},sourceNode:ir,targetNode:it.node}),De.updateAfterAdjustStartAndEnd(vt)}else le===tn.SOURCE?De.updateStartPoint({x:Ne,y:Ue}):le===tn.TARGET&&De.updateEndPoint({x:Ne,y:Ue});De.text.value&&Ce.adjustEdge&&De.setText(Object.assign({},De.text,De.textPosition))}),Tr(Pr(o),"onDragEnd",function(O){var M=O.event;try{var j;o.setState({dragging:!1});var z=o.props,$=z.graphModel,Z=z.edgeModel,ie=z.type,oe=o.state,le=oe.endX,Ae=oe.endY,Ce=oe.dragging,Ee=Ia({x:le,y:Ae},$);if(!Ce)return;var Be=!1,Ne;if(Ee&&Ee.node&&o.isAllowAdjust(Ee)){var Ue,De=Z.getData();if(Ne=gn(gn({},De),{},{sourceAnchorId:"",targetAnchorId:"",text:(De==null||(Ue=De.text)===null||Ue===void 0?void 0:Ue.value)||""}),ie===tn.SOURCE){var it=$.edgeGenerator($.getNodeModelById(Ee.node.id).getData(),$.getNodeModelById(Z.targetNodeId).getData(),Ne);Ne=gn(gn({},it),{},{sourceNodeId:Ee.node.id,sourceAnchorId:Ee.anchor.id,startPoint:{x:Ee.anchor.x,y:Ee.anchor.y},targetNodeId:Z.targetNodeId,endPoint:gn({},Z.endPoint)}),Z.sourceNodeId===Ee.node.id&&Z.sourceAnchorId===Ee.anchor.id&&(Be=!0)}else if(ie===tn.TARGET){var vt=$.edgeGenerator($.getNodeModelById(Z.sourceNodeId).getData(),$.getNodeModelById(Ee.node.id).getData(),Ne);Ne=gn(gn({},vt),{},{sourceNodeId:Z.sourceNodeId,startPoint:gn({},Z.startPoint),targetNodeId:Ee.node.id,targetAnchorId:Ee.anchor.id,endPoint:{x:Ee.anchor.x,y:Ee.anchor.y}}),Z.targetNodeId===Ee.node.id&&Z.targetAnchorId===Ee.anchor.id&&(Be=!0)}}else Be=!0;if(Be)o.recoveryEdge();else{$.deleteEdgeById(Z.id);var kt=$.addEdge(gn({},Ne));$.eventCenter.emit(ot.EDGE_EXCHANGE_NODE,{data:{newEdge:kt.getData(),oldEdge:Z.getData()}})}(j=o.preTargetNode)===null||j===void 0||j.setElementState(Ot.DEFAULT)}finally{var Vt=o.props.graphModel;Vt.eventCenter.emit(ot.ADJUST_POINT_DRAGEND,{e:M,data:o.stepDragData})}}),Tr(Pr(o),"recoveryEdge",function(){var O=o.props.edgeModel,M=o.oldEdge,j=M.startPoint,z=M.endPoint,$=M.pointsList;O.updateStartPoint(j),O.updateEndPoint(z),O.modelType!==ht.LINE_EDGE&&(O.pointsList=$,O.initPoints())}),Tr(Pr(o),"getAdjustPointStyle",function(){var O=o.props,M=O.graphModel.theme;O.edgeModel;var j=M.edgeAdjust;return j}),o.state={dragging:!1,endX:0,endY:0},o.targetRuleResults=new Map,o.sourceRuleResults=new Map;var a=n.type,f=n.edgeModel,p=n.graphModel,g=p.eventCenter;return o.stepDragData={type:a,edgeData:f.getData()},o.stepDrag=new cn({onDragStart:o.onDragStart,onDragging:o.onDragging,onDragEnd:o.onDragEnd,eventType:"ADJUST_POINT",isStopPropagation:!1,eventCenter:g,data:o.stepDragData}),o}return aD(t,[{key:"isAllowAdjust",value:function(o){var a=this.props,f=a.edgeModel,p=f.id,g=f.sourceNode,O=f.targetNode,M=f.sourceAnchorId,j=f.targetAnchorId,z=a.type,$=null,Z=null,ie=null,oe=null;if(z===tn.SOURCE?($=o.node,Z=O,ie=o.anchor,oe=O.getAnchorInfo(j)):($=g,Z=o.node,oe=o.anchor,ie=g.getAnchorInfo(M)),this.preTargetNode&&this.preTargetNode!==o.node&&this.preTargetNode.setElementState(Ot.DEFAULT),this.preTargetNode=o.node,oe.id===ie.id)return!1;var le="".concat($.id,"_").concat(Z.id,"_").concat(ie.id,"_").concat(oe.id);if(!this.targetRuleResults.has(le)){var Ae=$.isAllowConnectedAsSource(Z,ie,oe,p),Ce=Z.isAllowConnectedAsTarget($,ie,oe,p);this.sourceRuleResults.set(le,Ba(Ae)),this.targetRuleResults.set(le,Ba(Ce))}var Ee=this.sourceRuleResults.get(le),Be=Ee.isAllPass,Ne=this.targetRuleResults.get(le),Ue=Ne.isAllPass,De=Be&&Ue?Ot.ALLOW_CONNECT:Ot.NOT_ALLOW_CONNECT;return z===tn.SOURCE?$.setElementState(De):Z.setElementState(De),Be&&Ue}},{key:"render",value:function(){var o=this.props,a=o.x,f=o.y,p=o.getAdjustPointShape,g=this.state.dragging;return Object(ae.g)("g",{pointerEvents:g?"none":"",onMouseDown:this.handleMouseDown},p(a,f,g))}}]),t}(ae.a);function El(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?El=function(t){return typeof t}:El=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},El(e)}function Mi(){return Mi=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Mi.apply(this,arguments)}function cD(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Bg(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function dD(e,r,t){return r&&Bg(e.prototype,r),t&&Bg(e,t),e}function pD(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&Bc(e,r)}function Bc(e,r){return Bc=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Bc(e,r)}function hD(e){var r=yD();return function(){var n=Sl(e),o;if(r){var a=Sl(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return vD(this,o)}}function vD(e,r){if(r&&(El(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _r(e)}function _r(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function yD(){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{return!1}}function Sl(e){return Sl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Sl(e)}function kr(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var Ai=function(e){pD(t,e);var r=hD(t);function t(){var n;cD(this,t);for(var o=arguments.length,a=new Array(o),f=0;f<o;f++)a[f]=arguments[f];return n=r.call.apply(r,[this].concat(a)),kr(_r(n),"startTime",void 0),kr(_r(n),"contextMenuTime",void 0),kr(_r(n),"clickTimer",void 0),kr(_r(n),"textRef",Object(ae.f)()),kr(_r(n),"getAdjustPointShape",function(p,g){var O=n.props.model,M=O.getAdjustPointStyle();return Object(ae.g)(Ei,Mi({className:"lf-edge-adjust-point"},M,{x:p,y:g}))}),kr(_r(n),"handleHover",function(p,g){var O=n.props,M=O.model,j=O.graphModel.eventCenter;M.setHovered(p);var z=p?ot.EDGE_MOUSEENTER:ot.EDGE_MOUSELEAVE,$=M.getData();j.emit(z,{data:$,e:g})}),kr(_r(n),"setHoverON",function(p){var g=n.props.model.isHovered;g||(n.textRef&&n.textRef.current.setHoverON(),n.handleHover(!0,p))}),kr(_r(n),"setHoverOFF",function(p){var g=n.props.model.isHovered;!g||(n.textRef&&n.textRef.current.setHoverOFF(),n.handleHover(!1,p))}),kr(_r(n),"handleContextMenu",function(p){p.preventDefault(),n.contextMenuTime=new Date().getTime(),n.clickTimer&&clearTimeout(n.clickTimer);var g=n.props,O=g.model,M=g.graphModel,j=M.getPointByClient({x:p.clientX,y:p.clientY});M.setElementStateById(O.id,Ot.SHOW_MENU,j.domOverlayPosition),n.toFront(),O.isSelected||M.selectEdgeById(O.id);var z=O==null?void 0:O.getData();M.eventCenter.emit(ot.EDGE_CONTEXTMENU,{data:z,e:p,position:j})}),kr(_r(n),"handleMouseDown",function(p){p.stopPropagation(),n.startTime=new Date().getTime()}),kr(_r(n),"handleMouseUp",function(p){if(!!n.startTime){var g=new Date().getTime()-n.startTime;if(!(g>200)){var O=p.button===2;if(!O){var M=p.detail===2,j=n.props,z=j.model,$=j.graphModel,Z=z==null?void 0:z.getData(),ie=$.getPointByClient({x:p.clientX,y:p.clientY});if(M){var oe=$.editConfigModel,le=$.textEditElement;if(le&&le.id===z.id&&$.setElementStateById(z.id,Ot.DEFAULT),oe.edgeTextEdit&&z.text.editable&&$.setElementStateById(z.id,Ot.TEXT_EDIT),z.modelType===ht.POLYLINE_EDGE){var Ae=z,Ce=$.getPointByClient({x:p.x,y:p.y}),Ee=Ce.canvasOverlayPosition,Be=Ee.x,Ne=Ee.y,Ue=Fh({x:Be,y:Ne},Ae.points);Ae.dbClickPosition=Ue}$.eventCenter.emit(ot.EDGE_DBCLICK,{data:Z,e:p,position:ie})}else $.eventCenter.emit(ot.ELEMENT_CLICK,{data:Z,e:p,position:ie}),$.eventCenter.emit(ot.EDGE_CLICK,{data:Z,e:p,position:ie});var De=$.editConfigModel;$.selectEdgeById(z.id,Fp(p,De)),n.toFront()}}}}),n}return dD(t,[{key:"getShape",value:function(){return Object(ae.g)("g",null,this.getEdge())}},{key:"getTextStyle",value:function(){}},{key:"getText",value:function(){var o=this.props,a=o.model,f=o.graphModel;if(a.state===Ot.TEXT_EDIT)return null;var p=!1,g=f.editConfigModel;return(a.text.draggable||g.edgeTextDraggable)&&(p=!0),Object(ae.g)(qN,{ref:this.textRef,editable:g.edgeTextEdit&&a.text.editable,model:a,graphModel:f,draggable:p})}},{key:"getArrowInfo",value:function(){var o=this.props.model,a=o.startPoint,f=o.endPoint,p=o.isSelected,g=this.state,O=g.hover;return{start:a,end:f,hover:O,isSelected:p}}},{key:"getArrowStyle",value:function(){return console.error("getArrowStyle is deprecated in 1.2.0, please use model.getArrowStyle"),null}},{key:"getArrow",value:function(){var o=this.props.model,a=o.id,f=o.getArrowStyle(),p=f.refY,g=p===void 0?0:p,O=f.refX,M=O===void 0?2:O;return Object(ae.g)("g",null,Object(ae.g)("defs",null,Object(ae.g)("marker",{id:"marker-start-".concat(a),refX:-M,refY:g,overflow:"visible",orient:"auto",markerUnits:"userSpaceOnUse"},this.getStartArrow()),Object(ae.g)("marker",{id:"marker-end-".concat(a),refX:M,refY:g,overflow:"visible",orient:"auto",markerUnits:"userSpaceOnUse"},this.getEndArrow())))}},{key:"getStartArrow",value:function(){var o=this.props.model,a=o.getArrowStyle(),f=a.stroke,p=a.strokeWidth,g=a.offset,O=a.verticalLength;return Object(ae.g)("path",{stroke:f,fill:f,strokeWidth:p,d:"M 0 0 L ".concat(g," -").concat(O," L ").concat(g," ").concat(O," Z")})}},{key:"getEndArrow",value:function(){var o=this.props.model,a=o.getArrowStyle(),f=a.stroke,p=a.strokeWidth,g=a.offset,O=a.verticalLength;return Object(ae.g)("path",{stroke:f,fill:f,strokeWidth:p,transform:"rotate(180)",d:"M 0 0 L ".concat(g," -").concat(O," L ").concat(g," ").concat(O," Z")})}},{key:"getAdjustPoints",value:function(){var o=this.props,a=o.model,f=o.graphModel,p=a.getAdjustStart(),g=a.getAdjustEnd();return Object(ae.g)("g",null,Object(ae.g)(_g,Mi({type:"SOURCE"},p,{getAdjustPointShape:this.getAdjustPointShape,edgeModel:a,graphModel:f})),Object(ae.g)(_g,Mi({type:"TARGET"},g,{getAdjustPointShape:this.getAdjustPointShape,edgeModel:a,graphModel:f})))}},{key:"getAnimation",value:function(){console.error("getAnimation is deprecated in 1.2.0, please use model.getEdgeAnimationStyle")}},{key:"getAppendWidth",value:function(){return Object(ae.g)("g",null)}},{key:"getAppend",value:function(){return Object(ae.g)("g",{className:"lf-edge-append"},this.getAppendWidth())}},{key:"getEdge",value:function(){return null}},{key:"toFront",value:function(){var o=this.props,a=o.graphModel,f=o.model,p=a.overlapMode;p!==Sr.INCREASE&&a.toFront(f.id)}},{key:"render",value:function(){var o=this.props,a=o.model,f=a.isSelected,p=a.isHitable,g=a.isShowAdjustPoint,O=o.graphModel;return O.animation,Object(ae.g)("g",null,Object(ae.g)("g",{className:["lf-edge",!p&&"pointer-none",f&&"lf-edge-selected"].filter(Boolean).join(" "),onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onContextMenu:this.handleContextMenu,onMouseOver:this.setHoverON,onMouseEnter:this.setHoverON,onMouseLeave:this.setHoverOFF},this.getShape(),this.getAppend(),this.getText(),this.getArrow()),g&&f?this.getAdjustPoints():"")}}]),t}(ae.a);function xl(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?xl=function(t){return typeof t}:xl=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xl(e)}function gD(e,r){return ED(e)||OD(e,r)||bD(e,r)||mD()}function mD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bD(e,r){if(!!e){if(typeof e=="string")return Lg(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Lg(e,r)}}function Lg(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function OD(e,r){var t=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,f,p;try{for(t=t.call(e);!(o=(f=t.next()).done)&&(n.push(f.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function ED(e){if(Array.isArray(e))return e}function SD(e){var r={d:""};return Object.entries(e).forEach(function(t){var n=gD(t,2),o=n[0],a=n[1],f=xl(a);(o==="style"||f!=="object")&&(r[o]=a)}),Object(ae.g)("path",r)}var Ni=SD;function Pl(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Pl=function(t){return typeof t}:Pl=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pl(e)}function Lc(){return Lc=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Lc.apply(this,arguments)}function xD(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function zg(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function PD(e,r,t){return r&&zg(e.prototype,r),t&&zg(e,t),e}function TD(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&zc(e,r)}function zc(e,r){return zc=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},zc(e,r)}function wD(e){var r=ND();return function(){var n=Tl(e),o;if(r){var a=Tl(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return MD(this,o)}}function MD(e,r){if(r&&(Pl(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return AD(e)}function AD(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ND(){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{return!1}}function Tl(e){return Tl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Tl(e)}var Fc=function(e){TD(t,e);var r=wD(t);function t(){return xD(this,t),r.apply(this,arguments)}return PD(t,[{key:"getEdge",value:function(){var o=this.props.model,a=o.startPoint,f=o.endPoint,p=o.isAnimation,g=o.arrowConfig,O=o.getEdgeStyle(),M=o.getEdgeAnimationStyle(),j=M.strokeDasharray,z=M.stroke,$=M.strokeDashoffset,Z=M.animationName,ie=M.animationDuration,oe=M.animationIterationCount,le=M.animationTimingFunction,Ae=M.animationDirection;return Object(ae.g)(Co,Lc({},O,{x1:a.x,y1:a.y,x2:f.x,y2:f.y},g,p?{strokeDasharray:j,stroke:z,style:{strokeDashoffset:$,animationName:Z,animationDuration:ie,animationIterationCount:oe,animationTimingFunction:le,animationDirection:Ae}}:{}))}},{key:"getAppendWidth",value:function(){var o=this.props.model,a=o.startPoint,f=o.endPoint,p={start:a,end:f},g=OT(p),O=g.d,M=g.strokeWidth,j=g.fill,z=g.strokeDasharray,$=g.stroke;return Object(ae.g)(Ni,{d:O,fill:j,strokeWidth:M,stroke:$,strokeDasharray:z})}}]),t}(Ai);function wl(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?wl=function(t){return typeof t}:wl=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wl(e)}function DD(e,r){return ID(e)||RD(e,r)||CD(e,r)||jD()}function jD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function CD(e,r){if(!!e){if(typeof e=="string")return Fg(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Fg(e,r)}}function Fg(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function RD(e,r){var t=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,f,p;try{for(t=t.call(e);!(o=(f=t.next()).done)&&(n.push(f.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function ID(e){if(Array.isArray(e))return e}function _D(e){var r={points:"",fill:"none"};return Object.entries(e).forEach(function(t){var n=DD(t,2),o=n[0],a=n[1];if(o==="style")r[o]=a;else{var f=wl(a);f!=="object"&&(r[o]=a)}}),Object(ae.g)("polyline",r)}var BD=_D;function Ml(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ml=function(t){return typeof t}:Ml=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ml(e)}function Hg(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function Al(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Hg(Object(t),!0).forEach(function(n){bn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Hg(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Hc(){return Hc=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Hc.apply(this,arguments)}function LD(e,r){return GD(e)||HD(e,r)||FD(e,r)||zD()}function zD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FD(e,r){if(!!e){if(typeof e=="string")return Gg(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Gg(e,r)}}function Gg(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function HD(e,r){var t=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,f,p;try{for(t=t.call(e);!(o=(f=t.next()).done)&&(n.push(f.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function GD(e){if(Array.isArray(e))return e}function kD(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function kg(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function $D(e,r,t){return r&&kg(e.prototype,r),t&&kg(e,t),e}function UD(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&Gc(e,r)}function Gc(e,r){return Gc=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Gc(e,r)}function XD(e){var r=WD();return function(){var n=Nl(e),o;if(r){var a=Nl(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return YD(this,o)}}function YD(e,r){if(r&&(Ml(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mn(e)}function mn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function WD(){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{return!1}}function Nl(e){return Nl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Nl(e)}function bn(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var kc=function(e){UD(t,e);var r=XD(t);function t(){var n;return kD(this,t),n=r.call(this),bn(mn(n),"drag",void 0),bn(mn(n),"isDragging",void 0),bn(mn(n),"isShowAdjustPointTemp",void 0),bn(mn(n),"appendInfo",void 0),bn(mn(n),"onDragStart",function(){var o=n.props.model;o.dragAppendStart(),n.isShowAdjustPointTemp=o.isShowAdjustPoint,o.isShowAdjustPoint=!1}),bn(mn(n),"onDragging",function(o){var a=o.deltaX,f=o.deltaY,p=n.props,g=p.model,O=p.graphModel;n.isDragging=!0;var M=O.transformModel,j=O.editConfigModel,z=M.fixDeltaXY(a,f),$=LD(z,2),Z=$[0],ie=$[1],oe=g,le=j.adjustEdgeMiddle;le?n.appendInfo=oe.dragAppendSimple(n.appendInfo,{x:Z,y:ie}):n.appendInfo=oe.dragAppend(n.appendInfo,{x:Z,y:ie})}),bn(mn(n),"onDragEnd",function(){var o=n.props,a=o.model,f=o.graphModel.eventCenter,p=a;p.dragAppendEnd(),n.isDragging=!1,p.isShowAdjustPoint=n.isShowAdjustPointTemp,n.appendInfo=void 0,f.emit(ot.EDGE_ADJUST,{data:p.getData()})}),bn(mn(n),"beforeDragStart",function(o,a){a.dragAble&&n.drag.handleMouseDown(o),n.appendInfo=a}),n.drag=new cn({onDragStart:n.onDragStart,onDragging:n.onDragging,onDragEnd:n.onDragEnd,isStopPropagation:!1}),n}return $D(t,[{key:"getEdge",value:function(){var o=this.props.model,a=o.points,f=o.isAnimation,p=o.arrowConfig,g=o.getEdgeStyle(),O=o.getEdgeAnimationStyle(),M=O.strokeDasharray,j=O.stroke,z=O.strokeDashoffset,$=O.animationName,Z=O.animationDuration,ie=O.animationIterationCount,oe=O.animationTimingFunction,le=O.animationDirection;return Object(ae.g)(BD,Hc({points:a},g,p,f?{strokeDasharray:M,stroke:j,style:{strokeDashoffset:z,animationName:$,animationDuration:Z,animationIterationCount:ie,animationTimingFunction:oe,animationDirection:le}}:{}))}},{key:"getArrowInfo",value:function(){var o=this.props.model,a=o.points,f=o.isSelected,p=this.state,g=p.hover,O={start:null,end:null,hover:g,isSelected:f},M=No(a);return M.length>=2&&(O.start=M[M.length-2],O.end=M[M.length-1]),O}},{key:"getAppendAttributes",value:function(o){var a=o.start,f=o.end,p;if(a.x===f.x&&a.y===f.y)p="";else{var g={start:a,end:f,offset:10,verticalLength:5},O=yi(Al(Al({},g),{},{type:"start"})),M=yi(Al(Al({},g),{},{type:"end"}));p="M".concat(O.leftX," ").concat(O.leftY,`
- L`).concat(O.rightX," ").concat(O.rightY,`
- L`).concat(M.rightX," ").concat(M.rightY,`
- L`).concat(M.leftX," ").concat(M.leftY," z")}return{d:p,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}}},{key:"getAppendShape",value:function(o){var a=this.getAppendAttributes(o),f=a.d,p=a.strokeWidth,g=a.fill,O=a.strokeDasharray,M=a.stroke;return Object(ae.g)(Ni,{d:f,fill:g,strokeWidth:p,stroke:M,strokeDasharray:O})}},{key:"getAppendWidth",value:function(){for(var o=this,a=this.props,f=a.model,p=a.graphModel,g=f.pointsList,O=f.draggable,M=[],j=g.length,z=function(ie){var oe="lf-polyline-append",le={start:{x:g[ie].x,y:g[ie].y},end:{x:g[ie+1].x,y:g[ie+1].y},startIndex:ie,endIndex:ie+1,direction:"",dragAble:!0},Ae=Object(ae.g)("g",{className:oe},o.getAppendShape(le)),Ce=p.editConfigModel,Ee=Ce.adjustEdge,Be=Ce.adjustEdgeMiddle;if(Ee&&O){var Ne=le.startIndex,Ue=le.endIndex,De=Be&&(Ne===0||Ue===j-1);le.dragAble=!De,le.start.x===le.end.x?(le.dragAble&&(oe+="-ew-resize"),le.direction=Dt.VERTICAL):le.start.y===le.end.y&&(le.dragAble&&(oe+="-ns-resize"),le.direction=Dt.HORIZONTAL),Ae=Object(ae.g)("g",{className:o.isDragging?"lf-dragging":"lf-drag-able",onMouseDown:function(vt){return o.beforeDragStart(vt,le)}},Object(ae.g)("g",{className:oe},o.getAppendShape(le)))}M.push(Ae)},$=0;$<j-1;$++)z($);return Object(ae.g)("g",null,M)}}]),t}(Ai);function Dl(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Dl=function(t){return typeof t}:Dl=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dl(e)}function VD(e,r){return QD(e)||JD(e,r)||ZD(e,r)||KD()}function KD(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZD(e,r){if(!!e){if(typeof e=="string")return $g(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return $g(e,r)}}function $g(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function JD(e,r){var t=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,f,p;try{for(t=t.call(e);!(o=(f=t.next()).done)&&(n.push(f.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function QD(e){if(Array.isArray(e))return e}function $c(){return $c=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},$c.apply(this,arguments)}function qD(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Ug(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ej(e,r,t){return r&&Ug(e.prototype,r),t&&Ug(e,t),e}function tj(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&Uc(e,r)}function Uc(e,r){return Uc=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Uc(e,r)}function rj(e){var r=ij();return function(){var n=jl(e),o;if(r){var a=jl(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return nj(this,o)}}function nj(e,r){if(r&&(Dl(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return oj(e)}function oj(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ij(){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{return!1}}function jl(e){return jl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},jl(e)}var Xc=function(e){tj(t,e);var r=rj(t);function t(){return qD(this,t),r.apply(this,arguments)}return ej(t,[{key:"getEdge",value:function(){var o=this.props.model,a=o.getEdgeStyle(),f=o.path,p=o.isAnimation,g=o.arrowConfig,O=o.getEdgeAnimationStyle(),M=O.strokeDasharray,j=O.stroke,z=O.strokeDashoffset,$=O.animationName,Z=O.animationDuration,ie=O.animationIterationCount,oe=O.animationTimingFunction,le=O.animationDirection;return Object(ae.g)(Ni,$c({d:f},a,g,p?{strokeDasharray:M,stroke:j,style:{strokeDashoffset:z,animationName:$,animationDuration:Z,animationIterationCount:ie,animationTimingFunction:oe,animationDirection:le}}:{}))}},{key:"getAppendWidth",value:function(){var o=this.props.model.path;return Object(ae.g)(Ni,{d:o,strokeWidth:10,stroke:"transparent",fill:"none"})}},{key:"getArrowInfo",value:function(){var o=this.props.model,a=this.state,f=a.hover,p=o,g=p.path,O=p.isSelected,M=ET(g),j=VD(M,2),z=j[0],$=j[1],Z={start:z,end:$,hover:f,isSelected:O};return Z}}]),t}(Ai);function Cl(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Cl=function(t){return typeof t}:Cl=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cl(e)}function Xg(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function aj(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Xg(Object(t),!0).forEach(function(n){uj(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Xg(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function uj(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function lj(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Yg(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function sj(e,r,t){return r&&Yg(e.prototype,r),t&&Yg(e,t),e}function fj(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&Yc(e,r)}function Yc(e,r){return Yc=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Yc(e,r)}function cj(e){var r=hj();return function(){var n=Rl(e),o;if(r){var a=Rl(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return dj(this,o)}}function dj(e,r){if(r&&(Cl(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return pj(e)}function pj(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hj(){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{return!1}}function Rl(e){return Rl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Rl(e)}var vj=function(e){fj(t,e);var r=cj(t);function t(){return lj(this,t),r.apply(this,arguments)}return sj(t,[{key:"getArrowAttributes",value:function(){var o=this.props,a=o.arrowInfo,f=o.style,p=a.start,g=a.end,O={start:p,end:g,offset:f.offset,verticalLength:f.verticalLength,type:"end"},M=yi(O),j=M.leftX,z=M.leftY,$=M.rightX,Z=M.rightY;return aj({d:"M".concat(j," ").concat(z," L").concat(g.x," ").concat(g.y," L").concat($," ").concat(Z," z")},f)}},{key:"getShape",value:function(){var o=this.getArrowAttributes(),a=o.d,f=o.strokeWidth,p=o.stroke,g=o.fill;return Object(ae.g)(Ni,{d:a,fill:g,strokeWidth:f,stroke:p})}},{key:"render",value:function(){return Object(ae.g)("g",{className:"lf-arrow"},this.getShape())}}]),t}(ae.a);function yj(e,r){return Vs(e,r)}var Wg=yj;function gj(e){var r=e==null?0:e.length;return r?e[r-1]:void 0}var mj=gj,bj=function(){return Mr.a.Date.now()},Wc=bj,Oj=/\s/;function Ej(e){for(var r=e.length;r--&&Oj.test(e.charAt(r)););return r}var Sj=Ej,xj=/^\s+/;function Pj(e){return e&&e.slice(0,Sj(e)+1).replace(xj,"")}var Tj=Pj,Vg=0/0,wj=/^[-+]0x[0-9a-f]+$/i,Mj=/^0b[01]+$/i,Aj=/^0o[0-7]+$/i,Nj=parseInt;function Dj(e){if(typeof e=="number")return e;if(Ta(e))return Vg;if(wt(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=wt(r)?r+"":r}if(typeof e!="string")return e===0?e:+e;e=Tj(e);var t=Mj.test(e);return t||Aj.test(e)?Nj(e.slice(2),t?2:8):wj.test(e)?Vg:+e}var Kg=Dj,jj="Expected a function",Cj=Math.max,Rj=Math.min;function Ij(e,r,t){var n,o,a,f,p,g,O=0,M=!1,j=!1,z=!0;if(typeof e!="function")throw new TypeError(jj);r=Kg(r)||0,wt(t)&&(M=!!t.leading,j="maxWait"in t,a=j?Cj(Kg(t.maxWait)||0,r):a,z="trailing"in t?!!t.trailing:z);function $(Ne){var Ue=n,De=o;return n=o=void 0,O=Ne,f=e.apply(De,Ue),f}function Z(Ne){return O=Ne,p=setTimeout(le,r),M?$(Ne):f}function ie(Ne){var Ue=Ne-g,De=Ne-O,it=r-Ue;return j?Rj(it,a-De):it}function oe(Ne){var Ue=Ne-g,De=Ne-O;return g===void 0||Ue>=r||Ue<0||j&&De>=a}function le(){var Ne=Wc();if(oe(Ne))return Ae(Ne);p=setTimeout(le,ie(Ne))}function Ae(Ne){return p=void 0,z&&n?$(Ne):(n=o=void 0,f)}function Ce(){p!==void 0&&clearTimeout(p),O=0,n=g=o=p=void 0}function Ee(){return p===void 0?f:Ae(Wc())}function Be(){var Ne=Wc(),Ue=oe(Ne);if(n=arguments,o=this,g=Ne,Ue){if(p===void 0)return Z(g);if(j)return clearTimeout(p),p=setTimeout(le,r),$(g)}return p===void 0&&(p=setTimeout(le,r)),f}return Be.cancel=Ce,Be.flush=Ee,Be}var _j=Ij,Bj=i(166);function Lj(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Zg(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function zj(e,r,t){return r&&Zg(e.prototype,r),t&&Zg(e,t),e}function kn(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var Fj=function(){function e(r){Lj(this,e),kn(this,"undos",[]),kn(this,"redos",[]),kn(this,"callbacks",[]),kn(this,"stopWatch",null),kn(this,"curData",null),kn(this,"maxSize",50),kn(this,"waitTime",100),kn(this,"eventCenter",void 0),this.eventCenter=r}return zj(e,[{key:"add",value:function(t){Wg(mj(this.undos),t)||(this.undos.push(t),Wg(this.curData,t)||(this.redos=[]),this.eventCenter.emit(ot.HISTORY_CHANGE,{data:{undos:this.undos,redos:this.redos,undoAble:this.undos.length>1,redoAble:this.redos.length>0}}),this.undos.length>this.maxSize&&this.undos.shift())}},{key:"undoAble",value:function(){return this.undos.length>1}},{key:"undo",value:function(){if(!!this.undoAble()){var t=this.undos.pop();this.redos.push(t);var n=this.undos.pop();return this.curData=It(n),n}}},{key:"redoAble",value:function(){return this.redos.length>0}},{key:"redo",value:function(){if(!!this.redoAble()){var t=this.redos.pop();return this.curData=It(t),t}}},{key:"watch",value:function(t){var n=this;this.stopWatch&&this.stopWatch(),this.undos.push(t.modelToGraphData()),this.stopWatch=Object(Bj.a)(t,_j(function(){var o=t.modelToHistoryData();o&&n.add(o)},this.waitTime))}}]),e}(),Hj=Fj;function Il(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Il=function(t){return typeof t}:Il=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Il(e)}var Jg,Qg,qg;function Gj(e,r){return Xj(e)||Uj(e,r)||$j(e,r)||kj()}function kj(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $j(e,r){if(!!e){if(typeof e=="string")return em(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return em(e,r)}}function em(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function Uj(e,r){var t=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,f,p;try{for(t=t.call(e);!(o=(f=t.next()).done)&&(n.push(f.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function Xj(e){if(Array.isArray(e))return e}function tm(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function Uo(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?tm(Object(t),!0).forEach(function(n){ao(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):tm(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Yj(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function rm(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Wj(e,r,t){return r&&rm(e.prototype,r),t&&rm(e,t),e}function Vj(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&Vc(e,r)}function Vc(e,r){return Vc=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Vc(e,r)}function Kj(e){var r=Jj();return function(){var n=_l(e),o;if(r){var a=_l(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return Zj(this,o)}}function Zj(e,r){if(r&&(Il(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Xo(e)}function Xo(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Jj(){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{return!1}}function _l(e){return _l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},_l(e)}function ao(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var Kc=$r(Jg=(qg=Qg=function(e){Vj(t,e);var r=Kj(t);function t(){var n;return Yj(this,t),n=r.call(this),ao(Xo(n),"ref",Object(ae.f)()),ao(Xo(n),"__prevText",{type:"",text:"",id:""}),ao(Xo(n),"keyupHandler",function(o){var a=n.props.graphModel.textEditElement;o.key==="Enter"&&o.altKey&&a.setElementState(0)}),ao(Xo(n),"inputHandler",function(o){var a=o.target,f=a.innerText,p=n.props.graphModel.textEditElement;n.__prevText={type:p.type,text:f.replace(/(\r\n)+$|(\n)+$/,""),id:p.id}}),ao(Xo(n),"keydownHandler",function(o){o.stopPropagation()}),n.state={style:{left:0,top:0}},n}return Wj(t,[{key:"componentDidUpdate",value:function(){var o=this.props.graphModel;if(this.ref.current&&(this.ref.current.focus(),this.placeCaretAtEnd(this.ref.current)),this.__prevText.id!==""){var a=this.__prevText,f=a.text,p=a.id;o.updateText(p,f),o.eventCenter.emit(ot.TEXT_UPDATE,Uo({},this.__prevText)),this.__prevText.id="",this.__prevText.text="",this.__prevText.type=""}}},{key:"placeCaretAtEnd",value:function(o){if(window.getSelection!==void 0&&document.createRange!==void 0){var a=document.createRange();a.selectNodeContents(o),a.collapse(!1);var f=window.getSelection();f.removeAllRanges(),f.addRange(a)}}},{key:"render",value:function(){var o,a=this.props.graphModel.textEditElement,f=this.state.style;return a?Object(ae.g)("div",{contentEditable:!0,className:"lf-text-input",style:f,ref:this.ref,key:a.id,onKeyUp:this.keyupHandler,onKeyDown:this.keydownHandler,onKeyPress:this.keydownHandler,onInput:this.inputHandler},(o=a.text)===null||o===void 0?void 0:o.value):null}}],[{key:"getDerivedStateFromProps",value:function(o){var a=o.graphModel,f=a.transformModel,p=a.theme,g=a.textEditElement,O;if(g){var M;if(!((M=g.text)!==null&&M!==void 0&&M.value))if(g.BaseType===Ft.EDGE){g=g;var j=g.text,z=g.textPosition,$=z.x,Z=z.y;j.x=$,j.y=Z,g.setText(j)}else g=g;var ie={resize:"auto",whiteSpace:"normal",wordBreak:"break-all"};if(g.BaseType===Ft.EDGE){var oe=p.edgeText,le=oe.overflowMode,Ae=oe.lineHeight,Ce=oe.wrapPadding,Ee=oe.textWidth;Ee&&le==="autoWrap"&&(O=Uo(Uo({},ie),{},{width:Ee,minWidth:Ee,lineHeight:Ae,padding:Ce}))}else if(g.BaseType===Ft.NODE){var Be=p.nodeText,Ne=Be.overflowMode,Ue=Be.lineHeight,De=Be.wrapPadding,it=Be.textWidth,vt=g,kt=vt.width,Vt=vt.modelType;(Vt!==ht.TEXT_NODE&&Ne==="autoWrap"||Vt===ht.TEXT_NODE&&it)&&(O=Uo(Uo({},ie),{},{width:it||kt,minWidth:it||kt,lineHeight:Ue,padding:De}))}var ir=g.text,vr=ir.x,uo=ir.y,Yo=f.CanvasPointToHtmlPoint([vr,uo]),$n=Gj(Yo,2),Wo=$n[0],td=$n[1];return{style:Uo({left:Wo,top:td},O)}}}}]),t}(ae.a),ao(Qg,"toolName","textEdit"),qg))||Jg,Qj=function(r){var t=r.x,n=r.y,o=r.width,a=r.height;return{x:t-o/2,y:n-a/2,x1:t+o/2,y1:n+a/2}},qj=function(r){var t=r.startPoint,n=r.endPoint,o=(t.x+n.x)/2,a=(t.y+n.y)/2,f=Math.abs(t.x-n.x)+10,p=Math.abs(t.y-n.y)+10;return{x:o-f/2,y:a-p/2,x1:o+f/2,y1:a+p/2}},eC=function(r){var t=r.points,n=No(t),o=gi(n,8),a=o.x,f=o.y,p=o.width,g=o.height;return{x:a-p/2,y:f-g/2,x1:a+p/2,y1:f+g/2}},tC=function(r){var t=r.path,n=Wa(t),o=gi(n,8),a=o.x,f=o.y,p=o.width,g=o.height;return{x:a-p/2,y:f-g/2,x1:a+p/2,y1:f+g/2}},rC=function(r){if(r.modelType===ht.LINE_EDGE)return qj(r);if(r.modelType===ht.POLYLINE_EDGE)return eC(r);if(r.modelType===ht.BEZIER_EDGE)return tC(r)};function Bl(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Bl=function(t){return typeof t}:Bl=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bl(e)}var nm,om,im;function am(e,r){return iC(e)||oC(e,r)||um(e,r)||nC()}function nC(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oC(e,r){var t=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],o=!0,a=!1,f,p;try{for(t=t.call(e);!(o=(f=t.next()).done)&&(n.push(f.value),!(r&&n.length===r));o=!0);}catch(g){a=!0,p=g}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw p}}return n}}function iC(e){if(Array.isArray(e))return e}function aC(e){return sC(e)||lC(e)||um(e)||uC()}function uC(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function um(e,r){if(!!e){if(typeof e=="string")return Zc(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Zc(e,r)}}function lC(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function sC(e){if(Array.isArray(e))return Zc(e)}function Zc(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function fC(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function lm(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function cC(e,r,t){return r&&lm(e.prototype,r),t&&lm(e,t),e}function dC(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&Jc(e,r)}function Jc(e,r){return Jc=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Jc(e,r)}function pC(e){var r=vC();return function(){var n=Ll(e),o;if(r){var a=Ll(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return hC(this,o)}}function hC(e,r){if(r&&(Bl(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Di(e)}function Di(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vC(){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{return!1}}function Ll(e){return Ll=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ll(e)}function ji(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var Qc=$r(nm=(im=om=function(e){dC(t,e);var r=pC(t);function t(n){var o;fC(this,t),o=r.call(this),ji(Di(o),"stepDrag",void 0),ji(Di(o),"handleMouseDown",function(g){o.stepDrag.handleMouseDown(g)}),ji(Di(o),"onDragging",function(g){var O=g.deltaX,M=g.deltaY,j=o.props.graphModel,z=j.getSelectElements(!0);j.moveNodes(z.nodes.map(function($){return $.id}),O,M)}),ji(Di(o),"handleContextMenu",function(g){g.preventDefault();var O=o.props,M=O.graphModel,j=O.graphModel,z=j.eventCenter,$=j.selectElements,Z=M.getPointByClient({x:g.clientX,y:g.clientY}),ie={nodes:[],edges:[]},oe=aC($.values());oe.forEach(function(le){le.BaseType===Ft.NODE&&ie.nodes.push(le.getData()),le.BaseType===Ft.EDGE&&ie.edges.push(le.getData())}),z.emit(ot.SELECTION_CONTEXTMENU,{data:ie,e:g,position:Z})});var a=n.graphModel,f=a.gridSize,p=a.eventCenter;return o.stepDrag=new cn({onDragging:o.onDragging,step:f,eventType:"SELECTION",eventCenter:p}),o}return cC(t,[{key:"render",value:function(){var o=this.props.graphModel,a=o.selectElements,f=o.transformModel;if(!(a.size<=1)){var p=Number.MAX_SAFE_INTEGER,g=Number.MAX_SAFE_INTEGER,O=Number.MIN_SAFE_INTEGER,M=Number.MIN_SAFE_INTEGER;a.forEach(function(oe){var le={x:0,y:0,x1:0,y1:0};oe.BaseType===Ft.NODE&&(le=Qj(oe)),oe.BaseType===Ft.EDGE&&(le=rC(oe)),p=Math.min(p,le.x),g=Math.min(g,le.y),O=Math.max(O,le.x1),M=Math.max(M,le.y1)});var j=f.CanvasPointToHtmlPoint([p,g]),z=am(j,2);p=z[0],g=z[1];var $=f.CanvasPointToHtmlPoint([O,M]),Z=am($,2);O=Z[0],M=Z[1];var ie={left:"".concat(p-10,"px"),top:"".concat(g-10,"px"),width:"".concat(O-p+20,"px"),height:"".concat(M-g+20,"px")};return Object(ae.g)("div",{className:"lf-multiple-select",style:ie,onMouseDown:this.handleMouseDown,onContextMenu:this.handleContextMenu})}}}]),t}(ae.a),ji(om,"toolName","multipleSelect"),im))||nm;function yC(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function sm(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function gC(e,r,t){return r&&sm(e.prototype,r),t&&sm(e,t),e}function zl(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var mC=function(){function e(r){yC(this,e),zl(this,"tools",void 0),zl(this,"components",void 0),zl(this,"toolMap",new Map),zl(this,"instance",void 0),this.instance=r,this.isDisabledTool(Kc.toolName)||this.registerTool(Kc.toolName,Kc),this.isDisabledTool(Qc.toolName)||this.registerTool(Qc.toolName,Qc);var t=r.graphModel,n=t.eventCenter;n.on("".concat(ot.GRAPH_TRANSFORM,",").concat(ot.NODE_CLICK,",").concat(ot.BLANK_CLICK," "),function(){var o=t.textEditElement,a=t.editConfigModel,f=a.edgeTextEdit,p=a.nodeTextEdit;(f||p)&&o&&t.textEditElement.setElementState(Ot.DEFAULT)})}return gC(e,[{key:"isDisabledTool",value:function(t){return this.instance.options.disabledTools.indexOf(t)!==-1}},{key:"registerTool",value:function(t,n){this.toolMap.set(t,n)}},{key:"getTools",value:function(){return Array.from(this.toolMap.values())}},{key:"getInstance",value:function(){return this.instance}}]),e}(),bC=i(167),OC=i.n(bC);function EC(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function fm(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function SC(e,r,t){return r&&fm(e.prototype,r),t&&fm(e,t),e}function qc(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var cm=function(){function e(r){EC(this,e),qc(this,"mousetrap",void 0),qc(this,"options",void 0),qc(this,"target",void 0),r.keyboard||(r.keyboard={enabled:!1}),this.options=r;var t=r.lf;this.target=t.container,this.mousetrap=new OC.a,r.keyboard.enabled&&this.enable(!0)}return SC(e,[{key:"initShortcuts",value:function(){var t=this,n=this.options.keyboard.shortcuts;if(n)if(d(n))n.forEach(function(p){var g=p.keys,O=p.callback,M=p.action;return t.on(g,O,M)});else{var o=n.keys,a=n.callback,f=n.action;this.on(o,a,f)}}},{key:"on",value:function(t,n,o){this.mousetrap.bind(this.getKeys(t),n,o)}},{key:"disabled",get:function(){return this.options.keyboard.enabled!==!0}},{key:"off",value:function(t,n){this.mousetrap.unbind(this.getKeys(t),n)}},{key:"enable",value:function(t){(this.disabled||t)&&(this.options.keyboard.enabled=!0,this.target instanceof HTMLElement&&(this.target.setAttribute("tabindex","-1"),this.target.style.outline="none"))}},{key:"disable",value:function(){this.disabled||(this.options.keyboard.enabled=!1,this.target instanceof HTMLElement&&this.target.removeAttribute("tabindex"))}},{key:"getKeys",value:function(t){var n=this;return(Array.isArray(t)?t:[t]).map(function(o){return n.formatKey(o)})}},{key:"formatKey",value:function(t){var n=t.toLowerCase().replace(/\s/g,"").replace("delete","del").replace("cmd","command");return n}}]),e}(),xC=cm,rn=null;function dm(e,r){return e.x+=r,e.y+=r,e.text&&(e.text.x+=r,e.text.y+=r),e}function pm(e,r){return e.startPoint&&(e.startPoint.x+=r,e.startPoint.y+=r),e.endPoint&&(e.endPoint.x+=r,e.endPoint.y+=r),e.pointsList&&e.pointsList.length>0&&e.pointsList.forEach(function(t){t.x+=r,t.y+=r}),e.text&&(e.text.x+=r,e.text.y+=r),e}var Fl=40;function PC(e,r){var t=e.keyboard,n=t.options.keyboard;t.on(["cmd + c","ctrl + c"],function(){if(!!n.enabled&&!r.textEditElement){var o=e.options.guards,a=r.getSelectElements(!1),f=o&&o.beforeClone?o.beforeClone(a):!0;return f?(rn=a,rn.nodes.forEach(function(p){return dm(p,Fl)}),rn.edges.forEach(function(p){return pm(p,Fl)}),!1):(rn=null,!1)}}),t.on(["cmd + v","ctrl + v"],function(){if(!!n.enabled&&!r.textEditElement){if(rn&&(rn.nodes||rn.edges)){e.clearSelectElements();var o=e.addElements(rn);if(!o)return;o.nodes.forEach(function(a){return e.selectElementById(a.id,!0)}),o.edges.forEach(function(a){return e.selectElementById(a.id,!0)}),rn.nodes.forEach(function(a){return dm(a,Fl)}),rn.edges.forEach(function(a){return pm(a,Fl)})}return!1}}),t.on(["cmd + z","ctrl + z"],function(){if(!!n.enabled&&!r.textEditElement)return e.undo(),!1}),t.on(["cmd + y","ctrl + y"],function(){if(!!n.enabled&&!r.textEditElement)return e.redo(),!1}),t.on(["backspace"],function(){if(!!n.enabled&&!r.textEditElement){var o=r.getSelectElements(!0);return e.clearSelectElements(),o.edges.forEach(function(a){return e.deleteEdge(a.id)}),o.nodes.forEach(function(a){return e.deleteNode(a.id)}),!1}})}function TC(e,r){e.on("node:mousemove",function(t){var n=t.data;r.setNodeSnapLine(n)}),e.on("node:mouseup",function(){r.clearSnapline()})}function Hl(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Hl=function(t){return typeof t}:Hl=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hl(e)}function hm(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function Ci(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?hm(Object(t),!0).forEach(function(n){Lt(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):hm(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function wC(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function vm(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function MC(e,r,t){return r&&vm(e.prototype,r),t&&vm(e,t),e}function Lt(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var ed=function(){function e(r){var t=this;wC(this,e),Lt(this,"container",void 0),Lt(this,"width",void 0),Lt(this,"height",void 0),Lt(this,"graphModel",void 0),Lt(this,"history",void 0),Lt(this,"viewMap",new Map),Lt(this,"tool",void 0),Lt(this,"keyboard",void 0),Lt(this,"dnd",void 0),Lt(this,"options",void 0),Lt(this,"snaplineModel",void 0),Lt(this,"components",[]),Lt(this,"plugins",void 0),Lt(this,"extension",{}),Lt(this,"adapterIn",void 0),Lt(this,"adapterOut",void 0),Lt(this,"getView",function(n){return t.viewMap.get(n)}),r=Fv(r),this.options=r,this.container=r.container,this.plugins=r.plugins,this.graphModel=new zT(Ci({},r)),this.tool=new mC(this),this.history=new Hj(this.graphModel.eventCenter),this.dnd=new xM({lf:this}),this.keyboard=new xC({lf:this,keyboard:r.keyboard}),r.snapline!==!1&&(this.snaplineModel=new ig(this.graphModel),TC(this.graphModel.eventCenter,this.snaplineModel)),PC(this,this.graphModel),this.keyboard.initShortcuts(),this.defaultRegister(),this.installPlugins(r.disabledPlugins)}return MC(e,[{key:"register",value:function(t,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(typeof t!="string"){this.registerElement(t);return}var a={BaseEdge:Ai,BaseEdgeModel:vf,BaseNode:yn,BaseNodeModel:hn,RectNode:pc,RectNodeModel:tc,CircleNode:yc,CircleNodeModel:Uf,PolygonNode:bc,PolygonNodeModel:Qf,TextNode:Mc,TextNodeModel:nc,LineEdge:Fc,LineEdgeModel:mf,DiamondNode:Sc,DiamondNodeModel:Wf,PolylineEdge:kc,PolylineEdgeModel:Ef,BezierEdge:Xc,BezierEdgeModel:Gf,EllipseNode:Tc,EllipseNodeModel:Kf,HtmlNode:Dc,HtmlNodeModel:ic,h:ae.g,type:t};this.viewMap.forEach(function(M){var j=M.extendKey;j&&(a[j]=M)}),this.graphModel.modelMap.forEach(function(M){var j=M.extendKey;j&&(a[j]=M)});var f=n(a),p=f.view,g=f.model,O=p;o&&!O.isObervered&&(O.isObervered=!0,O=gt(O)),this.setView(t,O),this.graphModel.setModel(t,g)}},{key:"registerElement",value:function(t){var n=t.view;t.isObserverView!==!1&&!n.isObervered&&(n.isObervered=!0,n=gt(n)),this.setView(t.type,n),this.graphModel.setModel(t.type,t.model)}},{key:"batchRegister",value:function(){var t=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];n.forEach(function(o){t.registerElement(o)})}},{key:"defaultRegister",value:function(){this.registerElement({view:pc,model:tc,type:"rect"}),this.registerElement({type:"circle",view:yc,model:Uf}),this.registerElement({type:"polygon",view:bc,model:Qf}),this.registerElement({type:"line",view:Fc,model:mf}),this.registerElement({type:"polyline",view:kc,model:Ef}),this.registerElement({type:"bezier",view:Xc,model:Gf}),this.registerElement({type:"text",view:Mc,model:nc}),this.registerElement({type:"ellipse",view:Tc,model:Kf}),this.registerElement({type:"diamond",view:Sc,model:Wf}),this.registerElement({type:"html",view:Dc,model:ic})}},{key:"selectElementById",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;this.graphModel.selectElementById(t,n),!n&&o&&this.graphModel.toFront(t)}},{key:"focusOn",value:function(t){var n=this.graphModel.transformModel,o=t.coordinate,a=t.id;if(!o){var f=this.getNodeModelById(a);f&&(o=f.getData());var p=this.getEdgeModelById(a);p&&(o=p.textPosition)}var g=o,O=g.x,M=g.y;n.focusOn(O,M,this.graphModel.width,this.graphModel.height)}},{key:"setTheme",value:function(t){this.graphModel.setTheme(t)}},{key:"resize",value:function(t,n){this.graphModel.resize(t,n),this.options.width=this.graphModel.width,this.options.height=this.graphModel.height}},{key:"setDefaultEdgeType",value:function(t){this.graphModel.setDefaultEdgeType(t)}},{key:"updateText",value:function(t,n){this.graphModel.updateText(t,n)}},{key:"deleteElement",value:function(t){var n,o,a,f=this.getModelById(t);if(!f)return!1;var p=(n={},Lt(n,Ft.NODE,this.deleteNode),Lt(n,Ft.EDGE,this.deleteEdge),n),g=f.BaseType;return(o=(a=p[g])===null||a===void 0?void 0:a.call(this,t))!==null&&o!==void 0?o:!1}},{key:"getModelById",value:function(t){return this.graphModel.getElement(t)}},{key:"getDataById",value:function(t){var n;return(n=this.graphModel.getElement(t))===null||n===void 0?void 0:n.getData()}},{key:"changeNodeType",value:function(t,n){this.graphModel.changeNodeType(t,n)}},{key:"changeEdgeType",value:function(t,n){this.graphModel.changeEdgeType(t,n)}},{key:"getNodeEdges",value:function(t){return this.graphModel.getNodeEdges(t)}},{key:"addNode",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ot.NODE_ADD;return this.graphModel.addNode(t,n)}},{key:"deleteNode",value:function(t){var n=this.graphModel.getNodeModelById(t);if(!n)return!1;var o=n.getData(),a=this.options.guards,f=a&&a.beforeDelete?a.beforeDelete(o):!0;return f&&this.graphModel.deleteNode(t),f}},{key:"cloneNode",value:function(t){var n=this.graphModel.getNodeModelById(t),o=n.getData(),a=this.options.guards,f=a&&a.beforeClone?a.beforeClone(o):!0;if(f)return this.graphModel.cloneNode(t)}},{key:"changeNodeId",value:function(t,n){return this.graphModel.changeNodeId(t,n)}},{key:"getNodeModelById",value:function(t){return this.graphModel.getNodeModelById(t)}},{key:"getNodeDataById",value:function(t){return this.graphModel.getNodeModelById(t).getData()}},{key:"addEdge",value:function(t){return this.graphModel.addEdge(t)}},{key:"deleteEdge",value:function(t){var n=this.options.guards,o=this.graphModel.edgesMap[t];if(!o)return!1;var a=o.model.getData(),f=n&&n.beforeDelete?n.beforeDelete(a):!0;return f&&this.graphModel.deleteEdgeById(t),f}},{key:"deleteEdgeByNodeId",value:function(t){var n=t.sourceNodeId,o=t.targetNodeId;n&&o?this.graphModel.deleteEdgeBySourceAndTarget(n,o):n?this.graphModel.deleteEdgeBySource(n):o&&this.graphModel.deleteEdgeByTarget(o)}},{key:"changeEdgeId",value:function(t,n){return this.graphModel.changeEdgeId(t,n)}},{key:"getEdgeModelById",value:function(t){var n,o=this.graphModel.edgesMap;return(n=o[t])===null||n===void 0?void 0:n.model}},{key:"getEdgeModels",value:function(t){var n=this.graphModel.edges,o=t.sourceNodeId,a=t.targetNodeId;if(o&&a){var f=[];return n.forEach(function(O){O.sourceNodeId===o&&O.targetNodeId===a&&f.push(O)}),f}if(o){var p=[];return n.forEach(function(O){O.sourceNodeId===o&&p.push(O)}),p}if(a){var g=[];return n.forEach(function(O){O.targetNodeId===a&&g.push(O)}),g}return[]}},{key:"getEdgeDataById",value:function(t){var n;return(n=this.getEdgeModelById(t))===null||n===void 0?void 0:n.getData()}},{key:"getNodeIncomingEdge",value:function(t){return this.graphModel.getNodeIncomingEdge(t)}},{key:"getNodeOutgoingEdge",value:function(t){return this.graphModel.getNodeOutgoingEdge(t)}},{key:"getNodeIncomingNode",value:function(t){return this.graphModel.getNodeIncomingNode(t)}},{key:"getNodeOutgoingNode",value:function(t){return this.graphModel.getNodeOutgoingNode(t)}},{key:"editText",value:function(t){this.graphModel.editText(t)}},{key:"setProperties",value:function(t,n){var o;(o=this.graphModel.getElement(t))===null||o===void 0||o.setProperties(rr(n))}},{key:"deleteProperty",value:function(t,n){var o;(o=this.graphModel.getElement(t))===null||o===void 0||o.deleteProperty(n)}},{key:"getProperties",value:function(t){var n;return(n=this.graphModel.getElement(t))===null||n===void 0?void 0:n.getProperties()}},{key:"toFront",value:function(t){this.graphModel.toFront(t)}},{key:"setElementZIndex",value:function(t,n){return this.graphModel.setElementZIndex(t,n)}},{key:"addElements",value:function(t){for(var n=this,o=t.nodes,a=t.edges,f={},p={nodes:[],edges:[]},g=0;g<o.length;g++){var O=o[g],M=O.id,j=this.addNode(O);if(!j)return;M&&(f[M]=j.id),p.nodes.push(j)}return a.forEach(function(z){var $=z.sourceNodeId,Z=z.targetNodeId;f[$]&&($=f[$]),f[Z]&&(Z=f[Z]);var ie=n.graphModel.addEdge(Ci(Ci({},z),{},{sourceNodeId:$,targetNodeId:Z}));p.edges.push(ie)}),p}},{key:"getAreaElement",value:function(t,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;return this.graphModel.getAreaElement(t,n,o,a,f).map(function(p){return p.getData()})}},{key:"getSelectElements",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return this.graphModel.getSelectElements(t)}},{key:"clearSelectElements",value:function(){this.graphModel.clearSelectElements()}},{key:"getGraphData",value:function(){var t=this.graphModel.modelToGraphData();return this.adapterOut?this.adapterOut(t):t}},{key:"getGraphRawData",value:function(){return this.graphModel.modelToGraphData()}},{key:"clearData",value:function(){this.graphModel.clearData()}},{key:"updateEditConfig",value:function(t){this.graphModel.editConfigModel.updateEditConfig(t)}},{key:"getEditConfig",value:function(){return this.graphModel.editConfigModel.getConfig()}},{key:"getPointByClient",value:function(t,n){return this.graphModel.getPointByClient({x:t,y:n})}},{key:"undo",value:function(){if(!!this.history.undoAble()){var t=rr(this.history.undo());this.clearSelectElements(),this.graphModel.graphDataToModel(t)}}},{key:"redo",value:function(){if(!!this.history.redoAble()){var t=rr(this.history.redo());this.clearSelectElements(),this.graphModel.graphDataToModel(t)}}},{key:"zoom",value:function(t,n){var o=this.graphModel.transformModel;return o.zoom(t,n)}},{key:"resetZoom",value:function(){var t=this.graphModel.transformModel;t.resetZoom()}},{key:"setZoomMiniSize",value:function(t){var n=this.graphModel.transformModel;n.setZoomMiniSize(t)}},{key:"setZoomMaxSize",value:function(t){var n=this.graphModel.transformModel;n.setZoomMaxSize(t)}},{key:"getTransform",value:function(){var t=this.graphModel.transformModel,n=t.SCALE_X,o=t.SCALE_Y,a=t.TRANSLATE_X,f=t.TRANSLATE_Y;return{SCALE_X:n,SCALE_Y:o,TRANSLATE_X:a,TRANSLATE_Y:f}}},{key:"translate",value:function(t,n){var o=this.graphModel.transformModel;o.translate(t,n)}},{key:"resetTranslate",value:function(){var t=this.graphModel.transformModel,n=t.TRANSLATE_X,o=t.TRANSLATE_Y;this.translate(-n,-o)}},{key:"translateCenter",value:function(){this.graphModel.translateCenter()}},{key:"fitView",value:function(t,n){n===void 0&&(n=t),this.graphModel.fitView(t,n)}},{key:"openEdgeAnimation",value:function(t){this.graphModel.openEdgeAnimation(t)}},{key:"closeEdgeAnimation",value:function(t){this.graphModel.closeEdgeAnimation(t)}},{key:"on",value:function(t,n){this.graphModel.eventCenter.on(t,n)}},{key:"off",value:function(t,n){this.graphModel.eventCenter.off(t,n)}},{key:"once",value:function(t,n){this.graphModel.eventCenter.once(t,n)}},{key:"emit",value:function(t,n){this.graphModel.eventCenter.emit(t,n)}},{key:"installPlugins",value:function(){var t,n=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],a=(t=this.plugins)!==null&&t!==void 0?t:e.extensions;a.forEach(function(f){var p=f.pluginName||f.name;o.indexOf(p)===-1&&n.installPlugin(f)})}},{key:"installPlugin",value:function(t){if(Hl(t)==="object"){var n=t.install,o=t.render;n&&n.call(t,this,e),o&&this.components.push(o.bind(t)),this.extension[t.pluginName]=t;return}var a=t,f=new a({lf:this,LogicFlow:e,options:this.options.pluginsOptions});f.render&&this.components.push(f.render.bind(f)),this.extension[a.pluginName]=f}},{key:"updateAttributes",value:function(t,n){this.graphModel.updateAttributes(t,n)}},{key:"createFakerNode",value:function(t){var n=this.graphModel.modelMap.get(t.type);if(!n){console.warn("\u4E0D\u5B58\u5728\u4E3A".concat(t.type,"\u7C7B\u578B\u7684\u8282\u70B9"));return}var o=new n(Ci(Ci({},t),{},{virtual:!0}),this.graphModel);return this.graphModel.setFakerNode(o),o}},{key:"removeFakerNode",value:function(){this.graphModel.removeFakerNode()}},{key:"setNodeSnapLine",value:function(t){this.snaplineModel&&this.snaplineModel.setNodeSnapLine(t)}},{key:"removeNodeSnapLine",value:function(){this.snaplineModel&&this.snaplineModel.clearSnapline()}},{key:"setView",value:function(t,n){this.viewMap.set(t,n)}},{key:"renderRawData",value:function(t){this.graphModel.graphDataToModel(rr(t)),this.options.history!==!1&&this.history.watch(this.graphModel),Object(ae.j)(Object(ae.g)(OM,{getView:this.getView,tool:this.tool,options:this.options,dnd:this.dnd,snaplineModel:this.snaplineModel,graphModel:this.graphModel}),this.container),this.emit(ot.GRAPH_RENDERED,this.graphModel.modelToGraphData())}},{key:"render",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.adapterIn&&(t=this.adapterIn(t)),this.renderRawData(t)}}],[{key:"use",value:function(t){var n=t.pluginName;n||(console.warn("\u8BF7\u7ED9\u63D2\u4EF6".concat(t.name||t.constructor.name,"\u6307\u5B9ApluginName!")),n=t.name);var o=this.extensions.get(n);o&&o.destroy&&o.destroy(),this.extensions.set(n,t)}}]),e}();Lt(ed,"extensions",new Map);function $r(e){return gt(e)}c.default=ed}])})})(Je,Je.exports);var kl=Km(Je.exports);const GC=[{type:"bpmn:startEvent",text:"\u5F00\u59CB",class:"bpmn-start"},{type:"bpmn:endEvent",text:"\u7ED3\u675F",class:"bpmn-end"},{type:"bpmn:exclusiveGateway",text:"\u7F51\u5173",class:"bpmn-exclusiveGateway"},{type:"bpmn:userTask",text:"\u7528\u6237",class:"bpmn-user"}];function kC(m,v){return v={exports:{}},m(v,v.exports),v.exports}var $C=kC(function(m){var v=m.exports=function(u,c){if(c||(c=16),u===void 0&&(u=128),u<=0)return"0";for(var i=Math.log(Math.pow(2,u))/Math.log(c),l=2;i===1/0;l*=2)i=Math.log(Math.pow(2,u/l))/Math.log(c)*l;for(var s=i-Math.floor(i),y="",l=0;l<Math.floor(i);l++){var b=Math.floor(Math.random()*c).toString(c);y=b+y}if(s){var x=Math.pow(c,s),b=Math.floor(Math.random()*x).toString(c);y=b+y}var S=parseInt(y,c);return S!==1/0&&S>=Math.pow(2,u)?v(u,c):y};v.rack=function(u,c,i){var l=function(y){var b=0;do{if(b++>10)if(i)u+=i;else throw new Error("too many ID collisions, use more bits");var x=v(u,c)}while(Object.hasOwnProperty.call(s,x));return s[x]=y,x},s=l.hats={};return l.get=function(y){return l.hats[y]},l.set=function(y,b){return l.hats[y]=b,l},l.bits=u||128,l.base=c||16,l}});function an(m){if(!(this instanceof an))return new an(m);m=m||[128,36,1],this._seed=m.length?$C.rack(m[0],m[1],m[2]):m}an.prototype.next=function(m){return this._seed(m||!0)};an.prototype.nextPrefixed=function(m,v){var u;do u=m+this.next(!0);while(this.assigned(u));return this.claim(u,v),u};an.prototype.claim=function(m,v){this._seed.set(m,v||!0)};an.prototype.assigned=function(m){return this._seed.get(m)||!1};an.prototype.unclaim=function(m){delete this._seed.hats[m]};an.prototype.clear=function(){var m=this._seed.hats,v;for(v in m)this.unclaim(v)};var UC=new an([32,32,1]);function ei(){return UC.next()}var eb=globalThis&&globalThis.__extends||function(){var m=function(v,u){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,i){c.__proto__=i}||function(c,i){for(var l in i)i.hasOwnProperty(l)&&(c[l]=i[l])},m(v,u)};return function(v,u){m(v,u);function c(){this.constructor=v}v.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}}(),XC=function(m){eb(v,m);function v(u,c){var i=this;return u.id||(u.id="Event_"+ei()),u.text||(u.text=""),u.text&&typeof u.text=="string"&&(u.text={value:u.text,x:u.x,y:u.y+40}),i=m.call(this,u,c)||this,i}return v.prototype.setAttributes=function(){this.r=18},v.prototype.getConnectedTargetRules=function(){var u=m.prototype.getConnectedTargetRules.call(this),c={message:"\u8D77\u59CB\u8282\u70B9\u4E0D\u80FD\u4F5C\u4E3A\u8FB9\u7684\u7EC8\u70B9",validate:function(){return!1}};return u.push(c),u},v.extendKey="StartEventModel",v}(Je.exports.CircleNodeModel),YC=function(m){eb(v,m);function v(){return m!==null&&m.apply(this,arguments)||this}return v.extendKey="StartEventNode",v}(Je.exports.CircleNode),WC={type:"bpmn:startEvent",view:YC,model:XC},tb=globalThis&&globalThis.__extends||function(){var m=function(v,u){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,i){c.__proto__=i}||function(c,i){for(var l in i)i.hasOwnProperty(l)&&(c[l]=i[l])},m(v,u)};return function(v,u){m(v,u);function c(){this.constructor=v}v.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}}(),Xl=globalThis&&globalThis.__assign||function(){return Xl=Object.assign||function(m){for(var v,u=1,c=arguments.length;u<c;u++){v=arguments[u];for(var i in v)Object.prototype.hasOwnProperty.call(v,i)&&(m[i]=v[i])}return m},Xl.apply(this,arguments)},VC=function(m){tb(v,m);function v(u,c){var i=this;return u.id||(u.id="Event_"+ei()),u.text||(u.text=""),u.text&&typeof u.text=="string"&&(u.text={value:u.text,x:u.x,y:u.y+40}),i=m.call(this,u,c)||this,i}return v.prototype.setAttributes=function(){this.r=18},v.prototype.getConnectedSourceRules=function(){var u=m.prototype.getConnectedSourceRules.call(this),c={message:"\u7ED3\u675F\u8282\u70B9\u4E0D\u80FD\u4F5C\u4E3A\u8FB9\u7684\u8D77\u70B9",validate:function(){return!1}};return u.push(c),u},v.extendKey="EndEventModel",v}(Je.exports.CircleNodeModel),KC=function(m){tb(v,m);function v(){return m!==null&&m.apply(this,arguments)||this}return v.prototype.getAnchorStyle=function(){return{visibility:"hidden"}},v.prototype.getShape=function(){var u=this.props.model,c=u.getNodeStyle(),i=u.x,l=u.y,s=u.r,y=m.prototype.getShape.call(this);return Je.exports.h("g",{},y,Je.exports.h("circle",Xl(Xl({},c),{cx:i,cy:l,r:s-5})))},v.extendKey="EndEventView",v}(Je.exports.CircleNode),ZC={type:"bpmn:endEvent",view:KC,model:VC},rb=globalThis&&globalThis.__extends||function(){var m=function(v,u){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,i){c.__proto__=i}||function(c,i){for(var l in i)i.hasOwnProperty(l)&&(c[l]=i[l])},m(v,u)};return function(v,u){m(v,u);function c(){this.constructor=v}v.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}}(),Li=globalThis&&globalThis.__assign||function(){return Li=Object.assign||function(m){for(var v,u=1,c=arguments.length;u<c;u++){v=arguments[u];for(var i in v)Object.prototype.hasOwnProperty.call(v,i)&&(m[i]=v[i])}return m},Li.apply(this,arguments)},JC=function(m){rb(v,m);function v(u,c){var i=this;return u.id||(u.id="Gateway_"+ei()),u.text||(u.text=""),u.text&&typeof u.text=="string"&&(u.text={value:u.text,x:u.x,y:u.y+40}),i=m.call(this,u,c)||this,i.points=[[25,0],[50,25],[25,50],[0,25]],i}return v.extendKey="ExclusiveGatewayModel",v}(Je.exports.PolygonNodeModel),QC=function(m){rb(v,m);function v(){return m!==null&&m.apply(this,arguments)||this}return v.prototype.getShape=function(){var u=this.props.model,c=u.x,i=u.y,l=u.width,s=u.height,y=u.points,b=u.getNodeStyle();return Je.exports.h("g",{transform:"matrix(1 0 0 1 "+(c-l/2)+" "+(i-s/2)+")"},Je.exports.h("polygon",Li(Li({},b),{x:c,y:i,points:y})),Je.exports.h("path",Li({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"},b)))},v.extendKey="ExclusiveGatewayNode",v}(Je.exports.PolygonNode),qC={type:"bpmn:exclusiveGateway",view:QC,model:JC},nb=globalThis&&globalThis.__extends||function(){var m=function(v,u){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,i){c.__proto__=i}||function(c,i){for(var l in i)i.hasOwnProperty(l)&&(c[l]=i[l])},m(v,u)};return function(v,u){m(v,u);function c(){this.constructor=v}v.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}}(),Yl=globalThis&&globalThis.__assign||function(){return Yl=Object.assign||function(m){for(var v,u=1,c=arguments.length;u<c;u++){v=arguments[u];for(var i in v)Object.prototype.hasOwnProperty.call(v,i)&&(m[i]=v[i])}return m},Yl.apply(this,arguments)},eR=function(m){nb(v,m);function v(u,c){var i=this;return u.id||(u.id="Activity_"+ei()),i=m.call(this,u,c)||this,i}return v.extendKey="UserTaskModel",v}(Je.exports.RectNodeModel),tR=function(m){nb(v,m);function v(){return m!==null&&m.apply(this,arguments)||this}return v.prototype.getLabelShape=function(){var u=this.props.model,c=u.x,i=u.y,l=u.width,s=u.height,y=u.getNodeStyle();return Je.exports.h("svg",{x:c-l/2+5,y:i-s/2+5,width:25,height:25,viewBox:"0 0 1274 1024"},Je.exports.h("path",{fill:y.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"}))},v.prototype.getShape=function(){var u=this.props.model,c=u.x,i=u.y,l=u.width,s=u.height,y=u.radius,b=u.getNodeStyle();return Je.exports.h("g",{},[Je.exports.h("rect",Yl(Yl({},b),{x:c-l/2,y:i-s/2,rx:y,ry:y,width:l,height:s})),this.getLabelShape()])},v.extendKey="UserTaskNode",v}(Je.exports.RectNode),rR={type:"bpmn:userTask",view:tR,model:eR},ob=globalThis&&globalThis.__extends||function(){var m=function(v,u){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,i){c.__proto__=i}||function(c,i){for(var l in i)i.hasOwnProperty(l)&&(c[l]=i[l])},m(v,u)};return function(v,u){m(v,u);function c(){this.constructor=v}v.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}}(),od=globalThis&&globalThis.__assign||function(){return od=Object.assign||function(m){for(var v,u=1,c=arguments.length;u<c;u++){v=arguments[u];for(var i in v)Object.prototype.hasOwnProperty.call(v,i)&&(m[i]=v[i])}return m},od.apply(this,arguments)},nR=function(m){ob(v,m);function v(u,c){var i=this;return u.id||(u.id="Activity_"+ei()),i=m.call(this,u,c)||this,i}return v.extendKey="ServiceTaskModel",v}(Je.exports.RectNodeModel),oR=function(m){ob(v,m);function v(){return m!==null&&m.apply(this,arguments)||this}return v.prototype.getLabelShape=function(){var u=this.props.model,c=u.x,i=u.y,l=u.width,s=u.height,y=u.getNodeStyle();return Je.exports.h("svg",{x:c-l/2+5,y:i-s/2+5,width:30,height:30,viewBox:"0 0 1274 1024"},Je.exports.h("path",{fill:y.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"}))},v.prototype.getShape=function(){var u=this.props.model,c=u.x,i=u.y,l=u.width,s=u.height,y=u.radius,b=u.getNodeStyle();return Je.exports.h("g",{},[Je.exports.h("rect",od({x:c-l/2,y:i-s/2,rx:y,ry:y,width:l,height:s},b)),this.getLabelShape()])},v.extendKey="ServiceTaskNode",v}(Je.exports.RectNode),iR={type:"bpmn:serviceTask",view:oR,model:nR},ib=globalThis&&globalThis.__extends||function(){var m=function(v,u){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,i){c.__proto__=i}||function(c,i){for(var l in i)i.hasOwnProperty(l)&&(c[l]=i[l])},m(v,u)};return function(v,u){m(v,u);function c(){this.constructor=v}v.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}}(),aR=function(m){ib(v,m);function v(u,c){var i=this;return u.id||(u.id="Flow_"+ei()),i=m.call(this,u,c)||this,i}return v.extendKey="SequenceFlowModel",v}(Je.exports.PolylineEdgeModel),uR=function(m){ib(v,m);function v(){return m!==null&&m.apply(this,arguments)||this}return v.extendKey="SequenceFlowEdge",v}(Je.exports.PolylineEdge),lR={type:"bpmn:sequenceFlow",view:uR,model:aR},Pm={width:40,height:40},Tm={width:40,height:40},wm={width:40,height:40},Mm={width:100,height:80},Am={width:100,height:80},sR={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}}},fR=function(){function m(v){var u=v.lf;u.setTheme(sR),u.register(WC),u.register(ZC),u.register(qC),u.register(rR),u.register(iR),u.options.customBpmnEdge||(u.register(lR),u.setDefaultEdgeType("bpmn:sequenceFlow"))}return m.pluginName="bpmnElement",m}(),cR=function(){function m(v){var u=this,c=v.lf;this.lf=c,this.customCssRules="",this.useGlobalRules=!0,c.getSnapshot=function(i,l){u.getSnapshot(i,l)},c.getSnapshotBlob=function(i){return u.getSnapshotBlob(i)},c.getSnapshotBase64=function(i){return u.getSnapshotBase64(i)}}return m.prototype.getSvgRootElement=function(v){var u=this;this.offsetX=Number.MAX_SAFE_INTEGER,this.offsetY=Number.MAX_SAFE_INTEGER,v.graphModel.nodes.forEach(function(i){var l=i.x,s=i.width,y=i.y,b=i.height,x=l-s/2,S=y-b/2;x<u.offsetX&&(u.offsetX=x-5),S<u.offsetY&&(u.offsetY=S-5)}),v.graphModel.edges.forEach(function(i){i.pointsList&&i.pointsList.forEach(function(l){var s=l.x,y=l.y;s<u.offsetX&&(u.offsetX=s-5),y<u.offsetY&&(u.offsetY=y-5)})});var c=v.container.querySelector(".lf-canvas-overlay");return c},m.prototype.triggerDownload=function(v){var u=new MouseEvent("click",{view:window,bubbles:!1,cancelable:!0}),c=document.createElement("a");c.setAttribute("download",this.fileName),c.setAttribute("href",v),c.setAttribute("target","_blank"),c.dispatchEvent(u)},m.prototype.removeAnchor=function(v){for(var u=v.childNodes,c=v.childNodes&&v.childNodes.length,i=0;i<c;i++){var l=u[i],s=l.classList&&Array.from(l.classList)||[];s.indexOf("lf-anchor")>-1&&(v.removeChild(v.childNodes[i]),c--,i--)}},m.prototype.getSnapshot=function(v,u){var c=this;this.fileName=v||"logic-flow."+Date.now()+".png";var i=this.getSvgRootElement(this.lf);this.getCanvasData(i,u).then(function(l){var s=l.toDataURL("image/png").replace("image/png","image/octet-stream");c.triggerDownload(s)})},m.prototype.getSnapshotBase64=function(v){var u=this,c=this.getSvgRootElement(this.lf);return new Promise(function(i){u.getCanvasData(c,v).then(function(l){var s=l.toDataURL("image/png");i({data:s,width:l.width,height:l.height})})})},m.prototype.getSnapshotBlob=function(v){var u=this,c=this.getSvgRootElement(this.lf);return new Promise(function(i){u.getCanvasData(c,v).then(function(l){l.toBlob(function(s){i({data:s,width:l.width,height:l.height})},"image/png")})})},m.prototype.getClassRules=function(){var v="";if(this.useGlobalRules)for(var u=document.styleSheets,c=0;c<u.length;c++)for(var i=u[c],l=0;l<i.cssRules.length;l++)v+=i.cssRules[l].cssText;return this.customCssRules&&(v+=this.customCssRules),v},m.prototype.getCanvasData=function(v,u){var c=this,i=v.cloneNode(!0),l=i.lastChild,s=l.childNodes&&l.childNodes.length;if(s)for(var y=0;y<s;y++){var b=l.childNodes[y],x=b.classList&&Array.from(b.classList);if(x&&x.indexOf("lf-base")<0)l.removeChild(l.childNodes[y]),s--,y--;else{var S=l.childNodes[y];S&&S.childNodes.forEach(function(B){var X=B;c.removeAnchor(X.firstChild)})}}i.lastChild.style.transform="matrix(1, 0, 0, 1, "+(-this.offsetX+10)+", "+(-this.offsetY+10)+")";var T=window.devicePixelRatio||1,N=document.createElement("canvas"),A=this.lf.graphModel.rootEl.querySelector(".lf-base"),R=A.getBoundingClientRect(),I=this.lf.graphModel,_=I.transformModel,F=_.SCALE_X,Y=_.SCALE_Y,V=Math.ceil(R.width/F),ce=Math.ceil(R.height/Y);N.style.width=V+"px",N.style.height=ce+"px",N.width=V*T+80,N.height=ce*T+80;var ue=N.getContext("2d");ue.clearRect(0,0,N.width,N.height),ue.scale(T,T),u?(ue.fillStyle=u,ue.fillRect(0,0,V*T+80,ce*T+80)):ue.clearRect(0,0,V,ce);var te=new Image,q=document.createElement("style");q.innerHTML=this.getClassRules();var ee=document.createElement("foreignObject");return ee.appendChild(q),i.appendChild(ee),new Promise(function(B){te.onload=function(){ue.drawImage(te,0,0),B(N)};var X="data:image/svg+xml;charset=utf-8,"+new XMLSerializer().serializeToString(i),P=X.replace(/\n/g,"").replace(/\t/g,"").replace(/#/g,"%23");te.src=P})},m.pluginName="snapshot",m}(),dR=new an([32,32,1]);function Nm(){return dR.next()}var yr=function(){};yr.ObjTree=function(){return this};yr.ObjTree.VERSION="0.23";yr.ObjTree.prototype.xmlDecl=`<?xml version="1.0" encoding="UTF-8" ?>
- `;yr.ObjTree.prototype.attr_prefix="-";yr.ObjTree.prototype.parseXML=function(m){var v;if(window.DOMParser){var u=new DOMParser,c=u.parseFromString(m,"application/xml");if(!c)return;v=c.documentElement}else window.ActiveXObject&&(u=new ActiveXObject("Microsoft.XMLDOM"),u.async=!1,u.loadXML(m),v=u.documentElement);if(!!v)return this.parseDOM(v)};yr.ObjTree.prototype.parseHTTP=function(m,v,u){var c={};for(var i in v)c[i]=v[i];if(c.method||(typeof c.postBody=="undefined"&&typeof c.postbody=="undefined"&&typeof c.parameters=="undefined"?c.method="get":c.method="post"),u){c.asynchronous=!0;var l=this,s=u,y=c.onComplete;c.onComplete=function(S){var T;S&&S.responseXML&&S.responseXML.documentElement&&(T=l.parseDOM(S.responseXML.documentElement)),s(T,S),y&&y(S)}}else c.asynchronous=!1;var b;if(typeof HTTP!="undefined"&&HTTP.Request){c.uri=m;var x=new HTTP.Request(c);x&&(b=x.transport)}else if(typeof Ajax!="undefined"&&Ajax.Request){var x=new Ajax.Request(m,c);x&&(b=x.transport)}if(u)return b;if(b&&b.responseXML&&b.responseXML.documentElement)return this.parseDOM(b.responseXML.documentElement)};yr.ObjTree.prototype.parseDOM=function(m){if(!!m){if(this.__force_array={},this.force_array)for(var v=0;v<this.force_array.length;v++)this.__force_array[this.force_array[v]]=1;var u=this.parseElement(m);if(this.__force_array[m.nodeName]&&(u=[u]),m.nodeType!=11){var c={};c[m.nodeName]=u,u=c}return u}};yr.ObjTree.prototype.parseElement=function(m){if(m.nodeType!=7){if(m.nodeType==3||m.nodeType==4){var v=m.nodeValue.match(/[^\x00-\x20]/);return v==null?void 0:m.nodeValue}var u,c={};if(m.attributes&&m.attributes.length){u={};for(var i=0;i<m.attributes.length;i++){var l=m.attributes[i].nodeName;if(typeof l=="string"){var s=m.attributes[i].nodeValue;!s||(l=this.attr_prefix+l,typeof c[l]=="undefined"&&(c[l]=0),c[l]++,this.addNode(u,l,c[l],s))}}}if(m.childNodes&&m.childNodes.length){var y=!0;u&&(y=!1);for(var i=0;i<m.childNodes.length&&y;i++){var b=m.childNodes[i].nodeType;b==3||b==4||(y=!1)}if(y){u||(u="");for(var i=0;i<m.childNodes.length;i++)u+=m.childNodes[i].nodeValue}else{u||(u={});for(var i=0;i<m.childNodes.length;i++){var l=m.childNodes[i].nodeName;if(typeof l=="string"){var s=this.parseElement(m.childNodes[i]);!s||(typeof c[l]=="undefined"&&(c[l]=0),c[l]++,this.addNode(u,l,c[l],s))}}}}return u}};yr.ObjTree.prototype.addNode=function(m,v,u,c){this.__force_array[v]?(u==1&&(m[v]=[]),m[v][m[v].length]=c):u==1?m[v]=c:u==2?m[v]=[m[v],c]:m[v][m[v].length]=c};yr.ObjTree.prototype.writeXML=function(m){var v=this.hash_to_xml(null,m);return this.xmlDecl+v};yr.ObjTree.prototype.hash_to_xml=function(m,v){var u=[],c=[];for(var i in v)if(!!v.hasOwnProperty(i)){var l=v[i];i.charAt(0)!=this.attr_prefix?typeof l=="undefined"||l==null?u[u.length]="<"+i+" />":typeof l=="object"&&l.constructor==Array?u[u.length]=this.array_to_xml(i,l):typeof l=="object"?u[u.length]=this.hash_to_xml(i,l):u[u.length]=this.scalar_to_xml(i,l):c[c.length]=" "+i.substring(1)+'="'+this.xml_escape(l)+'"'}var s=c.join(""),y=u.join("");return typeof m=="undefined"||m==null||(u.length>0?y.match(/\n/)?y="<"+m+s+`>
- `+y+"</"+m+`>
- `:y="<"+m+s+">"+y+"</"+m+`>
- `:y="<"+m+s+` />
- `),y};yr.ObjTree.prototype.array_to_xml=function(m,v){for(var u=[],c=0;c<v.length;c++){var i=v[c];typeof i=="undefined"||i==null?u[u.length]="<"+m+" />":typeof i=="object"&&i.constructor==Array?u[u.length]=this.array_to_xml(m,i):typeof i=="object"?u[u.length]=this.hash_to_xml(m,i):u[u.length]=this.scalar_to_xml(m,i)}return u.join("")};yr.ObjTree.prototype.scalar_to_xml=function(m,v){return m=="#text"?this.xml_escape(v):"<"+m+">"+this.xml_escape(v)+"</"+m+`>
- `};yr.ObjTree.prototype.xml_escape=function(m){return m.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"')};var ql=globalThis&&globalThis.__read||function(m,v){var u=typeof Symbol=="function"&&m[Symbol.iterator];if(!u)return m;var c=u.call(m),i,l=[],s;try{for(;(v===void 0||v-- >0)&&!(i=c.next()).done;)l.push(i.value)}catch(y){s={error:y}}finally{try{i&&!i.done&&(u=c.return)&&u.call(c)}finally{if(s)throw s.error}}return l},un;(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"})(un||(un={}));var ab=["-name","-id","bpmn:incoming","bpmn:outgoing","-sourceRef","-targetRef"];function id(m){var v={};return Object.entries(m).forEach(function(u){var c=ql(u,2),i=c[0],l=c[1];typeof l!="object"?i.indexOf("-")===0?v[i]=l:v["-"+i]=l:v[i]=id(l)}),v}function fd(m){var v={};return Object.entries(m).forEach(function(u){var c=ql(u,2),i=c[0],l=c[1];typeof l=="string"?i.indexOf("-")===0?v[i.substr(1)]=l:v[i]=l:typeof l=="object"?v[i]=fd(l):v[i]=l}),v}function pR(m,v){var u=new Map;v.nodes.forEach(function(i){var l,s={"-id":i.id};if(!((l=i.text)===null||l===void 0)&&l.value&&(s["-name"]=i.text.value),i.properties){var y=id(i.properties);Object.assign(s,y)}u.set(i.id,s),m[i.type]?Array.isArray(m[i.type])?m[i.type].push(s):m[i.type]=[m[i.type],s]:m[i.type]=s});var c=v.edges.map(function(i){var l,s,y=u.get(i.targetNodeId);y["bpmn:incoming"]?Array.isArray(y["bpmn:incoming"])?y["bpmn:incoming"].push(i.id):y["bpmn:incoming"]=[y["bpmn:incoming"],i.id]:y["bpmn:incoming"]=i.id;var b=u.get(i.sourceNodeId);b["bpmn:outgoing"]?Array.isArray(b["bpmn:outgoing"])?b["bpmn:outgoing"].push(i.id):b["bpmn:outgoing"]=[b["bpmn:outgoing"],i.id]:b["bpmn:outgoing"]=i.id;var x={"-id":i.id,"-sourceRef":i.sourceNodeId,"-targetRef":i.targetNodeId};if(!((l=i.text)===null||l===void 0)&&l.value&&(x["-name"]=(s=i.text)===null||s===void 0?void 0:s.value),i.properties){var S=id(i.properties);Object.assign(x,S)}return x});m[un.FLOW]=c}function hR(m,v){m["bpmndi:BPMNEdge"]=v.edges.map(function(u){var c,i=u.id,l=u.pointsList.map(function(y){var b=y.x,x=y.y;return{"-x":b,"-y":x}}),s={"-id":i+"_di","-bpmnElement":i,"di:waypoint":l};return!((c=u.text)===null||c===void 0)&&c.value&&(s["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":u.text.x-u.text.value.length*10/2,"-y":u.text.y-7,"-width":u.text.value.length*10,"-height":14}}),s}),m["bpmndi:BPMNShape"]=v.nodes.map(function(u){var c,i=u.id,l=100,s=80,y=u.x,b=u.y,x=po.shapeConfigMap.get(u.type);x&&(l=x.width,s=x.height),y-=l/2,b-=s/2;var S={"-id":i+"_di","-bpmnElement":i,"dc:Bounds":{"-x":y,"-y":b,"-width":l,"-height":s}};return!((c=u.text)===null||c===void 0)&&c.value&&(S["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":u.text.x-u.text.value.length*10/2,"-y":u.text.y-7,"-width":u.text.value.length*10,"-height":14}}),S})}function vR(m){var v=[],u=[],c=m["bpmn:definitions"];if(c){var i=c["bpmn:process"];Object.keys(i).forEach(function(l){if(l.indexOf("bpmn:")===0){var s=i[l];if(l===un.FLOW){var y=c["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNEdge"];u=gR(s,y)}else{var b=c["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNShape"];v=v.concat(yR(s,b,l))}}})}return{nodes:v,edges:u}}function yR(m,v,u){var c=[];if(Array.isArray(m))m.forEach(function(s){var y;Array.isArray(v)?y=v.find(function(x){return x["-bpmnElement"]===s["-id"]}):y=v;var b=Dm(y,u,s);c.push(b)});else{var i=void 0;Array.isArray(v)?i=v.find(function(s){return s["-bpmnElement"]===m["-id"]}):i=v;var l=Dm(i,u,m);c.push(l)}return c}function Dm(m,v,u){var c=Number(m["dc:Bounds"]["-x"]),i=Number(m["dc:Bounds"]["-y"]),l=u["-name"],s=po.shapeConfigMap.get(v);s&&(c+=s.width/2,i+=s.height/2);var y;Object.entries(u).forEach(function(T){var N=ql(T,2),A=N[0],R=N[1];ab.indexOf(A)===-1&&(y||(y={}),y[A]=R)}),y&&(y=fd(y));var b;if(l&&(b={x:c,y:i,value:l},m["bpmndi:BPMNLabel"]&&m["bpmndi:BPMNLabel"]["dc:Bounds"])){var x=m["bpmndi:BPMNLabel"]["dc:Bounds"];b.x=Number(x["-x"])+Number(x["-width"])/2,b.y=Number(x["-y"])+Number(x["-height"])/2}var S={id:m["-bpmnElement"],type:v,x:c,y:i,properties:y};return b&&(S.text=b),S}function gR(m,v){var u=[];if(Array.isArray(m))m.forEach(function(i){var l;Array.isArray(v)?l=v.find(function(s){return s["-bpmnElement"]===i["-id"]}):l=v,u.push(jm(l,i))});else{var c=void 0;Array.isArray(v)?c=v.find(function(i){return i["-bpmnElement"]===m["-id"]}):c=v,u.push(jm(c,m))}return u}function jm(m,v){var u,c=v["-name"];if(c){var i=m["bpmndi:BPMNLabel"]["dc:Bounds"],l=0;c.split(`
- `).forEach(function(b){l<b.length&&(l=b.length)}),u={value:c,x:Number(i["-x"])+l*10/2,y:Number(i["-y"])+7}}var s;Object.entries(v).forEach(function(b){var x=ql(b,2),S=x[0],T=x[1];ab.indexOf(S)===-1&&(s||(s={}),s[S]=T)}),s&&(s=fd(s));var y={id:v["-id"],type:un.FLOW,pointsList:m["di:waypoint"].map(function(b){return{x:Number(b["-x"]),y:Number(b["-y"])}}),sourceNodeId:v["-sourceRef"],targetNodeId:v["-targetRef"],properties:s};return u&&(y.text=u),y}var po={pluginName:"bpmn-adapter",install:function(m){m.adapterIn=this.adapterIn,m.adapterOut=this.adapterOut},shapeConfigMap:new Map,setCustomShape:function(m,v){this.shapeConfigMap.set(m,v)},adapterOut:function(m){var v={"-id":"Process_"+Nm(),"-isExecutable":"false"};pR(v,m);var u={"-id":"BPMNPlane_1","-bpmnElement":v["-id"]};hR(u,m);var c={"bpmn:definitions":{"-id":"Definitions_"+Nm(),"-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://bpmn.io/schema/bpmn","-exporter":"bpmn-js (https://demo.bpmn.io)","-exporterVersion":"7.3.0","bpmn:process":v,"bpmndi:BPMNDiagram":{"-id":"BPMNDiagram_1","bpmndi:BPMNPlane":u}}};return c},adapterIn:function(m){if(m)return vR(m)}};po.shapeConfigMap.set(un.START,{width:Pm.width,height:Pm.height});po.shapeConfigMap.set(un.END,{width:Tm.width,height:Tm.height});po.shapeConfigMap.set(un.GATEWAY,{width:wm.width,height:wm.height});po.shapeConfigMap.set(un.SYSTEM,{width:Mm.width,height:Mm.height});po.shapeConfigMap.set(un.USER,{width:Am.width,height:Am.height});var Cm=globalThis&&globalThis.__assign||function(){return Cm=Object.assign||function(m){for(var v,u=1,c=arguments.length;u<c;u++){v=arguments[u];for(var i in v)Object.prototype.hasOwnProperty.call(v,i)&&(m[i]=v[i])}return m},Cm.apply(this,arguments)};globalThis&&globalThis.__read;var Rm;(function(m){m.HORIZONTAL="horizontal",m.VERTICAL="vertical"})(Rm||(Rm={}));var mR=globalThis&&globalThis.__read||function(m,v){var u=typeof Symbol=="function"&&m[Symbol.iterator];if(!u)return m;var c=u.call(m),i,l=[],s;try{for(;(v===void 0||v-- >0)&&!(i=c.next()).done;)l.push(i.value)}catch(y){s={error:y}}finally{try{i&&!i.done&&(u=c.return)&&u.call(c)}finally{if(s)throw s.error}}return l};globalThis&&globalThis.__spread;var bR=globalThis&&globalThis.__read||function(m,v){var u=typeof Symbol=="function"&&m[Symbol.iterator];if(!u)return m;var c=u.call(m),i,l=[],s;try{for(;(v===void 0||v-- >0)&&!(i=c.next()).done;)l.push(i.value)}catch(y){s={error:y}}finally{try{i&&!i.done&&(u=c.return)&&u.call(c)}finally{if(s)throw s.error}}return l};globalThis&&globalThis.__spread;var OR=globalThis&&globalThis.__read||function(m,v){var u=typeof Symbol=="function"&&m[Symbol.iterator];if(!u)return m;var c=u.call(m),i,l=[],s;try{for(;(v===void 0||v-- >0)&&!(i=c.next()).done;)l.push(i.value)}catch(y){s={error:y}}finally{try{i&&!i.done&&(u=c.return)&&u.call(c)}finally{if(s)throw s.error}}return l},ER=globalThis&&globalThis.__spread||function(){for(var m=[],v=0;v<arguments.length;v++)m=m.concat(OR(arguments[v]));return m},Ri="lf:defaultNodeMenu",Ii="lf:defaultEdgeMenu",_i="lf:defaultGraphMenu",Im="lf:defaultSelectionMenu",SR=function(){function m(v){var u=this,c=v.lf;this.__menuDOM=document.createElement("ul"),this.lf=c,this.menuTypeMap=new Map,this.init(),this.lf.setMenuConfig=function(i){u.setMenuConfig(i)},this.lf.addMenuConfig=function(i){u.addMenuConfig(i)},this.lf.setMenuByType=function(i){u.setMenuByType(i)}}return m.prototype.init=function(){var v=this,u=[{text:"\u5220\u9664",callback:function(l){v.lf.deleteNode(l.id)}},{text:"\u7F16\u8F91\u6587\u672C",callback:function(l){v.lf.graphModel.editText(l.id)}},{text:"\u590D\u5236",callback:function(l){v.lf.cloneNode(l.id)}}];this.menuTypeMap.set(Ri,u);var c=[{text:"\u5220\u9664",callback:function(l){v.lf.deleteEdge(l.id)}},{text:"\u7F16\u8F91\u6587\u672C",callback:function(l){v.lf.graphModel.editText(l.id)}}];this.menuTypeMap.set(Ii,c),this.menuTypeMap.set(_i,[]);var i=[{text:"\u5220\u9664",callback:function(l){v.lf.clearSelectElements(),l.edges.forEach(function(s){return v.lf.deleteEdge(s.id)}),l.nodes.forEach(function(s){return v.lf.deleteNode(s.id)})}}];this.menuTypeMap.set(Im,i)},m.prototype.render=function(v,u){var c=this;this.__container=u,this.__currentData=null,this.__menuDOM.className="lf-menu",u.appendChild(this.__menuDOM),this.__menuDOM.addEventListener("click",function(i){i.stopPropagation();for(var l=i.target;Array.from(l.classList).indexOf("lf-menu-item")===-1&&Array.from(l.classList).indexOf("lf-menu")===-1;)l=l.parentElement;Array.from(l.classList).indexOf("lf-menu-item")>-1?(l.onclickCallback(c.__currentData),c.__menuDOM.style.display="none",c.__currentData=null):console.warn("\u70B9\u51FB\u533A\u57DF\u4E0D\u5728\u83DC\u5355\u9879\u5185\uFF0C\u8BF7\u68C0\u67E5\u4EE3\u7801\uFF01")},!0),this.lf.on("node:contextmenu",function(i){var l=i.data,s=i.position,y=s.domOverlayPosition,b=y.x,x=y.y,S=l.id,T=c.lf.graphModel.getNodeModelById(S),N=[],A=c.menuTypeMap.get(T.type);T&&T.menu&&Array.isArray(T.menu)?N=T.menu:A?N=A:N=c.menuTypeMap.get(Ri),c.__currentData=l,c.showMenu(b,x,N)}),this.lf.on("edge:contextmenu",function(i){var l=i.data,s=i.position,y=s.domOverlayPosition,b=y.x,x=y.y,S=l.id,T=c.lf.graphModel.getEdgeModelById(S),N=[],A=c.menuTypeMap.get(T.type);T&&T.menu&&Array.isArray(T.menu)?N=T.menu:A?N=A:N=c.menuTypeMap.get(Ii),c.__currentData=l,c.showMenu(b,x,N)}),this.lf.on("blank:contextmenu",function(i){var l=i.position,s=c.menuTypeMap.get(_i),y=l.domOverlayPosition,b=y.x,x=y.y;c.showMenu(b,x,s)}),this.lf.on("selection:contextmenu",function(i){var l=i.data,s=i.position,y=c.menuTypeMap.get(Im),b=s.domOverlayPosition,x=b.x,S=b.y;c.__currentData=l,c.showMenu(x,S,y)}),this.lf.on("node:mousedown",function(){c.__menuDOM.style.display="none"}),this.lf.on("edge:click",function(){c.__menuDOM.style.display="none"}),this.lf.on("blank:click",function(){c.__menuDOM.style.display="none"})},m.prototype.destroy=function(){var v;(v=this===null||this===void 0?void 0:this.__container)===null||v===void 0||v.removeChild(this.__menuDOM),this.__menuDOM=null},m.prototype.showMenu=function(v,u,c){if(!(!c||!c.length)){var i=this.__menuDOM;i.innerHTML="",i.append.apply(i,ER(this.__getMenuDom(c))),i.children.length&&(i.style.display="block",i.style.top=u+"px",i.style.left=v+"px")}},m.prototype.setMenuByType=function(v){!v.type||!v.menu||this.menuTypeMap.set(v.type,v.menu)},m.prototype.__getMenuDom=function(v){var u=[];return v&&v.length>0&&v.forEach(function(c){var i=document.createElement("li");if(c.className?i.className="lf-menu-item "+c.className:i.className="lf-menu-item",c.icon===!0){var l=document.createElement("span");l.className="lf-menu-item-icon",i.appendChild(l)}var s=document.createElement("span");s.className="lf-menu-item-text",c.text&&(s.innerText=c.text),i.appendChild(s),i.onclickCallback=c.callback,u.push(i)}),u},m.prototype.setMenuConfig=function(v){!v||(v.nodeMenu!==void 0&&this.menuTypeMap.set(Ri,v.nodeMenu?v.nodeMenu:[]),v.edgeMenu!==void 0&&this.menuTypeMap.set(Ii,v.edgeMenu?v.edgeMenu:[]),v.graphMenu!==void 0&&this.menuTypeMap.set(_i,v.graphMenu?v.graphMenu:[]))},m.prototype.addMenuConfig=function(v){if(!!v){if(Array.isArray(v.nodeMenu)){var u=this.menuTypeMap.get(Ri);this.menuTypeMap.set(Ri,u.concat(v.nodeMenu))}if(Array.isArray(v.edgeMenu)){var u=this.menuTypeMap.get(Ii);this.menuTypeMap.set(Ii,u.concat(v.edgeMenu))}if(Array.isArray(v.graphMenu)){var u=this.menuTypeMap.get(_i);this.menuTypeMap.set(_i,u.concat(v.graphMenu))}}},m.prototype.changeMenuItem=function(v,u){if(v==="add")this.addMenuConfig(u);else if(v==="reset")this.setMenuConfig(u);else throw new Error("The first parameter of changeMenuConfig should be 'add' or 'reset'")},m.pluginName="menu",m}();globalThis&&globalThis.__read;globalThis&&globalThis.__values;function xR(m){if(m.length<=1)return!1;for(var v=0,u=m.length-1;v!==u&&v+1!==u&&u-1!==v;)v++,u--;return v===u?[--v,u]:[v,u]}var ub=globalThis&&globalThis.__extends||function(){var m=function(v,u){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,i){c.__proto__=i}||function(c,i){for(var l in i)i.hasOwnProperty(l)&&(c[l]=i[l])},m(v,u)};return function(v,u){m(v,u);function c(){this.constructor=v}v.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}}(),Jo=globalThis&&globalThis.__assign||function(){return Jo=Object.assign||function(m){for(var v,u=1,c=arguments.length;u<c;u++){v=arguments[u];for(var i in v)Object.prototype.hasOwnProperty.call(v,i)&&(m[i]=v[i])}return m},Jo.apply(this,arguments)},On=globalThis&&globalThis.__read||function(m,v){var u=typeof Symbol=="function"&&m[Symbol.iterator];if(!u)return m;var c=u.call(m),i,l=[],s;try{for(;(v===void 0||v-- >0)&&!(i=c.next()).done;)l.push(i.value)}catch(y){s={error:y}}finally{try{i&&!i.done&&(u=c.return)&&u.call(c)}finally{if(s)throw s.error}}return l};(function(m){ub(v,m);function v(){return m!==null&&m.apply(this,arguments)||this}return v.prototype.pointFilter=function(u){for(var c=u,i=1;i<c.length-1;){var l=On(c[i-1],2),s=l[0],y=l[1],b=On(c[i],2),x=b[0],S=b[1],T=On(c[i+1],2),N=T[0],A=T[1];s===x&&x===N||y===S&&S===A?c.splice(i,1):i++}return c},v.prototype.getEdge=function(){var u=this.props.model,c=u.points,i=u.isAnimation,l=u.arrowConfig,s=u.radius,y=s===void 0?5:s,b=u.getEdgeStyle(),x=u.getEdgeAnimationStyle(),S=this.pointFilter(c.split(" ").map(function(Le){return Le.split(",").map(function(Se){return Number(Se)})})),T=xR(S);if(T){var N=On(T,2),A=N[0],R=N[1],I=S[A],_=S[R],F=I.some(function(Le,Se){return Le===_[Se]});if(!F){var Y=(_[1]-I[1])/2,V=[_[0],_[1]-Y],ce=[I[0],I[1]+Y];S.splice(A+1,0,ce,V)}}for(var ue=On(S[0],2),te=ue[0],q=ue[1],ee="M"+te+" "+q,B=1;B<S.length-1;B++){var X=On(S[B-1],2),P=X[0],w=X[1],D=On(S[B],2),k=D[0],K=D[1],se=On(S[B+1],2),Pe=se[0],ve=se[1];if(k===P&&K!==w){var me=K>w?K-y:K+y;ee=ee+" L "+k+" "+me}if(K===w&&k!==P){var be=k>P?k-y:k+y;ee=ee+" L "+be+" "+K}if(ee=ee+" Q "+k+" "+K,k===Pe&&K!==ve){var me=K>ve?K-y:K+y;ee=ee+" "+k+" "+me}if(K===ve&&k!==Pe){var be=k>Pe?k-y:k+y;ee=ee+" "+be+" "+K}}var Oe=On(S[S.length-1],2),we=Oe[0],ze=Oe[1];ee=ee+" L "+we+" "+ze;var Ye=Jo(Jo(Jo({d:ee,style:i?x:{}},b),l),{fill:"none"});return Je.exports.h("path",Jo({d:ee},Ye))},v})(Je.exports.PolylineEdge);(function(m){ub(v,m);function v(){return m!==null&&m.apply(this,arguments)||this}return v})(Je.exports.PolylineEdgeModel);var cd,$t,lb,lo,_m,sb,ad,fb={},cb=[],PR=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Xn(m,v){for(var u in v)m[u]=v[u];return m}function db(m){var v=m.parentNode;v&&v.removeChild(m)}function zi(m,v,u){var c,i,l,s={};for(l in v)l=="key"?c=v[l]:l=="ref"?i=v[l]:s[l]=v[l];if(arguments.length>2&&(s.children=arguments.length>3?cd.call(arguments,2):u),typeof m=="function"&&m.defaultProps!=null)for(l in m.defaultProps)s[l]===void 0&&(s[l]=m.defaultProps[l]);return $l(m,s,c,i,null)}function $l(m,v,u,c,i){var l={type:m,props:v,key:u,ref:c,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i==null?++lb:i};return i==null&&$t.vnode!=null&&$t.vnode(l),l}function dd(m){return m.children}function qo(m,v){this.props=m,this.context=v}function Hi(m,v){if(v==null)return m.__?Hi(m.__,m.__.__k.indexOf(m)+1):null;for(var u;v<m.__k.length;v++)if((u=m.__k[v])!=null&&u.__e!=null)return u.__e;return typeof m.type=="function"?Hi(m):null}function pb(m){var v,u;if((m=m.__)!=null&&m.__c!=null){for(m.__e=m.__c.base=null,v=0;v<m.__k.length;v++)if((u=m.__k[v])!=null&&u.__e!=null){m.__e=m.__c.base=u.__e;break}return pb(m)}}function Bm(m){(!m.__d&&(m.__d=!0)&&lo.push(m)&&!Wl.__r++||_m!==$t.debounceRendering)&&((_m=$t.debounceRendering)||sb)(Wl)}function Wl(){var m,v,u,c,i,l,s,y;for(lo.sort(ad);m=lo.shift();)m.__d&&(v=lo.length,c=void 0,i=void 0,s=(l=(u=m).__v).__e,(y=u.__P)&&(c=[],(i=Xn({},l)).__v=l.__v+1,mb(y,l,i,u.__n,y.ownerSVGElement!==void 0,l.__h!=null?[s]:null,c,s==null?Hi(l):s,l.__h),wR(c,l),l.__e!=s&&pb(l)),lo.length>v&&lo.sort(ad));Wl.__r=0}function hb(m,v,u,c,i,l,s,y,b,x){var S,T,N,A,R,I,_,F=c&&c.__k||cb,Y=F.length;for(u.__k=[],S=0;S<v.length;S++)if((A=u.__k[S]=(A=v[S])==null||typeof A=="boolean"||typeof A=="function"?null:typeof A=="string"||typeof A=="number"||typeof A=="bigint"?$l(null,A,null,null,A):Array.isArray(A)?$l(dd,{children:A},null,null,null):A.__b>0?$l(A.type,A.props,A.key,A.ref?A.ref:null,A.__v):A)!=null){if(A.__=u,A.__b=u.__b+1,(N=F[S])===null||N&&A.key==N.key&&A.type===N.type)F[S]=void 0;else for(T=0;T<Y;T++){if((N=F[T])&&A.key==N.key&&A.type===N.type){F[T]=void 0;break}N=null}mb(m,A,N=N||fb,i,l,s,y,b,x),R=A.__e,(T=A.ref)&&N.ref!=T&&(_||(_=[]),N.ref&&_.push(N.ref,null,A),_.push(T,A.__c||R,A)),R!=null?(I==null&&(I=R),typeof A.type=="function"&&A.__k===N.__k?A.__d=b=vb(A,b,m):b=yb(m,A,N,F,R,b),typeof u.type=="function"&&(u.__d=b)):b&&N.__e==b&&b.parentNode!=m&&(b=Hi(N))}for(u.__e=I,S=Y;S--;)F[S]!=null&&(typeof u.type=="function"&&F[S].__e!=null&&F[S].__e==u.__d&&(u.__d=gb(c).nextSibling),Ob(F[S],F[S]));if(_)for(S=0;S<_.length;S++)bb(_[S],_[++S],_[++S])}function vb(m,v,u){for(var c,i=m.__k,l=0;i&&l<i.length;l++)(c=i[l])&&(c.__=m,v=typeof c.type=="function"?vb(c,v,u):yb(u,c,c,i,c.__e,v));return v}function yb(m,v,u,c,i,l){var s,y,b;if(v.__d!==void 0)s=v.__d,v.__d=void 0;else if(u==null||i!=l||i.parentNode==null)e:if(l==null||l.parentNode!==m)m.appendChild(i),s=null;else{for(y=l,b=0;(y=y.nextSibling)&&b<c.length;b+=1)if(y==i)break e;m.insertBefore(i,l),s=l}return s!==void 0?s:i.nextSibling}function gb(m){var v,u,c;if(m.type==null||typeof m.type=="string")return m.__e;if(m.__k){for(v=m.__k.length-1;v>=0;v--)if((u=m.__k[v])&&(c=gb(u)))return c}return null}function TR(m,v,u,c,i){var l;for(l in u)l==="children"||l==="key"||l in v||Vl(m,l,null,u[l],c);for(l in v)i&&typeof v[l]!="function"||l==="children"||l==="key"||l==="value"||l==="checked"||u[l]===v[l]||Vl(m,l,v[l],u[l],c)}function Lm(m,v,u){v[0]==="-"?m.setProperty(v,u==null?"":u):m[v]=u==null?"":typeof u!="number"||PR.test(v)?u:u+"px"}function Vl(m,v,u,c,i){var l;e:if(v==="style")if(typeof u=="string")m.style.cssText=u;else{if(typeof c=="string"&&(m.style.cssText=c=""),c)for(v in c)u&&v in u||Lm(m.style,v,"");if(u)for(v in u)c&&u[v]===c[v]||Lm(m.style,v,u[v])}else if(v[0]==="o"&&v[1]==="n")l=v!==(v=v.replace(/Capture$/,"")),v=v.toLowerCase()in m?v.toLowerCase().slice(2):v.slice(2),m.l||(m.l={}),m.l[v+l]=u,u?c||m.addEventListener(v,l?Fm:zm,l):m.removeEventListener(v,l?Fm:zm,l);else if(v!=="dangerouslySetInnerHTML"){if(i)v=v.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(v!=="width"&&v!=="height"&&v!=="href"&&v!=="list"&&v!=="form"&&v!=="tabIndex"&&v!=="download"&&v in m)try{m[v]=u==null?"":u;break e}catch{}typeof u=="function"||(u==null||u===!1&&v.indexOf("-")==-1?m.removeAttribute(v):m.setAttribute(v,u))}}function zm(m){return this.l[m.type+!1]($t.event?$t.event(m):m)}function Fm(m){return this.l[m.type+!0]($t.event?$t.event(m):m)}function mb(m,v,u,c,i,l,s,y,b){var x,S,T,N,A,R,I,_,F,Y,V,ce,ue,te,q,ee=v.type;if(v.constructor!==void 0)return null;u.__h!=null&&(b=u.__h,y=v.__e=u.__e,v.__h=null,l=[y]),(x=$t.__b)&&x(v);try{e:if(typeof ee=="function"){if(_=v.props,F=(x=ee.contextType)&&c[x.__c],Y=x?F?F.props.value:x.__:c,u.__c?I=(S=v.__c=u.__c).__=S.__E:("prototype"in ee&&ee.prototype.render?v.__c=S=new ee(_,Y):(v.__c=S=new qo(_,Y),S.constructor=ee,S.render=AR),F&&F.sub(S),S.props=_,S.state||(S.state={}),S.context=Y,S.__n=c,T=S.__d=!0,S.__h=[],S._sb=[]),S.__s==null&&(S.__s=S.state),ee.getDerivedStateFromProps!=null&&(S.__s==S.state&&(S.__s=Xn({},S.__s)),Xn(S.__s,ee.getDerivedStateFromProps(_,S.__s))),N=S.props,A=S.state,S.__v=v,T)ee.getDerivedStateFromProps==null&&S.componentWillMount!=null&&S.componentWillMount(),S.componentDidMount!=null&&S.__h.push(S.componentDidMount);else{if(ee.getDerivedStateFromProps==null&&_!==N&&S.componentWillReceiveProps!=null&&S.componentWillReceiveProps(_,Y),!S.__e&&S.shouldComponentUpdate!=null&&S.shouldComponentUpdate(_,S.__s,Y)===!1||v.__v===u.__v){for(v.__v!==u.__v&&(S.props=_,S.state=S.__s,S.__d=!1),S.__e=!1,v.__e=u.__e,v.__k=u.__k,v.__k.forEach(function(B){B&&(B.__=v)}),V=0;V<S._sb.length;V++)S.__h.push(S._sb[V]);S._sb=[],S.__h.length&&s.push(S);break e}S.componentWillUpdate!=null&&S.componentWillUpdate(_,S.__s,Y),S.componentDidUpdate!=null&&S.__h.push(function(){S.componentDidUpdate(N,A,R)})}if(S.context=Y,S.props=_,S.__P=m,ce=$t.__r,ue=0,"prototype"in ee&&ee.prototype.render){for(S.state=S.__s,S.__d=!1,ce&&ce(v),x=S.render(S.props,S.state,S.context),te=0;te<S._sb.length;te++)S.__h.push(S._sb[te]);S._sb=[]}else do S.__d=!1,ce&&ce(v),x=S.render(S.props,S.state,S.context),S.state=S.__s;while(S.__d&&++ue<25);S.state=S.__s,S.getChildContext!=null&&(c=Xn(Xn({},c),S.getChildContext())),T||S.getSnapshotBeforeUpdate==null||(R=S.getSnapshotBeforeUpdate(N,A)),q=x!=null&&x.type===dd&&x.key==null?x.props.children:x,hb(m,Array.isArray(q)?q:[q],v,u,c,i,l,s,y,b),S.base=v.__e,v.__h=null,S.__h.length&&s.push(S),I&&(S.__E=S.__=null),S.__e=!1}else l==null&&v.__v===u.__v?(v.__k=u.__k,v.__e=u.__e):v.__e=MR(u.__e,v,u,c,i,l,s,b);(x=$t.diffed)&&x(v)}catch(B){v.__v=null,(b||l!=null)&&(v.__e=y,v.__h=!!b,l[l.indexOf(y)]=null),$t.__e(B,v,u)}}function wR(m,v){$t.__c&&$t.__c(v,m),m.some(function(u){try{m=u.__h,u.__h=[],m.some(function(c){c.call(u)})}catch(c){$t.__e(c,u.__v)}})}function MR(m,v,u,c,i,l,s,y){var b,x,S,T=u.props,N=v.props,A=v.type,R=0;if(A==="svg"&&(i=!0),l!=null){for(;R<l.length;R++)if((b=l[R])&&"setAttribute"in b==!!A&&(A?b.localName===A:b.nodeType===3)){m=b,l[R]=null;break}}if(m==null){if(A===null)return document.createTextNode(N);m=i?document.createElementNS("http://www.w3.org/2000/svg",A):document.createElement(A,N.is&&N),l=null,y=!1}if(A===null)T===N||y&&m.data===N||(m.data=N);else{if(l=l&&cd.call(m.childNodes),x=(T=u.props||fb).dangerouslySetInnerHTML,S=N.dangerouslySetInnerHTML,!y){if(l!=null)for(T={},R=0;R<m.attributes.length;R++)T[m.attributes[R].name]=m.attributes[R].value;(S||x)&&(S&&(x&&S.__html==x.__html||S.__html===m.innerHTML)||(m.innerHTML=S&&S.__html||""))}if(TR(m,N,T,i,y),S)v.__k=[];else if(R=v.props.children,hb(m,Array.isArray(R)?R:[R],v,u,c,i&&A!=="foreignObject",l,s,l?l[0]:u.__k&&Hi(u,0),y),l!=null)for(R=l.length;R--;)l[R]!=null&&db(l[R]);y||("value"in N&&(R=N.value)!==void 0&&(R!==m.value||A==="progress"&&!R||A==="option"&&R!==T.value)&&Vl(m,"value",R,T.value,!1),"checked"in N&&(R=N.checked)!==void 0&&R!==m.checked&&Vl(m,"checked",R,T.checked,!1))}return m}function bb(m,v,u){try{typeof m=="function"?m(v):m.current=v}catch(c){$t.__e(c,u)}}function Ob(m,v,u){var c,i;if($t.unmount&&$t.unmount(m),(c=m.ref)&&(c.current&&c.current!==m.__e||bb(c,null,v)),(c=m.__c)!=null){if(c.componentWillUnmount)try{c.componentWillUnmount()}catch(l){$t.__e(l,v)}c.base=c.__P=null,m.__c=void 0}if(c=m.__k)for(i=0;i<c.length;i++)c[i]&&Ob(c[i],v,u||typeof m.type!="function");u||m.__e==null||db(m.__e),m.__=m.__e=m.__d=void 0}function AR(m,v,u){return this.constructor(m,u)}cd=cb.slice,$t={__e:function(m,v,u,c){for(var i,l,s;v=v.__;)if((i=v.__c)&&!i.__)try{if((l=i.constructor)&&l.getDerivedStateFromError!=null&&(i.setState(l.getDerivedStateFromError(m)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(m,c||{}),s=i.__d),s)return i.__E=i}catch(y){m=y}throw m}},lb=0,qo.prototype.setState=function(m,v){var u;u=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Xn({},this.state),typeof m=="function"&&(m=m(Xn({},u),this.props)),m&&Xn(u,m),m!=null&&this.__v&&(v&&this._sb.push(v),Bm(this))},qo.prototype.forceUpdate=function(m){this.__v&&(this.__e=!0,m&&this.__h.push(m),Bm(this))},qo.prototype.render=dd,lo=[],sb=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ad=function(m,v){return m.__v.__b-v.__v.__b},Wl.__r=0;var Fi=globalThis&&globalThis.__assign||function(){return Fi=Object.assign||function(m){for(var v,u=1,c=arguments.length;u<c;u++){v=arguments[u];for(var i in v)Object.prototype.hasOwnProperty.call(v,i)&&(m[i]=v[i])}return m},Fi.apply(this,arguments)};function pd(m){var v=m.x,u=m.y,c=m.width,i=m.height,l=m.radius,s=m.className,y=v-c/2,b=u-i/2,x=Fi(Fi({width:10,height:10,cx:0,cy:0,rx:l||0,ry:l||0,fill:"transparent",fillOpacity:1,strokeWidth:"1px",stroke:"#000",strokeOpacity:1,className:"lf-basic-shape "+s},m),{x:y,y:b});return Je.exports.h("rect",Fi({},x))}pd.defaultProps={radius:0,stroke:"",strokeDasharray:"",className:""};var Qo;(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"})(Qo||(Qo={}));function Ul(m){var v=m.x,u=m.y,c=m.width,i=m.height;return{minX:v-c/2,minY:u-i/2,maxX:v+c/2,maxY:u+i/2}}function Hm(m){var v=Ul(m),u=m.radius,c=v.minX,i=v.minY,l=v.maxX,s=v.maxY;return[{x:c+u,y:i+u},{x:l-u,y:i+u},{x:l-u,y:s-u},{x:c+u,y:s-u}]}function Gm(m){var v=m.point,u=m.beforeNode,c=m.afterNode,i=v.x,l=v.y,s={x:i,y:l},y=u.radius,b=Ul(u),x=Ul(c);if(i===b.minX){s.x=x.minX;var S=(l-u.y)/(u.height/2-y);S?s.y=c.y+(c.height/2-y)*S:s.y=c.y}else if(i===b.maxX){s.x=x.maxX;var S=(l-u.y)/(u.height/2-y);S?s.y=c.y+(c.height/2-y)*S:s.y=c.y}else if(l===b.minY){s.y=x.minY;var S=(i-u.x)/(u.width/2-y);S?s.x=c.x+(c.width/2-y)*S:s.x=c.x}else if(l===b.maxY){s.y=x.maxY;var S=(i-u.x)/(u.width/2-y);S?s.x=c.x+(c.width/2-y)*S:s.x=c.x}else{var T=Hm(u),N=Hm(c),A=Ul(u),R=A.minX,I=A.minY,_=A.maxX,F=A.maxY,Y=-1;if(i-R<y&&l-I<y?Y=0:_-i<y&&l-I<y?Y=1:_-i<y&&F-l<y?Y=2:i-R<y&&I-l<y&&(Y=3),Y>-1){var V=Math.atan2(l-T[Y].y,i-T[Y].x);s.x=N[Y].x+y*Math.cos(V),s.y=N[Y].y+y*Math.sin(V)}}return s}function km(m){var v=m.point,u=m.beforeNode,c=m.afterNode,i=c.rx,l=c.ry,s=v,y=(v.y-u.y)/(v.x-u.x),b=i,x=l,S,T;return y>=1/0?(S=0,T=x):y<=-1/0?(S=0,T=-x):v.x-u.x>0?(S=b*x/Math.sqrt(x*x+b*b*y*y),T=b*x*y/Math.sqrt(x*x+b*b*y*y)):(S=-(b*x)/Math.sqrt(x*x+b*b*y*y),T=-(b*x*y)/Math.sqrt(x*x+b*b*y*y)),s={x:S+c.x,y:T+c.y},s}function $m(m){var v=m.point,u=m.beforeNode,c=m.afterNode,i=v,l,s,y=v.x-u.x,b=v.y-u.y,x=u.rx,S=u.ry,T=Math.sqrt((x-Math.abs(y))*(x-Math.abs(y))+b*b)/Math.sqrt(x*x+S*S),N=c.rx,A=c.ry,R=Math.sqrt((N*N+A*A)*T*T*(N*N/(N*N+A*A))),I=R*(A/N);return y>=0?l=N-R:l=R-N,b>0?s=I:s=-I,i={x:l+c.x,y:s+c.y},i}var NR=globalThis&&globalThis.__extends||function(){var m=function(v,u){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,i){c.__proto__=i}||function(c,i){for(var l in i)i.hasOwnProperty(l)&&(c[l]=i[l])},m(v,u)};return function(v,u){m(v,u);function c(){this.constructor=v}v.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}}(),so=globalThis&&globalThis.__assign||function(){return so=Object.assign||function(m){for(var v,u=1,c=arguments.length;u<c;u++){v=arguments[u];for(var i in v)Object.prototype.hasOwnProperty.call(v,i)&&(m[i]=v[i])}return m},so.apply(this,arguments)},DR=globalThis&&globalThis.__read||function(m,v){var u=typeof Symbol=="function"&&m[Symbol.iterator];if(!u)return m;var c=u.call(m),i,l=[],s;try{for(;(v===void 0||v-- >0)&&!(i=c.next()).done;)l.push(i.value)}catch(y){s={error:y}}finally{try{i&&!i.done&&(u=c.return)&&u.call(c)}finally{if(s)throw s.error}}return l},jR=Je.exports.LogicFlowUtil.StepDrag,CR=function(m){NR(v,m);function v(u){var c=m.call(this)||this;return c.updatePosition=function(i){var l=i.deltaX,s=i.deltaY,y=c.nodeModel,b=y.x,x=y.y;c.nodeModel.x=b+l/2,c.nodeModel.y=x+s/2,c.nodeModel.moveText(l/2,s/2)},c.getResize=function(i){var l=i.index,s=i.deltaX,y=i.deltaY,b=i.width,x=i.height,S=i.PCTResizeInfo,T=i.pct,N=T===void 0?1:T,A={width:b,height:x,deltaX:s,deltaY:y};if(S){var R=4,I=0,_=0;switch(l){case 0:_=(s*-1-y)/R;break;case 1:_=(s-y)/R;break;case 2:_=(s+y)/R;break;case 3:_=(s*-1+y)/R;break}_!==0&&(I=Math.round(_/S.ResizeBasis.basisHeight*1e5)/1e3),S.ResizePCT.widthPCT=Math.max(Math.min(S.ResizePCT.widthPCT+I,S.ScaleLimit.maxScaleLimit),S.ScaleLimit.minScaleLimit),S.ResizePCT.hightPCT=Math.max(Math.min(S.ResizePCT.hightPCT+I,S.ScaleLimit.maxScaleLimit),S.ScaleLimit.minScaleLimit);var F=Math.round(S.ResizePCT.widthPCT*S.ResizeBasis.basisWidth/100),Y=Math.round(S.ResizePCT.hightPCT*S.ResizeBasis.basisHeight/100);switch(l){case 0:s=b-F,y=x-Y;break;case 1:s=F-b,y=x-Y;break;case 2:s=F-b,y=Y-x;break;case 3:s=b-F,y=Y-x;break}return A.width=F,A.height=Y,A.deltaX=s/N,A.deltaY=y/N,A}switch(l){case 0:A.width=b-s*N,A.height=x-y*N;break;case 1:A.width=b+s*N,A.height=x-y*N;break;case 2:A.width=b+s*N,A.height=x+y*N;break;case 3:A.width=b-s*N,A.height=x+y*N;break}return A},c.updateRect=function(i){var l=i.deltaX,s=i.deltaY,y=c.nodeModel,b=y.id,x=y.x,S=y.y,T=y.width,N=y.height,A=y.radius,R=y.PCTResizeInfo,I=c.index,_=c.getResize({index:I,deltaX:l,deltaY:s,width:T,height:N,PCTResizeInfo:R,pct:1}),F=c.nodeModel,Y=F.minWidth,V=F.minHeight,ce=F.maxWidth,ue=F.maxHeight;if(_.width<Y||_.width>ce||_.height<V||_.height>ue){c.dragHandler.cancelDrag();return}c.updatePosition({deltaX:_.deltaX,deltaY:_.deltaY}),c.nodeModel.width=_.width,c.nodeModel.height=_.height,c.nodeModel.setProperties({nodeSize:{width:_.width,height:_.height}});var te=c.getNodeEdges(b),q={x,y:S,width:T,height:N,radius:A},ee={x:c.nodeModel.x,y:c.nodeModel.y,width:c.nodeModel.width,height:c.nodeModel.height,radius:A},B={point:"",beforeNode:q,afterNode:ee},X;te.sourceEdges.forEach(function(P){B.point=P.startPoint,X=Gm(B),P.updateStartPoint(X)}),te.targetEdges.forEach(function(P){B.point=P.endPoint,X=Gm(B),P.updateEndPoint(X)}),c.eventEmit({beforeNode:q,afterNode:ee})},c.updateEllipse=function(i){var l=i.deltaX,s=i.deltaY,y=c.nodeModel,b=y.id,x=y.rx,S=y.ry,T=y.x,N=y.y,A=y.PCTResizeInfo,R=c.index,I=x,_=S,F=c.getResize({index:R,deltaX:l,deltaY:s,width:I,height:_,PCTResizeInfo:A,pct:1/2}),Y=c.nodeModel,V=Y.minWidth,ce=Y.minHeight,ue=Y.maxWidth,te=Y.maxHeight;if(F.width<V/2||F.width>ue/2||F.height<ce/2||F.height>te/2){c.dragHandler.cancelDrag();return}c.updatePosition({deltaX:F.deltaX,deltaY:F.deltaY}),c.nodeModel.rx=F.width,c.nodeModel.ry=F.height,c.nodeModel.setProperties({nodeSize:{rx:F.width,ry:F.height}});var q=c.getNodeEdges(b),ee={x:T,y:N},B={rx:F.width,ry:F.height,x:c.nodeModel.x,y:c.nodeModel.y},X={point:{},beforeNode:ee,afterNode:B},P;q.sourceEdges.forEach(function(w){X.point=w.startPoint,P=km(X),w.updateStartPoint(P)}),q.targetEdges.forEach(function(w){X.point=w.endPoint,P=km(X),w.updateEndPoint(P)}),c.eventEmit({beforeNode:so(so({},ee),{rx:x,ry:S}),afterNode:B})},c.updateDiamond=function(i){var l=i.deltaX,s=i.deltaY,y=c.nodeModel,b=y.id,x=y.rx,S=y.ry,T=y.x,N=y.y,A=y.PCTResizeInfo,R=c.index,I=x,_=S,F=c.getResize({index:R,deltaX:l,deltaY:s,width:I,height:_,PCTResizeInfo:A,pct:1/2}),Y=c.nodeModel,V=Y.minWidth,ce=Y.minHeight,ue=Y.maxWidth,te=Y.maxHeight;if(F.width<V/2||F.width>ue/2||F.height<ce/2||F.height>te/2){c.dragHandler.cancelDrag();return}c.updatePosition({deltaX:F.deltaX,deltaY:F.deltaY}),c.nodeModel.rx=F.width,c.nodeModel.ry=F.height,c.nodeModel.setProperties({nodeSize:{rx:F.width,ry:F.height}});var q={x:T,y:N,rx:x,ry:S},ee={rx:F.width,ry:F.height,x:c.nodeModel.x,y:c.nodeModel.y},B={point:{},beforeNode:q,afterNode:ee},X,P=c.getNodeEdges(b);P.sourceEdges.forEach(function(w){B.point=w.startPoint,X=$m(B),w.updateStartPoint(X)}),P.targetEdges.forEach(function(w){B.point=w.endPoint,X=$m(B),w.updateEndPoint(X)}),c.eventEmit({beforeNode:q,afterNode:ee})},c.eventEmit=function(i){var l=i.beforeNode,s=i.afterNode,y=c.nodeModel,b=y.id,x=y.modelType,S=y.type,T=so({id:b,modelType:x,type:S},l),N=so({id:b,modelType:x,type:S},s);c.graphModel.eventCenter.emit("node:resize",{oldNodeSize:T,newNodeSize:N})},c.onDragging=function(i){var l,s=i.deltaX,y=i.deltaY,b=c.graphModel.transformModel,x=c.nodeModel.modelType;l=DR(b.fixDeltaXY(s,y),2),s=l[0],y=l[1],x===Qo.RECT_NODE||x===Qo.HTML_NODE?c.updateRect({deltaX:s,deltaY:y}):x===Qo.ELLIPSE_NODE?c.updateEllipse({deltaX:s,deltaY:y}):x===Qo.DIAMOND_NODE&&c.updateDiamond({deltaX:s,deltaY:y})},c.onDragEnd=function(){var i=c.graphModel.gridSize,l=i===void 0?1:i,s=l*Math.round(c.nodeModel.x/l),y=l*Math.round(c.nodeModel.y/l);c.nodeModel.moveTo(s,y)},c.index=u.index,c.nodeModel=u.model,c.graphModel=u.graphModel,c.state={},c.dragHandler=new jR({onDragging:c.onDragging,onDragEnd:c.onDragEnd,step:1}),c}return v.prototype.getNodeEdges=function(u){for(var c=this.graphModel,i=c.edges,l=[],s=[],y=0;y<i.length;y++){var b=i[y];b.sourceNodeId===u?l.push(b):i[y].targetNodeId===u&&s.push(b)}return{sourceEdges:l,targetEdges:s}},v.prototype.render=function(){var u=this.props,c=u.x,i=u.y,l=u.index,s=u.model,y=s.getControlPointStyle();return zi("g",{className:"lf-resize-control-"+l},zi(pd,so({className:"lf-node-control"},{x:c,y:i},y,{onMouseDown:this.dragHandler.handleMouseDown})))},v}(qo),RR=globalThis&&globalThis.__extends||function(){var m=function(v,u){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,i){c.__proto__=i}||function(c,i){for(var l in i)i.hasOwnProperty(l)&&(c[l]=i[l])},m(v,u)};return function(v,u){m(v,u);function c(){this.constructor=v}v.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}}(),Kl=globalThis&&globalThis.__assign||function(){return Kl=Object.assign||function(m){for(var v,u=1,c=arguments.length;u<c;u++){v=arguments[u];for(var i in v)Object.prototype.hasOwnProperty.call(v,i)&&(m[i]=v[i])}return m},Kl.apply(this,arguments)},es=function(m){RR(v,m);function v(){var u=m.call(this)||this;return u.state={},u}return v.prototype.getResizeControl=function(){var u=this.props,c=u.model,i=u.graphModel,l=c.x,s=c.y,y=c.width,b=c.height,x={minX:l-y/2,minY:s-b/2,maxX:l+y/2,maxY:s+b/2},S=x.minX,T=x.minY,N=x.maxX,A=x.maxY,R=[{x:S,y:T},{x:N,y:T},{x:N,y:A},{x:S,y:A}];return R.map(function(I,_){return zi(CR,Kl({index:_},I,{model:c,graphModel:i}))})},v.prototype.getGroupSolid=function(){var u=this.props.model,c=u.x,i=u.y,l=u.width,s=u.height,y=u.getResizeOutlineStyle();return zi(pd,Kl({fill:"none"},y,{x:c,y:i,width:l,height:s}))},v.prototype.render=function(){return zi("g",{className:"lf-resize-control"},this.getGroupSolid(),this.getResizeControl())},v}(qo),Eb=globalThis&&globalThis.__extends||function(){var m=function(v,u){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,i){c.__proto__=i}||function(c,i){for(var l in i)i.hasOwnProperty(l)&&(c[l]=i[l])},m(v,u)};return function(v,u){m(v,u);function c(){this.constructor=v}v.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}}(),IR=function(m){Eb(v,m);function v(u,c){var i=m.call(this,u,c)||this,l=i.properties.nodeSize;return l&&(i.width=l.width,i.height=l.height),i}return v.prototype.initNodeData=function(u){m.prototype.initNodeData.call(this,u),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3},v.prototype.getOutlineStyle=function(){var u=m.prototype.getOutlineStyle.call(this),c=this.graphModel.editConfigModel.isSilentMode;return c||(u.stroke="none",u.hover&&(u.hover.stroke="none")),u},v.prototype.getResizeOutlineStyle=function(){return{fill:"none",stroke:"transparent",strokeWidth:1,strokeDasharray:"3,3"}},v.prototype.getControlPointStyle=function(){return{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},v.prototype.resize=function(u,c){console.log(u,c)},v.prototype.enableProportionResize=function(u){if(u===void 0&&(u=!0),u){var c={widthPCT:100,hightPCT:100},i={basisWidth:this.width,basisHeight:this.height},l={maxScaleLimit:Math.min(this.maxWidth/this.width*100,this.maxHeight/this.height*100),minScaleLimit:Math.max(this.minWidth/this.width*100,this.minHeight/this.height*100)};this.PCTResizeInfo={ResizePCT:c,ResizeBasis:i,ScaleLimit:l}}else delete this.PCTResizeInfo},v}(Je.exports.RectNodeModel),_R=function(m){Eb(v,m);function v(){return m!==null&&m.apply(this,arguments)||this}return v.prototype.getControlGroup=function(){var u=this.props,c=u.model,i=u.graphModel;return Je.exports.h(es,{model:c,graphModel:i})},v.prototype.getResizeShape=function(){return m.prototype.getShape.call(this)},v.prototype.getShape=function(){var u=this.props,c=u.model.isSelected,i=u.graphModel.editConfigModel.isSilentMode;return Je.exports.h("g",null,this.getResizeShape(),c&&!i?this.getControlGroup():"")},v}(Je.exports.RectNode),Sb={type:"rect",view:_R,model:IR},xb=globalThis&&globalThis.__extends||function(){var m=function(v,u){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,i){c.__proto__=i}||function(c,i){for(var l in i)i.hasOwnProperty(l)&&(c[l]=i[l])},m(v,u)};return function(v,u){m(v,u);function c(){this.constructor=v}v.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}}();(function(m){xb(v,m);function v(u,c){var i=m.call(this,u,c)||this,l=i.properties.nodeSize;return l&&(i.rx=l.rx,i.ry=l.ry),i}return v.prototype.initNodeData=function(u){m.prototype.initNodeData.call(this,u),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3},v.prototype.getOutlineStyle=function(){var u=m.prototype.getOutlineStyle.call(this),c=this.graphModel.editConfigModel.isSilentMode;return c||(u.stroke="none",u.hover&&(u.hover.stroke="none")),u},v.prototype.getResizeOutlineStyle=function(){return{stroke:"#000000",strokeWidth:1,strokeDasharray:"3,3"}},v.prototype.getControlPointStyle=function(){return{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},v.prototype.enableProportionResize=function(u){if(u===void 0&&(u=!0),u){var c={widthPCT:100,hightPCT:100},i={basisWidth:this.rx,basisHeight:this.ry},l={maxScaleLimit:Math.min(this.maxWidth/(this.rx*2)*100,this.maxHeight/(this.ry*2)*100),minScaleLimit:Math.max(this.minWidth/(this.rx*2)*100,this.minHeight/(this.ry*2)*100)};this.PCTResizeInfo={ResizePCT:c,ResizeBasis:i,ScaleLimit:l}}else delete this.PCTResizeInfo},v})(Je.exports.EllipseNodeModel);(function(m){xb(v,m);function v(){return m!==null&&m.apply(this,arguments)||this}return v.prototype.getControlGroup=function(){var u=this.props,c=u.model,i=u.graphModel;return Je.exports.h(es,{model:c,graphModel:i})},v.prototype.getResizeShape=function(){return m.prototype.getShape.call(this)},v.prototype.getShape=function(){var u=this.props,c=u.model,i=u.graphModel.editConfigModel.isSilentMode;return Je.exports.h("g",null,this.getResizeShape(),c.isSelected&&!i?this.getControlGroup():"")},v})(Je.exports.EllipseNode);var ud=globalThis&&globalThis.__assign||function(){return ud=Object.assign||function(m){for(var v,u=1,c=arguments.length;u<c;u++){v=arguments[u];for(var i in v)Object.prototype.hasOwnProperty.call(v,i)&&(m[i]=v[i])}return m},ud.apply(this,arguments)};function BR(m){var v=m.fillOpacity,u=v===void 0?1:v,c=m.strokeWidth,i=c===void 0?1:c,l=m.strokeOpacity,s=l===void 0?1:l,y=m.fill,b=y===void 0?"transparent":y,x=m.stroke,S=x===void 0?"#000":x,T=m.points,N=m.className,A=N===void 0?"lf-basic-shape":N,R={fill:b,fillOpacity:u,strokeWidth:i,stroke:S,strokeOpacity:s,points:"",className:A};return R.points=T.map(function(I){return I.join(",")}).join(" "),Je.exports.h("polygon",ud({},R))}var Pb=globalThis&&globalThis.__extends||function(){var m=function(v,u){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,i){c.__proto__=i}||function(c,i){for(var l in i)i.hasOwnProperty(l)&&(c[l]=i[l])},m(v,u)};return function(v,u){m(v,u);function c(){this.constructor=v}v.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}}(),ld=globalThis&&globalThis.__assign||function(){return ld=Object.assign||function(m){for(var v,u=1,c=arguments.length;u<c;u++){v=arguments[u];for(var i in v)Object.prototype.hasOwnProperty.call(v,i)&&(m[i]=v[i])}return m},ld.apply(this,arguments)};(function(m){Pb(v,m);function v(u,c){var i=m.call(this,u,c)||this,l=i.properties.nodeSize;return l&&(i.rx=l.rx,i.ry=l.ry),i}return v.prototype.initNodeData=function(u){m.prototype.initNodeData.call(this,u),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3,this.gridSize=1},v.prototype.getOutlineStyle=function(){var u=m.prototype.getOutlineStyle.call(this),c=this.graphModel.editConfigModel.isSilentMode;return c||(u.stroke="none",u.hover&&(u.hover.stroke="none")),u},v.prototype.getResizeOutlineStyle=function(){return{stroke:"#000000",strokeWidth:1,strokeDasharray:"3,3"}},v.prototype.getControlPointStyle=function(){return{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},v.prototype.enableProportionResize=function(u){if(u===void 0&&(u=!0),u){var c={widthPCT:100,hightPCT:100},i={basisWidth:this.rx,basisHeight:this.ry},l={maxScaleLimit:Math.min(this.maxWidth/(this.rx*2)*100,this.maxHeight/(this.ry*2)*100),minScaleLimit:Math.max(this.minWidth/(this.rx*2)*100,this.minHeight/(this.ry*2)*100)};this.PCTResizeInfo={ResizePCT:c,ResizeBasis:i,ScaleLimit:l}}else delete this.PCTResizeInfo},v})(Je.exports.DiamondNodeModel);(function(m){Pb(v,m);function v(){return m!==null&&m.apply(this,arguments)||this}return v.prototype.getControlGroup=function(){var u=this.props,c=u.model,i=u.graphModel;return Je.exports.h(es,{model:c,graphModel:i})},v.prototype.getResizeShape=function(){var u=this.props.model,c=u.points,i=u.getNodeStyle();return Je.exports.h("g",null,Je.exports.h(BR,ld({},i,{points:c})))},v.prototype.getShape=function(){var u=this.props,c=u.model.isSelected,i=u.graphModel.editConfigModel.isSilentMode;return Je.exports.h("g",null,this.getResizeShape(),c&&!i?this.getControlGroup():"")},v})(Je.exports.DiamondNode);var Tb=globalThis&&globalThis.__extends||function(){var m=function(v,u){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,i){c.__proto__=i}||function(c,i){for(var l in i)i.hasOwnProperty(l)&&(c[l]=i[l])},m(v,u)};return function(v,u){m(v,u);function c(){this.constructor=v}v.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}}();(function(m){Tb(v,m);function v(u,c){var i=m.call(this,u,c)||this,l=i.properties.nodeSize;return l&&(i.width=l.width,i.height=l.height),i}return v.prototype.initNodeData=function(u){m.prototype.initNodeData.call(this,u),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3},v.prototype.getOutlineStyle=function(){var u=m.prototype.getOutlineStyle.call(this),c=this.graphModel.editConfigModel.isSilentMode;return c||(u.stroke="none",u.hover&&(u.hover.stroke="none")),u},v.prototype.getResizeOutlineStyle=function(){return{stroke:"#000000",strokeWidth:1,strokeDasharray:"3,3"}},v.prototype.getControlPointStyle=function(){return{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},v.prototype.enableProportionResize=function(u){if(u===void 0&&(u=!0),u){var c={widthPCT:100,hightPCT:100},i={basisWidth:this.width,basisHeight:this.height},l={maxScaleLimit:Math.min(this.maxWidth/this.width*100,this.maxHeight/this.height*100),minScaleLimit:Math.max(this.minWidth/this.width*100,this.minHeight/this.height*100)};this.PCTResizeInfo={ResizePCT:c,ResizeBasis:i,ScaleLimit:l}}else delete this.PCTResizeInfo},v})(Je.exports.HtmlNodeModel);(function(m){Tb(v,m);function v(){return m!==null&&m.apply(this,arguments)||this}return v.prototype.getControlGroup=function(){var u=this.props,c=u.model,i=u.graphModel;return Je.exports.h(es,{model:c,graphModel:i})},v.prototype.getResizeShape=function(){return m.prototype.getShape.call(this)},v.prototype.getShape=function(){var u=this.props,c=u.model.isSelected,i=u.graphModel.editConfigModel.isSilentMode;return Je.exports.h("g",null,this.getResizeShape(),c&&!i?this.getControlGroup():"")},v})(Je.exports.HtmlNode);var wb=globalThis&&globalThis.__extends||function(){var m=function(v,u){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,i){c.__proto__=i}||function(c,i){for(var l in i)i.hasOwnProperty(l)&&(c[l]=i[l])},m(v,u)};return function(v,u){m(v,u);function c(){this.constructor=v}v.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}}(),Zl=globalThis&&globalThis.__assign||function(){return Zl=Object.assign||function(m){for(var v,u=1,c=arguments.length;u<c;u++){v=arguments[u];for(var i in v)Object.prototype.hasOwnProperty.call(v,i)&&(m[i]=v[i])}return m},Zl.apply(this,arguments)},LR=globalThis&&globalThis.__read||function(m,v){var u=typeof Symbol=="function"&&m[Symbol.iterator];if(!u)return m;var c=u.call(m),i,l=[],s;try{for(;(v===void 0||v-- >0)&&!(i=c.next()).done;)l.push(i.value)}catch(y){s={error:y}}finally{try{i&&!i.done&&(u=c.return)&&u.call(c)}finally{if(s)throw s.error}}return l},Um=globalThis&&globalThis.__spread||function(){for(var m=[],v=0;v<arguments.length;v++)m=m.concat(LR(arguments[v]));return m},Xm=500,Ym=300,zR=-1e4;(function(m){wb(v,m);function v(){var u=m!==null&&m.apply(this,arguments)||this;return u.isGroup=!0,u.unfoldedWidth=Xm,u.unfoldedHight=Ym,u}return v.prototype.initNodeData=function(u){var c=this;m.prototype.initNodeData.call(this,u);var i=[];Array.isArray(u.children)&&(i=u.children),this.children=new Set(i),this.width=Xm,this.height=Ym,this.foldedWidth=80,this.foldedHeight=60,this.zIndex=zR,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(){c.isFolded&&c.foldGroup(c.isFolded)})},v.prototype.getResizeOutlineStyle=function(){var u=m.prototype.getResizeOutlineStyle.call(this);return u.stroke="none",u},v.prototype.foldGroup=function(u){var c=this;this.setProperty("isFolded",u),this.isFolded=u,u?(this.x=this.x-this.width/2+this.foldedWidth/2,this.y=this.y-this.height/2+this.foldedHeight/2,this.unfoldedWidth=this.width,this.unfoldedHight=this.height,this.width=this.foldedWidth,this.height=this.foldedHeight):(this.width=this.unfoldedWidth,this.height=this.unfoldedHight,this.x=this.x+this.width/2-this.foldedWidth/2,this.y=this.y+this.height/2-this.foldedHeight/2);var i=this.incoming.edges.concat(this.outgoing.edges);this.children.forEach(function(l){var s=c.graphModel.getElement(l);s.isGroup&&!s.isFolded&&s.foldGroup(u),s.visible=!u,i=i.concat(s.incoming.edges.concat(s.outgoing.edges))}),this.foldEdge(u,i)},v.prototype.getAnchorStyle=function(u){var c=m.prototype.getAnchorStyle.call(this,u);return c.stroke="transparent",c.fill="transparent",c.hover.fill="transparent",c.hover.stroke="transparent",c},v.prototype.foldEdge=function(u,c){var i=this;c.forEach(function(l,s){var y=l.id,b=l.sourceNodeId,x=l.targetNodeId,S=l.startPoint,T=l.endPoint,N=l.type,A=l.properties,R=l.text,I={id:y+"__"+s,sourceNodeId:b,targetNodeId:x,startPoint:S,endPoint:T,type:N,properties:A,text:R==null?void 0:R.value};l.virtual&&i.graphModel.deleteEdgeById(l.id);var _=i.graphModel.group.getNodeGroup(x);_||(_=i.graphModel.getNodeModelById(x));var F=i.graphModel.group.getNodeGroup(b);F||(F=i.graphModel.getNodeModelById(b)),u&&l.visible!==!1&&(i.children.has(b)||i.id===b?(I.startPoint=void 0,I.sourceNodeId=i.id):(I.endPoint=void 0,I.targetNodeId=i.id),(_.id!==i.id||F.id!==i.id)&&i.createVirtualEdge(I),l.visible=!1),!u&&l.visible===!1&&(_&&_.isGroup&&_.isFolded?(I.targetNodeId=_.id,I.endPoint=void 0,i.createVirtualEdge(I)):F&&F.isGroup&&F.isFolded?(I.sourceNodeId=F.id,I.startPoint=void 0,i.createVirtualEdge(I)):l.visible=!0)})},v.prototype.createVirtualEdge=function(u){u.pointsList=void 0;var c=this.graphModel.addEdge(u);c.virtual=!0,c.text.editable=!1,c.isFoldedEdge=!0},v.prototype.isInRange=function(u){var c=u.x1,i=u.y1,l=u.x2,s=u.y2;return c>=this.x-this.width/2&&l<=this.x+this.width/2&&i>=this.y-this.height/2&&s<=this.y+this.height/2},v.prototype.isAllowMoveTo=function(u){var c=u.x1,i=u.y1,l=u.x2,s=u.y2;return{x:c>=this.x-this.width/2&&l<=this.x+this.width/2,y:i>=this.y-this.height/2&&s<=this.y+this.height/2}},v.prototype.setAllowAppendChild=function(u){this.setProperty("groupAddable",u)},v.prototype.addChild=function(u){this.children.add(u)},v.prototype.removeChild=function(u){this.children.delete(u)},v.prototype.getAddableOutlineStyle=function(){return{stroke:"#FEB663",strokeWidth:2,strokeDasharray:"4 4",fill:"transparent"}},v.prototype.getData=function(){var u=m.prototype.getData.call(this);u.children=Um(this.children);var c=u.properties;return delete c.groupAddable,delete c.isFolded,u},v.prototype.getHistoryData=function(){var u=m.prototype.getData.call(this);u.children=Um(this.children),u.isGroup=!0;var c=u.properties;return delete c.groupAddable,c.isFolded&&(u.x=u.x+this.unfoldedWidth/2-this.foldedWidth/2,u.y=u.y+this.unfoldedHight/2-this.foldedHeight/2),u},v.prototype.isAllowAppendIn=function(u){return!0},v.prototype.toBack=function(){this.zIndex--},v})(Sb.model);(function(m){wb(v,m);function v(){return m!==null&&m.apply(this,arguments)||this}return v.prototype.getControlGroup=function(){var u=this.props.model,c=u.resizable,i=u.properties;return c&&!i.isFolded?m.prototype.getControlGroup.call(this):null},v.prototype.getAddableShape=function(){var u=this.props.model,c=u.width,i=u.height,l=u.x,s=u.y,y=u.radius,b=u.properties;if(!b.groupAddable)return null;var x=this.props.model.getNodeStyle().strokeWidth,S=this.props.model.getAddableOutlineStyle(),T=c+x+8,N=i+x+8;return Je.exports.h("rect",Zl(Zl({},S),{width:T,height:N,x:l-T/2,y:s-N/2,rx:y,ry:y}))},v.prototype.getFoldIcon=function(){var u=this.props.model,c=u.x-u.width/2+5,i=u.y-u.height/2+5;if(!u.foldable)return null;var l=Je.exports.h("path",{fill:"none",stroke:"#818281",strokeWidth:2,"pointer-events":"none",d:u.properties.isFolded?"M "+(c+3)+","+(i+6)+" "+(c+11)+","+(i+6)+" M"+(c+7)+","+(i+2)+" "+(c+7)+","+(i+10):"M "+(c+3)+","+(i+6)+" "+(c+11)+","+(i+6)+" "});return Je.exports.h("g",{},[Je.exports.h("rect",{height:12,width:14,rx:2,ry:2,strokeWidth:1,fill:"#F4F5F6",stroke:"#CECECE",cursor:"pointer",x:u.x-u.width/2+5,y:u.y-u.height/2+5,onClick:function(){u.foldGroup(!u.properties.isFolded)}}),l])},v.prototype.getResizeShape=function(){return Je.exports.h("g",{},[this.getAddableShape(),m.prototype.getResizeShape.call(this),this.getFoldIcon()])},v})(Sb.view);var FR=globalThis&&globalThis.__read||function(m,v){var u=typeof Symbol=="function"&&m[Symbol.iterator];if(!u)return m;var c=u.call(m),i,l=[],s;try{for(;(v===void 0||v-- >0)&&!(i=c.next()).done;)l.push(i.value)}catch(y){s={error:y}}finally{try{i&&!i.done&&(u=c.return)&&u.call(c)}finally{if(s)throw s.error}}return l};globalThis&&globalThis.__spread;var Wm=globalThis&&globalThis.__assign||function(){return Wm=Object.assign||function(m){for(var v,u=1,c=arguments.length;u<c;u++){v=arguments[u];for(var i in v)Object.prototype.hasOwnProperty.call(v,i)&&(m[i]=v[i])}return m},Wm.apply(this,arguments)},Vm=globalThis&&globalThis.__assign||function(){return Vm=Object.assign||function(m){for(var v,u=1,c=arguments.length;u<c;u++){v=arguments[u];for(var i in v)Object.prototype.hasOwnProperty.call(v,i)&&(m[i]=v[i])}return m},Vm.apply(this,arguments)},HR=globalThis&&globalThis.__read||function(m,v){var u=typeof Symbol=="function"&&m[Symbol.iterator];if(!u)return m;var c=u.call(m),i,l=[],s;try{for(;(v===void 0||v-- >0)&&!(i=c.next()).done;)l.push(i.value)}catch(y){s={error:y}}finally{try{i&&!i.done&&(u=c.return)&&u.call(c)}finally{if(s)throw s.error}}return l};globalThis&&globalThis.__spread;const GR={class:"control-container"},kR=["title","onMouseenter"],$R=["disabled","onClick"],UR=Ql({__name:"Control",props:{lf:{type:null,required:!0,default:null},catTurboData:{type:Boolean,required:!1}},emits:["catData"],setup(m,{emit:v}){const u=m,c=Om("controlButton3",null),i=Om("controlButton4",null);let l=fo(-1),s=fo([{icon:"icon-zoom-out-hs",text:"\u7F29\u5C0F",size:"18",disabled:!1},{icon:"icon-enlarge-hs",text:"\u653E\u5927",size:"18",disabled:!1},{icon:"icon-full-screen-hs",text:"\u9002\u5E94",size:"15",disabled:!1},{icon:"icon-previous-hs",text:"\u4E0A\u4E00\u6B65",size:"15",disabled:!0},{icon:"icon-next-step-hs",text:"\u4E0B\u4E00\u6B65",size:"17",disabled:!0},{icon:"icon-download-hs",text:"\u4E0B\u8F7D\u56FE\u7247",size:"17",disabled:!1},{icon:"icon-watch-hs",text:"\u67E5\u770B\u6570\u636E",size:"17",disabled:!1}]);const y=(x,S)=>{["zoom","zoom","resetZoom","undo","redo","getSnapshot"].forEach((T,N)=>{let A=u.lf;S===1&&A.zoom(!0),S===6&&v("catData"),S===N&&A[T]()})},b=x=>{l.value=x};return Zm(()=>{u.lf.on("history:change",({data:{undoAble:x,redoAble:S}})=>{zt(s)[3].disabled=zt(c).disabled=!x,zt(s)[4].disabled=zt(i).disabled=!S})}),(x,S)=>{const T=Bi("el-tooltip");return nn(),co("div",GR,[Un(" \u529F\u80FD\u6309\u94AE "),on("ul",null,[(nn(!0),co(rd,null,Jm(zt(s),(N,A)=>(nn(),co("li",{key:A,title:N.text,class:"dark:color-bg_color",onMouseenter:Em(R=>b(A),["prevent"]),onMouseleave:S[0]||(S[0]=Em(R=>Qm(l)?l.value=-1:l=-1,["prevent"]))},[Ko(T,{content:N.text,visible:zt(l)===A,placement:"right"},{default:Zo(()=>[on("button",{ref_for:!0,ref:"controlButton"+A,disabled:N.disabled,style:Sm({cursor:N.disabled===!1?"pointer":"not-allowed",color:N.disabled===!1?"":"#00000040"}),onClick:R=>y(N,A)},[on("span",{class:qm("iconfont "+N.icon),style:Sm({fontSize:`${N.size}px`})},null,6)],12,$R)]),_:2},1032,["content","visible"])],40,kR))),128))])])}}});var XR=Jl(UR,[["__scopeId","data-v-518de540"],["__file","D:/work/rep-v3/report-v3/src/components/ReFlowChart/src/Control.vue"]]);const YR={class:"node-panel"},WR=["onMousedown"],VR={key:0,class:"shape"},KR={class:"node-label"},ZR=Ql({__name:"NodePanel",props:{lf:{type:null,required:!0,default:null},nodeList:{type:Array,required:!0,default:null}},setup(m){const v=m;let u=fo({a:"efrwe",b:"wewe"});const c=i=>{v.lf.dnd.startDrag({type:i.type,properties:zt(u)})};return(i,l)=>(nn(),co(rd,null,[Un(" \u5DE6\u4FA7bpmn\u5143\u7D20\u9009\u62E9\u5668 "),on("div",YR,[(nn(!0),co(rd,null,Jm(v.nodeList,s=>(nn(),co("div",{class:"node-item dark:color-bg_color",key:s.text,onMousedown:y=>c(s)},[on("div",{class:qm(["node-item-icon",s.class])},[s.type==="user"||s.type==="time"?(nn(),co("div",VR)):Un("v-if",!0)],2),on("span",KR,CC(s.text),1)],40,WR))),128))])],2112))}});var JR=Jl(ZR,[["__scopeId","data-v-7322cbe5"],["__file","D:/work/rep-v3/report-v3/src/components/ReFlowChart/src/NodePanel.vue"]]),Mb={exports:{}},QR=RC(IC);(function(m,v){(function(u,c){m.exports=c(QR)})(_C,function(u){return function(){var c={789:function(y){y.exports=u}},i={};function l(y){var b=i[y];if(b!==void 0)return b.exports;var x=i[y]={exports:{}};return c[y](x,x.exports,l),x.exports}l.d=function(y,b){for(var x in b)l.o(b,x)&&!l.o(y,x)&&Object.defineProperty(y,x,{enumerable:!0,get:b[x]})},l.o=function(y,b){return Object.prototype.hasOwnProperty.call(y,b)},l.r=function(y){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(y,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(y,"__esModule",{value:!0})};var s={};return function(){function y(P,w){(w==null||w>P.length)&&(w=P.length);for(var D=0,k=new Array(w);D<w;D++)k[D]=P[D];return k}function b(P,w){if(P){if(typeof P=="string")return y(P,w);var D=Object.prototype.toString.call(P).slice(8,-1);return D==="Object"&&P.constructor&&(D=P.constructor.name),D==="Map"||D==="Set"?Array.from(P):D==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(D)?y(P,w):void 0}}function x(P){return function(w){if(Array.isArray(w))return y(w)}(P)||function(w){if(typeof Symbol!="undefined"&&w[Symbol.iterator]!=null||w["@@iterator"]!=null)return Array.from(w)}(P)||b(P)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function S(P,w,D){return w in P?Object.defineProperty(P,w,{value:D,enumerable:!0,configurable:!0,writable:!0}):P[w]=D,P}l.r(s),l.d(s,{default:function(){return X}});var T=l(789),N=(0,T.defineComponent)({props:{data:{required:!0,type:String},onClick:Function},render:function(){var P=this.data,w=this.onClick;return(0,T.createVNode)("span",{class:"vjs-tree-brackets",onClick:w},[P])}}),A=(0,T.defineComponent)({emits:["change","update:modelValue"],props:{checked:{type:Boolean,default:!1},isMultiple:Boolean,onChange:Function},setup:function(P,w){var D=w.emit;return{uiType:(0,T.computed)(function(){return P.isMultiple?"checkbox":"radio"}),model:(0,T.computed)({get:function(){return P.checked},set:function(k){return D("update:modelValue",k)}})}},render:function(){var P=this.uiType,w=this.model,D=this.$emit;return(0,T.createVNode)("label",{class:["vjs-check-controller",w?"is-checked":""],onClick:function(k){return k.stopPropagation()}},[(0,T.createVNode)("span",{class:"vjs-check-controller-inner is-".concat(P)},null),(0,T.createVNode)("input",{checked:w,class:"vjs-check-controller-original is-".concat(P),type:P,onChange:function(){return D("change",w)}},null)])}}),R=(0,T.defineComponent)({props:{nodeType:{required:!0,type:String},onClick:Function},render:function(){var P=this.nodeType,w=this.onClick,D=P==="objectStart"||P==="arrayStart";return D||P==="objectCollapsed"||P==="arrayCollapsed"?(0,T.createVNode)("span",{class:"vjs-carets vjs-carets-".concat(D?"open":"close"),onClick:w},[(0,T.createVNode)("svg",{viewBox:"0 0 1024 1024",focusable:"false","data-icon":"caret-down",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},[(0,T.createVNode)("path",{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"},null)])]):null}});function I(P){return I=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(w){return typeof w}:function(w){return w&&typeof Symbol=="function"&&w.constructor===Symbol&&w!==Symbol.prototype?"symbol":typeof w},I(P)}function _(P){return Object.prototype.toString.call(P).slice(8,-1).toLowerCase()}function F(P){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"root",D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,k=arguments.length>3?arguments[3]:void 0,K=k||{},se=K.key,Pe=K.index,ve=K.type,me=ve===void 0?"content":ve,be=K.showComma,Oe=be!==void 0&&be,we=K.length,ze=we===void 0?1:we,Ye=_(P);if(Ye==="array"){var Le=Y(P.map(function(He,G,L){return F(He,"".concat(w,"[").concat(G,"]"),D+1,{index:G,showComma:G!==L.length-1,length:ze,type:me})}));return[F("[",w,D,{showComma:!1,key:se,length:P.length,type:"arrayStart"})[0]].concat(Le,F("]",w,D,{showComma:Oe,length:P.length,type:"arrayEnd"})[0])}if(Ye==="object"){var Se=Object.keys(P),Fe=Y(Se.map(function(He,G,L){return F(P[He],/^[a-zA-Z_]\w*$/.test(He)?"".concat(w,".").concat(He):"".concat(w,'["').concat(He,'"]'),D+1,{key:He,showComma:G!==L.length-1,length:ze,type:me})}));return[F("{",w,D,{showComma:!1,key:se,index:Pe,length:Se.length,type:"objectStart"})[0]].concat(Fe,F("}",w,D,{showComma:Oe,length:Se.length,type:"objectEnd"})[0])}return[{content:P,level:D,key:se,index:Pe,path:w,showComma:Oe,length:ze,type:me}]}function Y(P){if(typeof Array.prototype.flat=="function")return P.flat();for(var w=x(P),D=[];w.length;){var k=w.shift();Array.isArray(k)?w.unshift.apply(w,x(k)):D.push(k)}return D}function V(P){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new WeakMap;if(P==null)return P;if(P instanceof Date)return new Date(P);if(P instanceof RegExp)return new RegExp(P);if(I(P)!=="object")return P;if(w.get(P))return w.get(P);if(Array.isArray(P)){var D=P.map(function(se){return V(se,w)});return w.set(P,D),D}var k={};for(var K in P)k[K]=V(P[K],w);return w.set(P,k),k}function ce(P,w){var D=Object.keys(P);if(Object.getOwnPropertySymbols){var k=Object.getOwnPropertySymbols(P);w&&(k=k.filter(function(K){return Object.getOwnPropertyDescriptor(P,K).enumerable})),D.push.apply(D,k)}return D}function ue(P){for(var w=1;w<arguments.length;w++){var D=arguments[w]!=null?arguments[w]:{};w%2?ce(Object(D),!0).forEach(function(k){S(P,k,D[k])}):Object.getOwnPropertyDescriptors?Object.defineProperties(P,Object.getOwnPropertyDescriptors(D)):ce(Object(D)).forEach(function(k){Object.defineProperty(P,k,Object.getOwnPropertyDescriptor(D,k))})}return P}var te={showLength:{type:Boolean,default:!1},showDoubleQuotes:{type:Boolean,default:!0},renderNodeKey:Function,renderNodeValue:Function,selectableType:String,showSelectController:{type:Boolean,default:!1},showLine:{type:Boolean,default:!0},showLineNumber:{type:Boolean,default:!1},selectOnClickNode:{type:Boolean,default:!0},nodeSelectable:{type:Function,default:function(){return!0}},highlightSelectedNode:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!1},showKeyValueSpace:{type:Boolean,default:!0},editable:{type:Boolean,default:!1},editableTrigger:{type:String,default:"click"},onNodeClick:{type:Function},onBracketsClick:{type:Function},onIconClick:{type:Function},onValueChange:{type:Function}},q=(0,T.defineComponent)({name:"TreeNode",props:ue(ue({},te),{},{node:{type:Object,required:!0},collapsed:Boolean,checked:Boolean,style:Object,onSelectedChange:{type:Function}}),emits:["nodeClick","bracketsClick","iconClick","selectedChange","valueChange"],setup:function(P,w){var D=w.emit,k=(0,T.computed)(function(){return _(P.node.content)}),K=(0,T.computed)(function(){return"vjs-value vjs-value-".concat(k.value)}),se=(0,T.computed)(function(){return P.showDoubleQuotes?'"'.concat(P.node.key,'"'):P.node.key}),Pe=(0,T.computed)(function(){return P.selectableType==="multiple"}),ve=(0,T.computed)(function(){return P.selectableType==="single"}),me=(0,T.computed)(function(){return P.nodeSelectable(P.node)&&(Pe.value||ve.value)}),be=(0,T.reactive)({editing:!1}),Oe=function(G){var L,W,fe=(W=(L=G.target)===null||L===void 0?void 0:L.value)==="null"?null:W==="undefined"?void 0:W==="true"||W!=="false"&&(W[0]+W[W.length-1]==='""'||W[0]+W[W.length-1]==="''"?W.slice(1,-1):typeof Number(W)=="number"&&!isNaN(Number(W))||W==="NaN"?Number(W):W);D("valueChange",fe,P.node.path)},we=(0,T.computed)(function(){var G,L=(G=P.node)===null||G===void 0?void 0:G.content;return L===null?L="null":L===void 0&&(L="undefined"),k.value==="string"?'"'.concat(L,'"'):L+""}),ze=function(){var G=P.renderNodeValue;return G?G({node:P.node,defaultValue:we.value}):we.value},Ye=function(){D("bracketsClick",!P.collapsed,P.node.path)},Le=function(){D("iconClick",!P.collapsed,P.node.path)},Se=function(){D("selectedChange",P.node)},Fe=function(){D("nodeClick",P.node),me.value&&P.selectOnClickNode&&D("selectedChange",P.node)},He=function(G){if(P.editable&&!be.editing){be.editing=!0;var L=function W(fe){var ge;fe.target!==G.target&&((ge=fe.target)===null||ge===void 0?void 0:ge.parentElement)!==G.target&&(be.editing=!1,document.removeEventListener("click",W))};document.removeEventListener("click",L),document.addEventListener("click",L)}};return function(){var G,L=P.node;return(0,T.createVNode)("div",{class:{"vjs-tree-node":!0,"has-selector":P.showSelectController,"has-carets":P.showIcon,"is-highlight":P.highlightSelectedNode&&P.checked},onClick:Fe,style:P.style},[P.showLineNumber&&(0,T.createVNode)("span",{class:"vjs-node-index"},[L.id+1]),P.showSelectController&&me.value&&L.type!=="objectEnd"&&L.type!=="arrayEnd"&&(0,T.createVNode)(A,{isMultiple:Pe.value,checked:P.checked,onChange:Se},null),(0,T.createVNode)("div",{class:"vjs-indent"},[Array.from(Array(L.level)).map(function(W,fe){return(0,T.createVNode)("div",{key:fe,class:{"vjs-indent-unit":!0,"has-line":P.showLine}},null)}),P.showIcon&&(0,T.createVNode)(R,{nodeType:L.type,onClick:Le},null)]),L.key&&(0,T.createVNode)("span",{class:"vjs-key"},[(G=P.renderNodeKey,G?G({node:P.node,defaultKey:se.value||""}):se.value),(0,T.createVNode)("span",{class:"vjs-colon"},[":".concat(P.showKeyValueSpace?" ":"")])]),(0,T.createVNode)("span",null,[L.type!=="content"&&L.content?(0,T.createVNode)(N,{data:L.content.toString(),onClick:Ye},null):(0,T.createVNode)("span",{class:K.value,onClick:!P.editable||P.editableTrigger&&P.editableTrigger!=="click"?void 0:He,onDblclick:P.editable&&P.editableTrigger==="dblclick"?He:void 0},[P.editable&&be.editing?(0,T.createVNode)("input",{value:we.value,onChange:Oe,style:{padding:"3px 8px",border:"1px solid #eee",boxShadow:"none",boxSizing:"border-box",borderRadius:5,fontFamily:"inherit"}},null):ze()]),L.showComma&&(0,T.createVNode)("span",null,[","]),P.showLength&&P.collapsed&&(0,T.createVNode)("span",{class:"vjs-comment"},[(0,T.createTextVNode)(" // "),L.length,(0,T.createTextVNode)(" items ")])])])}}});function ee(P,w){var D=Object.keys(P);if(Object.getOwnPropertySymbols){var k=Object.getOwnPropertySymbols(P);w&&(k=k.filter(function(K){return Object.getOwnPropertyDescriptor(P,K).enumerable})),D.push.apply(D,k)}return D}function B(P){for(var w=1;w<arguments.length;w++){var D=arguments[w]!=null?arguments[w]:{};w%2?ee(Object(D),!0).forEach(function(k){S(P,k,D[k])}):Object.getOwnPropertyDescriptors?Object.defineProperties(P,Object.getOwnPropertyDescriptors(D)):ee(Object(D)).forEach(function(k){Object.defineProperty(P,k,Object.getOwnPropertyDescriptor(D,k))})}return P}var X=(0,T.defineComponent)({name:"Tree",props:B(B({},te),{},{data:{type:[String,Number,Boolean,Array,Object],default:null},deep:{type:Number,default:1/0},pathCollapsible:{type:Function,default:function(){return!1}},rootPath:{type:String,default:"root"},virtual:{type:Boolean,default:!1},height:{type:Number,default:400},itemHeight:{type:Number,default:20},selectedValue:{type:[String,Array],default:function(){return""}},collapsedOnClickBrackets:{type:Boolean,default:!0},style:Object,onSelectedChange:{type:Function}}),slots:["renderNodeKey","renderNodeValue"],emits:["nodeClick","bracketsClick","iconClick","selectedChange","update:selectedValue","update:data"],setup:function(P,w){var D=w.emit,k=w.slots,K=(0,T.ref)(),se=(0,T.computed)(function(){return F(P.data,P.rootPath)}),Pe=function(L){return se.value.reduce(function(W,fe){var ge,de=fe.level>=L,Ie=(ge=P.pathCollapsible)===null||ge===void 0?void 0:ge.call(P,fe);return fe.type!=="objectStart"&&fe.type!=="arrayStart"||!de&&!Ie?W:B(B({},W),{},S({},fe.path,1))},{})},ve=(0,T.reactive)({translateY:0,visibleData:null,hiddenPaths:Pe(P.deep)}),me=(0,T.computed)(function(){for(var L=null,W=[],fe=se.value.length,ge=0;ge<fe;ge++){var de=B(B({},se.value[ge]),{},{id:ge}),Ie=ve.hiddenPaths[de.path];if(L&&L.path===de.path){var Ve=L.type==="objectStart",We=B(B(B({},de),L),{},{showComma:de.showComma,content:Ve?"{...}":"[...]",type:Ve?"objectCollapsed":"arrayCollapsed"});L=null,W.push(We)}else{if(Ie&&!L){L=de;continue}if(L)continue;W.push(de)}}return W}),be=(0,T.computed)(function(){var L=P.selectedValue;return L&&P.selectableType==="multiple"&&Array.isArray(L)?L:[L]}),Oe=(0,T.computed)(function(){return!P.selectableType||P.selectOnClickNode||P.showSelectController?"":"When selectableType is not null, selectOnClickNode and showSelectController cannot be false at the same time, because this will cause the selection to fail."}),we=function(){var L=me.value;if(P.virtual){var W,fe=P.height/P.itemHeight,ge=((W=K.value)===null||W===void 0?void 0:W.scrollTop)||0,de=Math.floor(ge/P.itemHeight),Ie=de<0?0:de+fe>L.length?L.length-fe:de;Ie<0&&(Ie=0);var Ve=Ie+fe;ve.translateY=Ie*P.itemHeight,ve.visibleData=L.filter(function(We,qe){return qe>=Ie&&qe<Ve})}else ve.visibleData=L},ze=function(){we()},Ye=function(L){var W,fe,ge=L.path,de=P.selectableType;if(de==="multiple"){var Ie=be.value.findIndex(function(ye){return ye===ge}),Ve=x(be.value);Ie!==-1?Ve.splice(Ie,1):Ve.push(ge),D("update:selectedValue",Ve),D("selectedChange",Ve,x(be.value))}else if(de==="single"&&be.value[0]!==ge){var We=(W=be.value,fe=1,function(ye){if(Array.isArray(ye))return ye}(W)||function(ye,lt){var Ze=ye==null?null:typeof Symbol!="undefined"&&ye[Symbol.iterator]||ye["@@iterator"];if(Ze!=null){var Ge,et,St=[],st=!0,gt=!1;try{for(Ze=Ze.call(ye);!(st=(Ge=Ze.next()).done)&&(St.push(Ge.value),!lt||St.length!==lt);st=!0);}catch(ae){gt=!0,et=ae}finally{try{st||Ze.return==null||Ze.return()}finally{if(gt)throw et}}return St}}(W,fe)||b(W,fe)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}())[0],qe=ge;D("update:selectedValue",qe),D("selectedChange",qe,We)}},Le=function(L){D("nodeClick",L)},Se=function(L,W){if(L)ve.hiddenPaths=B(B({},ve.hiddenPaths),{},S({},W,1));else{var fe=B({},ve.hiddenPaths);delete fe[W],ve.hiddenPaths=fe}},Fe=function(L,W){P.collapsedOnClickBrackets&&Se(L,W),D("bracketsClick",L)},He=function(L,W){Se(L,W),D("iconClick",L)},G=function(L,W){var fe=V(P.data),ge=P.rootPath;new Function("data","val","data".concat(W.slice(ge.length),"=val"))(fe,L),D("update:data",fe)};return(0,T.watchEffect)(function(){Oe.value&&function(L){throw new Error("[VueJSONPretty] ".concat(L))}(Oe.value)}),(0,T.watchEffect)(function(){me.value&&we()}),(0,T.watch)(function(){return P.deep},function(L){L&&(ve.hiddenPaths=Pe(L))}),function(){var L,W,fe=(L=P.renderNodeKey)!==null&&L!==void 0?L:k.renderNodeKey,ge=(W=P.renderNodeValue)!==null&&W!==void 0?W:k.renderNodeValue,de=ve.visibleData&&ve.visibleData.map(function(Ie){return(0,T.createVNode)(q,{key:Ie.id,node:Ie,collapsed:!!ve.hiddenPaths[Ie.path],showDoubleQuotes:P.showDoubleQuotes,showLength:P.showLength,checked:be.value.includes(Ie.path),selectableType:P.selectableType,showLine:P.showLine,showLineNumber:P.showLineNumber,showSelectController:P.showSelectController,selectOnClickNode:P.selectOnClickNode,nodeSelectable:P.nodeSelectable,highlightSelectedNode:P.highlightSelectedNode,editable:P.editable,editableTrigger:P.editableTrigger,showIcon:P.showIcon,showKeyValueSpace:P.showKeyValueSpace,renderNodeKey:fe,renderNodeValue:ge,onNodeClick:Le,onBracketsClick:Fe,onIconClick:He,onSelectedChange:Ye,onValueChange:G,style:P.itemHeight&&P.itemHeight!==20?{lineHeight:"".concat(P.itemHeight,"px")}:{}},null)});return(0,T.createVNode)("div",{ref:K,class:{"vjs-tree":!0,"is-virtual":P.virtual},onScroll:P.virtual?ze:void 0,style:P.showLineNumber?B({paddingLeft:"".concat(12*Number(se.value.length.toString().length),"px")},P.style):P.style},[P.virtual?(0,T.createVNode)("div",{class:"vjs-tree-list",style:{height:"".concat(P.height,"px")}},[(0,T.createVNode)("div",{class:"vjs-tree-list-holder",style:{height:"".concat(me.value.length*P.itemHeight,"px")}},[(0,T.createVNode)("div",{class:"vjs-tree-list-holder-inner",style:{transform:"translateY(".concat(ve.translateY,"px)")}},[de])])]):de])}}})}(),s}()})})(Mb);var qR=Km(Mb.exports);const e2=Ql({__name:"DataDialog",props:{graphData:Object},setup(m){const v=m;return(u,c)=>(nn(),nd(zt(qR),{path:"res",deep:3,showLength:!0,data:v.graphData},null,8,["data"]))}});var t2=Jl(e2,[["__file","D:/work/rep-v3/report-v3/src/components/ReFlowChart/src/DataDialog.vue"]]);const r2=sd(XR),n2=sd(JR),o2=sd(t2),i2={SEQUENCE_FLOW:1,START_EVENT:2,END_EVENT:3,USER_TASK:4,SERVICE_TASK:5,EXCLUSIVE_GATEWAY:6};function a2(m){const{incoming:v,outgoing:u,properties:c,key:i}=m,{text:l,startPoint:s,endPoint:y,pointsList:b,logicFlowType:x}=c,S={id:i,type:x,sourceNodeId:v[0],targetNodeId:u[0],text:l,startPoint:s,endPoint:y,pointsList:b,properties:{}},T=["startPoint","endPoint","pointsList","text","logicFlowType"];return Object.keys(m.properties).forEach(N=>{T.indexOf(N)===-1&&(S.properties[N]=m.properties[N])}),S}function u2(m){const{properties:v,key:u}=m,{x:c,y:i,text:l,logicFlowType:s}=v,y={id:u,type:s,x:c,y:i,text:l,properties:{}},b=["x","y","text","logicFlowType"];return Object.keys(m.properties).forEach(x=>{b.indexOf(x)===-1&&(y.properties[x]=m.properties[x])}),y}function l2(m){const v={nodes:[],edges:[]},u=m.flowElementList;return u&&u.length>0&&u.forEach(c=>{if(c.type===i2.SEQUENCE_FLOW){const i=a2(c);v.edges.push(i)}else{const i=u2(c);v.nodes.push(i)}}),v}const s2=m=>(LC("data-v-77d65f48"),m=m(),zC(),m),f2={class:"card-header"},c2={class:"font-medium"},d2={class:"logic-flow-view"},p2=s2(()=>on("div",{id:"LF-Turbo"},null,-1)),h2={name:"FlowChart"},v2=Ql({...h2,setup(m){let v=fo(null),u=fo(null),c=fo(!1),i=fo({grid:!0,background:{color:"#f7f9ff"},keyboard:{enabled:!0}}),l=GC;function s(){kl.use(cR),kl.use(fR),kl.use(SR);const x=new kl({...zt(i),container:document.querySelector("#LF-Turbo")});v.value=x,zt(v).setDefaultEdgeType("bpmn:sequenceFlow"),y()}function y(){const x=l2(HC);v.value.render(x)}function b(){u.value=zt(v).getGraphData(),c.value=!0}return Zm(()=>{s()}),(x,S)=>{const T=Bi("el-link"),N=Bi("el-scrollbar"),A=Bi("el-dialog"),R=Bi("el-card");return nn(),nd(R,null,{header:Zo(()=>[on("div",f2,[on("span",c2,[xm(" \u6D41\u7A0B\u56FE\u7EC4\u4EF6\uFF0C\u91C7\u7528\u5F00\u6E90\u7684 "),Ko(T,{href:"http://logic-flow.org/",target:"_blank",icon:zt(BC)("set-up"),style:{"font-size":"16px",margin:"0 4px 5px"}},{default:Zo(()=>[xm(" LogicFlow ")]),_:1},8,["icon"])])])]),default:Zo(()=>[on("div",d2,[Un(" \u8F85\u52A9\u5DE5\u5177\u680F "),zt(v)?(nn(),nd(zt(r2),{key:0,class:"demo-control",lf:zt(v),catTurboData:!1,onCatData:b},null,8,["lf"])):Un("v-if",!0),Un(" \u8282\u70B9\u9762\u677F "),Ko(zt(n2),{lf:zt(v),nodeList:zt(l)},null,8,["lf","nodeList"]),Un(" \u753B\u5E03 "),p2,Un(" \u6570\u636E\u67E5\u770B\u9762\u677F "),Ko(A,{customClass:"flow-dialog",title:"\u6570\u636E",modelValue:zt(c),"onUpdate:modelValue":S[0]||(S[0]=I=>Qm(c)?c.value=I:c=I),width:"50%","close-on-click-modal":!1},{default:Zo(()=>[Ko(N,null,{default:Zo(()=>[Ko(zt(o2),{graphData:zt(u)},null,8,["graphData"])]),_:1})]),_:1},8,["modelValue"])])]),_:1})}}});var g2=Jl(v2,[["__scopeId","data-v-77d65f48"],["__file","D:/work/rep-v3/report-v3/src/views/flow-chart/index.vue"]]);export{g2 as default};
|