You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
92 lines
528 KiB
92 lines
528 KiB
var T1=Object.defineProperty,M1=Object.defineProperties;var N1=Object.getOwnPropertyDescriptors;var uv=Object.getOwnPropertySymbols;var C1=Object.prototype.hasOwnProperty,R1=Object.prototype.propertyIsEnumerable;var sv=(g,d,c)=>d in g?T1(g,d,{enumerable:!0,configurable:!0,writable:!0,value:c}):g[d]=c,Is=(g,d)=>{for(var c in d||(d={}))C1.call(d,c)&&sv(g,c,d[c]);if(uv)for(var c of uv(d))R1.call(d,c)&&sv(g,c,d[c]);return g},cv=(g,d)=>M1(g,N1(d));var Ls=(g,d,c)=>new Promise((f,u)=>{var p=x=>{try{b(c.next(x))}catch(S){u(S)}},y=x=>{try{b(c.throw(x))}catch(S){u(S)}},b=x=>x.done?f(x.value):Promise.resolve(x.value).then(p,y);b((c=c.apply(g,d)).next())});import I1 from"./FlowChartToolbar-ab5b5d8e.js";import{dB as L1,d as z1,r as zs,m as B1,aB as X1,f as F1,O as lv,u as dn,J as fv,P as H1,aT as U1,aU as Bs,o as pv,g as G1,a as W1,i as Y1,j as V1,b as hv,w as $1,x as K1}from"./index-f4658ae7.js";import{createFlowChartContext as q1}from"./useFlowContext-049ea229.js";import{toLogicFlowData as Z1}from"./adpterForTurbo-6e2a8503.js";import{BasicModal as J1}from"./index-5a53dd49.js";import{JsonPreview as Q1}from"./index-df15ffb8.js";import{configDefaultDndPanel as ew}from"./config-80ac3e97.js";import{useModal as tw}from"./useModal-fca6ba59.js";import"./index-0e56c5c3.js";import"./enum-e55d455c.js";import"./BasicModal-649ceacc.js";import"./props-7e339a09.js";import"./useModalDrag-cd2b369a.js";import"./ModalWrapper-3b9dd855.js";import"./useModalContext-bf554b39.js";import"./ModalClose-f74589aa.js";import"./FullscreenOutlined-71d2eabf.js";import"./ModalFooter-308afa08.js";import"./ModalHeader-8905dc99.js";import"./useModalFullScreen-941437b0.js";import"./CodeEditor.vue_vue_type_script_setup_true_lang-60159346.js";import"./CodeMirror.vue_vue_type_script_setup_true_lang-15d121b8.js";import"./htmlmixed-d33492a3.js";import"./typing-fcec92a8.js";import"./JsonPreview.vue_vue_type_script_setup_true_lang-44158f4b.js";var Us={exports:{}};(function(g,d){(function(c,f){g.exports=f()})(window,function(){return function(c){var f={};function u(p){if(f[p])return f[p].exports;var y=f[p]={i:p,l:!1,exports:{}};return c[p].call(y.exports,y,y.exports,u),y.l=!0,y.exports}return u.m=c,u.c=f,u.d=function(p,y,b){u.o(p,y)||Object.defineProperty(p,y,{enumerable:!0,get:b})},u.r=function(p){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(p,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(p,"__esModule",{value:!0})},u.t=function(p,y){if(1&y&&(p=u(p)),8&y||4&y&&typeof p=="object"&&p&&p.__esModule)return p;var b=Object.create(null);if(u.r(b),Object.defineProperty(b,"default",{enumerable:!0,value:p}),2&y&&typeof p!="string")for(var x in p)u.d(b,x,function(S){return p[S]}.bind(null,x));return b},u.n=function(p){var y=p&&p.__esModule?function(){return p.default}:function(){return p};return u.d(y,"a",y),y},u.o=function(p,y){return Object.prototype.hasOwnProperty.call(p,y)},u.p="",u(u.s=184)}([function(c,f,u){(function(p,y){u.d(f,"a",function(){return Xr}),u.d(f,"b",function(){return jn}),u.d(f,"c",function(){return en}),u.d(f,"d",function(){return Da}),u.d(f,"e",function(){return _o}),u.d(f,"f",function(){return kn}),u.d(f,"g",function(){return je}),u.d(f,"h",function(){return yi}),u.d(f,"i",function(){return yr}),u.d(f,"j",function(){return Er}),u.d(f,"k",function(){return $r}),u.d(f,"l",function(){return xi}),u.d(f,"m",function(){return se}),u.d(f,"n",function(){return zr}),u.d(f,"o",function(){return So}),u.d(f,"p",function(){return Ca}),u.d(f,"q",function(){return or}),u.d(f,"r",function(){return un}),u.d(f,"s",function(){return _i}),u.d(f,"t",function(){return Ra}),u.d(f,"u",function(){return ji}),u.d(f,"v",function(){return rn}),u.d(f,"w",function(){return Lt}),u.d(f,"x",function(){return zt}),u.d(f,"y",function(){return Kt}),u.d(f,"z",function(){return Sr}),u.d(f,"A",function(){return qe}),u.d(f,"B",function(){return ki}),u.d(f,"C",function(){return xn}),u.d(f,"D",function(){return wi}),u.d(f,"E",function(){return mi}),u.d(f,"F",function(){return Eo}),u.d(f,"G",function(){return Un}),u.d(f,"H",function(){return Yt}),u.d(f,"I",function(){return Ir}),u.d(f,"J",function(){return Pi}),u.d(f,"K",function(){return gr});var b=[];Object.freeze(b);var x={};Object.freeze(x);var S={};function P(){return typeof window!="undefined"?window:p!==void 0?p:typeof self!="undefined"?self:S}function E(){return++ve.mobxGuid}function A(v){throw O(!1,v),"X"}function O(v,m){if(!v)throw new Error("[mobx] "+(m||"An invariant failed, however the error is obfuscated because this is an production build."))}function R(v){var m=!1;return function(){if(!m)return m=!0,v.apply(this,arguments)}}var X=function(){};function Z(v){return v!==null&&typeof v=="object"}function G(v){if(v===null||typeof v!="object")return!1;var m=Object.getPrototypeOf(v);return m===Object.prototype||m===null}function U(v,m,w){Object.defineProperty(v,m,{enumerable:!1,writable:!0,configurable:!0,value:w})}function I(v,m,w){Object.defineProperty(v,m,{enumerable:!1,writable:!1,configurable:!0,value:w})}function F(v,m){var w="isMobX"+v;return m.prototype[w]=!0,function(D){return Z(D)&&D[w]===!0}}function Y(v){return P().Map!==void 0&&v instanceof P().Map}function M(v){return v instanceof Set}function C(v){for(var m=[];;){var w=v.next();if(w.done)break;m.push(w.value)}return m}function L(){return typeof Symbol=="function"&&Symbol.toPrimitive||"@@toPrimitive"}function z(v){return v===null?null:typeof v=="object"?""+v:v}function B(v,m){for(var w=v.next();!w.done;)m(w.value),w=v.next()}function J(){return typeof Symbol=="function"&&Symbol.iterator||"@@iterator"}function ee(v,m){I(v,J(),m)}function ne(v){return v[J()]=ge,v}function ae(){return typeof Symbol=="function"&&Symbol.toStringTag||"@@toStringTag"}function ge(){return this}var fe=function(){function v(m){m===void 0&&(m="Atom@"+E()),this.name=m,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=Ce.NOT_TRACKING}return v.prototype.onBecomeUnobserved=function(){},v.prototype.onBecomeObserved=function(){},v.prototype.reportObserved=function(){return Bn(this)},v.prototype.reportChanged=function(){Ct(),function(m){if(m.lowestObserverState!==Ce.STALE){m.lowestObserverState=Ce.STALE;for(var w=m.observers,D=w.length;D--;){var T=w[D];T.dependenciesState===Ce.UP_TO_DATE&&(T.isTracing!==ct.NONE&&On(T,m),T.onBecomeStale()),T.dependenciesState=Ce.STALE}}}(this),Tt()},v.prototype.toString=function(){return this.name},v}(),pe=F("Atom",fe);function se(v,m,w){m===void 0&&(m=X),w===void 0&&(w=X);var D,T=new fe(v);return vr("onBecomeObserved",T,m,D),xn(T,w),T}function le(v,m){return v===m}var ye={identity:le,structural:function(v,m){return Mo(v,m)},default:function(v,m){return function(w,D){return typeof w=="number"&&typeof D=="number"&&isNaN(w)&&isNaN(D)}(v,m)||le(v,m)},shallow:function(v,m){return Mo(v,m,1)}},he=function(v,m){return(he=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,D){w.__proto__=D}||function(w,D){for(var T in D)D.hasOwnProperty(T)&&(w[T]=D[T])})(v,m)};/*! *****************************************************************************
|
|
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.
|
|
***************************************************************************** */function ke(v,m){function w(){this.constructor=v}he(v,m),v.prototype=m===null?Object.create(m):(w.prototype=m.prototype,new w)}var we=function(){return(we=Object.assign||function(v){for(var m,w=1,D=arguments.length;w<D;w++)for(var T in m=arguments[w])Object.prototype.hasOwnProperty.call(m,T)&&(v[T]=m[T]);return v}).apply(this,arguments)};function Fe(v,m){var w=typeof Symbol=="function"&&v[Symbol.iterator];if(!w)return v;var D,T,W=w.call(v),Q=[];try{for(;(m===void 0||m-- >0)&&!(D=W.next()).done;)Q.push(D.value)}catch(ce){T={error:ce}}finally{try{D&&!D.done&&(w=W.return)&&w.call(W)}finally{if(T)throw T.error}}return Q}function We(){for(var v=[],m=0;m<arguments.length;m++)v=v.concat(Fe(arguments[m]));return v}var ze={},Ut={};function ur(v,m){var w=m?ze:Ut;return w[v]||(w[v]={configurable:!0,enumerable:m,get:function(){return ut(this),this[v]},set:function(D){ut(this),this[v]=D}})}function ut(v){if(v.__mobxDidRunLazyInitializers!==!0){var m=v.__mobxDecorators;if(m)for(var w in U(v,"__mobxDidRunLazyInitializers",!0),m){var D=m[w];D.propertyCreator(v,D.prop,D.descriptor,D.decoratorTarget,D.decoratorArguments)}}}function Ue(v,m){return function(){var w,D=function(T,W,Q,ce){if(ce===!0)return m(T,W,Q,T,w),null;if(!Object.prototype.hasOwnProperty.call(T,"__mobxDecorators")){var Oe=T.__mobxDecorators;U(T,"__mobxDecorators",we({},Oe))}return T.__mobxDecorators[W]={prop:W,propertyCreator:m,descriptor:Q,decoratorTarget:T,decoratorArguments:w},ur(W,v)};return dt(arguments)?(w=b,D.apply(null,arguments)):(w=Array.prototype.slice.call(arguments),D)}}function dt(v){return(v.length===2||v.length===3)&&typeof v[1]=="string"||v.length===4&&v[3]===!0}function gt(v,m,w){return rn(v)?v:Array.isArray(v)?qe.array(v,{name:w}):G(v)?qe.object(v,void 0,{name:w}):Y(v)?qe.map(v,{name:w}):M(v)?qe.set(v,{name:w}):v}function sr(v){return v}function jt(v){O(v);var m=Ue(!0,function(D,T,W,Q,ce){Xa(D,T,W?W.initializer?W.initializer.call(D):W.value:void 0,v)}),w=(y!==void 0&&y.env,m);return w.enhancer=v,w}var Yr={deep:!0,name:void 0,defaultDecorator:void 0};function cr(v){return v==null?Yr:typeof v=="string"?{name:v,deep:!0}:v}function Ot(v){return v.defaultDecorator?v.defaultDecorator.enhancer:v.deep===!1?sr:gt}Object.freeze(Yr);var er=jt(gt),lr=jt(function(v,m,w){return v==null||Kt(v)||Lt(v)||zt(v)||wt(v)?v:Array.isArray(v)?qe.array(v,{name:w,deep:!1}):G(v)?qe.object(v,void 0,{name:w,deep:!1}):Y(v)?qe.map(v,{name:w,deep:!1}):M(v)?qe.set(v,{name:w,deep:!1}):A(!1)}),Vr=jt(sr),zn=jt(function(v,m,w){return Mo(v,m)?m:v}),Cr={box:function(v,m){arguments.length>2&&Dt("box");var w=cr(m);return new hr(v,Ot(w),w.name,!0,w.equals)},shallowBox:function(v,m){return arguments.length>2&&Dt("shallowBox"),qe.box(v,{name:m,deep:!1})},array:function(v,m){arguments.length>2&&Dt("array");var w=cr(m);return new It(v,Ot(w),w.name)},shallowArray:function(v,m){return arguments.length>2&&Dt("shallowArray"),qe.array(v,{name:m,deep:!1})},map:function(v,m){arguments.length>2&&Dt("map");var w=cr(m);return new jn(v,Ot(w),w.name)},shallowMap:function(v,m){return arguments.length>2&&Dt("shallowMap"),qe.map(v,{name:m,deep:!1})},set:function(v,m){arguments.length>2&&Dt("set");var w=cr(m);return new Zn(v,Ot(w),w.name)},object:function(v,m,w){typeof arguments[1]=="string"&&Dt("object");var D=cr(w);return So({},v,m,D)},shallowObject:function(v,m){return typeof arguments[1]=="string"&&Dt("shallowObject"),qe.object(v,{},{name:m,deep:!1})},ref:Vr,shallow:lr,deep:er,struct:zn},qe=function(v,m,w){if(typeof arguments[1]=="string")return er.apply(null,arguments);if(rn(v))return v;var D=G(v)?qe.object(v,m,w):Array.isArray(v)?qe.array(v,m):Y(v)?qe.map(v,m):M(v)?qe.set(v,m):v;if(D!==v)return D;A(!1)};function Dt(v){A("Expected one or two arguments to observable."+v+". Did you accidentally try to use observable."+v+" as decorator?")}Object.keys(Cr).forEach(function(v){return qe[v]=Cr[v]});var Ce,ct,fr=Ue(!1,function(v,m,w,D,T){var W=w.get,Q=w.set,ce=T[0]||{};(function(Oe,Te,xe){var Be=To(Oe);xe.name=Be.name+"."+Te,xe.context=Oe,Be.values[Te]=new dr(xe),Object.defineProperty(Oe,Te,function(Xe){return Ni[Xe]||(Ni[Xe]={configurable:ve.computedConfigurable,enumerable:!1,get:function(){return nr(this).read(this,Xe)},set:function(He){nr(this).write(this,Xe,He)}})}(Te))})(v,m,we({get:W,set:Q},ce))}),Rr=fr({equals:ye.structural}),$r=function(v,m,w){if(typeof m=="string"||v!==null&&typeof v=="object"&&arguments.length===1)return fr.apply(null,arguments);var D=typeof m=="object"?m:{};return D.get=v,D.set=typeof m=="function"?m:D.set,D.name=D.name||v.name||"",new dr(D)};$r.struct=Rr,function(v){v[v.NOT_TRACKING=-1]="NOT_TRACKING",v[v.UP_TO_DATE=0]="UP_TO_DATE",v[v.POSSIBLY_STALE=1]="POSSIBLY_STALE",v[v.STALE=2]="STALE"}(Ce||(Ce={})),function(v){v[v.NONE=0]="NONE",v[v.LOG=1]="LOG",v[v.BREAK=2]="BREAK"}(ct||(ct={}));var wr=function(v){this.cause=v};function Gt(v){return v instanceof wr}function be(v){switch(v.dependenciesState){case Ce.UP_TO_DATE:return!1;case Ce.NOT_TRACKING:case Ce.STALE:return!0;case Ce.POSSIBLY_STALE:for(var m=Kr(!0),w=xr(),D=v.observing,T=D.length,W=0;W<T;W++){var Q=D[W];if(Lr(Q)){if(ve.disableErrorBoundaries)Q.get();else try{Q.get()}catch(ce){return Pt(w),qr(m),!0}if(v.dependenciesState===Ce.STALE)return Pt(w),qr(m),!0}}return Zr(v),Pt(w),qr(m),!1}}function je(){return ve.trackingDerivation!==null}function De(v){var m=v.observers.length>0;ve.computationDepth>0&&m&&A(!1),ve.allowStateChanges||!m&&ve.enforceActions!=="strict"||A(!1)}function Re(v,m,w){var D=Kr(!0);Zr(v),v.newObserving=new Array(v.observing.length+100),v.unboundDepsCount=0,v.runId=++ve.runId;var T,W=ve.trackingDerivation;if(ve.trackingDerivation=v,ve.disableErrorBoundaries===!0)T=m.call(w);else try{T=m.call(w)}catch(Q){T=new wr(Q)}return ve.trackingDerivation=W,function(Q){for(var ce=Q.observing,Oe=Q.observing=Q.newObserving,Te=Ce.UP_TO_DATE,xe=0,Be=Q.unboundDepsCount,Xe=0;Xe<Be;Xe++)(He=Oe[Xe]).diffValue===0&&(He.diffValue=1,xe!==Xe&&(Oe[xe]=He),xe++),He.dependenciesState>Te&&(Te=He.dependenciesState);for(Oe.length=xe,Q.newObserving=null,Be=ce.length;Be--;)(He=ce[Be]).diffValue===0&&_n(He,Q),He.diffValue=0;for(;xe--;){var He;(He=Oe[xe]).diffValue===1&&(He.diffValue=0,Qr(He,Q))}Te!==Ce.UP_TO_DATE&&(Q.dependenciesState=Te,Q.onBecomeStale())}(v),v.observing.length,qr(D),T}function it(v){var m=v.observing;v.observing=[];for(var w=m.length;w--;)_n(m[w],v);v.dependenciesState=Ce.NOT_TRACKING}function Ir(v){var m=xr(),w=v();return Pt(m),w}function xr(){var v=ve.trackingDerivation;return ve.trackingDerivation=null,v}function Pt(v){ve.trackingDerivation=v}function Kr(v){var m=ve.allowStateReads;return ve.allowStateReads=v,m}function qr(v){ve.allowStateReads=v}function Zr(v){if(v.dependenciesState!==Ce.UP_TO_DATE){v.dependenciesState=Ce.UP_TO_DATE;for(var m=v.observing,w=m.length;w--;)m[w].lowestObserverState=Ce.UP_TO_DATE}}var vn=0,Aa=1,hi=Object.getOwnPropertyDescriptor(function(){},"name");hi&&hi.configurable;function pr(v,m){var w=function(){return di(v,m,this,arguments)};return w.isMobxAction=!0,w}function di(v,m,w,D){var T=yi(v,w,D);try{return m.apply(w,D)}catch(W){throw T.error=W,W}finally{_o(T)}}function yi(v,m,w){var D=lt()&&!!v,T=0;if(D){T=Date.now();var W=w&&w.length||0,Q=new Array(W);if(W>0)for(var ce=0;ce<W;ce++)Q[ce]=w[ce];Mt({type:"action",name:v,object:m,arguments:Q})}var Oe=xr();Ct();var Te={prevDerivation:Oe,prevAllowStateChanges:gn(!0),prevAllowStateReads:Kr(!0),notifySpy:D,startTime:T,actionId:Aa++,parentActionId:vn};return vn=Te.actionId,Te}function _o(v){vn!==v.actionId&&A("invalid action stack. did you forget to finish an action?"),vn=v.parentActionId,v.error!==void 0&&(ve.suppressReactionErrors=!0),bn(v.prevAllowStateChanges),qr(v.prevAllowStateReads),Tt(),Pt(v.prevDerivation),v.notifySpy&&Wt({time:Date.now()-v.startTime}),ve.suppressReactionErrors=!1}function Da(v,m){var w,D=gn(v);try{w=m()}finally{bn(D)}return w}function gn(v){var m=ve.allowStateChanges;return ve.allowStateChanges=v,m}function bn(v){ve.allowStateChanges=v}var hr=function(v){function m(w,D,T,W,Q){T===void 0&&(T="ObservableValue@"+E()),W===void 0&&(W=!0),Q===void 0&&(Q=ye.default);var ce=v.call(this,T)||this;return ce.enhancer=D,ce.name=T,ce.equals=Q,ce.hasUnreportedChange=!1,ce.value=D(w,void 0,T),W&<()&&tn({type:"create",name:ce.name,newValue:""+ce.value}),ce}return ke(m,v),m.prototype.dehanceValue=function(w){return this.dehancer!==void 0?this.dehancer(w):w},m.prototype.set=function(w){var D=this.value;if((w=this.prepareNewValue(w))!==ve.UNCHANGED){var T=lt();T&&Mt({type:"update",name:this.name,newValue:w,oldValue:D}),this.setNewValue(w),T&&Wt()}},m.prototype.prepareNewValue=function(w){if(De(this),tr(this)){var D=Vt(this,{object:this,type:"update",newValue:w});if(!D)return ve.UNCHANGED;w=D.newValue}return w=this.enhancer(w,this.value,this.name),this.equals(this.value,w)?ve.UNCHANGED:w},m.prototype.setNewValue=function(w){var D=this.value;this.value=w,this.reportChanged(),$t(this)&&Rt(this,{type:"update",object:this,newValue:w,oldValue:D})},m.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},m.prototype.intercept=function(w){return on(this,w)},m.prototype.observe=function(w,D){return D&&w({object:this,type:"update",newValue:this.value,oldValue:void 0}),Br(this,w)},m.prototype.toJSON=function(){return this.get()},m.prototype.toString=function(){return this.name+"["+this.value+"]"},m.prototype.valueOf=function(){return z(this.get())},m}(fe);hr.prototype[L()]=hr.prototype.valueOf;var vi=F("ObservableValue",hr),dr=function(){function v(m){this.dependenciesState=Ce.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isBeingObserved=!1,this.isPendingUnobservation=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=Ce.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+E(),this.value=new wr(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=ct.NONE,O(m.get,"missing option for computed: get"),this.derivation=m.get,this.name=m.name||"ComputedValue@"+E(),m.set&&(this.setter=pr(this.name+"-setter",m.set)),this.equals=m.equals||(m.compareStructural||m.struct?ye.structural:ye.default),this.scope=m.context,this.requiresReaction=!!m.requiresReaction,this.keepAlive=!!m.keepAlive}return v.prototype.onBecomeStale=function(){(function(m){if(m.lowestObserverState===Ce.UP_TO_DATE){m.lowestObserverState=Ce.POSSIBLY_STALE;for(var w=m.observers,D=w.length;D--;){var T=w[D];T.dependenciesState===Ce.UP_TO_DATE&&(T.dependenciesState=Ce.POSSIBLY_STALE,T.isTracing!==ct.NONE&&On(T,m),T.onBecomeStale())}}})(this)},v.prototype.onBecomeUnobserved=function(){},v.prototype.onBecomeObserved=function(){},v.prototype.get=function(){this.isComputing&&A("Cycle detected in computation "+this.name+": "+this.derivation),ve.inBatch!==0||this.observers.length!==0||this.keepAlive?(Bn(this),be(this)&&this.trackAndCompute()&&function(w){if(w.lowestObserverState!==Ce.STALE){w.lowestObserverState=Ce.STALE;for(var D=w.observers,T=D.length;T--;){var W=D[T];W.dependenciesState===Ce.POSSIBLY_STALE?W.dependenciesState=Ce.STALE:W.dependenciesState===Ce.UP_TO_DATE&&(w.lowestObserverState=Ce.UP_TO_DATE)}}}(this)):be(this)&&(this.warnAboutUntrackedRead(),Ct(),this.value=this.computeValue(!1),Tt());var m=this.value;if(Gt(m))throw m.cause;return m},v.prototype.peek=function(){var m=this.computeValue(!1);if(Gt(m))throw m.cause;return m},v.prototype.set=function(m){if(this.setter){O(!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,m)}finally{this.isRunningSetter=!1}}else O(!1,!1)},v.prototype.trackAndCompute=function(){lt()&&tn({object:this.scope,type:"compute",name:this.name});var m=this.value,w=this.dependenciesState===Ce.NOT_TRACKING,D=this.computeValue(!0),T=w||Gt(m)||Gt(D)||!this.equals(m,D);return T&&(this.value=D),T},v.prototype.computeValue=function(m){var w;if(this.isComputing=!0,ve.computationDepth++,m)w=Re(this,this.derivation,this.scope);else if(ve.disableErrorBoundaries===!0)w=this.derivation.call(this.scope);else try{w=this.derivation.call(this.scope)}catch(D){w=new wr(D)}return ve.computationDepth--,this.isComputing=!1,w},v.prototype.suspend=function(){this.keepAlive||(it(this),this.value=void 0)},v.prototype.observe=function(m,w){var D=this,T=!0,W=void 0;return Er(function(){var Q=D.get();if(!T||w){var ce=xr();m({type:"update",object:D,newValue:Q,oldValue:W}),Pt(ce)}T=!1,W=Q})},v.prototype.warnAboutUntrackedRead=function(){},v.prototype.toJSON=function(){return this.get()},v.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},v.prototype.valueOf=function(){return z(this.get())},v}();dr.prototype[L()]=dr.prototype.valueOf;var Lr=F("ComputedValue",dr),mn=function(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.allowStateReads=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.computedConfigurable=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1},Jr=!0,Oo=!1,ve=function(){var v=P();return v.__mobxInstanceCount>0&&!v.__mobxGlobals&&(Jr=!1),v.__mobxGlobals&&v.__mobxGlobals.version!==new mn().version&&(Jr=!1),Jr?v.__mobxGlobals?(v.__mobxInstanceCount+=1,v.__mobxGlobals.UNCHANGED||(v.__mobxGlobals.UNCHANGED={}),v.__mobxGlobals):(v.__mobxInstanceCount=1,v.__mobxGlobals=new mn):(setTimeout(function(){Oo||A("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new mn)}();function Qr(v,m){var w=v.observers.length;w&&(v.observersIndexes[m.__mapid]=w),v.observers[w]=m,v.lowestObserverState>m.dependenciesState&&(v.lowestObserverState=m.dependenciesState)}function _n(v,m){if(v.observers.length===1)v.observers.length=0,wo(v);else{var w=v.observers,D=v.observersIndexes,T=w.pop();if(T!==m){var W=D[m.__mapid]||0;W?D[T.__mapid]=W:delete D[T.__mapid],w[W]=T}delete D[m.__mapid]}}function wo(v){v.isPendingUnobservation===!1&&(v.isPendingUnobservation=!0,ve.pendingUnobservations.push(v))}function Ct(){ve.inBatch++}function Tt(){if(--ve.inBatch==0){xo();for(var v=ve.pendingUnobservations,m=0;m<v.length;m++){var w=v[m];w.isPendingUnobservation=!1,w.observers.length===0&&(w.isBeingObserved&&(w.isBeingObserved=!1,w.onBecomeUnobserved()),w instanceof dr&&w.suspend())}ve.pendingUnobservations=[]}}function Bn(v){var m=ve.trackingDerivation;return m!==null?(m.runId!==v.lastAccessedBy&&(v.lastAccessedBy=m.runId,m.newObserving[m.unboundDepsCount++]=v,v.isBeingObserved||(v.isBeingObserved=!0,v.onBecomeObserved())),!0):(v.observers.length===0&&ve.inBatch>0&&wo(v),!1)}function On(v,m){if(v.isTracing===ct.BREAK){var w=[];(function W(Q,ce,Oe){if(ce.length>=1e3)return void ce.push("(and many more)");ce.push(""+new Array(Oe).join(" ")+Q.name),Q.dependencies&&Q.dependencies.forEach(function(Te){return W(Te,ce,Oe+1)})})((D=v,Ei(or(D,T))),w,1),new Function(`debugger;
|
|
/*
|
|
Tracing '`+v.name+`'
|
|
|
|
You are entering this break point because derivation '`+v.name+"' is being traced and '"+m.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.
|
|
|
|
`+(v instanceof dr?v.derivation.toString().replace(/[*]\//g,"/"):"")+`
|
|
|
|
The dependencies for this derivation are:
|
|
|
|
`+w.join(`
|
|
`)+`
|
|
*/
|
|
`)()}var D,T}var en=function(){function v(m,w,D,T){m===void 0&&(m="Reaction@"+E()),T===void 0&&(T=!1),this.name=m,this.onInvalidate=w,this.errorHandler=D,this.requiresObservable=T,this.observing=[],this.newObserving=[],this.dependenciesState=Ce.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+E(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=ct.NONE}return v.prototype.onBecomeStale=function(){this.schedule()},v.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,ve.pendingReactions.push(this),xo())},v.prototype.isScheduled=function(){return this._isScheduled},v.prototype.runReaction=function(){if(!this.isDisposed){if(Ct(),this._isScheduled=!1,be(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending&<()&&tn({name:this.name,type:"scheduled-reaction"})}catch(m){this.reportExceptionInDerivation(m)}}Tt()}},v.prototype.track=function(m){Ct();var w,D=lt();D&&(w=Date.now(),Mt({name:this.name,type:"reaction"})),this._isRunning=!0;var T=Re(this,m,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&it(this),Gt(T)&&this.reportExceptionInDerivation(T.cause),D&&Wt({time:Date.now()-w}),Tt()},v.prototype.reportExceptionInDerivation=function(m){var w=this;if(this.errorHandler)this.errorHandler(m,this);else{if(ve.disableErrorBoundaries)throw m;var D="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";ve.suppressReactionErrors,lt()&&tn({type:"error",name:this.name,message:D,error:""+m}),ve.globalReactionErrorHandlers.forEach(function(T){return T(m,w)})}},v.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(Ct(),it(this),Tt()))},v.prototype.getDisposer=function(){var m=this.dispose.bind(this);return m.$mobx=this,m},v.prototype.toString=function(){return"Reaction["+this.name+"]"},v.prototype.trace=function(m){m===void 0&&(m=!1),function(){for(var w=[],D=0;D<arguments.length;D++)w[D]=arguments[D];var T=!1;typeof w[w.length-1]=="boolean"&&(T=w.pop());var W=Gn(w);if(!W)return A(!1);W.isTracing,ct.NONE,W.isTracing=T?ct.BREAK:ct.LOG}(this,m)},v}(),wn=function(v){return v()};function xo(){ve.inBatch>0||ve.isRunningReactions||wn(Xn)}function Xn(){ve.isRunningReactions=!0;for(var v=ve.pendingReactions,m=0;v.length>0;){++m==100&&v.splice(0);for(var w=v.splice(0),D=0,T=w.length;D<T;D++)w[D].runReaction()}ve.isRunningReactions=!1}var Ye=F("Reaction",en);function Ta(v){var m=wn;wn=function(w){return v(function(){return m(w)})}}function lt(){return!!ve.spyListeners.length}function tn(v){if(ve.spyListeners.length)for(var m=ve.spyListeners,w=0,D=m.length;w<D;w++)m[w](v)}function Mt(v){tn(we(we({},v),{spyReportStart:!0}))}var Ma={spyReportEnd:!0};function Wt(v){tn(v?we(we({},v),{spyReportEnd:!0}):Ma)}function Eo(v){return ve.spyListeners.push(v),R(function(){ve.spyListeners=ve.spyListeners.filter(function(m){return m!==v})})}function Na(){A(!1)}function gi(v){return function(m,w,D){if(D){if(D.value)return{value:pr(v,D.value),enumerable:!1,configurable:!0,writable:!0};var T=D.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return pr(v,T.call(this))}}}return bi(v).apply(this,arguments)}}function bi(v){return function(m,w,D){Object.defineProperty(m,w,{configurable:!0,enumerable:!1,get:function(){},set:function(T){U(this,w,yr(v,T))}})}}var yr=function(v,m,w,D){return arguments.length===1&&typeof v=="function"?pr(v.name||"<unnamed action>",v):arguments.length===2&&typeof m=="function"?pr(v,m):arguments.length===1&&typeof v=="string"?gi(v):D!==!0?gi(m).apply(null,arguments):void(v[m]=pr(v.name||m,w.value))};function mi(v,m){return di(typeof v=="string"?v:v.name||"<unnamed action>",typeof v=="function"?v:m,this,void 0)}function _i(v){return typeof v=="function"&&v.isMobxAction===!0}function Fn(v,m,w){U(v,m,pr(m,w.bind(v)))}function Er(v,m){m===void 0&&(m=x);var w,D=m&&m.name||v.name||"Autorun@"+E();if(!m.scheduler&&!m.delay)w=new en(D,function(){this.track(Q)},m.onError,m.requiresObservable);else{var T=Hn(m),W=!1;w=new en(D,function(){W||(W=!0,T(function(){W=!1,w.isDisposed||w.track(Q)}))},m.onError,m.requiresObservable)}function Q(){v(w)}return w.schedule(),w.getDisposer()}yr.bound=function(v,m,w,D){return D===!0?(Fn(v,m,w.value),null):w?{configurable:!0,enumerable:!1,get:function(){return Fn(this,m,w.value||w.initializer.call(this)),this[m]},set:Na}:{enumerable:!1,configurable:!0,set:function(T){Fn(this,m,T)},get:function(){}}};var Oi=function(v){return v()};function Hn(v){return v.scheduler?v.scheduler:v.delay?function(m){return setTimeout(m,v.delay)}:Oi}function wi(v,m,w){w===void 0&&(w=x),typeof w=="boolean"&&(w={fireImmediately:w});var D,T,W,Q=w.name||"Reaction@"+E(),ce=yr(Q,w.onError?(D=w.onError,T=m,function(){try{return T.apply(this,arguments)}catch(et){D.call(this,et)}}):m),Oe=!w.scheduler&&!w.delay,Te=Hn(w),xe=!0,Be=!1,Xe=w.compareStructural?ye.structural:w.equals||ye.default,He=new en(Q,function(){xe||Oe?Qe():Be||(Be=!0,Te(Qe))},w.onError,w.requiresObservable);function Qe(){if(Be=!1,!He.isDisposed){var et=!1;He.track(function(){var nt=v(He);et=xe||!Xe(W,nt),W=nt}),xe&&w.fireImmediately&&ce(W,He),xe||et!==!0||ce(W,He),xe&&(xe=!1)}}return He.schedule(),He.getDisposer()}function xn(v,m,w){return vr("onBecomeUnobserved",v,m,w)}function vr(v,m,w,D){var T=typeof D=="function"?or(m,w):or(m),W=typeof D=="function"?D:w,Q=T[v];return typeof Q!="function"?A(!1):(T[v]=function(){Q.call(this),W.call(this)},function(){T[v]=Q})}function xi(v){var m=v.enforceActions,w=v.computedRequiresReaction,D=v.computedConfigurable,T=v.disableErrorBoundaries,W=v.arrayBuffer,Q=v.reactionScheduler,ce=v.reactionRequiresObservable,Oe=v.observableRequiresReaction;if(v.isolateGlobalState===!0&&((ve.pendingReactions.length||ve.inBatch||ve.isRunningReactions)&&A("isolateGlobalState should be called before MobX is running any reactions"),Oo=!0,Jr&&(--P().__mobxInstanceCount==0&&(P().__mobxGlobals=void 0),ve=new mn)),m!==void 0){var Te=void 0;switch(m){case!0:case"observed":Te=!0;break;case!1:case"never":Te=!1;break;case"strict":case"always":Te="strict";break;default:A("Invalid value for 'enforceActions': '"+m+"', expected 'never', 'always' or 'observed'")}ve.enforceActions=Te,ve.allowStateChanges=Te!==!0&&Te!=="strict"}w!==void 0&&(ve.computedRequiresReaction=!!w),ce!==void 0&&(ve.reactionRequiresObservable=!!ce),Oe!==void 0&&(ve.observableRequiresReaction=!!Oe,ve.allowStateReads=!ve.observableRequiresReaction),D!==void 0&&(ve.computedConfigurable=!!D),T!==void 0&&(ve.disableErrorBoundaries=!!T),typeof W=="number"&&$n(W),Q&&Ta(Q)}function So(v,m,w,D){var T=(D=cr(D)).defaultDecorator||(D.deep===!1?Vr:er);ut(v),To(v,D.name,T.enhancer),Ct();try{for(var W=Object.getOwnPropertyNames(m),Q=0,ce=W.length;Q<ce;Q++){var Oe=W[Q],Te=Object.getOwnPropertyDescriptor(m,Oe),xe=(w&&Oe in w?w[Oe]:Te.get?fr:T)(v,Oe,Te,!0);xe&&Object.defineProperty(v,Oe,xe)}}finally{Tt()}return v}function Ei(v){var m,w,D={name:v.name};return v.observing&&v.observing.length>0&&(D.dependencies=(m=v.observing,w=[],m.forEach(function(T){w.indexOf(T)===-1&&w.push(T)}),w).map(Ei)),D}var Si=0;function jo(){this.message="FLOW_CANCELLED"}function Ca(v){arguments.length!==1&&A("Flow expects one 1 argument and cannot be used as decorator");var m=v.name||"<unnamed flow>";return function(){var w,D=this,T=arguments,W=++Si,Q=yr(m+" - runid: "+W+" - init",v).apply(D,T),ce=void 0,Oe=new Promise(function(Te,xe){var Be=0;function Xe(et){var nt;ce=void 0;try{nt=yr(m+" - runid: "+W+" - yield "+Be++,Q.next).call(Q,et)}catch(yt){return xe(yt)}Qe(nt)}function He(et){var nt;ce=void 0;try{nt=yr(m+" - runid: "+W+" - yield "+Be++,Q.throw).call(Q,et)}catch(yt){return xe(yt)}Qe(nt)}function Qe(et){if(!et||typeof et.then!="function")return et.done?Te(et.value):(ce=Promise.resolve(et.value)).then(Xe,He);et.then(Qe,xe)}w=xe,Xe(void 0)});return Oe.cancel=yr(m+" - runid: "+W+" - cancel",function(){try{ce&&Po(ce);var Te=Q.return(void 0),xe=Promise.resolve(Te.value);xe.then(X,X),Po(xe),w(new jo)}catch(Be){w(Be)}}),Oe}}function Po(v){typeof v.cancel=="function"&&v.cancel()}function ko(v,m){if(v==null)return!1;if(m!==void 0){if(Kt(v)===!1||!v.$mobx.values[m])return!1;var w=or(v,m);return Lr(w)}return Lr(v)}function Ra(v){return arguments.length>1?A(!1):ko(v)}function ji(v,m){return typeof m!="string"?A(!1):ko(v,m)}function Ia(v,m){if(v==null)return!1;if(m!==void 0){if(Kt(v)){var w=v.$mobx;return w.values&&!!w.values[m]}return!1}return Kt(v)||!!v.$mobx||pe(v)||Ye(v)||Lr(v)}function rn(v){return arguments.length!==1&&A(!1),Ia(v)}function Sr(v){return Kt(v)?v.$mobx.getKeys():zt(v)||wt(v)?C(v.keys()):Lt(v)?v.map(function(m,w){return w}):A(!1)}function Pi(v){return Kt(v)?Sr(v).map(function(m){return v[m]}):zt(v)?Sr(v).map(function(m){return v.get(m)}):wt(v)?C(v.values()):Lt(v)?v.slice():A(!1)}function zr(v){return Kt(v)?Sr(v).map(function(m){return[m,v[m]]}):zt(v)?Sr(v).map(function(m){return[m,v.get(m)]}):wt(v)?C(v.entries()):Lt(v)?v.map(function(m,w){return[w,m]}):A(!1)}function ki(v,m,w,D){return typeof w=="function"?function(T,W,Q,ce){return kn(T,W).observe(Q,ce)}(v,m,w,D):function(T,W,Q){return kn(T).observe(W,Q)}(v,m,w)}jo.prototype=Object.create(Error.prototype);var nn={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function jr(v,m,w,D){return D.detectCycles&&v.set(m,w),w}function Un(v,m){var w;return typeof m=="boolean"&&(m={detectCycles:m}),m||(m=nn),m.detectCycles=m.detectCycles===void 0?m.recurseEverything===!0:m.detectCycles===!0,m.detectCycles&&(w=new Map),function D(T,W,Q){if(!W.recurseEverything&&!rn(T)||typeof T!="object")return T;if(T===null)return null;if(T instanceof Date)return T;if(vi(T))return D(T.get(),W,Q);if(rn(T)&&Sr(T),W.detectCycles===!0&&T!==null&&Q.has(T))return Q.get(T);if(Lt(T)||Array.isArray(T)){var ce=jr(Q,T,[],W),Oe=T.map(function(yt){return D(yt,W,Q)});ce.length=Oe.length;for(var Te=0,xe=Oe.length;Te<xe;Te++)ce[Te]=Oe[Te];return ce}if(wt(T)||Object.getPrototypeOf(T)===Set.prototype){if(W.exportMapsAsObjects===!1){var Be=jr(Q,T,new Set,W);return T.forEach(function(yt){Be.add(D(yt,W,Q))}),Be}var Xe=jr(Q,T,[],W);return T.forEach(function(yt){Xe.push(D(yt,W,Q))}),Xe}if(zt(T)||Object.getPrototypeOf(T)===Map.prototype){if(W.exportMapsAsObjects===!1){var He=jr(Q,T,new Map,W);return T.forEach(function(yt,Fr){He.set(Fr,D(yt,W,Q))}),He}var Qe=jr(Q,T,{},W);return T.forEach(function(yt,Fr){Qe[Fr]=D(yt,W,Q)}),Qe}var et=jr(Q,T,{},W);for(var nt in T)et[nt]=D(T[nt],W,Q);return et}(v,m,w)}function Gn(v){switch(v.length){case 0:return ve.trackingDerivation;case 1:return or(v[0]);case 2:return or(v[0],v[1])}}function Yt(v,m){m===void 0&&(m=void 0),Ct();try{return v.apply(m)}finally{Tt()}}function gr(v,m,w){return arguments.length===1||m&&typeof m=="object"?Ai(v,m):Ao(v,m,w||{})}function Ao(v,m,w){var D;typeof w.timeout=="number"&&(D=setTimeout(function(){if(!W.$mobx.isDisposed){W();var Q=new Error("WHEN_TIMEOUT");if(!w.onError)throw Q;w.onError(Q)}},w.timeout)),w.name=w.name||"When@"+E();var T=pr(w.name+"-effect",m),W=Er(function(Q){v()&&(Q.dispose(),D&&clearTimeout(D),T())},w);return W}function Ai(v,m){var w,D=new Promise(function(T,W){var Q=Ao(v,T,we(we({},m),{onError:W}));w=function(){Q(),W("WHEN_CANCELLED")}});return D.cancel=w,D}function tr(v){return v.interceptors!==void 0&&v.interceptors.length>0}function on(v,m){var w=v.interceptors||(v.interceptors=[]);return w.push(m),R(function(){var D=w.indexOf(m);D!==-1&&w.splice(D,1)})}function Vt(v,m){var w=xr();try{var D=v.interceptors;if(D)for(var T=0,W=D.length;T<W&&(O(!(m=D[T](m))||m.type,"Intercept handlers should return nothing or a change object"),m);T++);return m}finally{Pt(w)}}function $t(v){return v.changeListeners!==void 0&&v.changeListeners.length>0}function Br(v,m){var w=v.changeListeners||(v.changeListeners=[]);return w.push(m),R(function(){var D=w.indexOf(m);D!==-1&&w.splice(D,1)})}function Rt(v,m){var w=xr(),D=v.changeListeners;if(D){for(var T=0,W=(D=D.slice()).length;T<W;T++)D[T](m);Pt(w)}}var rr,En,an,Sn,Di=(rr=!1,En={},Object.defineProperty(En,"0",{set:function(){rr=!0}}),Object.create(En)[0]=1,rr===!1),Wn=0,Do=function(){};an=Do,Sn=Array.prototype,Object.setPrototypeOf!==void 0?Object.setPrototypeOf(an.prototype,Sn):an.prototype.__proto__!==void 0?an.prototype.__proto__=Sn:an.prototype=Sn,Object.isFrozen(Array)&&["constructor","push","shift","concat","pop","unshift","replace","find","findIndex","splice","reverse","sort"].forEach(function(v){Object.defineProperty(Do.prototype,v,{configurable:!0,writable:!0,value:Array.prototype[v]})});var Yn=function(){function v(m,w,D,T){this.array=D,this.owned=T,this.values=[],this.lastKnownLength=0,this.atom=new fe(m||"ObservableArray@"+E()),this.enhancer=function(W,Q){return w(W,Q,m+"[..]")}}return v.prototype.dehanceValue=function(m){return this.dehancer!==void 0?this.dehancer(m):m},v.prototype.dehanceValues=function(m){return this.dehancer!==void 0&&m.length>0?m.map(this.dehancer):m},v.prototype.intercept=function(m){return on(this,m)},v.prototype.observe=function(m,w){return w===void 0&&(w=!1),w&&m({object:this.array,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),Br(this,m)},v.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},v.prototype.setArrayLength=function(m){if(typeof m!="number"||m<0)throw new Error("[mobx.array] Out of range: "+m);var w=this.values.length;if(m!==w)if(m>w){for(var D=new Array(m-w),T=0;T<m-w;T++)D[T]=void 0;this.spliceWithArray(w,0,D)}else this.spliceWithArray(m,w-m)},v.prototype.updateArrayLength=function(m,w){if(m!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?");this.lastKnownLength+=w,w>0&&m+w+1>Wn&&$n(m+w+1)},v.prototype.spliceWithArray=function(m,w,D){var T=this;De(this.atom);var W=this.values.length;if(m===void 0?m=0:m>W?m=W:m<0&&(m=Math.max(0,W+m)),w=arguments.length===1?W-m:w==null?0:Math.max(0,Math.min(w,W-m)),D===void 0&&(D=b),tr(this)){var Q=Vt(this,{object:this.array,type:"splice",index:m,removedCount:w,added:D});if(!Q)return b;w=Q.removedCount,D=Q.added}var ce=(D=D.length===0?D:D.map(function(Te){return T.enhancer(Te,void 0)})).length-w;this.updateArrayLength(W,ce);var Oe=this.spliceItemsIntoValues(m,w,D);return w===0&&D.length===0||this.notifyArraySplice(m,D,Oe),this.dehanceValues(Oe)},v.prototype.spliceItemsIntoValues=function(m,w,D){var T;if(D.length<1e4)return(T=this.values).splice.apply(T,We([m,w],D));var W=this.values.slice(m,m+w);return this.values=this.values.slice(0,m).concat(D,this.values.slice(m+w)),W},v.prototype.notifyArrayChildUpdate=function(m,w,D){var T=!this.owned&<(),W=$t(this),Q=W||T?{object:this.array,type:"update",index:m,newValue:w,oldValue:D}:null;T&&Mt(we(we({},Q),{name:this.atom.name})),this.atom.reportChanged(),W&&Rt(this,Q),T&&Wt()},v.prototype.notifyArraySplice=function(m,w,D){var T=!this.owned&<(),W=$t(this),Q=W||T?{object:this.array,type:"splice",index:m,removed:D,added:w,removedCount:D.length,addedCount:w.length}:null;T&&Mt(we(we({},Q),{name:this.atom.name})),this.atom.reportChanged(),W&&Rt(this,Q),T&&Wt()},v}(),It=function(v){function m(w,D,T,W){T===void 0&&(T="ObservableArray@"+E()),W===void 0&&(W=!1);var Q=v.call(this)||this,ce=new Yn(T,D,Q,W);if(I(Q,"$mobx",ce),w&&w.length){var Oe=gn(!0);Q.spliceWithArray(0,0,w),bn(Oe)}return Di&&Object.defineProperty(ce.array,"0",Vn),Q}return ke(m,v),m.prototype.intercept=function(w){return this.$mobx.intercept(w)},m.prototype.observe=function(w,D){return D===void 0&&(D=!1),this.$mobx.observe(w,D)},m.prototype.clear=function(){return this.splice(0)},m.prototype.concat=function(){for(var w=[],D=0;D<arguments.length;D++)w[D]=arguments[D];return this.$mobx.atom.reportObserved(),Array.prototype.concat.apply(this.peek(),w.map(function(T){return Lt(T)?T.peek():T}))},m.prototype.replace=function(w){return this.$mobx.spliceWithArray(0,this.$mobx.values.length,w)},m.prototype.toJS=function(){return this.slice()},m.prototype.toJSON=function(){return this.toJS()},m.prototype.peek=function(){return this.$mobx.atom.reportObserved(),this.$mobx.dehanceValues(this.$mobx.values)},m.prototype.find=function(w,D,T){T===void 0&&(T=0);var W=this.findIndex.apply(this,arguments);return W===-1?void 0:this.get(W)},m.prototype.findIndex=function(w,D,T){T===void 0&&(T=0);for(var W=this.peek(),Q=W.length,ce=T;ce<Q;ce++)if(w.call(D,W[ce],ce,this))return ce;return-1},m.prototype.splice=function(w,D){for(var T=[],W=2;W<arguments.length;W++)T[W-2]=arguments[W];switch(arguments.length){case 0:return[];case 1:return this.$mobx.spliceWithArray(w);case 2:return this.$mobx.spliceWithArray(w,D)}return this.$mobx.spliceWithArray(w,D,T)},m.prototype.spliceWithArray=function(w,D,T){return this.$mobx.spliceWithArray(w,D,T)},m.prototype.push=function(){for(var w=[],D=0;D<arguments.length;D++)w[D]=arguments[D];var T=this.$mobx;return T.spliceWithArray(T.values.length,0,w),T.values.length},m.prototype.pop=function(){return this.splice(Math.max(this.$mobx.values.length-1,0),1)[0]},m.prototype.shift=function(){return this.splice(0,1)[0]},m.prototype.unshift=function(){for(var w=[],D=0;D<arguments.length;D++)w[D]=arguments[D];var T=this.$mobx;return T.spliceWithArray(0,0,w),T.values.length},m.prototype.reverse=function(){var w=this.slice();return w.reverse.apply(w,arguments)},m.prototype.sort=function(w){var D=this.slice();return D.sort.apply(D,arguments)},m.prototype.remove=function(w){var D=this.$mobx.dehanceValues(this.$mobx.values).indexOf(w);return D>-1&&(this.splice(D,1),!0)},m.prototype.move=function(w,D){function T(ce){if(ce<0)throw new Error("[mobx.array] Index out of bounds: "+ce+" is negative");var Oe=this.$mobx.values.length;if(ce>=Oe)throw new Error("[mobx.array] Index out of bounds: "+ce+" is not smaller than "+Oe)}if(T.call(this,w),T.call(this,D),w!==D){var W,Q=this.$mobx.values;W=w<D?We(Q.slice(0,w),Q.slice(w+1,D+1),[Q[w]],Q.slice(D+1)):We(Q.slice(0,D),[Q[w]],Q.slice(D,w),Q.slice(w+1)),this.replace(W)}},m.prototype.get=function(w){var D=this.$mobx;if(D&&w<D.values.length)return D.atom.reportObserved(),D.dehanceValue(D.values[w])},m.prototype.set=function(w,D){var T=this.$mobx,W=T.values;if(w<W.length){De(T.atom);var Q=W[w];if(tr(T)){var ce=Vt(T,{type:"update",object:this,index:w,newValue:D});if(!ce)return;D=ce.newValue}(D=T.enhancer(D,Q))!==Q&&(W[w]=D,T.notifyArrayChildUpdate(w,D,Q))}else{if(w!==W.length)throw new Error("[mobx.array] Index out of bounds, "+w+" is larger than "+W.length);T.spliceWithArray(w,0,[D])}},m}(Do);ee(It.prototype,function(){this.$mobx.atom.reportObserved();var v=this,m=0;return ne({next:function(){return m<v.length?{value:v[m++],done:!1}:{done:!0,value:void 0}}})}),Object.defineProperty(It.prototype,"length",{enumerable:!1,configurable:!0,get:function(){return this.$mobx.getArrayLength()},set:function(v){this.$mobx.setArrayLength(v)}}),U(It.prototype,ae(),"Array"),["indexOf","join","lastIndexOf","slice","toString","toLocaleString"].forEach(function(v){var m=Array.prototype[v];O(typeof m=="function","Base function not defined on Array prototype: '"+v+"'"),U(It.prototype,v,function(){return m.apply(this.peek(),arguments)})}),["every","filter","forEach","map","some"].forEach(function(v){O(typeof Array.prototype[v]=="function","Base function not defined on Array prototype: '"+v+"'"),U(It.prototype,v,function(m,w){var D=this,T=this.$mobx;return T.atom.reportObserved(),T.dehanceValues(T.values)[v](function(W,Q){return m.call(w,W,Q,D)},w)})}),["reduce","reduceRight"].forEach(function(v){U(It.prototype,v,function(){var m=this,w=this.$mobx;w.atom.reportObserved();var D=arguments[0];return arguments[0]=function(T,W,Q){return W=w.dehanceValue(W),D(T,W,Q,m)},w.values[v].apply(w.values,arguments)})}),function(v,m){for(var w=0;w<m.length;w++)U(v,m[w],v[m[w]])}(It.prototype,["constructor","intercept","observe","clear","concat","get","replace","toJS","toJSON","peek","find","findIndex","splice","spliceWithArray","push","pop","set","shift","unshift","reverse","sort","remove","move","toString","toLocaleString"]);var Vn=Ti(0);function Ti(v){return{enumerable:!1,configurable:!1,get:function(){return this.get(v)},set:function(m){this.set(v,m)}}}function La(v){Object.defineProperty(It.prototype,""+v,Ti(v))}function $n(v){for(var m=Wn;m<v;m++)La(m);Wn=v}$n(1e3);var za=F("ObservableArrayAdministration",Yn);function Lt(v){return Z(v)&&za(v.$mobx)}var Kn={},jn=function(){function v(m,w,D){if(w===void 0&&(w=gt),D===void 0&&(D="ObservableMap@"+E()),this.enhancer=w,this.name=D,this.$mobx=Kn,this._keysAtom=se(this.name+".keys()"),typeof Map!="function")throw new Error("mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js");this._data=new Map,this._hasMap=new Map,this.merge(m)}return v.prototype._has=function(m){return this._data.has(m)},v.prototype.has=function(m){var w=this;if(!ve.trackingDerivation)return this._has(m);var D=this._hasMap.get(m);if(!D){var T=D=new hr(this._has(m),sr,this.name+"."+qn(m)+"?",!1);this._hasMap.set(m,T),xn(T,function(){return w._hasMap.delete(m)})}return D.get()},v.prototype.set=function(m,w){var D=this._has(m);if(tr(this)){var T=Vt(this,{type:D?"update":"add",object:this,newValue:w,name:m});if(!T)return this;w=T.newValue}return D?this._updateValue(m,w):this._addValue(m,w),this},v.prototype.delete=function(m){var w=this;if(De(this._keysAtom),tr(this)&&!(W=Vt(this,{type:"delete",object:this,name:m})))return!1;if(this._has(m)){var D=lt(),T=$t(this),W=T||D?{type:"delete",object:this,oldValue:this._data.get(m).value,name:m}:null;return D&&Mt(we(we({},W),{name:this.name,key:m})),Yt(function(){w._keysAtom.reportChanged(),w._updateHasMapEntry(m,!1),w._data.get(m).setNewValue(void 0),w._data.delete(m)}),T&&Rt(this,W),D&&Wt(),!0}return!1},v.prototype._updateHasMapEntry=function(m,w){var D=this._hasMap.get(m);D&&D.setNewValue(w)},v.prototype._updateValue=function(m,w){var D=this._data.get(m);if((w=D.prepareNewValue(w))!==ve.UNCHANGED){var T=lt(),W=$t(this),Q=W||T?{type:"update",object:this,oldValue:D.value,name:m,newValue:w}:null;T&&Mt(we(we({},Q),{name:this.name,key:m})),D.setNewValue(w),W&&Rt(this,Q),T&&Wt()}},v.prototype._addValue=function(m,w){var D=this;De(this._keysAtom),Yt(function(){var ce=new hr(w,D.enhancer,D.name+"."+qn(m),!1);D._data.set(m,ce),w=ce.value,D._updateHasMapEntry(m,!0),D._keysAtom.reportChanged()});var T=lt(),W=$t(this),Q=W||T?{type:"add",object:this,name:m,newValue:w}:null;T&&Mt(we(we({},Q),{name:this.name,key:m})),W&&Rt(this,Q),T&&Wt()},v.prototype.get=function(m){return this.has(m)?this.dehanceValue(this._data.get(m).get()):this.dehanceValue(void 0)},v.prototype.dehanceValue=function(m){return this.dehancer!==void 0?this.dehancer(m):m},v.prototype.keys=function(){return this._keysAtom.reportObserved(),this._data.keys()},v.prototype.values=function(){var m=this,w=this.keys();return ne({next:function(){var D=w.next(),T=D.done,W=D.value;return{done:T,value:T?void 0:m.get(W)}}})},v.prototype.entries=function(){var m=this,w=this.keys();return ne({next:function(){var D=w.next(),T=D.done,W=D.value;return{done:T,value:T?void 0:[W,m.get(W)]}}})},v.prototype.forEach=function(m,w){var D=this;this._keysAtom.reportObserved(),this._data.forEach(function(T,W){return m.call(w,D.get(W),W,D)})},v.prototype.merge=function(m){var w=this;return zt(m)&&(m=m.toJS()),Yt(function(){var D=gn(!0);try{G(m)?Object.keys(m).forEach(function(T){return w.set(T,m[T])}):Array.isArray(m)?m.forEach(function(T){var W=Fe(T,2),Q=W[0],ce=W[1];return w.set(Q,ce)}):Y(m)?m.constructor!==Map?A("Cannot initialize from classes that inherit from Map: "+m.constructor.name):m.forEach(function(T,W){return w.set(W,T)}):m!=null&&A("Cannot initialize map from "+m)}finally{bn(D)}}),this},v.prototype.clear=function(){var m=this;Yt(function(){Ir(function(){m._data.forEach(function(w,D){return m.delete(D)})})})},v.prototype.replace=function(m){var w=this;return Yt(function(){var D=function(xe){if(Y(xe)||zt(xe))return xe;if(Array.isArray(xe))return new Map(xe);if(G(xe)){var Be=new Map;for(var Xe in xe)Be.set(Xe,xe[Xe]);return Be}return A("Cannot convert to map from '"+xe+"'")}(m),T=new Map,W=!1;if(B(w._data.keys(),function(xe){if(!D.has(xe))if(w.delete(xe))W=!0;else{var Be=w._data.get(xe);T.set(xe,Be)}}),B(D.entries(),function(xe){var Be=Fe(xe,2),Xe=Be[0],He=Be[1],Qe=w._data.has(Xe);if(w.set(Xe,He),w._data.has(Xe)){var et=w._data.get(Xe);T.set(Xe,et),Qe||(W=!0)}}),!W)if(w._data.size!==T.size)w._keysAtom.reportChanged();else for(var Q=w._data.keys(),ce=T.keys(),Oe=Q.next(),Te=ce.next();!Oe.done;){if(Oe.value!==Te.value){w._keysAtom.reportChanged();break}Oe=Q.next(),Te=ce.next()}w._data=T}),this},Object.defineProperty(v.prototype,"size",{get:function(){return this._keysAtom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),v.prototype.toPOJO=function(){var m=this,w={};return this.forEach(function(D,T){return w[typeof T=="symbol"?T:qn(T)]=m.get(T)}),w},v.prototype.toJS=function(){return new Map(this)},v.prototype.toJSON=function(){return this.toPOJO()},v.prototype.toString=function(){var m=this;return this.name+"[{ "+C(this.keys()).map(function(w){return qn(w)+": "+m.get(w)}).join(", ")+" }]"},v.prototype.observe=function(m,w){return Br(this,m)},v.prototype.intercept=function(m){return on(this,m)},v}();function qn(v){return v&&v.toString?v.toString():new String(v).toString()}ee(jn.prototype,function(){return this.entries()}),I(jn.prototype,ae(),"Map");var zt=F("ObservableMap",jn),Ba={},Zn=function(){function v(m,w,D){if(w===void 0&&(w=gt),D===void 0&&(D="ObservableSet@"+E()),this.name=D,this.$mobx=Ba,this._data=new Set,this._atom=se(this.name),typeof Set!="function")throw new Error("mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js");this.enhancer=function(T,W){return w(T,W,D)},m&&this.replace(m)}return v.prototype.dehanceValue=function(m){return this.dehancer!==void 0?this.dehancer(m):m},v.prototype.clear=function(){var m=this;Yt(function(){Ir(function(){m._data.forEach(function(w){m.delete(w)})})})},v.prototype.forEach=function(m,w){var D=this;this._atom.reportObserved(),this._data.forEach(function(T){m.call(w,T,T,D)})},Object.defineProperty(v.prototype,"size",{get:function(){return this._atom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),v.prototype.add=function(m){var w=this;if(De(this._atom),tr(this)&&!(W=Vt(this,{type:"add",object:this,newValue:m})))return this;if(!this.has(m)){Yt(function(){w._data.add(w.enhancer(m,void 0)),w._atom.reportChanged()});var D=lt(),T=$t(this),W=T||D?{type:"add",object:this,newValue:m}:null;T&&Rt(this,W)}return this},v.prototype.delete=function(m){var w=this;if(tr(this)&&!(W=Vt(this,{type:"delete",object:this,oldValue:m})))return!1;if(this.has(m)){var D=lt(),T=$t(this),W=T||D?{type:"delete",object:this,oldValue:m}:null;return Yt(function(){w._atom.reportChanged(),w._data.delete(m)}),T&&Rt(this,W),!0}return!1},v.prototype.has=function(m){return this._atom.reportObserved(),this._data.has(this.dehanceValue(m))},v.prototype.entries=function(){var m=0,w=C(this.keys()),D=C(this.values());return ne({next:function(){var T=m;return m+=1,T<D.length?{value:[w[T],D[T]],done:!1}:{done:!0}}})},v.prototype.keys=function(){return this.values()},v.prototype.values=function(){this._atom.reportObserved();var m,w=this,D=0;return this._data.values!==void 0?m=C(this._data.values()):(m=[],this._data.forEach(function(T){return m.push(T)})),ne({next:function(){return D<m.length?{value:w.dehanceValue(m[D++]),done:!1}:{done:!0}}})},v.prototype.replace=function(m){var w=this;return wt(m)&&(m=m.toJS()),Yt(function(){var D=gn(!0);try{Array.isArray(m)||M(m)?(w.clear(),m.forEach(function(T){return w.add(T)})):m!=null&&A("Cannot initialize set from "+m)}finally{bn(D)}}),this},v.prototype.observe=function(m,w){return Br(this,m)},v.prototype.intercept=function(m){return on(this,m)},v.prototype.toJS=function(){return new Set(this)},v.prototype.toString=function(){return this.name+"[ "+C(this.keys()).join(", ")+" ]"},v}();ee(Zn.prototype,function(){return this.values()}),I(Zn.prototype,ae(),"Set");var wt=F("ObservableSet",Zn),Pn=function(){function v(m,w,D){this.target=m,this.name=w,this.defaultEnhancer=D,this.values={}}return v.prototype.read=function(m,w){if(this.target===m||(this.illegalAccess(m,w),this.values[w]))return this.values[w].get()},v.prototype.write=function(m,w,D){var T=this.target;T!==m&&this.illegalAccess(m,w);var W=this.values[w];if(W instanceof dr)W.set(D);else{if(tr(this)){if(!(Oe=Vt(this,{type:"update",object:T,name:w,newValue:D})))return;D=Oe.newValue}if((D=W.prepareNewValue(D))!==ve.UNCHANGED){var Q=$t(this),ce=lt(),Oe=Q||ce?{type:"update",object:T,oldValue:W.value,name:w,newValue:D}:null;ce&&Mt(we(we({},Oe),{name:this.name,key:w})),W.setNewValue(D),Q&&Rt(this,Oe),ce&&Wt()}}},v.prototype.remove=function(m){if(this.values[m]){var w=this.target;if(tr(this)&&!(Q=Vt(this,{object:w,name:m,type:"remove"})))return;try{Ct();var D=$t(this),T=lt(),W=this.values[m].get();this.keys&&this.keys.remove(m),delete this.values[m],delete this.target[m];var Q=D||T?{type:"remove",object:w,oldValue:W,name:m}:null;T&&Mt(we(we({},Q),{name:this.name,key:m})),D&&Rt(this,Q),T&&Wt()}finally{Tt()}}},v.prototype.illegalAccess=function(m,w){},v.prototype.observe=function(m,w){return Br(this,m)},v.prototype.intercept=function(m){return on(this,m)},v.prototype.getKeys=function(){var m=this;return this.keys===void 0&&(this.keys=new It(Object.keys(this.values).filter(function(w){return m.values[w]instanceof hr}),sr,"keys("+this.name+")",!0)),this.keys.slice()},v}();function To(v,m,w){m===void 0&&(m=""),w===void 0&&(w=gt);var D=v.$mobx;return D||(G(v)||(m=(v.constructor.name||"ObservableObject")+"@"+E()),m||(m="ObservableObject@"+E()),I(v,"$mobx",D=new Pn(v,m,w)),D)}function Xa(v,m,w,D){var T=To(v);if(tr(T)){var W=Vt(T,{object:v,name:m,type:"add",newValue:w});if(!W)return;w=W.newValue}w=(T.values[m]=new hr(w,D,T.name+"."+m,!1)).value,Object.defineProperty(v,m,function(Q){return Mi[Q]||(Mi[Q]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.read(this,Q)},set:function(ce){this.$mobx.write(this,Q,ce)}})}(m)),T.keys&&T.keys.push(m),function(Q,ce,Oe,Te){var xe=$t(Q),Be=lt(),Xe=xe||Be?{type:"add",object:ce,name:Oe,newValue:Te}:null;Be&&Mt(we(we({},Xe),{name:Q.name,key:Oe})),xe&&Rt(Q,Xe),Be&&Wt()}(T,v,m,w)}var Mi=Object.create(null),Ni=Object.create(null);function nr(v){var m=v.$mobx;return m||(ut(v),v.$mobx)}var Bt=F("ObservableObjectAdministration",Pn);function Kt(v){return!!Z(v)&&(ut(v),Bt(v.$mobx))}function or(v,m){if(typeof v=="object"&&v!==null){if(Lt(v))return m!==void 0&&A(!1),v.$mobx.atom;if(wt(v))return v.$mobx;if(zt(v)){var w=v;return m===void 0?w._keysAtom:((D=w._data.get(m)||w._hasMap.get(m))||A(!1),D)}var D;if(ut(v),m&&!v.$mobx&&v[m],Kt(v))return m?((D=v.$mobx.values[m])||A(!1),D):A(!1);if(pe(v)||Lr(v)||Ye(v))return v}else if(typeof v=="function"&&Ye(v.$mobx))return v.$mobx;return A(!1)}function kn(v,m){return v||A("Expecting some object"),m!==void 0?kn(or(v,m)):pe(v)||Lr(v)||Ye(v)||zt(v)||wt(v)?v:(ut(v),v.$mobx?v.$mobx:void A(!1))}function un(v,m){return(m!==void 0?or(v,m):Kt(v)||zt(v)||wt(v)?kn(v):or(v)).name}var Ci=Object.prototype.toString;function Mo(v,m,w){return w===void 0&&(w=-1),function D(T,W,Q,ce,Oe){if(T===W)return T!==0||1/T==1/W;if(T==null||W==null)return!1;if(T!=T)return W!=W;var Te=typeof T;if(Te!=="function"&&Te!=="object"&&typeof W!="object")return!1;T=Ri(T),W=Ri(W);var xe=Ci.call(T);if(xe!==Ci.call(W))return!1;switch(xe){case"[object RegExp]":case"[object String]":return""+T==""+W;case"[object Number]":return+T!=+T?+W!=+W:+T==0?1/+T==1/W:+T==+W;case"[object Date]":case"[object Boolean]":return+T==+W;case"[object Symbol]":return typeof Symbol!="undefined"&&Symbol.valueOf.call(T)===Symbol.valueOf.call(W)}var Be=xe==="[object Array]";if(!Be){if(typeof T!="object"||typeof W!="object")return!1;var Xe=T.constructor,He=W.constructor;if(Xe!==He&&!(typeof Xe=="function"&&Xe instanceof Xe&&typeof He=="function"&&He instanceof He)&&"constructor"in T&&"constructor"in W)return!1}if(Q===0)return!1;Q<0&&(Q=-1),Oe=Oe||[];for(var Qe=(ce=ce||[]).length;Qe--;)if(ce[Qe]===T)return Oe[Qe]===W;if(ce.push(T),Oe.push(W),Be){if((Qe=T.length)!==W.length)return!1;for(;Qe--;)if(!D(T[Qe],W[Qe],Q-1,ce,Oe))return!1}else{var et=Object.keys(T),nt=void 0;if(Qe=et.length,Object.keys(W).length!==Qe)return!1;for(;Qe--;)if(nt=et[Qe],!Ii(W,nt)||!D(T[nt],W[nt],Q-1,ce,Oe))return!1}return ce.pop(),Oe.pop(),!0}(v,m,w)}function Ri(v){return Lt(v)?v.peek():Y(v)||zt(v)||M(v)||wt(v)?C(v.entries()):v}function Ii(v,m){return Object.prototype.hasOwnProperty.call(v,m)}var Xr="$mobx";typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:Eo,extras:{getDebugName:un},$mobx:Xr})}).call(this,u(86),u(104))},function(c,f,u){var p=u(34),y=u(66),b=u(56),x=u(51),S=u(91),P=x.set,E=x.getterFor("Array Iterator");c.exports=S(Array,"Array",function(A,O){P(this,{type:"Array Iterator",target:p(A),index:0,kind:O})},function(){var A=E(this),O=A.target,R=A.kind,X=A.index++;return!O||X>=O.length?(A.target=void 0,{value:void 0,done:!0}):R=="keys"?{value:X,done:!1}:R=="values"?{value:O[X],done:!1}:{value:[X,O[X]],done:!1}},"values"),b.Arguments=b.Array,y("keys"),y("values"),y("entries")},function(c,f,u){var p=u(15),y=u(23),b=u(45),x=u(68),S=u(28),P=u(89),E=u(16),A=u(27),O=u(80),R=u(24),X=u(53),Z=u(25),G=u(31),U=u(34),I=u(72),F=u(33),Y=u(57),M=u(46),C=u(54),L=u(58),z=u(117),B=u(92),J=u(47),ee=u(29),ne=u(75),ae=u(39),ge=u(43),fe=u(67),pe=u(74),se=u(55),le=u(69),ye=u(21),he=u(128),ke=u(129),we=u(77),Fe=u(51),We=u(60).forEach,ze=pe("hidden"),Ut=ye("toPrimitive"),ur=Fe.set,ut=Fe.getterFor("Symbol"),Ue=Object.prototype,dt=y.Symbol,gt=b("JSON","stringify"),sr=J.f,jt=ee.f,Yr=z.f,cr=ne.f,Ot=fe("symbols"),er=fe("op-symbols"),lr=fe("string-to-symbol-registry"),Vr=fe("symbol-to-string-registry"),zn=fe("wks"),Cr=y.QObject,qe=!Cr||!Cr.prototype||!Cr.prototype.findChild,Dt=S&&E(function(){return M(jt({},"a",{get:function(){return jt(this,"a",{value:7}).a}})).a!=7})?function(be,je,De){var Re=sr(Ue,je);Re&&delete Ue[je],jt(be,je,De),Re&&be!==Ue&&jt(Ue,je,Re)}:jt,Ce=function(be,je){var De=Ot[be]=M(dt.prototype);return ur(De,{type:"Symbol",tag:be,description:je}),S||(De.description=je),De},ct=function(be,je,De){be===Ue&&ct(er,je,De),Z(be);var Re=I(je);return Z(De),A(Ot,Re)?(De.enumerable?(A(be,ze)&&be[ze][Re]&&(be[ze][Re]=!1),De=M(De,{enumerable:Y(0,!1)})):(A(be,ze)||jt(be,ze,Y(1,{})),be[ze][Re]=!0),Dt(be,Re,De)):jt(be,Re,De)},fr=function(be,je){Z(be);var De=U(je),Re=C(De).concat(Gt(De));return We(Re,function(it){S&&!Rr.call(De,it)||ct(be,it,De[it])}),be},Rr=function(be){var je=I(be),De=cr.call(this,je);return!(this===Ue&&A(Ot,je)&&!A(er,je))&&(!(De||!A(this,je)||!A(Ot,je)||A(this,ze)&&this[ze][je])||De)},$r=function(be,je){var De=U(be),Re=I(je);if(De!==Ue||!A(Ot,Re)||A(er,Re)){var it=sr(De,Re);return!it||!A(Ot,Re)||A(De,ze)&&De[ze][Re]||(it.enumerable=!0),it}},wr=function(be){var je=Yr(U(be)),De=[];return We(je,function(Re){A(Ot,Re)||A(se,Re)||De.push(Re)}),De},Gt=function(be){var je=be===Ue,De=Yr(je?er:U(be)),Re=[];return We(De,function(it){!A(Ot,it)||je&&!A(Ue,it)||Re.push(Ot[it])}),Re};P||(ge((dt=function(){if(this instanceof dt)throw TypeError("Symbol is not a constructor");var be=arguments.length&&arguments[0]!==void 0?F(arguments[0]):void 0,je=le(be),De=function(Re){this===Ue&&De.call(er,Re),A(this,ze)&&A(this[ze],je)&&(this[ze][je]=!1),Dt(this,je,Y(1,Re))};return S&&qe&&Dt(Ue,je,{configurable:!0,set:De}),Ce(je,be)}).prototype,"toString",function(){return ut(this).tag}),ge(dt,"withoutSetter",function(be){return Ce(le(be),be)}),ne.f=Rr,ee.f=ct,J.f=$r,L.f=z.f=wr,B.f=Gt,he.f=function(be){return Ce(ye(be),be)},S&&(jt(dt.prototype,"description",{configurable:!0,get:function(){return ut(this).description}}),x||ge(Ue,"propertyIsEnumerable",Rr,{unsafe:!0}))),p({global:!0,wrap:!0,forced:!P,sham:!P},{Symbol:dt}),We(C(zn),function(be){ke(be)}),p({target:"Symbol",stat:!0,forced:!P},{for:function(be){var je=F(be);if(A(lr,je))return lr[je];var De=dt(je);return lr[je]=De,Vr[De]=je,De},keyFor:function(be){if(!X(be))throw TypeError(be+" is not a symbol");if(A(Vr,be))return Vr[be]},useSetter:function(){qe=!0},useSimple:function(){qe=!1}}),p({target:"Object",stat:!0,forced:!P,sham:!S},{create:function(be,je){return je===void 0?M(be):fr(M(be),je)},defineProperty:ct,defineProperties:fr,getOwnPropertyDescriptor:$r}),p({target:"Object",stat:!0,forced:!P},{getOwnPropertyNames:wr,getOwnPropertySymbols:Gt}),p({target:"Object",stat:!0,forced:E(function(){B.f(1)})},{getOwnPropertySymbols:function(be){return B.f(G(be))}}),gt&&p({target:"JSON",stat:!0,forced:!P||E(function(){var be=dt();return gt([be])!="[null]"||gt({a:be})!="{}"||gt(Object(be))!="{}"})},{stringify:function(be,je,De){for(var Re,it=[be],Ir=1;arguments.length>Ir;)it.push(arguments[Ir++]);if(Re=je,(R(je)||be!==void 0)&&!X(be))return O(je)||(je=function(xr,Pt){if(typeof Re=="function"&&(Pt=Re.call(this,xr,Pt)),!X(Pt))return Pt}),it[1]=je,gt.apply(null,it)}}),dt.prototype[Ut]||ae(dt.prototype,Ut,dt.prototype.valueOf),we(dt,"Symbol"),se[ze]=!0},function(c,f,u){var p=u(96),y=u(43),b=u(153);p||y(Object.prototype,"toString",b,{unsafe:!0})},function(c,f,u){var p=u(23),y=u(127),b=u(1),x=u(39),S=u(21),P=S("iterator"),E=S("toStringTag"),A=b.values;for(var O in y){var R=p[O],X=R&&R.prototype;if(X){if(X[P]!==A)try{x(X,P,A)}catch(G){X[P]=A}if(X[E]||x(X,E,O),y[O]){for(var Z in b)if(X[Z]!==b[Z])try{x(X,Z,b[Z])}catch(G){X[Z]=b[Z]}}}}},function(c,f,u){var p=u(126).charAt,y=u(33),b=u(51),x=u(91),S=b.set,P=b.getterFor("String Iterator");x(String,"String",function(E){S(this,{type:"String Iterator",string:y(E),index:0})},function(){var E,A=P(this),O=A.string,R=A.index;return R>=O.length?{value:void 0,done:!0}:(E=p(O,R),A.index+=E.length,{value:E,done:!1})})},function(c,f,u){var p=u(15),y=u(28),b=u(23),x=u(27),S=u(24),P=u(29).f,E=u(112),A=b.Symbol;if(y&&typeof A=="function"&&(!("description"in A.prototype)||A().description!==void 0)){var O={},R=function(){var I=arguments.length<1||arguments[0]===void 0?void 0:String(arguments[0]),F=this instanceof R?new A(I):I===void 0?A():A(I);return I===""&&(O[F]=!0),F};E(R,A);var X=R.prototype=A.prototype;X.constructor=R;var Z=X.toString,G=String(A("test"))=="Symbol(test)",U=/^Symbol\((.*)\)[^)]+$/;P(X,"description",{configurable:!0,get:function(){var I=S(this)?this.valueOf():this,F=Z.call(I);if(x(O,I))return"";var Y=G?F.slice(7,-1):F.replace(U,"$1");return Y===""?void 0:Y}}),p({global:!0,forced:!0},{Symbol:R})}},function(c,f,u){u(129)("iterator")},function(c,f,u){var p=u(23),y=u(127),b=u(154),x=u(39);for(var S in y){var P=p[S],E=P&&P.prototype;if(E&&E.forEach!==b)try{x(E,"forEach",b)}catch(A){E.forEach=b}}},function(c,f,u){u(15)({target:"Object",stat:!0},{setPrototypeOf:u(94)})},function(c,f,u){var p=u(15),y=u(16),b=u(31),x=u(76),S=u(115);p({target:"Object",stat:!0,forced:y(function(){x(1)}),sham:!S},{getPrototypeOf:function(P){return x(b(P))}})},function(c,f,u){var p=u(15),y=u(45),b=u(59),x=u(25),S=u(24),P=u(46),E=u(172),A=u(16),O=y("Reflect","construct"),R=A(function(){function G(){}return!(O(function(){},[],G)instanceof G)}),X=!A(function(){O(function(){})}),Z=R||X;p({target:"Reflect",stat:!0,forced:Z,sham:Z},{construct:function(G,U){b(G),x(U);var I=arguments.length<3?G:b(arguments[2]);if(X&&!R)return O(G,U,I);if(G==I){switch(U.length){case 0:return new G;case 1:return new G(U[0]);case 2:return new G(U[0],U[1]);case 3:return new G(U[0],U[1],U[2]);case 4:return new G(U[0],U[1],U[2],U[3])}var F=[null];return F.push.apply(F,U),new(E.apply(G,F))}var Y=I.prototype,M=P(S(Y)?Y:Object.prototype),C=Function.apply.call(G,M,U);return S(C)?C:M}})},function(c,f,u){var p=u(15),y=u(31),b=u(54);p({target:"Object",stat:!0,forced:u(16)(function(){b(1)})},{keys:function(x){return b(y(x))}})},function(c,f,u){var p=u(15),y=u(16),b=u(34),x=u(47).f,S=u(28),P=y(function(){x(1)});p({target:"Object",stat:!0,forced:!S||P,sham:!S},{getOwnPropertyDescriptor:function(E,A){return x(b(E),A)}})},function(c,f,u){var p=u(15),y=u(24),b=u(80),x=u(73),S=u(32),P=u(34),E=u(62),A=u(21),O=u(61)("slice"),R=A("species"),X=[].slice,Z=Math.max;p({target:"Array",proto:!0,forced:!O},{slice:function(G,U){var I,F,Y,M=P(this),C=S(M.length),L=x(G,C),z=x(U===void 0?C:U,C);if(b(M)&&(typeof(I=M.constructor)!="function"||I!==Array&&!b(I.prototype)?y(I)&&(I=I[R])===null&&(I=void 0):I=void 0,I===Array||I===void 0))return X.call(M,L,z);for(F=new(I===void 0?Array:I)(Z(z-L,0)),Y=0;L<z;L++,Y++)L in M&&E(F,Y,M[L]);return F.length=Y,F}})},function(c,f,u){var p=u(23),y=u(47).f,b=u(39),x=u(43),S=u(88),P=u(112),E=u(93);c.exports=function(A,O){var R,X,Z,G,U,I=A.target,F=A.global,Y=A.stat;if(R=F?p:Y?p[I]||S(I,{}):(p[I]||{}).prototype)for(X in O){if(G=O[X],Z=A.noTargetGet?(U=y(R,X))&&U.value:R[X],!E(F?X:I+(Y?".":"#")+X,A.forced)&&Z!==void 0){if(typeof G==typeof Z)continue;P(G,Z)}(A.sham||Z&&Z.sham)&&b(G,"sham",!0),x(R,X,G,A)}}},function(c,f){c.exports=function(u){try{return!!u()}catch(p){return!0}}},function(c,f,u){var p=u(28),y=u(29).f,b=Function.prototype,x=b.toString,S=/^\s*function ([^ (]*)/;p&&!("name"in b)&&y(b,"name",{configurable:!0,get:function(){try{return x.call(this).match(S)[1]}catch(P){return""}}})},function(c,f,u){var p=u(15),y=u(157);p({target:"Array",stat:!0,forced:!u(124)(function(b){Array.from(b)})},{from:y})},function(c,f,u){var p=u(15),y=u(60).filter;p({target:"Array",proto:!0,forced:!u(61)("filter")},{filter:function(b){return y(this,b,arguments.length>1?arguments[1]:void 0)}})},function(c,f,u){var p=u(15),y=u(28),b=u(113),x=u(34),S=u(47),P=u(62);p({target:"Object",stat:!0,sham:!y},{getOwnPropertyDescriptors:function(E){for(var A,O,R=x(E),X=S.f,Z=b(R),G={},U=0;Z.length>U;)(O=X(R,A=Z[U++]))!==void 0&&P(G,A,O);return G}})},function(c,f,u){var p=u(23),y=u(67),b=u(27),x=u(69),S=u(89),P=u(105),E=y("wks"),A=p.Symbol,O=P?A:A&&A.withoutSetter||x;c.exports=function(R){return b(E,R)&&(S||typeof E[R]=="string")||(S&&b(A,R)?E[R]=A[R]:E[R]=O("Symbol."+R)),E[R]}},function(c,f,u){var p=u(85),y=typeof self=="object"&&self&&self.Object===Object&&self,b=p.a||y||Function("return this")();f.a=b},function(c,f,u){(function(p){var y=function(b){return b&&b.Math==Math&&b};c.exports=y(typeof globalThis=="object"&&globalThis)||y(typeof window=="object"&&window)||y(typeof self=="object"&&self)||y(typeof p=="object"&&p)||function(){return this}()||Function("return this")()}).call(this,u(86))},function(c,f){c.exports=function(u){return typeof u=="object"?u!==null:typeof u=="function"}},function(c,f,u){var p=u(24);c.exports=function(y){if(!p(y))throw TypeError(String(y)+" is not an object");return y}},,function(c,f,u){var p=u(31),y={}.hasOwnProperty;c.exports=Object.hasOwn||function(b,x){return y.call(p(b),x)}},function(c,f,u){var p=u(16);c.exports=!p(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},function(c,f,u){var p=u(28),y=u(106),b=u(25),x=u(72),S=Object.defineProperty;f.f=p?S:function(P,E,A){if(b(P),E=x(E),b(A),y)try{return S(P,E,A)}catch(O){}if("get"in A||"set"in A)throw TypeError("Accessors not supported");return"value"in A&&(P[E]=A.value),P}},function(c,f,u){var p=u(15),y=u(16),b=u(80),x=u(24),S=u(31),P=u(32),E=u(62),A=u(97),O=u(61),R=u(21),X=u(70),Z=R("isConcatSpreadable"),G=X>=51||!y(function(){var F=[];return F[Z]=!1,F.concat()[0]!==F}),U=O("concat"),I=function(F){if(!x(F))return!1;var Y=F[Z];return Y!==void 0?!!Y:b(F)};p({target:"Array",proto:!0,forced:!G||!U},{concat:function(F){var Y,M,C,L,z,B=S(this),J=A(B,0),ee=0;for(Y=-1,C=arguments.length;Y<C;Y++)if(I(z=Y===-1?B:arguments[Y])){if(ee+(L=P(z.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(M=0;M<L;M++,ee++)M in z&&E(J,ee,z[M])}else{if(ee>=9007199254740991)throw TypeError("Maximum allowed index exceeded");E(J,ee++,z)}return J.length=ee,J}})},function(c,f,u){var p=u(38);c.exports=function(y){return Object(p(y))}},function(c,f,u){var p=u(50),y=Math.min;c.exports=function(b){return b>0?y(p(b),9007199254740991):0}},function(c,f,u){var p=u(53);c.exports=function(y){if(p(y))throw TypeError("Cannot convert a Symbol value to a string");return String(y)}},function(c,f,u){var p=u(65),y=u(38);c.exports=function(b){return p(y(b))}},function(c,f,u){var p=u(15),y=u(60).map;p({target:"Array",proto:!0,forced:!u(61)("map")},{map:function(b){return y(this,b,arguments.length>1?arguments[1]:void 0)}})},function(c,f,u){var p=u(15),y=u(173);p({target:"Object",stat:!0,forced:Object.assign!==y},{assign:y})},function(c,f,u){var p=u(15),y=u(24),b=u(25),x=u(177),S=u(47),P=u(76);p({target:"Reflect",stat:!0},{get:function E(A,O){var R,X,Z=arguments.length<3?A:arguments[2];return b(A)===Z?A[O]:(R=S.f(A,O))?x(R)?R.value:R.get===void 0?void 0:R.get.call(Z):y(X=P(A))?E(X,O,Z):void 0}})},function(c,f){c.exports=function(u){if(u==null)throw TypeError("Can't call method on "+u);return u}},function(c,f,u){var p=u(28),y=u(29),b=u(57);c.exports=p?function(x,S,P){return y.f(x,S,b(1,P))}:function(x,S,P){return x[S]=P,x}},function(c,f,u){var p=u(15),y=u(83);p({target:"RegExp",proto:!0,forced:/./.exec!==y},{exec:y})},function(c,f,u){var p=u(15),y=u(181),b=u(66);p({target:"Array",proto:!0},{fill:y}),b("fill")},function(c,f,u){(function(p){var y=u(85),b=d&&!d.nodeType&&d,x=b&&typeof p=="object"&&p&&!p.nodeType&&p,S=x&&x.exports===b&&y.a.process,P=function(){try{var E=x&&x.require&&x.require("util").types;return E||S&&S.binding&&S.binding("util")}catch(A){}}();f.a=P}).call(this,u(99)(c))},function(c,f,u){var p=u(23),y=u(39),b=u(27),x=u(88),S=u(111),P=u(51),E=P.get,A=P.enforce,O=String(String).split("String");(c.exports=function(R,X,Z,G){var U,I=!!G&&!!G.unsafe,F=!!G&&!!G.enumerable,Y=!!G&&!!G.noTargetGet;typeof Z=="function"&&(typeof X!="string"||b(Z,"name")||y(Z,"name",X),(U=A(Z)).source||(U.source=O.join(typeof X=="string"?X:""))),R!==p?(I?!Y&&R[X]&&(F=!0):delete R[X],F?R[X]=Z:y(R,X,Z)):F?R[X]=Z:x(X,Z)})(Function.prototype,"toString",function(){return typeof this=="function"&&E(this).source||S(this)})},function(c,f,u){var p=u(15),y=u(180).entries;p({target:"Object",stat:!0},{entries:function(b){return y(b)}})},function(c,f,u){var p=u(23),y=function(b){return typeof b=="function"?b:void 0};c.exports=function(b,x){return arguments.length<2?y(p[b]):p[b]&&p[b][x]}},function(c,f,u){var p,y=u(25),b=u(142),x=u(90),S=u(55),P=u(144),E=u(107),A=u(74),O=A("IE_PROTO"),R=function(){},X=function(U){return"<script>"+U+"<\/script>"},Z=function(U){U.write(X("")),U.close();var I=U.parentWindow.Object;return U=null,I},G=function(){try{p=new ActiveXObject("htmlfile")}catch(Y){}var U,I;G=typeof document!="undefined"?document.domain&&p?Z(p):((I=E("iframe")).style.display="none",P.appendChild(I),I.src="javascript:",(U=I.contentWindow.document).open(),U.write(X("document.F=Object")),U.close(),U.F):Z(p);for(var F=x.length;F--;)delete G.prototype[x[F]];return G()};S[O]=!0,c.exports=Object.create||function(U,I){var F;return U!==null?(R.prototype=y(U),F=new R,R.prototype=null,F[O]=U):F=G(),I===void 0?F:b(F,I)}},function(c,f,u){var p=u(28),y=u(75),b=u(57),x=u(34),S=u(72),P=u(27),E=u(106),A=Object.getOwnPropertyDescriptor;f.f=p?A:function(O,R){if(O=x(O),R=S(R),E)try{return A(O,R)}catch(X){}if(P(O,R))return b(!y.f.call(O,R),O[R])}},function(c,f,u){(function(p){var y=u(22),b=u(138),x=d&&!d.nodeType&&d,S=x&&typeof p=="object"&&p&&!p.nodeType&&p,P=S&&S.exports===x?y.a.Buffer:void 0,E=(P?P.isBuffer:void 0)||b.a;f.a=E}).call(this,u(99)(c))},function(c,f){var u={}.toString;c.exports=function(p){return u.call(p).slice(8,-1)}},function(c,f){var u=Math.ceil,p=Math.floor;c.exports=function(y){return isNaN(y=+y)?0:(y>0?p:u)(y)}},function(c,f,u){var p,y,b,x=u(145),S=u(23),P=u(24),E=u(39),A=u(27),O=u(87),R=u(74),X=u(55),Z=S.WeakMap;if(x||O.state){var G=O.state||(O.state=new Z),U=G.get,I=G.has,F=G.set;p=function(M,C){if(I.call(G,M))throw new TypeError("Object already initialized");return C.facade=M,F.call(G,M,C),C},y=function(M){return U.call(G,M)||{}},b=function(M){return I.call(G,M)}}else{var Y=R("state");X[Y]=!0,p=function(M,C){if(A(M,Y))throw new TypeError("Object already initialized");return C.facade=M,E(M,Y,C),C},y=function(M){return A(M,Y)?M[Y]:{}},b=function(M){return A(M,Y)}}c.exports={set:p,get:y,has:b,enforce:function(M){return b(M)?y(M):p(M,{})},getterFor:function(M){return function(C){var L;if(!P(C)||(L=y(C)).type!==M)throw TypeError("Incompatible receiver, "+M+" required");return L}}}},function(c,f,u){var p=u(100),y=u(132),b=u(25),x=u(38),S=u(170),P=u(101),E=u(32),A=u(33),O=u(102),R=u(83),X=u(133),Z=u(16),G=X.UNSUPPORTED_Y,U=[].push,I=Math.min;p("split",function(F,Y,M){var C;return C="abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?function(L,z){var B=A(x(this)),J=z===void 0?4294967295:z>>>0;if(J===0)return[];if(L===void 0)return[B];if(!y(L))return Y.call(B,L,J);for(var ee,ne,ae,ge=[],fe=(L.ignoreCase?"i":"")+(L.multiline?"m":"")+(L.unicode?"u":"")+(L.sticky?"y":""),pe=0,se=new RegExp(L.source,fe+"g");(ee=R.call(se,B))&&!((ne=se.lastIndex)>pe&&(ge.push(B.slice(pe,ee.index)),ee.length>1&&ee.index<B.length&&U.apply(ge,ee.slice(1)),ae=ee[0].length,pe=ne,ge.length>=J));)se.lastIndex===ee.index&&se.lastIndex++;return pe===B.length?!ae&&se.test("")||ge.push(""):ge.push(B.slice(pe)),ge.length>J?ge.slice(0,J):ge}:"0".split(void 0,0).length?function(L,z){return L===void 0&&z===0?[]:Y.call(this,L,z)}:Y,[function(L,z){var B=x(this),J=L==null?void 0:L[F];return J!==void 0?J.call(L,B,z):C.call(A(B),L,z)},function(L,z){var B=b(this),J=A(L),ee=M(C,B,J,z,C!==Y);if(ee.done)return ee.value;var ne=S(B,RegExp),ae=B.unicode,ge=(B.ignoreCase?"i":"")+(B.multiline?"m":"")+(B.unicode?"u":"")+(G?"g":"y"),fe=new ne(G?"^(?:"+B.source+")":B,ge),pe=z===void 0?4294967295:z>>>0;if(pe===0)return[];if(J.length===0)return O(fe,J)===null?[J]:[];for(var se=0,le=0,ye=[];le<J.length;){fe.lastIndex=G?0:le;var he,ke=O(fe,G?J.slice(le):J);if(ke===null||(he=I(E(fe.lastIndex+(G?le:0)),J.length))===se)le=P(J,le,ae);else{if(ye.push(J.slice(se,le)),ye.length===pe)return ye;for(var we=1;we<=ke.length-1;we++)if(ye.push(ke[we]),ye.length===pe)return ye;le=se=he}}return ye.push(J.slice(se)),ye}]},!!Z(function(){var F=/(?:)/,Y=F.exec;F.exec=function(){return Y.apply(this,arguments)};var M="ab".split(F);return M.length!==2||M[0]!=="a"||M[1]!=="b"}),G)},function(c,f,u){var p=u(45),y=u(105);c.exports=y?function(b){return typeof b=="symbol"}:function(b){var x=p("Symbol");return typeof x=="function"&&Object(b)instanceof x}},function(c,f,u){var p=u(109),y=u(90);c.exports=Object.keys||function(b){return p(b,y)}},function(c,f){c.exports={}},function(c,f){c.exports={}},function(c,f){c.exports=function(u,p){return{enumerable:!(1&u),configurable:!(2&u),writable:!(4&u),value:p}}},function(c,f,u){var p=u(109),y=u(90).concat("length","prototype");f.f=Object.getOwnPropertyNames||function(b){return p(b,y)}},function(c,f){c.exports=function(u){if(typeof u!="function")throw TypeError(String(u)+" is not a function");return u}},function(c,f,u){var p=u(79),y=u(65),b=u(31),x=u(32),S=u(97),P=[].push,E=function(A){var O=A==1,R=A==2,X=A==3,Z=A==4,G=A==6,U=A==7,I=A==5||G;return function(F,Y,M,C){for(var L,z,B=b(F),J=y(B),ee=p(Y,M,3),ne=x(J.length),ae=0,ge=C||S,fe=O?ge(F,ne):R||U?ge(F,0):void 0;ne>ae;ae++)if((I||ae in J)&&(z=ee(L=J[ae],ae,B),A))if(O)fe[ae]=z;else if(z)switch(A){case 3:return!0;case 5:return L;case 6:return ae;case 2:P.call(fe,L)}else switch(A){case 4:return!1;case 7:P.call(fe,L)}return G?-1:X||Z?Z:fe}};c.exports={forEach:E(0),map:E(1),filter:E(2),some:E(3),every:E(4),find:E(5),findIndex:E(6),filterReject:E(7)}},function(c,f,u){var p=u(16),y=u(21),b=u(70),x=y("species");c.exports=function(S){return b>=51||!p(function(){var P=[];return(P.constructor={})[x]=function(){return{foo:1}},P[S](Boolean).foo!==1})}},function(c,f,u){var p=u(72),y=u(29),b=u(57);c.exports=function(x,S,P){var E=p(S);E in x?y.f(x,E,b(0,P)):x[E]=P}},function(c,f,u){var p=u(28),y=u(23),b=u(93),x=u(43),S=u(27),P=u(49),E=u(125),A=u(53),O=u(108),R=u(16),X=u(46),Z=u(58).f,G=u(47).f,U=u(29).f,I=u(134).trim,F=y.Number,Y=F.prototype,M=P(X(Y))=="Number",C=function(ee){if(A(ee))throw TypeError("Cannot convert a Symbol value to a number");var ne,ae,ge,fe,pe,se,le,ye,he=O(ee,"number");if(typeof he=="string"&&he.length>2){if((ne=(he=I(he)).charCodeAt(0))===43||ne===45){if((ae=he.charCodeAt(2))===88||ae===120)return NaN}else if(ne===48){switch(he.charCodeAt(1)){case 66:case 98:ge=2,fe=49;break;case 79:case 111:ge=8,fe=55;break;default:return+he}for(se=(pe=he.slice(2)).length,le=0;le<se;le++)if((ye=pe.charCodeAt(le))<48||ye>fe)return NaN;return parseInt(pe,ge)}}return+he};if(b("Number",!F(" 0o1")||!F("0b1")||F("+0x1"))){for(var L,z=function(ee){var ne=arguments.length<1?0:ee,ae=this;return ae instanceof z&&(M?R(function(){Y.valueOf.call(ae)}):P(ae)!="Number")?E(new F(C(ne)),ae,z):C(ne)},B=p?Z(F):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),J=0;B.length>J;J++)S(F,L=B[J])&&!S(z,L)&&U(z,L,G(F,L));z.prototype=Y,Y.constructor=z,x(y,"Number",z)}},function(c,f,u){u(15)({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(c,f,u){var p=u(16),y=u(49),b="".split;c.exports=p(function(){return!Object("z").propertyIsEnumerable(0)})?function(x){return y(x)=="String"?b.call(x,""):Object(x)}:Object},function(c,f,u){var p=u(21),y=u(46),b=u(29),x=p("unscopables"),S=Array.prototype;S[x]==null&&b.f(S,x,{configurable:!0,value:y(null)}),c.exports=function(P){S[x][P]=!0}},function(c,f,u){var p=u(68),y=u(87);(c.exports=function(b,x){return y[b]||(y[b]=x!==void 0?x:{})})("versions",[]).push({version:"3.17.2",mode:p?"pure":"global",copyright:"\xA9 2021 Denis Pushkarev (zloirock.ru)"})},function(c,f){c.exports=!1},function(c,f){var u=0,p=Math.random();c.exports=function(y){return"Symbol("+String(y===void 0?"":y)+")_"+(++u+p).toString(36)}},function(c,f,u){var p,y,b=u(23),x=u(71),S=b.process,P=b.Deno,E=S&&S.versions||P&&P.version,A=E&&E.v8;A?y=(p=A.split("."))[0]<4?1:p[0]+p[1]:x&&(!(p=x.match(/Edge\/(\d+)/))||p[1]>=74)&&(p=x.match(/Chrome\/(\d+)/))&&(y=p[1]),c.exports=y&&+y},function(c,f,u){var p=u(45);c.exports=p("navigator","userAgent")||""},function(c,f,u){var p=u(108),y=u(53);c.exports=function(b){var x=p(b,"string");return y(x)?x:String(x)}},function(c,f,u){var p=u(50),y=Math.max,b=Math.min;c.exports=function(x,S){var P=p(x);return P<0?y(P+S,0):b(P,S)}},function(c,f,u){var p=u(67),y=u(69),b=p("keys");c.exports=function(x){return b[x]||(b[x]=y(x))}},function(c,f,u){var p={}.propertyIsEnumerable,y=Object.getOwnPropertyDescriptor,b=y&&!p.call({1:2},1);f.f=b?function(x){var S=y(this,x);return!!S&&S.enumerable}:p},function(c,f,u){var p=u(27),y=u(31),b=u(74),x=u(115),S=b("IE_PROTO"),P=Object.prototype;c.exports=x?Object.getPrototypeOf:function(E){return E=y(E),p(E,S)?E[S]:typeof E.constructor=="function"&&E instanceof E.constructor?E.constructor.prototype:E instanceof Object?P:null}},function(c,f,u){var p=u(29).f,y=u(27),b=u(21)("toStringTag");c.exports=function(x,S,P){x&&!y(x=P?x:x.prototype,b)&&p(x,b,{configurable:!0,value:S})}},function(c,f,u){var p=u(148),y=u(150);c.exports=p("Map",function(b){return function(){return b(this,arguments.length?arguments[0]:void 0)}},y)},function(c,f,u){var p=u(59);c.exports=function(y,b,x){if(p(y),b===void 0)return y;switch(x){case 0:return function(){return y.call(b)};case 1:return function(S){return y.call(b,S)};case 2:return function(S,P){return y.call(b,S,P)};case 3:return function(S,P,E){return y.call(b,S,P,E)}}return function(){return y.apply(b,arguments)}}},function(c,f,u){var p=u(49);c.exports=Array.isArray||function(y){return p(y)=="Array"}},function(c,f,u){var p=u(15),y=u(73),b=u(50),x=u(32),S=u(31),P=u(97),E=u(62),A=u(61)("splice"),O=Math.max,R=Math.min;p({target:"Array",proto:!0,forced:!A},{splice:function(X,Z){var G,U,I,F,Y,M,C=S(this),L=x(C.length),z=y(X,L),B=arguments.length;if(B===0?G=U=0:B===1?(G=0,U=L-z):(G=B-2,U=R(O(b(Z),0),L-z)),L+G-U>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(I=P(C,U),F=0;F<U;F++)(Y=z+F)in C&&E(I,F,C[Y]);if(I.length=U,G<U){for(F=z;F<L-U;F++)M=F+G,(Y=F+U)in C?C[M]=C[Y]:delete C[M];for(F=L;F>L-U+G;F--)delete C[F-1]}else if(G>U)for(F=L-U;F>z;F--)M=F+G-1,(Y=F+U-1)in C?C[M]=C[Y]:delete C[M];for(F=0;F<G;F++)C[F+z]=arguments[F+2];return C.length=L-U+G,I}})},function(c,f,u){var p=u(15),y=u(65),b=u(34),x=u(98),S=[].join,P=y!=Object,E=x("join",",");p({target:"Array",proto:!0,forced:P||!E},{join:function(A){return S.call(b(this),A===void 0?",":A)}})},function(c,f,u){var p,y,b=u(33),x=u(167),S=u(133),P=u(67),E=u(46),A=u(51).get,O=u(168),R=u(169),X=RegExp.prototype.exec,Z=P("native-string-replace",String.prototype.replace),G=X,U=(p=/a/,y=/b*/g,X.call(p,"a"),X.call(y,"a"),p.lastIndex!==0||y.lastIndex!==0),I=S.UNSUPPORTED_Y||S.BROKEN_CARET,F=/()??/.exec("")[1]!==void 0;(U||F||I||O||R)&&(G=function(Y){var M,C,L,z,B,J,ee,ne=this,ae=A(ne),ge=b(Y),fe=ae.raw;if(fe)return fe.lastIndex=ne.lastIndex,M=G.call(fe,ge),ne.lastIndex=fe.lastIndex,M;var pe=ae.groups,se=I&&ne.sticky,le=x.call(ne),ye=ne.source,he=0,ke=ge;if(se&&((le=le.replace("y","")).indexOf("g")===-1&&(le+="g"),ke=ge.slice(ne.lastIndex),ne.lastIndex>0&&(!ne.multiline||ne.multiline&&ge.charAt(ne.lastIndex-1)!==`
|
|
`)&&(ye="(?: "+ye+")",ke=" "+ke,he++),C=new RegExp("^(?:"+ye+")",le)),F&&(C=new RegExp("^"+ye+"$(?!\\s)",le)),U&&(L=ne.lastIndex),z=X.call(se?C:ne,ke),se?z?(z.input=z.input.slice(he),z[0]=z[0].slice(he),z.index=ne.lastIndex,ne.lastIndex+=z[0].length):ne.lastIndex=0:U&&z&&(ne.lastIndex=ne.global?z.index+z[0].length:L),F&&z&&z.length>1&&Z.call(z[0],C,function(){for(B=1;B<arguments.length-2;B++)arguments[B]===void 0&&(z[B]=void 0)}),z&&pe)for(z.groups=J=E(null),B=0;B<pe.length;B++)J[(ee=pe[B])[0]]=z[ee[1]];return z}),c.exports=G},function(c,f,u){var p=u(15),y=u(174);p({target:"String",proto:!0,forced:u(175)("anchor")},{anchor:function(b){return y(this,"a","name",b)}})},function(c,f,u){(function(p){var y=typeof p=="object"&&p&&p.Object===Object&&p;f.a=y}).call(this,u(86))},function(c,f){var u;u=function(){return this}();try{u=u||new Function("return this")()}catch(p){typeof window=="object"&&(u=window)}c.exports=u},function(c,f,u){var p=u(23),y=u(88),b=p["__core-js_shared__"]||y("__core-js_shared__",{});c.exports=b},function(c,f,u){var p=u(23);c.exports=function(y,b){try{Object.defineProperty(p,y,{value:b,configurable:!0,writable:!0})}catch(x){p[y]=b}return b}},function(c,f,u){var p=u(70),y=u(16);c.exports=!!Object.getOwnPropertySymbols&&!y(function(){var b=Symbol();return!String(b)||!(Object(b)instanceof Symbol)||!Symbol.sham&&p&&p<41})},function(c,f){c.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(c,f,u){var p=u(15),y=u(146),b=u(76),x=u(94),S=u(77),P=u(39),E=u(43),A=u(21),O=u(68),R=u(56),X=u(114),Z=X.IteratorPrototype,G=X.BUGGY_SAFARI_ITERATORS,U=A("iterator"),I=function(){return this};c.exports=function(F,Y,M,C,L,z,B){y(M,Y,C);var J,ee,ne,ae=function(he){if(he===L&&le)return le;if(!G&&he in pe)return pe[he];switch(he){case"keys":case"values":case"entries":return function(){return new M(this,he)}}return function(){return new M(this)}},ge=Y+" Iterator",fe=!1,pe=F.prototype,se=pe[U]||pe["@@iterator"]||L&&pe[L],le=!G&&se||ae(L),ye=Y=="Array"&&pe.entries||se;if(ye&&(J=b(ye.call(new F)),Z!==Object.prototype&&J.next&&(O||b(J)===Z||(x?x(J,Z):typeof J[U]!="function"&&P(J,U,I)),S(J,ge,!0,!0),O&&(R[ge]=I))),L=="values"&&se&&se.name!=="values"&&(fe=!0,le=function(){return se.call(this)}),O&&!B||pe[U]===le||P(pe,U,le),R[Y]=le,L)if(ee={values:ae("values"),keys:z?le:ae("keys"),entries:ae("entries")},B)for(ne in ee)(G||fe||!(ne in pe))&&E(pe,ne,ee[ne]);else p({target:Y,proto:!0,forced:G||fe},ee);return ee}},function(c,f){f.f=Object.getOwnPropertySymbols},function(c,f,u){var p=u(16),y=/#|\.prototype\./,b=function(A,O){var R=S[x(A)];return R==E||R!=P&&(typeof O=="function"?p(O):!!O)},x=b.normalize=function(A){return String(A).replace(y,".").toLowerCase()},S=b.data={},P=b.NATIVE="N",E=b.POLYFILL="P";c.exports=b},function(c,f,u){var p=u(25),y=u(147);c.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var b,x=!1,S={};try{(b=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(S,[]),x=S instanceof Array}catch(P){}return function(P,E){return p(P),y(E),x?b.call(P,E):P.__proto__=E,P}}():void 0)},function(c,f,u){var p=u(121),y=u(56),b=u(21)("iterator");c.exports=function(x){if(x!=null)return x[b]||x["@@iterator"]||y[p(x)]}},function(c,f,u){var p={};p[u(21)("toStringTag")]="z",c.exports=String(p)==="[object z]"},function(c,f,u){var p=u(155);c.exports=function(y,b){return new(p(y))(b===0?0:b)}},function(c,f,u){var p=u(16);c.exports=function(y,b){var x=[][y];return!!x&&p(function(){x.call(null,b||function(){throw 1},1)})}},function(c,f){c.exports=function(u){if(!u.webpackPolyfill){var p=Object.create(u);p.children||(p.children=[]),Object.defineProperty(p,"loaded",{enumerable:!0,get:function(){return p.l}}),Object.defineProperty(p,"id",{enumerable:!0,get:function(){return p.i}}),Object.defineProperty(p,"exports",{enumerable:!0}),p.webpackPolyfill=1}return p}},function(c,f,u){u(40);var p=u(43),y=u(83),b=u(16),x=u(21),S=u(39),P=x("species"),E=RegExp.prototype;c.exports=function(A,O,R,X){var Z=x(A),G=!b(function(){var Y={};return Y[Z]=function(){return 7},""[A](Y)!=7}),U=G&&!b(function(){var Y=!1,M=/a/;return A==="split"&&((M={}).constructor={},M.constructor[P]=function(){return M},M.flags="",M[Z]=/./[Z]),M.exec=function(){return Y=!0,null},M[Z](""),!Y});if(!G||!U||R){var I=/./[Z],F=O(Z,""[A],function(Y,M,C,L,z){var B=M.exec;return B===y||B===E.exec?G&&!z?{done:!0,value:I.call(M,C,L)}:{done:!0,value:Y.call(C,M,L)}:{done:!1}});p(String.prototype,A,F[0]),p(E,Z,F[1])}X&&S(E[Z],"sham",!0)}},function(c,f,u){var p=u(126).charAt;c.exports=function(y,b,x){return b+(x?p(y,b).length:1)}},function(c,f,u){var p=u(49),y=u(83);c.exports=function(b,x){var S=b.exec;if(typeof S=="function"){var P=S.call(b,x);if(typeof P!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return P}if(p(b)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return y.call(b,x)}},function(c,f,u){u(15)({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(c,f){var u,p,y=c.exports={};function b(){throw new Error("setTimeout has not been defined")}function x(){throw new Error("clearTimeout has not been defined")}function S(U){if(u===setTimeout)return setTimeout(U,0);if((u===b||!u)&&setTimeout)return u=setTimeout,setTimeout(U,0);try{return u(U,0)}catch(I){try{return u.call(null,U,0)}catch(F){return u.call(this,U,0)}}}(function(){try{u=typeof setTimeout=="function"?setTimeout:b}catch(U){u=b}try{p=typeof clearTimeout=="function"?clearTimeout:x}catch(U){p=x}})();var P,E=[],A=!1,O=-1;function R(){A&&P&&(A=!1,P.length?E=P.concat(E):O=-1,E.length&&X())}function X(){if(!A){var U=S(R);A=!0;for(var I=E.length;I;){for(P=E,E=[];++O<I;)P&&P[O].run();O=-1,I=E.length}P=null,A=!1,function(F){if(p===clearTimeout)return clearTimeout(F);if((p===x||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(F);try{p(F)}catch(Y){try{return p.call(null,F)}catch(M){return p.call(this,F)}}}(U)}}function Z(U,I){this.fun=U,this.array=I}function G(){}y.nextTick=function(U){var I=new Array(arguments.length-1);if(arguments.length>1)for(var F=1;F<arguments.length;F++)I[F-1]=arguments[F];E.push(new Z(U,I)),E.length!==1||A||S(X)},Z.prototype.run=function(){this.fun.apply(null,this.array)},y.title="browser",y.browser=!0,y.env={},y.argv=[],y.version="",y.versions={},y.on=G,y.addListener=G,y.once=G,y.off=G,y.removeListener=G,y.removeAllListeners=G,y.emit=G,y.prependListener=G,y.prependOnceListener=G,y.listeners=function(U){return[]},y.binding=function(U){throw new Error("process.binding is not supported")},y.cwd=function(){return"/"},y.chdir=function(U){throw new Error("process.chdir is not supported")},y.umask=function(){return 0}},function(c,f,u){var p=u(89);c.exports=p&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},function(c,f,u){var p=u(28),y=u(16),b=u(107);c.exports=!p&&!y(function(){return Object.defineProperty(b("div"),"a",{get:function(){return 7}}).a!=7})},function(c,f,u){var p=u(23),y=u(24),b=p.document,x=y(b)&&y(b.createElement);c.exports=function(S){return x?b.createElement(S):{}}},function(c,f,u){var p=u(24),y=u(53),b=u(143),x=u(21)("toPrimitive");c.exports=function(S,P){if(!p(S)||y(S))return S;var E,A=S[x];if(A!==void 0){if(P===void 0&&(P="default"),E=A.call(S,P),!p(E)||y(E))return E;throw TypeError("Can't convert object to primitive value")}return P===void 0&&(P="number"),b(S,P)}},function(c,f,u){var p=u(27),y=u(34),b=u(110).indexOf,x=u(55);c.exports=function(S,P){var E,A=y(S),O=0,R=[];for(E in A)!p(x,E)&&p(A,E)&&R.push(E);for(;P.length>O;)p(A,E=P[O++])&&(~b(R,E)||R.push(E));return R}},function(c,f,u){var p=u(34),y=u(32),b=u(73),x=function(S){return function(P,E,A){var O,R=p(P),X=y(R.length),Z=b(A,X);if(S&&E!=E){for(;X>Z;)if((O=R[Z++])!=O)return!0}else for(;X>Z;Z++)if((S||Z in R)&&R[Z]===E)return S||Z||0;return!S&&-1}};c.exports={includes:x(!0),indexOf:x(!1)}},function(c,f,u){var p=u(87),y=Function.toString;typeof p.inspectSource!="function"&&(p.inspectSource=function(b){return y.call(b)}),c.exports=p.inspectSource},function(c,f,u){var p=u(27),y=u(113),b=u(47),x=u(29);c.exports=function(S,P){for(var E=y(P),A=x.f,O=b.f,R=0;R<E.length;R++){var X=E[R];p(S,X)||A(S,X,O(P,X))}}},function(c,f,u){var p=u(45),y=u(58),b=u(92),x=u(25);c.exports=p("Reflect","ownKeys")||function(S){var P=y.f(x(S)),E=b.f;return E?P.concat(E(S)):P}},function(c,f,u){var p,y,b,x=u(16),S=u(76),P=u(39),E=u(27),A=u(21),O=u(68),R=A("iterator"),X=!1;[].keys&&("next"in(b=[].keys())?(y=S(S(b)))!==Object.prototype&&(p=y):X=!0);var Z=p==null||x(function(){var G={};return p[R].call(G)!==G});Z&&(p={}),O&&!Z||E(p,R)||P(p,R,function(){return this}),c.exports={IteratorPrototype:p,BUGGY_SAFARI_ITERATORS:X}},function(c,f,u){var p=u(16);c.exports=!p(function(){function y(){}return y.prototype.constructor=null,Object.getPrototypeOf(new y)!==y.prototype})},function(c,f,u){var p=u(15),y=u(55),b=u(24),x=u(27),S=u(29).f,P=u(58),E=u(117),A=u(69),O=u(149),R=!1,X=A("meta"),Z=0,G=Object.isExtensible||function(){return!0},U=function(F){S(F,X,{value:{objectID:"O"+Z++,weakData:{}}})},I=c.exports={enable:function(){I.enable=function(){},R=!0;var F=P.f,Y=[].splice,M={};M[X]=1,F(M).length&&(P.f=function(C){for(var L=F(C),z=0,B=L.length;z<B;z++)if(L[z]===X){Y.call(L,z,1);break}return L},p({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:E.f}))},fastKey:function(F,Y){if(!b(F))return typeof F=="symbol"?F:(typeof F=="string"?"S":"P")+F;if(!x(F,X)){if(!G(F))return"F";if(!Y)return"E";U(F)}return F[X].objectID},getWeakData:function(F,Y){if(!x(F,X)){if(!G(F))return!0;if(!Y)return!1;U(F)}return F[X].weakData},onFreeze:function(F){return O&&R&&G(F)&&!x(F,X)&&U(F),F}};y[X]=!0},function(c,f,u){var p=u(34),y=u(58).f,b={}.toString,x=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];c.exports.f=function(S){return x&&b.call(S)=="[object Window]"?function(P){try{return y(P)}catch(E){return x.slice()}}(S):y(p(S))}},function(c,f,u){var p=u(25),y=u(119),b=u(32),x=u(79),S=u(120),P=u(95),E=u(122),A=function(O,R){this.stopped=O,this.result=R};c.exports=function(O,R,X){var Z,G,U,I,F,Y,M,C=X&&X.that,L=!(!X||!X.AS_ENTRIES),z=!(!X||!X.IS_ITERATOR),B=!(!X||!X.INTERRUPTED),J=x(R,C,1+L+B),ee=function(ae){return Z&&E(Z,"normal",ae),new A(!0,ae)},ne=function(ae){return L?(p(ae),B?J(ae[0],ae[1],ee):J(ae[0],ae[1])):B?J(ae,ee):J(ae)};if(z)Z=O;else{if(typeof(G=P(O))!="function")throw TypeError("Target is not iterable");if(y(G)){for(U=0,I=b(O.length);I>U;U++)if((F=ne(O[U]))&&F instanceof A)return F;return new A(!1)}Z=S(O,G)}for(Y=Z.next;!(M=Y.call(Z)).done;){try{F=ne(M.value)}catch(ae){E(Z,"throw",ae)}if(typeof F=="object"&&F&&F instanceof A)return F}return new A(!1)}},function(c,f,u){var p=u(21),y=u(56),b=p("iterator"),x=Array.prototype;c.exports=function(S){return S!==void 0&&(y.Array===S||x[b]===S)}},function(c,f,u){var p=u(25),y=u(95);c.exports=function(b,x){var S=arguments.length<2?y(b):x;if(typeof S!="function")throw TypeError(String(b)+" is not iterable");return p(S.call(b))}},function(c,f,u){var p=u(96),y=u(49),b=u(21)("toStringTag"),x=y(function(){return arguments}())=="Arguments";c.exports=p?y:function(S){var P,E,A;return S===void 0?"Undefined":S===null?"Null":typeof(E=function(O,R){try{return O[R]}catch(X){}}(P=Object(S),b))=="string"?E:x?y(P):(A=y(P))=="Object"&&typeof P.callee=="function"?"Arguments":A}},function(c,f,u){var p=u(25);c.exports=function(y,b,x){var S,P;p(y);try{if((S=y.return)===void 0){if(b==="throw")throw x;return x}S=S.call(y)}catch(E){P=!0,S=E}if(b==="throw")throw x;if(P)throw S;return p(S),x}},function(c,f){c.exports=function(u,p,y){if(!(u instanceof p))throw TypeError("Incorrect "+(y?y+" ":"")+"invocation");return u}},function(c,f,u){var p=u(21)("iterator"),y=!1;try{var b=0,x={next:function(){return{done:!!b++}},return:function(){y=!0}};x[p]=function(){return this},Array.from(x,function(){throw 2})}catch(S){}c.exports=function(S,P){if(!P&&!y)return!1;var E=!1;try{var A={};A[p]=function(){return{next:function(){return{done:E=!0}}}},S(A)}catch(O){}return E}},function(c,f,u){var p=u(24),y=u(94);c.exports=function(b,x,S){var P,E;return y&&typeof(P=x.constructor)=="function"&&P!==S&&p(E=P.prototype)&&E!==S.prototype&&y(b,E),b}},function(c,f,u){var p=u(50),y=u(33),b=u(38),x=function(S){return function(P,E){var A,O,R=y(b(P)),X=p(E),Z=R.length;return X<0||X>=Z?S?"":void 0:(A=R.charCodeAt(X))<55296||A>56319||X+1===Z||(O=R.charCodeAt(X+1))<56320||O>57343?S?R.charAt(X):A:S?R.slice(X,X+2):O-56320+(A-55296<<10)+65536}};c.exports={codeAt:x(!1),charAt:x(!0)}},function(c,f){c.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(c,f,u){var p=u(21);f.f=p},function(c,f,u){var p=u(156),y=u(27),b=u(128),x=u(29).f;c.exports=function(S){var P=p.Symbol||(p.Symbol={});y(P,S)||x(P,S,{value:b.f(S)})}},function(c,f,u){var p=u(15),y=u(110).includes,b=u(66);p({target:"Array",proto:!0},{includes:function(x){return y(this,x,arguments.length>1?arguments[1]:void 0)}}),b("includes")},function(c,f,u){var p=u(15),y=u(165),b=u(38),x=u(33);p({target:"String",proto:!0,forced:!u(166)("includes")},{includes:function(S){return!!~x(b(this)).indexOf(x(y(S)),arguments.length>1?arguments[1]:void 0)}})},function(c,f,u){var p=u(24),y=u(49),b=u(21)("match");c.exports=function(x){var S;return p(x)&&((S=x[b])!==void 0?!!S:y(x)=="RegExp")}},function(c,f,u){var p=u(16),y=u(23).RegExp;f.UNSUPPORTED_Y=p(function(){var b=y("a","y");return b.lastIndex=2,b.exec("abcd")!=null}),f.BROKEN_CARET=p(function(){var b=y("^r","gy");return b.lastIndex=2,b.exec("str")!=null})},function(c,f,u){var p=u(38),y=u(33),b="["+u(135)+"]",x=RegExp("^"+b+b+"*"),S=RegExp(b+b+"*$"),P=function(E){return function(A){var O=y(p(A));return 1&E&&(O=O.replace(x,"")),2&E&&(O=O.replace(S,"")),O}};c.exports={start:P(1),end:P(2),trim:P(3)}},function(c,f){c.exports=`
|
|
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`},function(c,f,u){var p=u(100),y=u(25),b=u(32),x=u(33),S=u(38),P=u(101),E=u(102);p("match",function(A,O,R){return[function(X){var Z=S(this),G=X==null?void 0:X[A];return G!==void 0?G.call(X,Z):new RegExp(X)[A](x(Z))},function(X){var Z=y(this),G=x(X),U=R(O,Z,G);if(U.done)return U.value;if(!Z.global)return E(Z,G);var I=Z.unicode;Z.lastIndex=0;for(var F,Y=[],M=0;(F=E(Z,G))!==null;){var C=x(F[0]);Y[M]=C,C===""&&(Z.lastIndex=P(G,b(Z.lastIndex),I)),M++}return M===0?null:Y}]})},function(c,f,u){var p=u(100),y=u(16),b=u(25),x=u(50),S=u(32),P=u(33),E=u(38),A=u(101),O=u(171),R=u(102),X=u(21)("replace"),Z=Math.max,G=Math.min,U="a".replace(/./,"$0")==="$0",I=!!/./[X]&&/./[X]("a","$0")==="";p("replace",function(F,Y,M){var C=I?"$":"$0";return[function(L,z){var B=E(this),J=L==null?void 0:L[X];return J!==void 0?J.call(L,B,z):Y.call(P(B),L,z)},function(L,z){var B=b(this),J=P(L);if(typeof z=="string"&&z.indexOf(C)===-1&&z.indexOf("$<")===-1){var ee=M(Y,B,J,z);if(ee.done)return ee.value}var ne=typeof z=="function";ne||(z=P(z));var ae=B.global;if(ae){var ge=B.unicode;B.lastIndex=0}for(var fe=[];;){var pe=R(B,J);if(pe===null||(fe.push(pe),!ae))break;P(pe[0])===""&&(B.lastIndex=A(J,S(B.lastIndex),ge))}for(var se,le="",ye=0,he=0;he<fe.length;he++){pe=fe[he];for(var ke=P(pe[0]),we=Z(G(x(pe.index),J.length),0),Fe=[],We=1;We<pe.length;We++)Fe.push((se=pe[We])===void 0?se:String(se));var ze=pe.groups;if(ne){var Ut=[ke].concat(Fe,we,J);ze!==void 0&&Ut.push(ze);var ur=P(z.apply(void 0,Ut))}else ur=O(ke,J,we,Fe,ze,z);we>=ye&&(le+=J.slice(ye,we)+ur,ye=we+ke.length)}return le+J.slice(ye)}]},!!y(function(){var F=/./;return F.exec=function(){var Y=[];return Y.groups={a:"7"},Y},"".replace(F,"$<a>")!=="7"})||!U||I)},function(c,f,u){f.a=function(){return!1}},function(c,f,u){(function(p){var y=u(22),b=d&&!d.nodeType&&d,x=b&&typeof p=="object"&&p&&!p.nodeType&&p,S=x&&x.exports===b?y.a.Buffer:void 0,P=S?S.allocUnsafe:void 0;f.a=function(E,A){if(A)return E.slice();var O=E.length,R=P?P(O):new E.constructor(O);return E.copy(R),R}}).call(this,u(99)(c))},function(c,f,u){(function(p){u.d(f,"a",function(){return I});var y=u(0);function b(M){throw new Error("[mobx-utils] "+M)}function x(M,C){C===void 0&&(C="Illegal state"),M||b(C)}var S=function(M){return M&&M!==Object.prototype&&Object.getOwnPropertyNames(M).concat(S(Object.getPrototypeOf(M))||[])},P=function(M){return function(C){var L=S(C);return L.filter(function(z,B){return L.indexOf(z)===B})}(M).filter(function(C){return C!=="constructor"&&!~C.indexOf("__")})};function E(M){switch(this.state){case"pending":return M.pending&&M.pending(this.value);case"rejected":return M.rejected&&M.rejected(this.value);case"fulfilled":return M.fulfilled?M.fulfilled(this.value):this.value}}function A(M,C){if(x(arguments.length<=2,"fromPromise expects up to two arguments"),x(typeof M=="function"||typeof M=="object"&&M&&typeof M.then=="function","Please pass a promise or function to fromPromise"),M.isPromiseBasedObservable===!0)return M;typeof M=="function"&&(M=new Promise(M));var L=M;M.then(Object(y.i)("observableFromPromise-resolve",function(B){L.value=B,L.state="fulfilled"}),Object(y.i)("observableFromPromise-reject",function(B){L.value=B,L.state="rejected"})),L.isPromiseBasedObservable=!0,L.case=E;var z=C&&C.state==="fulfilled"?C.value:void 0;return Object(y.o)(L,{value:z,state:"pending"},{},{deep:!1}),L}(function(M){M.reject=Object(y.i)("fromPromise.reject",function(C){var L=M(Promise.reject(C));return L.state="rejected",L.value=C,L}),M.resolve=Object(y.i)("fromPromise.resolve",function(C){C===void 0&&(C=void 0);var L=M(Promise.resolve(C));return L.state="fulfilled",L.value=C,L})})(A||(A={}));var O=function(M,C,L,z){var B,J=arguments.length,ee=J<3?C:z===null?z=Object.getOwnPropertyDescriptor(C,L):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ee=Reflect.decorate(M,C,L,z);else for(var ne=M.length-1;ne>=0;ne--)(B=M[ne])&&(ee=(J<3?B(ee):J>3?B(C,L,ee):B(C,L))||ee);return J>3&&ee&&Object.defineProperty(C,L,ee),ee};(function(){function M(C,L){var z=this;Object(y.E)(function(){z.current=L,z.subscription=C.subscribe(z)})}M.prototype.dispose=function(){this.subscription&&this.subscription.unsubscribe()},M.prototype.next=function(C){this.current=C},M.prototype.complete=function(){this.dispose()},M.prototype.error=function(C){this.current=C,this.dispose()},O([y.A.ref],M.prototype,"current",void 0),O([y.i.bound],M.prototype,"next",null),O([y.i.bound],M.prototype,"complete",null),O([y.i.bound],M.prototype,"error",null)})();var R=function(){return(R=Object.assign||function(M){for(var C,L=1,z=arguments.length;L<z;L++)for(var B in C=arguments[L])Object.prototype.hasOwnProperty.call(C,B)&&(M[B]=C[B]);return M}).apply(this,arguments)},X=function(M,C,L,z){var B,J=arguments.length,ee=J<3?C:z===null?z=Object.getOwnPropertyDescriptor(C,L):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ee=Reflect.decorate(M,C,L,z);else for(var ne=M.length-1;ne>=0;ne--)(B=M[ne])&&(ee=(J<3?B(ee):J>3?B(C,L,ee):B(C,L))||ee);return J>3&&ee&&Object.defineProperty(C,L,ee),ee},Z=["model","reset","submit","isDirty","isPropertyDirty","resetProperty"];(function(){function M(C){var L=this;this.model=C,this.localValues=y.A.map({}),this.localComputedValues=y.A.map({}),this.isPropertyDirty=function(z){return L.localValues.has(z)},x(Object(y.y)(C),"createViewModel expects an observable object"),P(C).forEach(function(z){if(z!==y.a&&z!=="__mobxDidRunLazyInitializers"){if(x(Z.indexOf(z)===-1,"The propertyname "+z+" is reserved and cannot be used with viewModels"),Object(y.u)(C,z)){var B=Object(y.f)(C,z).derivation;L.localComputedValues.set(z,Object(y.k)(B.bind(L)))}var J=Object.getOwnPropertyDescriptor(C,z),ee=J?{enumerable:J.enumerable}:{};Object.defineProperty(L,z,R(R({},ee),{configurable:!0,get:function(){return Object(y.u)(C,z)?L.localComputedValues.get(z).get():L.isPropertyDirty(z)?L.localValues.get(z):L.model[z]},set:Object(y.i)(function(ne){ne!==L.model[z]?L.localValues.set(z,ne):L.localValues.delete(z)})}))}})}Object.defineProperty(M.prototype,"isDirty",{get:function(){return this.localValues.size>0},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"changedValues",{get:function(){return this.localValues.toJS()},enumerable:!1,configurable:!0}),M.prototype.submit=function(){var C=this;Object(y.z)(this.localValues).forEach(function(L){var z=C.localValues.get(L),B=C.model[L];Object(y.w)(B)?B.replace(z):Object(y.x)(B)?(B.clear(),B.merge(z)):Object(y.t)(z)||(C.model[L]=z)}),this.localValues.clear()},M.prototype.reset=function(){this.localValues.clear()},M.prototype.resetProperty=function(C){this.localValues.delete(C)},X([y.k],M.prototype,"isDirty",null),X([y.k],M.prototype,"changedValues",null),X([y.i.bound],M.prototype,"submit",null),X([y.i.bound],M.prototype,"reset",null),X([y.i.bound],M.prototype,"resetProperty",null)})();function G(M){if(!M)return"ROOT";for(var C=[];M.parent;)C.push(M.path),M=M.parent;return C.reverse().join("/")}function U(M){return Object(y.y)(M)||Object(y.w)(M)||Object(y.x)(M)}function I(M,C){var L=new WeakMap;function z(ee){var ne=L.get(ee.object);(function(ae,ge){switch(ae.type){case"add":B(ae.newValue,ge,ae.name);break;case"update":J(ae.oldValue),B(ae.newValue,ge,ae.name||""+ae.index);break;case"remove":case"delete":J(ae.oldValue);break;case"splice":ae.removed.map(J),ae.added.forEach(function(se,le){return B(se,ge,""+(ae.index+le))});for(var fe=ae.index+ae.addedCount;fe<ae.object.length;fe++)if(U(ae.object[fe])){var pe=L.get(ae.object[fe]);pe&&(pe.path=""+fe)}}})(ee,ne),C(ee,G(ne),M)}function B(ee,ne,ae){if(U(ee)){var ge=L.get(ee);if(ge){if(ge.parent!==ne||ge.path!==ae)throw new Error("The same observable object cannot appear twice in the same tree, trying to assign it to '"+G(ne)+"/"+ae+"', but it already exists at '"+G(ge.parent)+"/"+ge.path+"'")}else{var fe={parent:ne,path:ae,dispose:Object(y.B)(ee,z)};L.set(ee,fe),Object(y.n)(ee).forEach(function(pe){var se=pe[0];return B(pe[1],fe,se)})}}}function J(ee){if(U(ee)){var ne=L.get(ee);if(!ne)return;L.delete(ee),ne.dispose(),Object(y.J)(ee).forEach(J)}}return B(M,void 0,""),function(){J(M)}}var F,Y=(F=function(M,C){return(F=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(L,z){L.__proto__=z}||function(L,z){for(var B in z)z.hasOwnProperty(B)&&(L[B]=z[B])})(M,C)},function(M,C){function L(){this.constructor=M}F(M,C),M.prototype=C===null?Object.create(C):(L.prototype=C.prototype,new L)});(function(M){function C(L,z,B){var J=B===void 0?{}:B,ee=J.name,ne=ee===void 0?"ogm"+(1e3*Math.random()|0):ee,ae=J.keyToName,ge=ae===void 0?function(se){return""+se}:ae,fe=M.call(this)||this;fe._keyToName=ge,fe._groupBy=z,fe._ogmInfoKey=Symbol("ogmInfo"+ne),fe._base=L;for(var pe=0;pe<L.length;pe++)fe._addItem(L[pe]);return fe._disposeBaseObserver=Object(y.B)(fe._base,function(se){if(se.type==="splice")Object(y.H)(function(){for(var le=0,ye=se.removed;le<ye.length;le++){var he=ye[le];fe._removeItem(he)}for(var ke=0,we=se.added;ke<we.length;ke++){var Fe=we[ke];fe._addItem(Fe)}});else{if(se.type!=="update")throw new Error("illegal state");Object(y.H)(function(){fe._removeItem(se.oldValue),fe._addItem(se.newValue)})}}),fe}Y(C,M),C.prototype.clear=function(){throw new Error("not supported")},C.prototype.delete=function(L){throw new Error("not supported")},C.prototype.set=function(L,z){throw new Error("not supported")},C.prototype.dispose=function(){this._disposeBaseObserver();for(var L=0;L<this._base.length;L++){var z=this._base[L];z[this._ogmInfoKey].reaction(),delete z[this._ogmInfoKey]}},C.prototype._getGroupArr=function(L){var z=M.prototype.get.call(this,L);return z===void 0&&(z=Object(y.A)([],{name:"GroupArray["+this._keyToName(L)+"]",deep:!1}),M.prototype.set.call(this,L,z)),z},C.prototype._removeFromGroupArr=function(L,z){var B=M.prototype.get.call(this,L);B.length===1?M.prototype.delete.call(this,L):(z===B.length-1||(B[z]=B[B.length-1],B[z][this._ogmInfoKey].groupArrIndex=z),B.length--)},C.prototype._addItem=function(L){var z=this,B=this._groupBy(L),J=this._getGroupArr(B),ee={groupByValue:B,groupArrIndex:J.length,reaction:Object(y.D)(function(){return z._groupBy(L)},function(ne,ae){var ge=L[z._ogmInfoKey];z._removeFromGroupArr(ge.groupByValue,ge.groupArrIndex);var fe=z._getGroupArr(ne),pe=fe.length;fe.push(L),ge.groupByValue=ne,ge.groupArrIndex=pe})};Object.defineProperty(L,this._ogmInfoKey,{configurable:!0,enumerable:!1,value:ee}),J.push(L)},C.prototype._removeItem=function(L){var z=L[this._ogmInfoKey];this._removeFromGroupArr(z.groupByValue,z.groupArrIndex),z.reaction(),delete L[this._ogmInfoKey]}})(y.b),function(){function M(C,L){this.base=C,this.args=L,this.closestIdx=0,this.isDisposed=!1;for(var z=this.closest=this.root=C,B=0;B<this.args.length-1&&(z=z.get(L[B]));B++)this.closest=z;this.closestIdx=B}return M.prototype.exists=function(){this.assertNotDisposed();var C=this.args.length;return this.closestIdx>=C-1&&this.closest.has(this.args[C-1])},M.prototype.get=function(){if(this.assertNotDisposed(),!this.exists())throw new Error("Entry doesn't exist");return this.closest.get(this.args[this.args.length-1])},M.prototype.set=function(C){this.assertNotDisposed();for(var L=this.args.length,z=this.closest,B=this.closestIdx;B<L-1;B++){var J=new Map;z.set(this.args[B],J),z=J}this.closestIdx=L-1,this.closest=z,z.set(this.args[L-1],C)},M.prototype.delete=function(){if(this.assertNotDisposed(),!this.exists())throw new Error("Entry doesn't exist");var C=this.args.length;this.closest.delete(this.args[C-1]);for(var L=this.root,z=[L],B=0;B<C-1;B++)L=L.get(this.args[B]),z.push(L);for(B=z.length-1;B>0;B--)z[B].size===0&&z[B-1].delete(this.args[B-1]);this.isDisposed=!0},M.prototype.assertNotDisposed=function(){if(this.isDisposed)throw new Error("Concurrent modification exception")},M}(),Promise.resolve(),typeof queueMicrotask!="undefined"||p!==void 0&&p.nextTick}).call(this,u(104))},function(c,f,u){var p;(function(y,b,x){if(y){for(var S,P={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},E={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},A={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},O={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},R=1;R<20;++R)P[111+R]="f"+R;for(R=0;R<=9;++R)P[R+96]=R.toString();F.prototype.bind=function(Y,M,C){return Y=Y instanceof Array?Y:[Y],this._bindMultiple.call(this,Y,M,C),this},F.prototype.unbind=function(Y,M){return this.bind.call(this,Y,function(){},M)},F.prototype.trigger=function(Y,M){return this._directMap[Y+":"+M]&&this._directMap[Y+":"+M]({},Y),this},F.prototype.reset=function(){return this._callbacks={},this._directMap={},this},F.prototype.stopCallback=function(Y,M){if((" "+M.className+" ").indexOf(" mousetrap ")>-1||function L(z,B){return z!==null&&z!==b&&(z===B||L(z.parentNode,B))}(M,this.target))return!1;if("composedPath"in Y&&typeof Y.composedPath=="function"){var C=Y.composedPath()[0];C!==Y.target&&(M=C)}return M.tagName=="INPUT"||M.tagName=="SELECT"||M.tagName=="TEXTAREA"||M.isContentEditable},F.prototype.handleKey=function(){var Y=this;return Y._handleKey.apply(Y,arguments)},F.addKeycodes=function(Y){for(var M in Y)Y.hasOwnProperty(M)&&(P[M]=Y[M]);S=null},F.init=function(){var Y=F(b);for(var M in Y)M.charAt(0)!=="_"&&(F[M]=function(C){return function(){return Y[C].apply(Y,arguments)}}(M))},F.init(),y.Mousetrap=F,c.exports&&(c.exports=F),(p=function(){return F}.call(f,u,f,c))===void 0||(c.exports=p)}function X(Y,M,C){Y.addEventListener?Y.addEventListener(M,C,!1):Y.attachEvent("on"+M,C)}function Z(Y){if(Y.type=="keypress"){var M=String.fromCharCode(Y.which);return Y.shiftKey||(M=M.toLowerCase()),M}return P[Y.which]?P[Y.which]:E[Y.which]?E[Y.which]:String.fromCharCode(Y.which).toLowerCase()}function G(Y){return Y=="shift"||Y=="ctrl"||Y=="alt"||Y=="meta"}function U(Y,M,C){return C||(C=function(){if(!S)for(var L in S={},P)L>95&&L<112||P.hasOwnProperty(L)&&(S[P[L]]=L);return S}()[Y]?"keydown":"keypress"),C=="keypress"&&M.length&&(C="keydown"),C}function I(Y,M){var C,L,z,B=[];for(C=function(J){return J==="+"?["+"]:(J=J.replace(/\+{2}/g,"+plus")).split("+")}(Y),z=0;z<C.length;++z)L=C[z],O[L]&&(L=O[L]),M&&M!="keypress"&&A[L]&&(L=A[L],B.push("shift")),G(L)&&B.push(L);return{key:L,modifiers:B,action:M=U(L,B,M)}}function F(Y){var M=this;if(Y=Y||b,!(M instanceof F))return new F(Y);M.target=Y,M._callbacks={},M._directMap={};var C,L={},z=!1,B=!1,J=!1;function ee(se){se=se||{};var le,ye=!1;for(le in L)se[le]?ye=!0:L[le]=0;ye||(J=!1)}function ne(se,le,ye,he,ke,we){var Fe,We,ze,Ut,ur=[],ut=ye.type;if(!M._callbacks[se])return[];for(ut=="keyup"&&G(se)&&(le=[se]),Fe=0;Fe<M._callbacks[se].length;++Fe)if(We=M._callbacks[se][Fe],(he||!We.seq||L[We.seq]==We.level)&&ut==We.action&&(ut=="keypress"&&!ye.metaKey&&!ye.ctrlKey||(ze=le,Ut=We.modifiers,ze.sort().join(",")===Ut.sort().join(",")))){var Ue=!he&&We.combo==ke,dt=he&&We.seq==he&&We.level==we;(Ue||dt)&&M._callbacks[se].splice(Fe,1),ur.push(We)}return ur}function ae(se,le,ye,he){M.stopCallback(le,le.target||le.srcElement,ye,he)||se(le,ye)===!1&&(function(ke){ke.preventDefault?ke.preventDefault():ke.returnValue=!1}(le),function(ke){ke.stopPropagation?ke.stopPropagation():ke.cancelBubble=!0}(le))}function ge(se){typeof se.which!="number"&&(se.which=se.keyCode);var le=Z(se);le&&(se.type!="keyup"||z!==le?M.handleKey(le,function(ye){var he=[];return ye.shiftKey&&he.push("shift"),ye.altKey&&he.push("alt"),ye.ctrlKey&&he.push("ctrl"),ye.metaKey&&he.push("meta"),he}(se),se):z=!1)}function fe(se,le,ye,he){function ke(ze){return function(){J=ze,++L[se],clearTimeout(C),C=setTimeout(ee,1e3)}}function we(ze){ae(ye,ze,se),he!=="keyup"&&(z=Z(ze)),setTimeout(ee,10)}L[se]=0;for(var Fe=0;Fe<le.length;++Fe){var We=Fe+1===le.length?we:ke(he||I(le[Fe+1]).action);pe(le[Fe],We,he,se,Fe)}}function pe(se,le,ye,he,ke){M._directMap[se+":"+ye]=le;var we,Fe=(se=se.replace(/\s+/g," ")).split(" ");Fe.length>1?fe(se,Fe,le,ye):(we=I(se,ye),M._callbacks[we.key]=M._callbacks[we.key]||[],ne(we.key,we.modifiers,{type:we.action},he,se,ke),M._callbacks[we.key][he?"unshift":"push"]({callback:le,modifiers:we.modifiers,action:we.action,seq:he,level:ke,combo:se}))}M._handleKey=function(se,le,ye){var he,ke=ne(se,le,ye),we={},Fe=0,We=!1;for(he=0;he<ke.length;++he)ke[he].seq&&(Fe=Math.max(Fe,ke[he].level));for(he=0;he<ke.length;++he)if(ke[he].seq){if(ke[he].level!=Fe)continue;We=!0,we[ke[he].seq]=1,ae(ke[he].callback,ye,ke[he].combo,ke[he].seq)}else We||ae(ke[he].callback,ye,ke[he].combo);var ze=ye.type=="keypress"&&B;ye.type!=J||G(se)||ze||ee(we),B=We&&ye.type=="keydown"},M._bindMultiple=function(se,le,ye){for(var he=0;he<se.length;++he)pe(se[he],le,ye)},X(Y,"keypress",ge),X(Y,"keydown",ge),X(Y,"keyup",ge)}})(typeof window!="undefined"?window:null,typeof window!="undefined"?document:null)},function(c,f,u){var p=u(28),y=u(29),b=u(25),x=u(54);c.exports=p?Object.defineProperties:function(S,P){b(S);for(var E,A=x(P),O=A.length,R=0;O>R;)y.f(S,E=A[R++],P[E]);return S}},function(c,f,u){var p=u(24);c.exports=function(y,b){var x,S;if(b==="string"&&typeof(x=y.toString)=="function"&&!p(S=x.call(y))||typeof(x=y.valueOf)=="function"&&!p(S=x.call(y))||b!=="string"&&typeof(x=y.toString)=="function"&&!p(S=x.call(y)))return S;throw TypeError("Can't convert object to primitive value")}},function(c,f,u){var p=u(45);c.exports=p("document","documentElement")},function(c,f,u){var p=u(23),y=u(111),b=p.WeakMap;c.exports=typeof b=="function"&&/native code/.test(y(b))},function(c,f,u){var p=u(114).IteratorPrototype,y=u(46),b=u(57),x=u(77),S=u(56),P=function(){return this};c.exports=function(E,A,O){var R=A+" Iterator";return E.prototype=y(p,{next:b(1,O)}),x(E,R,!1,!0),S[R]=P,E}},function(c,f,u){var p=u(24);c.exports=function(y){if(!p(y)&&y!==null)throw TypeError("Can't set "+String(y)+" as a prototype");return y}},function(c,f,u){var p=u(15),y=u(23),b=u(93),x=u(43),S=u(116),P=u(118),E=u(123),A=u(24),O=u(16),R=u(124),X=u(77),Z=u(125);c.exports=function(G,U,I){var F=G.indexOf("Map")!==-1,Y=G.indexOf("Weak")!==-1,M=F?"set":"add",C=y[G],L=C&&C.prototype,z=C,B={},J=function(pe){var se=L[pe];x(L,pe,pe=="add"?function(le){return se.call(this,le===0?0:le),this}:pe=="delete"?function(le){return!(Y&&!A(le))&&se.call(this,le===0?0:le)}:pe=="get"?function(le){return Y&&!A(le)?void 0:se.call(this,le===0?0:le)}:pe=="has"?function(le){return!(Y&&!A(le))&&se.call(this,le===0?0:le)}:function(le,ye){return se.call(this,le===0?0:le,ye),this})};if(b(G,typeof C!="function"||!(Y||L.forEach&&!O(function(){new C().entries().next()}))))z=I.getConstructor(U,G,F,M),S.enable();else if(b(G,!0)){var ee=new z,ne=ee[M](Y?{}:-0,1)!=ee,ae=O(function(){ee.has(1)}),ge=R(function(pe){new C(pe)}),fe=!Y&&O(function(){for(var pe=new C,se=5;se--;)pe[M](se,se);return!pe.has(-0)});ge||((z=U(function(pe,se){E(pe,z,G);var le=Z(new C,pe,z);return se!=null&&P(se,le[M],{that:le,AS_ENTRIES:F}),le})).prototype=L,L.constructor=z),(ae||fe)&&(J("delete"),J("has"),F&&J("get")),(fe||ne)&&J(M),Y&&L.clear&&delete L.clear}return B[G]=z,p({global:!0,forced:z!=C},B),X(z,G),Y||I.setStrong(z,G,F),z}},function(c,f,u){var p=u(16);c.exports=!p(function(){return Object.isExtensible(Object.preventExtensions({}))})},function(c,f,u){var p=u(29).f,y=u(46),b=u(151),x=u(79),S=u(123),P=u(118),E=u(91),A=u(152),O=u(28),R=u(116).fastKey,X=u(51),Z=X.set,G=X.getterFor;c.exports={getConstructor:function(U,I,F,Y){var M=U(function(B,J){S(B,M,I),Z(B,{type:I,index:y(null),first:void 0,last:void 0,size:0}),O||(B.size=0),J!=null&&P(J,B[Y],{that:B,AS_ENTRIES:F})}),C=G(I),L=function(B,J,ee){var ne,ae,ge=C(B),fe=z(B,J);return fe?fe.value=ee:(ge.last=fe={index:ae=R(J,!0),key:J,value:ee,previous:ne=ge.last,next:void 0,removed:!1},ge.first||(ge.first=fe),ne&&(ne.next=fe),O?ge.size++:B.size++,ae!=="F"&&(ge.index[ae]=fe)),B},z=function(B,J){var ee,ne=C(B),ae=R(J);if(ae!=="F")return ne.index[ae];for(ee=ne.first;ee;ee=ee.next)if(ee.key==J)return ee};return b(M.prototype,{clear:function(){for(var B=C(this),J=B.index,ee=B.first;ee;)ee.removed=!0,ee.previous&&(ee.previous=ee.previous.next=void 0),delete J[ee.index],ee=ee.next;B.first=B.last=void 0,O?B.size=0:this.size=0},delete:function(B){var J=C(this),ee=z(this,B);if(ee){var ne=ee.next,ae=ee.previous;delete J.index[ee.index],ee.removed=!0,ae&&(ae.next=ne),ne&&(ne.previous=ae),J.first==ee&&(J.first=ne),J.last==ee&&(J.last=ae),O?J.size--:this.size--}return!!ee},forEach:function(B){for(var J,ee=C(this),ne=x(B,arguments.length>1?arguments[1]:void 0,3);J=J?J.next:ee.first;)for(ne(J.value,J.key,this);J&&J.removed;)J=J.previous},has:function(B){return!!z(this,B)}}),b(M.prototype,F?{get:function(B){var J=z(this,B);return J&&J.value},set:function(B,J){return L(this,B===0?0:B,J)}}:{add:function(B){return L(this,B=B===0?0:B,B)}}),O&&p(M.prototype,"size",{get:function(){return C(this).size}}),M},setStrong:function(U,I,F){var Y=I+" Iterator",M=G(I),C=G(Y);E(U,I,function(L,z){Z(this,{type:Y,target:L,state:M(L),kind:z,last:void 0})},function(){for(var L=C(this),z=L.kind,B=L.last;B&&B.removed;)B=B.previous;return L.target&&(L.last=B=B?B.next:L.state.first)?z=="keys"?{value:B.key,done:!1}:z=="values"?{value:B.value,done:!1}:{value:[B.key,B.value],done:!1}:(L.target=void 0,{value:void 0,done:!0})},F?"entries":"values",!F,!0),A(I)}}},function(c,f,u){var p=u(43);c.exports=function(y,b,x){for(var S in b)p(y,S,b[S],x);return y}},function(c,f,u){var p=u(45),y=u(29),b=u(21),x=u(28),S=b("species");c.exports=function(P){var E=p(P),A=y.f;x&&E&&!E[S]&&A(E,S,{configurable:!0,get:function(){return this}})}},function(c,f,u){var p=u(96),y=u(121);c.exports=p?{}.toString:function(){return"[object "+y(this)+"]"}},function(c,f,u){var p=u(60).forEach,y=u(98)("forEach");c.exports=y?[].forEach:function(b){return p(this,b,arguments.length>1?arguments[1]:void 0)}},function(c,f,u){var p=u(24),y=u(80),b=u(21)("species");c.exports=function(x){var S;return y(x)&&(typeof(S=x.constructor)!="function"||S!==Array&&!y(S.prototype)?p(S)&&(S=S[b])===null&&(S=void 0):S=void 0),S===void 0?Array:S}},function(c,f,u){var p=u(23);c.exports=p},function(c,f,u){var p=u(79),y=u(31),b=u(158),x=u(119),S=u(32),P=u(62),E=u(120),A=u(95);c.exports=function(O){var R,X,Z,G,U,I,F=y(O),Y=typeof this=="function"?this:Array,M=arguments.length,C=M>1?arguments[1]:void 0,L=C!==void 0,z=A(F),B=0;if(L&&(C=p(C,M>2?arguments[2]:void 0,2)),z==null||Y==Array&&x(z))for(X=new Y(R=S(F.length));R>B;B++)I=L?C(F[B],B):F[B],P(X,B,I);else for(U=(G=E(F,z)).next,X=new Y;!(Z=U.call(G)).done;B++)I=L?b(G,C,[Z.value,B],!0):Z.value,P(X,B,I);return X.length=B,X}},function(c,f,u){var p=u(25),y=u(122);c.exports=function(b,x,S,P){try{return P?x(p(S)[0],S[1]):x(S)}catch(E){y(b,"throw",E)}}},function(c,f,u){var p=u(15),y=u(59),b=u(31),x=u(32),S=u(33),P=u(16),E=u(160),A=u(98),O=u(161),R=u(162),X=u(70),Z=u(163),G=[],U=G.sort,I=P(function(){G.sort(void 0)}),F=P(function(){G.sort(null)}),Y=A("sort"),M=!P(function(){if(X)return X<70;if(!(O&&O>3)){if(R)return!0;if(Z)return Z<603;var C,L,z,B,J="";for(C=65;C<76;C++){switch(L=String.fromCharCode(C),C){case 66:case 69:case 70:case 72:z=3;break;case 68:case 71:z=4;break;default:z=2}for(B=0;B<47;B++)G.push({k:L+B,v:z})}for(G.sort(function(ee,ne){return ne.v-ee.v}),B=0;B<G.length;B++)L=G[B].k.charAt(0),J.charAt(J.length-1)!==L&&(J+=L);return J!=="DGBEFHACIJK"}});p({target:"Array",proto:!0,forced:I||!F||!Y||!M},{sort:function(C){C!==void 0&&y(C);var L=b(this);if(M)return C===void 0?U.call(L):U.call(L,C);var z,B,J=[],ee=x(L.length);for(B=0;B<ee;B++)B in L&&J.push(L[B]);for(z=(J=E(J,function(ne){return function(ae,ge){return ge===void 0?-1:ae===void 0?1:ne!==void 0?+ne(ae,ge)||0:S(ae)>S(ge)?1:-1}}(C))).length,B=0;B<z;)L[B]=J[B++];for(;B<ee;)delete L[B++];return L}})},function(c,f){var u=Math.floor,p=function(x,S){var P=x.length,E=u(P/2);return P<8?y(x,S):b(p(x.slice(0,E),S),p(x.slice(E),S),S)},y=function(x,S){for(var P,E,A=x.length,O=1;O<A;){for(E=O,P=x[O];E&&S(x[E-1],P)>0;)x[E]=x[--E];E!==O++&&(x[E]=P)}return x},b=function(x,S,P){for(var E=x.length,A=S.length,O=0,R=0,X=[];O<E||R<A;)O<E&&R<A?X.push(P(x[O],S[R])<=0?x[O++]:S[R++]):X.push(O<E?x[O++]:S[R++]);return X};c.exports=p},function(c,f,u){var p=u(71).match(/firefox\/(\d+)/i);c.exports=!!p&&+p[1]},function(c,f,u){var p=u(71);c.exports=/MSIE|Trident/.test(p)},function(c,f,u){var p=u(71).match(/AppleWebKit\/(\d+)\./);c.exports=!!p&&+p[1]},function(c,f,u){var p=u(15),y=u(60).find,b=u(66),x=!0;"find"in[]&&Array(1).find(function(){x=!1}),p({target:"Array",proto:!0,forced:x},{find:function(S){return y(this,S,arguments.length>1?arguments[1]:void 0)}}),b("find")},function(c,f,u){var p=u(132);c.exports=function(y){if(p(y))throw TypeError("The method doesn't accept regular expressions");return y}},function(c,f,u){var p=u(21)("match");c.exports=function(y){var b=/./;try{"/./"[y](b)}catch(x){try{return b[p]=!1,"/./"[y](b)}catch(S){}}return!1}},function(c,f,u){var p=u(25);c.exports=function(){var y=p(this),b="";return y.global&&(b+="g"),y.ignoreCase&&(b+="i"),y.multiline&&(b+="m"),y.dotAll&&(b+="s"),y.unicode&&(b+="u"),y.sticky&&(b+="y"),b}},function(c,f,u){var p=u(16),y=u(23).RegExp;c.exports=p(function(){var b=y(".","s");return!(b.dotAll&&b.exec(`
|
|
`)&&b.flags==="s")})},function(c,f,u){var p=u(16),y=u(23).RegExp;c.exports=p(function(){var b=y("(?<a>b)","g");return b.exec("b").groups.a!=="b"||"b".replace(b,"$<a>c")!=="bc"})},function(c,f,u){var p=u(25),y=u(59),b=u(21)("species");c.exports=function(x,S){var P,E=p(x).constructor;return E===void 0||(P=p(E)[b])==null?S:y(P)}},function(c,f,u){var p=u(31),y=Math.floor,b="".replace,x=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,S=/\$([$&'`]|\d{1,2})/g;c.exports=function(P,E,A,O,R,X){var Z=A+P.length,G=O.length,U=S;return R!==void 0&&(R=p(R),U=x),b.call(X,U,function(I,F){var Y;switch(F.charAt(0)){case"$":return"$";case"&":return P;case"`":return E.slice(0,A);case"'":return E.slice(Z);case"<":Y=R[F.slice(1,-1)];break;default:var M=+F;if(M===0)return I;if(M>G){var C=y(M/10);return C===0?I:C<=G?O[C-1]===void 0?F.charAt(1):O[C-1]+F.charAt(1):I}Y=O[M-1]}return Y===void 0?"":Y})}},function(c,f,u){var p=u(59),y=u(24),b=[].slice,x={},S=function(P,E,A){if(!(E in x)){for(var O=[],R=0;R<E;R++)O[R]="a["+R+"]";x[E]=Function("C,a","return new C("+O.join(",")+")")}return x[E](P,A)};c.exports=Function.bind||function(P){var E=p(this),A=b.call(arguments,1),O=function(){var R=A.concat(b.call(arguments));return this instanceof O?S(E,R.length,R):E.apply(P,R)};return y(E.prototype)&&(O.prototype=E.prototype),O}},function(c,f,u){var p=u(28),y=u(16),b=u(54),x=u(92),S=u(75),P=u(31),E=u(65),A=Object.assign,O=Object.defineProperty;c.exports=!A||y(function(){if(p&&A({b:1},A(O({},"a",{enumerable:!0,get:function(){O(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var R={},X={},Z=Symbol();return R[Z]=7,"abcdefghijklmnopqrst".split("").forEach(function(G){X[G]=G}),A({},R)[Z]!=7||b(A({},X)).join("")!="abcdefghijklmnopqrst"})?function(R,X){for(var Z=P(R),G=arguments.length,U=1,I=x.f,F=S.f;G>U;)for(var Y,M=E(arguments[U++]),C=I?b(M).concat(I(M)):b(M),L=C.length,z=0;L>z;)Y=C[z++],p&&!F.call(M,Y)||(Z[Y]=M[Y]);return Z}:A},function(c,f,u){var p=u(38),y=u(33),b=/"/g;c.exports=function(x,S,P,E){var A=y(p(x)),O="<"+S;return P!==""&&(O+=" "+P+'="'+y(E).replace(b,""")+'"'),O+">"+A+"</"+S+">"}},function(c,f,u){var p=u(16);c.exports=function(y){return p(function(){var b=""[y]('"');return b!==b.toLowerCase()||b.split('"').length>3})}},function(c,f,u){var p=u(15),y=Math.hypot,b=Math.abs,x=Math.sqrt;p({target:"Math",stat:!0,forced:!!y&&y(1/0,NaN)!==1/0},{hypot:function(S,P){for(var E,A,O=0,R=0,X=arguments.length,Z=0;R<X;)Z<(E=b(arguments[R++]))?(O=O*(A=Z/E)*A+1,Z=E):O+=E>0?(A=E/Z)*A:E;return Z===1/0?1/0:Z*x(O)}})},function(c,f,u){var p=u(27);c.exports=function(y){return y!==void 0&&(p(y,"value")||p(y,"writable"))}},function(c,f,u){u(15)({target:"String",proto:!0},{repeat:u(179)})},function(c,f,u){var p=u(50),y=u(33),b=u(38);c.exports=function(x){var S=y(b(this)),P="",E=p(x);if(E<0||E==1/0)throw RangeError("Wrong number of repetitions");for(;E>0;(E>>>=1)&&(S+=S))1&E&&(P+=S);return P}},function(c,f,u){var p=u(28),y=u(54),b=u(34),x=u(75).f,S=function(P){return function(E){for(var A,O=b(E),R=y(O),X=R.length,Z=0,G=[];X>Z;)A=R[Z++],p&&!x.call(O,A)||G.push(P?[A,O[A]]:O[A]);return G}};c.exports={entries:S(!0),values:S(!1)}},function(c,f,u){var p=u(31),y=u(73),b=u(32);c.exports=function(x){for(var S=p(this),P=b(S.length),E=arguments.length,A=y(E>1?arguments[1]:void 0,P),O=E>2?arguments[2]:void 0,R=O===void 0?P:y(O,P);R>A;)S[A++]=x;return S}},function(c,f,u){var p=u(15),y=u(134).trim;p({target:"String",proto:!0,forced:u(183)("trim")},{trim:function(){return y(this)}})},function(c,f,u){var p=u(16),y=u(135);c.exports=function(b){return p(function(){return!!y[b]()||"\u200B\x85\u180E"[b]()!="\u200B\x85\u180E"||y[b].name!==b})}},function(c,f,u){u.r(f),u.d(f,"observer",function(){return _r}),u.d(f,"LogicFlow",function(){return Ns}),u.d(f,"h",function(){return I}),u.d(f,"LogicFlowUtil",function(){return p}),u.d(f,"BaseNode",function(){return Ur}),u.d(f,"RectNode",function(){return us}),u.d(f,"CircleNode",function(){return cs}),u.d(f,"PolygonNode",function(){return fs}),u.d(f,"DiamondNode",function(){return hs}),u.d(f,"EllipseNode",function(){return ds}),u.d(f,"TextNode",function(){return vs}),u.d(f,"HtmlNode",function(){return bs}),u.d(f,"BaseEdge",function(){return Qo}),u.d(f,"LineEdge",function(){return Es}),u.d(f,"PolylineEdge",function(){return Ss}),u.d(f,"BezierEdge",function(){return js}),u.d(f,"Arrow",function(){return ny}),u.d(f,"BaseEdgeModel",function(){return vu}),u.d(f,"BezierEdgeModel",function(){return Iu}),u.d(f,"LineEdgeModel",function(){return mu}),u.d(f,"PolylineEdgeModel",function(){return _u}),u.d(f,"BaseNodeModel",function(){return Hr}),u.d(f,"CircleNodeModel",function(){return zu}),u.d(f,"DiamondNodeModel",function(){return Fu}),u.d(f,"EllipseNodeModel",function(){return Gu}),u.d(f,"PolygonNodeModel",function(){return Vu}),u.d(f,"RectNodeModel",function(){return Ku}),u.d(f,"TextNodeModel",function(){return Ju}),u.d(f,"HtmlNodeModel",function(){return es}),u.d(f,"EditConfigModel",function(){return Yc}),u.d(f,"GraphModel",function(){return Uf}),u.d(f,"SnaplineModel",function(){return ad}),u.d(f,"Keyboard",function(){return Jy}),u.d(f,"get",function(){return Np}),u.d(f,"defaults",function(){return Rp});var p={};u.r(p),u.d(p,"createUuid",function(){return io}),u.d(p,"refreshGraphId",function(){return mm}),u.d(p,"createDrag",function(){return Ho}),u.d(p,"StepDrag",function(){return Uo});var y,b,x,S,P,E,A,O=u(0),R={},X=[],Z=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function G(t,e){for(var r in e)t[r]=e[r];return t}function U(t){var e=t.parentNode;e&&e.removeChild(t)}function I(t,e,r){var n,i,o,a={};for(o in e)o=="key"?n=e[o]:o=="ref"?i=e[o]:a[o]=e[o];if(arguments.length>2&&(a.children=arguments.length>3?y.call(arguments,2):r),typeof t=="function"&&t.defaultProps!=null)for(o in t.defaultProps)a[o]===void 0&&(a[o]=t.defaultProps[o]);return F(t,a,n,i,null)}function F(t,e,r,n,i){var o={type:t,props:e,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i==null?++x:i};return b.vnode!=null&&b.vnode(o),o}function Y(){return{current:null}}function M(t){return t.children}function C(t,e){this.props=t,this.context=e}function L(t,e){if(e==null)return t.__?L(t.__,t.__.__k.indexOf(t)+1):null;for(var r;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null)return r.__e;return typeof t.type=="function"?L(t):null}function z(t){var e,r;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null){t.__e=t.__c.base=r.__e;break}return z(t)}}function B(t){(!t.__d&&(t.__d=!0)&&S.push(t)&&!J.__r++||E!==b.debounceRendering)&&((E=b.debounceRendering)||P)(J)}function J(){for(var t;J.__r=S.length;)t=S.sort(function(e,r){return e.__v.__b-r.__v.__b}),S=[],t.some(function(e){var r,n,i,o,a,s;e.__d&&(a=(o=(r=e).__v).__e,(s=r.__P)&&(n=[],(i=G({},o)).__v=o.__v+1,ye(s,o,i,r.__n,s.ownerSVGElement!==void 0,o.__h!=null?[a]:null,n,a==null?L(o):a,o.__h),he(n,o),o.__e!=a&&z(o)))})}function ee(t,e,r,n,i,o,a,s,l,h){var _,j,k,N,H,$,V,K=n&&n.__k||X,q=K.length;for(r.__k=[],_=0;_<e.length;_++)if((N=r.__k[_]=(N=e[_])==null||typeof N=="boolean"?null:typeof N=="string"||typeof N=="number"||typeof N=="bigint"?F(null,N,null,null,N):Array.isArray(N)?F(M,{children:N},null,null,null):N.__b>0?F(N.type,N.props,N.key,null,N.__v):N)!=null){if(N.__=r,N.__b=r.__b+1,(k=K[_])===null||k&&N.key==k.key&&N.type===k.type)K[_]=void 0;else for(j=0;j<q;j++){if((k=K[j])&&N.key==k.key&&N.type===k.type){K[j]=void 0;break}k=null}ye(t,N,k=k||R,i,o,a,s,l,h),H=N.__e,(j=N.ref)&&k.ref!=j&&(V||(V=[]),k.ref&&V.push(k.ref,null,N),V.push(j,N.__c||H,N)),H!=null?($==null&&($=H),typeof N.type=="function"&&N.__k!=null&&N.__k===k.__k?N.__d=l=ne(N,l,t):l=ge(t,N,k,K,H,l),h||r.type!=="option"?typeof r.type=="function"&&(r.__d=l):t.value=""):l&&k.__e==l&&l.parentNode!=t&&(l=L(k))}for(r.__e=$,_=q;_--;)K[_]!=null&&(typeof r.type=="function"&&K[_].__e!=null&&K[_].__e==r.__d&&(r.__d=L(n,_+1)),Fe(K[_],K[_]));if(V)for(_=0;_<V.length;_++)we(V[_],V[++_],V[++_])}function ne(t,e,r){var n,i;for(n=0;n<t.__k.length;n++)(i=t.__k[n])&&(i.__=t,e=typeof i.type=="function"?ne(i,e,r):ge(r,i,i,t.__k,i.__e,e));return e}function ae(t,e){return e=e||[],t==null||typeof t=="boolean"||(Array.isArray(t)?t.some(function(r){ae(r,e)}):e.push(t)),e}function ge(t,e,r,n,i,o){var a,s,l;if(e.__d!==void 0)a=e.__d,e.__d=void 0;else if(r==null||i!=o||i.parentNode==null)e:if(o==null||o.parentNode!==t)t.appendChild(i),a=null;else{for(s=o,l=0;(s=s.nextSibling)&&l<n.length;l+=2)if(s==i)break e;t.insertBefore(i,o),a=o}return a!==void 0?a:i.nextSibling}function fe(t,e,r){e[0]==="-"?t.setProperty(e,r):t[e]=r==null?"":typeof r!="number"||Z.test(e)?r:r+"px"}function pe(t,e,r,n,i){var o;e:if(e==="style")if(typeof r=="string")t.style.cssText=r;else{if(typeof n=="string"&&(t.style.cssText=n=""),n)for(e in n)r&&e in r||fe(t.style,e,"");if(r)for(e in r)n&&r[e]===n[e]||fe(t.style,e,r[e])}else if(e[0]==="o"&&e[1]==="n")o=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=r,r?n||t.addEventListener(e,o?le:se,o):t.removeEventListener(e,o?le:se,o);else if(e!=="dangerouslySetInnerHTML"){if(i)e=e.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if(e!=="href"&&e!=="list"&&e!=="form"&&e!=="tabIndex"&&e!=="download"&&e in t)try{t[e]=r==null?"":r;break e}catch(a){}typeof r=="function"||(r!=null&&(r!==!1||e[0]==="a"&&e[1]==="r")?t.setAttribute(e,r):t.removeAttribute(e))}}function se(t){this.l[t.type+!1](b.event?b.event(t):t)}function le(t){this.l[t.type+!0](b.event?b.event(t):t)}function ye(t,e,r,n,i,o,a,s,l){var h,_,j,k,N,H,$,V,K,q,te,ie=e.type;if(e.constructor!==void 0)return null;r.__h!=null&&(l=r.__h,s=e.__e=r.__e,e.__h=null,o=[s]),(h=b.__b)&&h(e);try{e:if(typeof ie=="function"){if(V=e.props,K=(h=ie.contextType)&&n[h.__c],q=h?K?K.props.value:h.__:n,r.__c?$=(_=e.__c=r.__c).__=_.__E:("prototype"in ie&&ie.prototype.render?e.__c=_=new ie(V,q):(e.__c=_=new C(V,q),_.constructor=ie,_.render=We),K&&K.sub(_),_.props=V,_.state||(_.state={}),_.context=q,_.__n=n,j=_.__d=!0,_.__h=[]),_.__s==null&&(_.__s=_.state),ie.getDerivedStateFromProps!=null&&(_.__s==_.state&&(_.__s=G({},_.__s)),G(_.__s,ie.getDerivedStateFromProps(V,_.__s))),k=_.props,N=_.state,j)ie.getDerivedStateFromProps==null&&_.componentWillMount!=null&&_.componentWillMount(),_.componentDidMount!=null&&_.__h.push(_.componentDidMount);else{if(ie.getDerivedStateFromProps==null&&V!==k&&_.componentWillReceiveProps!=null&&_.componentWillReceiveProps(V,q),!_.__e&&_.shouldComponentUpdate!=null&&_.shouldComponentUpdate(V,_.__s,q)===!1||e.__v===r.__v){_.props=V,_.state=_.__s,e.__v!==r.__v&&(_.__d=!1),_.__v=e,e.__e=r.__e,e.__k=r.__k,e.__k.forEach(function(oe){oe&&(oe.__=e)}),_.__h.length&&a.push(_);break e}_.componentWillUpdate!=null&&_.componentWillUpdate(V,_.__s,q),_.componentDidUpdate!=null&&_.__h.push(function(){_.componentDidUpdate(k,N,H)})}_.context=q,_.props=V,_.state=_.__s,(h=b.__r)&&h(e),_.__d=!1,_.__v=e,_.__P=t,h=_.render(_.props,_.state,_.context),_.state=_.__s,_.getChildContext!=null&&(n=G(G({},n),_.getChildContext())),j||_.getSnapshotBeforeUpdate==null||(H=_.getSnapshotBeforeUpdate(k,N)),te=h!=null&&h.type===M&&h.key==null?h.props.children:h,ee(t,Array.isArray(te)?te:[te],e,r,n,i,o,a,s,l),_.base=e.__e,e.__h=null,_.__h.length&&a.push(_),$&&(_.__E=_.__=null),_.__e=!1}else o==null&&e.__v===r.__v?(e.__k=r.__k,e.__e=r.__e):e.__e=ke(r.__e,e,r,n,i,o,a,l);(h=b.diffed)&&h(e)}catch(oe){e.__v=null,(l||o!=null)&&(e.__e=s,e.__h=!!l,o[o.indexOf(s)]=null),b.__e(oe,e,r)}}function he(t,e){b.__c&&b.__c(e,t),t.some(function(r){try{t=r.__h,r.__h=[],t.some(function(n){n.call(r)})}catch(n){b.__e(n,r.__v)}})}function ke(t,e,r,n,i,o,a,s){var l,h,_,j=r.props,k=e.props,N=e.type,H=0;if(N==="svg"&&(i=!0),o!=null){for(;H<o.length;H++)if((l=o[H])&&(l===t||(N?l.localName==N:l.nodeType==3))){t=l,o[H]=null;break}}if(t==null){if(N===null)return document.createTextNode(k);t=i?document.createElementNS("http://www.w3.org/2000/svg",N):document.createElement(N,k.is&&k),o=null,s=!1}if(N===null)j===k||s&&t.data===k||(t.data=k);else{if(o=o&&y.call(t.childNodes),h=(j=r.props||R).dangerouslySetInnerHTML,_=k.dangerouslySetInnerHTML,!s){if(o!=null)for(j={},H=0;H<t.attributes.length;H++)j[t.attributes[H].name]=t.attributes[H].value;(_||h)&&(_&&(h&&_.__html==h.__html||_.__html===t.innerHTML)||(t.innerHTML=_&&_.__html||""))}if(function($,V,K,q,te){var ie;for(ie in K)ie==="children"||ie==="key"||ie in V||pe($,ie,null,K[ie],q);for(ie in V)te&&typeof V[ie]!="function"||ie==="children"||ie==="key"||ie==="value"||ie==="checked"||K[ie]===V[ie]||pe($,ie,V[ie],K[ie],q)}(t,k,j,i,s),_)e.__k=[];else if(H=e.props.children,ee(t,Array.isArray(H)?H:[H],e,r,n,i&&N!=="foreignObject",o,a,o?o[0]:r.__k&&L(r,0),s),o!=null)for(H=o.length;H--;)o[H]!=null&&U(o[H]);s||("value"in k&&(H=k.value)!==void 0&&(H!==t.value||N==="progress"&&!H)&&pe(t,"value",H,j.value,!1),"checked"in k&&(H=k.checked)!==void 0&&H!==t.checked&&pe(t,"checked",H,j.checked,!1))}return t}function we(t,e,r){try{typeof t=="function"?t(e):t.current=e}catch(n){b.__e(n,r)}}function Fe(t,e,r){var n,i;if(b.unmount&&b.unmount(t),(n=t.ref)&&(n.current&&n.current!==t.__e||we(n,null,e)),(n=t.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(o){b.__e(o,e)}n.base=n.__P=null}if(n=t.__k)for(i=0;i<n.length;i++)n[i]&&Fe(n[i],e,typeof t.type!="function");r||t.__e==null||U(t.__e),t.__e=t.__d=void 0}function We(t,e,r){return this.constructor(t,r)}function ze(t,e,r){var n,i,o;b.__&&b.__(t,e),i=(n=typeof r=="function")?null:r&&r.__k||e.__k,o=[],ye(e,t=(!n&&r||e).__k=I(M,null,[t]),i||R,R,e.ownerSVGElement!==void 0,!n&&r?[r]:i?null:e.firstChild?y.call(e.childNodes):null,o,!n&&r?r:i?i.__e:e.firstChild,n),he(o,t)}function Ut(t,e){ze(t,e,Ut)}function ur(t,e,r){var n,i,o,a=G({},t.props);for(o in e)o=="key"?n=e[o]:o=="ref"?i=e[o]:a[o]=e[o];return arguments.length>2&&(a.children=arguments.length>3?y.call(arguments,2):r),F(t.type,a,n||t.key,i||t.ref,null)}y=X.slice,b={__e:function(t,e){for(var r,n,i;e=e.__;)if((r=e.__c)&&!r.__)try{if((n=r.constructor)&&n.getDerivedStateFromError!=null&&(r.setState(n.getDerivedStateFromError(t)),i=r.__d),r.componentDidCatch!=null&&(r.componentDidCatch(t),i=r.__d),i)return r.__E=r}catch(o){t=o}throw t}},x=0,C.prototype.setState=function(t,e){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=G({},this.state),typeof t=="function"&&(t=t(G({},r),this.props)),t&&G(r,t),t!=null&&this.__v&&(e&&this.__h.push(e),B(this))},C.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),B(this))},C.prototype.render=M,S=[],P=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,J.__r=0,A=0;var ut,Ue,dt,gt=0,sr=[],jt=b.__b,Yr=b.__r,cr=b.diffed,Ot=b.__c,er=b.unmount;function lr(t,e){b.__h&&b.__h(Ue,t,gt||e),gt=0;var r=Ue.__H||(Ue.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({}),r.__[t]}function Vr(t){return gt=1,zn($r,t)}function zn(t,e,r){var n=lr(ut++,2);return n.t=t,n.__c||(n.__=[r?r(e):$r(void 0,e),function(i){var o=n.t(n.__[0],i);n.__[0]!==o&&(n.__=[o,n.__[1]],n.__c.setState({}))}],n.__c=Ue),n.__}function Cr(t,e){var r=lr(ut++,4);!b.__s&&Rr(r.__H,e)&&(r.__=t,r.__H=e,Ue.__h.push(r))}function qe(t,e){var r=lr(ut++,7);return Rr(r.__H,e)&&(r.__=t(),r.__H=e,r.__h=t),r.__}function Dt(){sr.forEach(function(t){if(t.__P)try{t.__H.__h.forEach(ct),t.__H.__h.forEach(fr),t.__H.__h=[]}catch(e){t.__H.__h=[],b.__e(e,t.__v)}}),sr=[]}b.__b=function(t){Ue=null,jt&&jt(t)},b.__r=function(t){Yr&&Yr(t),ut=0;var e=(Ue=t.__c).__H;e&&(e.__h.forEach(ct),e.__h.forEach(fr),e.__h=[])},b.diffed=function(t){cr&&cr(t);var e=t.__c;e&&e.__H&&e.__H.__h.length&&(sr.push(e)!==1&&dt===b.requestAnimationFrame||((dt=b.requestAnimationFrame)||function(r){var n,i=function(){clearTimeout(o),Ce&&cancelAnimationFrame(n),setTimeout(r)},o=setTimeout(i,100);Ce&&(n=requestAnimationFrame(i))})(Dt)),Ue=void 0},b.__c=function(t,e){e.some(function(r){try{r.__h.forEach(ct),r.__h=r.__h.filter(function(n){return!n.__||fr(n)})}catch(n){e.some(function(i){i.__h&&(i.__h=[])}),e=[],b.__e(n,r.__v)}}),Ot&&Ot(t,e)},b.unmount=function(t){er&&er(t);var e=t.__c;if(e&&e.__H)try{e.__H.__.forEach(ct)}catch(r){b.__e(r,e.__v)}};var Ce=typeof requestAnimationFrame=="function";function ct(t){var e=Ue;typeof t.__c=="function"&&t.__c(),Ue=e}function fr(t){var e=Ue;t.__c=t.__(),Ue=e}function Rr(t,e){return!t||t.length!==e.length||e.some(function(r,n){return r!==t[n]})}function $r(t,e){return typeof e=="function"?e(t):e}function wr(t,e){for(var r in e)t[r]=e[r];return t}function Gt(t,e){for(var r in t)if(r!=="__source"&&!(r in e))return!0;for(var n in e)if(n!=="__source"&&t[n]!==e[n])return!0;return!1}function be(t){this.props=t}(be.prototype=new C).isPureReactComponent=!0,be.prototype.shouldComponentUpdate=function(t,e){return Gt(this.props,t)||Gt(this.state,e)};var je=b.__b;b.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),je&&je(t)};var De=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Re(t){function e(r,n){var i=wr({},r);return delete i.ref,t(i,(n=r.ref||n)&&(typeof n!="object"||"current"in n)?n:null)}return e.$$typeof=De,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var it=function(t,e){return t==null?null:ae(ae(t).map(e))},Ir={map:it,forEach:it,count:function(t){return t?ae(t).length:0},only:function(t){var e=ae(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:ae},xr=b.__e;b.__e=function(t,e,r){if(t.then){for(var n,i=e;i=i.__;)if((n=i.__c)&&n.__c)return e.__e==null&&(e.__e=r.__e,e.__k=r.__k),n.__c(t,e)}xr(t,e,r)};var Pt=b.unmount;function Kr(){this.__u=0,this.t=null,this.__b=null}function qr(t){var e=t.__.__c;return e&&e.__e&&e.__e(t)}function Zr(){this.u=null,this.o=null}b.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&t.__h===!0&&(t.type=null),Pt&&Pt(t)},(Kr.prototype=new C).__c=function(t,e){var r=e.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var i=qr(n.__v),o=!1,a=function(){o||(o=!0,r.__R=null,i?i(s):s())};r.__R=a;var s=function(){if(!--n.__u){if(n.state.__e){var h=n.state.__e;n.__v.__k[0]=function j(k,N,H){return k&&(k.__v=null,k.__k=k.__k&&k.__k.map(function($){return j($,N,H)}),k.__c&&k.__c.__P===N&&(k.__e&&H.insertBefore(k.__e,k.__d),k.__c.__e=!0,k.__c.__P=H)),k}(h,h.__c.__P,h.__c.__O)}var _;for(n.setState({__e:n.__b=null});_=n.t.pop();)_.forceUpdate()}},l=e.__h===!0;n.__u++||l||n.setState({__e:n.__b=n.__v.__k[0]}),t.then(a,a)},Kr.prototype.componentWillUnmount=function(){this.t=[]},Kr.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=function o(a,s,l){return a&&(a.__c&&a.__c.__H&&(a.__c.__H.__.forEach(function(h){typeof h.__c=="function"&&h.__c()}),a.__c.__H=null),(a=wr({},a)).__c!=null&&(a.__c.__P===l&&(a.__c.__P=s),a.__c=null),a.__k=a.__k&&a.__k.map(function(h){return o(h,s,l)})),a}(this.__b,r,n.__O=n.__P)}this.__b=null}var i=e.__e&&I(M,null,t.fallback);return i&&(i.__h=null),[I(M,null,e.__e?null:t.children),i]};var vn=function(t,e,r){if(++r[1]===r[0]&&t.o.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.o.size))for(r=t.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;t.u=r=r[2]}};function Aa(t){return this.getChildContext=function(){return t.context},t.children}function hi(t){var e=this,r=t.i;e.componentWillUnmount=function(){ze(null,e.l),e.l=null,e.i=null},e.i&&e.i!==r&&e.componentWillUnmount(),t.__v?(e.l||(e.i=r,e.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(n){this.childNodes.push(n),e.i.appendChild(n)},insertBefore:function(n,i){this.childNodes.push(n),e.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),e.i.removeChild(n)}}),ze(I(Aa,{context:e.context},t.__v),e.l)):e.l&&e.componentWillUnmount()}(Zr.prototype=new C).__e=function(t){var e=this,r=qr(e.__v),n=e.o.get(t);return n[0]++,function(i){var o=function(){e.props.revealOrder?(n.push(i),vn(e,t,n)):i()};r?r(o):o()}},Zr.prototype.render=function(t){this.u=null,this.o=new Map;var e=ae(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var r=e.length;r--;)this.o.set(e[r],this.u=[1,0,this.u]);return t.children},Zr.prototype.componentDidUpdate=Zr.prototype.componentDidMount=function(){var t=this;this.o.forEach(function(e,r){vn(t,r,e)})};var pr=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,di=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|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]/,yi=function(t){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(t)};C.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(C.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var _o=b.event;function Da(){}function gn(){return this.cancelBubble}function bn(){return this.defaultPrevented}b.event=function(t){return _o&&(t=_o(t)),t.persist=Da,t.isPropagationStopped=gn,t.isDefaultPrevented=bn,t.nativeEvent=t};var hr,vi={configurable:!0,get:function(){return this.class}},dr=b.vnode;b.vnode=function(t){var e=t.type,r=t.props,n=r;if(typeof e=="string"){for(var i in n={},r){var o=r[i];i==="value"&&"defaultValue"in r&&o==null||(i==="defaultValue"&&"value"in r&&r.value==null?i="value":i==="download"&&o===!0?o="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+e)&&!yi(r.type)?i="oninput":/^on(Ani|Tra|Tou|BeforeInp)/.test(i)?i=i.toLowerCase():di.test(i)?i=i.replace(/[A-Z0-9]/,"-$&").toLowerCase():o===null&&(o=void 0),n[i]=o)}e=="select"&&n.multiple&&Array.isArray(n.value)&&(n.value=ae(r.children).forEach(function(a){a.props.selected=n.value.indexOf(a.props.value)!=-1})),e=="select"&&n.defaultValue!=null&&(n.value=ae(r.children).forEach(function(a){a.props.selected=n.multiple?n.defaultValue.indexOf(a.props.value)!=-1:n.defaultValue==a.props.value})),t.props=n}e&&r.class!=r.className&&(vi.enumerable="className"in r,r.className!=null&&(n.class=r.className),Object.defineProperty(n,"className",vi)),t.$$typeof=pr,dr&&dr(t)};var Lr=b.__r;b.__r=function(t){Lr&&Lr(t),hr=t.__c};function mn(t){return!!t&&t.$$typeof===pr}function Jr(t){return t&&(t.base||t.nodeType===1&&t)||null}var Oo=function(t,e){return t(e)},ve={useState:Vr,useReducer:zn,useEffect:function(t,e){var r=lr(ut++,3);!b.__s&&Rr(r.__H,e)&&(r.__=t,r.__H=e,Ue.__H.__h.push(r))},useLayoutEffect:Cr,useRef:function(t){return gt=5,qe(function(){return{current:t}},[])},useImperativeHandle:function(t,e,r){gt=6,Cr(function(){typeof t=="function"?t(e()):t&&(t.current=e())},r==null?r:r.concat(t))},useMemo:qe,useCallback:function(t,e){return gt=8,qe(function(){return t},e)},useContext:function(t){var e=Ue.context[t.__c],r=lr(ut++,9);return r.c=t,e?(r.__==null&&(r.__=!0,e.sub(Ue)),e.props.value):t.__},useDebugValue:function(t,e){b.useDebugValue&&b.useDebugValue(e?e(t):t)},version:"17.0.2",Children:Ir,render:function(t,e,r){return e.__k==null&&(e.textContent=""),ze(t,e),typeof r=="function"&&r(),t?t.__c:null},hydrate:function(t,e,r){return Ut(t,e),typeof r=="function"&&r(),t?t.__c:null},unmountComponentAtNode:function(t){return!!t.__k&&(ze(null,t),!0)},createPortal:function(t,e){return I(hi,{__v:t,i:e})},createElement:I,createContext:function(t,e){var r={__c:e="__cC"+A++,__:t,Consumer:function(n,i){return n.children(i)},Provider:function(n){var i,o;return this.getChildContext||(i=[],(o={})[e]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(a){this.props.value!==a.value&&i.some(B)},this.sub=function(a){i.push(a);var s=a.componentWillUnmount;a.componentWillUnmount=function(){i.splice(i.indexOf(a),1),s&&s.call(a)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r},createFactory:function(t){return I.bind(null,t)},cloneElement:function(t){return mn(t)?ur.apply(null,arguments):t},createRef:Y,Fragment:M,isValidElement:mn,findDOMNode:Jr,Component:C,PureComponent:be,memo:function(t,e){function r(i){var o=this.props.ref,a=o==i.ref;return!a&&o&&(o.call?o(null):o.current=null),e?!e(this.props,i)||!a:Gt(this.props,i)}function n(i){return this.shouldComponentUpdate=r,I(t,i)}return n.displayName="Memo("+(t.displayName||t.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n},forwardRef:Re,flushSync:function(t,e){return t(e)},unstable_batchedUpdates:Oo,StrictMode:M,Suspense:Kr,SuspenseList:Zr,lazy:function(t){var e,r,n;function i(o){if(e||(e=t()).then(function(a){r=a.default||a},function(a){n=a}),n)throw n;if(!r)throw e;return I(r,o)}return i.displayName="Lazy",i.__f=!0,i},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentDispatcher:{current:{readContext:function(t){return hr.__n[t.__c].props.value}}}}};/** @license mobx-react v5.4.4
|
|
* index.module.js
|
|
*
|
|
* Copyright (c) 2015 Michel Weststrate.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/function Qr(t){return(Qr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function _n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wo(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ct(t,e,r){return e&&wo(t.prototype,e),r&&wo(t,r),t}function Tt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Bn(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&en(t,e)}function On(t){return(On=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}function en(t,e){return(en=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r})(t,e)}function wn(t,e){return!e||typeof e!="object"&&typeof e!="function"?function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t):e}function xo(t,e){return t(e={exports:{}},e.exports),e.exports}var Xn,Ye=xo(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var r=typeof Symbol=="function"&&Symbol.for,n=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,o=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,l=r?Symbol.for("react.provider"):60109,h=r?Symbol.for("react.context"):60110,_=r?Symbol.for("react.async_mode"):60111,j=r?Symbol.for("react.concurrent_mode"):60111,k=r?Symbol.for("react.forward_ref"):60112,N=r?Symbol.for("react.suspense"):60113,H=r?Symbol.for("react.memo"):60115,$=r?Symbol.for("react.lazy"):60116;function V(q){if(typeof q=="object"&&q!==null){var te=q.$$typeof;switch(te){case n:switch(q=q.type){case _:case j:case o:case s:case a:return q;default:switch(q=q&&q.$$typeof){case h:case k:case l:return q;default:return te}}case i:return te}}}function K(q){return V(q)===j}e.typeOf=V,e.AsyncMode=_,e.ConcurrentMode=j,e.ContextConsumer=h,e.ContextProvider=l,e.Element=n,e.ForwardRef=k,e.Fragment=o,e.Profiler=s,e.Portal=i,e.StrictMode=a,e.isValidElementType=function(q){return typeof q=="string"||typeof q=="function"||q===o||q===j||q===s||q===a||q===N||typeof q=="object"&&q!==null&&(q.$$typeof===$||q.$$typeof===H||q.$$typeof===l||q.$$typeof===h||q.$$typeof===k)},e.isAsyncMode=function(q){return K(q)||V(q)===_},e.isConcurrentMode=K,e.isContextConsumer=function(q){return V(q)===h},e.isContextProvider=function(q){return V(q)===l},e.isElement=function(q){return typeof q=="object"&&q!==null&&q.$$typeof===n},e.isForwardRef=function(q){return V(q)===k},e.isFragment=function(q){return V(q)===o},e.isProfiler=function(q){return V(q)===s},e.isPortal=function(q){return V(q)===i},e.isStrictMode=function(q){return V(q)===a}});(Xn=Ye)&&Xn.__esModule&&Object.prototype.hasOwnProperty.call(Xn,"default")&&Xn.default,Ye.typeOf,Ye.AsyncMode,Ye.ConcurrentMode,Ye.ContextConsumer,Ye.ContextProvider,Ye.Element,Ye.ForwardRef,Ye.Fragment,Ye.Profiler,Ye.Portal,Ye.StrictMode,Ye.isValidElementType,Ye.isAsyncMode,Ye.isConcurrentMode,Ye.isContextConsumer,Ye.isContextProvider,Ye.isElement,Ye.isForwardRef,Ye.isFragment,Ye.isProfiler,Ye.isPortal,Ye.isStrictMode;var Ta=xo(function(t){t.exports=Ye}),lt={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},tn={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Mt={};Mt[Ta.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0};var Ma=Object.defineProperty,Wt=Object.getOwnPropertyNames,Eo=Object.getOwnPropertySymbols,Na=Object.getOwnPropertyDescriptor,gi=Object.getPrototypeOf,bi=Object.prototype,yr=function t(e,r,n){if(typeof r!="string"){if(bi){var i=gi(r);i&&i!==bi&&t(e,i,n)}var o=Wt(r);Eo&&(o=o.concat(Eo(r)));for(var a=Mt[e.$$typeof]||lt,s=Mt[r.$$typeof]||lt,l=0;l<o.length;++l){var h=o[l];if(!(tn[h]||n&&n[h]||s&&s[h]||a&&a[h])){var _=Na(r,h);try{Ma(e,h,_)}catch(j){}}}return e}return e},mi=function(){function t(){_n(this,t),this.listeners=[]}return Ct(t,[{key:"on",value:function(e){var r=this;return this.listeners.push(e),function(){var n=r.listeners.indexOf(e);n!==-1&&r.listeners.splice(n,1)}}},{key:"emit",value:function(e){this.listeners.forEach(function(r){return r(e)})}}]),t}();function _i(t){function e(n,i,o,a,s,l){for(var h=arguments.length,_=new Array(h>6?h-6:0),j=6;j<h;j++)_[j-6]=arguments[j];return Object(O.I)(function(){if(a=a||"<<anonymous>>",l=l||o,i[o]==null){if(n){var k=i[o]===null?"null":"undefined";return new Error("The "+s+" `"+l+"` is marked as required in `"+a+"`, but its value is `"+k+"`.")}return null}return t.apply(void 0,[i,o,a,s,l].concat(_))})}var r=e.bind(null,!1);return r.isRequired=e.bind(null,!0),r}function Fn(t){var e=Qr(t);return Array.isArray(t)?"array":t instanceof RegExp?"object":function(r,n){return r==="symbol"||n["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&n instanceof Symbol}(e,t)?"symbol":e}function Er(t,e){return _i(function(r,n,i,o,a){return Object(O.I)(function(){if(t&&Fn(r[n])===e.toLowerCase())return null;var s;switch(e){case"Array":s=O.w;break;case"Object":s=O.y;break;case"Map":s=O.x;break;default:throw new Error("Unexpected mobxType: ".concat(e))}var l=r[n];if(!s(l)){var h=function(j){var k=Fn(j);if(k==="object"){if(j instanceof Date)return"date";if(j instanceof RegExp)return"regexp"}return k}(l),_=t?" or javascript `"+e.toLowerCase()+"`":"";return new Error("Invalid prop `"+a+"` of type `"+h+"` supplied to `"+i+"`, expected `mobx.Observable"+e+"`"+_+".")}return null})})}function Oi(t,e){return _i(function(r,n,i,o,a){for(var s=arguments.length,l=new Array(s>5?s-5:0),h=5;h<s;h++)l[h-5]=arguments[h];return Object(O.I)(function(){if(typeof e!="function")return new Error("Property `"+a+"` of component `"+i+"` has invalid PropType notation.");var _=Er(t,"Array")(r,n,i);if(_ instanceof Error)return _;for(var j=r[n],k=0;k<j.length;k++)if((_=e.apply(void 0,[j,k,i,o,a+"["+k+"]"].concat(l)))instanceof Error)return _;return null})})}Er(!1,"Array"),Oi.bind(null,!1),Er(!1,"Map"),Er(!1,"Object"),Er(!0,"Array"),Oi.bind(null,!0);var Hn=Er(!0,"Object"),wi=0,xn={};function vr(t){return xn[t]||(xn[t]=function(e){if(typeof Symbol=="function")return Symbol(e);var r="__$mobx-react ".concat(e," (").concat(wi,")");return wi++,r}(t)),xn[t]}var xi=vr("patchMixins"),So=vr("patchedDefinition");function Ei(t,e){var r=t[xi]=t[xi]||{},n=r[e]=r[e]||{};return n.locks=n.locks||0,n.methods=n.methods||[],n}function Si(t,e){for(var r=this,n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];e.locks++;try{var a;return t!=null&&(a=t.apply(this,i)),a}finally{e.locks--,e.locks===0&&e.methods.forEach(function(s){s.apply(r,i)})}}function jo(t,e){return function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];Si.call.apply(Si,[this,t,e].concat(n))}}function Ca(t,e){for(var r=Ei(t,e),n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];for(var a=0;a<i.length;a++){var s=i[a];r.methods.indexOf(s)<0&&r.methods.push(s)}var l=Object.getOwnPropertyDescriptor(t,e);if(!l||!l[So]){var h=t[e],_=Po(t,e,l?l.enumerable:void 0,r,h);Object.defineProperty(t,e,_)}}function Po(t,e,r,n,i){var o,a=jo(i,n);return Tt(o={},So,!0),Tt(o,"get",function(){return a}),Tt(o,"set",function(s){if(this===t)a=jo(s,n);else{var l=Po(this,e,r,n,s);Object.defineProperty(this,e,l)}}),Tt(o,"configurable",!0),Tt(o,"enumerable",r),o}var ko={mobxStores:Hn};Object.seal(ko);var Ra={contextTypes:{get:function(){return ko},set:function(t){},configurable:!0,enumerable:!1},isMobxInjector:{value:!0,writable:!0,configurable:!0,enumerable:!0}};function ji(t,e,r){var n="inject-"+(e.displayName||e.name||e.constructor&&e.constructor.name||"Unknown");r&&(n+="-with-"+r);var i=function(o){function a(){var s,l;_n(this,a);for(var h=arguments.length,_=new Array(h),j=0;j<h;j++)_[j]=arguments[j];return(l=wn(this,(s=On(a)).call.apply(s,[this].concat(_)))).storeRef=function(k){l.wrappedInstance=k},l}return Bn(a,o),Ct(a,[{key:"render",value:function(){var s={};for(var l in this.props)this.props.hasOwnProperty(l)&&(s[l]=this.props[l]);var h=t(this.context.mobxStores||{},s,this.context)||{};for(var _ in h)s[_]=h[_];return function(j){return!(j.prototype&&j.prototype.render)}(e)||(s.ref=this.storeRef),I(e,s)}}]),a}(C);return i.displayName=n,yr(i,e),i.wrappedComponent=e,Object.defineProperties(i,Ra),i}function Ia(t){return function(e,r){return t.forEach(function(n){if(!(n in r)){if(!(n in e))throw new Error("MobX injector: Store '"+n+"' is not available! Make sure it is provided by some Provider");r[n]=e[n]}}),r}}function rn(){var t;if(typeof arguments[0]=="function")return t=arguments[0],function(n){var i=ji(t,n);return i.isMobxInjector=!1,(i=rr(i)).isMobxInjector=!0,i};for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return t=Ia(e),function(n){return ji(t,n,e.join("-"))}}var Sr=O.a||"$mobx",Pi=vr("isUnmounted"),zr=!1,ki=!1,nn=typeof WeakMap!="undefined"?new WeakMap:void 0,jr=new mi,Un=vr("skipRender"),Gn=vr("isForcingUpdate"),Yt=Re(function(t,e){}).$$typeof;function gr(t,e,r){Object.hasOwnProperty.call(t,e)?t[e]=r:Object.defineProperty(t,e,{enumerable:!1,configurable:!0,writable:!0,value:r})}function Ao(t){if(Jr)try{return Jr(t)}catch(e){return null}return null}function Ai(t){var e=Ao(t);e&&nn&&nn.set(e,t),jr.emit({event:"render",renderTime:t.__$mobRenderEnd-t.__$mobRenderStart,totalTime:Date.now()-t.__$mobRenderStart,component:t,node:e})}var tr=new mi;function on(t,e){if(Vt(t,e))return!0;if(Qr(t)!=="object"||t===null||Qr(e)!=="object"||e===null)return!1;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(var i=0;i<r.length;i++)if(!hasOwnProperty.call(e,r[i])||!Vt(t[r[i]],e[r[i]]))return!1;return!0}function Vt(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function $t(t){var e=this;function r(){var l=this;a=!1;var h=void 0,_=void 0;if(s.track(function(){zr&&(l.__$mobRenderStart=Date.now());try{_=Object(O.d)(!1,o)}catch(j){h=j}zr&&(l.__$mobRenderEnd=Date.now())}),h)throw tr.emit(h),h;return _}var n=this.displayName||this.name||this.constructor&&(this.constructor.displayName||this.constructor.name)||"<component>",i=this._reactInternalInstance&&this._reactInternalInstance._rootNodeID||this._reactInternalInstance&&this._reactInternalInstance._debugID||this._reactInternalFiber&&this._reactInternalFiber._debugID;gr(this,Un,!1),gr(this,Gn,!1);var o=t.bind(this),a=!1,s=new O.c("".concat(n,"#").concat(i,".render()"),function(){if(!a&&(a=!0,typeof e.componentWillReact=="function"&&e.componentWillReact(),e[Pi]!==!0)){var l=!0;try{gr(e,Gn,!0),e[Un]||C.prototype.forceUpdate.call(e),l=!1}finally{gr(e,Gn,!1),l&&s.dispose()}}});return s.reactComponent=this,r[Sr]=s,this.render=r,r.call(this)}var Br={componentWillUnmount:function(){if(this.render[Sr]&&this.render[Sr].dispose(),this[Pi]=!0,zr){var t=Ao(this);t&&nn&&nn.delete(t),jr.emit({event:"destroy",component:this,node:t})}},componentDidMount:function(){zr&&Ai(this)},componentDidUpdate:function(){zr&&Ai(this)},shouldComponentUpdate:function(t,e){return this.state!==e||!on(this.props,t)}};function Rt(t,e){var r=vr("reactProp_".concat(e,"_valueHolder")),n=vr("reactProp_".concat(e,"_atomHolder"));function i(){return this[n]||gr(this,n,Object(O.m)("reactive "+e)),this[n]}Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get:function(){return i.call(this).reportObserved(),this[r]},set:function(o){this[Gn]||on(this[r],o)?gr(this,r,o):(gr(this,r,o),gr(this,Un,!0),i.call(this).reportChanged(),gr(this,Un,!1))}})}function rr(t,e){if(typeof t=="string")throw new Error("Store names should be provided as array");if(Array.isArray(t))return ki||(ki=!0),e?rn.apply(null,t)(rr(e)):function(h){return rr(t,h)};var r=t;if(r.isMobxInjector,r.__proto__,Yt&&r.$$typeof===Yt){var n=r.render;if(typeof n!="function")throw new Error("render property of ForwardRef was not a function");return Re(function(){var h=arguments;return ve.createElement(En,null,function(){return n.apply(void 0,h)})})}if(!(typeof r!="function"||r.prototype&&r.prototype.render||r.isReactClass||C.isPrototypeOf(r))){var i,o,a=rr((o=i=function(h){function _(){return _n(this,_),wn(this,On(_).apply(this,arguments))}return Bn(_,h),Ct(_,[{key:"render",value:function(){return r.call(this,this.props,this.context)}}]),_}(C),i.displayName=r.displayName||r.name,i.contextTypes=r.contextTypes,i.propTypes=r.propTypes,i.defaultProps=r.defaultProps,o));return yr(a,r),a}if(!r)throw new Error("Please pass a valid component to 'observer'");var s=r.prototype||r;(function(h){["componentDidMount","componentWillUnmount","componentDidUpdate"].forEach(function(_){(function(j,k){Ca(j,k,Br[k])})(h,_)}),h.shouldComponentUpdate?(h.shouldComponentUpdate,Br.shouldComponentUpdate):h.shouldComponentUpdate=Br.shouldComponentUpdate})(s),r.isMobXReactObserver=!0,Rt(s,"props"),Rt(s,"state");var l=s.render;return s.render=function(){return $t.call(this,l)},r}var En=rr(function(t){var e=t.children,r=t.inject,n=t.render,i=e||n;if(i===void 0)return null;if(!r)return i();var o=rn(r)(i);return ve.createElement(o,null)});En.displayName="Observer";var an=function(t,e,r,n,i){var o=e==="children"?"render":"children";return typeof t[e]=="function"&&typeof t[o]=="function"?new Error("Invalid prop,do not use children and render in the same time in`"+r):typeof t[e]!="function"&&typeof t[o]!="function"?new Error("Invalid prop `"+i+"` of type `"+Qr(t[e])+"` supplied to `"+r+"`, expected `function`."):void 0};function Sn(){var t=this.constructor.getDerivedStateFromProps(this.props,this.state);t!=null&&this.setState(t)}function Di(t){this.setState(function(e){var r=this.constructor.getDerivedStateFromProps(t,e);return r!=null?r:null}.bind(this))}function Wn(t,e){try{var r=this.props,n=this.state;this.props=t,this.state=e,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(r,n)}finally{this.props=r,this.state=n}}En.propTypes={render:an,children:an},Sn.__suppressDeprecationWarning=!0,Di.__suppressDeprecationWarning=!0,Wn.__suppressDeprecationWarning=!0;var Do={children:!0,key:!0,ref:!0},Yn=function(t){function e(r,n){var i;return _n(this,e),(i=wn(this,On(e).call(this,r,n))).state={},It(r,i.state),i}return Bn(e,t),Ct(e,[{key:"render",value:function(){return Ir.only(this.props.children)}},{key:"getChildContext",value:function(){var r={};return It(this.context.mobxStores,r),It(this.props,r),{mobxStores:r}}}],[{key:"getDerivedStateFromProps",value:function(r,n){if(!r)return null;if(!n)return r;if(Object.keys(r).filter(Vn).length,Object.keys(n).filter(Vn).length,!r.suppressChangedStoreWarning)for(var i in r)Vn(i)&&(n[i],r[i]);return r}}]),e}(C);function It(t,e){if(t)for(var r in t)Vn(r)&&(e[r]=t[r])}function Vn(t){return!Do[t]&&t!=="suppressChangedStoreWarning"}if(Yn.contextTypes={mobxStores:Hn},Yn.childContextTypes={mobxStores:Hn.isRequired},function(t){var e=t.prototype;if(!e||!e.isReactComponent)throw new Error("Can only polyfill class components");if(typeof t.getDerivedStateFromProps!="function"&&typeof e.getSnapshotBeforeUpdate!="function")return t;var r=null,n=null,i=null;if(typeof e.componentWillMount=="function"?r="componentWillMount":typeof e.UNSAFE_componentWillMount=="function"&&(r="UNSAFE_componentWillMount"),typeof e.componentWillReceiveProps=="function"?n="componentWillReceiveProps":typeof e.UNSAFE_componentWillReceiveProps=="function"&&(n="UNSAFE_componentWillReceiveProps"),typeof e.componentWillUpdate=="function"?i="componentWillUpdate":typeof e.UNSAFE_componentWillUpdate=="function"&&(i="UNSAFE_componentWillUpdate"),r!==null||n!==null||i!==null){var o=t.displayName||t.name,a=typeof t.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
|
|
|
|
`+o+" uses "+a+" but also contains the following legacy lifecycles:"+(r!==null?`
|
|
`+r:"")+(n!==null?`
|
|
`+n:"")+(i!==null?`
|
|
`+i:"")+`
|
|
|
|
The above lifecycles should be removed. Learn more about this warning here:
|
|
https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof t.getDerivedStateFromProps=="function"&&(e.componentWillMount=Sn,e.componentWillReceiveProps=Di),typeof e.getSnapshotBeforeUpdate=="function"){if(typeof e.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");e.componentWillUpdate=Wn;var s=e.componentDidUpdate;e.componentDidUpdate=function(l,h,_){var j=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:_;s.call(this,l,h,j)}}}(Yn),vr("disposeOnUnmount"),!C)throw new Error("mobx-react requires React to be available");if(!O.F)throw new Error("mobx-react requires mobx to be available");if(Object(O.l)({reactionScheduler:Oo}),(typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="undefined"?"undefined":Qr(__MOBX_DEVTOOLS_GLOBAL_HOOK__))==="object"){var Ti={spy:O.F,extras:{getDebugName:O.r}},La={renderReporter:jr,componentByNodeRegistry:nn,componentByNodeRegistery:nn,trackComponents:function(){if(typeof WeakMap=="undefined")throw new Error("[mobx-react] tracking components is not supported in this browser.");zr||(zr=!0)}};__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobxReact(La,Ti)}u(1),u(78),u(3),u(5),u(4),u(8),u(17),u(35),u(12),u(2),u(19),u(13),u(20),u(6),u(7),u(14),u(18),u(159),u(164),u(81),u(130),u(131);var $n=function(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i},za=function(){this.__data__=[],this.size=0},Lt=function(t,e){return t===e||t!=t&&e!=e},Kn=function(t,e){for(var r=t.length;r--;)if(Lt(t[r][0],e))return r;return-1},jn=Array.prototype.splice,qn=function(t){var e=this.__data__,r=Kn(e,t);return!(r<0)&&(r==e.length-1?e.pop():jn.call(e,r,1),--this.size,!0)},zt=function(t){var e=this.__data__,r=Kn(e,t);return r<0?void 0:e[r][1]},Ba=function(t){return Kn(this.__data__,t)>-1},Zn=function(t,e){var r=this.__data__,n=Kn(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function wt(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}wt.prototype.clear=za,wt.prototype.delete=qn,wt.prototype.get=zt,wt.prototype.has=Ba,wt.prototype.set=Zn;var Pn=wt,To=function(){this.__data__=new Pn,this.size=0},Xa=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},Mi=function(t){return this.__data__.get(t)},Ni=function(t){return this.__data__.has(t)},nr=u(22),Bt=nr.a.Symbol,Kt=Object.prototype,or=Kt.hasOwnProperty,kn=Kt.toString,un=Bt?Bt.toStringTag:void 0,Ci=function(t){var e=or.call(t,un),r=t[un];try{t[un]=void 0;var n=!0}catch(o){}var i=kn.call(t);return n&&(e?t[un]=r:delete t[un]),i},Mo=Object.prototype.toString,Ri=function(t){return Mo.call(t)},Ii=Bt?Bt.toStringTag:void 0,Xr=function(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Ii&&Ii in Object(t)?Ci(t):Ri(t)},v=function(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")},m,w=function(t){if(!v(t))return!1;var e=Xr(t);return e=="[object Function]"||e=="[object GeneratorFunction]"||e=="[object AsyncFunction]"||e=="[object Proxy]"},D=nr.a["__core-js_shared__"],T=(m=/[^.]+$/.exec(D&&D.keys&&D.keys.IE_PROTO||""))?"Symbol(src)_1."+m:"",W=function(t){return!!T&&T in t},Q=Function.prototype.toString,ce=function(t){if(t!=null){try{return Q.call(t)}catch(e){}try{return t+""}catch(e){}}return""},Oe=/^\[object .+?Constructor\]$/,Te=Function.prototype,xe=Object.prototype,Be=Te.toString,Xe=xe.hasOwnProperty,He=RegExp("^"+Be.call(Xe).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Qe=function(t){return!(!v(t)||W(t))&&(w(t)?He:Oe).test(ce(t))},et=function(t,e){return t==null?void 0:t[e]},nt=function(t,e){var r=et(t,e);return Qe(r)?r:void 0},yt=nt(nr.a,"Map"),Fr=nt(Object,"create"),ng=function(){this.__data__=Fr?Fr(null):{},this.size=0},og=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},ig=Object.prototype.hasOwnProperty,ag=function(t){var e=this.__data__;if(Fr){var r=e[t];return r==="__lodash_hash_undefined__"?void 0:r}return ig.call(e,t)?e[t]:void 0},ug=Object.prototype.hasOwnProperty,sg=function(t){var e=this.__data__;return Fr?e[t]!==void 0:ug.call(e,t)},cg=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Fr&&e===void 0?"__lodash_hash_undefined__":e,this};function Jn(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Jn.prototype.clear=ng,Jn.prototype.delete=og,Jn.prototype.get=ag,Jn.prototype.has=sg,Jn.prototype.set=cg;var ic=Jn,lg=function(){this.size=0,this.__data__={hash:new ic,map:new(yt||Pn),string:new ic}},fg=function(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null},Li=function(t,e){var r=t.__data__;return fg(e)?r[typeof e=="string"?"string":"hash"]:r.map},pg=function(t){var e=Li(this,t).delete(t);return this.size-=e?1:0,e},hg=function(t){return Li(this,t).get(t)},dg=function(t){return Li(this,t).has(t)},yg=function(t,e){var r=Li(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function Qn(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Qn.prototype.clear=lg,Qn.prototype.delete=pg,Qn.prototype.get=hg,Qn.prototype.has=dg,Qn.prototype.set=yg;var zi=Qn,vg=function(t,e){var r=this.__data__;if(r instanceof Pn){var n=r.__data__;if(!yt||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new zi(n)}return r.set(t,e),this.size=r.size,this};function eo(t){var e=this.__data__=new Pn(t);this.size=e.size}eo.prototype.clear=To,eo.prototype.delete=Xa,eo.prototype.get=Mi,eo.prototype.has=Ni,eo.prototype.set=vg;var No=eo,gg=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},bg=function(t){return this.__data__.has(t)};function Bi(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new zi;++e<r;)this.add(t[e])}Bi.prototype.add=Bi.prototype.push=gg,Bi.prototype.has=bg;var mg=Bi,_g=function(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1},Og=function(t,e){return t.has(e)},ac=function(t,e,r,n,i,o){var a=1&r,s=t.length,l=e.length;if(s!=l&&!(a&&l>s))return!1;var h=o.get(t),_=o.get(e);if(h&&_)return h==e&&_==t;var j=-1,k=!0,N=2&r?new mg:void 0;for(o.set(t,e),o.set(e,t);++j<s;){var H=t[j],$=e[j];if(n)var V=a?n($,H,j,e,t,o):n(H,$,j,t,e,o);if(V!==void 0){if(V)continue;k=!1;break}if(N){if(!_g(e,function(K,q){if(!Og(N,q)&&(H===K||i(H,K,r,n,o)))return N.push(q)})){k=!1;break}}else if(H!==$&&!i(H,$,r,n,o)){k=!1;break}}return o.delete(t),o.delete(e),k},Xi=nr.a.Uint8Array,wg=function(t){var e=-1,r=Array(t.size);return t.forEach(function(n,i){r[++e]=[i,n]}),r},xg=function(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r},uc=Bt?Bt.prototype:void 0,Fa=uc?uc.valueOf:void 0,Eg=function(t,e,r,n,i,o,a){switch(r){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!o(new Xi(t),new Xi(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Lt(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var s=wg;case"[object Set]":var l=1&n;if(s||(s=xg),t.size!=e.size&&!l)return!1;var h=a.get(t);if(h)return h==e;n|=2,a.set(t,e);var _=ac(s(t),s(e),n,i,o,a);return a.delete(t),_;case"[object Symbol]":if(Fa)return Fa.call(t)==Fa.call(e)}return!1},Ha=function(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t},qt=Array.isArray,sc=function(t,e,r){var n=e(t);return qt(t)?n:Ha(n,r(t))},Sg=function(t,e){for(var r=-1,n=t==null?0:t.length,i=0,o=[];++r<n;){var a=t[r];e(a,r,t)&&(o[i++]=a)}return o},cc=function(){return[]},jg=Object.prototype.propertyIsEnumerable,lc=Object.getOwnPropertySymbols,Ua=lc?function(t){return t==null?[]:(t=Object(t),Sg(lc(t),function(e){return jg.call(t,e)}))}:cc,Pg=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n},sn=function(t){return t!=null&&typeof t=="object"},fc=function(t){return sn(t)&&Xr(t)=="[object Arguments]"},pc=Object.prototype,kg=pc.hasOwnProperty,Ag=pc.propertyIsEnumerable,Ga=fc(function(){return arguments}())?fc:function(t){return sn(t)&&kg.call(t,"callee")&&!Ag.call(t,"callee")},Fi=u(48),Dg=/^(?:0|[1-9]\d*)$/,Hi=function(t,e){var r=typeof t;return!!(e=e==null?9007199254740991:e)&&(r=="number"||r!="symbol"&&Dg.test(t))&&t>-1&&t%1==0&&t<e},Wa=function(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=9007199254740991},tt={};tt["[object Float32Array]"]=tt["[object Float64Array]"]=tt["[object Int8Array]"]=tt["[object Int16Array]"]=tt["[object Int32Array]"]=tt["[object Uint8Array]"]=tt["[object Uint8ClampedArray]"]=tt["[object Uint16Array]"]=tt["[object Uint32Array]"]=!0,tt["[object Arguments]"]=tt["[object Array]"]=tt["[object ArrayBuffer]"]=tt["[object Boolean]"]=tt["[object DataView]"]=tt["[object Date]"]=tt["[object Error]"]=tt["[object Function]"]=tt["[object Map]"]=tt["[object Number]"]=tt["[object Object]"]=tt["[object RegExp]"]=tt["[object Set]"]=tt["[object String]"]=tt["[object WeakMap]"]=!1;var Tg=function(t){return sn(t)&&Wa(t.length)&&!!tt[Xr(t)]},Ya=function(t){return function(e){return t(e)}},to=u(42),hc=to.a&&to.a.isTypedArray,dc=hc?Ya(hc):Tg,Mg=Object.prototype.hasOwnProperty,yc=function(t,e){var r=qt(t),n=!r&&Ga(t),i=!r&&!n&&Object(Fi.a)(t),o=!r&&!n&&!i&&dc(t),a=r||n||i||o,s=a?Pg(t.length,String):[],l=s.length;for(var h in t)!e&&!Mg.call(t,h)||a&&(h=="length"||i&&(h=="offset"||h=="parent")||o&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||Hi(h,l))||s.push(h);return s},Ng=Object.prototype,Ui=function(t){var e=t&&t.constructor;return t===(typeof e=="function"&&e.prototype||Ng)},vc=function(t,e){return function(r){return t(e(r))}},Cg=vc(Object.keys,Object),Rg=Object.prototype.hasOwnProperty,Ig=function(t){if(!Ui(t))return Cg(t);var e=[];for(var r in Object(t))Rg.call(t,r)&&r!="constructor"&&e.push(r);return e},ro=function(t){return t!=null&&Wa(t.length)&&!w(t)},no=function(t){return ro(t)?yc(t):Ig(t)},Va=function(t){return sc(t,no,Ua)},Lg=Object.prototype.hasOwnProperty,zg=function(t,e,r,n,i,o){var a=1&r,s=Va(t),l=s.length;if(l!=Va(e).length&&!a)return!1;for(var h=l;h--;){var _=s[h];if(!(a?_ in e:Lg.call(e,_)))return!1}var j=o.get(t),k=o.get(e);if(j&&k)return j==e&&k==t;var N=!0;o.set(t,e),o.set(e,t);for(var H=a;++h<l;){var $=t[_=s[h]],V=e[_];if(n)var K=a?n(V,$,_,e,t,o):n($,V,_,t,e,o);if(!(K===void 0?$===V||i($,V,r,n,o):K)){N=!1;break}H||(H=_=="constructor")}if(N&&!H){var q=t.constructor,te=e.constructor;q==te||!("constructor"in t)||!("constructor"in e)||typeof q=="function"&&q instanceof q&&typeof te=="function"&&te instanceof te||(N=!1)}return o.delete(t),o.delete(e),N},$a=nt(nr.a,"DataView"),Ka=nt(nr.a,"Promise"),qa=nt(nr.a,"Set"),Za=nt(nr.a,"WeakMap"),Bg=ce($a),Xg=ce(yt),Fg=ce(Ka),Hg=ce(qa),Ug=ce(Za),An=Xr;($a&&An(new $a(new ArrayBuffer(1)))!="[object DataView]"||yt&&An(new yt)!="[object Map]"||Ka&&An(Ka.resolve())!="[object Promise]"||qa&&An(new qa)!="[object Set]"||Za&&An(new Za)!="[object WeakMap]")&&(An=function(t){var e=Xr(t),r=e=="[object Object]"?t.constructor:void 0,n=r?ce(r):"";if(n)switch(n){case Bg:return"[object DataView]";case Xg:return"[object Map]";case Fg:return"[object Promise]";case Hg:return"[object Set]";case Ug:return"[object WeakMap]"}return e});var Co=An,gc=Object.prototype.hasOwnProperty,Gg=function(t,e,r,n,i,o){var a=qt(t),s=qt(e),l=a?"[object Array]":Co(t),h=s?"[object Array]":Co(e),_=(l=l=="[object Arguments]"?"[object Object]":l)=="[object Object]",j=(h=h=="[object Arguments]"?"[object Object]":h)=="[object Object]",k=l==h;if(k&&Object(Fi.a)(t)){if(!Object(Fi.a)(e))return!1;a=!0,_=!1}if(k&&!_)return o||(o=new No),a||dc(t)?ac(t,e,r,n,i,o):Eg(t,e,l,r,n,i,o);if(!(1&r)){var N=_&&gc.call(t,"__wrapped__"),H=j&&gc.call(e,"__wrapped__");if(N||H){var $=N?t.value():t,V=H?e.value():e;return o||(o=new No),i($,V,r,n,o)}}return!!k&&(o||(o=new No),zg(t,e,r,n,i,o))},Ja=function t(e,r,n,i,o){return e===r||(e==null||r==null||!sn(e)&&!sn(r)?e!=e&&r!=r:Gg(e,r,n,i,t,o))},Wg=function(t,e,r,n){var i=r.length,o=i,a=!n;if(t==null)return!o;for(t=Object(t);i--;){var s=r[i];if(a&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<o;){var l=(s=r[i])[0],h=t[l],_=s[1];if(a&&s[2]){if(h===void 0&&!(l in t))return!1}else{var j=new No;if(n)var k=n(h,_,l,t,e,j);if(!(k===void 0?Ja(_,h,3,n,j):k))return!1}}return!0},bc=function(t){return t==t&&!v(t)},Yg=function(t){for(var e=no(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,bc(i)]}return e},mc=function(t,e){return function(r){return r!=null&&r[t]===e&&(e!==void 0||t in Object(r))}},Vg=function(t){var e=Yg(t);return e.length==1&&e[0][2]?mc(e[0][0],e[0][1]):function(r){return r===t||Wg(r,t,e)}},Gi=function(t){return typeof t=="symbol"||sn(t)&&Xr(t)=="[object Symbol]"},$g=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Kg=/^\w*$/,Qa=function(t,e){if(qt(t))return!1;var r=typeof t;return!(r!="number"&&r!="symbol"&&r!="boolean"&&t!=null&&!Gi(t))||Kg.test(t)||!$g.test(t)||e!=null&&t in Object(e)};function eu(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError("Expected a function");var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=t.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(eu.Cache||zi),r}eu.Cache=zi;var qg=eu,Zg=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Jg=/\\(\\)?/g,Qg=function(t){var e=qg(t,function(n){return r.size===500&&r.clear(),n}),r=e.cache;return e}(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Zg,function(r,n,i,o){e.push(i?o.replace(Jg,"$1"):n||r)}),e}),_c=Bt?Bt.prototype:void 0,Oc=_c?_c.toString:void 0,eb=function t(e){if(typeof e=="string")return e;if(qt(e))return $n(e,t)+"";if(Gi(e))return Oc?Oc.call(e):"";var r=e+"";return r=="0"&&1/e==-1/0?"-0":r},tb=function(t){return t==null?"":eb(t)},Wi=function(t,e){return qt(t)?t:Qa(t,e)?[t]:Qg(tb(t))},Ro=function(t){if(typeof t=="string"||Gi(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e},tu=function(t,e){for(var r=0,n=(e=Wi(e,t)).length;t!=null&&r<n;)t=t[Ro(e[r++])];return r&&r==n?t:void 0},wc=function(t,e,r){var n=t==null?void 0:tu(t,e);return n===void 0?r:n},rb=function(t,e){return t!=null&&e in Object(t)},nb=function(t,e,r){for(var n=-1,i=(e=Wi(e,t)).length,o=!1;++n<i;){var a=Ro(e[n]);if(!(o=t!=null&&r(t,a)))break;t=t[a]}return o||++n!=i?o:!!(i=t==null?0:t.length)&&Wa(i)&&Hi(a,i)&&(qt(t)||Ga(t))},xc=function(t,e){return t!=null&&nb(t,e,rb)},ob=function(t,e){return Qa(t)&&bc(e)?mc(Ro(t),e):function(r){var n=wc(r,t);return n===void 0&&n===e?xc(r,t):Ja(e,n,3)}},ru=function(t){return t},ib=function(t){return function(e){return e==null?void 0:e[t]}},ab=function(t){return function(e){return tu(e,t)}},ub=function(t){return Qa(t)?ib(Ro(t)):ab(t)},sb=function(t){return typeof t=="function"?t:t==null?ru:typeof t=="object"?qt(t)?ob(t[0],t[1]):Vg(t):ub(t)},cb=function(t){return function(e,r,n){for(var i=-1,o=Object(e),a=n(e),s=a.length;s--;){var l=a[t?s:++i];if(r(o[l],l,o)===!1)break}return e}}(),lb=function(t,e){return function(r,n){if(r==null)return r;if(!ro(r))return t(r,n);for(var i=r.length,o=e?i:-1,a=Object(r);(e?o--:++o<i)&&n(a[o],o,a)!==!1;);return r}}(function(t,e){return t&&cb(t,e,no)}),fb=function(t,e){var r=-1,n=ro(t)?Array(t.length):[];return lb(t,function(i,o,a){n[++r]=e(i,o,a)}),n},Yi=function(t,e){return(qt(t)?$n:fb)(t,sb(e))},Vi=function(){try{var t=nt(Object,"defineProperty");return t({},"",{}),t}catch(e){}}(),Ec=function(t,e,r){e=="__proto__"&&Vi?Vi(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r},pb=Object.prototype.hasOwnProperty,$i=function(t,e,r){var n=t[e];pb.call(t,e)&&Lt(n,r)&&(r!==void 0||e in t)||Ec(t,e,r)},Io=function(t,e,r,n){var i=!r;r||(r={});for(var o=-1,a=e.length;++o<a;){var s=e[o],l=n?n(r[s],t[s],s,r,t):void 0;l===void 0&&(l=t[s]),i?Ec(r,s,l):$i(r,s,l)}return r},hb=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)},Sc=Math.max,jc=function(t,e,r){return e=Sc(e===void 0?t.length-1:e,0),function(){for(var n=arguments,i=-1,o=Sc(n.length-e,0),a=Array(o);++i<o;)a[i]=n[e+i];i=-1;for(var s=Array(e+1);++i<e;)s[i]=n[i];return s[e]=r(a),hb(t,this,s)}},db=function(t){return function(){return t}},yb=Vi?function(t,e){return Vi(t,"toString",{configurable:!0,enumerable:!1,value:db(e),writable:!0})}:ru,vb=Date.now,Pc=function(t){var e=0,r=0;return function(){var n=vb(),i=16-(n-r);if(r=n,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(yb),gb=function(t,e){return Pc(jc(t,e,ru),t+"")},bb=function(t,e,r){if(!v(r))return!1;var n=typeof e;return!!(n=="number"?ro(r)&&Hi(e,r.length):n=="string"&&e in r)&&Lt(r[e],t)},mb=function(t){return gb(function(e,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(o=t.length>3&&typeof o=="function"?(i--,o):void 0,a&&bb(r[0],r[1],a)&&(o=i<3?void 0:o,i=1),e=Object(e);++n<i;){var s=r[n];s&&t(e,s,n,o)}return e})},_b=Object.prototype.hasOwnProperty,st=mb(function(t,e){if(Ui(e)||ro(e))Io(e,no(e),t);else for(var r in e)_b.call(e,r)&&$i(t,r,e[r])}),Ob=function(t,e,r,n){if(!v(t))return t;for(var i=-1,o=(e=Wi(e,t)).length,a=o-1,s=t;s!=null&&++i<o;){var l=Ro(e[i]),h=r;if(l==="__proto__"||l==="constructor"||l==="prototype")return t;if(i!=a){var _=s[l];(h=n?n(_,l,s):void 0)===void 0&&(h=v(_)?_:Hi(e[i+1])?[]:{})}$i(s,l,h),s=s[l]}return t},wb=function(t,e,r){for(var n=-1,i=e.length,o={};++n<i;){var a=e[n],s=tu(t,a);r(s,a)&&Ob(o,Wi(a,t),s)}return o},xb=function(t,e){return wb(t,e,function(r,n){return xc(t,n)})},kc=Bt?Bt.isConcatSpreadable:void 0,Eb=function(t){return qt(t)||Ga(t)||!!(kc&&t&&t[kc])},Sb=function t(e,r,n,i,o){var a=-1,s=e.length;for(n||(n=Eb),o||(o=[]);++a<s;){var l=e[a];r>0&&n(l)?r>1?t(l,r-1,n,i,o):Ha(o,l):i||(o[o.length]=l)}return o},jb=function(t){return t!=null&&t.length?Sb(t,1):[]},ft,Ac,Dc,Tc,Mc,Nc,Cc,Rc,Ic,Lc,zc,Bc,Xc,Fc,Hc,Uc,Gc,Pr=function(t){return Pc(jc(t,void 0,jb),t+"")}(function(t,e){return t==null?{}:xb(t,e)});function kt(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function Pb(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function xt(t,e,r,n,i){var o={};return Object.keys(n).forEach(function(a){o[a]=n[a]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce(function(a,s){return s(t,e,a)||a},o),i&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(t,e,o),o=null),o}var $e,Wc,Ie,vt,Ne,ot,kb={stopZoomGraph:!1,stopScrollGraph:!1,stopMoveGraph:!1,adjustEdge:!1,adjustEdgeStartAndEnd:!1,adjustNodePosition:!1,hideAnchors:!0,nodeTextEdit:!1,edgeTextEdit:!1,nodeTextDraggable:!1,edgeTextDraggable:!1,metaKeyMultipleSelected:!1},nu=["stopZoomGraph","stopScrollGraph","stopMoveGraph","adjustEdge","adjustEdgeMiddle","adjustEdgeStartAndEnd","adjustNodePosition","hideAnchors","hoverOutline","nodeTextEdit","edgeTextEdit","nodeTextDraggable","edgeTextDraggable","metaKeyMultipleSelected","multipleSelectKey","extraConf"],Yc=(Ac=xt((ft=function(){function t(n){(function(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),kt(this,"stopZoomGraph",Ac,this),kt(this,"stopScrollGraph",Dc,this),kt(this,"stopMoveGraph",Tc,this),kt(this,"adjustEdge",Mc,this),kt(this,"adjustEdgeMiddle",Nc,this),kt(this,"adjustEdgeStartAndEnd",Cc,this),kt(this,"adjustNodePosition",Rc,this),kt(this,"hideAnchors",Ic,this),kt(this,"hoverOutline",Lc,this),kt(this,"nodeSelectedOutline",zc,this),kt(this,"edgeSelectedOutline",Bc,this),kt(this,"nodeTextEdit",Xc,this),kt(this,"edgeTextEdit",Fc,this),kt(this,"nodeTextDraggable",Hc,this),kt(this,"edgeTextDraggable",Uc,this),kt(this,"metaKeyMultipleSelected",Gc,this),this.multipleSelectKey="",this.extraConf={},this.defaultConfig={},st(this,this.getConfigDetail(n))}var e,r;return e=t,(r=[{key:"updateEditConfig",value:function(n){var i=this.getConfigDetail(n);st(this,i)}},{key:"getConfigDetail",value:function(n){var i=n.isSilentMode,o=n.textEdit,a={};if(i===!1&&st(a,this.defaultConfig),i===!0){var s=Pr(kb,nu);this.defaultConfig={stopZoomGraph:this.stopZoomGraph,stopScrollGraph:this.stopScrollGraph,stopMoveGraph:this.stopMoveGraph,adjustEdge:this.adjustEdge,adjustEdgeMiddle:this.adjustEdgeMiddle,adjustEdgeStartAndEnd:this.adjustEdgeStartAndEnd,adjustNodePosition:this.adjustNodePosition,hideAnchors:this.hideAnchors,hoverOutline:this.hoverOutline,nodeSelectedOutline:this.nodeSelectedOutline,edgeSelectedOutline:this.edgeSelectedOutline,nodeTextEdit:this.nodeTextEdit,edgeTextEdit:this.edgeTextEdit,nodeTextDraggable:this.nodeTextDraggable,edgeTextDraggable:this.edgeTextDraggable,metaKeyMultipleSelected:this.metaKeyMultipleSelected},st(a,s)}o===!1&&st(a,{nodeTextEdit:!1,edgeTextEdit:!1});var l=Pr(n,nu);return st(a,l)}},{key:"getConfig",value:function(){return Pr(this,nu)}}])&&Pb(e.prototype,r),t}()).prototype,"stopZoomGraph",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Dc=xt(ft.prototype,"stopScrollGraph",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Tc=xt(ft.prototype,"stopMoveGraph",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Mc=xt(ft.prototype,"adjustEdge",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Nc=xt(ft.prototype,"adjustEdgeMiddle",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Cc=xt(ft.prototype,"adjustEdgeStartAndEnd",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Rc=xt(ft.prototype,"adjustNodePosition",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Ic=xt(ft.prototype,"hideAnchors",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Lc=xt(ft.prototype,"hoverOutline",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),zc=xt(ft.prototype,"nodeSelectedOutline",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Bc=xt(ft.prototype,"edgeSelectedOutline",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Xc=xt(ft.prototype,"nodeTextEdit",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Fc=xt(ft.prototype,"edgeTextEdit",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Hc=xt(ft.prototype,"nodeTextDraggable",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Uc=xt(ft.prototype,"edgeTextDraggable",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Gc=xt(ft.prototype,"metaKeyMultipleSelected",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),xt(ft.prototype,"updateEditConfig",[O.i],Object.getOwnPropertyDescriptor(ft.prototype,"updateEditConfig"),ft.prototype),ft);u(82),function(t){t[t.DEFAULT=1]="DEFAULT",t[t.TEXT_EDIT=2]="TEXT_EDIT",t[t.SHOW_MENU=3]="SHOW_MENU",t[t.ALLOW_CONNECT=4]="ALLOW_CONNECT",t[t.NOT_ALLOW_CONNECT=5]="NOT_ALLOW_CONNECT"}($e||($e={})),function(t){t.KEY="logic-flow",t.NODE_NAME="lf-node",t.EDGE_NAME="lf-edge"}(Wc||(Wc={})),function(t){t.NODE="node",t.CIRCLE_NODE="circle-node",t.POLYGON_NODE="polygon-node",t.RECT_NODE="rect-node",t.TEXT_NODE="text-node",t.ELLIPSE_NODE="ellipse-node",t.DIAMOND_NODE="diamond-node",t.HTML_NODE="html-node",t.EDGE="edge",t.LINE_EDGE="line-edge",t.POLYLINE_EDGE="polyline-edge",t.BEZIER_EDGE="bezier-edge",t.GRAPH="graph"}(Ie||(Ie={})),function(t){t.NODE="node",t.EDGE="edge",t.GRAPH="graph"}(vt||(vt={})),function(t){t.ELEMENT_CLICK="element:click",t.NODE_CLICK="node:click",t.NODE_DBCLICK="node:dbclick",t.NODE_DELETE="node:delete",t.NODE_ADD="node:add",t.NODE_DND_ADD="node:dnd-add",t.NODE_DND_DRAG="node:dnd-drag",t.NODE_MOUSEDOWN="node:mousedown",t.NODE_DRAGSTART="node:dragstart",t.NODE_DRAG="node:drag",t.NODE_DROP="node:drop",t.NODE_MOUSEUP="node:mouseup",t.NODE_MOUSEMOVE="node:mousemove",t.NODE_MOUSEENTER="node:mouseenter",t.NODE_MOUSELEAVE="node:mouseleave",t.NODE_CONTEXTMENU="node:contextmenu",t.EDGE_DELETE="edge:delete",t.EDGE_ADD="edge:add",t.EDGE_CLICK="edge:click",t.EDGE_DBCLICK="edge:dbclick",t.EDGE_MOUSEENTER="edge:mouseenter",t.EDGE_MOUSELEAVE="edge:mouseleave",t.EDGE_CONTEXTMENU="edge:contextmenu",t.EDGE_ADJUST="edge:adjust",t.EDGE_EXCHANGE_NODE="edge:exchange-node",t.SELECTION_CONTEXTMENU="selection:contextmenu",t.BLANK_MOUSEDOWN="blank:mousedown",t.BLANK_DRAGSTART="blank:dragstart",t.BLANK_DRAG="blank:drag",t.BLANK_DROP="blank:drop",t.BLANK_MOUSEMOVE="blank:mousemove",t.BLANK_MOUSEUP="blank:mouseup",t.BLANK_CLICK="blank:click",t.BLANK_CONTEXTMENU="blank:contextmenu",t.CONNECTION_NOT_ALLOWED="connection:not-allowed",t.HISTORY_CHANGE="history:change",t.TEXT_UPDATE="text:update",t.GRAPH_TRANSFORM="graph:transform"}(Ne||(Ne={})),function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(ot||(ot={}));var kr,pt,Vc,$c,Kc,qc,Zc,Jc,Qc;function Ki(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var i=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var o,a,s=[],l=!0,h=!1;try{for(i=i.call(r);!(l=(o=i.next()).done)&&(s.push(o.value),!n||s.length!==n);l=!0);}catch(_){h=!0,a=_}finally{try{l||i.return==null||i.return()}finally{if(h)throw a}}return s}}(t,e)||function(r,n){if(r){if(typeof r=="string")return el(r,n);var i=Object.prototype.toString.call(r).slice(8,-1);if(i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set")return Array.from(r);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return el(r,n)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function el(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Dn(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function Ab(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function br(t,e,r,n,i){var o={};return Object.keys(n).forEach(function(a){o[a]=n[a]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce(function(a,s){return s(t,e,a)||a},o),i&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(t,e,o),o=null),o}(function(t){t[t.DEFAULT=0]="DEFAULT",t[t.INCREASE=1]="INCREASE"})(kr||(kr={}));var Db=(Vc=br((pt=function(){function t(n){(function(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),this.MINI_SCALE_SIZE=.2,this.MAX_SCALE_SIZE=16,Dn(this,"SCALE_X",Vc,this),Dn(this,"SKEW_Y",$c,this),Dn(this,"SKEW_X",Kc,this),Dn(this,"SCALE_Y",qc,this),Dn(this,"TRANSLATE_X",Zc,this),Dn(this,"TRANSLATE_Y",Jc,this),Dn(this,"ZOOM_SIZE",Qc,this),this.eventCenter=void 0,this.eventCenter=n}var e,r;return e=t,(r=[{key:"setZoomMiniSize",value:function(n){this.MINI_SCALE_SIZE=n}},{key:"setZoomMaxSize",value:function(n){this.MAX_SCALE_SIZE=n}},{key:"HtmlPointToCanvasPoint",value:function(n){var i=Ki(n,2),o=i[0],a=i[1];return[(o-this.TRANSLATE_X)/this.SCALE_X,(a-this.TRANSLATE_Y)/this.SCALE_Y]}},{key:"CanvasPointToHtmlPoint",value:function(n){var i=Ki(n,2),o=i[0],a=i[1];return[o*this.SCALE_X+this.TRANSLATE_X,a*this.SCALE_Y+this.TRANSLATE_Y]}},{key:"moveCanvasPointByHtml",value:function(n,i,o){var a=Ki(n,2),s=a[0],l=a[1];return[s+i/this.SCALE_X,l+o/this.SCALE_Y]}},{key:"fixDeltaXY",value:function(n,i){return[n/this.SCALE_X,i/this.SCALE_Y]}},{key:"getTransformStyle",value:function(){var n=[this.SCALE_X,this.SKEW_Y,this.SKEW_X,this.SCALE_Y,this.TRANSLATE_X,this.TRANSLATE_Y].join(",");return{transform:"matrix(".concat(n,")")}}},{key:"zoom",value:function(){var n=arguments.length>0&&arguments[0]!==void 0&&arguments[0],i=arguments.length>1?arguments[1]:void 0,o=this.SCALE_X,a=this.SCALE_Y;return n===!0?(o+=this.ZOOM_SIZE,a+=this.ZOOM_SIZE):n===!1?(o-=this.ZOOM_SIZE,a-=this.ZOOM_SIZE):typeof n=="number"&&(o=n,a=n),!(o<this.MINI_SCALE_SIZE||o>this.MAX_SCALE_SIZE||(i&&(this.TRANSLATE_X-=(o-this.SCALE_X)*i[0],this.TRANSLATE_Y-=(a-this.SCALE_Y)*i[1]),this.SCALE_X=o,this.SCALE_Y=a,this.emitGraphTransform("zoom"),0))}},{key:"emitGraphTransform",value:function(n){this.eventCenter.emit(Ne.GRAPH_TRANSFORM,{type:n,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(n,i){this.TRANSLATE_X+=n,this.TRANSLATE_Y+=i,this.emitGraphTransform("translate")}},{key:"focusOn",value:function(n,i,o,a){var s=Ki(this.CanvasPointToHtmlPoint([n,i]),2),l=o/2-s[0],h=a/2-s[1];this.TRANSLATE_X+=l,this.TRANSLATE_Y+=h,this.emitGraphTransform("focusOn")}}])&&Ab(e.prototype,r),t}()).prototype,"SCALE_X",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),$c=br(pt.prototype,"SKEW_Y",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Kc=br(pt.prototype,"SKEW_X",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),qc=br(pt.prototype,"SCALE_Y",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Zc=br(pt.prototype,"TRANSLATE_X",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Jc=br(pt.prototype,"TRANSLATE_Y",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Qc=br(pt.prototype,"ZOOM_SIZE",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return .04}}),br(pt.prototype,"zoom",[O.i],Object.getOwnPropertyDescriptor(pt.prototype,"zoom"),pt.prototype),br(pt.prototype,"resetZoom",[O.i],Object.getOwnPropertyDescriptor(pt.prototype,"resetZoom"),pt.prototype),br(pt.prototype,"translate",[O.i],Object.getOwnPropertyDescriptor(pt.prototype,"translate"),pt.prototype),br(pt.prototype,"focusOn",[O.i],Object.getOwnPropertyDescriptor(pt.prototype,"focusOn"),pt.prototype),pt),Tb=function(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t},Mb=function(t,e){return t&&Io(e,no(e),t)},Nb=function(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e},Cb=Object.prototype.hasOwnProperty,Rb=function(t){if(!v(t))return Nb(t);var e=Ui(t),r=[];for(var n in t)(n!="constructor"||!e&&Cb.call(t,n))&&r.push(n);return r},ou=function(t){return ro(t)?yc(t,!0):Rb(t)},Ib=function(t,e){return t&&Io(e,ou(e),t)},Lb=u(139),zb=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e},Bb=function(t,e){return Io(t,Ua(t),e)},tl=vc(Object.getPrototypeOf,Object),rl=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Ha(e,Ua(t)),t=tl(t);return e}:cc,Xb=function(t,e){return Io(t,rl(t),e)},Fb=function(t){return sc(t,ou,rl)},Hb=Object.prototype.hasOwnProperty,Ub=function(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&Hb.call(t,"index")&&(r.index=t.index,r.input=t.input),r},iu=function(t){var e=new t.constructor(t.byteLength);return new Xi(e).set(new Xi(t)),e},Gb=function(t,e){var r=e?iu(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)},Wb=/\w*$/,Yb=function(t){var e=new t.constructor(t.source,Wb.exec(t));return e.lastIndex=t.lastIndex,e},nl=Bt?Bt.prototype:void 0,ol=nl?nl.valueOf:void 0,Vb=function(t){return ol?Object(ol.call(t)):{}},$b=function(t,e){var r=e?iu(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)},Kb=function(t,e,r){var n=t.constructor;switch(e){case"[object ArrayBuffer]":return iu(t);case"[object Boolean]":case"[object Date]":return new n(+t);case"[object DataView]":return Gb(t,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return $b(t,r);case"[object Map]":return new n;case"[object Number]":case"[object String]":return new n(t);case"[object RegExp]":return Yb(t);case"[object Set]":return new n;case"[object Symbol]":return Vb(t)}},il=Object.create,qb=function(){function t(){}return function(e){if(!v(e))return{};if(il)return il(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}(),Zb=function(t){return typeof t.constructor!="function"||Ui(t)?{}:qb(tl(t))},Jb=function(t){return sn(t)&&Co(t)=="[object Map]"},al=to.a&&to.a.isMap,Qb=al?Ya(al):Jb,em=function(t){return sn(t)&&Co(t)=="[object Set]"},ul=to.a&&to.a.isSet,tm=ul?Ya(ul):em,Ze={};Ze["[object Arguments]"]=Ze["[object Array]"]=Ze["[object ArrayBuffer]"]=Ze["[object DataView]"]=Ze["[object Boolean]"]=Ze["[object Date]"]=Ze["[object Float32Array]"]=Ze["[object Float64Array]"]=Ze["[object Int8Array]"]=Ze["[object Int16Array]"]=Ze["[object Int32Array]"]=Ze["[object Map]"]=Ze["[object Number]"]=Ze["[object Object]"]=Ze["[object RegExp]"]=Ze["[object Set]"]=Ze["[object String]"]=Ze["[object Symbol]"]=Ze["[object Uint8Array]"]=Ze["[object Uint8ClampedArray]"]=Ze["[object Uint16Array]"]=Ze["[object Uint32Array]"]=!0,Ze["[object Error]"]=Ze["[object Function]"]=Ze["[object WeakMap]"]=!1;var rm=function t(e,r,n,i,o,a){var s,l=1&r,h=2&r,_=4&r;if(n&&(s=o?n(e,i,o,a):n(e)),s!==void 0)return s;if(!v(e))return e;var j=qt(e);if(j){if(s=Ub(e),!l)return zb(e,s)}else{var k=Co(e),N=k=="[object Function]"||k=="[object GeneratorFunction]";if(Object(Fi.a)(e))return Object(Lb.a)(e,l);if(k=="[object Object]"||k=="[object Arguments]"||N&&!o){if(s=h||N?{}:Zb(e),!l)return h?Xb(e,Ib(s,e)):Bb(e,Mb(s,e))}else{if(!Ze[k])return o?e:{};s=Kb(e,k,l)}}a||(a=new No);var H=a.get(e);if(H)return H;a.set(e,s),tm(e)?e.forEach(function(V){s.add(t(V,r,n,V,e,a))}):Qb(e)&&e.forEach(function(V,K){s.set(K,t(V,r,n,K,e,a))});var $=j?void 0:(_?h?Fb:Va:h?ou:no)(e);return Tb($||e,function(V,K){$&&(V=e[K=V]),$i(s,K,t(V,r,n,K,e,a))}),s},au=function(t){return rm(t,5)};function sl(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function bt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?sl(Object(r),!0).forEach(function(n){nm(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):sl(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function nm(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var oo={fill:"#FFFFFF",stroke:"#000000",strokeWidth:2,fillOpacity:1,strokeOpacity:1,opacity:1,outlineColor:"#000000",outlineStrokeDashArray:"3,3",hoverOutlineColor:"#000000",hoverOutlineStrokeDashArray:"3,3"},om=bt(bt({},oo),{},{width:100,height:80,radius:0}),im=bt(bt({},oo),{},{r:50}),am=bt(bt({},oo),{},{rx:55,ry:45}),um=bt(bt({},oo),{},{rx:50,ry:50}),sm=bt({},oo),cm=bt(bt({},oo),{},{stroke:"#000000",strokeWidth:1,r:4}),uu={stroke:"#000000",strokeWidth:2,hoverStroke:"#000000",selectedStroke:"#000000",strokeDashArray:"1,0",outlineColor:"#000000",outlineStrokeDashArray:"3,3"},lm=bt({},uu),fm=bt(bt({},uu),{},{offset:30}),pm=bt(bt({},uu),{},{offset:100,adjustLineColor:"#4169E1",adjustAnchorStroke:"#4169E1",adjustAnchorFill:"#1E90FF",adjustAnchorFillOpacity:.5}),cl={color:"#000000",fontSize:12,fontWeight:"normal",fontFamily:""},Xt={rect:om,circle:im,diamond:um,ellipse:am,polygon:sm,anchor:cm,text:cl,nodeText:bt(bt({},cl),{},{autoWrap:!1,lineHeight:1.2,wrapPadding:"2px 3px"}),edgeText:{color:"#000000",fontSize:12,fontWeight:"normal",fontFamily:"",background:{fill:"transparent",height:20,stroke:"transparent",radius:0},hoverBackground:null,autoWrap:!1,lineHeight:1.2,wrapPadding:"2px 3px"},line:lm,polyline:fm,bezier:pm,arrow:{offset:10,verticalLength:5},anchorLine:{stroke:"#000000",strokeWidth:2,strokeDasharray:"3,2"},anchorHover:{fill:"#1E90FF",fillOpacity:.5,stroke:"#4169E1",strokeWidth:1,r:10},snapline:{stroke:"#1E90FF",strokeWidth:1},edgeAdjust:{r:4,fill:"#FFFFFF",stroke:"#373738",strokeWidth:"2px"}};function ll(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function fl(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ll(Object(r),!0).forEach(function(n){hm(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ll(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function hm(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var pl=function(t){var e=au(Xt);return t&&Object.keys(t).forEach(function(r){e[r]=fl(fl({},e[r]),t[r])}),e};function qi(t,e){return e*Math.round(t/e)||t}function hl(t,e){return t%e}function su(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var i=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var o,a,s=[],l=!0,h=!1;try{for(i=i.call(r);!(l=(o=i.next()).done)&&(s.push(o.value),!n||s.length!==n);l=!0);}catch(_){h=!0,a=_}finally{try{l||i.return==null||i.return()}finally{if(h)throw a}}return s}}(t,e)||function(r,n){if(r){if(typeof r=="string")return dl(r,n);var i=Object.prototype.toString.call(r).slice(8,-1);if(i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set")return Array.from(r);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return dl(r,n)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function dl(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var cu,lu=function(t,e,r){var n=su(t,2),i=n[0],o=n[1],a=su(e,2),s=a[0],l=a[1],h=su(r,2),_=h[0],j=h[1];return i>s&&i<_&&o>l&&o<j},dm=(u(30),u(40),u(52),u(63),u(136),u(137),u(64),u(9),u(10),u(11),u(36),new Uint8Array(16));function ym(){if(!cu&&!(cu=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return cu(dm)}for(var vm=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,gm=function(t){return typeof t=="string"&&vm.test(t)},Et=[],fu=0;fu<256;++fu)Et.push((fu+256).toString(16).substr(1));var bm=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=(Et[t[e+0]]+Et[t[e+1]]+Et[t[e+2]]+Et[t[e+3]]+"-"+Et[t[e+4]]+Et[t[e+5]]+"-"+Et[t[e+6]]+Et[t[e+7]]+"-"+Et[t[e+8]]+Et[t[e+9]]+"-"+Et[t[e+10]]+Et[t[e+11]]+Et[t[e+12]]+Et[t[e+13]]+Et[t[e+14]]+Et[t[e+15]]).toLowerCase();if(!gm(r))throw TypeError("Stringified UUID is invalid");return r},pu=function(t,e,r){var n=(t=t||{}).random||(t.rng||ym)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,e){r=r||0;for(var i=0;i<16;++i)e[r+i]=n[i];return e}return bm(n)},io=function(){return pu()},mm=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=t.nodes.reduce(function(n,i){return n[i.id]=e+pu(),i.id=n[i.id],n},{});return t.edges.forEach(function(n){n.id=e+pu(),n.sourceNodeId=r[n.sourceNodeId],n.targetNodeId=r[n.targetNodeId]}),t},Lo=(u(84),u(176),function(t,e,r){var n=t.x,i=t.y;return(n-e.x)*(n-r.x)<=0&&(i-e.y)*(i-r.y)<=0});function yl(t){return(yl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function vl(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function gl(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?vl(Object(r),!0).forEach(function(n){_m(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):vl(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function _m(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ue,bl,ml,_l,Ol,wl,xl,El,Sl,jl,Pl,kl,Al,Dl,Tl,Ml,Nl,Cl,Rl,Il,Ll,zl,Bl,Xl,Fl,Hl,hu=function(t){return t.anchors},Zi=function(t,e){for(var r,n=e.length-1;n>=0;n--)if(wm(t,e[n])){var i=Om(t,e[n]);if(i){r={node:e[n],anchorIndex:i.index,anchor:i.anchor};break}}return r},Om=function(t,e){for(var r,n=hu(e),i=Number.MAX_SAFE_INTEGER,o=0;o<n.length;o++){var a=Ar(t.x,t.y,n[o].x,n[o].y);a<i&&(i=a,r={index:o,anchor:gl(gl({},n[o]),{},{x:n[o].x,y:n[o].y,id:n[o].id})})}return r},Ar=function(t,e,r,n){return Math.hypot(t-r,e-n)},cn=function(t,e){var r=!1,n=Zt(e);return t.x>=n.minX-0&&t.x<=n.maxX+0&&t.y>=n.minY-0&&t.y<=n.maxY+0&&(r=!0),r},wm=function(t,e){var r=!1,n=Zt(e);return t.x>=n.minX-5&&t.x<=n.maxX+5&&t.y>=n.minY-5&&t.y<=n.maxY+5&&(r=!0),r},Zt=function(t){var e=t.x,r=t.y,n=t.width,i=t.height;return{minX:e-n/2,minY:r-i/2,maxX:e+n/2,maxY:r+i/2,x:e,y:r,width:n,height:i,centerX:e,centerY:r}},Ul=function(t,e,r){var n,i=function(a){var s=a,l=s.x,h=s.y,_=s.width,j=s.height,k=s.radius;return[{x:l-_/2+k,y:h-j/2+k,r:k},{x:l+_/2-k,y:h-j/2+k,r:k},{x:l-_/2+k,y:h+j/2-k,r:k},{x:l+_/2-k,y:h+j/2-k,r:k}]}(r),o=Number.MAX_SAFE_INTEGER;return i.forEach(function(a){var s=Ar(t.x,t.y,a.x,a.y);s<o&&(o=s,n=a)}),du(t,e,n)},du=function(t,e,r){var n,i=r,o=i.x,a=i.y,s=i.r;if(e===ot.HORIZONTAL){var l=o-Math.sqrt(s*s-(t.y-a)*(t.y-a)),h=o+Math.sqrt(s*s-(t.y-a)*(t.y-a));n={x:Math.abs(l-t.x)<Math.abs(h-t.x)?l:h,y:t.y}}else if(e===ot.VERTICAL){var _=a-Math.sqrt(s*s-(t.x-o)*(t.x-o)),j=a+Math.sqrt(s*s-(t.x-o)*(t.x-o)),k=Math.abs(_-t.y)<Math.abs(j-t.y)?_:j;n={x:t.x,y:k}}return n},Gl=function(t,e){var r=e,n=!1,i=r.x-r.width/2+r.radius,o=r.x+r.width/2-r.radius,a=r.y-r.height/2+r.radius,s=r.y+r.height/2-r.radius,l=r.x,h=r.y,_=r.width,j=r.height;return t.y===h+j/2||t.y===h-j/2?n=t.x>i&&t.x<o:t.x!==l+_/2&&t.x!==l-_/2||(n=t.y>a&&t.y<s),n},Wl=function(t,e,r){var n,i=r,o=i.x,a=i.y,s=i.rx,l=i.ry;if(e===ot.HORIZONTAL){var h=o-Math.sqrt(s*s-(t.y-a)*(t.y-a)*s*s/(l*l)),_=o+Math.sqrt(s*s-(t.y-a)*(t.y-a)*s*s/(l*l));n={x:Math.abs(h-t.x)<Math.abs(_-t.x)?h:_,y:t.y}}else if(e===ot.VERTICAL){var j=a-Math.sqrt(l*l-(t.x-o)*(t.x-o)*l*l/(s*s)),k=a+Math.sqrt(l*l-(t.x-o)*(t.x-o)*l*l/(s*s)),N=Math.abs(j-t.y)<Math.abs(k-t.y)?j:k;n={x:t.x,y:N}}return n},Yl=function(t,e,r){for(var n,i=r.pointsPosition,o=Number.MAX_SAFE_INTEGER,a=[],s=0;s<i.length;s++)a.push({start:i[s],end:i[(s+1)%i.length]});return a.forEach(function(l){var h=l.start,_=l.end,j=h,k=_;h.x>_.x&&(j=_,k=h);var N,H=(k.y-j.y)/(k.x-j.x),$=(j.x*k.y-k.x*j.y)/(j.x-k.x);if(H>Number.MAX_SAFE_INTEGER||$>Number.MAX_SAFE_INTEGER?N={x:t.x,y:t.y}:e===ot.HORIZONTAL?N={x:(t.y-$)/H,y:t.y}:e===ot.VERTICAL&&(N={x:t.x,y:H*t.x+$}),Lo(N,h,_)){var V=Ar(N.x,N.y,t.x,t.y);V<o&&(o=V,n=N)}}),n},Vl=function(t,e,r,n){var i=t.x,o=t.y;return e.x>t.x?i=t.x+r/2:e.x<t.x&&(i=t.x-r/2),e.y>t.y?o=t.y+n/2:e.y<t.y&&(o=t.y-n/2),{x:i,y:o}},$l=function(t){var e=t.rows,r=t.style,n=t.rowsLength,i=t.className,o=document.createElement("div");o.style.fontSize=r.fontSize,o.style.width=r.width,o.className=i,o.style.lineHeight=r.lineHeight,o.style.padding=r.padding,r.fontFamily&&(o.style.fontFamily=r.fontFamily),n>1?e.forEach(function(s){var l=document.createElement("div");l.textContent=s,o.appendChild(l)}):o.textContent=e,document.body.appendChild(o);var a=o.clientHeight;return document.body.removeChild(o),a},Ji=function(t){var e=t.rows,r=t.rowsLength,n=t.fontSize,i=0;return e&&e.forEach(function(o){var a=ju(o);i=a>i?a:i}),{width:Math.ceil(i/2)*n+n/4,height:r*(n+2)+n/4}},Kl=function(t){return yl(t)!=="object"?{isAllPass:!!t,msg:t?"":"\u4E0D\u5141\u8BB8\u8FDE\u63A5"}:t},ir=function(t){try{return JSON.parse(JSON.stringify(t))}catch(e){return t}},xm=1e3,Em=999,yu=function(){return++xm};function ql(t){return(ql=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function rt(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function Sm(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Pe(t,e,r,n,i){var o={};return Object.keys(n).forEach(function(a){o[a]=n[a]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce(function(a,s){return s(t,e,a)||a},o),i&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(t,e,o),o=null),o}function Zl(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function jm(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var at=function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Zl(Object(r),!0).forEach(function(n){jm(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Zl(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}({sourceNodeId:"",sourceAnchorId:"",targetNodeId:"",targetAnchorId:"",startPoint:null,endPoint:null,zIndex:0,isSelected:!1,isHovered:!1,text:{value:"",x:0,y:0,draggable:!1,editable:!0},points:"",pointsList:[],strokeOpacity:1,hideOutline:!1},Xt.line),vu=(bl=Pe((ue=function(){function t(n,i,o){(function(a,s){if(!(a instanceof s))throw new TypeError("Cannot call a class as a function")})(this,t),this.id=io(),this.BaseType=vt.EDGE,rt(this,"state",bl,this),this.modelType=Ie.EDGE,this.additionStateData=void 0,this.graphModel=void 0,this.menu=void 0,this.sourceAnchorId=at.sourceAnchorId,this.targetAnchorId=at.targetAnchorId,this.customTextPosition=!1,rt(this,"text",ml,this),rt(this,"type",_l,this),rt(this,"properties",Ol,this),rt(this,"sourceNodeId",wl,this),rt(this,"targetNodeId",xl,this),rt(this,"startPoint",El,this),rt(this,"endPoint",Sl,this),rt(this,"strokeWidth",jl,this),rt(this,"stroke",Pl,this),rt(this,"strokeDashArray",kl,this),rt(this,"outlineColor",Al,this),rt(this,"hideOutline",Dl,this),rt(this,"outlineStrokeDashArray",Tl,this),rt(this,"strokeOpacity",Ml,this),rt(this,"zIndex",Nl,this),rt(this,"isSelected",Cl,this),rt(this,"isHovered",Rl,this),rt(this,"isDragging",Il,this),rt(this,"isHitable",Ll,this),rt(this,"hoverStroke",zl,this),rt(this,"selectedStroke",Bl,this),rt(this,"points",Xl,this),rt(this,"pointsList",Fl,this),rt(this,"draggable",Hl,this),this.graphModel=i,this.setStyleFromTheme(o,i),this.initEdgeData(n),this.setAttributes(),this.setAnchors(),this.initPoints(),this.formatText(n)}var e,r;return e=t,(r=[{key:"initEdgeData",value:function(n){if(n.properties||(n.properties={}),!n.id){var i=this.graphModel.idGenerator,o=i&&i(n.type);o&&(n.id=o);var a=this.createId();a&&(n.id=a)}st(this,Bm(n)),this.graphModel.overlapMode===kr.INCREASE&&(this.zIndex=n.zIndex||yu())}},{key:"createId",value:function(){return null}},{key:"setAttributes",value:function(){}},{key:"sourceNode",get:function(){var n,i;return(n=this.graphModel)===null||n===void 0||(i=n.nodesMap[this.sourceNodeId])===null||i===void 0?void 0:i.model}},{key:"targetNode",get:function(){var n,i;return(n=this.graphModel)===null||n===void 0||(i=n.nodesMap[this.targetNodeId])===null||i===void 0?void 0:i.model}},{key:"textPosition",get:function(){return this.getTextPosition()}},{key:"getTextPosition",value:function(){return{x:0,y:0}}},{key:"move",value:function(){}},{key:"getBeginAnchor",value:function(n,i){var o,a;return hu(n).forEach(function(s){var l=Of(s,i);a?l<a&&(a=l,o=s):(a=l,o=s)}),o}},{key:"getEndAnchor",value:function(n){var i,o,a=this;return hu(n).forEach(function(s){var l=Of(s,a.startPoint);o?l<o&&(o=l,i=s):(o=l,i=s)}),i}},{key:"getProperties",value:function(){return Object(O.G)(this.properties)}},{key:"getData",value:function(){var n=this.text,i=n.x,o=n.y,a=n.value,s={id:this.id,type:this.type,sourceNodeId:this.sourceNode.id,targetNodeId:this.targetNode.id,startPoint:Object.assign({},this.startPoint),endPoint:Object.assign({},this.endPoint),properties:Object(O.G)(this.properties)};return a&&(s.text={x:i,y:o,value:a}),this.graphModel.overlapMode===kr.INCREASE&&(s.zIndex=this.zIndex),s}},{key:"setProperty",value:function(n,i){this.properties[n]=ir(i),this.setAttributes()}},{key:"setProperties",value:function(n){Object.assign(this.properties,ir(n)),this.setAttributes()}},{key:"updateData",value:function(n){var i=ir(Pr(n,"type","sourceNodeId","targetNodeId","startPoint","endPoint","text","properties")),o=this.text,a=o.x,s=o.y,l=o.draggable,h=o.editable;if(i.text&&typeof i.text=="string"){var _={value:i.text,draggable:l,editable:h},j=this.textPosition;i.text=a||s?Object.assign({},_,{x:a,y:s}):Object.assign({},_,j)}else if(ql(i.text)==="object"){var k=Object.assign({},this.text,i.text);i.text=Pr(k,"x","y","value","draggable","editable")}st(this,i)}},{key:"formatText",value:function(n){var i=this.textPosition,o=i.x,a=i.y;n.text&&typeof n.text!="string"?Object.prototype.toString.call(n.text)==="[object Object]"&&(this.text={x:n.text.x||o,y:n.text.y||a,value:n.text.value||"",draggable:this.text.draggable,editable:this.text.editable}):this.text={value:n.text||"",x:o,y:a,draggable:this.text.draggable,editable:this.text.editable}}},{key:"resetTextPosition",value:function(){var n=this.textPosition,i=n.x,o=n.y;this.text.x=i,this.text.y=o}},{key:"moveText",value:function(n,i){if(this.text){var o=this.text,a=o.x,s=o.y,l=o.value,h=o.draggable,_=o.editable;this.text={value:l,draggable:h,x:a+n,y:s+i,editable:_}}}},{key:"setText",value:function(n){n&&st(this.text,n)}},{key:"updateText",value:function(n){var i=this.text,o=i.x,a=i.y,s=i.draggable,l=i.editable;this.text={x:o,y:a,draggable:s,editable:l,value:n}}},{key:"setAnchors",value:function(){if(!this.startPoint){var n=this.getBeginAnchor(this.sourceNode,this.targetNode);this.startPoint=n}if(!this.endPoint){var i=this.getEndAnchor(this.targetNode);this.endPoint=i}}},{key:"setSelected",value:function(){var n=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isSelected=n}},{key:"setHovered",value:function(){var n=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isHovered=n}},{key:"setHitable",value:function(){var n=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isHitable=n}},{key:"setElementState",value:function(n,i){this.state=n,this.additionStateData=i}},{key:"updateStroke",value:function(n){this.stroke=n}},{key:"updateStrokeWidth",value:function(n){this.strokeWidth=n}},{key:"updateStartPoint",value:function(n){this.startPoint=n}},{key:"updateEndPoint",value:function(n){this.endPoint=n}},{key:"setStyleFromTheme",value:function(n,i){var o=i.theme;o[n]&&st(this,o[n])}},{key:"setZIndex",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:at.zIndex;this.zIndex=n}},{key:"initPoints",value:function(){}},{key:"updateAttributes",value:function(n){st(this,n)}},{key:"getAdjustStart",value:function(){return this.startPoint}},{key:"getAdjustEnd",value:function(){return this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(n){var i=n.startPoint,o=n.endPoint;this.updateStartPoint({x:i.x,y:i.y}),this.updateEndPoint({x:o.x,y:o.y})}}])&&Sm(e.prototype,r),t}()).prototype,"state",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),ml=Pe(ue.prototype,"text",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return at.text}}),_l=Pe(ue.prototype,"type",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Ol=Pe(ue.prototype,"properties",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),wl=Pe(ue.prototype,"sourceNodeId",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return at.sourceNodeId}}),xl=Pe(ue.prototype,"targetNodeId",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return at.targetNodeId}}),El=Pe(ue.prototype,"startPoint",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return at.startPoint}}),Sl=Pe(ue.prototype,"endPoint",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return at.endPoint}}),jl=Pe(ue.prototype,"strokeWidth",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return at.strokeWidth}}),Pl=Pe(ue.prototype,"stroke",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return at.stroke}}),kl=Pe(ue.prototype,"strokeDashArray",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return at.strokeDashArray}}),Al=Pe(ue.prototype,"outlineColor",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return at.outlineColor}}),Dl=Pe(ue.prototype,"hideOutline",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return at.hideOutline}}),Tl=Pe(ue.prototype,"outlineStrokeDashArray",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return at.outlineStrokeDashArray}}),Ml=Pe(ue.prototype,"strokeOpacity",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return at.strokeOpacity}}),Nl=Pe(ue.prototype,"zIndex",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return at.zIndex}}),Cl=Pe(ue.prototype,"isSelected",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return at.isSelected}}),Rl=Pe(ue.prototype,"isHovered",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return at.isHovered}}),Il=Pe(ue.prototype,"isDragging",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Ll=Pe(ue.prototype,"isHitable",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),zl=Pe(ue.prototype,"hoverStroke",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return at.hoverStroke}}),Bl=Pe(ue.prototype,"selectedStroke",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return at.selectedStroke}}),Xl=Pe(ue.prototype,"points",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return at.points}}),Fl=Pe(ue.prototype,"pointsList",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return at.pointsList}}),Hl=Pe(ue.prototype,"draggable",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Pe(ue.prototype,"sourceNode",[O.k],Object.getOwnPropertyDescriptor(ue.prototype,"sourceNode"),ue.prototype),Pe(ue.prototype,"targetNode",[O.k],Object.getOwnPropertyDescriptor(ue.prototype,"targetNode"),ue.prototype),Pe(ue.prototype,"textPosition",[O.k],Object.getOwnPropertyDescriptor(ue.prototype,"textPosition"),ue.prototype),Pe(ue.prototype,"setProperty",[O.i],Object.getOwnPropertyDescriptor(ue.prototype,"setProperty"),ue.prototype),Pe(ue.prototype,"setProperties",[O.i],Object.getOwnPropertyDescriptor(ue.prototype,"setProperties"),ue.prototype),Pe(ue.prototype,"updateData",[O.i],Object.getOwnPropertyDescriptor(ue.prototype,"updateData"),ue.prototype),Pe(ue.prototype,"formatText",[O.i],Object.getOwnPropertyDescriptor(ue.prototype,"formatText"),ue.prototype),Pe(ue.prototype,"resetTextPosition",[O.i],Object.getOwnPropertyDescriptor(ue.prototype,"resetTextPosition"),ue.prototype),Pe(ue.prototype,"moveText",[O.i],Object.getOwnPropertyDescriptor(ue.prototype,"moveText"),ue.prototype),Pe(ue.prototype,"setText",[O.i],Object.getOwnPropertyDescriptor(ue.prototype,"setText"),ue.prototype),Pe(ue.prototype,"updateText",[O.i],Object.getOwnPropertyDescriptor(ue.prototype,"updateText"),ue.prototype),Pe(ue.prototype,"setAnchors",[O.i],Object.getOwnPropertyDescriptor(ue.prototype,"setAnchors"),ue.prototype),Pe(ue.prototype,"setSelected",[O.i],Object.getOwnPropertyDescriptor(ue.prototype,"setSelected"),ue.prototype),Pe(ue.prototype,"setHovered",[O.i],Object.getOwnPropertyDescriptor(ue.prototype,"setHovered"),ue.prototype),Pe(ue.prototype,"setHitable",[O.i],Object.getOwnPropertyDescriptor(ue.prototype,"setHitable"),ue.prototype),Pe(ue.prototype,"setElementState",[O.i],Object.getOwnPropertyDescriptor(ue.prototype,"setElementState"),ue.prototype),Pe(ue.prototype,"updateStroke",[O.i],Object.getOwnPropertyDescriptor(ue.prototype,"updateStroke"),ue.prototype),Pe(ue.prototype,"updateStrokeWidth",[O.i],Object.getOwnPropertyDescriptor(ue.prototype,"updateStrokeWidth"),ue.prototype),Pe(ue.prototype,"updateStartPoint",[O.i],Object.getOwnPropertyDescriptor(ue.prototype,"updateStartPoint"),ue.prototype),Pe(ue.prototype,"updateEndPoint",[O.i],Object.getOwnPropertyDescriptor(ue.prototype,"updateEndPoint"),ue.prototype),Pe(ue.prototype,"setStyleFromTheme",[O.i],Object.getOwnPropertyDescriptor(ue.prototype,"setStyleFromTheme"),ue.prototype),Pe(ue.prototype,"setZIndex",[O.i],Object.getOwnPropertyDescriptor(ue.prototype,"setZIndex"),ue.prototype),Pe(ue.prototype,"initPoints",[O.i],Object.getOwnPropertyDescriptor(ue.prototype,"initPoints"),ue.prototype),Pe(ue.prototype,"updateAttributes",[O.i],Object.getOwnPropertyDescriptor(ue.prototype,"updateAttributes"),ue.prototype),Pe(ue.prototype,"getAdjustStart",[O.i],Object.getOwnPropertyDescriptor(ue.prototype,"getAdjustStart"),ue.prototype),Pe(ue.prototype,"getAdjustEnd",[O.i],Object.getOwnPropertyDescriptor(ue.prototype,"getAdjustEnd"),ue.prototype),Pe(ue.prototype,"updateAfterAdjustStartAndEnd",[O.i],Object.getOwnPropertyDescriptor(ue.prototype,"updateAfterAdjustStartAndEnd"),ue.prototype),ue),gu=vu;function Jl(t){return(Jl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function Pm(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ql(t,e){return(Ql=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r})(t,e)}function km(t){var e=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(r){return!1}}();return function(){var r,n=bu(t);if(e){var i=bu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Am(this,r)}}function Am(t,e){if(e&&(Jl(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function bu(t){return(bu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}var Le,ef,mu=function(t){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&Ql(o,a)})(i,t);var e,r,n=km(i);function i(o,a){var s;return function(l,h){if(!(l instanceof h))throw new TypeError("Cannot call a class as a function")}(this,i),(s=n.call(this,o,a,"line")).modelType=Ie.LINE_EDGE,s}return e=i,(r=[{key:"getTextPosition",value:function(){return{x:(this.startPoint.x+this.endPoint.x)/2,y:(this.startPoint.y+this.endPoint.y)/2}}}])&&Pm(e.prototype,r),i}(gu);u(37);function tf(t){return(tf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function Dm(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var i=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var o,a,s=[],l=!0,h=!1;try{for(i=i.call(r);!(l=(o=i.next()).done)&&(s.push(o.value),!n||s.length!==n);l=!0);}catch(_){h=!0,a=_}finally{try{l||i.return==null||i.return()}finally{if(h)throw a}}return s}}(t,e)||function(r,n){if(r){if(typeof r=="string")return rf(r,n);var i=Object.prototype.toString.call(r).slice(8,-1);if(i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set")return Array.from(r);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return rf(r,n)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function rf(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Tm(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function nf(t,e,r){return(nf=typeof Reflect!="undefined"&&Reflect.get?Reflect.get:function(n,i,o){var a=function(l,h){for(;!Object.prototype.hasOwnProperty.call(l,h)&&(l=zo(l))!==null;);return l}(n,i);if(a){var s=Object.getOwnPropertyDescriptor(a,i);return s.get?s.get.call(o):s.value}})(t,e,r||t)}function of(t,e){return(of=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r})(t,e)}function Mm(t){var e=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(r){return!1}}();return function(){var r,n=zo(t);if(e){var i=zo(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Nm(this,r)}}function Nm(t,e){if(e&&(tf(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return af(t)}function af(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function zo(t){return(zo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}function Jt(t,e,r,n,i){var o={};return Object.keys(n).forEach(function(a){o[a]=n[a]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce(function(a,s){return s(t,e,a)||a},o),i&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(t,e,o),o=null),o}var _u=(ef=Jt((Le=function(t){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&of(o,a)})(i,t);var e,r,n=Mm(i);function i(o,a){var s;return function(l,h){if(!(l instanceof h))throw new TypeError("Cannot call a class as a function")}(this,i),(s=n.call(this,o,a,"polyline")).modelType=Ie.POLYLINE_EDGE,s.offset=Xt.polyline.offset,s.draginngPointList=void 0,function(l,h,_,j){_&&Object.defineProperty(l,h,{enumerable:_.enumerable,configurable:_.configurable,writable:_.writable,value:_.initializer?_.initializer.call(j):void 0})}(s,"dbClickPosition",ef,af(s)),s}return e=i,(r=[{key:"getTextPosition",value:function(){var o,a=(o=this.text)===null||o===void 0?void 0:o.value;if(this.dbClickPosition&&!a){var s=this.dbClickPosition;return{x:s.x,y:s.y}}var l=ao(this.points),h=Dm(Lm(l),2),_=h[0],j=h[1];return{x:(_.x+j.x)/2,y:(_.y+j.y)/2}}},{key:"getAfterAnchor",value:function(o,a,s){var l,h;return s.forEach(function(_){var j;o===ot.HORIZONTAL?j=Math.abs(a.y-_.y):o===ot.VERTICAL&&(j=Math.abs(a.x-_.x)),(!h||h>j)&&(h=j,l=_)}),l}},{key:"getCorssPoint",value:function(o,a,s){var l;return o===ot.HORIZONTAL?l={x:s.x,y:a.y}:o===ot.VERTICAL&&(l={x:a.x,y:s.y}),l}},{key:"removeCrossPoints",value:function(o,a,s){var l=s.map(function(K){return K});if(o===1){var h=l[o],_=l[a],j=l[o-1];if(yf(j,h,this.sourceNode)){if(vf(h,_,this.sourceNode)){var k=gf(h,_,this.sourceNode);k&&(l[o]=k,l.splice(o-1,1),o--,a--)}}else this.sourceNode.anchors.forEach(function(K){(K.x===j.x&&K.x===h.x||K.y===j.y&&K.y===h.y)&&Ar(K.x,K.y,h.x,h.y)<Ar(j.x,j.y,h.x,h.y)&&(l[o-1]=K)})}if(a===s.length-2){var N=l[o],H=l[a],$=l[a+1];if(yf(H,$,this.targetNode)){if(vf(N,H,this.targetNode)){var V=gf(N,H,this.targetNode);V&&(l[a]=V,l.splice(a+1,1))}}else this.targetNode.anchors.forEach(function(K){(K.x===$.x&&K.x===H.x||K.y===$.y&&K.y===H.y)&&Ar(K.x,K.y,H.x,H.y)<Ar($.x,$.y,H.x,H.y)&&(l[a+1]=K)})}return l}},{key:"getDragingPoints",value:function(o,a,s,l,h){var _=h.map(function(N){return N}),j=this.getAfterAnchor(o,s,l),k=this.getCorssPoint(o,s,j);return a==="start"?(_.unshift(k),_.unshift(j)):(_.push(k),_.push(j)),_}},{key:"updateCrossPoints",value:function(o){var a=o.map(function(te){return te}),s=o[0],l=o[1],h=o[a.length-2],_=o[a.length-1],j=this.sourceNode,k=this.targetNode,N=j.modelType,H=k.modelType,$=oa(s,l),V=a[0];switch(N){case Ie.RECT_NODE:j.radius!==0&&(Gl(s,j)||(V=Ul(s,$,j)));break;case Ie.CIRCLE_NODE:V=du(s,$,j);break;case Ie.ELLIPSE_NODE:V=Wl(s,$,j);break;case Ie.DIAMOND_NODE:case Ie.POLYGON_NODE:V=Yl(s,$,j)}a[0]=V;var K=oa(h,_),q=a[a.length-1];switch(H){case Ie.RECT_NODE:k.radius!==0&&(Gl(_,k)||(q=Ul(_,K,k)));break;case Ie.CIRCLE_NODE:q=du(_,K,k);break;case Ie.ELLIPSE_NODE:q=Wl(_,K,k);break;case Ie.DIAMOND_NODE:case Ie.POLYGON_NODE:q=Yl(_,K,k)}return a[a.length-1]=q,a}},{key:"getData",value:function(){var o=nf(zo(i.prototype),"getData",this).call(this),a=this.pointsList.map(function(s){return{x:s.x,y:s.y}});return Object.assign({},o,{pointsList:a})}},{key:"initPoints",value:function(){this.pointsList.length>0?this.points=this.pointsList.map(function(o){return"".concat(o.x,",").concat(o.y)}).join(" "):this.updatePoints()}},{key:"updatePoints",value:function(){var o=df({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:"updateEndPoint",value:function(o){this.endPoint=o,this.updatePoints()}},{key:"dragAppendStart",value:function(){this.draginngPointList=this.pointsList.map(function(o){return o})}},{key:"dragAppendSimple",value:function(o,a){this.isDragging=!0;var s=o.start,l=o.end,h=o.startIndex,_=o.endIndex,j=o.direction,k=this.pointsList,N=k;return j===ot.HORIZONTAL?(k[h]={x:s.x,y:s.y+a.y},k[_]={x:l.x,y:l.y+a.y},N=this.pointsList.map(function(H){return H})):j===ot.VERTICAL&&(k[h]={x:s.x+a.x,y:s.y},k[_]={x:l.x+a.x,y:l.y},N=this.pointsList.map(function(H){return H})),this.updatePointsAfterDrage(N),this.draginngPointList=N,this.setText(Object.assign({},this.text,this.textPosition)),{start:Object.assign({},k[h]),end:Object.assign({},k[_]),startIndex:h,endIndex:_,direction:j}}},{key:"dragAppend",value:function(o,a){this.isDragging=!0;var s=o.start,l=o.end,h=o.startIndex,_=o.endIndex,j=o.direction,k=this.pointsList;if(j===ot.HORIZONTAL){k[h]={x:s.x,y:s.y+a.y},k[_]={x:l.x,y:l.y+a.y};var N=this.pointsList.map(function(me){return me});if(h!==0&&_!==this.pointsList.length-1&&(N=this.removeCrossPoints(h,_,N)),h===0){var H={x:s.x,y:s.y+a.y};if(!cn(H,this.sourceNode)){var $=this.sourceNode.anchors;N=this.getDragingPoints(j,"start",H,$,N)}}if(_===this.pointsList.length-1){var V={x:l.x,y:l.y+a.y};if(!cn(V,this.targetNode)){var K=this.targetNode.anchors;N=this.getDragingPoints(j,"end",V,K,N)}}N=Su(N),this.updatePointsAfterDrage(N),this.draginngPointList=N}else if(j===ot.VERTICAL){k[h]={x:s.x+a.x,y:s.y},k[_]={x:l.x+a.x,y:l.y};var q=this.pointsList.map(function(me){return me});if(h!==0&&_!==this.pointsList.length-1&&(q=this.removeCrossPoints(h,_,q)),h===0){var te={x:s.x+a.x,y:s.y};if(!cn(te,this.sourceNode)){var ie=this.sourceNode.anchors;q=this.getDragingPoints(j,"start",te,ie,q)}}if(_===this.pointsList.length-1){var oe={x:l.x+a.x,y:l.y};if(!cn(oe,this.targetNode)){var _e=this.targetNode.anchors;q=this.getDragingPoints(j,"end",oe,_e,q)}}q=Su(q),this.updatePointsAfterDrage(q),this.draginngPointList=q}return this.setText(Object.assign({},this.text,this.textPosition)),{start:Object.assign({},k[h]),end:Object.assign({},k[_]),startIndex:h,endIndex:_,direction:j}}},{key:"dragAppendEnd",value:function(){if(this.draginngPointList){var o=ao(this.points);this.pointsList=o.map(function(l){return l}),this.draginngPointList=[];var a=o[0];this.startPoint=Object.assign({},a);var s=o[o.length-1];this.endPoint=Object.assign({},s)}this.isDragging=!1}},{key:"updatePointsAfterDrage",value:function(o){var a=this.updateCrossPoints(o);this.points=a.map(function(s){return"".concat(s.x,",").concat(s.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,s=o.endPoint,l=o.sourceNode,h=o.targetNode,_=df({x:a.x,y:a.y},{x:s.x,y:s.y},l,h,this.offset||0);this.pointsList=_,this.initPoints()}}])&&Tm(e.prototype,r),i}(gu)).prototype,"dbClickPosition",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Jt(Le.prototype,"initPoints",[O.i],Object.getOwnPropertyDescriptor(Le.prototype,"initPoints"),Le.prototype),Jt(Le.prototype,"updatePoints",[O.i],Object.getOwnPropertyDescriptor(Le.prototype,"updatePoints"),Le.prototype),Jt(Le.prototype,"updateStartPoint",[O.i],Object.getOwnPropertyDescriptor(Le.prototype,"updateStartPoint"),Le.prototype),Jt(Le.prototype,"updateEndPoint",[O.i],Object.getOwnPropertyDescriptor(Le.prototype,"updateEndPoint"),Le.prototype),Jt(Le.prototype,"dragAppendStart",[O.i],Object.getOwnPropertyDescriptor(Le.prototype,"dragAppendStart"),Le.prototype),Jt(Le.prototype,"dragAppendSimple",[O.i],Object.getOwnPropertyDescriptor(Le.prototype,"dragAppendSimple"),Le.prototype),Jt(Le.prototype,"dragAppend",[O.i],Object.getOwnPropertyDescriptor(Le.prototype,"dragAppend"),Le.prototype),Jt(Le.prototype,"dragAppendEnd",[O.i],Object.getOwnPropertyDescriptor(Le.prototype,"dragAppendEnd"),Le.prototype),Jt(Le.prototype,"updatePointsAfterDrage",[O.i],Object.getOwnPropertyDescriptor(Le.prototype,"updatePointsAfterDrage"),Le.prototype),Jt(Le.prototype,"getAdjustStart",[O.i],Object.getOwnPropertyDescriptor(Le.prototype,"getAdjustStart"),Le.prototype),Jt(Le.prototype,"getAdjustEnd",[O.i],Object.getOwnPropertyDescriptor(Le.prototype,"getAdjustEnd"),Le.prototype),Jt(Le.prototype,"updateAfterAdjustStartAndEnd",[O.i],Object.getOwnPropertyDescriptor(Le.prototype,"updateAfterAdjustStartAndEnd"),Le.prototype),Le),Bo=function(t){var e=t.start,r=t.end,n=t.offset,i=t.verticalLength,o=t.type,a={leftX:0,leftY:0,rightX:0,rightY:0},s=Math.atan((r.y-e.y)/(r.x-e.x)),l=Math.atan(n/i),h=Math.sqrt(i*i+n*n);return o==="start"?r.x>=e.x?(a.leftX=e.x+h*Math.sin(s+l),a.leftY=e.y-h*Math.cos(s+l),a.rightX=e.x-h*Math.sin(s-l),a.rightY=e.y+h*Math.cos(s-l)):(a.leftX=e.x-h*Math.sin(s+l),a.leftY=e.y+h*Math.cos(s+l),a.rightX=e.x+h*Math.sin(s-l),a.rightY=e.y-h*Math.cos(s-l)):o==="end"&&(r.x>=e.x?(a.leftX=r.x+h*Math.sin(s-l),a.leftY=r.y-h*Math.cos(s-l),a.rightX=r.x-h*Math.sin(s+l),a.rightY=r.y+h*Math.cos(s+l)):(a.leftX=r.x-h*Math.sin(s-l),a.leftY=r.y+h*Math.cos(s-l),a.rightX=r.x+h*Math.sin(s+l),a.rightY=r.y-h*Math.cos(s+l))),a};function uf(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Qi(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?uf(Object(r),!0).forEach(function(n){Cm(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):uf(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Cm(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Rm(t){return function(e){if(Array.isArray(e))return wu(e)}(t)||function(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||cf(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function sf(t){return(sf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function Ou(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var i=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var o,a,s=[],l=!0,h=!1;try{for(i=i.call(r);!(l=(o=i.next()).done)&&(s.push(o.value),!n||s.length!==n);l=!0);}catch(_){h=!0,a=_}finally{try{l||i.return==null||i.return()}finally{if(h)throw a}}return s}}(t,e)||cf(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function cf(t,e){if(t){if(typeof t=="string")return wu(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?wu(t,e):void 0}}function wu(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var xu=function(t){var e=[],r={};return t.forEach(function(n){var i="".concat(n.x,"-").concat(n.y);n.id=i,r[i]=n}),Object.keys(r).forEach(function(n){e.push(r[n])}),e},ea=function(t,e){return t.width===0&&t.height===0?t:{centerX:t.centerX,centerY:t.centerY,minX:t.minX-e,minY:t.minY-e,maxX:t.maxX+e,maxY:t.maxY+e,height:t.height+2*e,width:t.width+2*e}},ta=function(t,e){return function(r,n){var i=Math.abs(r.x-n.centerX),o=Math.abs(r.y-n.centerY);return i/n.width>o/n.height?ot.HORIZONTAL:ot.VERTICAL}(e,t)===ot.HORIZONTAL?{x:e.x>t.centerX?t.maxX:t.minX,y:e.y}:{x:e.x,y:e.y>t.centerY?t.maxY:t.minY}},lf=function(t,e){var r=Math.min(t.minX,e.minX),n=Math.min(t.minY,e.minY),i=Math.max(t.maxX,e.maxX),o=Math.max(t.maxY,e.maxY);return{centerX:(r+i)/2,centerY:(n+o)/2,minX:r,minY:n,maxX:i,maxY:o,height:o-n,width:i-r}},Xo=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0,r=[],n=[];t.forEach(function(_){r.push(_.x),n.push(_.y)});var i=Math.min.apply(Math,r),o=Math.max.apply(Math,r),a=Math.min.apply(Math,n),s=Math.max.apply(Math,n),l=o-i,h=s-a;return e&&(l+=e,h+=e),{centerX:(i+o)/2,centerY:(a+s)/2,maxX:o,maxY:s,minX:i,minY:a,x:(i+o)/2,y:(a+s)/2,height:h,width:l}},ra=function(t){var e=t.minX,r=t.minY,n=t.maxX,i=t.maxY;return[{x:e,y:r},{x:n,y:r},{x:n,y:i},{x:e,y:i}]},na=function(t,e){var r=t.x,n=t.y;return r<e.minX||r>e.maxX||n<e.minY||n>e.maxY},Eu=function(t,e){return Math.abs(t.x-e.x)+Math.abs(t.y-e.y)},ff=function(t,e,r,n,i){return Eu(t,e)+Eu(t,r)+function(o,a){var s=0;return a.forEach(function(l){l&&(o.x===l.x&&(s+=-2),o.y===l.y&&(s+=-2))}),s}(t,[e,r,n,i])},Fo=function(t,e,r,n){var i=e.x-t.x,o=e.y-t.y,a=n.x-r.x,s=n.y-r.y,l=(-o*(t.x-r.x)+i*(t.y-r.y))/(-a*o+i*s),h=(a*(t.y-r.y)-s*(t.x-r.x))/(-a*o+i*s);return l>=0&&l<=1&&h>=0&&h<=1},pf=function(t,e,r){if(r.width===0&&r.height===0)return!1;var n=Ou(ra(r),4),i=n[0],o=n[1],a=n[2],s=n[3];return Fo(t,e,i,o)||Fo(t,e,i,s)||Fo(t,e,o,a)||Fo(t,e,a,s)},Im=function(t,e,r,n,i,o,a){var s=[],l=[e],h={},_={},j={};_[e.id]=0,j[e.id]=ff(e,r,e);var k={};t.forEach(function($){k[$.id]=$});for(var N=function(){var $,V,K,q=void 0,te=1/0;if(l.forEach(function(oe){j[oe.id]<te&&(te=j[oe.id],q=oe)}),q===r){var ie=[];return function oe(_e,me,Ee,Ge,Ke){Ke||(Ke=0),_e.unshift(me[Ge]),Ee[Ge]&&Ee[Ge]!==Ge&&Ke<=100&&oe(_e,me,Ee,Ee[Ge],Ke+1)}(ie,k,h,r.id),{v:ie}}V=q,(K=($=l).indexOf(V))>-1&&$.splice(K,1),s.push(q),function(oe,_e,me,Ee){var Ge=[];return oe.forEach(function(Ke){Ke!==_e&&(Ke.x!==_e.x&&Ke.y!==_e.y||pf(Ke,_e,me)||pf(Ke,_e,Ee)||Ge.push(Ke))}),xu(Ge)}(t,q,n,i).forEach(function(oe){if(s.indexOf(oe)===-1){l.indexOf(oe)===-1&&l.push(oe);var _e=j[q.id]+Eu(q,oe);_[oe.id]&&_e>=_[oe.id]||(h[oe.id]=q.id,_[oe.id]=_e,j[oe.id]=_[oe.id]+ff(oe,r,e,o,a))}})};l.length;){var H=N();if(sf(H)==="object")return H.v}return[e,r]},hf=function(t){return Zt(t)},Su=function(t){for(var e=t,r=1;r<e.length-1;){var n=e[r-1],i=e[r],o=e[r+1];n.x===i.x&&i.x===o.x||n.y===i.y&&i.y===o.y?e.splice(r,1):r++}return e},df=function(t,e,r,n,i){var o,a,s=hf(r),l=hf(n),h=ea(s,i),_=ea(l,i),j=ta(h,t),k=ta(_,e);if(o=h,a=_,2*Math.abs(o.centerX-a.centerX)<o.width+a.width&&2*Math.abs(o.centerY-a.centerY)<o.height+a.height){var N=zm(t,e,j,k);return[t,j].concat(Rm(N),[k,e])}var H=Xo([j,k]),$=lf(h,H),V=lf(_,H),K=[];K=(K=K.concat(ra($))).concat(ra(V));var q={x:(t.x+e.x)/2,y:(t.y+e.y)/2};[H,$,V].forEach(function(ie){K=K.concat(function(oe,_e){return function(me,Ee){return Ee<me.minX||Ee>me.maxX?[]:[{x:Ee,y:me.minY},{x:Ee,y:me.maxY}]}(oe,_e.x).concat(function(me,Ee){return Ee<me.minY||Ee>me.maxY?[]:[{x:me.minX,y:Ee},{x:me.maxX,y:Ee}]}(oe,_e.y))}(ie,q).filter(function(oe){return na(oe,h)&&na(oe,_)}))}),[{x:j.x,y:k.y},{x:k.x,y:j.y}].forEach(function(ie){na(ie,h)&&na(ie,_)&&K.push(ie)}),K.unshift(j),K.push(k),K=xu(K);var te=Im(K,j,k,s,l,t,e);return te.unshift(t),te.push(e),te.length>2&&(te=Su(te)),xu(te)},Lm=function(t){var e;if(t.length===1)e=[t[0],t[0]];else if(t.length>=2){for(var r=t[0],n=t[1],i=Ar(r.x,r.y,n.x,n.y),o=1;o<t.length-1;o++){var a=t[o],s=t[o+1],l=Ar(a.x,a.y,s.x,s.y);l>i&&(i=l,r=a,n=s)}e=[r,n]}return e},yf=function(t,e,r){var n=cn(t,r),i=cn(e,r);return n&&i},vf=function(t,e,r){var n=cn(t,r),i=cn(e,r);return!(n&&i)&&(n||i)},gf=function(t,e,r){for(var n,i,o=Zt(r),a=ra(o),s=0;s<a.length;s++)Fo(t,e,a[s],a[(s+1)%a.length])&&(i=[a[s],a[(s+1)%a.length]]);return i&&(n=function(l,h,_,j){var k=(h.y-l.y)*(j.x-_.x)-(l.x-h.x)*(_.y-j.y);if(k===0)return!1;var N=((h.x-l.x)*(j.x-_.x)*(_.y-l.y)+(h.y-l.y)*(j.x-_.x)*l.x-(j.y-_.y)*(h.x-l.x)*_.x)/k,H=-((h.y-l.y)*(j.y-_.y)*(_.x-l.x)+(h.x-l.x)*(j.y-_.y)*l.y-(j.x-_.x)*(h.y-l.y)*_.y)/k;return(N-l.x)*(N-h.x)<=0&&(H-l.y)*(H-h.y)<=0&&(N-_.x)*(N-j.x)<=0&&(H-_.y)*(H-j.y)<=0&&{x:N,y:H}}(t,e,i[0],i[1])),n},oa=function(t,e){var r;return t.x===e.x?r=ot.VERTICAL:t.y===e.y&&(r=ot.HORIZONTAL),r},ao=function(t){var e=t.split(" "),r=[];return e&&e.forEach(function(n){var i=Ou(n.split(","),2),o=i[0],a=i[1];r.push({x:Number(o),y:Number(a)})}),r},zm=function(t,e,r,n){var i=[];if(oa(t,r)===oa(e,n))t.y===r.y?(i.push({x:r.x,y:(r.y+n.y)/2}),i.push({x:n.x,y:(r.y+n.y)/2})):(i.push({x:(r.x+n.x)/2,y:r.y}),i.push({x:(r.x+n.x)/2,y:n.y}));else{var o={x:r.x,y:n.y},a=Lo(o,t,r),s=Lo(o,e,n);if(a||s)o={x:n.x,y:r.y};else{var l=bf(o,t,r),h=bf(o,e,n);l&&h&&(o={x:n.x,y:r.y})}i.push(o)}return i},bf=function(t,e,r){return t.x===e.x&&t.x===r.x||t.y===e.y&&t.y===r.y},ju=function(t){if(!t)return 0;for(var e=0,r=0;r<t.length;r++){var n=t.charCodeAt(r);t.match(/[A-Z]/)?e+=1.5:e+=n>=1&&n<=126||n>=65376&&n<=65439?1:2}return e},mf=function(t){var e=t.start,r=t.end,n=t.sourceNode,i=t.targetNode,o=t.offset,a=Zt(n),s=Zt(i),l=ea(a,o),h=ea(s,o);return{sNext:ta(l,e),ePre:ta(h,r)}},ia=function(t){var e=t.replace(/M/g,"").replace(/C/g,",").split(",");return[aa(e[0]),aa(e[1]),aa(e[2]),aa(e[3])]},aa=function(t){var e=Ou(t.replace(/(^\s*)/g,"").split(" "),2);return{x:+e[0],y:+e[1]}},_f=function(t,e){for(var r,n=t.x,i=t.y,o=ao(e),a=Number.MAX_SAFE_INTEGER,s=[],l=0;l<o.length;l++)s.push({start:o[l],end:o[(l+1)%o.length]});if(s.forEach(function(k){var N=k.start,H=k.end;if(N.x===H.x){var $={x:N.x,y:i};if(Lo($,N,H)){var V=Math.abs(N.x-n);V<a&&(a=V,r=$)}}else if(N.y===H.y){var K={x:n,y:N.y};if(Lo(K,N,H)){var q=Math.abs(N.y-i);q<a&&(a=q,r=K)}}}),!r){var h=s[0],_=h.start,j=h.end;r={x:_.x+(j.x-_.x)/2,y:_.y+(j.y-_.y)/2}}return r},Bm=function(t){return Pr(t,["id","type","sourceNodeId","sourceAnchorId","targetNodeId","targetAnchorId","pointsList","startPoint","endPoint","properties"])},Of=function(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},uo=function(){};function Xm(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var ln=window.document;function Ho(t){var e=t.onDragStart,r=e===void 0?uo:e,n=t.onDraging,i=n===void 0?uo:n,o=t.onDragEnd,a=o===void 0?uo:o,s=t.step,l=s===void 0?1:s,h=t.isStopPropagation,_=h===void 0||h,j=!1,k=!1,N=0,H=0,$=0,V=0;function K(te){if(_&&te.stopPropagation(),k&&(j=!0,$+=te.clientX-N,V+=te.clientY-H,N=te.clientX,H=te.clientY,Math.abs($)>l||Math.abs(V)>l)){var ie=$%l,oe=V%l,_e=$-ie,me=V-oe;$=ie,V=oe,i({deltaX:_e,deltaY:me,event:te})}}function q(te){if(_&&te.stopPropagation(),k=!1,ln.removeEventListener("mousemove",K,!1),ln.removeEventListener("mouseup",q,!1),j)return j=!1,a({event:te})}return function(te){if(te.button===0)return _&&te.stopPropagation(),k=!0,N=te.clientX,H=te.clientY,ln.addEventListener("mousemove",K,!1),ln.addEventListener("mouseup",q,!1),r({event:te})}}var re,wf,xf,Ef,Sf,jf,Pf,kf,Af,Df,Tf,Mf,Nf,Cf,Rf,If,Lf,zf,Uo=function(){function t(n){var i=this,o=n.onDragStart,a=o===void 0?uo:o,s=n.onDraging,l=s===void 0?uo:s,h=n.onDragEnd,_=h===void 0?uo:h,j=n.eventType,k=j===void 0?"":j,N=n.eventCenter,H=N===void 0?null:N,$=n.step,V=$===void 0?1:$,K=n.isStopPropagation,q=K===void 0||K,te=n.model,ie=te===void 0?null:te;(function(oe,_e){if(!(oe instanceof _e))throw new TypeError("Cannot call a class as a function")})(this,t),this.onDragStart=void 0,this.onDraging=void 0,this.onDragEnd=void 0,this.step=void 0,this.isStopPropagation=void 0,this.isDraging=!1,this.isStartDraging=!1,this.startX=0,this.startY=0,this.sumDeltaX=0,this.sumDeltaY=0,this.eventType=void 0,this.eventCenter=void 0,this.model=void 0,this.startTime=void 0,this.isGrag=void 0,this.handleMouseDown=function(oe){var _e,me,Ee;if(oe.button===0){i.isStopPropagation&&oe.stopPropagation(),i.isStartDraging=!0,i.startX=oe.clientX,i.startY=oe.clientY,ln.addEventListener("mousemove",i.handleMouseMove,!1),ln.addEventListener("mouseup",i.handleMouseUp,!1),i.onDragStart({event:oe});var Ge=(_e=i.model)===null||_e===void 0?void 0:_e.getData();(me=i.eventCenter)===null||me===void 0||me.emit(Ne["".concat(i.eventType,"_MOUSEDOWN")],{e:oe,data:Ge}),(Ee=i.eventCenter)===null||Ee===void 0||Ee.emit(Ne["".concat(i.eventType,"_DRAGSTART")],{e:oe,data:Ge}),i.startTime=new Date().getTime()}},this.handleMouseMove=function(oe){if(i.isStopPropagation&&oe.stopPropagation(),i.isStartDraging&&(i.isDraging=!0,i.sumDeltaX+=oe.clientX-i.startX,i.sumDeltaY+=oe.clientY-i.startY,i.startX=oe.clientX,i.startY=oe.clientY,Math.abs(i.sumDeltaX)>i.step||Math.abs(i.sumDeltaY)>i.step)){var _e,me,Ee,Ge=i.sumDeltaX%i.step,Ke=i.sumDeltaY%i.step,Nt=i.sumDeltaX-Ge,Or=i.sumDeltaY-Ke;i.sumDeltaX=Ge,i.sumDeltaY=Ke,i.onDraging({deltaX:Nt,deltaY:Or,event:oe});var Qt=(_e=i.model)===null||_e===void 0?void 0:_e.getData();(me=i.eventCenter)===null||me===void 0||me.emit(Ne["".concat(i.eventType,"_MOUSEMOVE")],{e:oe,data:Qt}),(Ee=i.eventCenter)===null||Ee===void 0||Ee.emit(Ne["".concat(i.eventType,"_DRAG")],{e:oe,data:Qt})}},this.handleMouseUp=function(oe){var _e,me,Ee;if(i.isStartDraging=!1,i.isStopPropagation&&oe.stopPropagation(),ln.removeEventListener("mousemove",i.handleMouseMove,!1),ln.removeEventListener("mouseup",i.handleMouseUp,!1),i.isDraging){i.isDraging=!1,i.onDragEnd({event:oe});var Ge=(_e=i.model)===null||_e===void 0?void 0:_e.getData();(me=i.eventCenter)===null||me===void 0||me.emit(Ne["".concat(i.eventType,"_MOUSEUP")],{e:oe,data:Ge}),(Ee=i.eventCenter)===null||Ee===void 0||Ee.emit(Ne["".concat(i.eventType,"_DROP")],{e:oe,data:Ge})}},this.onDragStart=a,this.onDraging=l,this.onDragEnd=_,this.step=V,this.isStopPropagation=q,this.eventType=k,this.eventCenter=H,this.model=ie}var e,r;return e=t,(r=[{key:"setStep",value:function(n){this.step=n}}])&&Xm(e.prototype,r),t}();function Bf(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function so(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Bf(Object(r),!0).forEach(function(n){Fm(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Bf(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Fm(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Xf(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var i=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var o,a,s=[],l=!0,h=!1;try{for(i=i.call(r);!(l=(o=i.next()).done)&&(s.push(o.value),!n||s.length!==n);l=!0);}catch(_){h=!0,a=_}finally{try{l||i.return==null||i.return()}finally{if(h)throw a}}return s}}(t,e)||function(r,n){if(r){if(typeof r=="string")return Ff(r,n);var i=Object.prototype.toString.call(r).slice(8,-1);if(i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set")return Array.from(r);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Ff(r,n)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Ff(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function St(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function Hm(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Se(t,e,r,n,i){var o={};return Object.keys(n).forEach(function(a){o[a]=n[a]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce(function(a,s){return s(t,e,a)||a},o),i&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(t,e,o),o=null),o}var Hf,Uf=(wf=Se((re=function(){function t(n){(function(H,$){if(!(H instanceof $))throw new TypeError("Cannot call a class as a function")})(this,t),this.BaseType=vt.GRAPH,this.modelType=Ie.GRAPH,this.rootEl=void 0,this.theme=void 0,this.eventCenter=void 0,this.modelMap=new Map,this.width=void 0,this.height=void 0,this.topElement=void 0,this.selectElement=void 0,this.idGenerator=void 0,this.nodeMoveRules=[],St(this,"edgeType",wf,this),St(this,"nodes",xf,this),St(this,"activeElement",Ef,this),St(this,"activeElementState",Sf,this),St(this,"state",jf,this),St(this,"additionStateData",Pf,this),St(this,"edges",kf,this),St(this,"isSlient",Af,this),St(this,"overlapMode",Df,this),St(this,"plugins",Tf,this),St(this,"tools",Mf,this),St(this,"background",Nf,this),St(this,"transformMatrix",Cf,this),St(this,"editConfig",Rf,this),St(this,"gridSize",If,this),St(this,"partial",Lf,this),St(this,"fakerNode",zf,this);var i=n.container,o=n.background,a=o===void 0?{}:o,s=n.grid,l=(s=s===void 0?{}:s).size,h=l===void 0?1:l,_=n.isSilentMode,j=_!==void 0&&_,k=n.eventCenter,N=n.idGenerator;this.background=a,this.isSlient=j,this.gridSize=h,this.rootEl=i,this.editConfig=new Yc(n),this.eventCenter=k,this.transformMatrix=new Db(k),this.theme=pl(n.style),this.edgeType=n.edgeType||"polyline",this.width=n.width,this.height=n.height,this.partial=n.partial,this.overlapMode=n.overlapMode||0,this.idGenerator=N}var e,r;return e=t,(r=[{key:"nodesMap",get:function(){return this.nodes.reduce(function(n,i,o){return n[i.id]={index:o,model:i},n},{})}},{key:"edgesMap",get:function(){return this.edges.reduce(function(n,i,o){return n[i.id]={index:o,model:i},n},{})}},{key:"sortElements",get:function(){var n=[];this.nodes.forEach(function(j){return n.push(j)}),this.edges.forEach(function(j){return n.push(j)}),n=n.sort(function(j,k){return j.zIndex-k.zIndex});for(var i=[],o=-1,a=[-200,-200],s=[this.width+200,this.height+200],l=0;l<n.length;l++){var h=n[l];this.partial&&!this.isElementInArea(h,a,s,!1)||(h.zIndex===9999&&(o=i.length),i.push(h))}if(o!==-1){var _=i[i.length-1];i[i.length-1]=i[o],i[o]=_}return i}},{key:"textEditElement",get:function(){var n=this.nodes.find(function(o){return o.state===$e.TEXT_EDIT}),i=this.edges.find(function(o){return o.state===$e.TEXT_EDIT});return n||i}},{key:"selectElements",get:function(){var n=new Map;return this.nodes.forEach(function(i){i.isSelected&&n.set(i.id,i)}),this.edges.forEach(function(i){i.isSelected&&n.set(i.id,i)}),n}},{key:"getAreaElement",value:function(n,i){var o=[],a=[];this.nodes.forEach(function(h){return a.push(h)}),this.edges.forEach(function(h){return a.push(h)});for(var s=0;s<a.length;s++){var l=a[s];this.isElementInArea(l,n,i)&&o.push(l)}return o}},{key:"getModel",value:function(n){return this.modelMap.get(n)}},{key:"getNodeModel",value:function(n){var i;return this.fakerNode&&n===this.fakerNode.id?this.fakerNode:(i=this.nodesMap[n])===null||i===void 0?void 0:i.model}},{key:"getPointByClient",value:function(n){var i=n.x,o=n.y,a=this.rootEl.getBoundingClientRect(),s={x:i-a.left,y:o-a.top},l=Xf(this.transformMatrix.HtmlPointToCanvasPoint([s.x,s.y]),2);return{domOverlayPosition:s,canvasOverlayPosition:{x:l[0],y:l[1]}}}},{key:"isElementInArea",value:function(n,i,o){var a=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3];if(n.BaseType===vt.NODE){for(var s=Zt(n=n),l=s.minX,h=s.minY,_=s.maxX,j=s.maxY,k=[{x:l,y:h},{x:_,y:h},{x:_,y:j},{x:l,y:j}],N=!0,H=0;H<k.length;H++){var $=k[H],V=$.x,K=$.y,q=this.transformMatrix.CanvasPointToHtmlPoint([V,K]),te=Xf(q,2);if(V=te[0],K=te[1],!lu([V,K],i,o)){N=!1;break}}return N}if(n.BaseType===vt.EDGE){var ie=n=n,oe=ie.startPoint,_e=ie.endPoint,me=this.transformMatrix.CanvasPointToHtmlPoint([oe.x,oe.y]),Ee=this.transformMatrix.CanvasPointToHtmlPoint([_e.x,_e.y]),Ge=lu(me,i,o),Ke=lu(Ee,i,o);return a?Ge&&Ke:Ge||Ke}return!1}},{key:"graphDataToModel",value:function(n){var i=this;this.nodes=Yi(n.nodes,function(o){var a=i.getModel(o.type);if(!a)throw new Error("\u627E\u4E0D\u5230".concat(o.type,"\u5BF9\u5E94\u7684\u8282\u70B9\u3002"));var s=o.x,l=o.y;return s&&l&&(o.x=qi(s,i.gridSize),o.y=qi(l,i.gridSize),Object.prototype.toString.call(o.text)==="[object Object]"&&(o.text.x-=hl(s,i.gridSize),o.text.y-=hl(l,i.gridSize))),new a(o,i)}),this.edges=Yi(n.edges,function(o){var a=i.getModel(o.type);if(!a)throw new Error("\u627E\u4E0D\u5230".concat(o.type,"\u5BF9\u5E94\u7684\u8FB9\u3002"));return new a(o,i)})}},{key:"modelToGraphData",value:function(){var n=this.edges.map(function(i){return i.getData()});return{nodes:this.nodes.map(function(i){return i.getData()}),edges:n}}},{key:"modelToHistoryData",value:function(){for(var n=!1,i=[],o=0;o<this.nodes.length;o++){var a=this.nodes[o];if(a.isDragging){n=!0;break}i.push(a.getData())}if(n)return!1;for(var s=!1,l=[],h=0;h<this.edges.length;h++){var _=this.edges[h];if(_.isDragging){s=!0;break}l.push(_.getData())}return!s&&{nodes:i,edges:l}}},{key:"getEdgeModel",value:function(n){var i;return(i=this.edgesMap[n])===null||i===void 0?void 0:i.model}},{key:"getElement",value:function(n){var i=this.getNodeModel(n);return i||this.getEdgeModel(n)}},{key:"getNodeEdges",value:function(n){for(var i=[],o=0;o<this.edges.length;o++){var a=this.edges[o],s=this.edges[o].sourceNodeId===n,l=this.edges[o].targetNodeId===n;(s||l)&&i.push(a)}return i}},{key:"getSelectElements",value:function(){var n=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],i=this.selectElements,o={nodes:[],edges:[]};return i.forEach(function(a){if(a.BaseType===vt.NODE&&o.nodes.push(a.getData()),a.BaseType===vt.EDGE){var s=a.getData(),l=i.get(s.sourceNodeId)&&i.get(s.targetNodeId);(n||l)&&o.edges.push(s)}}),o}},{key:"updateAttributes",value:function(n,i){this.getElement(n).updateAttributes(i)}},{key:"changeNodeId",value:function(n,i){return i||(i=io()),this.nodesMap[i]?!1:this.nodesMap[n]?(this.edges.forEach(function(o){o.sourceNodeId===n&&(o.sourceNodeId=i),o.targetNodeId===n&&(o.targetNodeId=i)}),this.nodesMap[n].model.id=i,i):!1}},{key:"changeEdgeId",value:function(n,i){return i||(i=io()),this.edgesMap[i]?!1:this.edgesMap[n]?(this.edges.forEach(function(o){o.id===n&&(o.id=i)}),i):!1}},{key:"setFakerNode",value:function(n){this.fakerNode=n}},{key:"removeFakerNode",value:function(){this.fakerNode=null}},{key:"setModel",value:function(n,i){return this.modelMap.set(n,i)}},{key:"updateEdgeByIndex",value:function(n,i){this.edges[n]=so(so({},this.edges[n]),i)}},{key:"toFront",value:function(n){var i,o,a,s=((i=this.nodesMap[n])===null||i===void 0?void 0:i.model)||((o=this.edgesMap[n])===null||o===void 0?void 0:o.model);s&&((a=this.topElement)===null||a===void 0||a.setZIndex(),this.topElement=s,s.setZIndex(9999))}},{key:"setElementZIndex",value:function(n,i){var o,a,s,l=((o=this.nodesMap[n])===null||o===void 0?void 0:o.model)||((a=this.edgesMap[n])===null||a===void 0?void 0:a.model);l&&(typeof i=="number"&&(s=i),i==="top"&&(s=yu()),i==="bottom"&&(s=--Em),l.setZIndex(s))}},{key:"deleteNode",value:function(n){var i=this.nodesMap[n].model.getData();this.removeEdgeBySource(n),this.removeEdgeByTarget(n),this.nodes.splice(this.nodesMap[n].index,1),this.eventCenter.emit(Ne.NODE_DELETE,{data:i})}},{key:"addNode",value:function(n){var i=ir(n);i.id&&this.nodesMap[n.id]&&delete i.id;var o=this.getModel(i.type);if(!o)throw new Error("\u627E\u4E0D\u5230".concat(i.type,"\u5BF9\u5E94\u7684\u8282\u70B9\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u5DF2\u6CE8\u518C\u6B64\u7C7B\u578B\u8282\u70B9\u3002"));var a=new o(i,this);this.nodes.push(a);var s=a.getData();return this.eventCenter.emit(Ne.NODE_ADD,{data:s}),a}},{key:"cloneNode",value:function(n){var i=this.getNodeModel(n),o=i.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),i.setSelected(!1),a.getData()}},{key:"moveNode",value:function(n,i,o){var a=arguments.length>3&&arguments[3]!==void 0&&arguments[3],s=this.nodesMap[n];if(s){var l=s.model;l.move(i,o,a),this.moveEdge(n,i,o)}}},{key:"moveNode2Coordinate",value:function(n,i,o){var a=this.nodesMap[n];if(a){var s=a.model,l=i-s.x,h=o-s.y;this.moveNode(n,l,h)}}},{key:"setTextEditable",value:function(n){this.setElementStateById(n,$e.TEXT_EDIT)}},{key:"createEdge",value:function(n){var i=ir(n),o=i.type;o||(o=this.edgeType),i.id&&this.edgesMap[i.id]&&delete i.id;var a=this.getModel(o);if(!a)throw new Error("\u627E\u4E0D\u5230".concat(o,"\u5BF9\u5E94\u7684\u8FDE\u7EBF\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u5DF2\u6CE8\u518C\u6B64\u7C7B\u578B\u8FDE\u7EBF\u3002"));var s=new a(so(so({},i),{},{type:o}),this),l=s.getData();return this.edges.push(s),this.eventCenter.emit(Ne.EDGE_ADD,{data:l}),s}},{key:"moveEdge",value:function(n,i,o){for(var a=0;a<this.edges.length;a++){var s,l=this.edges[a],h=l.textPosition,_=h.x,j=h.y,k=this.edges[a].sourceNodeId===n,N=this.edges[a].targetNodeId===n;if(k&&l.updateStartPoint({x:l.startPoint.x+i,y:l.startPoint.y+o}),N&&l.updateEndPoint({x:l.endPoint.x+i,y:l.endPoint.y+o}),k||N)if(l.customTextPosition===!0)l.resetTextPosition();else if(l.modelType===Ie.POLYLINE_EDGE&&(s=l.text)!==null&&s!==void 0&&s.value){var H=l.text,$=_f(H,l.points);l.moveText($.x-H.x,$.y-H.y)}else{var V=l.textPosition,K=V.x,q=V.y;l.moveText(K-_,q-j)}}}},{key:"removeEdge",value:function(n,i){for(var o=0;o<this.edges.length;o++)if(this.edges[o].sourceNodeId===n&&this.edges[o].targetNodeId===i){var a=this.edges[o].getData();this.edges.splice(o,1),o--,this.eventCenter.emit(Ne.EDGE_DELETE,{data:a})}}},{key:"removeEdgeById",value:function(n){var i=this.edgesMap[n].index;if(this.edgesMap[n]){var o=this.edgesMap[n].model.getData();this.edges.splice(i,1),this.eventCenter.emit(Ne.EDGE_DELETE,{data:o})}}},{key:"removeEdgeBySource",value:function(n){for(var i=0;i<this.edges.length;i++)if(this.edges[i].sourceNodeId===n){var o=this.edges[i].getData();this.edges.splice(i,1),i--,this.eventCenter.emit(Ne.EDGE_DELETE,{data:o})}}},{key:"removeEdgeByTarget",value:function(n){for(var i=0;i<this.edges.length;i++)if(this.edges[i].targetNodeId===n){var o=this.edges[i].getData();this.edges.splice(i,1),i--,this.eventCenter.emit(Ne.EDGE_DELETE,{data:o})}}},{key:"setElementState",value:function(n,i){this.state=n,this.additionStateData=i}},{key:"setElementStateById",value:function(n,i,o){this.resetElementState(),this.nodes.forEach(function(a){a.id===n?a.setElementState(i,o):a.setElementState($e.DEFAULT)}),this.edges.forEach(function(a){a.id===n?a.setElementState(i,o):a.setElementState($e.DEFAULT)})}},{key:"setElementTextById",value:function(n,i){this.nodes.forEach(function(o){o.id===n&&o.updateText(i)}),this.edges.forEach(function(o){o.id===n&&o.updateText(i)})}},{key:"resetElementState",value:function(){}},{key:"selectNodeById",value:function(n){var i,o,a,s=arguments.length>1&&arguments[1]!==void 0&&arguments[1];s||((a=this.selectElement)===null||a===void 0||a.setSelected(!1),this.clearSelectElements()),this.selectElement=(i=this.nodesMap[n])===null||i===void 0?void 0:i.model,(o=this.selectElement)===null||o===void 0||o.setSelected(!0)}},{key:"selectEdgeById",value:function(n){var i,o,a,s=arguments.length>1&&arguments[1]!==void 0&&arguments[1];s||((a=this.selectElement)===null||a===void 0||a.setSelected(!1),this.clearSelectElements()),this.selectElement=(i=this.edgesMap[n])===null||i===void 0?void 0:i.model,(o=this.selectElement)===null||o===void 0||o.setSelected(!0)}},{key:"selectElementById",value:function(n){var i,o,a=arguments.length>1&&arguments[1]!==void 0&&arguments[1];a||((o=this.selectElement)===null||o===void 0||o.setSelected(!1),this.clearSelectElements()),this.selectElement=this.getElement(n),(i=this.selectElement)===null||i===void 0||i.setSelected(!0)}},{key:"clearSelectElements",value:function(){var n;this.selectElements.forEach(function(i){i==null||i.setSelected(!1)}),this.selectElements.clear(),this.overlapMode!==kr.DEFAULT&&((n=this.topElement)===null||n===void 0||n.setZIndex())}},{key:"moveElements",value:function(n,i,o){var a=this;n.nodes.forEach(function(s){return a.moveNode(s.id,i,o)})}},{key:"moveNodes",value:function(n,i,o){var a=this,s=arguments.length>3&&arguments[3]!==void 0&&arguments[3];n.forEach(function(l){return a.moveNode(l,i,o,s)})}},{key:"addNodeMoveRules",value:function(n){this.nodeMoveRules.includes(n)||this.nodeMoveRules.push(n)}},{key:"changeEdgeType",value:function(n){this.edgeType=n}},{key:"changeNodeType",value:function(n,i){var o=this.getNodeModel(n);if(o){var a=o.getData();a.type=i;var s=this.getModel(i);if(!s)throw new Error("\u627E\u4E0D\u5230".concat(i,"\u5BF9\u5E94\u7684\u8282\u70B9\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u5DF2\u6CE8\u518C\u6B64\u7C7B\u578B\u8282\u70B9\u3002"));var l=new s(a,this);this.nodes.splice(this.nodesMap[n].index,1,l),this.getNodeEdges(n).forEach(function(h){if(h.sourceNodeId===n){var _=Vl(l,h.startPoint,l.width,l.height);h.updateStartPoint(_)}if(h.targetNodeId===n){var j=Vl(l,h.endPoint,l.width,l.height);h.updateEndPoint(j)}})}}},{key:"setTheme",value:function(n){this.theme=pl(so(so({},this.theme),n))}},{key:"clearData",value:function(){this.nodes=[],this.edges=[]}}])&&Hm(e.prototype,r),t}()).prototype,"edgeType",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),xf=Se(re.prototype,"nodes",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Ef=Se(re.prototype,"activeElement",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Sf=Se(re.prototype,"activeElementState",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),jf=Se(re.prototype,"state",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Pf=Se(re.prototype,"additionStateData",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),kf=Se(re.prototype,"edges",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Af=Se(re.prototype,"isSlient",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Df=Se(re.prototype,"overlapMode",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Tf=Se(re.prototype,"plugins",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Mf=Se(re.prototype,"tools",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Nf=Se(re.prototype,"background",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Cf=Se(re.prototype,"transformMatrix",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Rf=Se(re.prototype,"editConfig",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),If=Se(re.prototype,"gridSize",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Lf=Se(re.prototype,"partial",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),zf=Se(re.prototype,"fakerNode",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Se(re.prototype,"nodesMap",[O.k],Object.getOwnPropertyDescriptor(re.prototype,"nodesMap"),re.prototype),Se(re.prototype,"edgesMap",[O.k],Object.getOwnPropertyDescriptor(re.prototype,"edgesMap"),re.prototype),Se(re.prototype,"sortElements",[O.k],Object.getOwnPropertyDescriptor(re.prototype,"sortElements"),re.prototype),Se(re.prototype,"textEditElement",[O.k],Object.getOwnPropertyDescriptor(re.prototype,"textEditElement"),re.prototype),Se(re.prototype,"selectElements",[O.k],Object.getOwnPropertyDescriptor(re.prototype,"selectElements"),re.prototype),Se(re.prototype,"setFakerNode",[O.i],Object.getOwnPropertyDescriptor(re.prototype,"setFakerNode"),re.prototype),Se(re.prototype,"removeFakerNode",[O.i],Object.getOwnPropertyDescriptor(re.prototype,"removeFakerNode"),re.prototype),Se(re.prototype,"setModel",[O.i],Object.getOwnPropertyDescriptor(re.prototype,"setModel"),re.prototype),Se(re.prototype,"updateEdgeByIndex",[O.i],Object.getOwnPropertyDescriptor(re.prototype,"updateEdgeByIndex"),re.prototype),Se(re.prototype,"toFront",[O.i],Object.getOwnPropertyDescriptor(re.prototype,"toFront"),re.prototype),Se(re.prototype,"setElementZIndex",[O.i],Object.getOwnPropertyDescriptor(re.prototype,"setElementZIndex"),re.prototype),Se(re.prototype,"deleteNode",[O.i],Object.getOwnPropertyDescriptor(re.prototype,"deleteNode"),re.prototype),Se(re.prototype,"addNode",[O.i],Object.getOwnPropertyDescriptor(re.prototype,"addNode"),re.prototype),Se(re.prototype,"cloneNode",[O.i],Object.getOwnPropertyDescriptor(re.prototype,"cloneNode"),re.prototype),Se(re.prototype,"moveNode",[O.i],Object.getOwnPropertyDescriptor(re.prototype,"moveNode"),re.prototype),Se(re.prototype,"moveNode2Coordinate",[O.i],Object.getOwnPropertyDescriptor(re.prototype,"moveNode2Coordinate"),re.prototype),Se(re.prototype,"setTextEditable",[O.i],Object.getOwnPropertyDescriptor(re.prototype,"setTextEditable"),re.prototype),Se(re.prototype,"createEdge",[O.i],Object.getOwnPropertyDescriptor(re.prototype,"createEdge"),re.prototype),Se(re.prototype,"moveEdge",[O.i],Object.getOwnPropertyDescriptor(re.prototype,"moveEdge"),re.prototype),Se(re.prototype,"removeEdge",[O.i],Object.getOwnPropertyDescriptor(re.prototype,"removeEdge"),re.prototype),Se(re.prototype,"removeEdgeById",[O.i],Object.getOwnPropertyDescriptor(re.prototype,"removeEdgeById"),re.prototype),Se(re.prototype,"removeEdgeBySource",[O.i],Object.getOwnPropertyDescriptor(re.prototype,"removeEdgeBySource"),re.prototype),Se(re.prototype,"removeEdgeByTarget",[O.i],Object.getOwnPropertyDescriptor(re.prototype,"removeEdgeByTarget"),re.prototype),Se(re.prototype,"setElementState",[O.i],Object.getOwnPropertyDescriptor(re.prototype,"setElementState"),re.prototype),Se(re.prototype,"setElementStateById",[O.i],Object.getOwnPropertyDescriptor(re.prototype,"setElementStateById"),re.prototype),Se(re.prototype,"setElementTextById",[O.i],Object.getOwnPropertyDescriptor(re.prototype,"setElementTextById"),re.prototype),Se(re.prototype,"resetElementState",[O.i],Object.getOwnPropertyDescriptor(re.prototype,"resetElementState"),re.prototype),Se(re.prototype,"selectNodeById",[O.i],Object.getOwnPropertyDescriptor(re.prototype,"selectNodeById"),re.prototype),Se(re.prototype,"selectEdgeById",[O.i],Object.getOwnPropertyDescriptor(re.prototype,"selectEdgeById"),re.prototype),Se(re.prototype,"selectElementById",[O.i],Object.getOwnPropertyDescriptor(re.prototype,"selectElementById"),re.prototype),Se(re.prototype,"clearSelectElements",[O.i],Object.getOwnPropertyDescriptor(re.prototype,"clearSelectElements"),re.prototype),Se(re.prototype,"moveElements",[O.i],Object.getOwnPropertyDescriptor(re.prototype,"moveElements"),re.prototype),Se(re.prototype,"moveNodes",[O.i],Object.getOwnPropertyDescriptor(re.prototype,"moveNodes"),re.prototype),Se(re.prototype,"changeEdgeType",[O.i],Object.getOwnPropertyDescriptor(re.prototype,"changeEdgeType"),re.prototype),Se(re.prototype,"changeNodeType",[O.i],Object.getOwnPropertyDescriptor(re.prototype,"changeNodeType"),re.prototype),Se(re.prototype,"setTheme",[O.i],Object.getOwnPropertyDescriptor(re.prototype,"setTheme"),re.prototype),Se(re.prototype,"clearData",[O.i],Object.getOwnPropertyDescriptor(re.prototype,"clearData"),re.prototype),re),Um=Uf;function Gf(t){return(Gf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function Wf(){return(Wf=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function Gm(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Yf(t,e){return(Yf=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r})(t,e)}function Wm(t){var e=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(r){return!1}}();return function(){var r,n=Pu(t);if(e){var i=Pu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ym(this,r)}}function Ym(t,e){if(e&&(Gf(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function Pu(t){return(Pu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}var Vf,Vm=_r(Hf=function(t){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&Yf(o,a)})(i,t);var e,r,n=Wm(i);function i(o){var a;(function(h,_){if(!(h instanceof _))throw new TypeError("Cannot call a class as a function")})(this,i),(a=n.call(this)).stepDrag=void 0,a.stepScrollX=0,a.stepScrollY=0,a.onDraging=function(h){var _=h.deltaX,j=h.deltaY;a.setState({isDraging:!0});var k=a.props.graphModel,N=k.transformMatrix;k.editConfig.stopMoveGraph||N.translate(_,j)},a.onDragEnd=function(){a.setState({isDraging:!1})},a.zoomHandler=function(h){var _=a.props,j=_.graphModel,k=j.editConfig,N=j.transformMatrix,H=j.gridSize,$=_.graphModel,V=h.deltaX,K=h.deltaY;if(k.stopScrollGraph||h.ctrlKey===!0){if(!k.stopZoomGraph){h.preventDefault();var q=$.getPointByClient({x:h.clientX,y:h.clientY}).canvasOverlayPosition,te=q.x,ie=q.y;N.zoom(h.deltaY<0,[te,ie])}}else{if(h.preventDefault(),a.stepScrollX+=V,a.stepScrollY+=K,Math.abs(a.stepScrollX)>=H){var oe=a.stepScrollX%H,_e=a.stepScrollX-oe;N.translate(-_e*N.SCALE_X,0),a.stepScrollX=oe}if(Math.abs(a.stepScrollY)>=H){var me=a.stepScrollY%H,Ee=a.stepScrollY-me;N.translate(0,-Ee*N.SCALE_Y),a.stepScrollY=me}}},a.clickHandler=function(h){if(h.target.getAttribute("name")==="canvas-overlay"){var _=a.props,j=_.graphModel,k=_.eventCenter,N=j.textEditElement;j.selectElements.size>0&&j.clearSelectElements(),N&&N.setElementState($e.DEFAULT),k.emit(Ne.BLANK_CLICK,{e:h})}},a.handleContextMenu=function(h){if(h.target.getAttribute("name")==="canvas-overlay"){h.preventDefault();var _=a.props,j=_.graphModel,k=_.eventCenter,N=j.getPointByClient({x:h.clientX,y:h.clientY});j.setElementState($e.SHOW_MENU,N.domOverlayPosition),k.emit(Ne.BLANK_CONTEXTMENU,{e:h,position:N})}},a.mouseDownHandler=function(h){var _=a.props,j=_.eventCenter,k=_.graphModel,N=k.editConfig,H=k.transformMatrix.SCALE_X,$=k.gridSize;N.stopMoveGraph?j.emit(Ne.BLANK_MOUSEDOWN,{e:h}):(a.stepDrag.setStep($*H),a.stepDrag.handleMouseDown(h)),a.clickHandler(h)};var s=o.graphModel.gridSize,l=o.eventCenter;return a.stepDrag=new Uo({onDraging:a.onDraging,onDragEnd:a.onDragEnd,step:s,eventType:"BLANK",eventCenter:l,model:null}),a.state={isDraging:!1},a}return e=i,(r=[{key:"render",value:function(){var o=this.props.graphModel.transformMatrix.getTransformStyle().transform,a=this.props,s=a.children,l=a.dnd,h=this.state.isDraging;return I("svg",Wf({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",name:"canvas-overlay",onWheel:this.zoomHandler,onMouseDown:this.mouseDownHandler,onContextMenu:this.handleContextMenu,className:h?"lf-dragging":"lf-drag-able"},l.eventMap()),I("g",{transform:o},s))}}])&&Gm(e.prototype,r),i}(C))||Hf;function $f(t){return($f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function $m(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Km(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Kf(t,e){return(Kf=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r})(t,e)}function qm(t){var e=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(r){return!1}}();return function(){var r,n=ku(t);if(e){var i=ku(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Zm(this,r)}}function Zm(t,e){if(e&&($f(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function ku(t){return(ku=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}var Jm=_r(Vf=function(t){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&Kf(o,a)})(i,t);var e,r,n=qm(i);function i(){var o;$m(this,i);for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return(o=n.call.apply(n,[this].concat(s))).setToolOverlayRef=function(h){var _=o.props.tool.getInstance();_.components.forEach(function(j){return j(_,h)}),_.components=[]},o}return e=i,(r=[{key:"getTools",value:function(){var o=this.props,a=o.tool,s=o.graphModel,l=a.getTools().map(function(h){return I(h,{graphModel:s,logicFlow:a.instance})});return a.components=l,l}},{key:"render",value:function(){return I("div",{className:"lf-tool-overlay",ref:this.setToolOverlayRef},this.getTools())}}])&&Km(e.prototype,r),i}(C))||Vf;u(178);function qf(t){return(qf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function Qm(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e0(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Zf(t,e){return(Zf=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r})(t,e)}function t0(t){var e=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(r){return!1}}();return function(){var r,n=Au(t);if(e){var i=Au(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return r0(this,r)}}function r0(t,e){if(e&&(qf(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function Au(t){return(Au=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}var Jf,n0=function(t){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&Zf(o,a)})(i,t);var e,r,n=t0(i);function i(){return Qm(this,i),n.apply(this,arguments)}return e=i,(r=[{key:"getAttributes",value:function(){var o=this.props.background,a=o.image,s=a===void 0?"":a,l=o.color,h=l===void 0?"":l,_=o.repeat,j=_===void 0?"no-repeat":_,k=o.position,N=k===void 0?"center":k,H=o.size,$=H===void 0?"auto auto":H,V=o.opacity,K=V===void 0?1:V;return h?{color:h,opacity:K,image:"none"}:s?{image:"url(".concat(s,")"),repeat:j,position:N,size:$,opacity:K}:{}}},{key:"getShape",value:function(){var o=this.getAttributes(),a=o.image,s=o.color,l=o.repeat,h=o.size;return I("div",{className:"lf-background"},I("div",{style:{backgroundImage:a,backgroundColor:s,backgroundRepeat:l,backgroundPosition:o.position,backgroundSize:h,opacity:o.opacity},className:"lf-background-area"}))}},{key:"render",value:function(){return this.getShape()}}])&&e0(e.prototype,r),i}(C);function Qf(t){return(Qf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function o0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i0(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ep(t,e){return(ep=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r})(t,e)}function a0(t){var e=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(r){return!1}}();return function(){var r,n=Du(t);if(e){var i=Du(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return u0(this,r)}}function u0(t,e){if(e&&(Qf(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function Du(t){return(Du=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}var tp=_r(Jf=function(t){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&ep(o,a)})(i,t);var e,r,n=a0(i);function i(){var o;o0(this,i);for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return(o=n.call.apply(n,[this].concat(s))).id=io(),o}return e=i,(r=[{key:"renderDot",value:function(){var o=this.props,a=o.config,s=a.color,l=a.thickness,h=l===void 0?2:l,_=o.size,j=o.visible,k=Math.min(Math.max(2,h),_/2),N=1;return j||(N=0),I("rect",{width:k,height:k,rx:k/2,ry:k/2,fill:s,opacity:N})}},{key:"renderMesh",value:function(){var o=this.props,a=o.config,s=a.color,l=a.thickness,h=l===void 0?1:l,_=o.size,j=o.visible,k=Math.min(Math.max(1,h),_/2),N=1;return j||(N=0),I("path",{d:"M ".concat(_," 0 H0 M0 0 V0 ").concat(_),stroke:s,strokeWidth:k,opacity:N})}},{key:"render",value:function(){var o=this.props,a=o.type,s=o.size,l=o.graphModel.transformMatrix,h=[l.SCALE_X,l.SKEW_Y,l.SKEW_X,l.SCALE_Y,l.TRANSLATE_X,l.TRANSLATE_Y].join(","),_="matrix(".concat(h,")");return I("div",{className:"lf-grid"},I("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%"},I("defs",null,I("pattern",{id:this.id,patternUnits:"userSpaceOnUse",patternTransform:_,x:"0",y:"0",width:s,height:s,style:{transition:"all 0.1s ease"}},a==="dot"&&this.renderDot(),a==="mesh"&&this.renderMesh())),I("rect",{width:"100%",height:"100%",fill:"url(#".concat(this.id,")")})))}}])&&i0(e.prototype,r),i}(C))||Jf;tp.defaultProps={size:20,visible:!0,type:"dot",config:{color:"#ababab",thickness:1}},u(44);function rp(t){return(rp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function s0(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var i=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var o,a,s=[],l=!0,h=!1;try{for(i=i.call(r);!(l=(o=i.next()).done)&&(s.push(o.value),!n||s.length!==n);l=!0);}catch(_){h=!0,a=_}finally{try{l||i.return==null||i.return()}finally{if(h)throw a}}return s}}(t,e)||function(r,n){if(r){if(typeof r=="string")return np(r,n);var i=Object.prototype.toString.call(r).slice(8,-1);if(i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set")return Array.from(r);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return np(r,n)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function np(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var op,co=function(t){var e={x1:10,y1:10,x2:20,y2:20,stroke:"black"};return Object.entries(t).forEach(function(r){var n=s0(r,2),i=n[0],o=n[1];rp(o)!=="object"&&(e[i]=o)}),I("line",e)};function ip(t){return(ip=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function c0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l0(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ap(t,e){return(ap=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r})(t,e)}function f0(t){var e=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(r){return!1}}();return function(){var r,n=Tu(t);if(e){var i=Tu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return p0(this,r)}}function p0(t,e){if(e&&(ip(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function Tu(t){return(Tu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}var up,h0=_r(op=function(t){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&ap(o,a)})(i,t);var e,r,n=f0(i);function i(){return c0(this,i),n.apply(this,arguments)}return e=i,(r=[{key:"render",value:function(){var o=this.props.snaplineModel,a=o.position,s=o.isShowHorizontal,l=o.isShowVertical,h=o.stroke,_=o.strokeWidth,j=a.x,k=j===void 0?0:j,N=a.y,H=N===void 0?0:N,$={x1:k,y1:-1e5,x2:k,y2:1e5,stroke:l?h:"none",strokeWidth:_};return I("g",{className:"lf-snapline"},I(co,{x1:-1e5,y1:H,x2:1e5,y2:H,stroke:s?h:"none",strokeWidth:_}),I(co,$))}}])&&l0(e.prototype,r),i}(C))||op;function sp(t){return(sp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function d0(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var i=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var o,a,s=[],l=!0,h=!1;try{for(i=i.call(r);!(l=(o=i.next()).done)&&(s.push(o.value),!n||s.length!==n);l=!0);}catch(_){h=!0,a=_}finally{try{l||i.return==null||i.return()}finally{if(h)throw a}}return s}}(t,e)||function(r,n){if(r){if(typeof r=="string")return cp(r,n);var i=Object.prototype.toString.call(r).slice(8,-1);if(i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set")return Array.from(r);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return cp(r,n)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function cp(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function fn(t){var e=t.x,r=t.y,n=t.width,i=t.height,o=t.radius,a=t.className,s=e-n/2,l=r-i/2,h={width:10,height:10,cx:0,cy:0,rx:o||0,ry:o||0,fill:"transparent",fillOpacity:1,strokeWidth:"1px",stroke:"#000",strokeOpacity:1,className:"lf-basic-shape ".concat(a),x:0,y:0};return Object.entries(t).forEach(function(_){var j=d0(_,2),k=j[0],N=j[1];sp(N)!=="object"&&(h[k]=N)}),h.x=s,h.y=l,I("rect",h)}function lp(t){return(lp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function y0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function v0(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function fp(t,e){return(fp=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r})(t,e)}function g0(t){var e=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(r){return!1}}();return function(){var r,n=Mu(t);if(e){var i=Mu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return b0(this,r)}}function b0(t,e){if(e&&(lp(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function Mu(t){return(Mu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}fn.defaultProps={radius:0,stroke:"",strokeDasharray:"",className:""};var pp,m0=_r(up=function(t){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&fp(o,a)})(i,t);var e,r,n=g0(i);function i(){return y0(this,i),n.apply(this,arguments)}return e=i,(r=[{key:"getNodeOutline",value:function(){var o=this.props.graphModel,a=o.selectElements,s=o.editConfig,l=s.hoverOutline,h=s.nodeSelectedOutline,_=[];return a.forEach(function(j){if(j.BaseType===vt.NODE){var k=j.isHovered,N=j.isSelected,H=j.x,$=j.y,V=j.width,K=j.height,q=j.hideOutline,te=j.outlineColor,ie=j.hoverOutlineColor,oe=j.outlineStrokeDashArray,_e=j.hoverOutlineStrokeDashArray;if(!q&&(h||l&&k)){var me=N?te:ie,Ee=N?oe:_e;_.push(I(fn,{className:"lf-outline-node",x:H,y:$,width:V+10,height:K+10,radius:0,fill:"none",stroke:me,strokeDasharray:Ee}))}}}),_}},{key:"getEdgeOutline",value:function(){for(var o=this.props.graphModel,a=o.edges,s=o.editConfig.edgeSelectedOutline,l=[],h=0;h<a.length;h++){var _=a[h];!_.hideOutline&&_.isSelected&&s&&(_.modelType===Ie.LINE_EDGE?l.push(this.getLineOutline(_)):_.modelType===Ie.POLYLINE_EDGE?l.push(this.getPolylineOutline(_)):_.modelType===Ie.BEZIER_EDGE&&l.push(this.getBezierOutline(_)))}return l}},{key:"getLineOutline",value:function(o){var a=o.startPoint,s=o.endPoint,l=(a.x+s.x)/2,h=(a.y+s.y)/2,_=Math.abs(a.x-s.x)+10,j=Math.abs(a.y-s.y)+10,k=this.props.graphModel.theme.line;return I(fn,{className:"lf-outline-edge",x:l,y:h,width:_,height:j,radius:0,fill:"none",stroke:k.outlineColor,strokeDasharray:k.outlineStrokeDashArray})}},{key:"getPolylineOutline",value:function(o){var a=o.points,s=ao(a),l=Xo(s,8),h=l.x,_=l.y,j=l.width,k=l.height,N=this.props.graphModel.theme.polyline;return I(fn,{className:"lf-outline",x:h,y:_,width:j,height:k,radius:0,fill:"none",stroke:N.outlineColor,strokeDasharray:N.outlineStrokeDashArray})}},{key:"getBezierOutline",value:function(o){var a=o.path,s=ia(a),l=Xo(s,8),h=l.x,_=l.y,j=l.width,k=l.height,N=this.props.graphModel.theme.bezier;return I(fn,{className:"lf-outline",x:h,y:_,width:j,height:k,radius:0,fill:"none",stroke:N.outlineColor,strokeDasharray:N.outlineStrokeDashArray})}},{key:"render",value:function(){return I("g",{className:"lf-outline"},this.getNodeOutline(),this.getEdgeOutline())}}])&&v0(e.prototype,r),i}(C))||up;function hp(t){return(hp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function _0(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var i=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var o,a,s=[],l=!0,h=!1;try{for(i=i.call(r);!(l=(o=i.next()).done)&&(s.push(o.value),!n||s.length!==n);l=!0);}catch(_){h=!0,a=_}finally{try{l||i.return==null||i.return()}finally{if(h)throw a}}return s}}(t,e)||function(r,n){if(r){if(typeof r=="string")return dp(r,n);var i=Object.prototype.toString.call(r).slice(8,-1);if(i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set")return Array.from(r);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return dp(r,n)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function dp(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Go(t){var e=t.x,r=e===void 0?0:e,n=t.y,i=n===void 0?0:n,o=t.r,a={cx:r,cy:i,r:o===void 0?4:o,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1,className:"lf-basic-shape"};return Object.entries(t).forEach(function(s){var l=_0(s,2),h=l[0],_=l[1];hp(_)!=="object"&&(a[h]=_)}),I("circle",a)}function yp(t){return(yp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function vp(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var i=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var o,a,s=[],l=!0,h=!1;try{for(i=i.call(r);!(l=(o=i.next()).done)&&(s.push(o.value),!n||s.length!==n);l=!0);}catch(_){h=!0,a=_}finally{try{l||i.return==null||i.return()}finally{if(h)throw a}}return s}}(t,e)||function(r,n){if(r){if(typeof r=="string")return gp(r,n);var i=Object.prototype.toString.call(r).slice(8,-1);if(i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set")return Array.from(r);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return gp(r,n)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function gp(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function bp(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function mp(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function _p(t,e,r){return e&&mp(t.prototype,e),r&&mp(t,r),t}function Op(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&wp(t,e)}function wp(t,e){return(wp=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r})(t,e)}function xp(t){var e=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(r){return!1}}();return function(){var r,n=Nu(t);if(e){var i=Nu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return O0(this,r)}}function O0(t,e){if(e&&(yp(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function Nu(t){return(Nu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}var Ep,Sp=function(t){Op(r,t);var e=xp(r);function r(n){var i;bp(this,r),(i=e.call(this)).dragHandler=void 0,i.onDraging=function(a){var s=a.deltaX,l=a.deltaY,h=i.props,_=h.graphModel,j=h.bezierModel,k=h.type;j.isDragging=!0;var N=_.transformMatrix,H=i.state,$=H.endX,V=H.endY,K=vp(N.moveCanvasPointByHtml([$,V],s,l),2),q=K[0],te=K[1];i.setState({endX:q,endY:te}),j.updateAdjustAnchor({x:q,y:te},k)},i.onDragEnd=function(){var a=i.state,s=a.endX,l=a.endY,h=i.props,_=h.bezierModel,j=h.type;_.updateAdjustAnchor({x:s,y:l},j),_.isDragging=!1},i.dragHandler=Ho({onDraging:i.onDraging,onDragEnd:i.onDragEnd});var o=n.position;return i.state={endX:o.x,endY:o.y},i}return _p(r,[{key:"render",value:function(){var n,i,o,a=this.props.position,s=a.x,l=a.y,h=(n=this.props)===null||n===void 0||(i=n.graphModel)===null||i===void 0||(o=i.theme)===null||o===void 0?void 0:o.bezier;return I(Go,{className:"lf-bezier-adjust-anchor",x:s,y:l,r:4,stroke:h.adjustAnchorStroke,fill:h.adjustAnchorFill,fillOpacity:h.adjustAnchorFillOpacity,onMouseDown:this.dragHandler})}}]),r}(C),w0=_r(pp=function(t){Op(r,t);var e=xp(r);function r(){return bp(this,r),e.apply(this,arguments)}return _p(r,[{key:"getBezierAdjust",value:function(n,i){var o=n.path,a=n.id,s=vp(ia(o),4),l=s[0],h=s[1],_=s[2],j=s[3],k=i.theme.bezier.adjustLineColor,N=[];return N.push(I(co,{x1:l.x,y1:l.y,x2:h.x,y2:h.y,stroke:k})),N.push(I(Sp,{position:h,bezierModel:n,graphModel:i,key:"".concat(a,"_ePre"),type:"sNext"})),N.push(I(co,{x1:j.x,y1:j.y,x2:_.x,y2:_.y,stroke:k})),N.push(I(Sp,{position:_,bezierModel:n,graphModel:i,key:"".concat(a,"_sNext"),type:"ePre"})),N}},{key:"selectedBezierEdge",value:function(){for(var n=this.props.graphModel,i=n.edges,o=[],a=0;a<i.length;a++){var s=i[a];s.isSelected&&s.modelType===Ie.BEZIER_EDGE&&s.draggable&&o.push(this.getBezierAdjust(s,n))}return o}},{key:"render",value:function(){return I("g",{className:"lf-bezier-adjust"},this.selectedBezierEdge())}}]),r}(C))||pp;function jp(t){return(jp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function x0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function E0(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Pp(t,e){return(Pp=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r})(t,e)}function S0(t){var e=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(r){return!1}}();return function(){var r,n=Cu(t);if(e){var i=Cu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return j0(this,r)}}function j0(t,e){if(e&&(jp(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function Cu(t){return(Cu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}var kp,P0=_r(Ep=function(t){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&Pp(o,a)})(i,t);var e,r,n=S0(i);function i(){return x0(this,i),n.apply(this,arguments)}return e=i,(r=[{key:"render",value:function(){return I("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",className:"modification-overlay"},I("g",{transform:this.props.graphModel.transformMatrix.getTransformStyle().transform},this.props.children))}}])&&E0(e.prototype,r),i}(C))||Ep;function Ap(t){return(Ap=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function Dp(){return(Dp=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function k0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function A0(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Tp(t,e){return(Tp=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r})(t,e)}function D0(t){var e=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(r){return!1}}();return function(){var r,n=Ru(t);if(e){var i=Ru(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return T0(this,r)}}function T0(t,e){if(e&&(Ap(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function Ru(t){return(Ru=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}var M0=_r(kp=function(t){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&Tp(o,a)})(i,t);var e,r,n=D0(i);function i(){return k0(this,i),n.apply(this,arguments)}return e=i,(r=[{key:"getComponent",value:function(o,a,s){var l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"canvas-overlay",h=this.props.getView,_=h(o.type);return I(_,{key:o.id,model:o,graphModel:a,overlay:l,eventCenter:s})}},{key:"render",value:function(){var o=this,a=this.props,s=a.graphModel,l=a.tool,h=a.options,_=a.eventCenter,j=a.dnd,k=a.snaplineModel,N={};h.width&&(N.width="".concat(h.width,"px")),h.height&&(N.height="".concat(h.height,"px"));var H=s.fakerNode,$=s.editConfig.adjustEdge;return I("div",{className:"lf-graph",style:N},I(Vm,{graphModel:s,eventCenter:_,dnd:j},I("g",{className:"lf-base"},Yi(s.sortElements,function(V){return o.getComponent(V,s,_)})),H?this.getComponent(H,s,_):""),I(P0,{graphModel:s},h.hideOutline?"":I(m0,{graphModel:s}),$?I(w0,{graphModel:s}):"",h.isSilentMode||h.snapline===!1?"":I(h0,{snaplineModel:k})),I(Jm,{graphModel:s,tool:l}),h.background&&I(n0,{background:h.background}),h.grid&&I(tp,Dp({},h.grid,{graphModel:s})))}}])&&A0(e.prototype,r),i}(C))||kp;function Mp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function ua(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Mp(Object(r),!0).forEach(function(n){N0(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Mp(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function N0(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function C0(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var R0=function(){function t(n){var i=this;(function(s,l){if(!(s instanceof l))throw new TypeError("Cannot call a class as a function")})(this,t),this.nodeConfig=void 0,this.lf=void 0,this.options=void 0,this.fakerNode=void 0,this.stopDrag=function(){i.nodeConfig=null,window.document.removeEventListener("mouseup",i.stopDrag)},this.dragEnter=function(s){i.nodeConfig&&!i.fakerNode&&(i.fakerNode=i.lf.createFakerNode(ua(ua({},i.nodeConfig),i.clientToLocalPoint({x:s.clientX,y:s.clientY}))))},this.onDragOver=function(s){if(s.preventDefault(),i.fakerNode){var l=i.clientToLocalPoint({x:s.clientX,y:s.clientY}),h=l.x,_=l.y;i.fakerNode.moveTo(h,_);var j=i.fakerNode.getData();i.lf.setNodeSnapLine(j),i.lf.eventCenter.emit(Ne.NODE_DND_DRAG,{data:j})}return!1},this.onDragLeave=function(){i.fakerNode&&(i.lf.removeNodeSnapLine(),i.lf.graphModel.removeFakerNode(),i.fakerNode=null)},this.onDrop=function(s){if(i.lf.graphModel&&s&&i.nodeConfig){var l=i.lf.addNode(ua(ua({},i.nodeConfig),i.clientToLocalPoint({x:s.clientX,y:s.clientY})));s.preventDefault(),s.stopPropagation(),i.nodeConfig=null,i.lf.removeNodeSnapLine(),i.lf.graphModel.removeFakerNode(),i.fakerNode=null;var h=l.getData();i.lf.eventCenter.emit(Ne.NODE_DND_ADD,{data:h})}};var o=n.options,a=n.lf;this.lf=a,this.options=o}var e,r;return e=t,(r=[{key:"clientToLocalPoint",value:function(n){var i=n.x,o=n.y,a=wc(this.lf.options,["grid","size"]),s=this.lf.graphModel.getPointByClient({x:i,y:o}).canvasOverlayPosition,l=s.x,h=s.y;return{x:qi(l,a),y:qi(h,a)}}},{key:"startDrag",value:function(n){this.nodeConfig=n,window.document.addEventListener("mouseup",this.stopDrag)}},{key:"eventMap",value:function(){return{onMouseEnter:this.dragEnter,onMouseOver:this.dragEnter,onMouseMove:this.onDragOver,onMouseLeave:this.onDragLeave,onMouseUp:this.onDrop}}}])&&C0(e.prototype,r),t}();function Np(t){var e=t.container,r=t.grid;if(!e)throw new Error("\u8BF7\u68C0\u67E5 container \u53C2\u6570\u662F\u5426\u6709\u6548");return r&&(t.grid=st({size:20,type:"dot",visible:!0,config:{color:"#ababab",thickness:1}},r)),st({},Rp,t)}var Ve,Cp,Rp={background:!1,grid:!1,textEdit:!0,disabledTools:[]};function Ip(t){return(Ip=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function Lp(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var i=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var o,a,s=[],l=!0,h=!1;try{for(i=i.call(r);!(l=(o=i.next()).done)&&(s.push(o.value),!n||s.length!==n);l=!0);}catch(_){h=!0,a=_}finally{try{l||i.return==null||i.return()}finally{if(h)throw a}}return s}}(t,e)||function(r,n){if(r){if(typeof r=="string")return zp(r,n);var i=Object.prototype.toString.call(r).slice(8,-1);if(i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set")return Array.from(r);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return zp(r,n)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function zp(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Bp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Xp(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Bp(Object(r),!0).forEach(function(n){I0(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Bp(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function I0(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function L0(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Fp(t,e,r){return(Fp=typeof Reflect!="undefined"&&Reflect.get?Reflect.get:function(n,i,o){var a=function(l,h){for(;!Object.prototype.hasOwnProperty.call(l,h)&&(l=Wo(l))!==null;);return l}(n,i);if(a){var s=Object.getOwnPropertyDescriptor(a,i);return s.get?s.get.call(o):s.value}})(t,e,r||t)}function Hp(t,e){return(Hp=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r})(t,e)}function z0(t){var e=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(r){return!1}}();return function(){var r,n=Wo(t);if(e){var i=Wo(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return B0(this,r)}}function B0(t,e){if(e&&(Ip(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Up(t)}function Up(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Wo(t){return(Wo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}function Dr(t,e,r,n,i){var o={};return Object.keys(n).forEach(function(a){o[a]=n[a]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce(function(a,s){return s(t,e,a)||a},o),i&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(t,e,o),o=null),o}var de,Gp,Wp,Yp,Vp,$p,Kp,qp,Zp,Jp,Qp,eh,th,rh,nh,oh,ih,ah,uh,sh,ch,lh,fh,ph,hh,dh,yh,Iu=(Cp=Dr((Ve=function(t){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&Hp(o,a)})(i,t);var e,r,n=z0(i);function i(o,a){var s;return function(l,h){if(!(l instanceof h))throw new TypeError("Cannot call a class as a function")}(this,i),(s=n.call(this,o,a,"bezier")).modelType=Ie.BEZIER_EDGE,s.offset=Xt.bezier.offset,function(l,h,_,j){_&&Object.defineProperty(l,h,{enumerable:_.enumerable,configurable:_.configurable,writable:_.writable,value:_.initializer?_.initializer.call(j):void 0})}(s,"path",Cp,Up(s)),s}return e=i,(r=[{key:"getTextPosition",value:function(){if(this.pointsList&&this.pointsList.length>0){var o=0,a=0;return this.pointsList.forEach(function(s){var l=s.x,h=s.y;o+=l,a+=h}),{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=Fp(Wo(i.prototype),"getData",this).call(this),a=this.pointsList.map(function(s){return{x:s.x,y:s.y}});return Xp(Xp({},o),{},{pointsList:a})}},{key:"getControls",value:function(){var o=this.startPoint,a=this.endPoint;return mf({start:o,end:a,sourceNode:this.sourceNode,targetNode:this.targetNode,offset:this.offset})}},{key:"getPath",value:function(o){var a=Lp(o,4),s=a[0],l=a[1],h=a[2],_=a[3];return"M ".concat(s.x," ").concat(s.y,`
|
|
C `).concat(l.x," ").concat(l.y,`,
|
|
`).concat(h.x," ").concat(h.y,`,
|
|
`).concat(_.x," ").concat(_.y)}},{key:"initPoints",value:function(){this.pointsList.length>0?this.path=this.getPath(this.pointsList):this.updatePoints()}},{key:"updatePoints",value:function(){var o={x:this.startPoint.x,y:this.startPoint.y},a={x:this.endPoint.x,y:this.endPoint.y},s=this.getControls(),l=s.sNext,h=s.ePre;this.pointsList=[o,l,h,a],this.path=this.getPath(this.pointsList)}},{key:"updatePath",value:function(){var o={x:this.startPoint.x,y:this.startPoint.y},a={x:this.endPoint.x,y:this.endPoint.y},s=Lp(this.pointsList,3),l=s[1],h=s[2];this.pointsList=[o,l,h,a],this.path=this.getPath(this.pointsList)}},{key:"updateStartPoint",value:function(o){this.startPoint=o,this.updatePath()}},{key:"updateEndPoint",value:function(o){this.endPoint=o,this.updatePath()}},{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,s=o.endPoint,l=o.sourceNode,h=o.targetNode,_=mf({start:a,end:s,sourceNode:l,targetNode:h,offset:this.offset}),j=_.sNext,k=_.ePre;this.pointsList=[a,j,k,s],this.initPoints()}}])&&L0(e.prototype,r),i}(gu)).prototype,"path",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Dr(Ve.prototype,"initPoints",[O.i],Object.getOwnPropertyDescriptor(Ve.prototype,"initPoints"),Ve.prototype),Dr(Ve.prototype,"updatePoints",[O.i],Object.getOwnPropertyDescriptor(Ve.prototype,"updatePoints"),Ve.prototype),Dr(Ve.prototype,"updatePath",[O.i],Object.getOwnPropertyDescriptor(Ve.prototype,"updatePath"),Ve.prototype),Dr(Ve.prototype,"updateStartPoint",[O.i],Object.getOwnPropertyDescriptor(Ve.prototype,"updateStartPoint"),Ve.prototype),Dr(Ve.prototype,"updateEndPoint",[O.i],Object.getOwnPropertyDescriptor(Ve.prototype,"updateEndPoint"),Ve.prototype),Dr(Ve.prototype,"updateAdjustAnchor",[O.i],Object.getOwnPropertyDescriptor(Ve.prototype,"updateAdjustAnchor"),Ve.prototype),Dr(Ve.prototype,"getAdjustStart",[O.i],Object.getOwnPropertyDescriptor(Ve.prototype,"getAdjustStart"),Ve.prototype),Dr(Ve.prototype,"getAdjustEnd",[O.i],Object.getOwnPropertyDescriptor(Ve.prototype,"getAdjustEnd"),Ve.prototype),Dr(Ve.prototype,"updateAfterAdjustStartAndEnd",[O.i],Object.getOwnPropertyDescriptor(Ve.prototype,"updateAfterAdjustStartAndEnd"),Ve.prototype),Ve);u(41);function vh(t){return(vh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function gh(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function pn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?gh(Object(r),!0).forEach(function(n){bh(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):gh(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function bh(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function mh(t,e){var r=typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(l,h){if(l){if(typeof l=="string")return _h(l,h);var _=Object.prototype.toString.call(l).slice(8,-1);if(_==="Object"&&l.constructor&&(_=l.constructor.name),_==="Map"||_==="Set")return Array.from(l);if(_==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(_))return _h(l,h)}}(t))||e&&t&&typeof t.length=="number"){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var l=r.next();return a=l.done,l},e:function(l){s=!0,o=l},f:function(){try{a||r.return==null||r.return()}finally{if(s)throw o}}}}function _h(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Je(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function X0(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Me(t,e,r,n,i){var o={};return Object.keys(n).forEach(function(a){o[a]=n[a]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce(function(a,s){return s(t,e,a)||a},o),i&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(t,e,o),o=null),o}var mr,Oh,mt=st({x:0,y:0,zIndex:1,text:{value:"",x:0,y:0,draggable:!1,editable:!0},hideOutline:!1},Xt.rect,Xt.circle),Hr=(Gp=Me((de=function(){function t(n,i,o){(function(a,s){if(!(a instanceof s))throw new TypeError("Cannot call a class as a function")})(this,t),this.id=io(),this.BaseType=vt.NODE,this.modelType=Ie.NODE,this.additionStateData=void 0,this.targetRules=[],this.sourceRules=[],this.moveRules=[],this.hasSetTargetRules=!1,this.hasSetSourceRules=!1,Je(this,"properties",Gp,this),Je(this,"type",Wp,this),Je(this,"x",Yp,this),Je(this,"y",Vp,this),Je(this,"_width",$p,this),this.graphModel=void 0,Je(this,"_height",Kp,this),Je(this,"fill",qp,this),Je(this,"fillOpacity",Zp,this),Je(this,"strokeWidth",Jp,this),Je(this,"stroke",Qp,this),Je(this,"strokeOpacity",eh,this),Je(this,"opacity",th,this),Je(this,"outlineColor",rh,this),Je(this,"hideOutline",nh,this),Je(this,"hoverOutlineColor",oh,this),Je(this,"outlineStrokeDashArray",ih,this),Je(this,"hoverOutlineStrokeDashArray",ah,this),Je(this,"isSelected",uh,this),Je(this,"isHovered",sh,this),Je(this,"isDragging",ch,this),Je(this,"isHitable",lh,this),Je(this,"zIndex",fh,this),Je(this,"anchorsOffset",ph,this),Je(this,"state",hh,this),Je(this,"text",dh,this),Je(this,"draggable",yh,this),this.graphModel=i,this.setStyleFromTheme(o,i),this.initNodeData(n),this.setAttributes()}var e,r;return e=t,(r=[{key:"width",get:function(){return this._width},set:function(n){this._width=n}},{key:"height",get:function(){return this._height},set:function(n){this._height=n}},{key:"initNodeData",value:function(n){if(n.properties||(n.properties={}),!n.id){var i=this.graphModel.idGenerator,o=i&&i(n.type);o&&(n.id=o);var a=this.createId();a&&(n.id=a)}this.formatText(n),st(this,function(s){return Pr(s,["id","type","x","y","text","properties"])}(n)),this.graphModel.overlapMode===kr.INCREASE&&(this.zIndex=n.zIndex||yu())}},{key:"createId",value:function(){return null}},{key:"formatText",value:function(n){n.text||(n.text={value:"",x:n.x,y:n.y,draggable:!1,editable:!0}),n.text&&typeof n.text=="string"?n.text={value:n.text,x:n.x,y:n.y,draggable:!1,editable:!0}:n.text&&n.text.editable===void 0&&(n.text.editable=!0)}},{key:"setAttributes",value:function(){}},{key:"getData",value:function(){var n=this.text,i=n.x,o=n.y,a=n.value,s=this.properties;Object(O.v)(s)&&(s=Object(O.G)(s));var l={id:this.id,type:this.type,x:this.x,y:this.y,properties:s};return this.graphModel.overlapMode===kr.INCREASE&&(l.zIndex=this.zIndex),a&&(l.text={x:i,y:o,value:a}),l}},{key:"getProperties",value:function(){return Object(O.G)(this.properties)}},{key:"isAllowConnectedAsSource",value:function(n,i,o){var a=this.hasSetSourceRules?this.sourceRules:this.getConnectedSourceRules();this.hasSetSourceRules=!0;for(var s,l=!0,h=0;h<a.length;h++){var _=a[h];if(!_.validate.call(this,this,n,i,o)){l=!1,s=_.message;break}}return{isAllPass:l,msg:s}}},{key:"getConnectedSourceRules",value:function(){return this.sourceRules}},{key:"isAllowConnectedAsTarget",value:function(n,i,o){var a=this.hasSetTargetRules?this.targetRules:this.getConnectedTargetRules();this.hasSetTargetRules=!0;for(var s,l=!0,h=0;h<a.length;h++){var _=a[h];if(!_.validate.call(this,n,this,i,o)){l=!1,s=_.message;break}}return{isAllPass:l,msg:s}}},{key:"isAllowMoveNode",value:function(n,i){var o,a=mh(this.moveRules);try{for(a.s();!(o=a.n()).done;)if(!(0,o.value)(this,n,i))return!1}catch(h){a.e(h)}finally{a.f()}var s,l=mh(this.graphModel.nodeMoveRules);try{for(l.s();!(s=l.n()).done;)if(!(0,s.value)(this,n,i))return!1}catch(h){l.e(h)}finally{l.f()}return!0}},{key:"getConnectedTargetRules",value:function(){return this.targetRules}},{key:"getAnchorsByOffset",value:function(){var n=this.anchorsOffset,i=this.x,o=this.y,a=this.id;return n.map(function(s,l){return s.length?{id:"".concat(a,"_").concat(l),x:i+s[0],y:o+s[1]}:pn(pn({},s),{},{x:i+s.x,y:o+s.y,id:s.id||"".concat(a,"_").concat(l)})})}},{key:"getBounds",value:function(){return{x1:this.x-this.width/2,y1:this.y-this.height/2,x2:this.x+this.width/2,y2:this.y+this.height/2}}},{key:"anchors",get:function(){var n=this.anchorsOffset;return n&&n.length>0?this.getAnchorsByOffset():[]}},{key:"addNodeMoveRules",value:function(n){this.moveRules.includes(n)||this.moveRules.push(n)}},{key:"move",value:function(n,i){var o=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(o||this.isAllowMoveNode(n,i)){var a=this.x+n,s=this.y+i;this.x=a,this.y=s,this.text&&this.moveText(n,i)}}},{key:"moveTo",value:function(n,i){var o=arguments.length>2&&arguments[2]!==void 0&&arguments[2],a=n-this.x,s=i-this.y;(o||this.isAllowMoveNode(a,s))&&(this.text&&this.text&&this.moveText(a,s),this.x=n,this.y=i)}},{key:"moveText",value:function(n,i){var o=this.text,a=o.x,s=o.y,l=o.value,h=o.draggable,_=o.editable;this.text={value:l,editable:_,draggable:h,x:a+n,y:s+i}}},{key:"updateText",value:function(n){this.text.value=n}},{key:"setSelected",value:function(){var n=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isSelected=n}},{key:"setHovered",value:function(){var n=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isHovered=n}},{key:"setHitable",value:function(){var n=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isHitable=n}},{key:"setElementState",value:function(n,i){this.state=n,this.additionStateData=i}},{key:"updateStroke",value:function(n){this.stroke=n}},{key:"updateData",value:function(n){var i=ir(Pr(n,"type","x","y","text","properties")),o=this.text,a=o.x,s=o.y,l=o.draggable,h=o.editable;if(i.text&&typeof i.text=="string")i.text={x:a,y:s,value:i.text,draggable:l,editable:h};else if(vh(i.text)==="object"){var _=pn(pn({},this.text),i.text);i.text=Pr(_,"x","y","value","draggable","editable")}st(this,i)}},{key:"setProperty",value:function(n,i){this.properties=pn(pn({},this.properties),{},bh({},n,ir(i))),this.setAttributes()}},{key:"setProperties",value:function(n){this.properties=pn(pn({},this.properties),ir(n)),this.setAttributes()}},{key:"setStyleFromTheme",value:function(n,i){var o=i.theme;o[n]&&st(this,o[n])}},{key:"setZIndex",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:mt.zIndex;this.zIndex=n}},{key:"updateAttributes",value:function(n){st(this,n)}}])&&X0(e.prototype,r),t}()).prototype,"properties",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),Wp=Me(de.prototype,"type",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Yp=Me(de.prototype,"x",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return mt.x}}),Vp=Me(de.prototype,"y",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return mt.y}}),$p=Me(de.prototype,"_width",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return mt.width}}),Kp=Me(de.prototype,"_height",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return mt.height}}),qp=Me(de.prototype,"fill",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return mt.fill}}),Zp=Me(de.prototype,"fillOpacity",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return mt.fillOpacity}}),Jp=Me(de.prototype,"strokeWidth",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return mt.strokeWidth}}),Qp=Me(de.prototype,"stroke",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return mt.stroke}}),eh=Me(de.prototype,"strokeOpacity",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return mt.strokeOpacity}}),th=Me(de.prototype,"opacity",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return mt.opacity}}),rh=Me(de.prototype,"outlineColor",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return mt.outlineColor}}),nh=Me(de.prototype,"hideOutline",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return mt.hideOutline}}),oh=Me(de.prototype,"hoverOutlineColor",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return mt.hoverOutlineColor}}),ih=Me(de.prototype,"outlineStrokeDashArray",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return mt.outlineStrokeDashArray}}),ah=Me(de.prototype,"hoverOutlineStrokeDashArray",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return mt.hoverOutlineStrokeDashArray}}),uh=Me(de.prototype,"isSelected",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),sh=Me(de.prototype,"isHovered",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),ch=Me(de.prototype,"isDragging",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),lh=Me(de.prototype,"isHitable",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),fh=Me(de.prototype,"zIndex",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return mt.zIndex}}),ph=Me(de.prototype,"anchorsOffset",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),hh=Me(de.prototype,"state",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),dh=Me(de.prototype,"text",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return mt.text}}),yh=Me(de.prototype,"draggable",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Me(de.prototype,"addNodeMoveRules",[O.i],Object.getOwnPropertyDescriptor(de.prototype,"addNodeMoveRules"),de.prototype),Me(de.prototype,"move",[O.i],Object.getOwnPropertyDescriptor(de.prototype,"move"),de.prototype),Me(de.prototype,"moveTo",[O.i],Object.getOwnPropertyDescriptor(de.prototype,"moveTo"),de.prototype),Me(de.prototype,"moveText",[O.i],Object.getOwnPropertyDescriptor(de.prototype,"moveText"),de.prototype),Me(de.prototype,"updateText",[O.i],Object.getOwnPropertyDescriptor(de.prototype,"updateText"),de.prototype),Me(de.prototype,"setSelected",[O.i],Object.getOwnPropertyDescriptor(de.prototype,"setSelected"),de.prototype),Me(de.prototype,"setHovered",[O.i],Object.getOwnPropertyDescriptor(de.prototype,"setHovered"),de.prototype),Me(de.prototype,"setHitable",[O.i],Object.getOwnPropertyDescriptor(de.prototype,"setHitable"),de.prototype),Me(de.prototype,"setElementState",[O.i],Object.getOwnPropertyDescriptor(de.prototype,"setElementState"),de.prototype),Me(de.prototype,"updateStroke",[O.i],Object.getOwnPropertyDescriptor(de.prototype,"updateStroke"),de.prototype),Me(de.prototype,"updateData",[O.i],Object.getOwnPropertyDescriptor(de.prototype,"updateData"),de.prototype),Me(de.prototype,"setProperty",[O.i],Object.getOwnPropertyDescriptor(de.prototype,"setProperty"),de.prototype),Me(de.prototype,"setProperties",[O.i],Object.getOwnPropertyDescriptor(de.prototype,"setProperties"),de.prototype),Me(de.prototype,"setStyleFromTheme",[O.i],Object.getOwnPropertyDescriptor(de.prototype,"setStyleFromTheme"),de.prototype),Me(de.prototype,"setZIndex",[O.i],Object.getOwnPropertyDescriptor(de.prototype,"setZIndex"),de.prototype),Me(de.prototype,"updateAttributes",[O.i],Object.getOwnPropertyDescriptor(de.prototype,"updateAttributes"),de.prototype),de);function wh(t){return(wh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function F0(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function xh(t,e){return(xh=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r})(t,e)}function H0(t){var e=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(r){return!1}}();return function(){var r,n=Lu(t);if(e){var i=Lu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return U0(this,r)}}function U0(t,e){if(e&&(wh(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Eh(t)}function Eh(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Lu(t){return(Lu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}function sa(t,e,r,n,i){var o={};return Object.keys(n).forEach(function(a){o[a]=n[a]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce(function(a,s){return s(t,e,a)||a},o),i&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(t,e,o),o=null),o}var _t,Sh,jh,zu=(Oh=sa((mr=function(t){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&xh(o,a)})(i,t);var e,r,n=H0(i);function i(o,a){var s;return function(l,h){if(!(l instanceof h))throw new TypeError("Cannot call a class as a function")}(this,i),(s=n.call(this,o,a,"circle")).modelType=Ie.CIRCLE_NODE,function(l,h,_,j){_&&Object.defineProperty(l,h,{enumerable:_.enumerable,configurable:_.configurable,writable:_.writable,value:_.initializer?_.initializer.call(j):void 0})}(s,"r",Oh,Eh(s)),s}return e=i,(r=[{key:"width",get:function(){return 2*this.r}},{key:"height",get:function(){return 2*this.r}},{key:"anchors",get:function(){var o=this.anchorsOffset,a=this.x,s=this.y,l=this.r;return o&&o.length>0?this.getAnchorsByOffset():[{x:a,y:s-l,id:"".concat(this.id,"_0")},{x:a+l,y:s,id:"".concat(this.id,"_1")},{x:a,y:s+l,id:"".concat(this.id,"_2")},{x:a-l,y:s,id:"".concat(this.id,"_3")}]}}])&&F0(e.prototype,r),i}(Hr)).prototype,"r",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Xt.circle.r}}),sa(mr.prototype,"width",[O.k],Object.getOwnPropertyDescriptor(mr.prototype,"width"),mr.prototype),sa(mr.prototype,"height",[O.k],Object.getOwnPropertyDescriptor(mr.prototype,"height"),mr.prototype),sa(mr.prototype,"anchors",[O.k],Object.getOwnPropertyDescriptor(mr.prototype,"anchors"),mr.prototype),mr);u(103);function Ph(t){return(Ph=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function Bu(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var i=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var o,a,s=[],l=!0,h=!1;try{for(i=i.call(r);!(l=(o=i.next()).done)&&(s.push(o.value),!n||s.length!==n);l=!0);}catch(_){h=!0,a=_}finally{try{l||i.return==null||i.return()}finally{if(h)throw a}}return s}}(t,e)||function(r,n){if(r){if(typeof r=="string")return kh(r,n);var i=Object.prototype.toString.call(r).slice(8,-1);if(i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set")return Array.from(r);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return kh(r,n)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function kh(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Ah(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Dh(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ah(Object(r),!0).forEach(function(n){G0(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ah(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function G0(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Th(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function W0(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Mh(t,e,r){return(Mh=typeof Reflect!="undefined"&&Reflect.get?Reflect.get:function(n,i,o){var a=function(l,h){for(;!Object.prototype.hasOwnProperty.call(l,h)&&(l=Yo(l))!==null;);return l}(n,i);if(a){var s=Object.getOwnPropertyDescriptor(a,i);return s.get?s.get.call(o):s.value}})(t,e,r||t)}function Nh(t,e){return(Nh=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r})(t,e)}function Y0(t){var e=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(r){return!1}}();return function(){var r,n=Yo(t);if(e){var i=Yo(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return V0(this,r)}}function V0(t,e){if(e&&(Ph(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Xu(t)}function Xu(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Yo(t){return(Yo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}function Tn(t,e,r,n,i){var o={};return Object.keys(n).forEach(function(a){o[a]=n[a]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce(function(a,s){return s(t,e,a)||a},o),i&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(t,e,o),o=null),o}var ar,Ch,Rh,Fu=(Sh=Tn((_t=function(t){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&Nh(o,a)})(i,t);var e,r,n=Y0(i);function i(o,a){var s;return function(l,h){if(!(l instanceof h))throw new TypeError("Cannot call a class as a function")}(this,i),(s=n.call(this,o,a,"diamond")).modelType=Ie.DIAMOND_NODE,Th(s,"rx",Sh,Xu(s)),Th(s,"ry",jh,Xu(s)),s}return e=i,(r=[{key:"getData",value:function(){var o=this.rx,a=this.ry;return Dh(Dh({},Mh(Yo(i.prototype),"getData",this).call(this)),{},{rx:o,ry:a})}},{key:"points",get:function(){var o=this.x,a=this.y,s=this.rx,l=this.ry;return[[o,a-l],[o+s,a],[o,a+l],[o-s,a]]}},{key:"pointsPosition",get:function(){return this.points.map(function(o){return{x:o[0],y:o[1]}})}},{key:"width",get:function(){var o=Number.MAX_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(s){var l=Bu(s,1)[0];l<o&&(o=l),l>a&&(a=l)}),a-o}},{key:"height",get:function(){var o=Number.MAX_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(s){var l=Bu(s,2)[1];l<o&&(o=l),l>a&&(a=l)}),a-o}},{key:"anchors",get:function(){var o=this,a=this.anchorsOffset,s=this.points;return a&&a.length>0?this.getAnchorsByOffset():s.map(function(l,h){var _=Bu(l,2);return{x:_[0],y:_[1],id:"".concat(o.id,"_").concat(h)}})}}])&&W0(e.prototype,r),i}(Hr)).prototype,"rx",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),jh=Tn(_t.prototype,"ry",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Tn(_t.prototype,"points",[O.k],Object.getOwnPropertyDescriptor(_t.prototype,"points"),_t.prototype),Tn(_t.prototype,"pointsPosition",[O.k],Object.getOwnPropertyDescriptor(_t.prototype,"pointsPosition"),_t.prototype),Tn(_t.prototype,"width",[O.k],Object.getOwnPropertyDescriptor(_t.prototype,"width"),_t.prototype),Tn(_t.prototype,"height",[O.k],Object.getOwnPropertyDescriptor(_t.prototype,"height"),_t.prototype),Tn(_t.prototype,"anchors",[O.k],Object.getOwnPropertyDescriptor(_t.prototype,"anchors"),_t.prototype),_t);function Ih(t){return(Ih=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function Lh(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function $0(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function zh(t,e){return(zh=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r})(t,e)}function K0(t){var e=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(r){return!1}}();return function(){var r,n=Uu(t);if(e){var i=Uu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return q0(this,r)}}function q0(t,e){if(e&&(Ih(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Hu(t)}function Hu(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Uu(t){return(Uu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}function Vo(t,e,r,n,i){var o={};return Object.keys(n).forEach(function(a){o[a]=n[a]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce(function(a,s){return s(t,e,a)||a},o),i&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(t,e,o),o=null),o}var Ft,Bh,Gu=(Ch=Vo((ar=function(t){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&zh(o,a)})(i,t);var e,r,n=K0(i);function i(o,a){var s;return function(l,h){if(!(l instanceof h))throw new TypeError("Cannot call a class as a function")}(this,i),(s=n.call(this,o,a,"ellipse")).modelType=Ie.ELLIPSE_NODE,Lh(s,"rx",Ch,Hu(s)),Lh(s,"ry",Rh,Hu(s)),s}return e=i,(r=[{key:"width",get:function(){return 2*this.rx}},{key:"height",get:function(){return 2*this.ry}},{key:"anchors",get:function(){var o=this.anchorsOffset,a=this.x,s=this.y,l=this.rx,h=this.ry;return o&&o.length>0?this.getAnchorsByOffset():[{x:a,y:s-h,id:"".concat(this.id,"_0")},{x:a+l,y:s,id:"".concat(this.id,"_1")},{x:a,y:s+h,id:"".concat(this.id,"_2")},{x:a-l,y:s,id:"".concat(this.id,"_3")}]}}])&&$0(e.prototype,r),i}(Hr)).prototype,"rx",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Xt.ellipse.rx}}),Rh=Vo(ar.prototype,"ry",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Xt.ellipse.ry}}),Vo(ar.prototype,"width",[O.k],Object.getOwnPropertyDescriptor(ar.prototype,"width"),ar.prototype),Vo(ar.prototype,"height",[O.k],Object.getOwnPropertyDescriptor(ar.prototype,"height"),ar.prototype),Vo(ar.prototype,"anchors",[O.k],Object.getOwnPropertyDescriptor(ar.prototype,"anchors"),ar.prototype),ar);function Xh(t){return(Xh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function Wu(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var i=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var o,a,s=[],l=!0,h=!1;try{for(i=i.call(r);!(l=(o=i.next()).done)&&(s.push(o.value),!n||s.length!==n);l=!0);}catch(_){h=!0,a=_}finally{try{l||i.return==null||i.return()}finally{if(h)throw a}}return s}}(t,e)||function(r,n){if(r){if(typeof r=="string")return Fh(r,n);var i=Object.prototype.toString.call(r).slice(8,-1);if(i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set")return Array.from(r);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Fh(r,n)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Fh(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Z0(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Hh(t,e){return(Hh=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r})(t,e)}function J0(t){var e=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(r){return!1}}();return function(){var r,n=Yu(t);if(e){var i=Yu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Q0(this,r)}}function Q0(t,e){if(e&&(Xh(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Uh(t)}function Uh(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Yu(t){return(Yu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}function $o(t,e,r,n,i){var o={};return Object.keys(n).forEach(function(a){o[a]=n[a]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce(function(a,s){return s(t,e,a)||a},o),i&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(t,e,o),o=null),o}var Ko,Gh,Vu=(Bh=$o((Ft=function(t){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&Hh(o,a)})(i,t);var e,r,n=J0(i);function i(o,a){var s;return function(l,h){if(!(l instanceof h))throw new TypeError("Cannot call a class as a function")}(this,i),(s=n.call(this,o,a,"polygon")).modelType=Ie.POLYGON_NODE,function(l,h,_,j){_&&Object.defineProperty(l,h,{enumerable:_.enumerable,configurable:_.configurable,writable:_.writable,value:_.initializer?_.initializer.call(j):void 0})}(s,"points",Bh,Uh(s)),s}return e=i,(r=[{key:"pointsPosition",get:function(){var o=this.x,a=this.y,s=this.width,l=this.height;return this.points.map(function(h){return{x:h[0]+o-s/2,y:h[1]+a-l/2}})}},{key:"width",get:function(){var o=Number.MAX_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(s){var l=Wu(s,1)[0];l<o&&(o=l),l>a&&(a=l)}),a-o}},{key:"height",get:function(){var o=Number.MAX_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(s){var l=Wu(s,2)[1];l<o&&(o=l),l>a&&(a=l)}),a-o}},{key:"anchors",get:function(){var o=this,a=this.anchorsOffset,s=this.x,l=this.y,h=this.width,_=this.height,j=this.points;return a&&a.length>0?this.getAnchorsByOffset():j.map(function(k,N){var H=Wu(k,2),$=H[0],V=H[1];return{x:s+$-h/2,y:l+V-_/2,id:"".concat(o.id,"_").concat(N)}})}}])&&Z0(e.prototype,r),i}(Hr)).prototype,"points",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[[50,0],[100,50],[50,100],[0,50]]}}),$o(Ft.prototype,"pointsPosition",[O.k],Object.getOwnPropertyDescriptor(Ft.prototype,"pointsPosition"),Ft.prototype),$o(Ft.prototype,"width",[O.k],Object.getOwnPropertyDescriptor(Ft.prototype,"width"),Ft.prototype),$o(Ft.prototype,"height",[O.k],Object.getOwnPropertyDescriptor(Ft.prototype,"height"),Ft.prototype),$o(Ft.prototype,"anchors",[O.k],Object.getOwnPropertyDescriptor(Ft.prototype,"anchors"),Ft.prototype),Ft);function Wh(t){return(Wh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function e_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Yh(t,e){return(Yh=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r})(t,e)}function t_(t){var e=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(r){return!1}}();return function(){var r,n=$u(t);if(e){var i=$u(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return r_(this,r)}}function r_(t,e){if(e&&(Wh(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Vh(t)}function Vh(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function $u(t){return($u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}function $h(t,e,r,n,i){var o={};return Object.keys(n).forEach(function(a){o[a]=n[a]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce(function(a,s){return s(t,e,a)||a},o),i&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(t,e,o),o=null),o}var Tr,Kh,qh,Zh,Ku=(Gh=$h((Ko=function(t){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&Yh(o,a)})(i,t);var e,r,n=t_(i);function i(o,a){var s;return function(l,h){if(!(l instanceof h))throw new TypeError("Cannot call a class as a function")}(this,i),(s=n.call(this,o,a,"rect")).modelType=Ie.RECT_NODE,function(l,h,_,j){_&&Object.defineProperty(l,h,{enumerable:_.enumerable,configurable:_.configurable,writable:_.writable,value:_.initializer?_.initializer.call(j):void 0})}(s,"radius",Gh,Vh(s)),s}return e=i,(r=[{key:"anchors",get:function(){var o=this.anchorsOffset,a=this.x,s=this.y,l=this.width,h=this.height;return o&&o.length>0?this.getAnchorsByOffset():[{x:a,y:s-h/2,id:"".concat(this.id,"_0")},{x:a+l/2,y:s,id:"".concat(this.id,"_1")},{x:a,y:s+h/2,id:"".concat(this.id,"_2")},{x:a-l/2,y:s,id:"".concat(this.id,"_3")}]}}])&&e_(e.prototype,r),i}(Hr)).prototype,"radius",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Xt.rect.radius}}),$h(Ko.prototype,"anchors",[O.k],Object.getOwnPropertyDescriptor(Ko.prototype,"anchors"),Ko.prototype),Ko);function Jh(t){return(Jh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function qu(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function n_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Qh(t,e){return(Qh=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r})(t,e)}function o_(t){var e=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(r){return!1}}();return function(){var r,n=Zu(t);if(e){var i=Zu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return i_(this,r)}}function i_(t,e){if(e&&(Jh(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ca(t)}function ca(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Zu(t){return(Zu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}function qo(t,e,r,n,i){var o={};return Object.keys(n).forEach(function(a){o[a]=n[a]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce(function(a,s){return s(t,e,a)||a},o),i&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(t,e,o),o=null),o}var la,Ju=(Kh=qo((Tr=function(t){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&Qh(o,a)})(i,t);var e,r,n=o_(i);function i(o,a){var s;return function(l,h){if(!(l instanceof h))throw new TypeError("Cannot call a class as a function")}(this,i),(s=n.call(this,o,a,"text")).modelType=Ie.TEXT_NODE,qu(s,"fontSize",Kh,ca(s)),qu(s,"fontFamily",qh,ca(s)),qu(s,"fontWeight",Zh,ca(s)),s}return e=i,(r=[{key:"width",get:function(){var o=String(this.text.value).split(/[\r\n]/g),a=Ji({rows:o,fontSize:this.fontSize,rowsLength:o.length}).width;return a>100?a:100}},{key:"height",get:function(){var o=String(this.text.value).split(/[\r\n]/g),a=Ji({rows:o,fontSize:this.fontSize,rowsLength:o.length}).height;return a>20?a:20}}])&&n_(e.prototype,r),i}(Hr)).prototype,"fontSize",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Xt.text.fontSize}}),qh=qo(Tr.prototype,"fontFamily",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Xt.text.fontFamily}}),Zh=qo(Tr.prototype,"fontWeight",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Xt.text.fontWeight}}),qo(Tr.prototype,"width",[O.k],Object.getOwnPropertyDescriptor(Tr.prototype,"width"),Tr.prototype),qo(Tr.prototype,"height",[O.k],Object.getOwnPropertyDescriptor(Tr.prototype,"height"),Tr.prototype),Tr);function ed(t){return(ed=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function a_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function td(t,e){return(td=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r})(t,e)}function u_(t){var e=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(r){return!1}}();return function(){var r,n=Qu(t);if(e){var i=Qu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return s_(this,r)}}function s_(t,e){if(e&&(ed(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function Qu(t){return(Qu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}var At,rd,nd,od,es=(function(t,e,r,n,i){var o={};Object.keys(n).forEach(function(a){o[a]=n[a]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce(function(a,s){return s(t,e,a)||a},o),i&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(t,e,o),o=null)}((la=function(t){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&td(o,a)})(i,t);var e,r,n=u_(i);function i(o,a){var s;return function(l,h){if(!(l instanceof h))throw new TypeError("Cannot call a class as a function")}(this,i),(s=n.call(this,o,a,"html")).modelType=Ie.HTML_NODE,s}return e=i,(r=[{key:"anchors",get:function(){var o=this.anchorsOffset,a=this.x,s=this.y,l=this.width,h=this.height;return o&&o.length>0?this.getAnchorsByOffset():[{x:a,y:s-h/2,id:"".concat(this.id,"_0")},{x:a+l/2,y:s,id:"".concat(this.id,"_1")},{x:a,y:s+h/2,id:"".concat(this.id,"_2")},{x:a-l/2,y:s,id:"".concat(this.id,"_3")}]}}])&&a_(e.prototype,r),i}(Hr)).prototype,"anchors",[O.k],Object.getOwnPropertyDescriptor(la.prototype,"anchors"),la.prototype),la);function ts(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function c_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Mn(t,e,r,n,i){var o={};return Object.keys(n).forEach(function(a){o[a]=n[a]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce(function(a,s){return s(t,e,a)||a},o),i&&o.initializer!==void 0&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),o.initializer===void 0&&(Object.defineProperty(t,e,o),o=null),o}var id=Xt.snapline,ad=(rd=Mn((At=function(){function t(n){(function(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),this.graphModel=void 0,ts(this,"isShowHorizontal",rd,this),ts(this,"isShowVertical",nd,this),ts(this,"position",od,this),this.isShowHorizontal=!1,this.isShowVertical=!1,this.position={x:0,y:0},this.graphModel=n}var e,r;return e=t,(r=[{key:"stroke",get:function(){return this.graphModel.theme.snapline.stroke||id.stroke}},{key:"strokeWidth",get:function(){return this.graphModel.theme.snapline.strokeWidth||id.strokeWidth}},{key:"getCenterSnapLine",value:function(n,i){for(var o=n.x,a=n.y,s=!1,l=!1,h=0;h<i.length;h++){var _=i[h];if(_.id!==n.id&&(o===_.x&&(s=!0),a===_.y&&(l=!0),s&&l))break}return{isShowVertical:s,isShowHorizontal:l,position:{x:o,y:a}}}},{key:"getHorizontalSnapline",value:function(n,i){var o,a,s=!1,l=n.id;if(l){var h=this.graphModel.fakerNode;if(h&&h.id===l)a=Zt(h);else{var _=this.graphModel.getNodeModel(l);a=Zt(_)}}for(var j=0;j<i.length;j++){var k=i[j];if(k.id!==n.id){var N=Zt(k);if(N.minY===a.minY||N.maxY===a.minY){s=!0,o=a.minY;break}if(N.minY===a.maxY||N.maxY===a.maxY){s=!0,o=a.maxY;break}}}return st({isShowHorizontal:s,position:{y:o}})}},{key:"getVerticalSnapline",value:function(n,i){var o,a,s=!1,l=n.id;if(l){var h=this.graphModel.fakerNode;if(h&&h.id===l)a=Zt(h);else{var _=this.graphModel.getNodeModel(l);a=Zt(_)}}for(var j=0;j<i.length;j++){var k=i[j];if(k.id!==n.id){var N=Zt(k);if(N.minX===a.minX||N.maxX===a.minX){s=!0,o=a.minX;break}if(N.minX===a.maxX||N.maxX===a.maxX){s=!0,o=a.maxX;break}}}return st({isShowVertical:s,position:{x:o}})}},{key:"getSnapLinePosition",value:function(n,i){var o=this.getCenterSnapLine(n,i),a=o.isShowHorizontal,s=o.isShowVertical;if(!a){var l=this.getHorizontalSnapline(n,i);l.isShowHorizontal&&(o.isShowHorizontal=l.isShowHorizontal,o.position.y=l.position.y)}if(!s){var h=this.getVerticalSnapline(n,i);h.isShowVertical&&(o.isShowVertical=h.isShowVertical,o.position.x=h.position.x)}return o}},{key:"setSnaplineInfo",value:function(n){var i=n.isShowHorizontal,o=n.isShowVertical,a=n.position;this.position=a,this.isShowHorizontal=i,this.isShowVertical=o}},{key:"clearSnapline",value:function(){this.position={x:0,y:0},this.isShowHorizontal=!1,this.isShowVertical=!1}},{key:"setNodeSnapLine",value:function(n){var i=this.graphModel.nodes,o=this.getSnapLinePosition(n,i);this.setSnaplineInfo(o)}}])&&c_(e.prototype,r),t}()).prototype,"isShowHorizontal",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),nd=Mn(At.prototype,"isShowVertical",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),od=Mn(At.prototype,"position",[O.A],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Mn(At.prototype,"stroke",[O.k],Object.getOwnPropertyDescriptor(At.prototype,"stroke"),At.prototype),Mn(At.prototype,"strokeWidth",[O.k],Object.getOwnPropertyDescriptor(At.prototype,"strokeWidth"),At.prototype),Mn(At.prototype,"clearSnapline",[O.i],Object.getOwnPropertyDescriptor(At.prototype,"clearSnapline"),At.prototype),Mn(At.prototype,"setNodeSnapLine",[O.i],Object.getOwnPropertyDescriptor(At.prototype,"setNodeSnapLine"),At.prototype),At);function ud(t){return(ud=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function fa(){return(fa=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function l_(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var i=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var o,a,s=[],l=!0,h=!1;try{for(i=i.call(r);!(l=(o=i.next()).done)&&(s.push(o.value),!n||s.length!==n);l=!0);}catch(_){h=!0,a=_}finally{try{l||i.return==null||i.return()}finally{if(h)throw a}}return s}}(t,e)||function(r,n){if(r){if(typeof r=="string")return sd(r,n);var i=Object.prototype.toString.call(r).slice(8,-1);if(i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set")return Array.from(r);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return sd(r,n)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function sd(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function f_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function cd(t,e){return(cd=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r})(t,e)}function p_(t){var e=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(r){return!1}}();return function(){var r,n=rs(t);if(e){var i=rs(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return h_(this,r)}}function h_(t,e){if(e&&(ud(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function rs(t){return(rs=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}var d_=function(t){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&cd(o,a)})(i,t);var e,r,n=p_(i);function i(){var o;return function(a,s){if(!(a instanceof s))throw new TypeError("Cannot call a class as a function")}(this,i),(o=n.call(this)).preTargetNode=void 0,o.dragHandler=void 0,o.sourceRuleResults=void 0,o.targetRuleResults=void 0,o.onDragStart=function(){var a=o.props,s=a.x,l=a.y,h=a.nodeModel,_=a.graphModel,j=_.overlapMode;_.selectNodeById(h.id),j!==kr.INCREASE&&_.toFront(h.id),o.setState({startX:s,startY:l,endX:s,endY:l})},o.onDraging=function(a){var s=a.deltaX,l=a.deltaY,h=o.state,_=h.endX,j=h.endY,k=o.props,N=k.graphModel,H=k.nodeModel,$=N.transformMatrix,V=N.nodes,K=l_($.moveCanvasPointByHtml([_,j],s,l),2),q=K[0],te=K[1];o.setState({endX:q,endY:te,draging:!0});var ie=Zi({x:_,y:j},V);if(ie){var oe=ie.node;o.preTargetNode=oe;var _e=ie.anchor.id,me="".concat(oe.id,"_").concat(_e);if(!o.targetRuleResults.has(me)){var Ee=o.props.anchorData,Ge=ie.anchor,Ke=H.isAllowConnectedAsSource(oe,Ee,Ge),Nt=oe.isAllowConnectedAsTarget(H,Ee,Ge);o.sourceRuleResults.set(oe.id,Kl(Ke)),o.targetRuleResults.set(me,Kl(Nt))}var Or=o.sourceRuleResults.get(oe.id).isAllPass,Qt=o.targetRuleResults.get(me).isAllPass;Or&&Qt?oe.setElementState($e.ALLOW_CONNECT):oe.setElementState($e.NOT_ALLOW_CONNECT)}else o.preTargetNode&&o.preTargetNode.state!==$e.DEFAULT&&o.preTargetNode.setElementState($e.DEFAULT)},o.onDragEnd=function(){o.checkEnd(),o.setState({startX:0,startY:0,endX:0,endY:0,draging:!1}),o.sourceRuleResults.clear(),o.targetRuleResults.clear()},o.checkEnd=function(){var a=o.props,s=a.graphModel,l=a.nodeModel,h=a.x,_=a.y,j=a.eventCenter,k=a.id,N=s.nodes,H=s.edgeType,$=o.state,V=$.endX,K=$.endY,q=$.draging,te=Zi({x:V,y:K},N);if(o.preTargetNode&&o.preTargetNode.state!==$e.DEFAULT&&o.preTargetNode.setElementState($e.DEFAULT),q&&te&&te.node){var ie=te.node,oe=o.sourceRuleResults.get(ie.id)||{},_e=oe.isAllPass,me=oe.msg,Ee=te.anchor.id,Ge="".concat(ie.id,"_").concat(Ee),Ke=o.targetRuleResults.get(Ge)||{},Nt=Ke.isAllPass,Or=Ke.msg;if(_e&&Nt)ie.setElementState($e.ALLOW_CONNECT),h===te.anchor.x&&_===te.anchor.y||s.createEdge({type:H,sourceNodeId:l.id,sourceAnchorId:k,startPoint:{x:h,y:_},targetNodeId:te.node.id,targetAnchorId:te.anchor.id,endPoint:{x:te.anchor.x,y:te.anchor.y}});else{var Qt=ie.getData();j.emit(Ne.CONNECTION_NOT_ALLOWED,{data:Qt,msg:Or||me})}}},o.sourceRuleResults=new Map,o.targetRuleResults=new Map,o.state={startX:0,startY:0,endX:0,endY:0,draging:!1},o.dragHandler=Ho({onDragStart:o.onDragStart,onDraging:o.onDraging,onDragEnd:o.onDragEnd}),o}return e=i,(r=[{key:"isShowLine",value:function(){var o=this.state,a=o.startX,s=o.startY,l=o.endX,h=o.endY;return Ar(a,s,l,h)>10}},{key:"render",value:function(){var o=this.state,a=o.startX,s=o.startY,l=o.endX,h=o.endY,_=this.props,j=_.x,k=_.y,N=_.style,H=_.edgeStyle;return I("g",{className:"lf-anchor"},I(Go,fa({className:"lf-node-anchor-hover",x:j,y:k},_.hoverStyle,{onMouseDown:this.dragHandler})),I(Go,fa({className:"lf-node-anchor",x:j,y:k},N,{onMouseDown:this.dragHandler})),this.isShowLine()&&I(co,fa({x1:a,y1:s,x2:l,y2:h,"pointer-events":"none"},H)))}}])&&f_(e.prototype,r),i}(C);function ld(t){return(ld=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function y_(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var i=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var o,a,s=[],l=!0,h=!1;try{for(i=i.call(r);!(l=(o=i.next()).done)&&(s.push(o.value),!n||s.length!==n);l=!0);}catch(_){h=!0,a=_}finally{try{l||i.return==null||i.return()}finally{if(h)throw a}}return s}}(t,e)||function(r,n){if(r){if(typeof r=="string")return fd(r,n);var i=Object.prototype.toString.call(r).slice(8,-1);if(i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set")return Array.from(r);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return fd(r,n)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function fd(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ns(t){var e=t.x,r=e===void 0?0:e,n=t.y,i=n===void 0?0:n,o=t.value,a=t.fontSize,s=t.fill,l=s===void 0?"currentColor":s,h=t.model,_=t.autoWrap,j=_!==void 0&&_,k=t.overflowMode,N=k===void 0?"default":k,H={textAnchor:"middle","dominant-baseline":"middle",x:r,y:i,fill:l};if(Object.entries(t).forEach(function(oe){var _e=y_(oe,2),me=_e[0],Ee=_e[1];ld(Ee)!=="object"&&(H[me]=Ee)}),j&&(N="autoWrap"),o){var $=String(o).split(/[\r\n]/g),V=$.length;if(N!=="default"){var K=h.BaseType,q=h.textWidth,te=h.modelType;if(K===vt.NODE&&te!==Ie.TEXT_NODE||K===vt.EDGE&&q)return function(oe,_e){oe.x,oe.y;var me=oe.value,Ee=oe.color,Ge=Ee===void 0?"#000000":Ee,Ke=oe.fontSize,Nt=oe.model,Or=oe.fontFamily,Qt=Or===void 0?"":Or,ni=oe.lineHeight,oi=oe.wrapPadding,va=oi===void 0?"0, 0":oi,Cs=oe.overflowMode,ga=Nt.width,P1=Nt.textWidth,iv=Nt.textHeight,ba=P1||ga,Rs=String(me).split(/[\r\n]/g),k1=Rs.length,av=$l({rows:Rs,style:{fontSize:"".concat(Ke,"px"),width:"".concat(ba,"px"),fontFamily:Qt,lineHeight:ni,padding:va},rowsLength:k1,className:"lf-get-text-height"}),ma=Nt.height>av?Nt.height:av;iv&&(ma=iv);var A1=Cs==="ellipsis";return I("g",null,I("foreignObject",{width:ba,height:ma,x:_e.x-ba/2,y:_e.y-ma/2},I("div",{className:"lf-node-text-auto-wrap",style:{minHeight:ma,width:ba,color:Ge,padding:va}},I("div",{className:A1?"lf-node-text-ellipsis-content":"lf-node-text-auto-wrap-content",style:{fontSize:Ke,fontFamily:Qt,lineHeight:ni}},Rs.map(function(D1){return I("div",{className:"lf-node-text--auto-wrap-inner"},D1)})))))}(t,H)}if(V>1){var ie=$.map(function(oe,_e){return I("tspan",{className:"lf-text-tspan",x:r,y:i+(_e-(V-1)/2)*(a+2)},oe)});return I("text",H,ie)}return I("text",H,o)}}function pd(t){return(pd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function hd(){return(hd=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function v_(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var i=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var o,a,s=[],l=!0,h=!1;try{for(i=i.call(r);!(l=(o=i.next()).done)&&(s.push(o.value),!n||s.length!==n);l=!0);}catch(_){h=!0,a=_}finally{try{l||i.return==null||i.return()}finally{if(h)throw a}}return s}}(t,e)||function(r,n){if(r){if(typeof r=="string")return dd(r,n);var i=Object.prototype.toString.call(r).slice(8,-1);if(i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set")return Array.from(r);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return dd(r,n)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function dd(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function g_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function yd(t,e){return(yd=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r})(t,e)}function b_(t){var e=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(r){return!1}}();return function(){var r,n=os(t);if(e){var i=os(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return m_(this,r)}}function m_(t,e){if(e&&(pd(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function os(t){return(os=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}var vd=function(t){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&yd(o,a)})(i,t);var e,r,n=b_(i);function i(o){var a;(function(h,_){if(!(h instanceof _))throw new TypeError("Cannot call a class as a function")})(this,i),(a=n.call(this)).dragHandler=void 0,a.sumDeltaX=0,a.sumDeltaY=0,a.stepDrag=void 0,a.onDraging=function(h){var _=h.deltaX,j=h.deltaY,k=a.props,N=k.model,H=v_(k.graphModel.transformMatrix.fixDeltaXY(_,j),2),$=H[0],V=H[1];N.moveText($,V)},a.dblClickHandler=function(){a.props.editable&&a.props.model.setElementState($e.TEXT_EDIT)},a.mouseDownHandle=function(h){var _=a.props,j=_.draggable,k=_.graphModel.editConfig.nodeTextDraggable;(j||k)&&a.stepDrag.handleMouseDown(h)};var s=o.model,l=o.draggable;return a.stepDrag=new Uo({onDraging:a.onDraging,step:1,model:s,isStopPropagation:l}),a}return e=i,(r=[{key:"getShape",value:function(){var o=this.props,a=o.model,s=o.style,l=a.text,h=l.value;return I(ns,hd({},{x:l.x,y:l.y,className:"lf-element-text",value:h},s,{model:a}))}},{key:"render",value:function(){if(this.props.model.text)return I("g",{onMouseDown:this.mouseDownHandle,onDblClick:this.dblClickHandler},this.getShape())}}])&&g_(e.prototype,r),i}(C),__=window.navigator.userAgent.match(/MSIE|Trident/)!==null;function gd(t){return(gd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function bd(){return(bd=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function md(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Nn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?md(Object(r),!0).forEach(function(n){O_(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):md(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function O_(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function w_(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var i=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var o,a,s=[],l=!0,h=!1;try{for(i=i.call(r);!(l=(o=i.next()).done)&&(s.push(o.value),!n||s.length!==n);l=!0);}catch(_){h=!0,a=_}finally{try{l||i.return==null||i.return()}finally{if(h)throw a}}return s}}(t,e)||function(r,n){if(r){if(typeof r=="string")return _d(r,n);var i=Object.prototype.toString.call(r).slice(8,-1);if(i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set")return Array.from(r);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _d(r,n)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function _d(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Od(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function wd(t,e){return(wd=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r})(t,e)}function x_(t){var e=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(r){return!1}}();return function(){var r,n=is(t);if(e){var i=is(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return E_(this,r)}}function E_(t,e){if(e&&(gd(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function is(t){return(is=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}var Ur=function(t){(function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(s&&s.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),s&&wd(a,s)})(o,t);var e,r,n,i=x_(o);function o(a){var s;(function(j,k){if(!(j instanceof k))throw new TypeError("Cannot call a class as a function")})(this,o),(s=i.call(this)).stepDrag=void 0,s.contextMenuTime=void 0,s.startTime=void 0,s.clickTimer=void 0,s.onDraging=function(j){var k=j.deltaX,N=j.deltaY,H=s.props,$=H.model,V=H.graphModel;$.isDragging=!0;var K=w_(V.transformMatrix.fixDeltaXY(k,N),2),q=K[0],te=K[1];V.moveNode($.id,q,te)},s.onDragEnd=function(){s.props.model.isDragging=!1},s.handleClick=function(j){if(s.startTime&&!(new Date().getTime()-s.startTime>200)){var k=s.props,N=k.model,H=k.eventCenter,$=k.graphModel,V={data:N.getData(),e:j,position:$.getPointByClient({x:j.clientX,y:j.clientY})},K=j.button===2,q=j.detail===2;if(!K){var te=$.editConfig;$.selectNodeById(N.id,function(ie,oe){var _e=oe.multipleSelectKey;if(oe.metaKeyMultipleSelected&&ie.metaKey)return!0;var me=!1;switch(_e){case"meta":me=ie.metaKey;break;case"alt":me=ie.altKey;break;case"shift":me=ie.shiftKey;break;default:me=!1}return me}(j,te)),s.toFront(),q?(te.nodeTextEdit&&N.text.editable&&(N.setSelected(!1),$.setElementStateById(N.id,$e.TEXT_EDIT)),H.emit(Ne.NODE_DBCLICK,V)):(H.emit(Ne.ELEMENT_CLICK,V),H.emit(Ne.NODE_CLICK,V))}}},s.handleContextMenu=function(j){j.preventDefault();var k=s.props,N=k.model,H=k.eventCenter,$=k.graphModel,V=N.getData(),K=$.getPointByClient({x:j.clientX,y:j.clientY});$.setElementStateById(N.id,$e.SHOW_MENU,K.domOverlayPosition),$.selectNodeById(N.id),H.emit(Ne.NODE_CONTEXTMENU,{data:V,e:j,position:K}),s.toFront()},s.handleMouseDown=function(j){var k=s.props,N=k.model,H=k.graphModel;s.toFront(),s.startTime=new Date().getTime(),H.editConfig.adjustNodePosition&&N.draggable&&s.stepDrag&&s.stepDrag.handleMouseDown(j)},s.setHoverON=function(j){if(!s.state.isHovered){s.setState({isHovered:!0});var k=s.props,N=k.model,H=k.eventCenter,$=N.getData();N.setHovered(!0),H.emit(Ne.NODE_MOUSEENTER,{data:$,e:j})}},s.setHoverOFF=function(j){s.setState({isHovered:!1});var k=s.props,N=k.model,H=k.eventCenter,$=N.getData();N.setHovered(!1),H.emit(Ne.NODE_MOUSELEAVE,{data:$,e:j})},s.onMouseOut=function(j){__&&s.setHoverOFF(j)};var l=a.graphModel.gridSize,h=a.eventCenter,_=a.model;return s.stepDrag=new Uo({onDraging:s.onDraging,onDragEnd:s.onDragEnd,step:l,eventType:"NODE",eventCenter:h,model:_}),s.state={isHovered:!1},s}return e=o,n=[{key:"getModel",value:function(a){return a}}],(r=[{key:"getShapeStyle",value:function(){var a=this.props.model;return{width:a.width,height:a.height,fill:a.fill,fillOpacity:a.fillOpacity,strokeWidth:a.strokeWidth,stroke:a.stroke,strokeOpacity:a.strokeOpacity,opacity:a.opacity,outlineColor:a.outlineColor}}},{key:"getAttributes",value:function(){var a=this.props.model,s=a.id,l=a.properties,h=l===void 0?{}:l,_=a.type,j=a.x,k=a.y,N=a.isSelected,H=a.isHovered,$=a.text,V=this.getShapeStyle();return Nn({id:s,properties:Nn({},h),type:_,x:j,y:k,isSelected:N,isHovered:H,text:Nn({},$)},V)}},{key:"getProperties",value:function(){return this.props.model.getProperties()}},{key:"getAnchorStyle",value:function(){return Nn({},this.props.graphModel.theme.anchor)}},{key:"getAnchorHoverStyle",value:function(){return Nn({},this.props.graphModel.theme.anchorHover)}},{key:"getNewEdgeStyle",value:function(){return Nn({},this.props.graphModel.theme.anchorLine)}},{key:"getAnchors",value:function(){var a=this,s=this.props,l=s.model,h=s.graphModel,_=s.eventCenter,j=l.isSelected,k=l.isHitable,N=l.isDragging,H=this.state.isHovered;if(k&&(j||H)){var $=this.getAnchorStyle(),V=this.getAnchorHoverStyle(),K=this.getNewEdgeStyle();return Yi(l.anchors,function(q,te){return I(d_,bd({},q,{anchorData:q,nodeDraging:N,style:$,hoverStyle:V,edgeStyle:K,anchorIndex:te,nodeModel:l,eventCenter:_,graphModel:h,setHoverOFF:a.setHoverOFF}))})}return[]}},{key:"getTextStyle",value:function(){return Nn({},this.props.graphModel.theme.nodeText)}},{key:"getText",value:function(){var a=this.props,s=a.model,l=a.graphModel;if(s.state===$e.TEXT_EDIT)return"";var h=this.getTextStyle();if(s.text){var _=l.editConfig,j=!1;return(s.text.draggable||_.nodeTextDraggable)&&(j=!0),I(vd,{editable:_.nodeTextEdit&&s.text.editable,style:h,model:s,graphModel:l,draggable:j})}}},{key:"getStateClassName",value:function(){var a=this.props.model,s=a.state,l=a.isDraging,h="lf-node";switch(s){case $e.ALLOW_CONNECT:h+=" lf-node-allow";break;case $e.NOT_ALLOW_CONNECT:h+=" lf-node-not-allow";break;default:h+=" lf-node-default"}return l&&(h+=" lf-isDragging"),h}},{key:"toFront",value:function(){var a=this.props,s=a.model,l=a.graphModel;l.overlapMode!==kr.INCREASE&&l.toFront(s.id)}},{key:"render",value:function(){var a,s=this.props,l=s.model,h=s.graphModel,_=h.editConfig,j=_.hideAnchors,k=_.adjustNodePosition,N=h.gridSize,H=h.transformMatrix.SCALE_X,$=l.isHitable,V=l.draggable,K=I("g",{className:"lf-node-content"},this.getShape(),this.getText(),j?null:this.getAnchors());return $?(k&&V&&this.stepDrag.setStep(N*H),a=I("g",{className:this.getStateClassName(),onMouseDown:this.handleMouseDown,onMouseUp:this.handleClick,onMouseEnter:this.setHoverON,onMouseOver:this.setHoverON,onMouseLeave:this.setHoverOFF,onMouseOut:this.onMouseOut,onContextMenu:this.handleContextMenu},K)):a=I("g",{className:this.getStateClassName()},K),a}}])&&Od(e.prototype,r),n&&Od(e,n),o}(C);function xd(t){return(xd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function Ed(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function pa(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ed(Object(r),!0).forEach(function(n){S_(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ed(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function S_(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function j_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function P_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function as(t,e,r){return(as=typeof Reflect!="undefined"&&Reflect.get?Reflect.get:function(n,i,o){var a=function(l,h){for(;!Object.prototype.hasOwnProperty.call(l,h)&&(l=lo(l))!==null;);return l}(n,i);if(a){var s=Object.getOwnPropertyDescriptor(a,i);return s.get?s.get.call(o):s.value}})(t,e,r||t)}function Sd(t,e){return(Sd=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r})(t,e)}function k_(t){var e=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(r){return!1}}();return function(){var r,n=lo(t);if(e){var i=lo(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return A_(this,r)}}function A_(t,e){if(e&&(xd(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function lo(t){return(lo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}var us=function(t){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&Sd(o,a)})(i,t);var e,r,n=k_(i);function i(){return j_(this,i),n.apply(this,arguments)}return e=i,(r=[{key:"getShapeStyle",value:function(){var o=as(lo(i.prototype),"getShapeStyle",this).call(this),a=this.props.model.radius;return pa(pa({},o),{},{radius:a})}},{key:"getAttributes",value:function(){var o=as(lo(i.prototype),"getAttributes",this).call(this),a=this.getShapeStyle();return pa(pa({},o),a)}},{key:"getShape",value:function(){return I(fn,this.getAttributes())}}])&&P_(e.prototype,r),i}(Ur);function jd(t){return(jd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function Pd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function ha(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Pd(Object(r),!0).forEach(function(n){D_(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Pd(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function D_(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function T_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function M_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ss(t,e,r){return(ss=typeof Reflect!="undefined"&&Reflect.get?Reflect.get:function(n,i,o){var a=function(l,h){for(;!Object.prototype.hasOwnProperty.call(l,h)&&(l=fo(l))!==null;);return l}(n,i);if(a){var s=Object.getOwnPropertyDescriptor(a,i);return s.get?s.get.call(o):s.value}})(t,e,r||t)}function kd(t,e){return(kd=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r})(t,e)}function N_(t){var e=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(r){return!1}}();return function(){var r,n=fo(t);if(e){var i=fo(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return C_(this,r)}}function C_(t,e){if(e&&(jd(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function fo(t){return(fo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}var cs=function(t){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&kd(o,a)})(i,t);var e,r,n=N_(i);function i(){return T_(this,i),n.apply(this,arguments)}return e=i,(r=[{key:"getShapeStyle",value:function(){var o=ss(fo(i.prototype),"getShapeStyle",this).call(this),a=this.props.model.r;return ha(ha({},o),{},{r:a})}},{key:"getAttributes",value:function(){var o=ss(fo(i.prototype),"getAttributes",this).call(this),a=this.getShapeStyle();return ha(ha({},o),a)}},{key:"getShape",value:function(){return I(Go,this.getAttributes())}}])&&M_(e.prototype,r),i}(Ur);function Ad(t){return(Ad=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function R_(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var i=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var o,a,s=[],l=!0,h=!1;try{for(i=i.call(r);!(l=(o=i.next()).done)&&(s.push(o.value),!n||s.length!==n);l=!0);}catch(_){h=!0,a=_}finally{try{l||i.return==null||i.return()}finally{if(h)throw a}}return s}}(t,e)||function(r,n){if(r){if(typeof r=="string")return Dd(r,n);var i=Object.prototype.toString.call(r).slice(8,-1);if(i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set")return Array.from(r);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Dd(r,n)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Dd(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Td(t){var e=t.points,r=t.className,n={fill:"transparent",fillOpacity:1,strokeWidth:1,stroke:"#000",strokeOpacity:1,points:"",className:"lf-basic-shape ".concat(r)};return Object.entries(t).forEach(function(i){var o=R_(i,2),a=o[0],s=o[1];Ad(s)!=="object"&&(n[a]=s)}),n.points=e.map(function(i){return i.join(",")}).join(" "),I("polygon",n)}function Md(t){return(Md=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function Nd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function da(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Nd(Object(r),!0).forEach(function(n){I_(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Nd(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function I_(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function L_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function z_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ls(t,e,r){return(ls=typeof Reflect!="undefined"&&Reflect.get?Reflect.get:function(n,i,o){var a=function(l,h){for(;!Object.prototype.hasOwnProperty.call(l,h)&&(l=po(l))!==null;);return l}(n,i);if(a){var s=Object.getOwnPropertyDescriptor(a,i);return s.get?s.get.call(o):s.value}})(t,e,r||t)}function Cd(t,e){return(Cd=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r})(t,e)}function B_(t){var e=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(r){return!1}}();return function(){var r,n=po(t);if(e){var i=po(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return X_(this,r)}}function X_(t,e){if(e&&(Md(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function po(t){return(po=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}var fs=function(t){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&Cd(o,a)})(i,t);var e,r,n=B_(i);function i(){return L_(this,i),n.apply(this,arguments)}return e=i,(r=[{key:"getShapeStyle",value:function(){var o=ls(po(i.prototype),"getShapeStyle",this).call(this),a=this.props.model.points;return da(da({},o),{},{points:a})}},{key:"getAttributes",value:function(){var o=ls(po(i.prototype),"getAttributes",this).call(this),a=this.getShapeStyle();return da(da({},o),a)}},{key:"getShape",value:function(){var o=this.getAttributes(),a=o.width,s=o.height,l=o.x,h=o.y;return I("g",{transform:"matrix(1 0 0 1 ".concat(l-a/2," ").concat(h-s/2,")")},I(Td,o))}}])&&z_(e.prototype,r),i}(Ur);function Rd(t){return(Rd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function Id(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function ya(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Id(Object(r),!0).forEach(function(n){F_(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Id(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function F_(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function H_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function U_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ps(t,e,r){return(ps=typeof Reflect!="undefined"&&Reflect.get?Reflect.get:function(n,i,o){var a=function(l,h){for(;!Object.prototype.hasOwnProperty.call(l,h)&&(l=ho(l))!==null;);return l}(n,i);if(a){var s=Object.getOwnPropertyDescriptor(a,i);return s.get?s.get.call(o):s.value}})(t,e,r||t)}function Ld(t,e){return(Ld=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r})(t,e)}function G_(t){var e=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(r){return!1}}();return function(){var r,n=ho(t);if(e){var i=ho(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return W_(this,r)}}function W_(t,e){if(e&&(Rd(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function ho(t){return(ho=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}var hs=function(t){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&Ld(o,a)})(i,t);var e,r,n=G_(i);function i(){return H_(this,i),n.apply(this,arguments)}return e=i,(r=[{key:"getShapeStyle",value:function(){var o=this.props.model.points;return ya(ya({},ps(ho(i.prototype),"getShapeStyle",this).call(this)),{},{points:o})}},{key:"getAttributes",value:function(){var o=ps(ho(i.prototype),"getAttributes",this).call(this),a=this.getShapeStyle();return ya(ya({},o),a)}},{key:"getShape",value:function(){var o=this.props.model.points,a=this.getAttributes();return I("g",null,I(Td,{fill:a.fill,fillOpacity:a.fillOpacity,strokeWidth:a.strokeWidth,stroke:a.stroke,strokeOpacity:a.strokeOpacity,points:o}))}}])&&U_(e.prototype,r),i}(Ur);function zd(t){return(zd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function Y_(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var i=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var o,a,s=[],l=!0,h=!1;try{for(i=i.call(r);!(l=(o=i.next()).done)&&(s.push(o.value),!n||s.length!==n);l=!0);}catch(_){h=!0,a=_}finally{try{l||i.return==null||i.return()}finally{if(h)throw a}}return s}}(t,e)||function(r,n){if(r){if(typeof r=="string")return Bd(r,n);var i=Object.prototype.toString.call(r).slice(8,-1);if(i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set")return Array.from(r);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Bd(r,n)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Bd(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function V_(t){var e=t.x,r=e===void 0?0:e,n=t.y,i=n===void 0?0:n,o=t.rx,a=o===void 0?4:o,s=t.ry,l={cx:r,cy:i,rx:a,ry:s===void 0?4:s,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(t).forEach(function(h){var _=Y_(h,2),j=_[0],k=_[1];zd(k)!=="object"&&(l[j]=k)}),I("ellipse",l)}function Xd(t){return(Xd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function Fd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Hd(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Fd(Object(r),!0).forEach(function(n){$_(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Fd(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function $_(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function K_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function q_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ud(t,e,r){return(Ud=typeof Reflect!="undefined"&&Reflect.get?Reflect.get:function(n,i,o){var a=function(l,h){for(;!Object.prototype.hasOwnProperty.call(l,h)&&(l=Zo(l))!==null;);return l}(n,i);if(a){var s=Object.getOwnPropertyDescriptor(a,i);return s.get?s.get.call(o):s.value}})(t,e,r||t)}function Gd(t,e){return(Gd=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r})(t,e)}function Z_(t){var e=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(r){return!1}}();return function(){var r,n=Zo(t);if(e){var i=Zo(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return J_(this,r)}}function J_(t,e){if(e&&(Xd(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function Zo(t){return(Zo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}var ds=function(t){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&Gd(o,a)})(i,t);var e,r,n=Z_(i);function i(){return K_(this,i),n.apply(this,arguments)}return e=i,(r=[{key:"getAttributes",value:function(){var o=Ud(Zo(i.prototype),"getAttributes",this).call(this),a=this.props.model,s=a.rx,l=a.ry;return Hd(Hd({},o),{},{rx:s,ry:l})}},{key:"getShape",value:function(){return I(V_,this.getAttributes())}}])&&q_(e.prototype,r),i}(Ur);function Wd(t){return(Wd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function Yd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Vd(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Yd(Object(r),!0).forEach(function(n){Q_(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Yd(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Q_(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function eO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function tO(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function $d(t,e){return($d=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r})(t,e)}function rO(t){var e=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(r){return!1}}();return function(){var r,n=ys(t);if(e){var i=ys(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return nO(this,r)}}function nO(t,e){if(e&&(Wd(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function ys(t){return(ys=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}var vs=function(t){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&$d(o,a)})(i,t);var e,r,n=rO(i);function i(){return eO(this,i),n.apply(this,arguments)}return e=i,(r=[{key:"getBackgroud",value:function(){var o=this.getAttributes().text,a=this.getTextStyle();if(o&&o.value&&a.backgroundStyle&&a.backgroundStyle.fill!=="transparnet"){var s=a.fontSize,l=o.value,h=o.x,_=o.y,j=String(l).split(/[\r\n]/g),k=j.length;j&&j.forEach(function(V){ju(V)});var N=Ji({rows:j,fontSize:s,rowsLength:k}),H=N.width,$=N.height;return I(fn,Vd(Vd({},a.backgroundStyle),{},{x:h-1,y:_-1,width:H,height:$}))}}},{key:"getShape",value:function(){var o=this.getAttributes();return I("g",null,this.getBackgroud(),I(ns,o))}}])&&tO(e.prototype,r),i}(Ur);function Kd(t){return(Kd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function oO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function iO(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function qd(t,e){return(qd=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r})(t,e)}function aO(t){var e=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(r){return!1}}();return function(){var r,n=gs(t);if(e){var i=gs(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return uO(this,r)}}function uO(t,e){if(e&&(Kd(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function gs(t){return(gs=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}var bs=function(t){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&qd(o,a)})(i,t);var e,r,n=aO(i);function i(){var o;oO(this,i);for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return(o=n.call.apply(n,[this].concat(s))).ref=void 0,o.setRef=function(h){o.ref=h},o}return e=i,(r=[{key:"rootEl",get:function(){return this.ref}},{key:"setHtml",value:function(o){o.appendChild(document.createElement("div"))}},{key:"componentDidMount",value:function(){this.setHtml(this.rootEl)}},{key:"componentDidUpdate",value:function(){this.setHtml(this.rootEl)}},{key:"getShape",value:function(){var o=this.getAttributes(),a=o.x,s=o.y,l=o.width,h=o.height;return I("foreignObject",{x:a-l/2,y:s-h/2,width:l,height:h,ref:this.setRef})}}])&&iO(e.prototype,r),i}(Ur);function Zd(t){return(Zd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function sO(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var i=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var o,a,s=[],l=!0,h=!1;try{for(i=i.call(r);!(l=(o=i.next()).done)&&(s.push(o.value),!n||s.length!==n);l=!0);}catch(_){h=!0,a=_}finally{try{l||i.return==null||i.return()}finally{if(h)throw a}}return s}}(t,e)||function(r,n){if(r){if(typeof r=="string")return Jd(r,n);var i=Object.prototype.toString.call(r).slice(8,-1);if(i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set")return Array.from(r);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Jd(r,n)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Jd(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Qd(t){var e={d:""};return Object.entries(t).forEach(function(r){var n=sO(r,2),i=n[0],o=n[1];Zd(o)!=="object"&&(e[i]=o)}),I("path",e)}Qd.defaultProps={strokeDasharray:""};var Jo=Qd;function ey(t){return(ey=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function ty(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function cO(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function lO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fO(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ry(t,e){return(ry=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r})(t,e)}function pO(t){var e=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(r){return!1}}();return function(){var r,n=ms(t);if(e){var i=ms(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return hO(this,r)}}function hO(t,e){if(e&&(ey(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function ms(t){return(ms=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}var ny=function(t){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&ry(o,a)})(i,t);var e,r,n=pO(i);function i(){return lO(this,i),n.apply(this,arguments)}return e=i,(r=[{key:"getArrowAttibutes",value:function(){var o=this.props,a=o.arrowInfo,s=o.style,l=a.start,h=a.end,_={start:l,end:h,offset:s.offset,verticalLength:s.verticalLength,type:"end"},j=Bo(_),k=j.leftX,N=j.leftY,H=j.rightX,$=j.rightY;return function(V){for(var K=1;K<arguments.length;K++){var q=arguments[K]!=null?arguments[K]:{};K%2?ty(Object(q),!0).forEach(function(te){cO(V,te,q[te])}):Object.getOwnPropertyDescriptors?Object.defineProperties(V,Object.getOwnPropertyDescriptors(q)):ty(Object(q)).forEach(function(te){Object.defineProperty(V,te,Object.getOwnPropertyDescriptor(q,te))})}return V}({d:"M".concat(k," ").concat(N," L").concat(h.x," ").concat(h.y," L").concat(H," ").concat($," z")},s)}},{key:"getShape",value:function(){var o=this.getArrowAttibutes(),a=o.d,s=o.strokeWidth,l=o.stroke,h=o.fill;return I(Jo,{d:a,fill:h,strokeWidth:s,stroke:l})}},{key:"render",value:function(){return I("g",{className:"lf-arrow"},this.getShape())}}])&&fO(e.prototype,r),i}(C);function oy(t){return(oy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function iy(){return(iy=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function ay(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Cn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ay(Object(r),!0).forEach(function(n){dO(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ay(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function dO(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function yO(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function uy(t,e){return(uy=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r})(t,e)}function vO(t){var e=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(r){return!1}}();return function(){var r,n=_s(t);if(e){var i=_s(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return gO(this,r)}}function gO(t,e){if(e&&(oy(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function _s(t){return(_s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}var hn,bO=function(t){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&uy(o,a)})(i,t);var e,r,n=vO(i);function i(o){var a;return function(s,l){if(!(s instanceof l))throw new TypeError("Cannot call a class as a function")}(this,i),(a=n.call(this,o)).setHoverON=function(){a.setState({isHoverd:!0})},a.setHoverOFF=function(){a.setState({isHoverd:!1})},a.state={isHoverd:!1},a}return e=i,(r=[{key:"getBackgroud",value:function(){var o=this.props.model,a=this.props.style,s=o.text,l=o.textWidth,h=Pr(a.background,"fill","stroke","radius","height");if(this.state.isHoverd&&a.hoverBackground&&(h=Cn(Cn({},h),a.hoverBackground)),s&&s.value&&h.fill!=="transparnet"){var _,j=a.fontSize,k=a.autoWrap,N=a.lineHeight,H=a.wrapPadding,$=s.value,V=s.x,K=s.y,q=String($).split(/[\r\n]/g),te=q.length;if(k&&l){var ie=$l({rows:q,style:{fontSize:"".concat(j,"px"),width:"".concat(l,"px"),lineHeight:N,padding:H},rowsLength:te,className:"lf-get-text-height"});_=Cn(Cn({},h),{},{x:V-1,y:K-1,width:l,height:ie})}else{q&&q.forEach(function(Ee){ju(Ee)});var oe=Ji({rows:q,fontSize:j,rowsLength:te}),_e=oe.width,me=oe.height;_=Cn(Cn({},h),{},{x:V-1,y:K-1,width:_e,height:me})}return I(fn,_)}}},{key:"getShape",value:function(){var o=this.props,a=o.model,s=o.style,l=a.text,h=l.value,_=Cn({x:l.x,y:l.y,className:"lf-element-text",value:h},s);return I("g",{className:"lf-line-text",onMouseEnter:this.setHoverON,onMouseLeave:this.setHoverOFF},this.getBackgroud(),I(ns,iy({},_,{model:a})))}}])&&yO(e.prototype,r),i}(vd);function sy(t){return(sy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function cy(){return(cy=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function ly(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Gr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ly(Object(r),!0).forEach(function(n){mO(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ly(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function mO(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _O(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var i=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var o,a,s=[],l=!0,h=!1;try{for(i=i.call(r);!(l=(o=i.next()).done)&&(s.push(o.value),!n||s.length!==n);l=!0);}catch(_){h=!0,a=_}finally{try{l||i.return==null||i.return()}finally{if(h)throw a}}return s}}(t,e)||function(r,n){if(r){if(typeof r=="string")return fy(r,n);var i=Object.prototype.toString.call(r).slice(8,-1);if(i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set")return Array.from(r);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return fy(r,n)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function fy(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function OO(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function py(t,e){return(py=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r})(t,e)}function wO(t){var e=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(r){return!1}}();return function(){var r,n=Os(t);if(e){var i=Os(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return xO(this,r)}}function xO(t,e){if(e&&(sy(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function Os(t){return(Os=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})(hn||(hn={}));var hy=function(t){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&py(o,a)})(i,t);var e,r,n=wO(i);function i(){var o;return function(a,s){if(!(a instanceof s))throw new TypeError("Cannot call a class as a function")}(this,i),(o=n.call(this)).dragHandler=void 0,o.oldEdge=void 0,o.onDragStart=function(){var a=o.props,s=a.x,l=a.y,h=a.edgeModel,_=h.startPoint,j=h.endPoint,k=h.pointsList;o.oldEdge={startPoint:_,endPoint:j,pointsList:k},o.setState({endX:s,endY:l,draging:!0})},o.onDraging=function(a){var s=a.deltaX,l=a.deltaY,h=o.state,_=h.endX,j=h.endY,k=o.props,N=k.graphModel,H=k.type,$=_O(N.transformMatrix.moveCanvasPointByHtml([_,j],s,l),2),V=$[0],K=$[1];o.setState({endX:V,endY:K,draging:!0});var q=o.props.edgeModel,te=N.nodes,ie=Zi({x:_,y:j},te);if(ie&&ie.node){var oe,_e=q.startPoint,me=q.endPoint,Ee=q.sourceNode,Ge=q.targetNode;H===hn.SOURCE?oe={startPoint:{x:ie.anchor.x,y:ie.anchor.y},endPoint:{x:me.x,y:me.y},sourceNode:ie.node,targetNode:Ge}:H===hn.TARGET&&(oe={startPoint:{x:_e.x,y:_e.y},endPoint:{x:ie.anchor.x,y:ie.anchor.y},sourceNode:Ee,targetNode:ie.node}),q.updateAfterAdjustStartAndEnd(oe)}else H===hn.SOURCE?q.updateStartPoint({x:V,y:K}):H===hn.TARGET&&q.updateEndPoint({x:V,y:K})},o.onDragEnd=function(){o.setState({draging:!1});var a=o.props,s=a.graphModel,l=a.edgeModel,h=a.type,_=a.eventCenter,j=s.nodes,k=o.state,N=k.endX,H=k.endY,$=k.draging,V=Zi({x:N,y:H},j);if($)if(V&&V.node){var K,q=l.getData(),te=Gr(Gr({},q),{},{sourceAnchorId:"",targetAnchorId:"",text:(q==null||(K=q.text)===null||K===void 0?void 0:K.value)||""});h===hn.SOURCE?te=Gr(Gr({},te),{},{sourceNodeId:V.node.id,sourceAnchorId:V.anchor.id,startPoint:{x:V.anchor.x,y:V.anchor.y},targetNodeId:l.targetNodeId,endPoint:Gr({},l.endPoint)}):h===hn.TARGET&&(te=Gr(Gr({},te),{},{sourceNodeId:l.sourceNodeId,startPoint:Gr({},l.startPoint),targetNodeId:V.node.id,targetAnchorId:V.anchor.id,endPoint:{x:V.anchor.x,y:V.anchor.y}})),s.removeEdgeById(l.id);var ie=s.createEdge(Gr({},te));_.emit(Ne.EDGE_EXCHANGE_NODE,{data:{newEdge:ie.getData(),oldEdge:l.getData()}})}else o.recoveryEdge()},o.recoveryEdge=function(){var a=o.props.edgeModel,s=o.oldEdge,l=s.startPoint,h=s.endPoint,_=s.pointsList;a.updateStartPoint(l),a.updateEndPoint(h),a.modelType!==Ie.LINE_EDGE&&(a.pointsList=_,a.initPoints())},o.getAdjustPointStyle=function(){return o.props.graphModel.theme.edgeAdjust},o.state={draging:!1,endX:0,endY:0},o.dragHandler=Ho({onDragStart:o.onDragStart,onDraging:o.onDraging,onDragEnd:o.onDragEnd}),o}return e=i,(r=[{key:"render",value:function(){var o=this.props,a=o.x,s=o.y,l=this.state.draging;return I("g",null,I(Go,cy({className:"lf-edge-adjust-point"},this.getAdjustPointStyle(),{x:a,y:s,onMouseDown:this.dragHandler,"pointer-events":l?"none":""})))}}])&&OO(e.prototype,r),i}(C);function dy(t){return(dy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function ws(){return(ws=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function yy(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function EO(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?yy(Object(r),!0).forEach(function(n){SO(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):yy(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function SO(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function jO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function PO(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function vy(t,e){return(vy=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r})(t,e)}function kO(t){var e=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(r){return!1}}();return function(){var r,n=xs(t);if(e){var i=xs(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return AO(this,r)}}function AO(t,e){if(e&&(dy(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function xs(t){return(xs=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}var Qo=function(t){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&vy(o,a)})(i,t);var e,r,n=kO(i);function i(){var o;jO(this,i);for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return(o=n.call.apply(n,[this].concat(s))).startTime=void 0,o.contextMenuTime=void 0,o.clickTimer=void 0,o.handleHover=function(h,_){var j=o.props,k=j.model,N=j.eventCenter;k.setHovered(h);var H=h?Ne.EDGE_MOUSEENTER:Ne.EDGE_MOUSELEAVE,$=k.getData();N.emit(H,{data:$,e:_})},o.setHoverON=function(h){o.handleHover(!0,h)},o.setHoverOFF=function(h){o.handleHover(!1,h)},o.handleContextMenu=function(h){h.preventDefault(),o.contextMenuTime=new Date().getTime(),o.clickTimer&&clearTimeout(o.clickTimer);var _=o.props,j=_.model,k=_.graphModel,N=_.eventCenter,H=k.getPointByClient({x:h.clientX,y:h.clientY});k.setElementStateById(j.id,$e.SHOW_MENU,H.domOverlayPosition),o.toFront(),k.selectEdgeById(j.id);var $=j==null?void 0:j.getData();N.emit(Ne.EDGE_CONTEXTMENU,{data:$,e:h,position:H})},o.handleMouseDown=function(h){h.stopPropagation(),o.startTime=new Date().getTime()},o.handleMouseUp=function(h){if(o.startTime&&!(new Date().getTime()-o.startTime>200||h.button===2)){var _=h.detail===2,j=o.props,k=j.model,N=j.graphModel,H=j.eventCenter,$=k==null?void 0:k.getData(),V=N.getPointByClient({x:h.clientX,y:h.clientY});if(_){var K=N.editConfig,q=N.textEditElement;if(q&&q.id===k.id&&N.setElementStateById(k.id,$e.DEFAULT),K.edgeTextEdit&&k.text.editable&&N.setElementStateById(k.id,$e.TEXT_EDIT),k.modelType===Ie.POLYLINE_EDGE){var te=k,ie=N.getPointByClient({x:h.x,y:h.y}).canvasOverlayPosition,oe=ie.x,_e=ie.y,me=_f({x:oe,y:_e},te.points);te.dbClickPosition=me}H.emit(Ne.EDGE_DBCLICK,{data:$,e:h,position:V})}else H.emit(Ne.ELEMENT_CLICK,{data:$,e:h,position:V}),H.emit(Ne.EDGE_CLICK,{data:$,e:h,position:V});var Ee=N.editConfig.metaKeyMultipleSelected;N.selectEdgeById(k.id,h.metaKey&&Ee),o.toFront()}},o.getIsDraging=function(){return!1},o}return e=i,(r=[{key:"getAttributes",value:function(){var o=this.props.model,a=o.strokeWidth,s=o.strokeOpacity,l=o.strokeDashArray,h=o.isSelected,_=o.isHovered,j=o.hoverStroke,k=o.selectedStroke,N=o.properties,H=this.props.model.stroke;return _?H=j:h&&(H=k),{stroke:H,strokeWidth:a,strokeOpacity:s,strokeDashArray:l,isSelected:h,isHovered:_,hoverStroke:j,selectedStroke:k,properties:EO({},N)}}},{key:"getShape",value:function(){}},{key:"getTextStyle",value:function(){}},{key:"getText",value:function(){var o=this.props,a=o.model,s=o.graphModel;if(a.state===$e.TEXT_EDIT)return"";var l=s.theme.edgeText,h=this.getTextStyle(),_=st({},l,h),j=!1,k=s.editConfig;return(a.text.draggable||k.edgeTextDraggable)&&(j=!0),I(bO,{editable:k.edgeTextEdit&&a.text.editable,model:a,graphModel:s,style:_,draggable:j})}},{key:"getArrowInfo",value:function(){var o=this.props.model,a=o.startPoint,s=o.endPoint,l=o.isSelected;return{start:a,end:s,hover:this.state.hover,isSelected:l}}},{key:"getArrowStyle",value:function(){var o=this.getAttributes().stroke,a=this.props.graphModel.theme.arrow;return{stroke:o,strokeWidth:1,fill:o,offset:a.offset,verticalLength:a.verticalLength}}},{key:"getArrow",value:function(){var o=this.getArrowInfo(),a=o.start,s=o.end;if(a&&s&&(a.x!==s.x||a.y!==s.y)){var l=this.getArrowStyle();return I(ny,{arrowInfo:o,style:l})}}},{key:"getAdjustPoints",value:function(){var o=this.props,a=o.model,s=o.graphModel,l=o.eventCenter,h=a.getAdjustStart(),_=a.getAdjustEnd();return I("g",null,I(hy,ws({type:"SOURCE"},h,{edgeModel:a,graphModel:s,eventCenter:l})),I(hy,ws({type:"TARGET"},_,{edgeModel:a,graphModel:s,eventCenter:l})))}},{key:"getAppendWidth",value:function(){return I("g",null)}},{key:"getAppend",value:function(){return I("g",{className:"lf-edge-append"},this.getAppendWidth())}},{key:"toFront",value:function(){var o=this.props,a=o.graphModel,s=o.model;a.overlapMode!==kr.INCREASE&&a.toFront(s.id)}},{key:"render",value:function(){var o=this.props,a=o.model.isSelected,s=o.graphModel.editConfig,l=this.getIsDraging(),h=s.adjustEdgeStartAndEnd;return I("g",{className:"lf-edge",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(),h&&a&&!l?this.getAdjustPoints():"")}}])&&PO(e.prototype,r),i}(C);function gy(t){return(gy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function by(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function my(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?by(Object(r),!0).forEach(function(n){DO(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):by(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function DO(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function TO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function MO(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function _y(t,e,r){return(_y=typeof Reflect!="undefined"&&Reflect.get?Reflect.get:function(n,i,o){var a=function(l,h){for(;!Object.prototype.hasOwnProperty.call(l,h)&&(l=ei(l))!==null;);return l}(n,i);if(a){var s=Object.getOwnPropertyDescriptor(a,i);return s.get?s.get.call(o):s.value}})(t,e,r||t)}function Oy(t,e){return(Oy=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r})(t,e)}function NO(t){var e=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(r){return!1}}();return function(){var r,n=ei(t);if(e){var i=ei(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return CO(this,r)}}function CO(t,e){if(e&&(gy(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function ei(t){return(ei=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}var Es=function(t){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&Oy(o,a)})(i,t);var e,r,n=NO(i);function i(){return TO(this,i),n.apply(this,arguments)}return e=i,(r=[{key:"getAttributes",value:function(){var o=this.props.model,a=o.startPoint,s=o.endPoint;return my(my({},_y(ei(i.prototype),"getAttributes",this).call(this)),{},{startPoint:a,endPoint:s})}},{key:"getEdge",value:function(){var o=this.getAttributes(),a=o.stroke,s=o.startPoint,l=o.endPoint,h=o.strokeWidth,_=o.strokeOpacity,j=o.strokeDashArray;return I(co,{x1:s.x,y1:s.y,x2:l.x,y2:l.y,strokeOpacity:_,strokeWidth:h,stroke:a,strokeDasharray:j})}},{key:"getShape",value:function(){return I("g",null,this.getEdge())}},{key:"getAppendWidth",value:function(){var o=this.props.model,a=function(k){var N,H=k.start,$=k.end;if(H.x===$.x&&H.y===$.y)N="";else{var V={start:H,end:$,offset:10,verticalLength:5},K=Bo(Qi(Qi({},V),{},{type:"start"})),q=Bo(Qi(Qi({},V),{},{type:"end"}));N="M".concat(K.leftX," ").concat(K.leftY,`
|
|
L`).concat(K.rightX," ").concat(K.rightY,`
|
|
L`).concat(q.rightX," ").concat(q.rightY,`
|
|
L`).concat(q.leftX," ").concat(q.leftY," z")}return{d:N,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}}({start:o.startPoint,end:o.endPoint}),s=a.d,l=a.strokeWidth,h=a.fill,_=a.strokeDasharray,j=a.stroke;return I(Jo,{d:s,fill:h,strokeWidth:l,stroke:j,strokeDasharray:_})}}])&&MO(e.prototype,r),i}(Qo);function wy(t){return(wy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function RO(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var i=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var o,a,s=[],l=!0,h=!1;try{for(i=i.call(r);!(l=(o=i.next()).done)&&(s.push(o.value),!n||s.length!==n);l=!0);}catch(_){h=!0,a=_}finally{try{l||i.return==null||i.return()}finally{if(h)throw a}}return s}}(t,e)||function(r,n){if(r){if(typeof r=="string")return xy(r,n);var i=Object.prototype.toString.call(r).slice(8,-1);if(i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set")return Array.from(r);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return xy(r,n)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function xy(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var IO=function(t){var e={points:"",fill:"none"};return Object.entries(t).forEach(function(r){var n=RO(r,2),i=n[0],o=n[1];wy(o)!=="object"&&(e[i]=o)}),I("polyline",e)};function Ey(t){return(Ey=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function Sy(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function yo(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Sy(Object(r),!0).forEach(function(n){LO(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Sy(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function LO(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function zO(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var i=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var o,a,s=[],l=!0,h=!1;try{for(i=i.call(r);!(l=(o=i.next()).done)&&(s.push(o.value),!n||s.length!==n);l=!0);}catch(_){h=!0,a=_}finally{try{l||i.return==null||i.return()}finally{if(h)throw a}}return s}}(t,e)||function(r,n){if(r){if(typeof r=="string")return jy(r,n);var i=Object.prototype.toString.call(r).slice(8,-1);if(i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set")return Array.from(r);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return jy(r,n)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function jy(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function BO(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Py(t,e,r){return(Py=typeof Reflect!="undefined"&&Reflect.get?Reflect.get:function(n,i,o){var a=function(l,h){for(;!Object.prototype.hasOwnProperty.call(l,h)&&(l=ti(l))!==null;);return l}(n,i);if(a){var s=Object.getOwnPropertyDescriptor(a,i);return s.get?s.get.call(o):s.value}})(t,e,r||t)}function ky(t,e){return(ky=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r})(t,e)}function XO(t){var e=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(r){return!1}}();return function(){var r,n=ti(t);if(e){var i=ti(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return FO(this,r)}}function FO(t,e){if(e&&(Ey(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function ti(t){return(ti=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}var Ss=function(t){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&ky(o,a)})(i,t);var e,r,n=XO(i);function i(){var o;return function(a,s){if(!(a instanceof s))throw new TypeError("Cannot call a class as a function")}(this,i),(o=n.call(this)).drag=void 0,o.isDraging=void 0,o.appendInfo=void 0,o.dragHandler=void 0,o.onDragStart=function(){o.props.model.dragAppendStart()},o.onDraging=function(a){var s=a.deltaX,l=a.deltaY,h=o.props,_=h.model,j=h.graphModel;o.isDraging=!0;var k=j.transformMatrix,N=j.editConfig,H=zO(k.fixDeltaXY(s,l),2),$=H[0],V=H[1],K=_,q=N.adjustEdgeMiddle;o.appendInfo=q?K.dragAppendSimple(o.appendInfo,{x:$,y:V}):K.dragAppend(o.appendInfo,{x:$,y:V})},o.onDragEnd=function(){var a=o.props,s=a.model,l=a.eventCenter,h=s;h.dragAppendEnd(),o.isDraging=!1,o.appendInfo=void 0,l.emit(Ne.EDGE_ADJUST,{data:h.getData()})},o.beforeDragStart=function(a,s){s.dragAble&&o.dragHandler(a),o.appendInfo=s},o.getIsDraging=function(){return o.isDraging},o.drag=Ho({onDragStart:o.onDragStart,onDraging:o.onDraging,onDragEnd:o.onDragEnd,isStopPropagation:!1}),o}return e=i,(r=[{key:"getAttributes",value:function(){var o=Py(ti(i.prototype),"getAttributes",this).call(this),a=this.props.model.points;return yo(yo({},o),{},{points:a})}},{key:"getEdge",value:function(){var o=this.getAttributes(),a=o.points,s=o.strokeWidth,l=o.stroke,h=o.strokeDashArray;return I(IO,{points:a,strokeWidth:s,stroke:l,strokeDasharray:h})}},{key:"getShape",value:function(){return I("g",null,this.getEdge())}},{key:"getArrowInfo",value:function(){var o=this.props.model,a=o.points,s=o.isSelected,l={start:null,end:null,hover:this.state.hover,isSelected:s},h=ao(a);return h.length>=2&&(l.start=h[h.length-2],l.end=h[h.length-1]),l}},{key:"getAppendAttibutes",value:function(o){var a,s=o.start,l=o.end;if(s.x===l.x&&s.y===l.y)a="";else{var h={start:s,end:l,offset:10,verticalLength:5},_=Bo(yo(yo({},h),{},{type:"start"})),j=Bo(yo(yo({},h),{},{type:"end"}));a="M".concat(_.leftX," ").concat(_.leftY,`
|
|
L`).concat(_.rightX," ").concat(_.rightY,`
|
|
L`).concat(j.rightX," ").concat(j.rightY,`
|
|
L`).concat(j.leftX," ").concat(j.leftY," z")}return{d:a,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}}},{key:"getAppendShape",value:function(o){var a=this.getAppendAttibutes(o),s=a.d,l=a.strokeWidth,h=a.fill,_=a.strokeDasharray,j=a.stroke;return I(Jo,{d:s,fill:h,strokeWidth:l,stroke:j,strokeDasharray:_})}},{key:"getAppendWidth",value:function(){for(var o=this,a=this.props,s=a.model,l=a.graphModel,h=s.pointsList,_=s.draggable,j=[],k=h.length,N=function($){var V="lf-polyline-append",K={start:{x:h[$].x,y:h[$].y},end:{x:h[$+1].x,y:h[$+1].y},startIndex:$,endIndex:$+1,direction:"",dragAble:!0},q=I("g",{className:V},o.getAppendShape(K)),te=l.editConfig,ie=te.adjustEdge,oe=te.adjustEdgeMiddle;if(ie&&_){o.dragHandler=o.drag;var _e=K.startIndex,me=K.endIndex,Ee=oe&&(_e===0||me===k-1);K.dragAble=!Ee,K.start.x===K.end.x?(K.dragAble&&(V+="-ew-resize"),K.direction=ot.VERTICAL):K.start.y===K.end.y&&(K.dragAble&&(V+="-ns-resize"),K.direction=ot.HORIZONTAL),q=I("g",{className:o.isDraging?"lf-dragging":"lf-drag-able",onMouseDown:function(Ge){return o.beforeDragStart(Ge,K)}},I("g",{className:V},o.getAppendShape(K)))}else o.dragHandler=function(){};j.push(q)},H=0;H<k-1;H++)N(H);return I("g",null,j)}}])&&BO(e.prototype,r),i}(Qo);function Ay(t){return(Ay=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function HO(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var i=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var o,a,s=[],l=!0,h=!1;try{for(i=i.call(r);!(l=(o=i.next()).done)&&(s.push(o.value),!n||s.length!==n);l=!0);}catch(_){h=!0,a=_}finally{try{l||i.return==null||i.return()}finally{if(h)throw a}}return s}}(t,e)||function(r,n){if(r){if(typeof r=="string")return Dy(r,n);var i=Object.prototype.toString.call(r).slice(8,-1);if(i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set")return Array.from(r);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Dy(r,n)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Dy(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Ty(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function My(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ty(Object(r),!0).forEach(function(n){UO(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ty(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function UO(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function GO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function WO(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ny(t,e,r){return(Ny=typeof Reflect!="undefined"&&Reflect.get?Reflect.get:function(n,i,o){var a=function(l,h){for(;!Object.prototype.hasOwnProperty.call(l,h)&&(l=ri(l))!==null;);return l}(n,i);if(a){var s=Object.getOwnPropertyDescriptor(a,i);return s.get?s.get.call(o):s.value}})(t,e,r||t)}function Cy(t,e){return(Cy=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r})(t,e)}function YO(t){var e=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(r){return!1}}();return function(){var r,n=ri(t);if(e){var i=ri(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return VO(this,r)}}function VO(t,e){if(e&&(Ay(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function ri(t){return(ri=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}var js=function(t){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&Cy(o,a)})(i,t);var e,r,n=YO(i);function i(){return GO(this,i),n.apply(this,arguments)}return e=i,(r=[{key:"getAttributes",value:function(){var o=Ny(ri(i.prototype),"getAttributes",this).call(this),a=this.props.model.path;return My(My({},o),{},{path:a})}},{key:"getEdge",value:function(){var o=this.getAttributes(),a=o.path,s=o.strokeWidth,l=o.stroke,h=o.strokeDashArray;return I(Jo,{d:a,strokeWidth:s,stroke:l,fill:"none",strokeDasharray:h})}},{key:"getShape",value:function(){return I("g",null,this.getEdge())}},{key:"getAppendWidth",value:function(){var o=this.getAttributes().path;return I(Jo,{d:o,strokeWidth:10,stroke:"transparent",fill:"none"})}},{key:"getArrowInfo",value:function(){var o=this.props.model,a=this.state.hover,s=o,l=s.path,h=s.isSelected,_=HO(function(j){var k=ia(j);return[k[2],k[3]]}(l),2);return{start:_[0],end:_[1],hover:a,isSelected:h}}}])&&WO(e.prototype,r),i}(Qo),Ry=function(t,e){return Ja(t,e)},$O=function(t){var e=t==null?0:t.length;return e?t[e-1]:void 0},Ps=function(){return nr.a.Date.now()},KO=/\s/,qO=function(t){for(var e=t.length;e--&&KO.test(t.charAt(e)););return e},ZO=/^\s+/,JO=function(t){return t&&t.slice(0,qO(t)+1).replace(ZO,"")},QO=/^[-+]0x[0-9a-f]+$/i,e1=/^0b[01]+$/i,t1=/^0o[0-7]+$/i,r1=parseInt,Iy=function(t){if(typeof t=="number")return t;if(Gi(t))return NaN;if(v(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=v(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=JO(t);var r=e1.test(t);return r||t1.test(t)?r1(t.slice(2),r?2:8):QO.test(t)?NaN:+t},n1=Math.max,o1=Math.min,i1=function(t,e,r){var n,i,o,a,s,l,h=0,_=!1,j=!1,k=!0;if(typeof t!="function")throw new TypeError("Expected a function");function N(te){var ie=n,oe=i;return n=i=void 0,h=te,a=t.apply(oe,ie)}function H(te){return h=te,s=setTimeout(V,e),_?N(te):a}function $(te){var ie=te-l;return l===void 0||ie>=e||ie<0||j&&te-h>=o}function V(){var te=Ps();if($(te))return K(te);s=setTimeout(V,function(ie){var oe=e-(ie-l);return j?o1(oe,o-(ie-h)):oe}(te))}function K(te){return s=void 0,k&&n?N(te):(n=i=void 0,a)}function q(){var te=Ps(),ie=$(te);if(n=arguments,i=this,l=te,ie){if(s===void 0)return H(l);if(j)return clearTimeout(s),s=setTimeout(V,e),N(l)}return s===void 0&&(s=setTimeout(V,e)),a}return e=Iy(e)||0,v(r)&&(_=!!r.leading,o=(j="maxWait"in r)?n1(Iy(r.maxWait)||0,e):o,k="trailing"in r?!!r.trailing:k),q.cancel=function(){s!==void 0&&clearTimeout(s),h=0,n=l=i=s=void 0},q.flush=function(){return s===void 0?a:K(Ps())},q},a1=u(140);function u1(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var Ly,zy,By,s1=function(){function t(n){(function(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),this.undos=[],this.redos=[],this.callbacks=[],this.stopWatch=null,this.curData=null,this.maxSize=50,this.waitTime=100,this.eventCenter=void 0,this.eventCenter=n}var e,r;return e=t,(r=[{key:"add",value:function(n){Ry($O(this.undos),n)||(this.undos.push(n),Ry(this.curData,n)||(this.redos=[]),this.eventCenter.emit(Ne.HISTORY_CHANGE,{data:{undos:this.undos,redos:this.redos,undoAble:this.undos.length>1,redoAble:this.redos.length>0}}),this.undos.length>this.maxSize&&this.undos.shift())}},{key:"undoAble",value:function(){return this.undos.length>1}},{key:"undo",value:function(){if(this.undoAble()){var n=this.undos.pop();this.redos.push(n);var i=this.undos.pop();return this.curData=au(i),i}}},{key:"redoAble",value:function(){return this.redos.length>0}},{key:"redo",value:function(){if(this.redoAble()){var n=this.redos.pop();return this.curData=au(n),n}}},{key:"watch",value:function(n){var i=this;this.stopWatch&&this.stopWatch(),this.undos.push(n.modelToGraphData()),this.stopWatch=Object(a1.a)(n,i1(function(){var o=n.modelToHistoryData();o&&i.add(o)},this.waitTime))}}])&&u1(e.prototype,r),t}();function Xy(t){return(Xy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function c1(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var i=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var o,a,s=[],l=!0,h=!1;try{for(i=i.call(r);!(l=(o=i.next()).done)&&(s.push(o.value),!n||s.length!==n);l=!0);}catch(_){h=!0,a=_}finally{try{l||i.return==null||i.return()}finally{if(h)throw a}}return s}}(t,e)||function(r,n){if(r){if(typeof r=="string")return Fy(r,n);var i=Object.prototype.toString.call(r).slice(8,-1);if(i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set")return Array.from(r);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Fy(r,n)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Fy(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Hy(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function vo(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Hy(Object(r),!0).forEach(function(n){l1(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Hy(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function l1(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Uy(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Gy(t,e){return(Gy=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r})(t,e)}function f1(t){var e=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(r){return!1}}();return function(){var r,n=ks(t);if(e){var i=ks(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return p1(this,r)}}function p1(t,e){if(e&&(Xy(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function ks(t){return(ks=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}var Wy,Yy,Vy,As=_r((By=zy=function(t){(function(a,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(s&&s.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),s&&Gy(a,s)})(o,t);var e,r,n,i=f1(o);function o(){var a;return function(s,l){if(!(s instanceof l))throw new TypeError("Cannot call a class as a function")}(this,o),(a=i.call(this)).ref={current:null},a.__prevText={type:"",text:"",id:""},a.keyupHandler=function(s){var l=s.target.innerText,h=a.props.graphModel.textEditElement;s.keyCode===13&&s.altKey&&h.setElementState(0),a.__prevText={type:h.type,text:l,id:h.id}},a.state={style:{left:0,top:0}},a}return e=o,n=[{key:"getDerivedStateFromProps",value:function(a){var s,l=a.graphModel,h=l.transformMatrix,_=l.theme,j=l.textEditElement;if(j){var k;if((k=j.text)===null||k===void 0||!k.value)if(j.BaseType===vt.EDGE){var N=(j=j).text,H=j.textPosition,$=H.x,V=H.y;N.x=$,N.y=V,j.setText(N)}else j=j;var K={resize:"auto",whiteSpace:"normal",wordBreak:"break-all"};if(j.BaseType===vt.EDGE){var q=_.edgeText,te=q.autoWrap,ie=q.lineHeight,oe=q.wrapPadding,_e=j.textWidth;te&&_e&&(s=vo(vo({},K),{},{width:_e,minWidth:_e,lineHeight:ie,padding:oe}))}else if(j.BaseType===vt.NODE){var me=_.nodeText,Ee=me.autoWrap,Ge=me.lineHeight,Ke=me.wrapPadding,Nt=j,Or=Nt.width,Qt=Nt.textWidth,ni=Nt.modelType;(ni!==Ie.TEXT_NODE&&Ee||ni===Ie.TEXT_NODE&&Ee&&Qt)&&(s=vo(vo({},K),{},{width:Qt||Or,minWidth:Qt||Or,lineHeight:Ge,padding:Ke}))}var oi=j.text,va=oi.x,Cs=oi.y,ga=c1(h.CanvasPointToHtmlPoint([va,Cs]),2);return{style:vo({left:ga[0],top:ga[1]},s)}}}}],(r=[{key:"componentDidMount",value:function(){this.ref.current&&(this.ref.current.focus(),this.placeCaretAtEnd(this.ref.current));var a=this.props.graphModel,s=a.eventCenter,l=a.editConfig,h=l.edgeTextEdit,_=l.nodeTextEdit;(h||_)&&s.on(Ne.GRAPH_TRANSFORM,function(){a.textEditElement&&a.textEditElement.setElementState($e.DEFAULT)})}},{key:"componentDidUpdate",value:function(){var a=this.props.graphModel;if(this.ref.current&&(this.ref.current.focus(),this.placeCaretAtEnd(this.ref.current)),this.__prevText.id!==""){var s=this.__prevText,l=s.text,h=s.id;a.setElementTextById(h,l),a.eventCenter.emit(Ne.TEXT_UPDATE,vo({},this.__prevText)),this.__prevText.id="",this.__prevText.text="",this.__prevText.type=""}}},{key:"placeCaretAtEnd",value:function(a){if(window.getSelection!==void 0&&document.createRange!==void 0){var s=document.createRange();s.selectNodeContents(a),s.collapse(!1);var l=window.getSelection();l.removeAllRanges(),l.addRange(s)}}},{key:"render",value:function(){var a,s=this.props.graphModel.textEditElement,l=this.state.style;return s?I("div",{contentEditable:!0,className:"lf-text-input",style:l,ref:this.ref,key:s.id,onKeyUp:this.keyupHandler},(a=s.text)===null||a===void 0?void 0:a.value):null}}])&&Uy(e.prototype,r),n&&Uy(e,n),o}(C),zy.toolName="textEdit",Ly=By))||Ly,h1=function(t){return t.modelType===Ie.LINE_EDGE?function(e){var r=e.startPoint,n=e.endPoint,i=(r.x+n.x)/2,o=(r.y+n.y)/2,a=Math.abs(r.x-n.x)+10,s=Math.abs(r.y-n.y)+10;return{x:i-a/2,y:o-s/2,x1:i+a/2,y1:o+s/2}}(t):t.modelType===Ie.POLYLINE_EDGE?function(e){var r=e.points,n=ao(r),i=Xo(n,8),o=i.x,a=i.y,s=i.width,l=i.height;return{x:o-s/2,y:a-l/2,x1:o+s/2,y1:a+l/2}}(t):t.modelType===Ie.BEZIER_EDGE?function(e){var r=e.path,n=ia(r),i=Xo(n,8),o=i.x,a=i.y,s=i.width,l=i.height;return{x:o-s/2,y:a-l/2,x1:o+s/2,y1:a+l/2}}(t):void 0};function $y(t){return($y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function Ky(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var i=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var o,a,s=[],l=!0,h=!1;try{for(i=i.call(r);!(l=(o=i.next()).done)&&(s.push(o.value),!n||s.length!==n);l=!0);}catch(_){h=!0,a=_}finally{try{l||i.return==null||i.return()}finally{if(h)throw a}}return s}}(t,e)||qy(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function d1(t){return function(e){if(Array.isArray(e))return Ds(e)}(t)||function(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||qy(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function qy(t,e){if(t){if(typeof t=="string")return Ds(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ds(t,e):void 0}}function Ds(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function y1(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Zy(t,e){return(Zy=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r})(t,e)}function v1(t){var e=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(r){return!1}}();return function(){var r,n=Ts(t);if(e){var i=Ts(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return g1(this,r)}}function g1(t,e){if(e&&($y(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(t)}function Ts(t){return(Ts=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(t)}var Ms=_r((Vy=Yy=function(t){(function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),a&&Zy(o,a)})(i,t);var e,r,n=v1(i);function i(o){var a;(function(h,_){if(!(h instanceof _))throw new TypeError("Cannot call a class as a function")})(this,i),(a=n.call(this)).stepDrag=void 0,a.handleMouseDown=function(h){a.stepDrag.handleMouseDown(h)},a.onDraging=function(h){var _=h.deltaX,j=h.deltaY,k=a.props.graphModel;k.moveElements(k.getSelectElements(!0),_,j)},a.handleContextMenu=function(h){h.preventDefault();var _=a.props,j=_.graphModel,k=_.graphModel,N=k.eventCenter,H=k.selectElements,$=j.getPointByClient({x:h.clientX,y:h.clientY}),V={nodes:[],edges:[]};d1(H.values()).forEach(function(K){K.BaseType===vt.NODE&&V.nodes.push(K.getData()),K.BaseType===vt.EDGE&&V.edges.push(K.getData())}),N.emit(Ne.SELECTION_CONTEXTMENU,{data:V,e:h,position:$})};var s=o.graphModel.gridSize,l=o.eventCenter;return a.stepDrag=new Uo({onDraging:a.onDraging,step:s,eventType:"multiple:select",eventCenter:l}),a}return e=i,(r=[{key:"render",value:function(){var o=this.props.graphModel,a=o.selectElements,s=o.transformMatrix;if(!(a.size<=1)){var l=Number.MAX_SAFE_INTEGER,h=Number.MAX_SAFE_INTEGER,_=Number.MIN_SAFE_INTEGER,j=Number.MIN_SAFE_INTEGER;a.forEach(function(H){var $={x:0,y:0,x1:0,y1:0};H.BaseType===vt.NODE&&($=function(V){var K=V.x,q=V.y,te=V.width,ie=V.height;return{x:K-te/2,y:q-ie/2,x1:K+te/2,y1:q+ie/2}}(H)),H.BaseType===vt.EDGE&&($=h1(H)),l=Math.min(l,$.x),h=Math.min(h,$.y),_=Math.max(_,$.x1),j=Math.max(j,$.y1)});var k=Ky(s.CanvasPointToHtmlPoint([l,h]),2);l=k[0],h=k[1];var N=Ky(s.CanvasPointToHtmlPoint([_,j]),2);return _=N[0],j=N[1],I("div",{className:"lf-multiple-select",style:{left:"".concat(l-10,"px"),top:"".concat(h-10,"px"),width:"".concat(_-l+20,"px"),height:"".concat(j-h+20,"px")},onMouseDown:this.handleMouseDown,onContextMenu:this.handleContextMenu})}}}])&&y1(e.prototype,r),i}(C),Yy.toolName="multipleSelect",Wy=Vy))||Wy;function b1(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var m1=function(){function t(n){(function(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")})(this,t),this.tools=void 0,this.components=void 0,this.toolMap=new Map,this.instance=void 0,this.instance=n,this.isDisabledTool(As.toolName)||this.registerTool(As.toolName,As),this.isDisabledTool(Ms.toolName)||this.registerTool(Ms.toolName,Ms)}var e,r;return e=t,(r=[{key:"isDisabledTool",value:function(n){return this.instance.options.disabledTools.indexOf(n)!==-1}},{key:"registerTool",value:function(n,i){this.toolMap.set(n,i)}},{key:"getTools",value:function(){return Array.from(this.toolMap.values())}},{key:"getInstance",value:function(){return this.instance}}])&&b1(e.prototype,r),t}();u(182);function _1(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var O1=function(){function t(){(function(n,i){if(!(n instanceof i))throw new TypeError("Cannot call a class as a function")})(this,t),this._events={}}var e,r;return e=t,(r=[{key:"on",value:function(n,i,o){var a=this;return n.split(",").forEach(function(s){s=s.trim(),a._events[s]||(a._events[s]=[]),a._events[s].push({callback:i,once:!!o})}),this}},{key:"once",value:function(n,i){var o=this;n.split(",").forEach(function(a){return a=a.trim(),o.on(a,i,!0)})}},{key:"emit",value:function(n,i){var o=this;n.split(",").forEach(function(a){var s=o._events[a]||[],l=o._events["*"]||[],h=function(_){for(var j=_.length,k=0;k<j;k++)if(_[k]){var N=_[k],H=N.callback;N.once&&(_.splice(k,1),_.length===0&&delete o._events[a],j--,k--),H.apply(o,[i])}};h(s),h(l)})}},{key:"off",value:function(n,i){var o=this;return n||(this._events={}),n.split(",").forEach(function(a){if(i){for(var s=o._events[a]||[],l=s.length,h=0;h<l;h++)s[h].callback===i&&(s.splice(h,1),l--,h--);s.length===0&&delete o._events[a]}else delete o._events[a]}),this}},{key:"getEvents",value:function(){return this._events}}])&&_1(e.prototype,r),t}(),w1=u(141),x1=u.n(w1);function E1(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var Jy=function(){function t(n){(function(o,a){if(!(o instanceof a))throw new TypeError("Cannot call a class as a function")})(this,t),this.mousetrap=void 0,this.options=void 0,this.target=void 0,n.keyboard||(n.keyboard={enabled:!1}),this.options=n;var i=n.lf;this.target=i.container,this.mousetrap=new x1.a(this.target),n.keyboard.enabled&&this.enable(!0)}var e,r;return e=t,(r=[{key:"initShortcuts",value:function(){var n=this,i=this.options.keyboard.shortcuts;if(i)if(qt(i))i.forEach(function(l){var h=l.keys,_=l.callback,j=l.action;return n.on(h,_,j)});else{var o=i.keys,a=i.callback,s=i.action;this.on(o,a,s)}}},{key:"on",value:function(n,i,o){this.mousetrap.bind(this.getKeys(n),i,o)}},{key:"disabled",get:function(){return this.options.keyboard.enabled!==!0}},{key:"off",value:function(n,i){this.mousetrap.unbind(this.getKeys(n),i)}},{key:"enable",value:function(n){(this.disabled||n)&&(this.options.keyboard.enabled=!0,this.target instanceof HTMLElement&&(this.target.setAttribute("tabindex","-1"),this.target.style.outline="none"))}},{key:"disable",value:function(){this.disabled||(this.options.keyboard.enabled=!1,this.target instanceof HTMLElement&&this.target.removeAttribute("tabindex"))}},{key:"getKeys",value:function(n){var i=this;return(Array.isArray(n)?n:[n]).map(function(o){return i.formatkey(o)})}},{key:"formatkey",value:function(n){return n.toLowerCase().replace(/\s/g,"").replace("delete","del").replace("cmd","command")}}])&&E1(e.prototype,r),t}(),S1=Jy,Wr=null;function Qy(t,e){return t.x+=e,t.y+=e,t.text&&(t.text.x+=e,t.text.y+=e),t}function ev(t,e){return t.startPoint&&(t.startPoint.x+=e,t.startPoint.y+=e),t.endPoint&&(t.endPoint.x+=e,t.endPoint.y+=e),t.pointsList&&t.pointsList.length>0&&t.pointsList.forEach(function(r){r.x+=e,r.y+=e}),t.text&&(t.text.x+=e,t.text.y+=e),t}function tv(t){return(tv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function rv(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function nv(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?rv(Object(r),!0).forEach(function(n){j1(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):rv(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function j1(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ov(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var Ns=function(){function t(i){var o=this;(function($,V){if(!($ instanceof V))throw new TypeError("Cannot call a class as a function")})(this,t),this.container=void 0,this.width=void 0,this.height=void 0,this.graphModel=void 0,this.history=void 0,this.viewMap=new Map,this.tool=void 0,this.keyboard=void 0,this.dnd=void 0,this.options=void 0,this.getSnapshot=void 0,this.eventCenter=void 0,this.snaplineModel=void 0,this.components=[],this.adapterIn=void 0,this.adapterOut=void 0,this.getView=function($){return o.viewMap.get($)};var a,s,l=i.container,h=i.width,_=i.height,j=i.dndOptions,k=i.keyboard,N=i.isSilentMode,H=i.snapline;this.options=Np(i),this.container=l,this.width=h||l.getBoundingClientRect().width,this.height=_||l.getBoundingClientRect().height,this.tool=new m1(this),this.eventCenter=new O1,this.history=new s1(this.eventCenter),this.dnd=new R0({options:j,lf:this}),this.keyboard=new S1({lf:this,keyboard:k}),this.graphModel=new Um(nv(nv({},this.options),{},{eventCenter:this.eventCenter,rootEl:this.container,width:this.width,height:this.height})),N||H===!1||(this.snaplineModel=new ad(this.graphModel),a=this.eventCenter,s=this.snaplineModel,a.on("node:mousemove",function($){var V=$.data;s.setNodeSnapLine(V)}),a.on("node:mouseup",function(){s.clearSnapline()})),function($,V){var K=$.keyboard,q=K.options.keyboard;K.on(["cmd + c","ctrl + c"],function(){if(q.enabled&&!V.textEditElement){var te=$.options.guards,ie=V.getSelectElements(!1);return te&&te.beforeClone&&!te.beforeClone(ie)?(Wr=null,!1):((Wr=ie).nodes.forEach(function(oe){return Qy(oe,40)}),Wr.edges.forEach(function(oe){return ev(oe,40)}),!1)}}),K.on(["cmd + v","ctrl + v"],function(){if(q.enabled&&!V.textEditElement){if(Wr&&(Wr.nodes||Wr.edges)){$.clearSelectElements();var te=$.addElements(Wr);if(!te)return;te.nodes.forEach(function(ie){return $.select(ie.id,!0)}),te.edges.forEach(function(ie){return $.select(ie.id,!0)}),Wr.nodes.forEach(function(ie){return Qy(ie,40)}),Wr.edges.forEach(function(ie){return ev(ie,40)})}return!1}}),K.on(["cmd + z","ctrl + z"],function(){if(q.enabled&&!V.textEditElement)return $.undo(),!1}),K.on(["cmd + y","ctrl + y"],function(){if(q.enabled&&!V.textEditElement)return $.redo(),!1}),K.on(["backspace"],function(){if(q.enabled&&!V.textEditElement){var te=V.getSelectElements(!0);return $.clearSelectElements(),te.edges.forEach(function(ie){return $.deleteEdge(ie.id)}),te.nodes.forEach(function(ie){return $.deleteNode(ie.id)}),!1}})}(this,this.graphModel),this.keyboard.initShortcuts(),this.defaultRegister(),this.installPlugins(i.disabledPlugins)}var e,r,n;return e=t,n=[{key:"use",value:function(i){var o=i.pluginName;o||(o=i.name);var a=this.extensions.get(o);a&&a.destroy&&a.destroy(),this.extensions.set(o,i)}}],(r=[{key:"on",value:function(i,o){this.eventCenter.on(i,o)}},{key:"off",value:function(i,o){this.eventCenter.off(i,o)}},{key:"once",value:function(i,o){this.eventCenter.once(i,o)}},{key:"emit",value:function(i,o){this.eventCenter.emit(i,o)}},{key:"installPlugins",value:function(){var i=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];t.extensions.forEach(function(a){var s=a.pluginName||a.name;o.indexOf(s)===-1&&i.__installPlugin(a)})}},{key:"__installPlugin",value:function(i){if(tv(i)==="object"){var o=i.install,a=i.render;return o&&o.call(i,this,t),void(a&&this.components.push(a.bind(i)))}var s=new i({lf:this,LogicFlow:t});s.render&&this.components.push(s.render.bind(s))}},{key:"register",value:function(i,o){var a=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];if(typeof i=="string"){var s={BaseEdge:Qo,BaseEdgeModel:vu,BaseNode:Ur,BaseNodeModel:Hr,RectNode:us,RectNodeModel:Ku,CircleNode:cs,CircleNodeModel:zu,PolygonNode:fs,PolygonNodeModel:Vu,TextNode:vs,TextNodeModel:Ju,LineEdge:Es,LineEdgeModel:mu,DiamondNode:hs,DiamondNodeModel:Fu,PolylineEdge:Ss,PolylineEdgeModel:_u,BezierEdge:js,BezierEdgeModel:Iu,EllipseNode:ds,EllipseNodeModel:Gu,HtmlNode:bs,HtmlNodeModel:es,h:I,type:i};this.viewMap.forEach(function(k){var N=k.extendKey;N&&(s[N]=k)}),this.graphModel.modelMap.forEach(function(k){var N=k.extendKey;N&&(s[N]=k)});var l=o(s),h=l.view,_=l.model,j=h;a&&!j.isObervered&&(j.isObervered=!0,j=rr(j)),this.setView(i,j),this.graphModel.setModel(i,_)}else this._registerElement(i)}},{key:"_registerElement",value:function(i){var o=i.view;i.isObserverView===!1||o.isObervered||(o.isObervered=!0,o=rr(o)),this.setView(i.type,o),this.graphModel.setModel(i.type,i.model)}},{key:"defaultRegister",value:function(){this._registerElement({view:us,model:Ku,type:"rect"}),this._registerElement({type:"circle",view:cs,model:zu}),this._registerElement({type:"polygon",view:fs,model:Vu}),this._registerElement({type:"line",view:Es,model:mu}),this._registerElement({type:"polyline",view:Ss,model:_u}),this._registerElement({type:"bezier",view:js,model:Iu}),this._registerElement({type:"text",view:vs,model:Ju}),this._registerElement({type:"ellipse",view:ds,model:Gu}),this._registerElement({type:"diamond",view:hs,model:Fu}),this._registerElement({type:"html",view:bs,model:es})}},{key:"undo",value:function(){if(this.history.undoAble()){var i=ir(this.history.undo());this.clearSelectElements(),this.graphModel.graphDataToModel(i)}}},{key:"redo",value:function(){if(this.history.redoAble()){var i=ir(this.history.redo());this.clearSelectElements(),this.graphModel.graphDataToModel(i)}}},{key:"zoom",value:function(i,o){var a=this.graphModel.transformMatrix;return a.zoom(i,o),"".concat(100*a.SCALE_X,"%")}},{key:"resetZoom",value:function(){this.graphModel.transformMatrix.resetZoom()}},{key:"setZoomMiniSize",value:function(i){this.graphModel.transformMatrix.setZoomMiniSize(i)}},{key:"setZoomMaxSize",value:function(i){this.graphModel.transformMatrix.setZoomMaxSize(i)}},{key:"getTransform",value:function(){var i=this.graphModel.transformMatrix;return{SCALE_X:i.SCALE_X,SCALE_Y:i.SCALE_Y,TRANSLATE_X:i.TRANSLATE_X,TRANSLATE_Y:i.TRANSLATE_Y}}},{key:"translate",value:function(i,o){this.graphModel.transformMatrix.translate(i,o)}},{key:"resetTranslate",value:function(){var i=this.graphModel.transformMatrix,o=i.TRANSLATE_X,a=i.TRANSLATE_Y;this.translate(-o,-a)}},{key:"select",value:function(i){var o=arguments.length>1&&arguments[1]!==void 0&&arguments[1];this.graphModel.selectElementById(i,o)}},{key:"focusOn",value:function(i){var o=this.graphModel.transformMatrix,a=i.coordinate,s=i.id;if(!a){var l=this.getNodeModel(s);l&&(a=l.getData());var h=this.getEdgeModelById(s);h&&(a=h.textPosition)}var _=a,j=_.x,k=_.y;o.focusOn(j,k,this.width,this.height)}},{key:"setTheme",value:function(i){this.graphModel.setTheme(i)}},{key:"setDefaultEdgeType",value:function(i){this.options.edgeType=i,this.graphModel.changeEdgeType(i)}},{key:"updateText",value:function(i,o){this.graphModel.setElementTextById(i,o)}},{key:"deleteElement",value:function(i){return this.graphModel.getNodeModel(i)?this.deleteNode(i):!!this.graphModel.getEdgeModel(i)&&this.deleteEdge(i)}},{key:"changeNodeType",value:function(i,o){this.graphModel.changeNodeType(i,o)}},{key:"getNodeEdges",value:function(i){return this.graphModel.getNodeEdges(i)}},{key:"addNode",value:function(i){return this.graphModel.addNode(i)}},{key:"deleteNode",value:function(i){var o=this.graphModel.getNodeModel(i);if(!o)return!1;var a=o.getData(),s=this.options.guards,l=!s||!s.beforeDelete||s.beforeDelete(a);return l&&this.graphModel.deleteNode(i),l}},{key:"editNodeText",value:function(i){this.graphModel.setTextEditable(i)}},{key:"cloneNode",value:function(i){var o=this.graphModel.getNodeModel(i).getData(),a=this.options.guards;if(!a||!a.beforeClone||a.beforeClone(o))return this.graphModel.cloneNode(i)}},{key:"createEdge",value:function(i){this.graphModel.createEdge(i)}},{key:"deleteEdge",value:function(i){var o=this.options.guards,a=this.graphModel.edgesMap[i];if(!a)return!1;var s=a.model.getData(),l=!o||!o.beforeDelete||o.beforeDelete(s);return l&&this.graphModel.removeEdgeById(i),l}},{key:"removeEdge",value:function(i){var o=i.sourceNodeId,a=i.targetNodeId;o&&a?this.graphModel.removeEdge(o,a):o?this.graphModel.removeEdgeBySource(o):a&&this.graphModel.removeEdgeByTarget(a)}},{key:"getNodeModel",value:function(i){return this.graphModel.getNodeModel(i)}},{key:"getNodeData",value:function(i){return this.graphModel.getNodeModel(i).getData()}},{key:"setNodeData",value:function(i){var o=i.id;this.graphModel.getNodeModel(o).updateData(i)}},{key:"getEdgeModel",value:function(i){return this.getEdge(i)}},{key:"getEdgeModelById",value:function(i){var o;return(o=this.graphModel.edgesMap[i])===null||o===void 0?void 0:o.model}},{key:"getEdge",value:function(i){var o=this.graphModel,a=o.edges,s=o.edgesMap,l=i.id,h=i.sourceNodeId,_=i.targetNodeId;if(l)return s[l]?[s[l].model]:void 0;if(h&&_){var j=[];return a.forEach(function(H){H.sourceNodeId===h&&H.targetNodeId===_&&j.push(H)}),j}if(h){var k=[];return a.forEach(function(H){H.sourceNodeId===h&&k.push(H)}),k}if(_){var N=[];return a.forEach(function(H){H.targetNodeId===_&&N.push(H)}),N}return[]}},{key:"getEdgeData",value:function(i){var o;return(o=this.getEdgeModelById(i))===null||o===void 0?void 0:o.getData()}},{key:"setEdgeData",value:function(i){var o,a=i.id;return(o=this.getEdgeModelById(a))===null||o===void 0?void 0:o.updateData(i)}},{key:"getGraphData",value:function(){var i=this.graphModel.modelToGraphData();return this.adapterOut?this.adapterOut(i):i}},{key:"getGraphRawData",value:function(){return this.graphModel.modelToGraphData()}},{key:"setProperties",value:function(i,o){var a;(a=this.graphModel.getElement(i))===null||a===void 0||a.setProperties(ir(o))}},{key:"getProperties",value:function(i){var o;return(o=this.graphModel.getElement(i))===null||o===void 0?void 0:o.getProperties()}},{key:"changeNodeId",value:function(i,o){return this.graphModel.changeNodeId(i,o)}},{key:"changeEdgeId",value:function(i,o){return this.graphModel.changeEdgeId(i,o)}},{key:"updateEditConfig",value:function(i){this.graphModel.editConfig.updateEditConfig(i)}},{key:"getEditConfig",value:function(){return this.graphModel.editConfig.getConfig()}},{key:"getPointByClient",value:function(i,o){return this.graphModel.getPointByClient({x:i,y:o})}},{key:"getSelectElements",value:function(){var i=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return this.graphModel.getSelectElements(i)}},{key:"updateAttributes",value:function(i,o){this.graphModel.updateAttributes(i,o)}},{key:"clearData",value:function(){this.graphModel.clearData()}},{key:"setElementZIndex",value:function(i,o){return this.graphModel.setElementZIndex(i,o)}},{key:"addElements",value:function(i){for(var o=this,a=i.nodes,s=i.edges,l={},h={nodes:[],edges:[]},_=0;_<a.length;_++){var j=a[_],k=j.id,N=this.addNode(j);if(!N)return;k&&(l[k]=N.id),h.nodes.push(N)}return s.forEach(function(H){var $=H.sourceNodeId,V=H.targetNodeId;l[$]&&(H.sourceNodeId=l[$]),l[V]&&(H.targetNodeId=l[V]);var K=o.graphModel.createEdge(H);h.edges.push(K)}),h}},{key:"clearSelectElements",value:function(){this.graphModel.clearSelectElements()}},{key:"createFakerNode",value:function(i){var o=this.graphModel.modelMap.get(i.type);if(o){var a=new o(i,this.graphModel);return this.graphModel.setFakerNode(a),a}}},{key:"removeFakerNode",value:function(){this.graphModel.removeFakerNode()}},{key:"setNodeSnapLine",value:function(i){this.snaplineModel&&this.snaplineModel.setNodeSnapLine(i)}},{key:"getAreaElement",value:function(i,o){return this.graphModel.getAreaElement(i,o).map(function(a){return a.getData()})}},{key:"removeNodeSnapLine",value:function(){this.snaplineModel&&this.snaplineModel.clearSnapline()}},{key:"setView",value:function(i,o){this.viewMap.set(i,o)}},{key:"render",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.adapterIn&&(i=this.adapterIn(i)),this.graphModel.graphDataToModel(ir(i)),this.options.isSilentMode||this.options.history===!1||this.history.watch(this.graphModel),ze(I(M0,{eventCenter:this.eventCenter,getView:this.getView,tool:this.tool,options:this.options,dnd:this.dnd,snaplineModel:this.snaplineModel,graphModel:this.graphModel}),this.container)}}])&&ov(e.prototype,r),n&&ov(e,n),t}();function _r(t){return rr(t)}Ns.extensions=new Map,f.default=Ns}])})})(Us,Us.exports);var Ae=Us.exports;const go=L1(Ae);function rw(g,d){return d={exports:{}},g(d,d.exports),d.exports}var nw=rw(function(g){var d=g.exports=function(c,f){if(f||(f=16),c===void 0&&(c=128),c<=0)return"0";for(var u=Math.log(Math.pow(2,c))/Math.log(f),p=2;u===1/0;p*=2)u=Math.log(Math.pow(2,c/p))/Math.log(f)*p;for(var y=u-Math.floor(u),b="",p=0;p<Math.floor(u);p++){var x=Math.floor(Math.random()*f).toString(f);b=x+b}if(y){var S=Math.pow(f,y),x=Math.floor(Math.random()*S).toString(f);b=x+b}var P=parseInt(b,f);return P!==1/0&&P>=Math.pow(2,c)?d(c,f):b};d.rack=function(c,f,u){var p=function(b){var x=0;do{if(x++>10)if(u)c+=u;else throw new Error("too many ID collisions, use more bits");var S=d(c,f)}while(Object.hasOwnProperty.call(y,S));return y[S]=b,S},y=p.hats={};return p.get=function(b){return p.hats[b]},p.set=function(b,x){return p.hats[b]=x,p},p.bits=c||128,p.base=f||16,p}});function Mr(g){if(!(this instanceof Mr))return new Mr(g);g=g||[128,36,1],this._seed=g.length?nw.rack(g[0],g[1],g[2]):g}Mr.prototype.next=function(g){return this._seed(g||!0)};Mr.prototype.nextPrefixed=function(g,d){var c;do c=g+this.next(!0);while(this.assigned(c));return this.claim(c,d),c};Mr.prototype.claim=function(g,d){this._seed.set(g,d||!0)};Mr.prototype.assigned=function(g){return this._seed.get(g)||!1};Mr.prototype.unclaim=function(g){delete this._seed.hats[g]};Mr.prototype.clear=function(){var g=this._seed.hats,d;for(d in g)this.unclaim(d)};var ow=new Mr([32,32,1]);function mo(){return ow.next()}var Iv=globalThis&&globalThis.__extends||function(){var g=function(d,c){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,u){f.__proto__=u}||function(f,u){for(var p in u)u.hasOwnProperty(p)&&(f[p]=u[p])},g(d,c)};return function(d,c){g(d,c);function f(){this.constructor=d}d.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}(),Gs=globalThis&&globalThis.__assign||function(){return Gs=Object.assign||function(g){for(var d,c=1,f=arguments.length;c<f;c++){d=arguments[c];for(var u in d)Object.prototype.hasOwnProperty.call(d,u)&&(g[u]=d[u])}return g},Gs.apply(this,arguments)},iw=function(g){Iv(d,g);function d(c,f){var u=this;return c.id||(c.id="Event_"+mo()),c.text||(c.text=""),c.text&&typeof c.text=="string"&&(c.text={value:c.text,x:c.x,y:c.y+40}),u=g.call(this,c,f)||this,u}return d.prototype.getConnectedTargetRules=function(){var c=g.prototype.getConnectedTargetRules.call(this),f={message:"\u8D77\u59CB\u8282\u70B9\u4E0D\u80FD\u4F5C\u4E3A\u8FDE\u7EBF\u7684\u7EC8\u70B9",validate:function(){return!1}};return c.push(f),c},d.extendKey="StartEventModel",d}(Ae.CircleNodeModel),aw=function(g){Iv(d,g);function d(){return g!==null&&g.apply(this,arguments)||this}return d.prototype.getAttributes=function(){var c=g.prototype.getAttributes.call(this);return Gs({},c)},d.extendKey="StartEventNode",d}(Ae.CircleNode),uw={type:"bpmn:startEvent",view:aw,model:iw},Lv=globalThis&&globalThis.__extends||function(){var g=function(d,c){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,u){f.__proto__=u}||function(f,u){for(var p in u)u.hasOwnProperty(p)&&(f[p]=u[p])},g(d,c)};return function(d,c){g(d,c);function f(){this.constructor=d}d.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}(),sw=function(g){Lv(d,g);function d(c,f){var u=this;return c.id||(c.id="Event_"+mo()),c.text||(c.text=""),c.text&&typeof c.text=="string"&&(c.text={value:c.text,x:c.x,y:c.y+40}),u=g.call(this,c,f)||this,u}return d.prototype.getConnectedSourceRules=function(){var c=g.prototype.getConnectedSourceRules.call(this),f={message:"\u7ED3\u675F\u8282\u70B9\u4E0D\u80FD\u4F5C\u4E3A\u8FDE\u7EBF\u7684\u8D77\u70B9",validate:function(){return!1}};return c.push(f),c},d.extendKey="EndEventModel",d}(Ae.CircleNodeModel),cw=function(g){Lv(d,g);function d(){return g!==null&&g.apply(this,arguments)||this}return d.prototype.getAnchorStyle=function(){return{visibility:"hidden"}},d.prototype.getShape=function(){var c=this.getAttributes(),f=c.x,u=c.y,p=c.fill,y=c.stroke,b=c.strokeWidth,x=c.r,S=g.prototype.getShape.call(this);return Ae.h("g",{},S,Ae.h("circle",{cx:f,cy:u,fill:p,stroke:y,strokeWidth:b,r:x-5}))},d.extendKey="EndEventView",d}(Ae.CircleNode),lw={type:"bpmn:endEvent",view:cw,model:sw},zv=globalThis&&globalThis.__extends||function(){var g=function(d,c){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,u){f.__proto__=u}||function(f,u){for(var p in u)u.hasOwnProperty(p)&&(f[p]=u[p])},g(d,c)};return function(d,c){g(d,c);function f(){this.constructor=d}d.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}(),fw=function(g){zv(d,g);function d(c,f){var u=this;return c.id||(c.id="Gateway_"+mo()),c.text||(c.text=""),c.text&&typeof c.text=="string"&&(c.text={value:c.text,x:c.x,y:c.y+40}),u=g.call(this,c,f)||this,u.points=[[25,0],[50,25],[25,50],[0,25]],u}return d.extendKey="ExclusiveGatewayModel",d}(Ae.PolygonNodeModel),pw=function(g){zv(d,g);function d(){return g!==null&&g.apply(this,arguments)||this}return d.prototype.getShape=function(){var c=g.prototype.getAttributes.call(this),f=c.x,u=c.y,p=c.fill,y=c.stroke,b=c.strokeWidth,x=c.width,S=c.height,P=c.points;return Ae.h("g",{transform:"matrix(1 0 0 1 "+(f-x/2)+" "+(u-S/2)+")"},Ae.h("polygon",{fill:p,x:f,y:u,stroke:y,strokeWidth:b,points:P}),Ae.h("path",{fill:p,stroke:y,strokeWidth:b,d:"m 16,15 7.42857142857143,9.714285714285715 -7.42857142857143,9.714285714285715 3.428571428571429,0 5.714285714285715,-7.464228571428572 5.714285714285715,7.464228571428572 3.428571428571429,0 -7.42857142857143,-9.714285714285715 7.42857142857143,-9.714285714285715 -3.428571428571429,0 -5.714285714285715,7.464228571428572 -5.714285714285715,-7.464228571428572 -3.428571428571429,0 z"}))},d.extendKey="ExclusiveGatewayNode",d}(Ae.PolygonNode),hw={type:"bpmn:exclusiveGateway",view:pw,model:fw},Bv=globalThis&&globalThis.__extends||function(){var g=function(d,c){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,u){f.__proto__=u}||function(f,u){for(var p in u)u.hasOwnProperty(p)&&(f[p]=u[p])},g(d,c)};return function(d,c){g(d,c);function f(){this.constructor=d}d.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}(),dw=function(g){Bv(d,g);function d(c,f){var u=this;return c.id||(c.id="Activity_"+mo()),u=g.call(this,c,f)||this,u}return d.extendKey="UserTaskModel",d}(Ae.RectNodeModel),yw=function(g){Bv(d,g);function d(){return g!==null&&g.apply(this,arguments)||this}return d.prototype.getLabelShape=function(){var c=g.prototype.getAttributes.call(this),f=c.x,u=c.y,p=c.width,y=c.height,b=c.stroke;return Ae.h("svg",{x:f-p/2+5,y:u-y/2+5,width:25,height:25,viewBox:"0 0 1274 1024"},Ae.h("path",{fill:b,d:"M655.807326 287.35973m-223.989415 0a218.879 218.879 0 1 0 447.978829 0 218.879 218.879 0 1 0-447.978829 0ZM1039.955839 895.482975c-0.490184-212.177424-172.287821-384.030443-384.148513-384.030443-211.862739 0-383.660376 171.85302-384.15056 384.030443L1039.955839 895.482975z"}))},d.prototype.getShape=function(){var c=g.prototype.getAttributes.call(this),f=c.x,u=c.y,p=c.width,y=c.height,b=c.fill,x=c.stroke,S=c.strokeWidth,P=c.radius;return Ae.h("g",{},[Ae.h("rect",{x:f-p/2,y:u-y/2,rx:P,ry:P,fill:b,stroke:x,strokeWidth:S,width:p,height:y}),this.getLabelShape()])},d.extendKey="UserTaskNode",d}(Ae.RectNode),vw={type:"bpmn:userTask",view:yw,model:dw},Xv=globalThis&&globalThis.__extends||function(){var g=function(d,c){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,u){f.__proto__=u}||function(f,u){for(var p in u)u.hasOwnProperty(p)&&(f[p]=u[p])},g(d,c)};return function(d,c){g(d,c);function f(){this.constructor=d}d.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}(),gw=function(g){Xv(d,g);function d(c,f){var u=this;return c.id||(c.id="Activity_"+mo()),u=g.call(this,c,f)||this,u}return d.extendKey="ServiceTaskModel",d}(Ae.RectNodeModel),bw=function(g){Xv(d,g);function d(){return g!==null&&g.apply(this,arguments)||this}return d.prototype.getLabelShape=function(){var c=g.prototype.getAttributes.call(this),f=c.x,u=c.y,p=c.width,y=c.height,b=c.stroke;return Ae.h("svg",{x:f-p/2+5,y:u-y/2+5,width:30,height:30,viewBox:"0 0 1274 1024"},Ae.h("path",{fill:b,d:"M882.527918 434.149934c-2.234901-5.303796-7.311523-8.853645-13.059434-9.138124l-61.390185-3.009544c-6.635117-20.973684-15.521508-41.175795-26.513864-60.282968l42.051745-47.743374c4.308119-4.889357 4.955872-12.004405 1.602498-17.59268-46.384423-77.30362-103.969956-101.422947-106.400309-102.410438-5.332449-2.170432-11.432377-1.090844-15.693424 2.77009L654.674467 240.664222c-17.004279-8.654101-35.092239-15.756869-53.995775-21.210068l-3.26537-66.490344c-0.280386-5.747911-3.833305-10.824533-9.134031-13.059434-1.683339-0.709151-30.193673-12.391215-76.866668-12.051477-46.672996-0.339738-75.18333 11.342326-76.866668 12.051477-5.300726 2.234901-8.853645 7.311523-9.134031 13.059434l-3.26537 66.490344c-18.903535 5.453199-36.991496 12.555967-53.995775 21.210068l-48.450479-43.922349c-4.261047-3.860934-10.360975-4.940522-15.693424-2.77009-2.430352 0.98749-60.015885 25.106818-106.400309 102.410438-3.353374 5.588275-2.705622 12.703323 1.602498 17.59268l42.051745 47.743374c-10.992355 19.107173-19.878746 39.309284-26.513864 60.282968l-61.390185 3.009544c-5.747911 0.284479-10.824533 3.834328-13.059434 9.138124-1.01512 2.415003-24.687262 60.190871-2.822278 147.651828 1.583055 6.324032 7.072069 10.893094 13.57518 11.308557 5.892197 0.37146 11.751648 0.523933 17.419741 0.667196 14.498202 0.372483 28.193109 0.723477 40.908712 4.63353 4.212952 1.294482 6.435573 8.270361 9.349949 18.763342 1.287319 4.640694 2.617617 9.43693 4.484128 14.010085 1.794879 4.393054 3.75758 8.570189 5.66093 12.607132 1.302669 2.765997 2.529613 5.380544 3.689019 8.018627 2.986007 6.803963 2.682086 9.773598 2.578732 10.349719-3.061732 3.672646-6.391571 7.238868-9.91379 11.015891-1.810229 1.943258-3.680832 3.949962-5.523807 5.980201l-22.560832 24.8909c-3.865028 4.261047-4.940522 10.365068-2.774183 15.693424 0.991584 2.426259 25.102724 60.011792 102.414531 106.400309 5.588275 3.353374 12.703323 2.701528 17.591657-1.603521l23.476691-20.682042c2.346441-2.061962 4.64888-4.336772 6.875594-6.534833 9.05319-8.93858 14.018272-12.95608 17.73185-11.576663 3.305279 1.222851 6.907317 3.166109 10.720156 5.228071 3.325745 1.794879 6.764054 3.650133 10.465352 5.288446 6.016017 2.662643 12.120039 4.688789 18.019399 6.65149 6.827499 2.266623 13.279445 4.409426 18.819624 7.275707 1.518586 0.782829 1.926886 0.994654 2.358721 7.830339 0.726547 11.496845 1.25048 23.276123 1.753947 34.672684 0.264013 5.900384 0.528026 11.803837 0.815575 17.700127 0.284479 5.743818 3.833305 10.82044 9.138124 13.05534 1.654686 0.698918 29.371958 12.063757 74.869175 12.063757 0.328481 0 3.65832 0 3.986801 0 45.497217 0 73.214489-11.364839 74.869175-12.063757 5.304819-2.234901 8.853645-7.311523 9.138124-13.05534 0.287549-5.89629 0.551562-11.799744 0.815575-17.700127 0.503467-11.396561 1.027399-23.175839 1.753947-34.672684 0.431835-6.835685 0.840134-7.04751 2.358721-7.830339 5.54018-2.866281 11.992125-5.009084 18.819624-7.275707 5.89936-1.962701 12.003382-3.988848 18.019399-6.65149 3.701299-1.638313 7.139607-3.493567 10.465352-5.288446 3.812839-2.061962 7.414877-4.00522 10.720156-5.228071 3.713578-1.379417 8.67866 2.638083 17.73185 11.576663 2.226714 2.198062 4.529153 4.472871 6.875594 6.534833l23.476691 20.682042c4.888334 4.305049 12.003382 4.956895 17.591657 1.603521 77.311807-46.388517 101.422947-103.97405 102.414531-106.400309 2.166339-5.328355 1.090844-11.432377-2.774183-15.693424l-22.560832-24.8909c-1.842974-2.030239-3.713578-4.036943-5.523807-5.980201-3.52222-3.777023-6.852058-7.343245-9.91379-11.015891-0.103354-0.576121-0.407276-3.545756 2.578732-10.349719 1.159406-2.638083 2.38635-5.252631 3.689019-8.018627 1.90335-4.036943 3.866051-8.214079 5.66093-12.607132 1.866511-4.573155 3.196809-9.369392 4.484128-14.010085 2.914376-10.492982 5.136997-17.46886 9.349949-18.763342 12.715603-3.910053 26.41051-4.261047 40.908712-4.63353 5.668093-0.143263 11.527544-0.295735 17.419741-0.667196 6.503111-0.415462 11.992125-4.984524 13.57518-11.308557C907.21518 494.340805 883.543038 436.564937 882.527918 434.149934zM643.49894 643.761929c-35.280528 35.280528-82.191954 54.711066-132.086317 54.711066s-96.806813-19.430538-132.086317-54.711066c-35.280528-35.279504-54.711066-82.191954-54.711066-132.086317 0-49.894364 19.430538-96.80272 54.711066-132.082224 35.283598-35.284621 82.191954-54.711066 132.086317-54.711066s96.80579 19.426445 132.086317 54.711066c35.279504 35.279504 54.711066 82.187861 54.711066 132.082224C698.210006 561.569976 678.782537 608.482425 643.49894 643.761929z"}))},d.prototype.getShape=function(){var c=g.prototype.getAttributes.call(this),f=c.x,u=c.y,p=c.width,y=c.height,b=c.fill,x=c.stroke,S=c.strokeWidth,P=c.radius;return Ae.h("g",{},[Ae.h("rect",{x:f-p/2,y:u-y/2,rx:P,ry:P,fill:b,stroke:x,strokeWidth:S,width:p,height:y}),this.getLabelShape()])},d.extendKey="ServiceTaskNode",d}(Ae.RectNode),mw={type:"bpmn:serviceTask",view:bw,model:gw},Fv=globalThis&&globalThis.__extends||function(){var g=function(d,c){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,u){f.__proto__=u}||function(f,u){for(var p in u)u.hasOwnProperty(p)&&(f[p]=u[p])},g(d,c)};return function(d,c){g(d,c);function f(){this.constructor=d}d.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}(),_w=function(g){Fv(d,g);function d(c,f){var u=this;return c.id||(c.id="Flow_"+mo()),u=g.call(this,c,f)||this,u}return d.extendKey="SequenceFlowModel",d}(Ae.PolylineEdgeModel),Ow=function(g){Fv(d,g);function d(){return g!==null&&g.apply(this,arguments)||this}return d.extendKey="SequenceFlowEdge",d}(Ae.PolylineEdge),ww={type:"bpmn:sequenceFlow",view:Ow,model:_w},dv={width:40,height:40},yv={width:40,height:40},vv={width:40,height:40},gv={width:100,height:80},bv={width:100,height:80},xw={rect:{radius:5,stroke:"rgb(24, 125, 255)"},circle:{r:18,stroke:"rgb(24, 125, 255)"},polygon:{stroke:"rgb(24, 125, 255)"},polyline:{stroke:"rgb(24, 125, 255)",hoverStroke:"rgb(24, 125, 255)",selectedStroke:"rgb(24, 125, 255)"},edgeText:{background:{fill:"white",height:14,stroke:"transparent",radius:3}}},Ew=function(){function g(d){var c=d.lf;c.setTheme(xw),c.register(uw),c.register(lw),c.register(hw),c.register(vw),c.register(mw),c.options.customBpmnEdge||(c.register(ww),c.setDefaultEdgeType("bpmn:sequenceFlow"))}return g.pluginName="BpmnElement",g}(),Sw={pluginName:"snapshot",install:function(g){var d=this;this.lf=g,this.offsetX=Number.MAX_SAFE_INTEGER,this.offsetY=Number.MAX_SAFE_INTEGER,g.getSnapshot=function(c,f){d.fileName=c||"logic-flow."+Date.now()+".png";var u=d.getSvgRootElement(g);d.downloadSvg(u,d.fileName,f)},g.getSnapshotBlob=function(c){var f=d.getSvgRootElement(g);return d.getBlob(f,c)},g.getSnapshotBase64=function(c){var f=d.getSvgRootElement(g);return d.getBase64(f,c)}},getSvgRootElement:function(g){var d=this;g.graphModel.nodes.forEach(function(f){var u=f.x,p=f.width,y=f.y,b=f.height,x=u-p/2,S=y-b/2;x<d.offsetX&&(d.offsetX=x-5),S<d.offsetY&&(d.offsetY=S-5)}),g.graphModel.edges.forEach(function(f){f.pointsList&&f.pointsList.forEach(function(u){var p=u.x,y=u.y;p<d.offsetX&&(d.offsetX=p-5),y<d.offsetY&&(d.offsetY=y-5)})});var c=g.container.querySelector("svg");return c},triggerDownload:function(g){var d=new MouseEvent("click",{view:window,bubbles:!1,cancelable:!0}),c=document.createElement("a");c.setAttribute("download",this.fileName),c.setAttribute("href",g),c.setAttribute("target","_blank"),c.dispatchEvent(d)},removeAnchor:function(g){for(var d=g.childNodes,c=g.childNodes&&g.childNodes.length,f=0;f<c;f++){var u=d[f],p=u.classList&&Array.from(u.classList)||[];p.indexOf("lf-anchor")>-1&&(g.removeChild(g.childNodes[f]),c--,f--)}},downloadSvg:function(g,d,c){var f=this;this.getCanvasData(g,c).then(function(u){var p=u.toDataURL("image/png").replace("image/png","image/octet-stream");f.triggerDownload(p,d)})},getBase64:function(g,d){var c=this;return new Promise(function(f){c.getCanvasData(g,d).then(function(u){var p=u.toDataURL("image/png");f({data:p,width:u.width,height:u.height})})})},getBlob:function(g,d){var c=this;return new Promise(function(f){c.getCanvasData(g,d).then(function(u){u.toBlob(function(p){f({data:p,width:u.width,height:u.height})},"image/png")})})},getCanvasData:function(g,d){var c=this,f=g.cloneNode(!0),u=f.lastChild,p=u.childNodes&&u.childNodes.length;if(p)for(var y=0;y<p;y++){var b=u.childNodes[y],x=b.classList&&Array.from(b.classList);if(x&&x.indexOf("lf-base")<0)u.removeChild(u.childNodes[y]),p--,y--;else{var S=u.childNodes[y];S&&S.childNodes.forEach(function(M){var C=M;c.removeAnchor(C.firstChild)})}}f.lastChild.style.transform="matrix(1, 0, 0, 1, "+(-this.offsetX+10)+", "+(-this.offsetY+10)+")";var P=window.devicePixelRatio||1,E=document.createElement("canvas"),A=document.getElementsByClassName("lf-base")[0],O=A.getBoundingClientRect(),R=this.lf.graphModel,X=R.transformMatrix,Z=X.SCALE_X,G=X.SCALE_Y,U=Math.ceil(O.width/Z),I=Math.ceil(O.height/G);E.style.width=U+"px",E.style.height=I+"px",E.width=U*P+80,E.height=I*P+80;var F=E.getContext("2d");F.scale(P,P),d?(F.fillStyle=d,F.fillRect(0,0,U*P+80,I*P+80)):F.clearRect(0,0,U,I);var Y=new Image;return new Promise(function(M){Y.onload=function(){F.drawImage(Y,0,0),M(E)};var C="data:image/svg+xml;charset=utf-8,"+new XMLSerializer().serializeToString(f),L=C.replace(/\n/g,"").replace(/\t/g,"").replace(/#/g,"%23");Y.src=L})}},jw=new Mr([32,32,1]);function mv(){return jw.next()}var Ht=function(){};Ht.ObjTree=function(){return this};Ht.ObjTree.VERSION="0.23";Ht.ObjTree.prototype.xmlDecl=`<?xml version="1.0" encoding="UTF-8" ?>
|
|
`;Ht.ObjTree.prototype.attr_prefix="-";Ht.ObjTree.prototype.parseXML=function(g){var d;if(window.DOMParser){var c=new DOMParser,f=c.parseFromString(g,"application/xml");if(!f)return;d=f.documentElement}else window.ActiveXObject&&(c=new ActiveXObject("Microsoft.XMLDOM"),c.async=!1,c.loadXML(g),d=c.documentElement);if(d)return this.parseDOM(d)};Ht.ObjTree.prototype.parseHTTP=function(g,d,c){var f={};for(var u in d)f[u]=d[u];if(f.method||(typeof f.postBody=="undefined"&&typeof f.postbody=="undefined"&&typeof f.parameters=="undefined"?f.method="get":f.method="post"),c){f.asynchronous=!0;var p=this,y=c,b=f.onComplete;f.onComplete=function(P){var E;P&&P.responseXML&&P.responseXML.documentElement&&(E=p.parseDOM(P.responseXML.documentElement)),y(E,P),b&&b(P)}}else f.asynchronous=!1;var x;if(typeof HTTP!="undefined"&&HTTP.Request){f.uri=g;var S=new HTTP.Request(f);S&&(x=S.transport)}else if(typeof Ajax!="undefined"&&Ajax.Request){var S=new Ajax.Request(g,f);S&&(x=S.transport)}if(c)return x;if(x&&x.responseXML&&x.responseXML.documentElement)return this.parseDOM(x.responseXML.documentElement)};Ht.ObjTree.prototype.parseDOM=function(g){if(g){if(this.__force_array={},this.force_array)for(var d=0;d<this.force_array.length;d++)this.__force_array[this.force_array[d]]=1;var c=this.parseElement(g);if(this.__force_array[g.nodeName]&&(c=[c]),g.nodeType!=11){var f={};f[g.nodeName]=c,c=f}return c}};Ht.ObjTree.prototype.parseElement=function(g){if(g.nodeType!=7){if(g.nodeType==3||g.nodeType==4){var d=g.nodeValue.match(/[^\x00-\x20]/);return d==null?void 0:g.nodeValue}var c,f={};if(g.attributes&&g.attributes.length){c={};for(var u=0;u<g.attributes.length;u++){var p=g.attributes[u].nodeName;if(typeof p=="string"){var y=g.attributes[u].nodeValue;y&&(p=this.attr_prefix+p,typeof f[p]=="undefined"&&(f[p]=0),f[p]++,this.addNode(c,p,f[p],y))}}}if(g.childNodes&&g.childNodes.length){var b=!0;c&&(b=!1);for(var u=0;u<g.childNodes.length&&b;u++){var x=g.childNodes[u].nodeType;x==3||x==4||(b=!1)}if(b){c||(c="");for(var u=0;u<g.childNodes.length;u++)c+=g.childNodes[u].nodeValue}else{c||(c={});for(var u=0;u<g.childNodes.length;u++){var p=g.childNodes[u].nodeName;if(typeof p=="string"){var y=this.parseElement(g.childNodes[u]);y&&(typeof f[p]=="undefined"&&(f[p]=0),f[p]++,this.addNode(c,p,f[p],y))}}}}return c}};Ht.ObjTree.prototype.addNode=function(g,d,c,f){this.__force_array[d]?(c==1&&(g[d]=[]),g[d][g[d].length]=f):c==1?g[d]=f:c==2?g[d]=[g[d],f]:g[d][g[d].length]=f};Ht.ObjTree.prototype.writeXML=function(g){var d=this.hash_to_xml(null,g);return this.xmlDecl+d};Ht.ObjTree.prototype.hash_to_xml=function(g,d){var c=[],f=[];for(var u in d)if(d.hasOwnProperty(u)){var p=d[u];u.charAt(0)!=this.attr_prefix?typeof p=="undefined"||p==null?c[c.length]="<"+u+" />":typeof p=="object"&&p.constructor==Array?c[c.length]=this.array_to_xml(u,p):typeof p=="object"?c[c.length]=this.hash_to_xml(u,p):c[c.length]=this.scalar_to_xml(u,p):f[f.length]=" "+u.substring(1)+'="'+this.xml_escape(p)+'"'}var y=f.join(""),b=c.join("");return typeof g=="undefined"||g==null||(c.length>0?b.match(/\n/)?b="<"+g+y+`>
|
|
`+b+"</"+g+`>
|
|
`:b="<"+g+y+">"+b+"</"+g+`>
|
|
`:b="<"+g+y+` />
|
|
`),b};Ht.ObjTree.prototype.array_to_xml=function(g,d){for(var c=[],f=0;f<d.length;f++){var u=d[f];typeof u=="undefined"||u==null?c[c.length]="<"+g+" />":typeof u=="object"&&u.constructor==Array?c[c.length]=this.array_to_xml(g,u):typeof u=="object"?c[c.length]=this.hash_to_xml(g,u):c[c.length]=this.scalar_to_xml(g,u)}return c.join("")};Ht.ObjTree.prototype.scalar_to_xml=function(g,d){return g=="#text"?this.xml_escape(d):"<"+g+">"+this.xml_escape(d)+"</"+g+`>
|
|
`};Ht.ObjTree.prototype.xml_escape=function(g){return g.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"')};var ka=globalThis&&globalThis.__read||function(g,d){var c=typeof Symbol=="function"&&g[Symbol.iterator];if(!c)return g;var f=c.call(g),u,p=[],y;try{for(;(d===void 0||d-- >0)&&!(u=f.next()).done;)p.push(u.value)}catch(b){y={error:b}}finally{try{u&&!u.done&&(c=f.return)&&c.call(f)}finally{if(y)throw y.error}}return p},Nr;(function(g){g.START="bpmn:startEvent",g.END="bpmn:endEvent",g.GATEWAY="bpmn:exclusiveGateway",g.USER="bpmn:userTask",g.SYSTEM="bpmn:serviceTask",g.FLOW="bpmn:sequenceFlow"})(Nr||(Nr={}));var Hv=["-name","-id","bpmn:incoming","bpmn:outgoing","-sourceRef","-targetRef"];function Ws(g){var d={};return Object.entries(g).forEach(function(c){var f=ka(c,2),u=f[0],p=f[1];typeof p!="object"?u.indexOf("-")===0?d[u]=p:d["-"+u]=p:d[u]=Ws(p)}),d}function Js(g){var d={};return Object.entries(g).forEach(function(c){var f=ka(c,2),u=f[0],p=f[1];typeof p=="string"?u.indexOf("-")===0?d[u.substr(1)]=p:d[u]=p:typeof p=="object"?d[u]=Js(p):d[u]=p}),d}function Pw(g,d){var c=new Map;d.nodes.forEach(function(u){var p,y={"-id":u.id};if(!((p=u.text)===null||p===void 0)&&p.value&&(y["-name"]=u.text.value),u.properties){var b=Ws(u.properties);Object.assign(y,b)}c.set(u.id,y),g[u.type]?Array.isArray(g[u.type])?g[u.type].push(y):g[u.type]=[g[u.type],y]:g[u.type]=y});var f=d.edges.map(function(u){var p,y,b=c.get(u.targetNodeId);b["bpmn:incoming"]?Array.isArray(b["bpmn:incoming"])?b["bpmn:incoming"].push(u.id):b["bpmn:incoming"]=[b["bpmn:incoming"],u.id]:b["bpmn:incoming"]=u.id;var x=c.get(u.sourceNodeId);x["bpmn:outgoing"]?Array.isArray(x["bpmn:outgoing"])?x["bpmn:outgoing"].push(u.id):x["bpmn:outgoing"]=[x["bpmn:outgoing"],u.id]:x["bpmn:outgoing"]=u.id;var S={"-id":u.id,"-sourceRef":u.sourceNodeId,"-targetRef":u.targetNodeId};if(!((p=u.text)===null||p===void 0)&&p.value&&(S["-name"]=(y=u.text)===null||y===void 0?void 0:y.value),u.properties){var P=Ws(u.properties);Object.assign(S,P)}return S});g[Nr.FLOW]=f}function kw(g,d){g["bpmndi:BPMNEdge"]=d.edges.map(function(c){var f,u=c.id,p=c.pointsList.map(function(b){var x=b.x,S=b.y;return{"-x":x,"-y":S}}),y={"-id":u+"_di","-bpmnElement":u,"di:waypoint":p};return!((f=c.text)===null||f===void 0)&&f.value&&(y["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":c.text.x-c.text.value.length*10/2,"-y":c.text.y-7,"-width":c.text.value.length*10,"-height":14}}),y}),g["bpmndi:BPMNShape"]=d.nodes.map(function(c){var f,u=c.id,p=100,y=80,b=c.x,x=c.y,S=Ln.shapeConfigMap.get(c.type);S&&(p=S.width,y=S.height),b-=p/2,x-=y/2;var P={"-id":u+"_di","-bpmnElement":u,"dc:Bounds":{"-x":b,"-y":x,"-width":p,"-height":y}};return!((f=c.text)===null||f===void 0)&&f.value&&(P["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":c.text.x-c.text.value.length*10/2,"-y":c.text.y-7,"-width":c.text.value.length*10,"-height":14}}),P})}function Aw(g){var d=[],c=[],f=g["bpmn:definitions"];if(f){var u=f["bpmn:process"];Object.keys(u).forEach(function(p){if(p.indexOf("bpmn:")===0){var y=u[p];if(p===Nr.FLOW){var b=f["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNEdge"];c=Tw(y,b)}else{var x=f["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNShape"];d=d.concat(Dw(y,x,p))}}})}return{nodes:d,edges:c}}function Dw(g,d,c){var f=[];if(Array.isArray(g))g.forEach(function(y){var b;Array.isArray(d)?b=d.find(function(S){return S["-bpmnElement"]===y["-id"]}):b=d;var x=_v(b,c,y);f.push(x)});else{var u=void 0;Array.isArray(d)?u=d.find(function(y){return y["-bpmnElement"]===g["-id"]}):u=d;var p=_v(u,c,g);f.push(p)}return f}function _v(g,d,c){var f=Number(g["dc:Bounds"]["-x"]),u=Number(g["dc:Bounds"]["-y"]),p=c["-name"],y=Ln.shapeConfigMap.get(d);y&&(f+=y.width/2,u+=y.height/2);var b;Object.entries(c).forEach(function(E){var A=ka(E,2),O=A[0],R=A[1];Hv.indexOf(O)===-1&&(b||(b={}),b[O]=R)}),b&&(b=Js(b));var x;if(p&&(x={x:f,y:u,value:p},g["bpmndi:BPMNLabel"]&&g["bpmndi:BPMNLabel"]["dc:Bounds"])){var S=g["bpmndi:BPMNLabel"]["dc:Bounds"];x.x=Number(S["-x"])+Number(S["-width"])/2,x.y=Number(S["-y"])+Number(S["-height"])/2}var P={id:g["-bpmnElement"],type:d,x:f,y:u,properties:b};return x&&(P.text=x),P}function Tw(g,d){var c=[];if(Array.isArray(g))g.forEach(function(u){var p;Array.isArray(d)?p=d.find(function(y){return y["-bpmnElement"]===u["-id"]}):p=d,c.push(Ov(p,u))});else{var f=void 0;Array.isArray(d)?f=d.find(function(u){return u["-bpmnElement"]===g["-id"]}):f=d,c.push(Ov(f,g))}return c}function Ov(g,d){var c,f=d["-name"];if(f){var u=g["bpmndi:BPMNLabel"]["dc:Bounds"],p=0;f.split(`
|
|
`).forEach(function(x){p<x.length&&(p=x.length)}),c={value:f,x:Number(u["-x"])+p*10/2,y:Number(u["-y"])+7}}var y;Object.entries(d).forEach(function(x){var S=ka(x,2),P=S[0],E=S[1];Hv.indexOf(P)===-1&&(y||(y={}),y[P]=E)}),y&&(y=Js(y));var b={id:d["-id"],type:Nr.FLOW,pointsList:g["di:waypoint"].map(function(x){return{x:Number(x["-x"]),y:Number(x["-y"])}}),sourceNodeId:d["-sourceRef"],targetNodeId:d["-targetRef"],properties:y};return c&&(b.text=c),b}var Ln={pluginName:"bpmn-adapter",install:function(g){g.adapterIn=this.adapterIn,g.adapterOut=this.adapterOut},shapeConfigMap:new Map,setCustomShape:function(g,d){this.shapeConfigMap.set(g,d)},adapterOut:function(g){var d={"-id":"Process_"+mv(),"-isExecutable":"false"};Pw(d,g);var c={"-id":"BPMNPlane_1","-bpmnElement":d["-id"]};kw(c,g);var f={"bpmn:definitions":{"-id":"Definitions_"+mv(),"-xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","-xmlns:bpmn":"http://www.omg.org/spec/BPMN/20100524/MODEL","-xmlns:bpmndi":"http://www.omg.org/spec/BPMN/20100524/DI","-xmlns:dc":"http://www.omg.org/spec/DD/20100524/DC","-xmlns:di":"http://www.omg.org/spec/DD/20100524/DI","-targetNamespace":"http://bpmn.io/schema/bpmn","-exporter":"bpmn-js (https://demo.bpmn.io)","-exporterVersion":"7.3.0","bpmn:process":d,"bpmndi:BPMNDiagram":{"-id":"BPMNDiagram_1","bpmndi:BPMNPlane":c}}};return f},adapterIn:function(g){if(g)return Aw(g)}};Ln.shapeConfigMap.set(Nr.START,{width:dv.width,height:dv.height});Ln.shapeConfigMap.set(Nr.END,{width:yv.width,height:yv.height});Ln.shapeConfigMap.set(Nr.GATEWAY,{width:vv.width,height:vv.height});Ln.shapeConfigMap.set(Nr.SYSTEM,{width:gv.width,height:gv.height});Ln.shapeConfigMap.set(Nr.USER,{width:bv.width,height:bv.height});var wv=globalThis&&globalThis.__assign||function(){return wv=Object.assign||function(g){for(var d,c=1,f=arguments.length;c<f;c++){d=arguments[c];for(var u in d)Object.prototype.hasOwnProperty.call(d,u)&&(g[u]=d[u])}return g},wv.apply(this,arguments)},xv;(function(g){g[g.SEQUENCE_FLOW=1]="SEQUENCE_FLOW",g[g.START_EVENT=2]="START_EVENT",g[g.END_EVENT=3]="END_EVENT",g[g.USER_TASK=4]="USER_TASK",g[g.EXCLUSIVE_GATEWAY=6]="EXCLUSIVE_GATEWAY"})(xv||(xv={}));var Ev;(function(g){g.HORIZONTAL="horizontal",g.VERTICAL="vertical"})(Ev||(Ev={}));var Mw=globalThis&&globalThis.__read||function(g,d){var c=typeof Symbol=="function"&&g[Symbol.iterator];if(!c)return g;var f=c.call(g),u,p=[],y;try{for(;(d===void 0||d-- >0)&&!(u=f.next()).done;)p.push(u.value)}catch(b){y={error:b}}finally{try{u&&!u.done&&(c=f.return)&&c.call(f)}finally{if(y)throw y.error}}return p};globalThis&&globalThis.__spread;var Nw=globalThis&&globalThis.__read||function(g,d){var c=typeof Symbol=="function"&&g[Symbol.iterator];if(!c)return g;var f=c.call(g),u,p=[],y;try{for(;(d===void 0||d-- >0)&&!(u=f.next()).done;)p.push(u.value)}catch(b){y={error:b}}finally{try{u&&!u.done&&(c=f.return)&&c.call(f)}finally{if(y)throw y.error}}return p};globalThis&&globalThis.__spread;var Cw=globalThis&&globalThis.__read||function(g,d){var c=typeof Symbol=="function"&&g[Symbol.iterator];if(!c)return g;var f=c.call(g),u,p=[],y;try{for(;(d===void 0||d-- >0)&&!(u=f.next()).done;)p.push(u.value)}catch(b){y={error:b}}finally{try{u&&!u.done&&(c=f.return)&&c.call(f)}finally{if(y)throw y.error}}return p},Rw=globalThis&&globalThis.__spread||function(){for(var g=[],d=0;d<arguments.length;d++)g=g.concat(Cw(arguments[d]));return g},ii="lf:defaultNodeMenu",ai="lf:defaultEdgeMenu",ui="lf:defaultGraphMenu",Sv="lf:defaultSelectionMenu",Iw=function(){function g(d){var c=this,f=d.lf;this.__menuDOM=document.createElement("ul"),this.lf=f,this.menuTypeMap=new Map,this.init(),this.lf.setMenuConfig=function(u){c.resetMenuItem(u)},this.lf.addMenuConfig=function(u){c.addMenuItem(u)},this.lf.setMenuByType=function(u){c.setMenuByType(u)}}return g.prototype.init=function(){var d=this,c=[{text:"\u5220\u9664",callback:function(p){d.lf.deleteNode(p.id)}},{text:"\u7F16\u8F91\u6587\u672C",callback:function(p){d.lf.graphModel.setTextEditable(p.id)}},{text:"\u590D\u5236",callback:function(p){d.lf.cloneNode(p.id)}}];this.menuTypeMap.set(ii,c);var f=[{text:"\u5220\u9664",callback:function(p){d.lf.deleteEdge(p.id)}},{text:"\u7F16\u8F91\u6587\u672C",callback:function(p){d.lf.graphModel.setTextEditable(p.id)}}];this.menuTypeMap.set(ai,f),this.menuTypeMap.set(ui,[]);var u=[{text:"\u5220\u9664",callback:function(p){d.lf.clearSelectElements(),p.edges.forEach(function(y){return d.lf.deleteEdge(y.id)}),p.nodes.forEach(function(y){return d.lf.deleteNode(y.id)})}}];this.menuTypeMap.set(Sv,u)},g.prototype.render=function(d,c){var f=this;this.__container=c,this.__currentData=null,this.__menuDOM.className="lf-menu",c.appendChild(this.__menuDOM),this.__menuDOM.addEventListener("click",function(u){u.stopPropagation();for(var p=u.target;Array.from(p.classList).indexOf("lf-menu-item")===-1&&Array.from(p.classList).indexOf("lf-menu")===-1;)p=p.parentElement;Array.from(p.classList).indexOf("lf-menu-item")>-1&&(p.onclickCallback(f.__currentData),f.__menuDOM.style.display="none",f.__currentData=null)},!0),this.lf.on("node:contextmenu",function(u){var p=u.data,y=u.position,b=y.domOverlayPosition,x=b.x,S=b.y,P=p.id,E=f.lf.graphModel.getNodeModel(P),A=[],O=f.menuTypeMap.get(E.type);E&&E.menu&&Array.isArray(E.menu)?A=E.menu:O?A=O:A=f.menuTypeMap.get(ii),f.__currentData=p,f.showMenu(x,S,A)}),this.lf.on("edge:contextmenu",function(u){var p=u.data,y=u.position,b=y.domOverlayPosition,x=b.x,S=b.y,P=p.id,E=f.lf.graphModel.getEdgeModel(P),A=[],O=f.menuTypeMap.get(E.type);E&&E.menu&&Array.isArray(E.menu)?A=E.menu:O?A=O:A=f.menuTypeMap.get(ai),f.__currentData=p,f.showMenu(x,S,A)}),this.lf.on("blank:contextmenu",function(u){var p=u.position,y=f.menuTypeMap.get(ui),b=p.domOverlayPosition,x=b.x,S=b.y;f.showMenu(x,S,y)}),this.lf.on("selection:contextmenu",function(u){var p=u.data,y=u.position,b=f.menuTypeMap.get(Sv),x=y.domOverlayPosition,S=x.x,P=x.y;f.__currentData=p,f.showMenu(S,P,b)}),this.lf.on("node:mousedown",function(){f.__menuDOM.style.display="none"}),this.lf.on("edge:click",function(){f.__menuDOM.style.display="none"}),this.lf.on("blank:click",function(){f.__menuDOM.style.display="none"})},g.prototype.destroy=function(){var d;(d=this===null||this===void 0?void 0:this.__container)===null||d===void 0||d.removeChild(this.__menuDOM),this.__menuDOM=null},g.prototype.showMenu=function(d,c,f){if(!(!f||!f.length)){var u=this.__menuDOM;u.innerHTML="",u.append.apply(u,Rw(this.__getMenuDom(f))),u.children.length&&(u.style.display="block",u.style.top=c+"px",u.style.left=d+"px")}},g.prototype.setMenuByType=function(d){!d.type||!d.menu||this.menuTypeMap.set(d.type,d.menu)},g.prototype.__getMenuDom=function(d){var c=[];return d&&d.length>0&&d.forEach(function(f){var u=document.createElement("li");if(f.className?u.className="lf-menu-item "+f.className:u.className="lf-menu-item",f.icon===!0){var p=document.createElement("span");p.className="lf-menu-item-icon",u.appendChild(p)}var y=document.createElement("span");y.className="lf-menu-item-text",f.text&&(y.innerText=f.text),u.appendChild(y),u.onclickCallback=f.callback,c.push(u)}),c},g.prototype.resetMenuItem=function(d){d&&(d.nodeMenu!==void 0&&this.menuTypeMap.set(ii,d.nodeMenu?d.nodeMenu:[]),d.edgeMenu!==void 0&&this.menuTypeMap.set(ai,d.edgeMenu?d.edgeMenu:[]),d.graphMenu!==void 0&&this.menuTypeMap.set(ui,d.graphMenu?d.graphMenu:[]))},g.prototype.addMenuItem=function(d){if(d){if(Array.isArray(d.nodeMenu)){var c=this.menuTypeMap.get(ii);this.menuTypeMap.set(ii,c.concat(d.nodeMenu))}if(Array.isArray(d.edgeMenu)){var c=this.menuTypeMap.get(ai);this.menuTypeMap.set(ai,c.concat(d.edgeMenu))}if(Array.isArray(d.graphMenu)){var c=this.menuTypeMap.get(ui);this.menuTypeMap.set(ui,c.concat(d.graphMenu))}}},g.prototype.changeMenuItem=function(d,c){if(d==="add")this.addMenuItem(c);else if(d==="reset")this.resetMenuItem(c);else throw new Error("The first parameter of changeMenuConfig should be 'add' or 'reset'")},g.pluginName="Menu",g}();globalThis&&globalThis.__read;var Lw=function(){function g(d){var c=this,f=d.lf;this.lf=f,this.lf.setPatternItems=function(u){c.shapeList=u,c.domContainer&&c.render(c.lf,c.domContainer)}}return g.prototype.render=function(d,c){var f=this;this.panelEl&&c.removeChild(this.panelEl),!(!this.shapeList||this.shapeList.length===0)&&(this.panelEl=document.createElement("div"),this.panelEl.className="lf-dndpanel",this.shapeList.forEach(function(u){f.panelEl.appendChild(f.createDndItem(u))}),c.appendChild(this.panelEl),this.domContainer=c)},g.prototype.createDndItem=function(d){var c=this,f=document.createElement("div");f.className=d.className?"lf-dnd-item "+d.className:"lf-dnd-item";var u=document.createElement("div");if(u.className="lf-dnd-shape",d.icon&&(u.style.backgroundImage="url("+d.icon+")"),f.appendChild(u),d.label){var p=document.createElement("div");p.innerText=d.label,p.className="lf-dnd-text",f.appendChild(p)}return f.onmousedown=function(){d.type&&c.lf.dnd.startDrag({type:d.type,properties:d.properties,text:d.text}),d.callback&&d.callback()},f},g.pluginName="DndPanel",g}(),zw=function(){function g(d){var c=this,f=d.lf;this.__disabled=!1,this.isDefalutStopMoveGraph=!1,this.__draw=function(p){var y=c.lf.getPointByClient(p.clientX,p.clientY).domOverlayPosition,b=y.x,x=y.y;c.endPoint={x:b,y:x};var S=c.startPoint,P=S.x,E=S.y,A=c.wrapper.style,O=P,R=E,X=b-P,Z=x-E;b<P&&(O=b,X=P-b),x<E&&(R=x,Z=E-x),A.left=O+"px",A.top=R+"px",A.width=X+"px",A.height=Z+"px"},this.__drawOff=function(){document.removeEventListener("mousemove",c.__draw),document.removeEventListener("mouseup",c.__drawOff),c.__domContainer.removeChild(c.wrapper);var p=c.startPoint,y=p.x,b=p.y,x=c.endPoint,S=x.x,P=x.y,E=[Math.min(y,S),Math.min(b,P)],A=[Math.max(y,S),Math.max(b,P)],O=c.lf.getAreaElement(E,A);O.forEach(function(R){c.lf.select(R.id,!0)}),c.lf.emit("selection:selected",O)},this.lf=f;var u=f.getEditConfig().stopMoveGraph;this.isDefalutStopMoveGraph=u,f.openSelectionSelect=function(){u||(c.isDefalutStopMoveGraph=!1,f.updateEditConfig({stopMoveGraph:!0})),c.open()},f.closeSelectionSelect=function(){c.isDefalutStopMoveGraph||f.updateEditConfig({stopMoveGraph:!1}),c.close()}}return g.prototype.render=function(d,c){var f=this;this.__domContainer=c,d.on("blank:mousedown",function(u){var p=u.e,y=d.getEditConfig();if(!(!y.stopMoveGraph||f.__disabled)){var b=d.getPointByClient(p.clientX,p.clientY).domOverlayPosition,x=b.x,S=b.y;f.startPoint={x,y:S},f.endPoint={x,y:S};var P=document.createElement("div");P.className="lf-selection-select",P.style.top=f.startPoint.y+"px",P.style.left=f.startPoint.x+"px",c.appendChild(P),f.wrapper=P,document.addEventListener("mousemove",f.__draw),document.addEventListener("mouseup",f.__drawOff)}})},g.prototype.open=function(){this.__disabled=!1},g.prototype.close=function(){this.__disabled=!0},g.pluginName="selection-select",g}();globalThis&&globalThis.__values;var Uv=globalThis&&globalThis.__extends||function(){var g=function(d,c){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,u){f.__proto__=u}||function(f,u){for(var p in u)u.hasOwnProperty(p)&&(f[p]=u[p])},g(d,c)};return function(d,c){g(d,c);function f(){this.constructor=d}d.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}(),si=globalThis&&globalThis.__read||function(g,d){var c=typeof Symbol=="function"&&g[Symbol.iterator];if(!c)return g;var f=c.call(g),u,p=[],y;try{for(;(d===void 0||d-- >0)&&!(u=f.next()).done;)p.push(u.value)}catch(b){y={error:b}}finally{try{u&&!u.done&&(c=f.return)&&c.call(f)}finally{if(y)throw y.error}}return p};(function(g){Uv(d,g);function d(){return g!==null&&g.apply(this,arguments)||this}return d.prototype.getEdge=function(){for(var c=this.getAttributes(),f=c.points,u=c.strokeWidth,p=c.stroke,y=c.strokeDashArray,b=f.split(" ").map(function(ee){return ee.split(",").map(function(ne){return Number(ne)})}),x=si(b[0],2),S=x[0],P=x[1],E="M"+S+" "+P,A=5,O=1;O<b.length-1;O++){var R=si(b[O-1],2),X=R[0],Z=R[1],G=si(b[O],2),U=G[0],I=G[1],F=si(b[O+1],2),Y=F[0],M=F[1];if(U===X&&I!==Z){var C=I>Z?I-A:I+A;E=E+" L "+U+" "+C}if(I===Z&&U!==X){var L=U>X?U-A:U+A;E=E+" L "+L+" "+I}if(E=E+" Q "+U+" "+I,U===Y&&I!==M){var C=I>M?I-A:I+A;E=E+" "+U+" "+C}if(I===M&&U!==Y){var L=U>Y?U-A:U+A;E=E+" "+L+" "+I}}var z=si(b[b.length-1],2),B=z[0],J=z[1];return E=E+" L "+B+" "+J,Ae.h("path",{d:E,strokeWidth:u,stroke:p,fill:"none",strokeDashArray:y})},d.extendKey="CurvedEdge",d})(Ae.PolylineEdge);(function(g){Uv(d,g);function d(){return g!==null&&g.apply(this,arguments)||this}return d})(Ae.PolylineEdgeModel);var Gv=globalThis&&globalThis.__extends||function(){var g=function(d,c){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,u){f.__proto__=u}||function(f,u){for(var p in u)u.hasOwnProperty(p)&&(f[p]=u[p])},g(d,c)};return function(d,c){g(d,c);function f(){this.constructor=d}d.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}(),Bw=globalThis&&globalThis.__read||function(g,d){var c=typeof Symbol=="function"&&g[Symbol.iterator];if(!c)return g;var f=c.call(g),u,p=[],y;try{for(;(d===void 0||d-- >0)&&!(u=f.next()).done;)p.push(u.value)}catch(b){y={error:b}}finally{try{u&&!u.done&&(c=f.return)&&c.call(f)}finally{if(y)throw y.error}}return p},Xw=globalThis&&globalThis.__spread||function(){for(var g=[],d=0;d<arguments.length;d++)g=g.concat(Bw(arguments[d]));return g};(function(g){Gv(d,g);function d(){var c=g!==null&&g.apply(this,arguments)||this;return c.isGroup=!0,c.children=new Set,c.isRestrict=!0,c}return d.prototype.setAttributes=function(){this.width=500,this.height=200,this.strokeWidth=1,this.zIndex=0},d.prototype.setIsRestrict=function(c){this.isRestrict=c},d.prototype.isInRange=function(c){var f=c.x1,u=c.y1,p=c.x2,y=c.y2;return f>=this.x-this.width/2&&p<=this.x+this.width/2&&u>=this.y-this.height/2&&y<=this.y+this.height/2},d.prototype.setAllowAppendChild=function(c){c?this.stroke="red":this.stroke="rgb(24, 125, 255)"},d.prototype.addChild=function(c){this.children.add(c)},d.prototype.removeChild=function(c){this.children.delete(c)},d.prototype.getData=function(){var c=g.prototype.getData.call(this);return c.children=Xw(this.children),c},d})(Ae.RectNodeModel);(function(g){Gv(d,g);function d(){return g!==null&&g.apply(this,arguments)||this}return d.prototype.toFront=function(){},d.prototype.getShapeStyle=function(){var c=g.prototype.getShapeStyle.call(this);return c.radius=0,c},d})(Ae.RectNode);var Fw=globalThis&&globalThis.__read||function(g,d){var c=typeof Symbol=="function"&&g[Symbol.iterator];if(!c)return g;var f=c.call(g),u,p=[],y;try{for(;(d===void 0||d-- >0)&&!(u=f.next()).done;)p.push(u.value)}catch(b){y={error:b}}finally{try{u&&!u.done&&(c=f.return)&&c.call(f)}finally{if(y)throw y.error}}return p};globalThis&&globalThis.__spread;var Qs,ht,Wv,Rn,jv,Yv,Ys,_a={},Vv=[],Hw=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,ec=Array.isArray;function yn(g,d){for(var c in d)g[c]=d[c];return g}function $v(g){var d=g.parentNode;d&&d.removeChild(g)}function ci(g,d,c){var f,u,p,y={};for(p in d)p=="key"?f=d[p]:p=="ref"?u=d[p]:y[p]=d[p];if(arguments.length>2&&(y.children=arguments.length>3?Qs.call(arguments,2):c),typeof g=="function"&&g.defaultProps!=null)for(p in g.defaultProps)y[p]===void 0&&(y[p]=g.defaultProps[p]);return Oa(g,y,f,u,null)}function Oa(g,d,c,f,u){var p={type:g,props:d,key:c,ref:f,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:u==null?++Wv:u,__i:-1};return u==null&&ht.vnode!=null&&ht.vnode(p),p}function tc(g){return g.children}function bo(g,d){this.props=g,this.context=d}function pi(g,d){if(d==null)return g.__?pi(g.__,g.__i+1):null;for(var c;d<g.__k.length;d++)if((c=g.__k[d])!=null&&c.__e!=null)return c.__e;return typeof g.type=="function"?pi(g):null}function Kv(g){var d,c;if((g=g.__)!=null&&g.__c!=null){for(g.__e=g.__c.base=null,d=0;d<g.__k.length;d++)if((c=g.__k[d])!=null&&c.__e!=null){g.__e=g.__c.base=c.__e;break}return Kv(g)}}function Pv(g){(!g.__d&&(g.__d=!0)&&Rn.push(g)&&!xa.__r++||jv!==ht.debounceRendering)&&((jv=ht.debounceRendering)||Yv)(xa)}function xa(){var g,d,c,f,u,p,y,b,x;for(Rn.sort(Ys);g=Rn.shift();)g.__d&&(d=Rn.length,f=void 0,u=void 0,p=void 0,b=(y=(c=g).__v).__e,(x=c.__P)&&(f=[],u=[],(p=yn({},y)).__v=y.__v+1,Qv(x,p,y,c.__n,x.ownerSVGElement!==void 0,y.__h!=null?[b]:null,f,b==null?pi(y):b,y.__h,u),p.__.__k[p.__i]=p,Ww(f,p,u),p.__e!=b&&Kv(p)),Rn.length>d&&Rn.sort(Ys));xa.__r=0}function qv(g,d,c,f,u,p,y,b,x,S,P){var E,A,O,R,X,Z,G,U,I,F=0,Y=f&&f.__k||Vv,M=Y.length,C=M,L=d.length;for(c.__k=[],E=0;E<L;E++)(R=c.__k[E]=(R=d[E])==null||typeof R=="boolean"||typeof R=="function"?null:R.constructor==String||typeof R=="number"||typeof R=="bigint"?Oa(null,R,null,null,R):ec(R)?Oa(tc,{children:R},null,null,null):R.__b>0?Oa(R.type,R.props,R.key,R.ref?R.ref:null,R.__v):R)!=null?(R.__=c,R.__b=c.__b+1,R.__i=E,(U=Uw(R,Y,G=E+F,C))===-1?O=_a:(O=Y[U]||_a,Y[U]=void 0,C--),Qv(g,R,O,u,p,y,b,x,S,P),X=R.__e,(A=R.ref)&&O.ref!=A&&(O.ref&&rc(O.ref,null,R),P.push(A,R.__c||X,R)),Z==null&&X!=null&&(Z=X),(I=O===_a||O.__v===null)?U==-1&&F--:U!==G&&(U===G+1?F++:U>G?C>L-G?F+=U-G:F--:F=U<G&&U==G-1?U-G:0),G=E+F,typeof R.type=="function"?(U!==G||O.__k===R.__k?x=Zv(R,x,g):R.__d!==void 0?x=R.__d:X&&(x=X.nextSibling),R.__d=void 0):X&&(x=U!==G||I?Jv(g,X,x):X.nextSibling),typeof c.type=="function"&&(c.__d=x)):(O=Y[E])&&O.key==null&&O.__e&&(O.__e==x&&(x=pi(O),typeof c.type=="function"&&(c.__d=x)),Vs(O,O,!1),Y[E]=null);for(c.__e=Z,E=M;E--;)Y[E]!=null&&(typeof c.type=="function"&&Y[E].__e!=null&&Y[E].__e==x&&(c.__d=Y[E].__e.nextSibling),Vs(Y[E],Y[E]))}function Zv(g,d,c){for(var f,u=g.__k,p=0;u&&p<u.length;p++)(f=u[p])&&(f.__=g,d=typeof f.type=="function"?Zv(f,d,c):Jv(c,f.__e,d));return d}function Jv(g,d,c){return d!=c&&g.insertBefore(d,c||null),d.nextSibling}function Uw(g,d,c,f){var u=g.key,p=g.type,y=c-1,b=c+1,x=d[c];if(x===null||x&&u==x.key&&p===x.type)return c;if(f>(x!=null?1:0))for(;y>=0||b<d.length;){if(y>=0){if((x=d[y])&&u==x.key&&p===x.type)return y;y--}if(b<d.length){if((x=d[b])&&u==x.key&&p===x.type)return b;b++}}return-1}function Gw(g,d,c,f,u){var p;for(p in c)p==="children"||p==="key"||p in d||Ea(g,p,null,c[p],f);for(p in d)u&&typeof d[p]!="function"||p==="children"||p==="key"||p==="value"||p==="checked"||c[p]===d[p]||Ea(g,p,d[p],c[p],f)}function kv(g,d,c){d[0]==="-"?g.setProperty(d,c==null?"":c):g[d]=c==null?"":typeof c!="number"||Hw.test(d)?c:c+"px"}function Ea(g,d,c,f,u){var p;e:if(d==="style")if(typeof c=="string")g.style.cssText=c;else{if(typeof f=="string"&&(g.style.cssText=f=""),f)for(d in f)c&&d in c||kv(g.style,d,"");if(c)for(d in c)f&&c[d]===f[d]||kv(g.style,d,c[d])}else if(d[0]==="o"&&d[1]==="n")p=d!==(d=d.replace(/(PointerCapture)$|Capture$/,"$1")),d=d.toLowerCase()in g?d.toLowerCase().slice(2):d.slice(2),g.l||(g.l={}),g.l[d+p]=c,c?f?c.u=f.u:(c.u=Date.now(),g.addEventListener(d,p?Dv:Av,p)):g.removeEventListener(d,p?Dv:Av,p);else if(d!=="dangerouslySetInnerHTML"){if(u)d=d.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(d!=="width"&&d!=="height"&&d!=="href"&&d!=="list"&&d!=="form"&&d!=="tabIndex"&&d!=="download"&&d!=="rowSpan"&&d!=="colSpan"&&d!=="role"&&d in g)try{g[d]=c==null?"":c;break e}catch(y){}typeof c=="function"||(c==null||c===!1&&d[4]!=="-"?g.removeAttribute(d):g.setAttribute(d,c))}}function Av(g){var d=this.l[g.type+!1];if(g.t){if(g.t<=d.u)return}else g.t=Date.now();return d(ht.event?ht.event(g):g)}function Dv(g){return this.l[g.type+!0](ht.event?ht.event(g):g)}function Qv(g,d,c,f,u,p,y,b,x,S){var P,E,A,O,R,X,Z,G,U,I,F,Y,M,C,L,z=d.type;if(d.constructor!==void 0)return null;c.__h!=null&&(x=c.__h,b=d.__e=c.__e,d.__h=null,p=[b]),(P=ht.__b)&&P(d);e:if(typeof z=="function")try{if(G=d.props,U=(P=z.contextType)&&f[P.__c],I=P?U?U.props.value:P.__:f,c.__c?Z=(E=d.__c=c.__c).__=E.__E:("prototype"in z&&z.prototype.render?d.__c=E=new z(G,I):(d.__c=E=new bo(G,I),E.constructor=z,E.render=Vw),U&&U.sub(E),E.props=G,E.state||(E.state={}),E.context=I,E.__n=f,A=E.__d=!0,E.__h=[],E._sb=[]),E.__s==null&&(E.__s=E.state),z.getDerivedStateFromProps!=null&&(E.__s==E.state&&(E.__s=yn({},E.__s)),yn(E.__s,z.getDerivedStateFromProps(G,E.__s))),O=E.props,R=E.state,E.__v=d,A)z.getDerivedStateFromProps==null&&E.componentWillMount!=null&&E.componentWillMount(),E.componentDidMount!=null&&E.__h.push(E.componentDidMount);else{if(z.getDerivedStateFromProps==null&&G!==O&&E.componentWillReceiveProps!=null&&E.componentWillReceiveProps(G,I),!E.__e&&(E.shouldComponentUpdate!=null&&E.shouldComponentUpdate(G,E.__s,I)===!1||d.__v===c.__v)){for(d.__v!==c.__v&&(E.props=G,E.state=E.__s,E.__d=!1),d.__e=c.__e,d.__k=c.__k,d.__k.forEach(function(B){B&&(B.__=d)}),F=0;F<E._sb.length;F++)E.__h.push(E._sb[F]);E._sb=[],E.__h.length&&y.push(E);break e}E.componentWillUpdate!=null&&E.componentWillUpdate(G,E.__s,I),E.componentDidUpdate!=null&&E.__h.push(function(){E.componentDidUpdate(O,R,X)})}if(E.context=I,E.props=G,E.__P=g,E.__e=!1,Y=ht.__r,M=0,"prototype"in z&&z.prototype.render){for(E.state=E.__s,E.__d=!1,Y&&Y(d),P=E.render(E.props,E.state,E.context),C=0;C<E._sb.length;C++)E.__h.push(E._sb[C]);E._sb=[]}else do E.__d=!1,Y&&Y(d),P=E.render(E.props,E.state,E.context),E.state=E.__s;while(E.__d&&++M<25);E.state=E.__s,E.getChildContext!=null&&(f=yn(yn({},f),E.getChildContext())),A||E.getSnapshotBeforeUpdate==null||(X=E.getSnapshotBeforeUpdate(O,R)),qv(g,ec(L=P!=null&&P.type===tc&&P.key==null?P.props.children:P)?L:[L],d,c,f,u,p,y,b,x,S),E.base=d.__e,d.__h=null,E.__h.length&&y.push(E),Z&&(E.__E=E.__=null)}catch(B){d.__v=null,x||p!=null?(d.__e=b,d.__h=!!x,p[p.indexOf(b)]=null):(d.__e=c.__e,d.__k=c.__k),ht.__e(B,d,c)}else p==null&&d.__v===c.__v?(d.__k=c.__k,d.__e=c.__e):d.__e=Yw(c.__e,d,c,f,u,p,y,x,S);(P=ht.diffed)&&P(d)}function Ww(g,d,c){d.__d=void 0;for(var f=0;f<c.length;f++)rc(c[f],c[++f],c[++f]);ht.__c&&ht.__c(d,g),g.some(function(u){try{g=u.__h,u.__h=[],g.some(function(p){p.call(u)})}catch(p){ht.__e(p,u.__v)}})}function Yw(g,d,c,f,u,p,y,b,x){var S,P,E,A=c.props,O=d.props,R=d.type,X=0;if(R==="svg"&&(u=!0),p!=null){for(;X<p.length;X++)if((S=p[X])&&"setAttribute"in S==!!R&&(R?S.localName===R:S.nodeType===3)){g=S,p[X]=null;break}}if(g==null){if(R===null)return document.createTextNode(O);g=u?document.createElementNS("http://www.w3.org/2000/svg",R):document.createElement(R,O.is&&O),p=null,b=!1}if(R===null)A===O||b&&g.data===O||(g.data=O);else{if(p=p&&Qs.call(g.childNodes),P=(A=c.props||_a).dangerouslySetInnerHTML,E=O.dangerouslySetInnerHTML,!b){if(p!=null)for(A={},X=0;X<g.attributes.length;X++)A[g.attributes[X].name]=g.attributes[X].value;(E||P)&&(E&&(P&&E.__html==P.__html||E.__html===g.innerHTML)||(g.innerHTML=E&&E.__html||""))}if(Gw(g,O,A,u,b),E)d.__k=[];else if(qv(g,ec(X=d.props.children)?X:[X],d,c,f,u&&R!=="foreignObject",p,y,p?p[0]:c.__k&&pi(c,0),b,x),p!=null)for(X=p.length;X--;)p[X]!=null&&$v(p[X]);b||("value"in O&&(X=O.value)!==void 0&&(X!==g.value||R==="progress"&&!X||R==="option"&&X!==A.value)&&Ea(g,"value",X,A.value,!1),"checked"in O&&(X=O.checked)!==void 0&&X!==g.checked&&Ea(g,"checked",X,A.checked,!1))}return g}function rc(g,d,c){try{typeof g=="function"?g(d):g.current=d}catch(f){ht.__e(f,c)}}function Vs(g,d,c){var f,u;if(ht.unmount&&ht.unmount(g),(f=g.ref)&&(f.current&&f.current!==g.__e||rc(f,null,d)),(f=g.__c)!=null){if(f.componentWillUnmount)try{f.componentWillUnmount()}catch(p){ht.__e(p,d)}f.base=f.__P=null,g.__c=void 0}if(f=g.__k)for(u=0;u<f.length;u++)f[u]&&Vs(f[u],d,c||typeof g.type!="function");c||g.__e==null||$v(g.__e),g.__=g.__e=g.__d=void 0}function Vw(g,d,c){return this.constructor(g,c)}Qs=Vv.slice,ht={__e:function(g,d,c,f){for(var u,p,y;d=d.__;)if((u=d.__c)&&!u.__)try{if((p=u.constructor)&&p.getDerivedStateFromError!=null&&(u.setState(p.getDerivedStateFromError(g)),y=u.__d),u.componentDidCatch!=null&&(u.componentDidCatch(g,f||{}),y=u.__d),y)return u.__E=u}catch(b){g=b}throw g}},Wv=0,bo.prototype.setState=function(g,d){var c;c=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=yn({},this.state),typeof g=="function"&&(g=g(yn({},c),this.props)),g&&yn(c,g),g!=null&&this.__v&&(d&&this._sb.push(d),Pv(this))},bo.prototype.forceUpdate=function(g){this.__v&&(this.__e=!0,g&&this.__h.push(g),Pv(this))},bo.prototype.render=tc,Rn=[],Yv=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ys=function(g,d){return g.__v.__b-d.__v.__b},xa.__r=0;var li=globalThis&&globalThis.__assign||function(){return li=Object.assign||function(g){for(var d,c=1,f=arguments.length;c<f;c++){d=arguments[c];for(var u in d)Object.prototype.hasOwnProperty.call(d,u)&&(g[u]=d[u])}return g},li.apply(this,arguments)};function nc(g){var d=g.x,c=g.y,f=g.width,u=g.height,p=g.radius,y=g.className,b=d-f/2,x=c-u/2,S=li(li({width:10,height:10,cx:0,cy:0,rx:p||0,ry:p||0,fill:"transparent",fillOpacity:1,strokeWidth:"1px",stroke:"#000",strokeOpacity:1,className:"lf-basic-shape "+y},g),{x:b,y:x});return Ae.h("rect",li({},S))}nc.defaultProps={radius:0,stroke:"",strokeDasharray:"",className:""};var fi;(function(g){g.NODE="node",g.CIRCLE_NODE="circle-node",g.POLYGON_NODE="polygon-node",g.RECT_NODE="rect-node",g.TEXT_NODE="text-node",g.ELLIPSE_NODE="ellipse-node",g.DIAMOND_NODE="diamond-node",g.EDGE="edge",g.LINE_EDGE="line-edge",g.POLYLINE_EDGE="polyline-edge",g.BEZIER_EDGE="bezier-edge",g.GRAPH="graph"})(fi||(fi={}));function wa(g){var d=g.x,c=g.y,f=g.width,u=g.height;return{minX:d-f/2,minY:c-u/2,maxX:d+f/2,maxY:c+u/2}}function Tv(g){var d=wa(g),c=g.radius,f=d.minX,u=d.minY,p=d.maxX,y=d.maxY;return[{x:f+c,y:u+c},{x:p-c,y:u+c},{x:p-c,y:y-c},{x:f+c,y:y-c}]}function Mv(g){var d=g.point,c=g.beforeNode,f=g.afterNode,u=d.x,p=d.y,y={x:u,y:p},b=c.radius,x=wa(c),S=wa(f);if(u===x.minX){y.x=S.minX;var P=(p-c.y)/(c.height/2-b);P?y.y=f.y+(f.height/2-b)*P:y.y=f.y}else if(u===x.maxX){y.x=S.maxX;var P=(p-c.y)/(c.height/2-b);P?y.y=f.y+(f.height/2-b)*P:y.y=f.y}else if(p===x.minY){y.y=S.minY;var P=(u-c.x)/(c.width/2-b);P?y.x=f.x+(f.width/2-b)*P:y.x=f.x}else if(p===x.maxY){y.y=S.maxY;var P=(u-c.x)/(c.width/2-b);P?y.x=f.x+(f.width/2-b)*P:y.x=f.x}else{var E=Tv(c),A=Tv(f),O=wa(c),R=O.minX,X=O.minY,Z=O.maxX,G=O.maxY,U=-1;if(u-R<b&&p-X<b?U=0:Z-u<b&&p-X<b?U=1:Z-u<b&&G-p<b?U=2:u-R<b&&X-p<b&&(U=3),U>-1){var I=Math.atan2(p-E[U].y,u-E[U].x);y.x=A[U].x+b*Math.cos(I),y.y=A[U].y+b*Math.sin(I)}}return y}function Nv(g){var d=g.point,c=g.beforeNode,f=g.afterNode,u=f.rx,p=f.ry,y=d,b=(d.y-c.y)/(d.x-c.x),x=u,S=p,P,E;return b>=1/0?(P=0,E=S):b<=-1/0?(P=0,E=-S):d.x-c.x>0?(P=x*S/Math.sqrt(S*S+x*x*b*b),E=x*S*b/Math.sqrt(S*S+x*x*b*b)):(P=-(x*S)/Math.sqrt(S*S+x*x*b*b),E=-(x*S*b)/Math.sqrt(S*S+x*x*b*b)),y={x:P+f.x,y:E+f.y},y}function Cv(g){var d=g.point,c=g.beforeNode,f=g.afterNode,u=d,p,y,b=d.x-c.x,x=d.y-c.y,S=c.rx,P=c.ry,E=Math.sqrt((S-Math.abs(b))*(S-Math.abs(b))+x*x)/Math.sqrt(S*S+P*P),A=f.rx,O=f.ry,R=Math.sqrt((A*A+O*O)*E*E*(A*A/(A*A+O*O))),X=R*(O/A);return b>=0?p=A-R:p=R-A,x>0?y=X:y=-X,u={x:p+f.x,y:y+f.y},u}var $w=globalThis&&globalThis.__extends||function(){var g=function(d,c){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,u){f.__proto__=u}||function(f,u){for(var p in u)u.hasOwnProperty(p)&&(f[p]=u[p])},g(d,c)};return function(d,c){g(d,c);function f(){this.constructor=d}d.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}(),In=globalThis&&globalThis.__assign||function(){return In=Object.assign||function(g){for(var d,c=1,f=arguments.length;c<f;c++){d=arguments[c];for(var u in d)Object.prototype.hasOwnProperty.call(d,u)&&(g[u]=d[u])}return g},In.apply(this,arguments)},Kw=Ae.LogicFlowUtil.createDrag,qw=function(g){$w(d,g);function d(c){var f=g.call(this)||this;f.updatePosition=function(y){var b=y.deltaX,x=y.deltaY,S=f.nodeModel,P=S.x,E=S.y;f.nodeModel.x=P+b/2,f.nodeModel.y=E+x/2,f.nodeModel.moveText(b/2,x/2)},f.getResize=function(y){var b=y.index,x=y.deltaX,S=y.deltaY,P=y.width,E=y.height,A=y.pct,O=A===void 0?1:A,R={width:P,height:E};switch(b){case 0:R.width=P-x*O,R.height=E-S*O;break;case 1:R.width=P+x*O,R.height=E-S*O;break;case 2:R.width=P+x,R.height=E+S*O;break;case 3:R.width=P-x*O,R.height=E+S*O;break}return R},f.updateRect=function(y){var b=y.deltaX,x=y.deltaY,S=f.nodeModel,P=S.id,E=S.x,A=S.y,O=S.width,R=S.height,X=S.radius,Z=f.index,G=f.getResize({index:Z,deltaX:b,deltaY:x,width:O,height:R,pct:1}),U=f.nodeModel,I=U.minWidth,F=U.minHeight,Y=U.maxWidth,M=U.maxHeight;if(!(G.width<I||G.width>Y||G.height<F||G.height>M)){f.updatePosition({deltaX:b,deltaY:x}),f.nodeModel.width=G.width,f.nodeModel.height=G.height,f.nodeModel.setProperties({nodeSize:{width:G.width,height:G.height}});var C=f.getNodeEdges(P),L={x:E,y:A,width:O,height:R,radius:X},z={x:f.nodeModel.x,y:f.nodeModel.y,width:f.nodeModel.width,height:f.nodeModel.height,radius:X},B={point:"",beforeNode:L,afterNode:z},J;C.sourceEdges.forEach(function(ee){B.point=ee.startPoint,J=Mv(B),ee.updateStartPoint(J)}),C.targetEdges.forEach(function(ee){B.point=ee.endPoint,J=Mv(B),ee.updateEndPoint(J)}),f.eventEmit({beforeNode:L,afterNode:z})}},f.updateEllipse=function(y){var b=y.deltaX,x=y.deltaY,S=f.nodeModel,P=S.id,E=S.rx,A=S.ry,O=S.x,R=S.y,X=f.index,Z=E,G=A,U=f.getResize({index:X,deltaX:b,deltaY:x,width:Z,height:G,pct:1/2}),I=f.nodeModel,F=I.minWidth,Y=I.minHeight,M=I.maxWidth,C=I.maxHeight;if(!(U.width<F/2||U.width>M/2||U.height<Y/2||U.height>C/2)){f.updatePosition({deltaX:b,deltaY:x}),f.nodeModel.rx=U.width,f.nodeModel.ry=U.height,f.nodeModel.setProperties({nodeSize:{rx:U.width,ry:U.height}});var L=f.getNodeEdges(P),z={x:O,y:R},B={rx:U.width,ry:U.height,x:f.nodeModel.x,y:f.nodeModel.y},J={point:{},beforeNode:z,afterNode:B},ee;L.sourceEdges.forEach(function(ne){J.point=ne.startPoint,ee=Nv(J),ne.updateStartPoint(ee)}),L.targetEdges.forEach(function(ne){J.point=ne.endPoint,ee=Nv(J),ne.updateEndPoint(ee)}),f.eventEmit({beforeNode:In(In({},z),{rx:E,ry:A}),afterNode:B})}},f.updateDiamond=function(y){var b=y.deltaX,x=y.deltaY,S=f.nodeModel,P=S.id,E=S.rx,A=S.ry,O=S.x,R=S.y,X=f.index,Z=E,G=A,U=f.getResize({index:X,deltaX:b,deltaY:x,width:Z,height:G,pct:1/2}),I=Zs.sizeRange.ellipse,F=I.minRx,Y=I.minRy,M=I.maxRx,C=I.maxRy;if(!(U.width<F||U.width>M||U.height<Y||U.height>C)){f.updatePosition({deltaX:b,deltaY:x}),f.nodeModel.rx=U.width,f.nodeModel.ry=U.height,f.nodeModel.setProperties({nodeSize:{rx:U.width,ry:U.height}});var L={x:O,y:R,rx:E,ry:A},z={rx:U.width,ry:U.height,x:f.nodeModel.x,y:f.nodeModel.y},B={point:{},beforeNode:L,afterNode:z},J,ee=f.getNodeEdges(P);ee.sourceEdges.forEach(function(ne){B.point=ne.startPoint,J=Cv(B),ne.updateStartPoint(J)}),ee.targetEdges.forEach(function(ne){B.point=ne.endPoint,J=Cv(B),ne.updateEndPoint(J)}),f.eventEmit({beforeNode:L,afterNode:z})}},f.eventEmit=function(y){var b=y.beforeNode,x=y.afterNode,S=f.nodeModel,P=S.id,E=S.modelType,A=S.type,O=In({id:P,modelType:E,type:A},b),R=In({id:P,modelType:E,type:A},x);f.graphModel.eventCenter.emit("node:resize",{oldNodeSize:O,newNodeSize:R})},f.onDraging=function(y){var b=y.deltaX,x=y.deltaY,S=f.nodeModel.modelType;S===fi.RECT_NODE?f.updateRect({deltaX:b,deltaY:x}):S===fi.ELLIPSE_NODE?f.updateEllipse({deltaX:b,deltaY:x}):S===fi.DIAMOND_NODE&&f.updateDiamond({deltaX:b,deltaY:x})},f.index=c.index,f.nodeModel=c.nodeModel,f.graphModel=c.graphModel;var u=f.graphModel.gridSize,p=2;return u>1&&(p=2*u),f.state={},f.dragHandler=Kw({onDraging:f.onDraging,step:p}),f}return d.prototype.getNodeEdges=function(c){for(var f=this.graphModel,u=f.edges,p=[],y=[],b=0;b<u.length;b++){var x=u[b];x.sourceNodeId===c?p.push(x):u[b].targetNodeId===c&&y.push(x)}return{sourceEdges:p,targetEdges:y}},d.prototype.render=function(){var c=this.props,f=c.x,u=c.y,p=c.style,y=c.index,b=Zs.style.controlPoint,x=b.width,S=b.height,P=b.fill,E=b.stroke;return ci("g",{className:"lf-resize-control-"+y},ci(nc,In({className:"lf-node-control"},{x:f,y:u},p,{width:x,height:S,fill:P,stroke:E,onMouseDown:this.dragHandler})))},d}(bo),Zw=globalThis&&globalThis.__extends||function(){var g=function(d,c){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,u){f.__proto__=u}||function(f,u){for(var p in u)u.hasOwnProperty(p)&&(f[p]=u[p])},g(d,c)};return function(d,c){g(d,c);function f(){this.constructor=d}d.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}(),$s=globalThis&&globalThis.__assign||function(){return $s=Object.assign||function(g){for(var d,c=1,f=arguments.length;c<f;c++){d=arguments[c];for(var u in d)Object.prototype.hasOwnProperty.call(d,u)&&(g[u]=d[u])}return g},$s.apply(this,arguments)},oc=function(g){Zw(d,g);function d(){var c=g.call(this)||this;return c.state={},c}return d.prototype.getResizeControl=function(){var c=this.props,f=c.x,u=c.y,p=c.width,y=c.height,b=c.nodeModel,x=c.graphModel,S={minX:f-p/2,minY:u-y/2,maxX:f+p/2,maxY:u+y/2},P=S.minX,E=S.minY,A=S.maxX,O=S.maxY,R=[{x:P,y:E},{x:A,y:E},{x:A,y:O},{x:P,y:O}];return R.map(function(X,Z){return ci(qw,$s({index:Z},X,{nodeModel:b,graphModel:x}))})},d.prototype.getGroupSolid=function(){var c=this.props,f=c.x,u=c.y,p=c.width,y=c.height,b=Zs.style.outline,x=b.stroke,S=b.strokeWidth,P=b.strokeDasharray;return ci(nc,{fill:"none",x:f,y:u,width:p,height:y,stroke:x,strokeWidth:S,strokeDasharray:P})},d.prototype.render=function(){return ci("g",{className:"lf-resize-control"},this.getGroupSolid(),this.getResizeControl())},d}(bo),eg=globalThis&&globalThis.__extends||function(){var g=function(d,c){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,u){f.__proto__=u}||function(f,u){for(var p in u)u.hasOwnProperty(p)&&(f[p]=u[p])},g(d,c)};return function(d,c){g(d,c);function f(){this.constructor=d}d.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}(),Ks=globalThis&&globalThis.__assign||function(){return Ks=Object.assign||function(g){for(var d,c=1,f=arguments.length;c<f;c++){d=arguments[c];for(var u in d)Object.prototype.hasOwnProperty.call(d,u)&&(g[u]=d[u])}return g},Ks.apply(this,arguments)},Jw=function(g){eg(d,g);function d(){var c=g!==null&&g.apply(this,arguments)||this;return c.minWidth=30,c.minHeight=30,c.maxWidth=2e3,c.maxHeight=2e3,c}return d.prototype.setAttributes=function(){this.hideOutline=!0;var c=this.properties.nodeSize;c&&(this.width=c.width,this.height=c.height)},d}(Ae.RectNodeModel),Qw=function(g){eg(d,g);function d(){return g!==null&&g.apply(this,arguments)||this}return d.prototype.getControlGroup=function(c){var f=this.props,u=f.model,p=f.graphModel;return Ae.h(oc,Ks({},c,{nodeModel:u,graphModel:p}))},d.prototype.getResizeShape=function(){return g.prototype.getShape.call(this)},d.prototype.getShape=function(){var c=g.prototype.getAttributes.call(this),f=this.props.model.isSelected;return Ae.h("g",null,this.getResizeShape(),f?this.getControlGroup(c):"")},d}(Ae.RectNode),Xs={type:"rect",view:Qw,model:Jw},Sa=globalThis&&globalThis.__assign||function(){return Sa=Object.assign||function(g){for(var d,c=1,f=arguments.length;c<f;c++){d=arguments[c];for(var u in d)Object.prototype.hasOwnProperty.call(d,u)&&(g[u]=d[u])}return g},Sa.apply(this,arguments)};function ex(g){var d=g.x,c=d===void 0?0:d,f=g.y,u=f===void 0?0:f,p=g.rx,y=p===void 0?4:p,b=g.ry,x=b===void 0?4:b,S=Sa({cx:c,cy:u,rx:y,ry:x,fill:"transparent",fillOpacity:1,strokeWidth:1,stroke:"#000",strokeOpacity:1},g);return Ae.h("ellipse",Sa({},S))}var tg=globalThis&&globalThis.__extends||function(){var g=function(d,c){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,u){f.__proto__=u}||function(f,u){for(var p in u)u.hasOwnProperty(p)&&(f[p]=u[p])},g(d,c)};return function(d,c){g(d,c);function f(){this.constructor=d}d.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}(),ja=globalThis&&globalThis.__assign||function(){return ja=Object.assign||function(g){for(var d,c=1,f=arguments.length;c<f;c++){d=arguments[c];for(var u in d)Object.prototype.hasOwnProperty.call(d,u)&&(g[u]=d[u])}return g},ja.apply(this,arguments)},tx=function(g){tg(d,g);function d(){var c=g!==null&&g.apply(this,arguments)||this;return c.minWidth=30,c.minHeight=30,c.maxWidth=2e3,c.maxHeight=2e3,c}return d.prototype.setAttributes=function(){this.hideOutline=!0;var c=this.properties.nodeSize;c&&(this.rx=c.rx,this.ry=c.ry)},d}(Ae.EllipseNodeModel),rx=function(g){tg(d,g);function d(){return g!==null&&g.apply(this,arguments)||this}return d.prototype.getControlGroup=function(c){var f=this.props,u=f.model,p=f.graphModel;return Ae.h(oc,ja({},c,{nodeModel:u,graphModel:p}))},d.prototype.getResizeShape=function(c){return Ae.h("g",null,Ae.h(ex,ja({},c)))},d.prototype.getShape=function(){var c=g.prototype.getAttributes.call(this),f=this.props.model.isSelected;return Ae.h("g",null,this.getResizeShape(c),f?this.getControlGroup(c):"")},d}(Ae.EllipseNode),Fs={type:"ellipse",view:rx,model:tx},qs=globalThis&&globalThis.__assign||function(){return qs=Object.assign||function(g){for(var d,c=1,f=arguments.length;c<f;c++){d=arguments[c];for(var u in d)Object.prototype.hasOwnProperty.call(d,u)&&(g[u]=d[u])}return g},qs.apply(this,arguments)};function nx(g){var d=g.fillOpacity,c=d===void 0?1:d,f=g.strokeWidth,u=f===void 0?1:f,p=g.strokeOpacity,y=p===void 0?1:p,b=g.fill,x=b===void 0?"transparent":b,S=g.stroke,P=S===void 0?"#000":S,E=g.points,A=g.className,O=A===void 0?"lf-basic-shape":A,R={fill:x,fillOpacity:c,strokeWidth:u,stroke:P,strokeOpacity:y,points:"",className:O};return R.points=E.map(function(X){return X.join(",")}).join(" "),Ae.h("polygon",qs({},R))}var rg=globalThis&&globalThis.__extends||function(){var g=function(d,c){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,u){f.__proto__=u}||function(f,u){for(var p in u)u.hasOwnProperty(p)&&(f[p]=u[p])},g(d,c)};return function(d,c){g(d,c);function f(){this.constructor=d}d.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}(),Pa=globalThis&&globalThis.__assign||function(){return Pa=Object.assign||function(g){for(var d,c=1,f=arguments.length;c<f;c++){d=arguments[c];for(var u in d)Object.prototype.hasOwnProperty.call(d,u)&&(g[u]=d[u])}return g},Pa.apply(this,arguments)},ox=function(g){rg(d,g);function d(){return g!==null&&g.apply(this,arguments)||this}return d.prototype.setAttributes=function(){this.hideOutline=!0;var c=this.properties.nodeSize;c&&(this.rx=c.rx,this.ry=c.ry)},d}(Ae.DiamondNodeModel),ix=function(g){rg(d,g);function d(){return g!==null&&g.apply(this,arguments)||this}return d.prototype.getControlGroup=function(c){var f=this.props,u=f.model,p=f.graphModel;return Ae.h(oc,Pa({},c,{nodeModel:u,graphModel:p}))},d.prototype.getResizeShape=function(c){return Ae.h("g",null,Ae.h(nx,Pa({},c)))},d.prototype.getShape=function(){var c=g.prototype.getAttributes.call(this),f=this.props.model.isSelected;return Ae.h("g",null,this.getResizeShape(c),f?this.getControlGroup(c):"")},d}(Ae.DiamondNode),Hs={type:"diamond",view:ix,model:ox},ax={pluginName:"node-resize",step:0,style:{outline:{stroke:"#000000",strokeWidth:1,strokeDasharray:"3,3"},controlPoint:{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},sizeRange:{ellipse:{minRx:15,minRy:15,maxRx:150,maxRy:150},diamond:{minRx:15,minRy:15,maxRx:150,maxRy:150}},install:function(g){g.register({type:Xs.type,view:Xs.view,model:Xs.model}),g.register({type:Fs.type,view:Fs.view,model:Fs.model}),g.register({type:Hs.type,view:Hs.view,model:Hs.model})}};const Zs=ax;var ux=globalThis&&globalThis.__read||function(g,d){var c=typeof Symbol=="function"&&g[Symbol.iterator];if(!c)return g;var f=c.call(g),u,p=[],y;try{for(;(d===void 0||d-- >0)&&!(u=f.next()).done;)p.push(u.value)}catch(b){y={error:b}}finally{try{u&&!u.done&&(c=f.return)&&c.call(f)}finally{if(y)throw y.error}}return p};globalThis&&globalThis.__spread;var Rv=globalThis&&globalThis.__assign||function(){return Rv=Object.assign||function(g){for(var d,c=1,f=arguments.length;c<f;c++){d=arguments[c];for(var u in d)Object.prototype.hasOwnProperty.call(d,u)&&(g[u]=d[u])}return g},Rv.apply(this,arguments)};const sx=z1({name:"FlowChart",components:{BasicModal:J1,FlowChartToolbar:I1,JsonPreview:Q1},props:{flowOptions:{type:Object,default:()=>({})},data:{type:Object,default:()=>({})},toolbar:{type:Boolean,default:!0},patternItems:{type:Array}},setup(g){const d=zs(null),c=zs({}),f=zs(null),{prefixCls:u}=B1("flow-chart"),p=X1(),[y,{openModal:b}]=tw();q1({logicFlow:f});const x=F1(()=>{const{flowOptions:A}=g;return Is({grid:!0,background:{color:p.getDarkMode==="light"?"#f7f9ff":"#151515"},keyboard:{enabled:!0}},A)});lv(()=>g.data,()=>{P()}),lv(()=>dn(x),A=>{var O;(O=dn(f))==null||O.updateEditConfig(A)});function S(){return Ls(this,null,function*(){yield fv();const A=dn(d);if(!A)return;go.use(Lw),go.use(Sw),go.use(Ew),go.use(Iw),go.use(zw),f.value=new go(cv(Is({},dn(x)),{container:A}));const O=dn(f);O==null||O.setDefaultEdgeType("line"),P(),O==null||O.setPatternItems(g.patternItems||ew(O))})}function P(){return Ls(this,null,function*(){yield fv();const A=dn(f);if(!A)return;const O=Z1(g.data);A.render(O)})}function E(){const A=dn(f);A&&(c.value=dn(A).getGraphData(),b())}return H1(S),{register:y,prefixCls:u,lfElRef:d,handlePreview:E,graphData:c}}}),cx={ref:"lfElRef",class:"h-full"};function lx(g,d,c,f,u,p){const y=Bs("FlowChartToolbar"),b=Bs("JsonPreview"),x=Bs("BasicModal");return pv(),G1("div",{class:K1(["h-full",g.prefixCls])},[g.toolbar?(pv(),W1(y,{key:0,prefixCls:g.prefixCls,onViewData:g.handlePreview},null,8,["prefixCls","onViewData"])):Y1("",!0),V1("div",cx,null,512),hv(x,{onRegister:g.register,title:"\u6D41\u7A0B\u6570\u636E",width:"50%"},{default:$1(()=>[hv(b,{data:g.graphData},null,8,["data"])]),_:1},8,["onRegister"])],2)}const Lx=U1(sx,[["render",lx]]);export{Lx as default};
|