import{aH as Km,_ as Jl,d as Ql,p as Om,w as fo,x as Zm,l as zt,r as Bi,o as nn,c as co,a as Un,h as on,F as rd,D as Jm,U as Em,aq as Qm,j as Ko,C as Zo,N as Sm,B as qm,L as CC,aI as RC,aJ as IC,az as _C,G as nd,aK as sd,M as xm,J as BC,Q as LC,R as zC}from"./index.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=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;h2&&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;J0;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;peC&&(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;h0&&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);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||"",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||"";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;pe0}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;H0}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;H0?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;HJ?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-1?(this.splice(E,1),!0):!1},get:function(d){var h=this[D];if(h){if(d=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;L0?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;lt2&&(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]>>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;X1?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;kY)throw ce(V);for(K=0;K=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=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=[];G2){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;Lewe)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;beY)throw I(V);for(D=T(q,w),k=0;kee-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;kD;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,"$")!=="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=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=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=[];++R1)for(var ue=1;ue=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=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":".","?":"/","|":"\\"},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;se1){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-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("(?b)","g");return b.exec("b").groups.a!=="b"||"b".replace(b,"$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;KS(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;Pe0;)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;_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"+R+""}},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;R0?(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;t2?n-2:0),a=2;a"}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-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();++rp))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-1&&e%1==0&&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;++j0){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);++n0&&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;te.length)&&(r=e.length);for(var t=0,n=new Array(r);t0&&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),othis.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;++te.length)&&(r=e.length);for(var t=0,n=new Array(r);tg&&aO&&f1&&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=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=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);Oa.minX&&r.xa.minY&&r.yz.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);Cer.x?a=r.x+n/2:t.xr.y?f=r.y+o/2:t.y1?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;r0&&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;re.length)&&(r=e.length);for(var t=0,n=new Array(r);tM)&&(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);Ue0?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;re.length)&&(r=e.length);for(var t=0,n=new Array(r);to/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 nt.maxX||ot.maxY},fT=function(r,t){return tr.maxX?[]:[{x:t,y:r.minY},{x:t,y:r.maxY}]},cT=function(r,t){return tr.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]=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;t2&&(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;fa&&(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=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;Og||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;re.length)&&(r=e.length);for(var t=0,n=new Array(r);t2&&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;O3&&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;Z0&&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;a1&&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;g0&&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=$){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;te.length)&&(r=e.length);for(var t=0,n=new Array(r);te.length)&&(r=e.length);for(var t=0,n=new Array(r);te.length)&&(r=e.length);for(var t=0,n=new Array(r);te.length)&&(r=e.length);for(var t=0,n=new Array(r);t2&&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;re.length)&&(r=e.length);for(var t=0,n=new Array(r);t0){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);t0?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;n2&&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;re.length)&&(r=e.length);for(var t=0,n=new Array(r);ta&&(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];ga&&(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;re.length)&&(r=e.length);for(var t=0,n=new Array(r);ta&&(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];ga&&(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;re.length)&&(r=e.length);for(var t=0,n=new Array(r);tz?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;re.length)&&(r=e.length);for(var t=0,n=new Array(r);t1){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;re.length)&&(r=e.length);for(var t=0,n=new Array(r);te.length)&&(r=e.length);for(var t=0,n=new Array(r);tAe||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;re.length)&&(r=e.length);for(var t=0,n=new Array(r);te.length)&&(r=e.length);for(var t=0,n=new Array(r);t0&&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;re.length)&&(r=e.length);for(var t=0,n=new Array(r);t200)){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);te.length)&&(r=e.length);for(var t=0,n=new Array(r);te.length)&&(r=e.length);for(var t=0,n=new Array(r);t=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;$e.length)&&(r=e.length);for(var t=0,n=new Array(r);t=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;t1,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);te.length)&&(r=e.length);for(var t=0,n=new Array(r);t0&&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;r2&&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;g2&&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.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-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 `;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":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+" `:y="<"+m+s+">"+y+" `:y="<"+m+s+` /> `),y};yr.ObjTree.prototype.array_to_xml=function(m,v){for(var u=[],c=0;c":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)+" `};yr.ObjTree.prototype.xml_escape=function(m){return m.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){l0)&&!(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-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;u0)&&!(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;iw?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;vv&&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;S0?$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=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-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;u0)&&!(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(_.widthce||_.heightue){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.widthue/2||F.heightte/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.widthue/2||F.heightte/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;y0)&&!(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=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;u0)&&!(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","C:/Users/Administrator/Desktop/projects/purchase-vue3/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","C:/Users/Administrator/Desktop/projects/purchase-vue3/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);D1&&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=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;geL.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(nn(),nd(zt(qR),{path:"res",deep:3,showLength:!0,data:v.graphData},null,8,["data"]))}});var t2=Jl(e2,[["__file","C:/Users/Administrator/Desktop/projects/purchase-vue3/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=GC,l=fo({grid:!0,background:{color:"#f7f9ff"},keyboard:{enabled:!0}});function s(){kl.use(cR),kl.use(fR),kl.use(SR);const x=new kl({...zt(l),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(i)},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","C:/Users/Administrator/Desktop/projects/purchase-vue3/src/views/flow-chart/index.vue"]]);export{g2 as default};