202 lines
1.3 MiB
JavaScript
202 lines
1.3 MiB
JavaScript
|
|
var _8=Object.defineProperty;var b8=(e,t,n)=>t in e?_8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var fa=(e,t,n)=>b8(e,typeof t!="symbol"?t+"":t,n);import{dr as Sv,eP as Eu,dn as io,eQ as Rx,db as oh,eR as Gm,eS as Uf,eT as ih,eU as NM,eV as js,ef as dc,dc as pa,eW as w8,dd as fc,ea as PM,eX as E8,eY as zm,eZ as Ds,e6 as o_,e8 as Vw,dk as ah,au as pc,e_ as CM,e$ as lh,eg as Rv,f0 as Uw,di as ao,f1 as i_,dM as a_,ee as kd,dS as Bo,f2 as Av,dj as Yf,f3 as jv,f4 as Hm,dR as hc,dh as dl,df as Ao,f5 as O8,f6 as RM,eE as Ou,ed as Na,f7 as x8,f8 as S8,f9 as Dv,fa as l_,fb as jM,dL as sh,fc as DM,bL as Ww,dg as Xm,at as Iv,dQ as Dm,dO as eh,e9 as A8,ec as jx,eb as M8,as as IM,fd as LM,fe as k8,dm as s_,de as T8,ei as Ag,ff as N8,fg as $M,fh as FM,fi as P8,fj as BM,fk as C8,dp as R8,fl as j8,fm as D8,fn as I8,fo as Mg,fp as L8,el as $8,fq as VM,dN as UM,eh as Gw,fr as WM,fs as zw,ft as F8,dl as qm,fu as GM,fv as B8,fw as zM,fx as HM,fy as V8,fz as U8,fA as W8,em as Im,eC as G8,fB as z8,fC as H8,aw as X8,fD as q8,fE as Y8,fF as K8,fG as Z8,fH as J8,fI as Q8,fJ as eD,ai as tD,eF as nD,fK as rD,ax as oD,fL as iD,fM as aD,fN as lD,fO as sD,fP as uD,fQ as cD,av as dD,fR as fD,eG as pD,fS as hD,eD as vD,fT as mD,fU as yD,fV as gD,fW as _D,ay as Vn,aB as Re,aV as Ym,aD as J,aE as be,aW as Ht,aX as ar,aH as k,aI as Y,aY as Gr,aF as at,aG as P,b2 as _n,c$ as sw,bX as Bf,dw as Dx,aJ as de,bY as Hw,aK as et,b1 as pn,aS as rn,cf as Kf,fX as ha,aQ as Li,aA as XM,aO as $n,aP as qM,b6 as Ir,b8 as Ga,bc as YM,cg as Wf,cq as kg,fY as Tg,bW as tg,aT as po,aN as Is,aZ as ge,b7 as Mv,ce as Cl,cF as KM,ci as Lm,c1 as ei,aC as yt,c0 as Xw,aM as nr,fZ as $m,ch as cl,d5 as bD,bB as kv,aU as Zf,f_ as wD,f$ as ED,g0 as ZM,g1 as JM,g2 as OD,g3 as xD,g4 as SD,g5 as AD,g6 as MD,g7 as oo,du as qw,dv as kD,cu as TD,bD as Gf,dJ as ND,b3 as zf,g8 as is,cJ as PD,g9 as Ix,ga as Zp,gb as CD,gc as Yw,gd as Kw,ge as RD,gf as jD,b4 as QM,bZ as uw,az as DD,er as Lx,cY as ID,bG as Od,bH as Nl,bI as _u,bK as Ua,bJ as If}from"./admin-DgPvPHD7.js";import{t as $x,a as Fx,g as LD,i as vc,n as $D,c as Zw,l as ng,d as FD}from"./data-CRwDCy2p.js";import{_ as Pd}from"./AIModeParamSettingDialog.vue_vue_type_script_setup_true_lang-B62TecnF.js";import{G as Jw,d as BD,e as VD,f as UD,_ as ek,c as tk,b as WD,a as GD}from"./ToolDialog.vue_vue_type_style_index_0_lang-ewLcFQb8.js";import{d as nk,c as uh,v as Km,e as zD,g as rk,f as HD,a as XD,r as qD}from"./reduce-Cl4okoTU.js";import{c as Qw,b as u_,i as eE,p as ok,n as tE,a as YD,d as nE,e as KD,f as ZD,g as JD,h as QD,u as eI,j as tI,k as nI,l as rI,m as oI,r as iI,o as aI,q as lI,s as sI,t as uI}from"./uniqBy--yaca0vR.js";import{c as cI,a as dI,b as fI,e as pI,f as hI,m as vI,d as mI,h as yI}from"./min-DkVNHWJH.js";import{d as ik,e as gI,g as _I,h as bI,i as wI,z as EI,s as OI,m as xI,a as SI,b as AI,f as MI,c as kI,r as TI,u as NI}from"./zipObject-BfXmd17x.js";import{l as ak,_ as lk}from"./vue-draggable-plus-bMgZGhSz.js";import{_ as PI}from"./FieldFormDialog.vue_vue_type_script_setup_true_lang-D7Bq1Igx.js";import{_ as fn}from"./defineProperty-DbXIQDXj.js";import"./typeof-QjJsDpFa.js";const sk=Object.freeze(Object.defineProperty({__proto__:null,get default(){return jne}},Symbol.toStringTag,{value:"Module"}));var CI=NaN;function Bx(e){return typeof e=="number"?e:Sv(e)?CI:+e}function c_(e,t){return function(n,a){var r;if(n===void 0&&a===void 0)return t;if(n!==void 0&&(r=n),a!==void 0){if(r===void 0)return a;typeof n=="string"||typeof a=="string"?(n=Eu(n),a=Eu(a)):(n=Bx(n),a=Bx(a)),r=e(n,a)}return r}}var RI=c_(function(e,t){return e+t},0),jI="Expected a function";function DI(e,t){if(typeof t!="function")throw new TypeError(jI);return e=io(e),function(){if(--e<1)return t.apply(this,arguments)}}var Ng=Rx&&new Rx,uk=Ng?function(e,t){return Ng.set(e,t),e}:oh;function Fm(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4])
|
|||
|
|
/* [wrapped with `+t+`] */
|
|||
|
|
`)}var ZI=1,JI=2,QI=8,e4=16,t4=32,n4=64,r4=128,o4=256,i4=512,a4=[["ary",r4],["bind",ZI],["bindKey",JI],["curry",QI],["curryRight",e4],["flip",i4],["partial",t4],["partialRight",n4],["rearg",o4]];function l4(e,t){return fc(a4,function(n){var a="_."+n[0];t&n[1]&&!PM(e,a)&&e.push(a)}),e.sort()}function hk(e,t,n){var a=t+"";return E8(e,KI(a,l4(qI(a),n)))}var s4=4,u4=8,Vx=32,Ux=64;function vk(e,t,n,a,r,s,c,v,f,g){var _=t&u4,b=_?c:void 0,x=_?void 0:c,S=_?s:void 0,A=_?void 0:s;t|=_?Vx:Ux,t&=~(_?Ux:Vx),t&s4||(t&=-4);var E=[e,t,r,S,b,A,x,v,f,g],T=n.apply(void 0,E);return cw(e)&&pk(T,E),T.placeholder=a,hk(T,e,t)}function Lv(e){var t=e;return t.placeholder}var c4=Math.min;function d4(e,t){for(var n=e.length,a=c4(t.length,n),r=js(e);a--;){var s=t[a];e[a]=zm(s,n)?r[s]:void 0}return e}var Wx="__lodash_placeholder__";function Hf(e,t){for(var n=-1,a=e.length,r=0,s=[];++n<a;){var c=e[n];(c===t||c===Wx)&&(e[n]=Wx,s[r++]=n)}return s}var f4=1,p4=2,h4=8,v4=16,m4=128,y4=512;function f_(e,t,n,a,r,s,c,v,f,g){var _=t&m4,b=t&f4,x=t&p4,S=t&(h4|v4),A=t&y4,E=x?void 0:Fm(e);function T(){for(var I=arguments.length,R=Array(I),U=I;U--;)R[U]=arguments[U];if(S)var D=Lv(T),L=BI(R,D);if(a&&(R=ck(R,a,r,S)),s&&(R=dk(R,s,c,S)),I-=L,S&&I<g){var W=Hf(R,D);return vk(e,t,f_,T.placeholder,n,R,W,v,f,g-I)}var H=b?n:this,B=x?H[e]:e;return I=R.length,v?R=d4(R,v):A&&I>1&&R.reverse(),_&&f<I&&(R.length=f),this&&this!==ih&&this instanceof T&&(B=E||Fm(B)),B.apply(H,R)}return T}function g4(e,t,n){var a=Fm(e);function r(){for(var s=arguments.length,c=Array(s),v=s,f=Lv(r);v--;)c[v]=arguments[v];var g=s<3&&c[0]!==f&&c[s-1]!==f?[]:Hf(c,f);if(s-=g.length,s<n)return vk(e,t,f_,r.placeholder,void 0,c,g,void 0,void 0,n-s);var _=this&&this!==ih&&this instanceof r?a:e;return Ds(_,this,c)}return r}var _4=1;function b4(e,t,n,a){var r=t&_4,s=Fm(e);function c(){for(var v=-1,f=arguments.length,g=-1,_=a.length,b=Array(_+f),x=this&&this!==ih&&this instanceof c?s:e;++g<_;)b[g]=a[g];for(;f--;)b[g++]=arguments[++v];return Ds(x,r?n:this,b)}return c}var Gx="__lodash_placeholder__",g1=1,w4=2,E4=4,zx=8,vm=128,Hx=256,O4=Math.min;function x4(e,t){var n=e[1],a=t[1],r=n|a,s=r<(g1|w4|vm),c=a==vm&&n==zx||a==vm&&n==Hx&&e[7].length<=t[8]||a==(vm|Hx)&&t[7].length<=t[8]&&n==zx;if(!(s||c))return e;a&g1&&(e[2]=t[2],r|=n&g1?0:E4);var v=t[3];if(v){var f=e[3];e[3]=f?ck(f,v,t[4]):v,e[4]=f?Hf(e[3],Gx):t[4]}return v=t[5],v&&(f=e[5],e[5]=f?dk(f,v,t[6]):v,e[6]=f?Hf(e[5],Gx):t[6]),v=t[7],v&&(e[7]=v),a&vm&&(e[8]=e[8]==null?t[8]:O4(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=r,e}var S4="Expected a function",Xx=1,A4=2,qx=8,Yx=16,Kx=32,M4=64,Zx=Math.max;function Cd(e,t,n,a,r,s,c,v){var f=t&A4;if(!f&&typeof e!="function")throw new TypeError(S4);var g=a?a.length:0;if(g||(t&=-97,a=r=void 0),c=c===void 0?c:Zx(io(c),0),v=v===void 0?v:io(v),g-=r?r.length:0,t&M4){var _=a,b=r;a=r=void 0}var x=f?void 0:rE(e),S=[e,t,n,a,r,_,b,s,c,v];if(x&&x4(S,x),e=S[0],t=S[1],n=S[2],a=S[3],r=S[4],v=S[9]=S[9]===void 0?f?0:e.length:Zx(S[9]-g,0),!v&&t&(qx|Yx)&&(t&=-25),!t||t==Xx)var A=LI(e,t,n);else t==qx||t==Yx?A=g4(e,t,v):(t==Kx||t==(Xx|Kx))&&!r.length?A=b4(e,t,n,a):A=f_.apply(void 0,S);var E=x?uk:pk;return hk(E(A,S),e,t)}var k4=128;function mk(e,t,n){return t=n?void 0:t,t=e&&t==null?e.length:t,Cd(e,k4,void 0,void 0,void 0,void 0,t)}var T4=o_(function(e,t){Vw(t,ah(t),e)}),dw=o_(function(e,t,n,a){Vw(t,ah(t),e,a)}),N4=o_(function(e,t,n,a){Vw(t,pc(t),e,a)});function oE(e,t){for(var n=-1,a=t.length,r=Array(a),s=e==null;++n<a;)r[n]=s?void 0:CM(e,t[n]);return r}var P4=lh(oE),C4="[object DOMException]",R4="[object Error]";function iE(e){if(!dc(e))return!1;var t=Rv(e);return t==R4||t==C4||typeof e.message=="string"&&typeof e.name=="string"&&!Uw(e)}var yk=ao(function(e,t){try{return Ds(e,void 0,t)}catch(n){return iE(n)?n:new Error(n)}}),j4="Expected a function";function gk(e,t){var n;if(typeof t!="function")throw new TypeError(j4);return e=io(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}var D4=1,I4=32,p_=ao(function(e,t,n){var a=D4;if(n.length){var r=Hf(n,Lv(p_));a|=I4}return Cd(e,a,t,n,r)});p_.placeholder={};var L4=lh(fu
|
|||
|
|
`:"";e.replace(x,function(T,I,R,U,D,L){return R||(R=U),b+=e.slice(g,L).replace(Q9,G9),I&&(v=!0,b+=`' +
|
|||
|
|
__e(`+I+`) +
|
|||
|
|
'`),D&&(f=!0,b+=`';
|
|||
|
|
`+D+`;
|
|||
|
|
__p += '`),R&&(b+=`' +
|
|||
|
|
((__t = (`+R+`)) == null ? '' : __t) +
|
|||
|
|
'`),g=L+T.length,T}),b+=`';
|
|||
|
|
`;var A=sS.call(t,"variable")&&t.variable;if(!A)b=`with (obj) {
|
|||
|
|
`+b+`
|
|||
|
|
}
|
|||
|
|
`;else if(Z9.test(A))throw new Error(X9);b=(f?b.replace(q9,""):b).replace(Y9,"$1").replace(K9,"$1;"),b="function("+(A||"obj")+`) {
|
|||
|
|
`+(A?"":`obj || (obj = {});
|
|||
|
|
`)+"var __t, __p = ''"+(v?", __e = _.escape":"")+(f?`, __j = Array.prototype.join;
|
|||
|
|
function print() { __p += __j.call(arguments, '') }
|
|||
|
|
`:`;
|
|||
|
|
`)+b+`return __p
|
|||
|
|
}`;var E=yk(function(){return Function(s,S+"return "+b).apply(void 0,c)});if(E.source=b,iE(E))throw E;return E}function b_(e,t){return t(e)}var n7=9007199254740991,b1=4294967295,r7=Math.min;function o7(e,t){if(e=io(e),e<1||e>n7)return[];var n=b1,a=r7(e,b1);t=uh(t),e-=b1;for(var r=GM(a,t);++n<e;)t(n);return r}function i7(){return this}function wT(e,t){var n=e;return n instanceof eo&&(n=n.value()),nk(t,function(a,r){return r.func.apply(r.thisArg,Hm([a],r.args))},n)}function a7(){return wT(this.__wrapped__,this.__actions__)}function l7(e){return Bo(e).toLowerCase()}function s7(e){return pa(e)?dl(e,i_):Sv(e)?[e]:js(B8(Bo(e)))}var uS=9007199254740991;function u7(e){return e?Dv(io(e),-uS,uS):e===0?e:0}function c7(e){return Bo(e).toUpperCase()}function d7(e,t,n){var a=pa(e),r=a||zM(e)||HM(e);if(t=Ao(t),n==null){var s=e&&e.constructor;r?n=a?new s:[]:Uf(e)?n=Iv(s)?Gm(V8(e)):{}:n={}}return(r?fc:sh)(e,function(c,v,f){return t(n,c,v,f)}),n}function ET(e,t){for(var n=e.length;n--&&Gw(t,e[n],0)>-1;);return n}function OT(e,t){for(var n=-1,a=e.length;++n<a&&Gw(t,e[n],0)>-1;);return n}function f7(e,t,n){if(e=Bo(e),e&&(n||t===void 0))return U8(e);if(!e||!(t=Eu(t)))return e;var a=xu(e),r=xu(t),s=OT(a,r),c=ET(a,r)+1;return Jf(a,s,c).join("")}function p7(e,t,n){if(e=Bo(e),e&&(n||t===void 0))return e.slice(0,W8(e)+1);if(!e||!(t=Eu(t)))return e;var a=xu(e),r=ET(a,xu(t))+1;return Jf(a,0,r).join("")}var h7=/^\s+/;function v7(e,t,n){if(e=Bo(e),e&&(n||t===void 0))return e.replace(h7,"");if(!e||!(t=Eu(t)))return e;var a=xu(e),r=OT(a,xu(t));return Jf(a,r).join("")}var m7=30,y7="...",g7=/\w*$/;function _7(e,t){var n=m7,a=y7;if(Uf(t)){var r="separator"in t?t.separator:r;n="length"in t?io(t.length):n,a="omission"in t?Eu(t.omission):a}e=Bo(e);var s=e.length;if($v(e)){var c=xu(e);s=c.length}if(n>=s)return e;var v=n-Bv(a);if(v<1)return a;var f=c?Jf(c,0,v).join(""):e.slice(0,v);if(r===void 0)return f+a;if(c&&(v+=f.length-v),nE(r)){if(e.slice(v).search(r)){var g,_=f;for(r.global||(r=RegExp(r.source,Bo(g7.exec(r))+"g")),r.lastIndex=0;g=r.exec(_);)var b=g.index;f=f.slice(0,b===void 0?v:b)}}else if(e.indexOf(Eu(r),v)!=v){var x=f.lastIndexOf(r);x>-1&&(f=f.slice(0,x))}return f+a}function b7(e){return mk(e,1)}var w7={"&":"&","<":"<",">":">",""":'"',"'":"'"},E7=sE(w7),xT=/&(?:amp|lt|gt|quot|#39);/g,O7=RegExp(xT.source);function x7(e){return e=Bo(e),e&&O7.test(e)?e.replace(xT,E7):e}var S7=ao(function(e){var t=Ou(e);return Na(t)&&(t=void 0),Im(hc(e,1,Na,!0),Ao(t))}),A7=ao(function(e){var t=Ou(e);return t=typeof t=="function"?t:void 0,Im(hc(e,1,Na,!0),void 0,t)});function M7(e,t){return t=typeof t=="function"?t:void 0,e&&e.length?Im(e,void 0,t):[]}function k7(e,t){return e==null?!0:WM(e,t)}var T7=Math.max;function wE(e){if(!(e&&e.length))return[];var t=0;return e=Xm(e,function(n){if(Na(n))return t=T7(n.length,t),!0}),GM(t,function(n){return dl(e,VM(n))})}function ST(e,t){if(!(e&&e.length))return[];var n=wE(e);return t==null?n:dl(n,function(a){return Ds(t,void 0,a)})}function AT(e,t,n,a){return zw(e,t,n(UM(e,t)),a)}function N7(e,t,n){return e==null?e:AT(e,t,uh(n))}function P7(e,t,n,a){return a=typeof a=="function"?a:void 0,e==null?e:AT(e,t,uh(n),a)}var C7=Fv(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()});function R7(e){return e==null?[]:rk(e,ah(e))}var j7=ao(function(e,t){return Na(e)?u_(e,t):[]});function D7(e,t){return y_(uh(t),e)}var I7=lh(function(e){var t=e.length,n=t?e[0]:0,a=this.__wrapped__,r=function(s){return oE(s,e)};return t>1||this.__actions__.length||!(a instanceof eo)||!zm(n)?this.thru(r):(a=a.slice(n,+n+(t?1:0)),a.__actions__.push({func:b_,args:[r],thisArg:void 0}),new Ls(a,this.__chain__).thru(function(s){return t&&!s.length&&s.push(void 0),s}))});function L7(){return Uk(this)}function $7(){var e=this.__wrapped__;if(e instanceof eo){var t=e;return this.__actions__.length&&(t=new eo(this)),t=t.reverse(),t.__actions__.push({func:b_,args:[yw],thisArg:void 0}),new Ls(t,this.__chain__)}return this.thru(yw)}function EE(e,t,n){var a=e.length;if(a<2)return a?Im(e[0]):[];for(var r=-1,s=Array(a);++r<a;)for(var c=e[r],v=-1;++v<a;)v!=r&
|
|||
|
|
* @license
|
|||
|
|
* Lodash (Custom Build) <https://lodash.com/>
|
|||
|
|
* Build: `lodash modularize exports="es" -o ./`
|
|||
|
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|||
|
|
* Released under MIT license <https://lodash.com/license>
|
|||
|
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|||
|
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|||
|
|
*/var tB="4.17.23",nB=2,rB=1,oB=3,MT=4294967295,iB=Array.prototype,aB=Object.prototype,kT=aB.hasOwnProperty,cS=Mg?Mg.iterator:void 0,lB=Math.max,dS=Math.min,xE=(function(e){return function(t,n,a){if(a==null){var r=Uf(n),s=r&&pc(n),c=s&&s.length&&v_(n,s);(c?c.length:r)||(a=n,n=t,t=this)}return e(t,n,a)}})(T$);ce.after=Ri.after;ce.ary=Ri.ary;ce.assign=Ar.assign;ce.assignIn=Ar.assignIn;ce.assignInWith=Ar.assignInWith;ce.assignWith=Ar.assignWith;ce.at=Ar.at;ce.before=Ri.before;ce.bind=Ri.bind;ce.bindAll=Mo.bindAll;ce.bindKey=Ri.bindKey;ce.castArray=fr.castArray;ce.chain=mc.chain;ce.chunk=Bn.chunk;ce.compact=Bn.compact;ce.concat=Bn.concat;ce.cond=Mo.cond;ce.conforms=Mo.conforms;ce.constant=Mo.constant;ce.countBy=Vo.countBy;ce.create=Ar.create;ce.curry=Ri.curry;ce.curryRight=Ri.curryRight;ce.debounce=Ri.debounce;ce.defaults=Ar.defaults;ce.defaultsDeep=Ar.defaultsDeep;ce.defer=Ri.defer;ce.delay=Ri.delay;ce.difference=Bn.difference;ce.differenceBy=Bn.differenceBy;ce.differenceWith=Bn.differenceWith;ce.drop=Bn.drop;ce.dropRight=Bn.dropRight;ce.dropRightWhile=Bn.dropRightWhile;ce.dropWhile=Bn.dropWhile;ce.fill=Bn.fill;ce.filter=Vo.filter;ce.flatMap=Vo.flatMap;ce.flatMapDeep=Vo.flatMapDeep;ce.flatMapDepth=Vo.flatMapDepth;ce.flatten=Bn.flatten;ce.flattenDeep=Bn.flattenDeep;ce.flattenDepth=Bn.flattenDepth;ce.flip=Ri.flip;ce.flow=Mo.flow;ce.flowRight=Mo.flowRight;ce.fromPairs=Bn.fromPairs;ce.functions=Ar.functions;ce.functionsIn=Ar.functionsIn;ce.groupBy=Vo.groupBy;ce.initial=Bn.initial;ce.intersection=Bn.intersection;ce.intersectionBy=Bn.intersectionBy;ce.intersectionWith=Bn.intersectionWith;ce.invert=Ar.invert;ce.invertBy=Ar.invertBy;ce.invokeMap=Vo.invokeMap;ce.iteratee=Mo.iteratee;ce.keyBy=Vo.keyBy;ce.keys=pc;ce.keysIn=Ar.keysIn;ce.map=Vo.map;ce.mapKeys=Ar.mapKeys;ce.mapValues=Ar.mapValues;ce.matches=Mo.matches;ce.matchesProperty=Mo.matchesProperty;ce.memoize=Ri.memoize;ce.merge=Ar.merge;ce.mergeWith=Ar.mergeWith;ce.method=Mo.method;ce.methodOf=Mo.methodOf;ce.mixin=xE;ce.negate=tE;ce.nthArg=Mo.nthArg;ce.omit=Ar.omit;ce.omitBy=Ar.omitBy;ce.once=Ri.once;ce.orderBy=Vo.orderBy;ce.over=Mo.over;ce.overArgs=Ri.overArgs;ce.overEvery=Mo.overEvery;ce.overSome=Mo.overSome;ce.partial=Ri.partial;ce.partialRight=Ri.partialRight;ce.partition=Vo.partition;ce.pick=Ar.pick;ce.pickBy=Ar.pickBy;ce.property=Mo.property;ce.propertyOf=Mo.propertyOf;ce.pull=Bn.pull;ce.pullAll=Bn.pullAll;ce.pullAllBy=Bn.pullAllBy;ce.pullAllWith=Bn.pullAllWith;ce.pullAt=Bn.pullAt;ce.range=Mo.range;ce.rangeRight=Mo.rangeRight;ce.rearg=Ri.rearg;ce.reject=Vo.reject;ce.remove=Bn.remove;ce.rest=Ri.rest;ce.reverse=Bn.reverse;ce.sampleSize=Vo.sampleSize;ce.set=Ar.set;ce.setWith=Ar.setWith;ce.shuffle=Vo.shuffle;ce.slice=Bn.slice;ce.sortBy=Vo.sortBy;ce.sortedUniq=Bn.sortedUniq;ce.sortedUniqBy=Bn.sortedUniqBy;ce.split=bo.split;ce.spread=Ri.spread;ce.tail=Bn.tail;ce.take=Bn.take;ce.takeRight=Bn.takeRight;ce.takeRightWhile=Bn.takeRightWhile;ce.takeWhile=Bn.takeWhile;ce.tap=mc.tap;ce.throttle=Ri.throttle;ce.thru=b_;ce.toArray=fr.toArray;ce.toPairs=Ar.toPairs;ce.toPairsIn=Ar.toPairsIn;ce.toPath=Mo.toPath;ce.toPlainObject=fr.toPlainObject;ce.transform=Ar.transform;ce.unary=Ri.unary;ce.union=Bn.union;ce.unionBy=Bn.unionBy;ce.unionWith=Bn.unionWith;ce.uniq=Bn.uniq;ce.uniqBy=Bn.uniqBy;ce.uniqWith=Bn.uniqWith;ce.unset=Ar.unset;ce.unzip=Bn.unzip;ce.unzipWith=Bn.unzipWith;ce.update=Ar.update;ce.updateWith=Ar.updateWith;ce.values=Ar.values;ce.valuesIn=Ar.valuesIn;ce.without=Bn.without;ce.words=bo.words;ce.wrap=Ri.wrap;ce.xor=Bn.xor;ce.xorBy=Bn.xorBy;ce.xorWith=Bn.xorWith;ce.zip=Bn.zip;ce.zipObject=Bn.zipObject;ce.zipObjectDeep=Bn.zipObjectDeep;ce.zipWith=Bn.zipWith;ce.entries=Ar.toPairs;ce.entriesIn=Ar.toPairsIn;ce.extend=Ar.assignIn;ce.extendWith=Ar.assignInWith;xE(ce,ce);ce.add=pl.add;ce.attempt=Mo.attempt;ce.camelCase=bo.camelCase;ce.capitalize=bo.capitalize;ce.ceil=pl.ceil;ce.clamp=OE.clamp;ce.clone=fr.clone;ce.cloneDeep=fr.cloneDeep;ce.cloneDeepWith=fr.cloneDeepWith;ce.cloneWith=fr.cloneWith;ce.conformsTo=fr.conformsTo;ce.deburr=bo.deburr;ce.defaultTo=Mo.defaultTo;ce.divide=pl.divide;ce.
|
|||
|
|
{{${yt("views.applicationWorkflow.nodes.searchKnowledgeNode.label")}.data}}
|
|||
|
|
${yt("views.problem.title")}:
|
|||
|
|
{{${yt("views.applicationWorkflow.nodes.startNode.label")}.question}}`,dialogue_number:1,is_result:!0,temperature:null,max_tokens:null,dialogue_type:"WORKFLOW",model_setting:{reasoning_content_start:"<think>",reasoning_content_end:"</think>",reasoning_content_enable:!1}},b=$n({get:()=>x.nodeModel.properties.node_data?(x.nodeModel.properties.node_data.model_setting||ge.set(x.nodeModel.properties.node_data,"model_setting",{reasoning_content_start:"<think>",reasoning_content_end:"</think>",reasoning_content_enable:!1}),x.nodeModel.properties.node_data):(ge.set(x.nodeModel.properties,"node_data",_),x.nodeModel.properties.node_data),set:Be=>{ge.set(x.nodeModel.properties,"node_data",Be)}}),x=e,S=Re(),A=Re(null),E=Re(),T=Re(),I=()=>{var Be;return(Be=S.value)==null?void 0:Be.validate().catch(lt=>Promise.reject({node:x.nodeModel,errMessage:lt}))},R=t();function U(){var lt;const Be=r.value==="systemManage"?{model_type:"LLM",workspace_id:(lt=R.value)==null?void 0:lt.workspace_id}:{model_type:"LLM"};po({type:"model",systemType:r.value}).getSelectModelList(Be).then(St=>{A.value=ge.groupBy(St==null?void 0:St.data,"provider")})}const D=Be=>{var lt;Be&&((lt=E.value)==null||lt.open(Be,a,b.value.model_params_setting))},L=Re(),W=Be=>{var lt;Be&&((lt=L.value)==null||lt.open(Be,a))},H=Be=>{ge.set(x.nodeModel.properties.node_data,"system",Be)},B=()=>{var Be;(Be=T.value)==null||Be.open(b.value.model_setting)};function F(Be){ge.set(x.nodeModel.properties.node_data,"model_params_setting",Be)}function q(Be){let lt=ge.cloneDeep(x.nodeModel.properties.node_data.model_setting);lt={...lt,...Be},ge.set(x.nodeModel.properties.node_data,"model_setting",lt)}const K=Re();function X(){const Be={mcp_servers:b.value.mcp_servers,mcp_tool_ids:b.value.mcp_tool_ids,mcp_source:b.value.mcp_source};K.value.open(Be,rt.value)}function ee(Be){ge.set(x.nodeModel.properties.node_data,"mcp_servers",Be.mcp_servers),ge.set(x.nodeModel.properties.node_data,"mcp_tool_ids",Be.mcp_tool_ids),ge.set(x.nodeModel.properties.node_data,"mcp_source",Be.mcp_source)}const ue=Re();function ae(){ue.value.open(b.value.tool_ids)}function we(Be){ge.set(x.nodeModel.properties.node_data,"tool_ids",Be.tool_ids)}function je(Be){const lt=x.nodeModel.properties.node_data.tool_ids.filter(St=>St!==Be);ge.set(x.nodeModel.properties.node_data,"tool_ids",lt)}function Te(Be){const lt=x.nodeModel.properties.node_data.mcp_tool_ids.filter(St=>St!==Be);ge.set(x.nodeModel.properties.node_data,"mcp_tool_ids",lt)}const Me=Re([]);function Ne(){var lt;const Be=r.value==="systemManage"?{scope:"WORKSPACE",tool_type:"CUSTOM",workspace_id:(lt=R.value)==null?void 0:lt.workspace_id}:{scope:"WORKSPACE",tool_type:"CUSTOM"};po({type:"tool",systemType:r.value}).getAllToolList(Be).then(St=>{Me.value=[...St.data.shared_tools,...St.data.tools].filter(He=>He.is_active)})}const rt=Re([]);function tt(){var lt;const Be=r.value==="systemManage"?{scope:"WORKSPACE",tool_type:"MCP",workspace_id:(lt=R.value)==null?void 0:lt.workspace_id}:{scope:"WORKSPACE",tool_type:"MCP"};po({type:"tool",systemType:r.value}).getAllToolList(Be).then(St=>{rt.value=[...St.data.shared_tools,...St.data.tools].filter(He=>He.is_active)})}return Ir(()=>{var Be,lt,St,He;U(),typeof((Be=x.nodeModel.properties.node_data)==null?void 0:Be.is_result)>"u"&&vc(x.nodeModel)&&ge.set(x.nodeModel.properties.node_data,"is_result",!0),ge.set(x.nodeModel,"validate",I),b.value.dialogue_type||(b.value.dialogue_type="WORKFLOW"),(lt=x.nodeModel.properties.node_data)!=null&<.mcp_tool_id&&(ge.set(x.nodeModel.properties.node_data,"mcp_tool_ids",[(St=x.nodeModel.properties.node_data)==null?void 0:St.mcp_tool_id]),ge.set(x.nodeModel.properties.node_data,"mcp_tool_id",void 0)),((He=x.nodeModel.properties.node_data)==null?void 0:He.mcp_output_enable)===void 0&&ge.set(x.nodeModel.properties.node_data,"mcp_output_enable",!0),Ne(),tt()}),(Be,lt)=>{const St=J("AppIcon"),He=J("el-button"),Jt=J("ModelSelect"),Fe=J("el-form-item"),me=J("el-tooltip"),Le=J("MdEditorMagnify"),Ye=J("el-option"),Ot=J("el-select"),bt=J("el-input-number"),Ft=J("el-switch"),Qt=J("el-avatar"),on=J("ToolIcon"),W
|
|||
|
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|||
|
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|||
|
|
this file except in compliance with the License. You may obtain a copy of the
|
|||
|
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
|||
|
|
|
|||
|
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|||
|
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|||
|
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|||
|
|
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|||
|
|
|
|||
|
|
See the Apache Version 2.0 License for specific language governing permissions
|
|||
|
|
and limitations under the License.
|
|||
|
|
***************************************************************************** */var ue=function(){return ue=Object.assign||function(N){for(var C,z=1,ie=arguments.length;z<ie;z++)for(var Ee in C=arguments[z])Object.prototype.hasOwnProperty.call(C,Ee)&&(N[Ee]=C[Ee]);return N},ue.apply(this,arguments)};function ae(N){var C=typeof Symbol=="function"&&N[Symbol.iterator],z=0;return C?C.call(N):{next:function(){return N&&z>=N.length&&(N=void 0),{value:N&&N[z++],done:!N}}}}function we(N,C){var z=typeof Symbol=="function"&&N[Symbol.iterator];if(!z)return N;var ie,Ee,Ke=z.call(N),wt=[];try{for(;(C===void 0||C-- >0)&&!(ie=Ke.next()).done;)wt.push(ie.value)}catch(Yt){Ee={error:Yt}}finally{try{ie&&!ie.done&&(z=Ke.return)&&z.call(Ke)}finally{if(Ee)throw Ee.error}}return wt}function je(){for(var N=[],C=0;C<arguments.length;C++)N=N.concat(we(arguments[C]));return N}var Te=Symbol("mobx did run lazy initializers"),Me=Symbol("mobx pending decorators"),Ne={},rt={};function tt(N,C){var z=C?Ne:rt;return z[N]||(z[N]={configurable:!0,enumerable:C,get:function(){return Be(this),this[N]},set:function(ie){Be(this),this[N]=ie}})}function Be(N){var C,z;if(N[Te]!==!0){var ie=N[Me];if(ie){T(N,Te,!0);var Ee=je(Object.getOwnPropertySymbols(ie),Object.keys(ie));try{for(var Ke=ae(Ee),wt=Ke.next();!wt.done;wt=Ke.next()){var Yt=ie[wt.value];Yt.propertyCreator(N,Yt.prop,Yt.descriptor,Yt.decoratorTarget,Yt.decoratorArguments)}}catch(Sn){C={error:Sn}}finally{try{wt&&!wt.done&&(z=Ke.return)&&z.call(Ke)}finally{if(C)throw C.error}}}}}function lt(N,C){return function(){var z,ie=function(Ee,Ke,wt,Yt){if(Yt===!0)return C(Ee,Ke,wt,Ee,z),null;if(!Object.prototype.hasOwnProperty.call(Ee,Me)){var Sn=Ee[Me];T(Ee,Me,ue({},Sn))}return Ee[Me][Ke]={prop:Ke,propertyCreator:C,descriptor:wt,decoratorTarget:Ee,decoratorArguments:z},tt(Ke,N)};return St(arguments)?(z=v,ie.apply(null,arguments)):(z=Array.prototype.slice.call(arguments),ie)}}function St(N){return(N.length===2||N.length===3)&&(typeof N[1]=="string"||typeof N[1]=="symbol")||N.length===4&&N[3]===!0}function He(N,C,z){return si(N)?N:Array.isArray(N)?Wt.array(N,{name:z}):E(N)?Wt.object(N,void 0,{name:z}):R(N)?Wt.map(N,{name:z}):U(N)?Wt.set(N,{name:z}):N}function Jt(N){return N}function Fe(N){b(N);var C=lt(!0,(function(ie,Ee,Ke,wt,Yt){var Sn=Ke?Ke.initializer?Ke.initializer.call(ie):Ke.value:void 0;ia(ie).addObservableProp(Ee,Sn,N)})),z=(s!==void 0&&s.env,C);return z.enhancer=N,z}var me={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function Le(N){return N==null?me:typeof N=="string"?{name:N,deep:!0,proxy:!0}:N}Object.freeze(me);var Ye=Fe(He),Ot=Fe((function(N,C,z){return N==null||ci(N)||ba(N)||Ko(N)||ni(N)?N:Array.isArray(N)?Wt.array(N,{name:z,deep:!1}):E(N)?Wt.object(N,void 0,{name:z,deep:!1}):R(N)?Wt.map(N,{name:z,deep:!1}):U(N)?Wt.set(N,{name:z,deep:!1}):_(!1)})),bt=Fe(Jt),Ft=Fe((function(N,C,z){return Vt(N,C)?C:N}));function Qt(N){return N.defaultDecorator?N.defaultDecorator.enhancer:N.deep===!1?Jt:He}var on={box:function(N,C){arguments.length>2&&nt("box");var z=Le(C);return new Lr(N,Qt(z),z.name,!0,z.equals)},array:function(N,C){arguments.length>2&&nt("array");var z=Le(C);return Fl(N,Qt(z),z.name)},map:function(N,C){arguments.length>2&&nt("map");var z=Le(C);return new Pc(N,Qt(z),z.name)},set:function(N,C){arguments.length>2&&nt("set");var z=Le(C);return new qa(N,Qt(z),z.name)},object:function(N,C,z){typeof arguments[1]=="string"&&nt("object");var ie=Le(z);if(ie.proxy===!1)return ya({},N,C,ie);var Ee=Tu(ie),Ke=ya({},void 0,void 0,ie),wt=us(Ke);return Ud(wt,N,C,Ee),wt},ref:bt,shallow:Ot,deep:Ye,struct:Ft},Wt=function(N,C,z){if(typeof arguments[1]=="string"||typeof arguments[1]=="symbol")return Ye.apply(null,arguments);if(si(N))return N;var ie=E(N)?Wt.object(N,C,z):Array.isArray(N)?Wt.array(N,C):R(N)?Wt.map(N,C):U(N)?Wt.set(N,C):N;if(ie!==N)return ie;_(!1)};function nt(N){_("Expected one or two arguments to observable."+N+". Did you accidentally try to use observable."+N+" as decorator?")}Object.keys(on).forEach((function(N){return Wt[N]=on[N]}));var sn,We,yn=lt(!1,(function(N,C,z,ie,Ee){var Ke=z.get,wt=z.s
|
|||
|
|
/*
|
|||
|
|
Tracing '`+N.name+`'
|
|||
|
|
|
|||
|
|
You are entering this break point because derivation '`+N.name+"' is being traced and '"+C.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.
|
|||
|
|
|
|||
|
|
`+(N instanceof za?N.derivation.toString().replace(/[*]\//g,"/"):"")+`
|
|||
|
|
|
|||
|
|
The dependencies for this derivation are:
|
|||
|
|
|
|||
|
|
`+z.join(`
|
|||
|
|
`)+`
|
|||
|
|
*/
|
|||
|
|
`)()}}function ma(N,C,z){C.length>=1e3?C.push("(and many more)"):(C.push(""+new Array(z).join(" ")+N.name),N.dependencies&&N.dependencies.forEach((function(ie){return ma(ie,C,z+1)})))}var Ca=(function(){function N(C,z,ie,Ee){C===void 0&&(C="Reaction@"+g()),Ee===void 0&&(Ee=!1),this.name=C,this.onInvalidate=z,this.errorHandler=ie,this.requiresObservable=Ee,this.observing=[],this.newObserving=[],this.dependenciesState=sn.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+g(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=We.NONE}return N.prototype.onBecomeStale=function(){this.schedule()},N.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Rn.pendingReactions.push(this),wc())},N.prototype.isScheduled=function(){return this._isScheduled},N.prototype.runReaction=function(){if(!this.isDisposed){if(Ki(),this._isScheduled=!1,Dr(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending}catch(C){this.reportExceptionInDerivation(C)}}oa()}},N.prototype.track=function(C){if(!this.isDisposed){Ki(),this._isRunning=!0;var z=ko(this,C,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&Se(this),br(z)&&this.reportExceptionInDerivation(z.cause),oa()}},N.prototype.reportExceptionInDerivation=function(C){var z=this;if(this.errorHandler)this.errorHandler(C,this);else{if(Rn.disableErrorBoundaries)throw C;Rn.suppressReactionErrors,Rn.globalReactionErrorHandlers.forEach((function(ie){return ie(C,z)}))}},N.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(Ki(),Se(this),oa()))},N.prototype.getDisposer=function(){var C=this.dispose.bind(this);return C[B]=this,C},N.prototype.toString=function(){return"Reaction["+this.name+"]"},N.prototype.trace=function(C){C===void 0&&(C=!1),(function(){for(var z=[],ie=0;ie<arguments.length;ie++)z[ie]=arguments[ie];var Ee=!1;typeof z[z.length-1]=="boolean"&&(Ee=z.pop());var Ke=Vr(z);if(!Ke)return _(!1);Ke.isTracing,We.NONE,Ke.isTracing=Ee?We.BREAK:We.LOG})(this,C)},N})(),bc=function(N){return N()};function wc(){Rn.inBatch>0||Rn.isRunningReactions||bc(Ld)}function Ld(){Rn.isRunningReactions=!0;for(var N=Rn.pendingReactions,C=0;N.length>0;){++C==100&&N.splice(0);for(var z=N.splice(0),ie=0,Ee=z.length;ie<Ee;ie++)z[ie].runReaction()}Rn.isRunningReactions=!1}var Bs=I("Reaction",Ca);function $d(N){var C=bc;bc=function(z){return N((function(){return C(z)}))}}function Ec(N){return function(){}}function rp(){_(!1)}function Il(N){return function(C,z,ie){if(ie){if(ie.value)return{value:Yo(N,ie.value),enumerable:!1,configurable:!0,writable:!0};var Ee=ie.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return Yo(N,Ee.call(this))}}}return Fd(N).apply(this,arguments)}}function Fd(N){return function(C,z,ie){Object.defineProperty(C,z,{configurable:!0,enumerable:!1,get:function(){},set:function(Ee){T(this,z,gl(N,Ee))}})}}var gl=function(N,C,z,ie){return arguments.length===1&&typeof N=="function"?Yo(N.name||"<unnamed action>",N):arguments.length===2&&typeof C=="function"?Yo(N,C):arguments.length===1&&typeof N=="string"?Il(N):ie!==!0?Il(C).apply(null,arguments):void T(N,C,Yo(N.name||C,z.value,this))};function Oc(N,C){return ti(typeof N=="string"?N:N.name||"<unnamed action>",typeof N=="function"?N:C,this,void 0)}function ku(N){return typeof N=="function"&&N.isMobxAction===!0}function xc(N,C,z){T(N,C,Yo(C,z.bind(N)))}function Sc(N,C){C===void 0&&(C=f);var z,ie=C&&C.name||N.name||"Autorun@"+g();if(!C.scheduler&&!C.delay)z=new Ca(ie,(function(){this.track(wt)}),C.onError,C.requiresObservable);else{var Ee=Bd(C),Ke=!1;z=new Ca(ie,(function(){Ke||(Ke=!0,Ee((function(){Ke=!1,z.isDisposed||z.track(wt)})))}),C.onError,C.requiresObservable)}function wt(){N(z)}return z.schedule(),z.getDisposer()}gl.bound=function(N,C,z,ie){return ie===!0?(xc(N,C,z.value),null):z?{configurable:!0,enumerable:!1,get:function(){return xc(this,C,z.value||z.initializer.call(this)),this[C]},set:rp}:{enumerable:!1,configurable:!0,set:function(Ee){xc(this,C,Ee)},
|
|||
|
|
`)&&(He="(?: "+He+")",Fe=" "+Fe,Jt++),ee=new RegExp("^(?:"+He+")",St)),q&&(ee=new RegExp("^"+He+"$(?!\\s)",St)),B&&(ue=Me.lastIndex),ae=v(R,lt?ee:Me,Fe),lt?ae?(ae.input=H(ae.input,Jt),ae[0]=H(ae[0],Jt),ae.index=Me.lastIndex,Me.lastIndex+=ae[0].length):Me.lastIndex=0:B&&ae&&(Me.lastIndex=Me.global?ae.index+ae[0].length:ue),q&&ae&&ae.length>1&&v(I,ae[0],ee,(function(){for(we=1;we<arguments.length-2;we++)arguments[we]===void 0&&(ae[we]=void 0)})),ae&&Be)for(ae.groups=je=S(null),we=0;we<Be.length;we++)je[(Te=Be[we])[0]]=ae[Te[1]];return ae}),n.exports=U},function(n,a,r){var s=r(16),c=r(7),v=r(75),f=r(59),g=r(45),_=r(40),b=r(115),x=r(63),S=r(81)("splice"),A=c.TypeError,E=Math.max,T=Math.min,I=9007199254740991,R="Maximum allowed length exceeded";s({target:"Array",proto:!0,forced:!S},{splice:function(U,D){var L,W,H,B,F,q,K=_(this),X=g(K),ee=v(U,X),ue=arguments.length;if(ue===0?L=W=0:ue===1?(L=0,W=X-ee):(L=ue-2,W=T(E(f(D),0),X-ee)),X+L-W>I)throw A(R);for(H=b(K,W),B=0;B<W;B++)(F=ee+B)in K&&x(H,B,K[F]);if(H.length=W,L<W){for(B=ee;B<X-W;B++)q=B+L,(F=B+W)in K?K[q]=K[F]:delete K[q];for(B=X;B>X-W+L;B--)delete K[B-1]}else if(L>W)for(B=X-W;B>ee;B--)q=B+L-1,(F=B+W-1)in K?K[q]=K[F]:delete K[q];for(B=0;B<L;B++)K[B+ee]=arguments[B+2];return K.length=X-W+L,H}})},function(n,a,r){var s=r(16),c=r(205);s({target:"String",proto:!0,forced:r(206)("anchor")},{anchor:function(v){return c(this,"a","name",v)}})},function(n,a,r){(function(s){var c=typeof s=="object"&&s&&s.Object===Object&&s;a.a=c}).call(this,r(68))},function(n,a,r){(function(s){var c=r(31),v=t&&!t.nodeType&&t,f=v&&typeof s=="object"&&s&&!s.nodeType&&s,g=f&&f.exports===v?c.a.Buffer:void 0,_=g?g.allocUnsafe:void 0;a.a=function(b,x){if(x)return b.slice();var S=b.length,A=_?_(S):new b.constructor(S);return b.copy(A),A}}).call(this,r(122)(n))},function(n,a,r){var s=r(70),c=r(18);n.exports=!!Object.getOwnPropertySymbols&&!c((function(){var v=Symbol();return!String(v)||!(Object(v)instanceof Symbol)||!Symbol.sham&&s&&s<41}))},function(n,a,r){var s=r(7),c=r(110),v="__core-js_shared__",f=s[v]||c(v,{});n.exports=f},function(n,a,r){var s=r(7),c=Object.defineProperty;n.exports=function(v,f){try{c(s,v,{value:f,configurable:!0,writable:!0})}catch{s[v]=f}return f}},function(n,a){n.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(n,a){a.f=Object.getOwnPropertySymbols},function(n,a,r){var s={};s[r(28)("toStringTag")]="z",n.exports=String(s)==="[object z]"},function(n,a,r){var s=r(7),c=r(75),v=r(45),f=r(63),g=s.Array,_=Math.max;n.exports=function(b,x,S){for(var A=v(b),E=c(x,A),T=c(S===void 0?A:S,A),I=g(_(T-E,0)),R=0;E<T;E++,R++)f(I,R,b[E]);return I.length=R,I}},function(n,a,r){var s=r(178);n.exports=function(c,v){return new(s(c))(v===0?0:v)}},function(n,a,r){var s=r(16),c=r(34),v=r(71),f=r(73),g=r(30),_=r(180),b=r(101),x=r(102),S=r(78),A=r(57),E=r(42),T=r(28),I=r(80),R=r(142),U=f.PROPER,D=f.CONFIGURABLE,L=R.IteratorPrototype,W=R.BUGGY_SAFARI_ITERATORS,H=T("iterator"),B="keys",F="values",q="entries",K=function(){return this};n.exports=function(X,ee,ue,ae,we,je,Te){_(ue,ee,ae);var Me,Ne,rt,tt=function(me){if(me===we&&Jt)return Jt;if(!W&&me in St)return St[me];switch(me){case B:case F:case q:return function(){return new ue(this,me)}}return function(){return new ue(this)}},Be=ee+" Iterator",lt=!1,St=X.prototype,He=St[H]||St["@@iterator"]||we&&St[we],Jt=!W&&He||tt(we),Fe=ee=="Array"&&St.entries||He;if(Fe&&(Me=b(Fe.call(new X)))!==Object.prototype&&Me.next&&(v||b(Me)===L||(x?x(Me,L):g(Me[H])||E(Me,H,K)),S(Me,Be,!0,!0),v&&(I[Be]=K)),U&&we==F&&He&&He.name!==F&&(!v&&D?A(St,"name",F):(lt=!0,Jt=function(){return c(He,this)})),we)if(Ne={values:tt(F),keys:je?Jt:tt(B),entries:tt(q)},Te)for(rt in Ne)(W||lt||!(rt in St))&&E(St,rt,Ne[rt]);else s({target:ee,proto:!0,forced:W||lt},Ne);return v&&!Te||St[H]===Jt||E(St,H,Jt,{name:we}),I[ee]=Jt,Ne}},function(n,a,r){var s=r(7),c=r(64),v=r(34),f=r(32),g=r(88),_=r(145),b=r(45),x=r(54),S=r(146),A=r(118),E=r(147),T=s.TypeError,I=function(U,D){this.stopped=U,this.result=D},R=I.prototype;n.exports=function
|
|||
|
|
* @license
|
|||
|
|
* Lodash <https://lodash.com/>
|
|||
|
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|||
|
|
* Released under MIT license <https://lodash.com/license>
|
|||
|
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|||
|
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|||
|
|
*/(function(){var f,g="Expected a function",_="__lodash_hash_undefined__",b="__lodash_placeholder__",x=16,S=32,A=64,E=128,T=256,I=1/0,R=9007199254740991,U=NaN,D=4294967295,L=[["ary",E],["bind",1],["bindKey",2],["curry",8],["curryRight",x],["flip",512],["partial",S],["partialRight",A],["rearg",T]],W="[object Arguments]",H="[object Array]",B="[object Boolean]",F="[object Date]",q="[object Error]",K="[object Function]",X="[object GeneratorFunction]",ee="[object Map]",ue="[object Number]",ae="[object Object]",we="[object Promise]",je="[object RegExp]",Te="[object Set]",Me="[object String]",Ne="[object Symbol]",rt="[object WeakMap]",tt="[object ArrayBuffer]",Be="[object DataView]",lt="[object Float32Array]",St="[object Float64Array]",He="[object Int8Array]",Jt="[object Int16Array]",Fe="[object Int32Array]",me="[object Uint8Array]",Le="[object Uint8ClampedArray]",Ye="[object Uint16Array]",Ot="[object Uint32Array]",bt=/\b__p \+= '';/g,Ft=/\b(__p \+=) '' \+/g,Qt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,on=/&(?:amp|lt|gt|quot|#39);/g,Wt=/[&<>"']/g,nt=RegExp(on.source),sn=RegExp(Wt.source),We=/<%-([\s\S]+?)%>/g,yn=/<%([\s\S]+?)%>/g,Kn=/<%=([\s\S]+?)%>/g,te=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Gn=/^\w*$/,br=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Dr=/[\\^$.*+?()[\]{}|]/g,zr=RegExp(Dr.source),jn=/^\s+/,ko=/\s/,Se=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Qe=/\{\n\/\* \[wrapped with (.+)\] \*/,$e=/,? & /,st=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,an=/[()=,{}\[\]\/\s]/,en=/\\(\\)?/g,Tn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Sr=/\w*$/,li=/^[-+]0x[0-9a-f]+$/i,Ei=/^0b[01]+$/i,Yo=/^\[object .+?Constructor\]$/,ti=/^0o[0-7]+$/i,Nn=/^(?:0|[1-9]\d*)$/,Un=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Zn=/($^)/,ur=/['\n\r\u2028\u2029\\]/g,to="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Lr="\\u2700-\\u27bf",ml="a-z\\xdf-\\xf6\\xf8-\\xff",za="A-Z\\xc0-\\xd6\\xd8-\\xde",yl="\\ufe0e\\ufe0f",as="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",np="['’]",gc="[\\ud800-\\udfff]",va="["+as+"]",Fs="["+to+"]",Rn="\\d+",Id="[\\u2700-\\u27bf]",Eo="["+ml+"]",_c="[^\\ud800-\\udfff"+as+Rn+Lr+ml+za+"]",Ki="\\ud83c[\\udffb-\\udfff]",oa="[^\\ud800-\\udfff]",Mu="(?:\\ud83c[\\udde6-\\uddff]){2}",Pa="[\\ud800-\\udbff][\\udc00-\\udfff]",ma="["+za+"]",Ca="(?:"+Eo+"|"+_c+")",bc="(?:"+ma+"|"+_c+")",wc="(?:['’](?:d|ll|m|re|s|t|ve))?",Ld="(?:['’](?:D|LL|M|RE|S|T|VE))?",Bs="(?:"+Fs+"|"+Ki+")?",$d="[\\ufe0e\\ufe0f]?",Ec=$d+Bs+("(?:\\u200d(?:"+[oa,Mu,Pa].join("|")+")"+$d+Bs+")*"),rp="(?:"+[Id,Mu,Pa].join("|")+")"+Ec,Il="(?:"+[oa+Fs+"?",Fs,Mu,Pa,gc].join("|")+")",Fd=RegExp(np,"g"),gl=RegExp(Fs,"g"),Oc=RegExp(Ki+"(?="+Ki+")|"+Il+Ec,"g"),ku=RegExp([ma+"?"+Eo+"+"+wc+"(?="+[va,ma,"$"].join("|")+")",bc+"+"+Ld+"(?="+[va,ma+Ca,"$"].join("|")+")",ma+"?"+Ca+"+"+wc,ma+"+"+Ld,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Rn,rp].join("|"),"g"),xc=RegExp("[\\u200d\\ud800-\\udfff"+to+yl+"]"),Sc=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,op=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Bd=-1,Kr={};Kr[lt]=Kr[St]=Kr[He]=Kr[Jt]=Kr[Fe]=Kr[me]=Kr[Le]=Kr[Ye]=Kr[Ot]=!0,Kr[W]=Kr[H]=Kr[tt]=Kr[B]=Kr[Be]=Kr[F]=Kr[q]=Kr[K]=Kr[ee]=Kr[ue]=Kr[ae]=Kr[je]=Kr[Te]=Kr[Me]=Kr[rt]=!1;var Xr={};Xr[W]=Xr[H]=Xr[tt]=Xr[Be]=Xr[B]=Xr[F]=Xr[lt]=Xr[St]=Xr[He]=Xr[Jt]=Xr[Fe]=Xr[ee]=Xr[ue]=Xr[ae]=Xr[je]=Xr[Te]=Xr[Me]=Xr[Ne]=Xr[me]=Xr[Le]=Xr[Ye]=Xr[Ot]=!0,Xr[q]=Xr[K]=Xr[rt]=!1;var Vd={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ls=parseFloat,ya=parseInt,Tu=typeof s=="object"&&s&&s.Ob
|
|||
|
|
/* [wrapped with `+re+`] */
|
|||
|
|
`)})($,(function(Z,re){return Fi(L,(function(ve){var xe="_."+ve[0];re&ve[1]&&!Zi(Z,xe)&&Z.push(xe)})),Z.sort()})((function(Z){var re=Z.match(Qe);return re?re[1].split($e):[]})($),O)))}function kp(p){var y=0,O=0;return function(){var $=Yd(),Z=16-($-O);if(O=$,Z>0){if(++y>=800)return arguments[0]}else y=0;return p.apply(f,arguments)}}function Ml(p,y){var O=-1,$=p.length,Z=$-1;for(y=y===f?$:y;++O<y;){var re=gp(O,Z),ve=p[re];p[re]=p[O],p[O]=ve}return p.length=y,p}var Tp=(function(p){var y=Zl(p,(function($){return O.size===500&&O.clear(),$})),O=y.cache;return y})((function(p){var y=[];return p.charCodeAt(0)===46&&y.push(""),p.replace(br,(function(O,$,Z,re){y.push(Z?re.replace(en,"$1"):$||O)})),y}));function il(p){if(typeof p=="string"||gt(p))return p;var y=p+"";return y=="0"&&1/p==-1/0?"-0":y}function Es(p){if(p!=null){try{return Or.call(p)}catch{}try{return p+""}catch{}}return""}function wf(p){if(p instanceof jr)return p.clone();var y=new Da(p.__wrapped__,p.__chain__);return y.__actions__=yi(p.__actions__),y.__index__=p.__index__,y.__values__=p.__values__,y}var Ph=kr((function(p,y){return Co(p)?el(p,oi(y,1,Co,!0)):[]})),Ch=kr((function(p,y){var O=xo(y);return Co(O)&&(O=f),Co(p)?el(p,oi(y,1,Co,!0),rr(O,2)):[]})),Rh=kr((function(p,y){var O=xo(y);return Co(O)&&(O=f),Co(p)?el(p,oi(y,1,Co,!0),f,O):[]}));function Np(p,y,O){var $=p==null?0:p.length;if(!$)return-1;var Z=O==null?0:ht(O);return Z<0&&(Z=Wo($+Z,0)),Vi(p,rr(y,3),Z)}function Ef(p,y,O){var $=p==null?0:p.length;if(!$)return-1;var Z=$-1;return O!==f&&(Z=ht(O),Z=O<0?Wo($+Z,0):Gi(Z,$-1)),Vi(p,rr(y,3),Z,!0)}function Qc(p){return p!=null&&p.length?oi(p,1):[]}function jh(p){return p&&p.length?p[0]:f}var al=kr((function(p){var y=Vr(p,uf);return y.length&&y[0]===p[0]?Bc(y):[]})),Os=kr((function(p){var y=xo(p),O=Vr(p,uf);return y===xo(O)?y=f:O.pop(),O.length&&O[0]===p[0]?Bc(O,rr(y,2)):[]})),Qv=kr((function(p){var y=xo(p),O=Vr(p,uf);return(y=typeof y=="function"?y:f)&&O.pop(),O.length&&O[0]===p[0]?Bc(O,f,y):[]}));function xo(p){var y=p==null?0:p.length;return y?p[y-1]:f}var ed=kr(au);function au(p,y){return p&&p.length&&y&&y.length?rf(p,y):p}var td=xl((function(p,y){var O=p==null?0:p.length,$=$c(p,y);return yp(p,Vr(y,(function(Z){return Ii(Z,O)?+Z:Z})).sort(Bu)),$}));function Xu(p){return p==null?p:zv.call(p)}var nd=kr((function(p){return ys(oi(p,1,Co,!0))})),rd=kr((function(p){var y=xo(p);return Co(y)&&(y=f),ys(oi(p,1,Co,!0),rr(y,2))})),od=kr((function(p){var y=xo(p);return y=typeof y=="function"?y:f,ys(oi(p,1,Co,!0),f,y)}));function lu(p){if(!p||!p.length)return[];var y=0;return p=Bi(p,(function(O){if(Co(O))return y=Wo(O.length,y),!0})),Fl(y,(function(O){return Vr(p,Ui(O))}))}function Yl(p,y){if(!p||!p.length)return[];var O=lu(p);return y==null?O:Vr(O,(function($){return lo(y,f,$)}))}var gi=kr((function(p,y){return Co(p)?el(p,y):[]})),Of=kr((function(p){return sf(Bi(p,Co))})),id=kr((function(p){var y=xo(p);return Co(y)&&(y=f),sf(Bi(p,Co),rr(y,2))})),su=kr((function(p){var y=xo(p);return y=typeof y=="function"?y:f,sf(Bi(p,Co),f,y)})),qu=kr(lu),Si=kr((function(p){var y=p.length,O=y>1?p[y-1]:f;return O=typeof O=="function"?(p.pop(),O):f,Yl(p,O)}));function Po(p){var y=le(p);return y.__chain__=!0,y}function ad(p,y){return y(p)}var Hi=xl((function(p){var y=p.length,O=y?p[0]:0,$=this.__wrapped__,Z=function(re){return $c(re,p)};return!(y>1||this.__actions__.length)&&$ instanceof jr&&Ii(O)?(($=$.slice(O,+O+(y?1:0))).__actions__.push({func:ad,args:[Z],thisArg:f}),new Da($,this.__chain__).thru((function(re){return y&&!re.length&&re.push(f),re}))):this.thru(Z)})),Wn=Xl((function(p,y,O){vn.call(p,O)?++p[O]:Qa(p,O,1)})),xf=pf(Np),ld=pf(Ef);function Sf(p,y){return(wr(p)?Fi:Oo)(p,rr(y,3))}function Pp(p,y){return(wr(p)?Gd:bh)(p,rr(y,3))}var Dh=Xl((function(p,y,O){vn.call(p,O)?p[O].push(y):Qa(p,O,[y])})),xs=kr((function(p,y,O){var $=-1,Z=typeof y=="function",re=ca(p)?bn(p.length):[];return Oo(p,(function(ve){re[++$]=Z?lo(y,ve,O):zi(ve,y,O)})),re})),Ih=Xl((function(p,y,O){Qa(p,O,y)}));function uu(p,y){return(wr(p)?Vr:xa)(p,rr(y,3))}var Lh=Xl((function(p,y,O){p[O?0:1].push(y)}),(function(){return[[],
|
|||
|
|
`;p.replace(xn,(function(nn,sr,Pn,qe,yr,Br){return Pn||(Pn=qe),Xt+=p.slice(_t,Br).replace(ur,Us),sr&&(Z=!0,Xt+=`' +
|
|||
|
|
__e(`+sr+`) +
|
|||
|
|
'`),yr&&(re=!0,Xt+=`';
|
|||
|
|
`+yr+`;
|
|||
|
|
__p += '`),Pn&&(Xt+=`' +
|
|||
|
|
((__t = (`+Pn+`)) == null ? '' : __t) +
|
|||
|
|
'`),_t=Br+nn.length,nn})),Xt+=`';
|
|||
|
|
`;var qn=vn.call(y,"variable")&&y.variable;if(qn){if(an.test(qn))throw new Rr("Invalid `variable` option passed into `_.template`")}else Xt=`with (obj) {
|
|||
|
|
`+Xt+`
|
|||
|
|
}
|
|||
|
|
`;Xt=(re?Xt.replace(bt,""):Xt).replace(Ft,"$1").replace(Qt,"$1;"),Xt="function("+(qn||"obj")+`) {
|
|||
|
|
`+(qn?"":`obj || (obj = {});
|
|||
|
|
`)+"var __t, __p = ''"+(Z?", __e = _.escape":"")+(re?`, __j = Array.prototype.join;
|
|||
|
|
function print() { __p += __j.call(arguments, '') }
|
|||
|
|
`:`;
|
|||
|
|
`)+Xt+`return __p
|
|||
|
|
}`;var Lt=er((function(){return yo(xe,An+"return "+Xt).apply(f,Ue)}));if(Lt.source=Xt,Ai(Lt))throw Lt;return Lt},le.times=function(p,y){if((p=ht(p))<1||p>R)return[];var O=D,$=Gi(p,D);y=rr(y),p-=D;for(var Z=Fl($,y);++O<p;)y(O);return Z},le.toFinite=jt,le.toInteger=ht,le.toLength=Kt,le.toLower=function(p){return At(p).toLowerCase()},le.toNumber=Gt,le.toSafeInteger=function(p){return p?vs(ht(p),-9007199254740991,R):p===0?p:0},le.toString=At,le.toUpper=function(p){return At(p).toUpperCase()},le.trim=function(p,y,O){if((p=At(p))&&(O||y===f))return ja(p);if(!p||!(y=sa(y)))return p;var $=Qi(p),Z=Qi(y);return no($,ba($,Z),Nc($,Z)+1).join("")},le.trimEnd=function(p,y,O){if((p=At(p))&&(O||y===f))return p.slice(0,ci(p)+1);if(!p||!(y=sa(y)))return p;var $=Qi(p);return no($,0,Nc($,Qi(y))+1).join("")},le.trimStart=function(p,y,O){if((p=At(p))&&(O||y===f))return p.replace(jn,"");if(!p||!(y=sa(y)))return p;var $=Qi(p);return no($,ba($,Qi(y))).join("")},le.truncate=function(p,y){var O=30,$="...";if(Lo(y)){var Z="separator"in y?y.separator:Z;O="length"in y?ht(y.length):O,$="omission"in y?sa(y.omission):$}var re=(p=At(p)).length;if(qa(p)){var ve=Qi(p);re=ve.length}if(O>=re)return p;var xe=O-Wi($);if(xe<1)return $;var Ue=ve?no(ve,0,xe).join(""):p.slice(0,xe);if(Z===f)return Ue+$;if(ve&&(xe+=Ue.length-xe),se(Z)){if(p.slice(xe).search(Z)){var _t,xt=Ue;for(Z.global||(Z=z(Z.source,At(Sr.exec(Z))+"g")),Z.lastIndex=0;_t=Z.exec(xt);)var Xt=_t.index;Ue=Ue.slice(0,Xt===f?xe:Xt)}}else if(p.indexOf(sa(Z),xe)!=xe){var xn=Ue.lastIndexOf(Z);xn>-1&&(Ue=Ue.slice(0,xn))}return Ue+$},le.unescape=function(p){return(p=At(p))&&nt.test(p)?p.replace(on,aa):p},le.uniqueId=function(p){var y=++qr;return At(p)+y},le.upperCase=fi,le.upperFirst=Jo,le.each=Sf,le.eachRight=Pp,le.first=jh,ye(le,(Ae={},Dn(le,(function(p,y){vn.call(le.prototype,y)||(Ae[y]=p)})),Ae),{chain:!1}),le.VERSION="4.17.21",Fi(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(p){le[p].placeholder=le})),Fi(["drop","take"],(function(p,y){jr.prototype[p]=function(O){O=O===f?1:Wo(ht(O),0);var $=this.__filtered__&&!y?new jr(this):this.clone();return $.__filtered__?$.__takeCount__=Gi(O,$.__takeCount__):$.__views__.push({size:Gi(O,D),type:p+($.__dir__<0?"Right":"")}),$},jr.prototype[p+"Right"]=function(O){return this.reverse()[p](O).reverse()}})),Fi(["filter","map","takeWhile"],(function(p,y){var O=y+1,$=O==1||O==3;jr.prototype[p]=function(Z){var re=this.clone();return re.__iteratees__.push({iteratee:rr(Z,3),type:O}),re.__filtered__=re.__filtered__||$,re}})),Fi(["head","last"],(function(p,y){var O="take"+(y?"Right":"");jr.prototype[p]=function(){return this[O](1).value()[0]}})),Fi(["initial","tail"],(function(p,y){var O="drop"+(y?"":"Right");jr.prototype[p]=function(){return this.__filtered__?new jr(this):this[O](1)}})),jr.prototype.compact=function(){return this.filter(tr)},jr.prototype.find=function(p){return this.filter(p).head()},jr.prototype.findLast=function(p){return this.reverse().find(p)},jr.prototype.invokeMap=kr((function(p,y){return typeof p=="function"?new jr(this):this.map((function(O){return zi(O,p,y)}))})),jr.prototype.reject=function(p){return this.filter(ud(rr(p)))},jr.prototype.slice=function(p,y){p=ht(p);var O=this;return O.__filtered__&&(p>0||y<0)?new jr(O):(p<0?O=O.takeRight(-p):p&&(O=O.drop(p)),y!==f&&(O=(y=ht(y))<0?O.dropRight(-y):O.take(y-p)),O)},jr.prototype.takeRightWhile=function(p){return this.reverse().takeWhile(p).reverse()},jr.prototype.toArray=function(){return this.take(D)},Dn(jr.prototype,(function(p,y){var O=/^(?:filter|find|map|reject)|While$/.test(y),$=/^(?:head|last)$/.test(y),Z=le[$?"take"+(y=="last"?"Right":""):y],re=$||/^find/.test(y);Z&&(le.prototype[y]=function(){var ve=this.__wrapped__,xe=$?[1]:arguments,Ue=ve instanceof jr,_t=xe[0],xt=Ue||wr(ve),Xt=function(sr){var Pn=Z.apply(le,ui([sr],xe));return $&&xn?Pn[0]:Pn};xt&&O&&typeof _t=="function"&&_t.length!=1&&(Ue=xt=!1);var xn=this.__chain__,An=!!this.__actions__.length,qn=re&&!xn,Lt=Ue&&!An;if(!re&&xt){ve=Lt?ve:new jr(this);var nn=p.apply(ve,xe);return nn.__actions__.push({func:ad,args:[
|
|||
|
|
\v\f\r \u2028\u2029\uFEFF`},function(n,a){var r,s,c=n.exports={};function v(){throw new Error("setTimeout has not been defined")}function f(){throw new Error("clearTimeout has not been defined")}function g(R){if(r===setTimeout)return setTimeout(R,0);if((r===v||!r)&&setTimeout)return r=setTimeout,setTimeout(R,0);try{return r(R,0)}catch{try{return r.call(null,R,0)}catch{return r.call(this,R,0)}}}(function(){try{r=typeof setTimeout=="function"?setTimeout:v}catch{r=v}try{s=typeof clearTimeout=="function"?clearTimeout:f}catch{s=f}})();var _,b=[],x=!1,S=-1;function A(){x&&_&&(x=!1,_.length?b=_.concat(b):S=-1,b.length&&E())}function E(){if(!x){var R=g(A);x=!0;for(var U=b.length;U;){for(_=b,b=[];++S<U;)_&&_[S].run();S=-1,U=b.length}_=null,x=!1,(function(D){if(s===clearTimeout)return clearTimeout(D);if((s===f||!s)&&clearTimeout)return s=clearTimeout,clearTimeout(D);try{s(D)}catch{try{return s.call(null,D)}catch{return s.call(this,D)}}})(R)}}function T(R,U){this.fun=R,this.array=U}function I(){}c.nextTick=function(R){var U=new Array(arguments.length-1);if(arguments.length>1)for(var D=1;D<arguments.length;D++)U[D-1]=arguments[D];b.push(new T(R,U)),b.length!==1||x||g(E)},T.prototype.run=function(){this.fun.apply(null,this.array)},c.title="browser",c.browser=!0,c.env={},c.argv=[],c.version="",c.versions={},c.on=I,c.addListener=I,c.once=I,c.off=I,c.removeListener=I,c.removeAllListeners=I,c.emit=I,c.prependListener=I,c.prependOnceListener=I,c.listeners=function(R){return[]},c.binding=function(R){throw new Error("process.binding is not supported")},c.cwd=function(){return"/"},c.chdir=function(R){throw new Error("process.chdir is not supported")},c.umask=function(){return 0}},function(n,a,r){var s=r(32),c=r(165),v=r(28)("species");n.exports=function(f,g){var _,b=s(f).constructor;return b===void 0||(_=s(b)[v])==null?g:c(_)}},function(n,a,r){var s=r(7),c=r(99),v=r(88),f=s.TypeError;n.exports=function(g){if(c(g))return g;throw f(v(g)+" is not a constructor")}},function(n,a,r){var s=r(16),c=r(161).trim;s({target:"String",proto:!0,forced:r(200)("trim")},{trim:function(){return c(this)}})},function(n,a,r){var s=r(34),c=r(123),v=r(32),f=r(94),g=r(39),_=r(44),b=r(62),x=r(124),S=r(125);c("match",(function(A,E,T){return[function(I){var R=_(this),U=I==null?void 0:b(I,A);return U?s(U,I,R):new RegExp(I)[A](g(R))},function(I){var R=v(this),U=g(I),D=T(E,R,U);if(D.done)return D.value;if(!R.global)return S(R,U);var L=R.unicode;R.lastIndex=0;for(var W,H=[],B=0;(W=S(R,U))!==null;){var F=g(W[0]);H[B]=F,F===""&&(R.lastIndex=x(U,f(R.lastIndex),L)),B++}return B===0?null:H}]}))},function(n,a,r){var s,c,v,f,g=r(7),_=r(76),b=r(64),x=r(30),S=r(35),A=r(18),E=r(138),T=r(98),I=r(91),R=r(169),U=r(128),D=g.setImmediate,L=g.clearImmediate,W=g.process,H=g.Dispatch,B=g.Function,F=g.MessageChannel,q=g.String,K=0,X={},ee="onreadystatechange";try{s=g.location}catch{}var ue=function(Te){if(S(X,Te)){var Me=X[Te];delete X[Te],Me()}},ae=function(Te){return function(){ue(Te)}},we=function(Te){ue(Te.data)},je=function(Te){g.postMessage(q(Te),s.protocol+"//"+s.host)};D&&L||(D=function(Te){var Me=T(arguments,1);return X[++K]=function(){_(x(Te)?Te:B(Te),void 0,Me)},c(K),K},L=function(Te){delete X[Te]},U?c=function(Te){W.nextTick(ae(Te))}:H&&H.now?c=function(Te){H.now(ae(Te))}:F&&!R?(f=(v=new F).port2,v.port1.onmessage=we,c=b(f.postMessage,f)):g.addEventListener&&x(g.postMessage)&&!g.importScripts&&s&&s.protocol!=="file:"&&!A(je)?(c=je,g.addEventListener("message",we,!1)):c=ee in I("script")?function(Te){E.appendChild(I("script")).onreadystatechange=function(){E.removeChild(this),ue(Te)}}:function(Te){setTimeout(ae(Te),0)}),n.exports={set:D,clear:L}},function(n,a,r){var s=r(55);n.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(s)},function(n,a,r){var s=r(56),c=function(v){var f,g;this.promise=new v((function(_,b){if(f!==void 0||g!==void 0)throw TypeError("Bad Promise constructor");f=_,g=b})),this.resolve=s(f),this.reject=s(g)};n.exports.f=function(v){return new c(v)}},function(n,a,r){a.a=function(){return!1}},function(n,a,r){(function(
|
|||
|
|
`)&&v.flags==="s")}))},function(n,a,r){var s=r(18),c=r(7).RegExp;n.exports=s((function(){var v=c("(?<a>b)","g");return v.exec("b").groups.a!=="b"||"b".replace(v,"$<a>c")!=="bc"}))},function(n,a,r){var s=r(16),c=r(15),v=r(56),f=r(40),g=r(45),_=r(39),b=r(18),x=r(193),S=r(121),A=r(194),E=r(195),T=r(70),I=r(196),R=[],U=c(R.sort),D=c(R.push),L=b((function(){R.sort(void 0)})),W=b((function(){R.sort(null)})),H=S("sort"),B=!b((function(){if(T)return T<70;if(!(A&&A>3)){if(E)return!0;if(I)return I<603;var F,q,K,X,ee="";for(F=65;F<76;F++){switch(q=String.fromCharCode(F),F){case 66:case 69:case 70:case 72:K=3;break;case 68:case 71:K=4;break;default:K=2}for(X=0;X<47;X++)R.push({k:q+X,v:K})}for(R.sort((function(ue,ae){return ae.v-ue.v})),X=0;X<R.length;X++)q=R[X].k.charAt(0),ee.charAt(ee.length-1)!==q&&(ee+=q);return ee!=="DGBEFHACIJK"}}));s({target:"Array",proto:!0,forced:L||!W||!H||!B},{sort:function(F){F!==void 0&&v(F);var q=f(this);if(B)return F===void 0?U(q):U(q,F);var K,X,ee=[],ue=g(q);for(X=0;X<ue;X++)X in q&&D(ee,q[X]);for(x(ee,(function(ae){return function(we,je){return je===void 0?-1:we===void 0?1:ae!==void 0?+ae(we,je)||0:_(we)>_(je)?1:-1}})(F)),K=ee.length,X=0;X<K;)q[X]=ee[X++];for(;X<ue;)delete q[X++];return q}})},function(n,a,r){var s=r(114),c=Math.floor,v=function(_,b){var x=_.length,S=c(x/2);return x<8?f(_,b):g(_,v(s(_,0,S),b),v(s(_,S),b),b)},f=function(_,b){for(var x,S,A=_.length,E=1;E<A;){for(S=E,x=_[E];S&&b(_[S-1],x)>0;)_[S]=_[--S];S!==E++&&(_[S]=x)}return _},g=function(_,b,x,S){for(var A=b.length,E=x.length,T=0,I=0;T<A||I<E;)_[T+I]=T<A&&I<E?S(b[T],x[I])<=0?b[T++]:x[I++]:T<A?b[T++]:x[I++];return _};n.exports=v},function(n,a,r){var s=r(55).match(/firefox\/(\d+)/i);n.exports=!!s&&+s[1]},function(n,a,r){var s=r(55);n.exports=/MSIE|Trident/.test(s)},function(n,a,r){var s=r(55).match(/AppleWebKit\/(\d+)\./);n.exports=!!s&&+s[1]},function(n,a,r){var s=r(7),c=r(159),v=s.TypeError;n.exports=function(f){if(c(f))throw v("The method doesn't accept regular expressions");return f}},function(n,a,r){var s=r(28)("match");n.exports=function(c){var v=/./;try{"/./"[c](v)}catch{try{return v[s]=!1,"/./"[c](v)}catch{}}return!1}},function(n,a,r){r(16)({target:"Number",stat:!0},{isNaN:function(s){return s!=s}})},function(n,a,r){var s=r(73).PROPER,c=r(18),v=r(162);n.exports=function(f){return c((function(){return!!v[f]()||"
"[f]()!=="
"||s&&v[f].name!==f}))}},function(n,a,r){var s=r(15),c=r(40),v=Math.floor,f=s("".charAt),g=s("".replace),_=s("".slice),b=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,x=/\$([$&'`]|\d{1,2})/g;n.exports=function(S,A,E,T,I,R){var U=E+S.length,D=T.length,L=x;return I!==void 0&&(I=c(I),L=b),g(R,L,(function(W,H){var B;switch(f(H,0)){case"$":return"$";case"&":return S;case"`":return _(A,0,E);case"'":return _(A,U);case"<":B=I[_(H,1,-1)];break;default:var F=+H;if(F===0)return W;if(F>D){var q=v(F/10);return q===0?W:q<=D?T[q-1]===void 0?f(H,1):T[q-1]+f(H,1):W}B=T[F-1]}return B===void 0?"":B}))}},function(n,a,r){var s=r(36),c=r(15),v=r(34),f=r(18),g=r(77),_=r(112),b=r(84),x=r(40),S=r(85),A=Object.assign,E=Object.defineProperty,T=c([].concat);n.exports=!A||f((function(){if(s&&A({b:1},A(E({},"a",{enumerable:!0,get:function(){E(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var I={},R={},U=Symbol(),D="abcdefghijklmnopqrst";return I[U]=7,D.split("").forEach((function(L){R[L]=L})),A({},I)[U]!=7||g(A({},R)).join("")!=D}))?function(I,R){for(var U=x(I),D=arguments.length,L=1,W=_.f,H=b.f;D>L;)for(var B,F=S(arguments[L++]),q=W?T(g(F),W(F)):g(F),K=q.length,X=0;K>X;)B=q[X++],s&&!v(H,F,B)||(U[B]=F[B]);return U}:A},function(n,a,r){var s=r(7),c=r(15),v=r(56),f=r(33),g=r(35),_=r(98),b=s.Function,x=c([].concat),S=c([].join),A={},E=function(T,I,R){if(!g(A,I)){for(var U=[],D=0;D<I;D++)U[D]="a["+D+"]";A[I]=b("C,a","return new C("+S(U,",")+")")}return A[I](T,R)};n.exports=b.bind||function(T){var I=v(this),R=I.prototype,U=_(arguments,1),D=function(){var L=x(U,_(arguments));return this instanceof D?E(I,L.length,L):I.apply(T,L)};return f(R)&&(D.prototype=R),D}},function(n,a,r){var s=r(35);n.exports=function(c){return c!==void 0&&(s(c
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function Hl(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function La(i,o,l,u){l&&Object.defineProperty(i,o,{enumerable:l.enumerable,configurable:l.configurable,writable:l.writable,value:l.initializer?l.initializer.call(u):void 0})}function wh(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function Ol(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}function xa(i,o,l,u,h){var d={};return Object.keys(u).forEach((function(m){d[m]=u[m]})),d.enumerable=!!d.enumerable,d.configurable=!!d.configurable,("value"in d||d.initializer)&&(d.writable=!0),d=l.slice().reverse().reduce((function(m,w){return w(i,o,m)||m}),d),h&&d.initializer!==void 0&&(d.value=d.initializer?d.initializer.call(h):void 0,d.initializer=void 0),d.initializer===void 0&&(Object.defineProperty(i,o,d),d=null),d}(function(i){i[i.DEFAULT=0]="DEFAULT",i[i.INCREASE=1]="INCREASE"})(No||(No={}));var vp={false:[-1/0,-1/0,1/0,1/0],true:[0,0,0,0],vertical:[-1/0,0,1/0,0],horizontal:[0,-1/0,0,1/0]},mp=(jo=(function(){function i(u,h){(function(w,M){if(!(w instanceof M))throw new TypeError("Cannot call a class as a function")})(this,i),Ol(this,"MINI_SCALE_SIZE",.2),Ol(this,"MAX_SCALE_SIZE",16),La(this,"SCALE_X",pp,this),La(this,"SKEW_Y",hp,this),La(this,"SKEW_X",Bc,this),La(this,"SCALE_Y",zi,this),La(this,"TRANSLATE_X",tf,this),La(this,"TRANSLATE_Y",Fu,this),La(this,"ZOOM_SIZE",Ia,this),Ol(this,"eventCenter",void 0),Ol(this,"translateLimitMinX",void 0),Ol(this,"translateLimitMinY",void 0),Ol(this,"translateLimitMaxX",void 0),Ol(this,"translateLimitMaxY",void 0),this.eventCenter=u;var d=h.stopMoveGraph,m=d!==void 0&&d;this.updateTranslateLimits(m)}var o,l;return o=i,l=[{key:"setZoomMiniSize",value:function(u){this.MINI_SCALE_SIZE=u}},{key:"setZoomMaxSize",value:function(u){this.MAX_SCALE_SIZE=u}},{key:"HtmlPointToCanvasPoint",value:function(u){var h=ms(u,2),d=h[0],m=h[1];return[(d-this.TRANSLATE_X)/this.SCALE_X,(m-this.TRANSLATE_Y)/this.SCALE_Y]}},{key:"CanvasPointToHtmlPoint",value:function(u){var h=ms(u,2),d=h[0],m=h[1];return[d*this.SCALE_X+this.TRANSLATE_X,m*this.SCALE_Y+this.TRANSLATE_Y]}},{key:"moveCanvasPointByHtml",value:function(u,h,d){var m=ms(u,2),w=m[0],M=m[1];return[w+h/this.SCALE_X,M+d/this.SCALE_Y]}},{key:"fixDeltaXY",value:function(u,h){return[u/this.SCALE_X,h/this.SCALE_Y]}},{key:"getTransformStyle",value:function(){var u=[this.SCALE_X,this.SKEW_Y,this.SKEW_X,this.SCALE_Y,this.TRANSLATE_X,this.TRANSLATE_Y].join(",");return{transform:"matrix(".concat(u,")")}}},{key:"zoom",value:function(){var u=arguments.length>0&&arguments[0]!==void 0&&arguments[0],h=arguments.length>1?arguments[1]:void 0,d=this.SCALE_X,m=this.SCALE_Y;return u===!0?(d+=this.ZOOM_SIZE,m+=this.ZOOM_SIZE):u===!1?(d-=this.ZOOM_SIZE,m-=this.ZOOM_SIZE):typeof u=="number"&&(d=u,m=u),d<this.MINI_SCALE_SIZE||d>this.MAX_SCALE_SIZE||(h&&(this.TRANSLATE_X-=(d-this.SCALE_X)*h[0],this.TRANSLATE_Y-=(m-this.SCALE_Y)*h[1]),this.SCALE_X=d,this.SCALE_Y=m,this.emitGraphTransform("zoom")),"".concat(100*this.SCALE_X,"%")}},{key:"emitGraphTransform",value:function(u){this.eventCenter.emit(Dn.GRAPH_TRANSFORM,{type:u,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(u,h){this.TRANSLATE_X+u<=this.translateLimitMaxX&&this.TRANSLATE_X+u>=this.translateLimitMinX&&(this.TRANSLATE_X+=u),this.TRANSLATE_Y+h<=this.translateLimitMaxY&&this.TRANSLATE_Y+h>=this.translateLimitMinY&&(this.TRANSLATE_Y+=h),this.emitGraphTransform("translate")}},{key:"focusOn",value:function(u,h,d,m){var w=ms(this.CanvasPointToHtmlPoint([u,h]),2),M=d/2-w[0],j=m/2-w[1];this.TRANSLATE_X+=M,this.TRANSLATE_Y+=j,this.emit
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function Vu(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}var Uu=function(i,o,l){var u=Hc(i,2),h=u[0],d=u[1],m=Hc(o,2),w=m[0],M=m[1],j=Hc(l,2),V=j[0],Q=j[1];return h>w&&h<V&&d>M&&d<Q},Wu=function(i,o){var l=!1;switch(o.multipleSelectKey){case"meta":l=i.metaKey;break;case"alt":l=i.altKey;break;case"shift":l=i.shiftKey;break;case"ctrl":l=i.ctrlKey;break;default:l=!1}return l};r(167),r(126),r(83),r(29),r(12),r(13),r(14),r(47);var hf=function(i){return function(o,l,u){var h=Object(o);if(!Ko(o)){var d=jc(l);o=Us(o),l=function(w){return d(h[w],w,h)}}var m=i(o,l,u);return m>-1?h[d?o[m]:m]:void 0}},Gu=function(i,o,l,u){for(var h=i.length,d=l+-1;++d<h;)if(o(i[d],d,i))return d;return-1},Ep=/\s/,vf=function(i){for(var o=i.length;o--&&Ep.test(i.charAt(o)););return o},Nh=/^\s+/,Op=function(i){return i&&i.slice(0,vf(i)+1).replace(Nh,"")},rl=/^[-+]0x[0-9a-f]+$/i,xp=/^0b[01]+$/i,Sp=/^0o[0-7]+$/i,Ap=parseInt,zu=function(i){if(typeof i=="number")return i;if(gr(i))return NaN;if(Lr(i)){var o=typeof i.valueOf=="function"?i.valueOf():i;i=Lr(o)?o+"":o}if(typeof i!="string")return i===0?i:+i;i=Op(i);var l=xp.test(i);return l||Sp.test(i)?Ap(i.slice(2),l?2:8):rl.test(i)?NaN:+i},xl=1/0,Xc=function(i){return i?(i=zu(i))===xl||i===-1/0?17976931348623157e292*(i<0?-1:1):i==i?i:0:i===0?i:0},mf=function(i){var o=Xc(i),l=o%1;return o==o?l?o-l:o:0},yf=Math.max,gs,_s=hf((function(i,o,l){var u=i==null?0:i.length;if(!u)return-1;var h=l==null?0:mf(l);return h<0&&(h=yf(u+h,0)),Gu(i,jc(o),h)})),rr=new Uint8Array(16);function Hu(){if(!gs&&!(gs=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&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 gs(rr)}for(var qc=/^(?:[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,ol=function(i){return typeof i=="string"&&qc.test(i)},di=[],nu=0;nu<256;++nu)di.push((nu+256).toString(16).substr(1));var Do=function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,l=(di[i[o+0]]+di[i[o+1]]+di[i[o+2]]+di[i[o+3]]+"-"+di[i[o+4]]+di[i[o+5]]+"-"+di[i[o+6]]+di[i[o+7]]+"-"+di[i[o+8]]+di[i[o+9]]+"-"+di[i[o+10]]+di[i[o+11]]+di[i[o+12]]+di[i[o+13]]+di[i[o+14]]+di[i[o+15]]).toLowerCase();if(!ol(l))throw TypeError("Stringified UUID is invalid");return l},bs=function(i,o,l){var u=(i=i||{}).random||(i.rng||Hu)();return u[6]=15&u[6]|64,u[8]=63&u[8]|128,Do(u)},ta=function(){return bs()},Yc=function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",l=i.nodes.reduce((function(u,h){return u[h.id]=o+bs(),h.id=u[h.id],u}),{});return i.edges.forEach((function(u){u.id=o+bs(),u.sourceNodeId=l[u.sourceNodeId],u.targetNodeId=l[u.targetNodeId]})),i},Ii=(r(105),r(127),r(207),function(i,o,l){var u=i.x,h=i.y,d=o.x,m=o.y,w=l.x,M=l.y,j=(M-m)/(w-d),V=m-j*d;return u>=d&&u<=w&&h>=m&&h<=M&&Math.abs(h-j*u+V)<Number.EPSILON});function Ho(i){return Ho=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Ho(i)}function Sl(i,o){var l=Object.keys(i);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(i);o&&(u=u.filter((function(h){return Object.getOwnPropertyDescriptor(i,h).enumerable}))),l.push.apply(l,u)}return l}function Al(i){for(var o=1;o<arguments.length;o++){var l=arguments[o]!=null?arguments[o]:{};o%2?Sl(Object(l),!0).forEach((function(u){gf(i,u,l[u])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(l)):Sl(Object(l)).forEach((function(u){Object.defineProperty(i,u,Object.getOwnPropertyDescriptor(l,u))}))}return i}function gf(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writabl
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function Xi(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function ll(i,o){var l=Object.keys(i);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(i);o&&(u=u.filter((function(h){return Object.getOwnPropertyDescriptor(i,h).enumerable}))),l.push.apply(l,u)}return l}function Io(i){for(var o=1;o<arguments.length;o++){var l=arguments[o]!=null?arguments[o]:{};o%2?ll(Object(l),!0).forEach((function(u){jp(i,u,l[u])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(l)):ll(Object(l)).forEach((function(u){Object.defineProperty(i,u,Object.getOwnPropertyDescriptor(l,u))}))}return i}function ua(i,o,l,u){l&&Object.defineProperty(i,o,{enumerable:l.enumerable,configurable:l.configurable,writable:l.writable,value:l.initializer?l.initializer.call(u):void 0})}function Fa(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}function em(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function cd(){return cd=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(i,o,l){var u=cu(i,o);if(u){var h=Object.getOwnPropertyDescriptor(u,o);return h.get?h.get.call(arguments.length<3?i:l):h.value}},cd.apply(this,arguments)}function cu(i,o){for(;!Object.prototype.hasOwnProperty.call(i,o)&&(i=na(i))!==null;);return i}function wr(i,o){return wr=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},wr(i,o)}function Fh(i){var o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var l,u=na(i);if(o){var h=na(this).constructor;l=Reflect.construct(u,arguments,h)}else l=u.apply(this,arguments);return ca(this,l)}}function ca(i,o){if(o&&(Zl(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Co(i)}function Co(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function na(i){return na=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},na(i)}function jp(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}function Ai(i,o,l,u,h){var d={};return Object.keys(u).forEach((function(m){d[m]=u[m]})),d.enumerable=!!d.enumerable,d.configurable=!!d.configurable,("value"in d||d.initializer)&&(d.writable=!0),d=l.slice().reverse().reduce((function(m,w){return w(i,o,m)||m}),d),h&&d.initializer!==void 0&&(d.value=d.initializer?d.initializer.call(h):void 0,d.initializer=void 0),d.initializer===void 0&&(Object.defineProperty(i,o,d),d=null),d}var Aa=(zn=(function(i){(function(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(m&&m.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),m&&wr(d,m)})(h,i);var o,l,u=Fh(h);function h(){var d;Fa(this,h);for(var m=arguments.length,w=new Array(m),M=0;M<m;M++)w[M]=arguments[M];return jp(Co(d=u.call.apply(u,[this].concat(w))),"modelType",Mr.POLYLINE_EDGE),jp(Co(d),"draggingPointList",void 0),ua(Co(d),"dbClickPosition",Rp,Co(d)),d}return o=h,(l=[{key:"initEdgeData",value:function(d){this.offset=30,cd(na(h.prototype),"initEdgeData",this).call(this,d)}},{key:"getEdgeStyle",value:function(){var d=this.graphModel.theme.polyline;return Io(Io({},cd(na(h.prototype),"getEdgeStyle",this).call(this)),no(d))}},{key:"getTextPosition",value:function(){var d,m=(d=this.text)===null||d===void 0?void 0:d.value;if(this.dbClickPosition&&!m){var w=this.dbClickPosition;return{x:w.x,y:w.y}}var M=ir(this.points),j=ud(Xn(M),2),V=j[0],Q=j[1];return{x:(V.x+Q.x)/2,y:(V.y+Q.y)/2}}},{key:"
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function gt(i){return gt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},gt(i)}function ot(i,o){return(function(l){if(Array.isArray(l))return l})(i)||(function(l,u){var h=l==null?null:typeof Symbol<"u"&&l[Symbol.iterator]||l["@@iterator"];if(h!=null){var d,m,w=[],M=!0,j=!1;try{for(h=h.call(l);!(M=(d=h.next()).done)&&(w.push(d.value),!u||w.length!==u);M=!0);}catch(V){j=!0,m=V}finally{try{M||h.return==null||h.return()}finally{if(j)throw m}}return w}})(i,o)||mt(i,o)||(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 mt(i,o){if(i){if(typeof i=="string")return Rt(i,o);var l=Object.prototype.toString.call(i).slice(8,-1);return l==="Object"&&i.constructor&&(l=i.constructor.name),l==="Map"||l==="Set"?Array.from(i):l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?Rt(i,o):void 0}}function Rt(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}var Bt=function(i,o){var l;switch(i.type){case"line":default:l=new Yu(i,o);break;case"polyline":l=new Aa(i,o)}return l},jt=function(i,o){return 2*Math.abs(i.centerX-o.centerX)<i.width+o.width&&2*Math.abs(i.centerY-o.centerY)<i.height+o.height},ht=function(i){var o=[],l={};return i.forEach((function(u){var h="".concat(u.x,"-").concat(u.y);u.id=h,l[h]=u})),Object.keys(l).forEach((function(u){o.push(l[u])})),o},Kt=function(i,o){var l=[i,{x:i.x,y:o.y},o];return ht(l)},Gt=function(i,o){return i.width===0&&i.height===0?i:{centerX:i.centerX,centerY:i.centerY,minX:i.minX-o,minY:i.minY-o,maxX:i.maxX+o,maxY:i.maxY+o,height:i.height+2*o,width:i.width+2*o}},Dt=function(i,o){var l=Math.abs(i.x-o.centerX),u=Math.abs(i.y-o.centerY);return l/o.width>u/o.height?fo.HORIZONTAL:fo.VERTICAL},At=function(i,o,l){return Dt(l,o)===fo.HORIZONTAL?{x:l.x>i.centerX?i.maxX:i.minX,y:l.y}:{x:l.x,y:l.y>i.centerY?i.maxY:i.minY}},Ze=function(i,o){var l=Math.min(i.minX,o.minX),u=Math.min(i.minY,o.minY),h=Math.max(i.maxX,o.maxX),d=Math.max(i.maxY,o.maxY);return{centerX:(l+h)/2,centerY:(u+d)/2,minX:l,minY:u,maxX:h,maxY:d,height:d-u,width:h-l}},pt=function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],o=arguments.length>1?arguments[1]:void 0,l=[],u=[];i.forEach((function(V){l.push(V.x),u.push(V.y)}));var h=Math.min.apply(Math,l),d=Math.max.apply(Math,l),m=Math.min.apply(Math,u),w=Math.max.apply(Math,u),M=d-h,j=w-m;return o&&(M+=o,j+=o),{centerX:(h+d)/2,centerY:(m+w)/2,maxX:d,maxY:w,minX:h,minY:m,x:(h+d)/2,y:(m+w)/2,height:j,width:M}},$t=function(i){var o=i.minX,l=i.minY,u=i.maxX,h=i.maxY;return[{x:o,y:l},{x:u,y:l},{x:u,y:h},{x:o,y:h}]},tn=function(i,o){var l=i.x,u=i.y;return l<o.minX||l>o.maxX||u<o.minY||u>o.maxY},kt=function(i,o){return o<i.minX||o>i.maxX?[]:[{x:o,y:i.minY},{x:o,y:i.maxY}]},ln=function(i,o){return o<i.minY||o>i.maxY?[]:[{x:i.minX,y:o},{x:i.maxX,y:o}]},Nt=function(i,o){return kt(i,o.x).concat(ln(i,o.y))},qt=function(i,o){return Math.abs(i.x-o.x)+Math.abs(i.y-o.y)},Tt=function(i,o){var l=0;return o.forEach((function(u){u&&(i.x===u.x&&(l+=-2),i.y===u.y&&(l+=-2))})),l},Zt=function(i,o,l,u,h){return qt(i,o)+qt(i,l)+Tt(i,[o,l,u,h])},Cn=function i(o,l,u,h,d){d||(d=0),o.unshift(l[h]),u[h]&&u[h]!==h&&d<=100&&i(o,l,u,u[h],d+1)},Hn=function(i,o){var l=i.indexOf(o);l>-1&&i.splice(l,1)},It=function(i,o,l,u){var h=o.x-i.x,d=o.y-i.y,m=u.x-l.x,w=u.y-l.y,M=(-d*(i.x-l.x)+h*(i.y-l.y))/(-m*d+h*w),j=(m*(i.y-l.y)-w*(i.x-l.x))/(-m*d+h*w);return M>=0&&M<=1&&j>=0&&j<=1},Pt=function(i,o,l){if(l.width===0&&l.height===0)return!1;var u=ot($t(l),4),h=u[0],d=u[1],m=u[2],w=u[3];return It(i,o,h,d)||It(i,o,h,w)||It(i,o,d,m)||It(i,o,m,w)},Mt=function(i,o,l,u){var h=[];return i.forEach((function(d){d!==o&&(d.x!==o.x&&d.y!==o.y||Pt(d,o,l)||Pt(d,o,u)||h.push(d))})),ht(h)},Ln=function(i,o,l,u,h,d,m){var w=[],M=[o],j={},V={},Q={};V[o.id]=0,Q[o.id]=Zt(o,l,o);var ne={};i.forEach((function(Ie){ne[Ie.id]=Ie}));for(var _e=function(){var Ie=void 0,ft=1/0;if(M.forEach((function(Et){Q[Et.id]<ft&&(ft=Q[Et.id],Ie=Et)})),Ie===l){var dt=[];return Cn(dt,ne,j,l.id),{v:dt}}Hn(M,Ie),w.push(Ie),Mt(i,Ie,u,h).forEach((function(Et){if(w.indexOf(Et)===-1){M.indexOf(Et)===-1&&M.push(Et);var zt=Q[Ie.id]+qt(Ie,Et);V[Et.id]&&zt>=V[Et.id]||(j[Et.id]=Ie.id,V[Et.id]=zt,Q[Et.id]=V[Et.id]+Zt(Et,l,o,d,m))}}))};M.length;){var ke=_e();if(gt(ke)==="object")return ke.v}return[o,l]},or=function(i){return xo(i)},mn=function(i){for(var o=1;o<i.length-1;){var l=i[o-1],u=i[o],h=i[o+1];l.x===u.x&&u.x===h.x||l.y===u.y&&u.y===h.y?i.splice(o,1):o++}return i},cr=function(i,o,l,u,h){var d=or(l),m=or(u),w=Gt(d,h),M=Gt(m,h),j=At(w
|
|||
|
|
L`).concat(d.rightX," ").concat(d.rightY,`
|
|||
|
|
L`).concat(m.rightX," ").concat(m.rightY,`
|
|||
|
|
L`).concat(m.leftX," ").concat(m.leftY," z")}return{d:o,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}},Jo=function(i){var o=i.start,l=i.end,u=i.sourceNode,h=i.targetNode,d=i.offset,m=xo(u),w=xo(h),M=Gt(m,d),j=Gt(w,d);return{sNext:At(M,m,o),ePre:At(j,w,l)}},go=function(i){var o=i.replace(/M/g,"").replace(/C/g,",").split(",");return[er(o[0]),er(o[1]),er(o[2]),er(o[3])]},er=function(i){var o=ot(i.replace(/(^\s*)/g,"").split(" "),2);return{x:+o[0],y:+o[1]}},pi=function(i,o){var l=ot(i,4);return[Lo(l[0],l[1],l[2],l[3],o),i[3]]},Tr=function(i,o){for(var l,u=i.x,h=i.y,d=ir(o),m=Number.MAX_SAFE_INTEGER,w=[],M=0;M<d.length;M++)w.push({start:d[M],end:d[(M+1)%d.length]});if(w.forEach((function(ne){var _e=ne.start,ke=ne.end;if(_e.x===ke.x){var Ie={x:_e.x,y:h};if(Ii(Ie,_e,ke)){var ft=Math.abs(_e.x-u);ft<m&&(m=ft,l=Ie)}}else if(_e.y===ke.y){var dt={x:u,y:_e.y};if(Ii(dt,_e,ke)){var Et=Math.abs(_e.y-h);Et<m&&(m=Et,l=dt)}}})),!l){var j=w[0],V=j.start,Q=j.end;l={x:V.x+(Q.x-V.x)/2,y:V.y+(Q.y-V.y)/2}}return l},In=function(i){return el(i,["id","type","sourceNodeId","sourceAnchorId","targetNodeId","targetAnchorId","pointsList","startPoint","endPoint","properties"])},mr=function(i,o){return Math.sqrt(Math.pow(i.x-o.x,2)+Math.pow(i.y-o.y,2))};function tr(i,o){return typeof o!="function"?function(l,u,h){return Object.assign({type:i.edgeType},h)}:function(l,u,h){var d=o(l,u,h);return d?typeof d=="string"?Object.assign({},h,{type:d}):Object.assign({type:d},h):{type:i.edgeType}}}r(208);var _o=function(){};function kl(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function So(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}var ye=(function(){function i(u){var h=this,d=u.onDragStart,m=d===void 0?_o:d,w=u.onDragging,M=w===void 0?_o:w,j=u.onDragEnd,V=j===void 0?_o:j,Q=u.eventType,ne=Q===void 0?"":Q,_e=u.eventCenter,ke=_e===void 0?null:_e,Ie=u.step,ft=Ie===void 0?1:Ie,dt=u.isStopPropagation,Et=dt===void 0||dt,zt=u.model,En=zt===void 0?null:zt,wn=u.data,Yn=wn===void 0?null:wn;(function(gn,Fn){if(!(gn instanceof Fn))throw new TypeError("Cannot call a class as a function")})(this,i),So(this,"onDragStart",void 0),So(this,"onDragging",void 0),So(this,"onDragEnd",void 0),So(this,"step",void 0),So(this,"isStopPropagation",void 0),So(this,"isDragging",!1),So(this,"isStartDragging",!1),So(this,"startX",0),So(this,"startY",0),So(this,"sumDeltaX",0),So(this,"sumDeltaY",0),So(this,"eventType",void 0),So(this,"eventCenter",void 0),So(this,"model",void 0),So(this,"data",void 0),So(this,"startTime",void 0),So(this,"handleMouseDown",(function(gn){var Fn,Mn,$r,Wr=(Fn=window)===null||Fn===void 0?void 0:Fn.document;if(gn.button===0){h.isStopPropagation&&gn.stopPropagation(),h.isStartDragging=!0,h.startX=gn.clientX,h.startY=gn.clientY,Wr.addEventListener("mousemove",h.handleMouseMove,!1),Wr.addEventListener("mouseup",h.handleMouseUp,!1);var vr=(Mn=h.model)===null||Mn===void 0?void 0:Mn.getData();($r=h.eventCenter)===null||$r===void 0||$r.emit(Dn["".concat(h.eventType,"_MOUSEDOWN")],{e:gn,data:h.data||vr}),h.startTime=new Date().getTime()}})),So(this,"handleMouseMove",(function(gn){if(h.isStopPropagation&&gn.stopPropagation(),h.isStartDragging&&(h.sumDeltaX+=gn.clientX-h.startX,h.sumDeltaY+=gn.clientY-h.startY,h.startX=gn.clientX,h.startY=gn.clientY,h.step<=1||Math.abs(h.sumDeltaX)>h.step||Math.abs(h.sumDeltaY)>h.step)){var Fn,Mn=h.sumDeltaX%h.step,$r=h.sumDeltaY%h.step,Wr=h.sumDeltaX-Mn,vr=h.sumDeltaY-$r;h.sumDeltaX=Mn,h.sumDeltaY=$r;var Jr,_i=(Fn=h.model)===null||Fn===void 0?void 0:Fn.getData();h.isDragging||((Jr=h.eventCenter)===null||Jr===void 0||Jr.emit(Dn["".concat(h.eventType,"_DRAGSTART")],{e:gn,data:h.data||_i}),h.onDragStart({event:gn})),h.isDragging=!0,Promise.resolve().then((function(){var bi,Ma;h.onDragging({deltaX:Wr,deltaY:vr,event:gn}),(bi=h.eventCenter)===null||bi===void 0||bi.emit(Dn["".concat(h.eventType,"_MOUSEMOVE")],{e:gn,data:h.data||_i}),(Ma=h.even
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function $(i){return(function(o){if(Array.isArray(o))return re(o)})(i)||(function(o){if(typeof Symbol<"u"&&o[Symbol.iterator]!=null||o["@@iterator"]!=null)return Array.from(o)})(i)||Z(i)||(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 Z(i,o){if(i){if(typeof i=="string")return re(i,o);var l=Object.prototype.toString.call(i).slice(8,-1);return l==="Object"&&i.constructor&&(l=i.constructor.name),l==="Map"||l==="Set"?Array.from(i):l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?re(i,o):void 0}}function re(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function ve(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}function xe(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function Ue(i,o,l){return o&&xe(i.prototype,o),i}function _t(i,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(o&&o.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),o&&nn(i,o)}function xt(i){var o=Lt();return function(){var l,u=sr(i);if(o){var h=sr(this).constructor;l=Reflect.construct(u,arguments,h)}else l=u.apply(this,arguments);return Xt(this,l)}}function Xt(i,o){if(o&&(y(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return xn(i)}function xn(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function An(i){var o=typeof Map=="function"?new Map:void 0;return An=function(l){if(l===null||(u=l,Function.toString.call(u).indexOf("[native code]")===-1))return l;var u;if(typeof l!="function")throw new TypeError("Super expression must either be null or a function");if(o!==void 0){if(o.has(l))return o.get(l);o.set(l,h)}function h(){return qn(l,arguments,sr(this).constructor)}return h.prototype=Object.create(l.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),nn(h,l)},An(i)}function qn(i,o,l){return qn=Lt()?Reflect.construct:function(u,h,d){var m=[null];m.push.apply(m,h);var w=new(Function.bind.apply(u,m));return d&&nn(w,d.prototype),w},qn.apply(null,arguments)}function Lt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}function nn(i,o){return nn=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},nn(i,o)}function sr(i){return sr=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},sr(i)}function Pn(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}var qe,yr,Br,Jn,dr,Mi,Ba,Jl,ki,As,fu,Mf,Ip,Ms=(function(i){_t(l,i);var o=xt(l);function l(){var u;ve(this,l);for(var h=arguments.length,d=new Array(h),m=0;m<h;m++)d[m]=arguments[m];return Pn(xn(u=o.call(this,d.length)),"rows",void 0),Pn(xn(u),"columns",void 0),u.fill(new Array(3)),d.forEach((function(w,M){u[M]=w})),u.columns=d[0].length,u.rows=d.length,Object.setPrototypeOf(xn(u),l.prototype),u}return Ue(l,[{key:"getRow",value:function(u){return this[u]}},{key:"getColumn",value:function(u){return $(this.map((function(h){return h[u]})))}},{key:"transpose",value:function(){for(var u=[],h=0;h<this.columns;h++)u.push(this.getColumn(h));return qn(l,u)}},{key:"cross",value:function(u){var h=new Array(this.rows).fill("").map((function(){return[]}));if(this.columns===u.rows)for(var d=0;d<this.rows;d++)for(var m=this.getRow(d),w=function(j){var V=u.getColumn(j);h[d][j]=m.reduce((function(Q,ne,_e){return Q+ne*V[_e]}),0)},M=0;M<u.columns;M++)w(M);return qn(l,$(h))}},{key:"to2D",value:function(){return this.map((function(u){return[u[0],u[1]]}))}},{key:"toPoints",value:function(){return this.map((function(u){return new p(u[0],u[1])}))}},{key:"toString",value:function(){var u=O(this[0],2),h=u[0],d=u[1],m=O(this[1],2),w=m[0],M=m[1],j=O(this[2],2),V=j[0],Q=j[1];return"matrix(".concat(h," ").concat(d," ")
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function pu(i){return(function(o){if(Array.isArray(o))return B_(o)})(i)||(function(o){if(typeof Symbol<"u"&&o[Symbol.iterator]!=null||o["@@iterator"]!=null)return Array.from(o)})(i)||Fp(i)||(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 Fp(i,o){if(i){if(typeof i=="string")return B_(i,o);var l=Object.prototype.toString.call(i).slice(8,-1);return l==="Object"&&i.constructor&&(l=i.constructor.name),l==="Map"||l==="Set"?Array.from(i):l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?B_(i,o):void 0}}function B_(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function iy(i){return iy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},iy(i)}function ks(i,o,l,u){l&&Object.defineProperty(i,o,{enumerable:l.enumerable,configurable:l.configurable,writable:l.writable,value:l.initializer?l.initializer.call(u):void 0})}function bC(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function hu(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}function Qn(i,o,l,u,h){var d={};return Object.keys(u).forEach((function(m){d[m]=u[m]})),d.enumerable=!!d.enumerable,d.configurable=!!d.configurable,("value"in d||d.initializer)&&(d.writable=!0),d=l.slice().reverse().reduce((function(m,w){return w(i,o,m)||m}),d),h&&d.initializer!==void 0&&(d.value=d.initializer?d.initializer.call(h):void 0,d.initializer=void 0),d.initializer===void 0&&(Object.defineProperty(i,o,d),d=null),d}var t2,n2=200,r2=(qe=(function(){function i(u){(function(_e,ke){if(!(_e instanceof ke))throw new TypeError("Cannot call a class as a function")})(this,i),hu(this,"rootEl",void 0),ks(this,"width",yr,this),ks(this,"height",Br,this),hu(this,"theme",void 0),hu(this,"eventCenter",void 0),hu(this,"modelMap",new Map),hu(this,"topElement",void 0),hu(this,"animation",void 0),hu(this,"idGenerator",void 0),hu(this,"edgeGenerator",void 0),hu(this,"nodeMoveRules",[]),hu(this,"customTrajectory",void 0),ks(this,"edgeType",Jn,this),ks(this,"nodes",dr,this),ks(this,"edges",Mi,this),ks(this,"overlapMode",Ba,this),ks(this,"background",Jl,this),ks(this,"transformModel",ki,this),ks(this,"editConfigModel",As,this),ks(this,"gridSize",fu,this),ks(this,"partial",Mf,this),ks(this,"fakerNode",Ip,this);var h,d=u.container,m=u.background,w=m===void 0?{}:m,M=u.grid,j=u.idGenerator,V=u.edgeGenerator,Q=u.animation,ne=u.customTrajectory;this.background=w,iy(M)==="object"&&(this.gridSize=M.size),this.rootEl=d,this.editConfigModel=new ef(u),this.eventCenter=new pf,this.transformModel=new mp(this.eventCenter,u),this.theme=ql(u.style),this.edgeType=u.edgeType||"polyline",this.width=u.width,this.height=u.height,this.animation=(h=Q)&&typeof h!="boolean"?eu(no(Lp),h):no(h===!0?nm:Lp),this.partial=u.partial,this.overlapMode=u.overlapMode||0,this.idGenerator=j,this.customTrajectory=ne,this.edgeGenerator=tr(this,V),this.width=u.width||this.rootEl.getBoundingClientRect().width,this.height=u.height||this.rootEl.getBoundingClientRect().height,this.flowId=ta()}var o,l;return o=i,l=[{key:"nodesMap",get:function(){return this.nodes.reduce((function(u,h,d){return u[h.id]={index:d,model:h},u}),{})}},{key:"edgesMap",get:function(){return this.edges.reduce((function(u,h,d){return u[h.id]={index:d,model:h},u}),{})}},{key:"modelsMap",get:function(){return[].concat(pu(this.nodes),pu(this.edges)).reduce((function(u,h){return u[h.id]=h,u}),{})}},{key:"sortElements",get:function(){var u=[];this.nodes.forEach((function(j){return u.push(j)})),this.edges.forEach((function(j){return u.push(j)})),u=u.sort((function(j,V){return j.zIndex-V.zIndex}));for(var h=[],d=[-200,-200],m=[this.width+n2,this.height+n2],w=0;w<u.length;w++){var M=u[w];M.visible&&(!this.partial||M.isSelected||this.isElementInArea(M,d,m,!1,!1))&&h.push(M)}return h}},{key:"textEditElement",get:function(){var u=this.nodes.find((function(d){return d.state===Zr.TEXT_EDIT})),h=this.edges.find((function(d){return d.state===Zr.TEXT_EDIT}));return
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function s2(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}var u2,Bh=function(i){var o={x1:10,y1:10,x2:20,y2:20,stroke:"black"};return Object.entries(i).forEach((function(l){var u=VC(l,2),h=u[0],d=u[1];(h==="style"||K_(d)!=="object")&&(o[h]=d)})),Object(We.g)("line",o)};function Z_(i){return Z_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Z_(i)}function c2(i,o){var l=Object.keys(i);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(i);o&&(u=u.filter((function(h){return Object.getOwnPropertyDescriptor(i,h).enumerable}))),l.push.apply(l,u)}return l}function cy(i){for(var o=1;o<arguments.length;o++){var l=arguments[o]!=null?arguments[o]:{};o%2?c2(Object(l),!0).forEach((function(u){UC(i,u,l[u])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(l)):c2(Object(l)).forEach((function(u){Object.defineProperty(i,u,Object.getOwnPropertyDescriptor(l,u))}))}return i}function UC(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}function WC(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}function GC(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function J_(i,o){return J_=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},J_(i,o)}function zC(i){var o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var l,u=dy(i);if(o){var h=dy(this).constructor;l=Reflect.construct(u,arguments,h)}else l=u.apply(this,arguments);return HC(this,l)}}function HC(i,o){if(o&&(Z_(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(l){if(l===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l})(i)}function dy(i){return dy=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},dy(i)}var d2,XC=gu(u2=(function(i){(function(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(m&&m.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),m&&J_(d,m)})(h,i);var o,l,u=zC(h);function h(){return WC(this,h),u.apply(this,arguments)}return o=h,(l=[{key:"render",value:function(){var d=this.props.snaplineModel,m=d.position,w=d.isShowHorizontal,M=d.isShowVertical,j=d.getStyle(),V=m.x,Q=V===void 0?0:V,ne=m.y,_e=ne===void 0?0:ne,ke=cy(cy({x1:-1e5,y1:_e,x2:1e5,y2:_e},j),{},{stroke:w?j.stroke:"none"}),Ie=cy(cy({x1:Q,y1:-1e5,x2:Q,y2:1e5},j),{},{stroke:M?j.stroke:"none"});return Object(We.g)("g",{className:"lf-snapline"},Object(We.g)(Bh,ke),Object(We.g)(Bh,Ie))}}])&&GC(o.prototype,l),h})(We.a))||u2;function Q_(i){return Q_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Q_(i)}function qC(i,o){return(function(l){if(Array.isArray(l))return l})(i)||(function(l,u){var h=l==null?null:typeof Symbol<"u"&&l[Symbol.iterator]||l["@@iterator"];if(h!=null){var d,m,w=[],M=!0,j=!1;try{for(h=h.call(l);!(M=(d=h.next()).done)&&(w.push(d.value),!u||w.length!==u);M=!0);}catch(V){j=!0,m=V}finally{try{M||h.return==null||h.return()}finally{if(j)throw m}}return w}})(i,o)||(function(l,u){if(l){if(typeof l=="string")return f2(l,u);var h=Object.prototype.toString.call(l).slice(8,-1);if(h==="Object"&&l.constructor&
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function f2(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function Tf(i){var o=i.x,l=i.y,u=i.width,h=i.height,d=i.className,m=i.radius,w=o-u/2,M=l-h/2,j={};return Object.entries(i).forEach((function(V){var Q=qC(V,2),ne=Q[0],_e=Q[1];Q_(_e)!=="object"&&(j[ne]=_e)})),j.className=d?"lf-basic-shape ".concat(d):"lf-basic-shape",m&&(j.rx=m,j.ry=m),j.x=w,j.y=M,Object(We.g)("rect",j)}function eb(i){return eb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},eb(i)}function Vh(){return Vh=Object.assign||function(i){for(var o=1;o<arguments.length;o++){var l=arguments[o];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(i[u]=l[u])}return i},Vh.apply(this,arguments)}function p2(i,o){var l=Object.keys(i);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(i);o&&(u=u.filter((function(h){return Object.getOwnPropertyDescriptor(i,h).enumerable}))),l.push.apply(l,u)}return l}function h2(i){for(var o=1;o<arguments.length;o++){var l=arguments[o]!=null?arguments[o]:{};o%2?p2(Object(l),!0).forEach((function(u){YC(i,u,l[u])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(l)):p2(Object(l)).forEach((function(u){Object.defineProperty(i,u,Object.getOwnPropertyDescriptor(l,u))}))}return i}function YC(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}function KC(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}function ZC(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function tb(i,o){return tb=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},tb(i,o)}function JC(i){var o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var l,u=fy(i);if(o){var h=fy(this).constructor;l=Reflect.construct(u,arguments,h)}else l=u.apply(this,arguments);return QC(this,l)}}function QC(i,o){if(o&&(eb(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(l){if(l===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l})(i)}function fy(i){return fy=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},fy(i)}Tf.defaultProps={className:"",radius:""};var v2,eR=gu(d2=(function(i){(function(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(m&&m.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),m&&tb(d,m)})(h,i);var o,l,u=JC(h);function h(){return KC(this,h),u.apply(this,arguments)}return o=h,(l=[{key:"getNodesOutline",value:function(){var d=this.props.graphModel,m=d.nodes,w=d.editConfigModel,M=w.hoverOutline,j=w.nodeSelectedOutline,V=[];return m.forEach((function(Q){if(Q.isHovered||Q.isSelected){var ne=Q.isHovered,_e=Q.isSelected,ke=Q.x,Ie=Q.y,ft=Q.width,dt=Q.height;if(j&&_e||M&&ne){var Et=Q.getOutlineStyle(),zt={};if(Object.keys(Et).forEach((function(wn){wn!=="hover"&&(zt[wn]=Et[wn])})),ne){var En=Et.hover;zt=h2(h2({},zt),En)}V.push(Object(We.g)(Tf,Vh({transform:Q.transform,className:"lf-outline-node",x:ke,y:Ie,width:ft+10,height:dt+10},zt)))}}})),V}},{key:"getEdgeOutline",value:function(){for(var d=this.props.graphModel,m=d.edges,w=d.editConfigModel,M=w.edgeSelectedOutline,j=w.hoverOutline,V=[],Q=0;Q<m.length;Q++){var ne=m[Q];(M&&ne.isSelected||j&&ne.isHovered)&&(ne.modelType===Mr.LINE_EDGE?V.push(this.getLineOutline(ne)):n
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function m2(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function Uh(i){var o=i.x,l=o===void 0?0:o,u=i.y,h=u===void 0?0:u,d=i.r,m=d===void 0?4:d,w=i.className,M={cx:l,cy:h,r:m,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(i).forEach((function(j){var V=tR(j,2),Q=V[0],ne=V[1];nb(ne)!=="object"&&(M[Q]=ne)})),M.className=w?"lf-basic-shape ".concat(w):"lf-basic-shape",Object(We.g)("circle",M)}function rb(i){return rb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},rb(i)}function nR(i,o){return(function(l){if(Array.isArray(l))return l})(i)||(function(l,u){var h=l==null?null:typeof Symbol<"u"&&l[Symbol.iterator]||l["@@iterator"];if(h!=null){var d,m,w=[],M=!0,j=!1;try{for(h=h.call(l);!(M=(d=h.next()).done)&&(w.push(d.value),!u||w.length!==u);M=!0);}catch(V){j=!0,m=V}finally{try{M||h.return==null||h.return()}finally{if(j)throw m}}return w}})(i,o)||(function(l,u){if(l){if(typeof l=="string")return y2(l,u);var h=Object.prototype.toString.call(l).slice(8,-1);if(h==="Object"&&l.constructor&&(h=l.constructor.name),h==="Map"||h==="Set")return Array.from(l);if(h==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(h))return y2(l,u)}})(i,o)||(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 y2(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function rm(){return rm=Object.assign||function(i){for(var o=1;o<arguments.length;o++){var l=arguments[o];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(i[u]=l[u])}return i},rm.apply(this,arguments)}function g2(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}function rR(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function _2(i,o,l){return o&&rR(i.prototype,o),i}function b2(i,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(o&&o.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),o&&ob(i,o)}function ob(i,o){return ob=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},ob(i,o)}function w2(i){var o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var l,u=hy(i);if(o){var h=hy(this).constructor;l=Reflect.construct(u,arguments,h)}else l=u.apply(this,arguments);return oR(this,l)}}function oR(i,o){if(o&&(rb(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return py(i)}function py(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function hy(i){return hy=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},hy(i)}function ib(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}var E2,O2=(function(i){b2(l,i);var o=w2(l);function l(){var u;return g2(this,l),ib(py(u=o.call(this)),"dragHandler",void 0),ib(py(u),"onDragging",(function(h){var d=h.event,m=u.props,w=m.graphModel,M=m.bezierModel,j=m.type,V=w.getPointByClient({x:d.clientX,y:d.clientY}).canvasOverlayPosition,Q=V.x,ne=V.y;M.updateAdjustAnchor({x:Q,y:ne},j),w.eventCenter.emit(Dn.EDGE_ADJUST,{data:M.getData()})})),ib(py(u),"onDragEnd",(function(){u.props.bezierModel.isDragging=!1})),u.dragHandler=new ye({onDragging:u.onDragging,onDragEnd:u.onDragEnd}),u}return _2(l,[{key:"render",value:function(){var u=this,h=this.props.position,d=h.x,m=h.y,w=this.props.bezierModel.getEdgeStyle().adjustAnchor;return Object(We.g)(Uh,rm({className:"lf-bezier-adjust-anchor",x:d,y:m},w,{onMouseDown:function(M){u.dragHandler.handleMouseDown(M)}}))}}]),l})(We.a),iR=gu(v2=(function(i){b2(l,i);var o=w2(l);function l(){return g2(this,l),o.apply(this,arguments)}return _2(l,[{key:"getBezierAdjust",value:function(u,h){var d=u.path,m=u.id,w=nR(go(d),4),M=w[0],j=w[1],V=w[2],Q=w[3],ne=u.getEdgeStyle().adjustLine,_e=[];return _e.push(Object(We.g)(Bh,rm({x1:M.x,y1:M.y,x2:j.x,y2:j.y},ne))),_e.push(Object(We.g)(O2,{position:j,bezierModel:u,graphModel:h,key:"".concat(m,"_ePre"),type:"sNext"})),_e.push(Object(We.g)(Bh,rm({x1:Q.x,y1:Q.y,x2:V.x,y2:V.y},ne))),_e.push(Object(We.g)(O2,{position:V,bezierModel:u,graphModel:h,key:"".concat(m,"_sNext"),type:"ePre"})),_e}},{key:"selectedBezierEdge",value:function(){for(var u=this.props.graphModel,h=u.edges,d=[],m=0;m<h.length;m++){var w=h[m];w.isSelected&&w.modelType===Mr.BEZIER_EDGE&&w.draggable&&d.push(this.getBezierAdjust(w,u))}return d}},{key:"render",value:function(){return Object(We.g)("g",{className:"lf-bezier-adjust"},this.selectedBezierEdge())}}]),l})(We.a))||v2;function ab(i){return ab=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},ab(i)}function aR(i,o){if(!(i instanceof o))throw new TypeError("Cannot cal
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function T2(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function N2(i,o){var l=Object.keys(i);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(i);o&&(u=u.filter((function(h){return Object.getOwnPropertyDescriptor(i,h).enumerable}))),l.push.apply(l,u)}return l}function gy(i){for(var o=1;o<arguments.length;o++){var l=arguments[o]!=null?arguments[o]:{};o%2?N2(Object(l),!0).forEach((function(u){P2(i,u,l[u])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(l)):N2(Object(l)).forEach((function(u){Object.defineProperty(i,u,Object.getOwnPropertyDescriptor(l,u))}))}return i}function _R(i,o,l,u){l&&Object.defineProperty(i,o,{enumerable:l.enumerable,configurable:l.configurable,writable:l.writable,value:l.initializer?l.initializer.call(u):void 0})}function bR(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}function wR(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function om(){return om=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(i,o,l){var u=ER(i,o);if(u){var h=Object.getOwnPropertyDescriptor(u,o);return h.get?h.get.call(arguments.length<3?i:l):h.value}},om.apply(this,arguments)}function ER(i,o){for(;!Object.prototype.hasOwnProperty.call(i,o)&&(i=Nf(i))!==null;);return i}function pb(i,o){return pb=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},pb(i,o)}function OR(i){var o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var l,u=Nf(i);if(o){var h=Nf(this).constructor;l=Reflect.construct(u,arguments,h)}else l=u.apply(this,arguments);return xR(this,l)}}function xR(i,o){if(o&&(db(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _y(i)}function _y(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function Nf(i){return Nf=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},Nf(i)}function P2(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}function vu(i,o,l,u,h){var d={};return Object.keys(u).forEach((function(m){d[m]=u[m]})),d.enumerable=!!d.enumerable,d.configurable=!!d.configurable,("value"in d||d.initializer)&&(d.writable=!0),d=l.slice().reverse().reduce((function(m,w){return w(i,o,m)||m}),d),h&&d.initializer!==void 0&&(d.value=d.initializer?d.initializer.call(h):void 0,d.initializer=void 0),d.initializer===void 0&&(Object.defineProperty(i,o,d),d=null),d}var hb=(uo=(function(i){(function(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(m&&m.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),m&&pb(d,m)})(h,i);var o,l,u=OR(h);function h(){var d;bR(this,h);for(var m=arguments.length,w=new Array(m),M=0;M<m;M++)w[M]=arguments[M];return P2(_y(d=u.call.apply(u,[this].concat(w))),"modelType",Mr.BEZIER_EDGE),_R(_y(d),"path",M2,_y(d)),d}return o=h,(l=[{key:"initEdgeData",value:function(d){this.offset=100,om(Nf(h.prototype),"initEdgeData",this).call(this,d)}},{key:"getEdgeStyle",value:function(){var d=this.graphModel.theme.bezier;return gy(gy({},om(Nf(h.prototype),"getEdgeStyle",this).call(this)),no(d))}},{key:"getTextPosition",value:function(){if(this.pointsList&&this.pointsList.length>0){var d=0,m=0;return this.pointsList.forEach((function(w){var M=w.x,j=w.y;d+=M,m+=j})),{x:d/this.pointsList.length,y:m/this.pointsList.length}}return{x:(this.startPoint.x+this.endPoint.x)/2,y:(this.startPoint.y+this.endPoint.y)/2}}},
|
|||
|
|
C `).concat(M.x," ").concat(M.y,`,
|
|||
|
|
`).concat(j.x," ").concat(j.y,`,
|
|||
|
|
`).concat(V.x," ").concat(V.y)}},{key:"initPoints",value:function(){this.pointsList.length>0?this.path=this.getPath(this.pointsList):this.updatePoints()}},{key:"updatePoints",value:function(){var d=this.getControls(),m=d.sNext,w=d.ePre;this.updatePath(m,w)}},{key:"updatePath",value:function(d,m){d=no(d),m=no(m);var w={x:this.startPoint.x,y:this.startPoint.y},M={x:this.endPoint.x,y:this.endPoint.y};if(!d||!m){var j=this.getControls();d=j.sNext,m=j.ePre}this.pointsList=[w,d,m,M],this.path=this.getPath(this.pointsList)}},{key:"updateStartPoint",value:function(d){this.startPoint=Object.assign({},d),this.updatePoints()}},{key:"updateEndPoint",value:function(d){this.endPoint=Object.assign({},d),this.updatePoints()}},{key:"moveStartPoint",value:function(d,m){this.startPoint.x+=d,this.startPoint.y+=m;var w=fb(this.pointsList,3),M=w[1],j=w[2];M.x+=d,M.y+=m,this.updatePath(M,j)}},{key:"moveEndPoint",value:function(d,m){this.endPoint.x+=d,this.endPoint.y+=m;var w=fb(this.pointsList,3),M=w[1],j=w[2];j.x+=d,j.y+=m,this.updatePath(M,j)}},{key:"updateAdjustAnchor",value:function(d,m){m==="sNext"?this.pointsList[1]=d:m==="ePre"&&(this.pointsList[2]=d),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 d=this.pointsList;return d[d.length-1]||this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(d){var m=d.startPoint,w=d.endPoint,M=d.sourceNode,j=d.targetNode,V=Jo({start:m,end:w,sourceNode:M,targetNode:j,offset:this.offset}),Q=V.sNext,ne=V.ePre;this.pointsList=[m,Q,ne,w],this.initPoints()}}])&&wR(o.prototype,l),h})(ld),M2=vu(uo.prototype,"path",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),vu(uo.prototype,"initPoints",[c.k],Object.getOwnPropertyDescriptor(uo.prototype,"initPoints"),uo.prototype),vu(uo.prototype,"updatePoints",[c.k],Object.getOwnPropertyDescriptor(uo.prototype,"updatePoints"),uo.prototype),vu(uo.prototype,"updateStartPoint",[c.k],Object.getOwnPropertyDescriptor(uo.prototype,"updateStartPoint"),uo.prototype),vu(uo.prototype,"updateEndPoint",[c.k],Object.getOwnPropertyDescriptor(uo.prototype,"updateEndPoint"),uo.prototype),vu(uo.prototype,"moveStartPoint",[c.k],Object.getOwnPropertyDescriptor(uo.prototype,"moveStartPoint"),uo.prototype),vu(uo.prototype,"moveEndPoint",[c.k],Object.getOwnPropertyDescriptor(uo.prototype,"moveEndPoint"),uo.prototype),vu(uo.prototype,"updateAdjustAnchor",[c.k],Object.getOwnPropertyDescriptor(uo.prototype,"updateAdjustAnchor"),uo.prototype),vu(uo.prototype,"getAdjustStart",[c.k],Object.getOwnPropertyDescriptor(uo.prototype,"getAdjustStart"),uo.prototype),vu(uo.prototype,"getAdjustEnd",[c.k],Object.getOwnPropertyDescriptor(uo.prototype,"getAdjustEnd"),uo.prototype),vu(uo.prototype,"updateAfterAdjustStartAndEnd",[c.k],Object.getOwnPropertyDescriptor(uo.prototype,"updateAfterAdjustStartAndEnd"),uo.prototype),uo),un,C2,R2,j2,D2,I2,L2,$2,F2,B2,V2,U2,W2,G2,z2,H2,X2,q2,Y2,K2,Z2,J2,Q2,SR=function(i){return i==null};function AR(i,o){return(function(l){if(Array.isArray(l))return l})(i)||(function(l,u){var h=l==null?null:typeof Symbol<"u"&&l[Symbol.iterator]||l["@@iterator"];if(h!=null){var d,m,w=[],M=!0,j=!1;try{for(h=h.call(l);!(M=(d=h.next()).done)&&(w.push(d.value),!u||w.length!==u);M=!0);}catch(V){j=!0,m=V}finally{try{M||h.return==null||h.return()}finally{if(j)throw m}}return w}})(i,o)||eO(i,o)||(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 vb(i){return vb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},vb(i)}function eO(i,o){if(i){if(typeof i=="string")return tO(i,o);var l=Object.prototype.toString.call(i).slice(8,-1);return l==="Object"&&i.constructor&&(l=i.constructor.name),l==="Map"||l==="Set"?Array.from(i):l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?tO(i,o):void 0}}function tO(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function nO(i,o){var l=Object.keys(i);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(i);o&&(u=u.filter((function(h){return Object.getOwnPropertyDescriptor(i,h).enumerable}))),l.push.apply(l,u)}return l}function sl(i){for(var o=1;o<arguments.length;o++){var l=arguments[o]!=null?arguments[o]:{};o%2?nO(Object(l),!0).forEach((function(u){Tl(i,u,l[u])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(l)):nO(Object(l)).forEach((function(u){Object.defineProperty(i,u,Object.getOwnPropertyDescriptor(l,u))}))}return i}function Ti(i,o,l,u){l&&Object.defineProperty(i,o,{enumerable:l.enumerable,configurable:l.configurable,writable:l.writable,value:l.initializer?l.initializer.call(u):void 0})}function MR(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function Tl(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}function Nr(i,o,l,u,h){var d={};return Object.keys(u).forEach((function(m){d[m]=u[m]})),d.enumerable=!!d.enumerable,d.configurable=!!d.configurable,("value"in d||d.initializer)&&(d.writable=!0),d=l.slice().reverse().reduce((function(m,w){return w(i,o,m)||m}),d),h&&d.initializer!==void 0&&(d.value=d.initializer?d.initializer.call(h):void 0,d.initializer=void 0),d.initializer===void 0&&(Object.defineProperty(i,o,d),d=null),d}var md,rO,yd=(un=(function(){function i(u,h){(function(d,m){if(!(d instanceof m))throw new TypeError("Cannot call a class as a function")})(this,i),Tl(this,"id",""),Ti(this,"type",C2,this),Ti(this,"x",R2,this),Ti(this,"y",j2,this),Ti(this,"text",D2,this),Ti(this,"properties",I2,this),Ti(this,"_width",L2,this),Ti(this,"_height",$2,this),Ti(this,"anchorsOffset",F2,this),Ti(this,"isSelected",B2,this),Ti(this,"isHovered",V2,this),Ti(this,"isShowAnchor",U2,this),Ti(this,"isDragging",W2,this),Ti(this,"isHitable",G2,this),Ti(this,"draggable",z2,this),Ti(this,"visible",H2,this),Ti(this,"enableRotate",X2,this),Tl(this,"virtual",!1),Tl(this,"graphModel",void 0),Ti(this,"zIndex",q2,this),Ti(this,"state",Y2,this),Ti(this,"autoToFront",K2,this),Ti(this,"style",Z2,this),Ti(this,"transform",J2,this),Ti(this,"_rotate",Q2,this),Tl(this,"BaseType",co.NODE),Tl(this,"modelType",Mr.NODE),Tl(this,"additionStateData",void 0),Tl(this,"targetRules",[]),Tl(this,"sourceRules",[]),Tl(this,"moveRules",[]),Tl(this,"hasSetTargetRules",!1),Tl(this,"hasSetSourceRules",!1),this.graphModel=h,this.initNodeData(u),this.setAttributes()}var o,l;return o=i,l=[{key:"width",get:function(){return this._width},set:function(u){this._width=u}},{key:"height",get:function(){return this._height},set:function(u){this._height=u}},{key:"rotate",get:function(){return this._rotate},set:function(u){this._rotate=u;var h=this.x,d=h===void 0?0:h,m=this.y,w=m===void 0?0:m;this.transform=new kf(-d,-w).rotate(u).translate(d,w).toString()}},{key:"incoming",get:function(){return{nodes:this.graphModel.getNodeIncomingNode(this.id),edges:this.graphModel.getNodeIncomingEdge(this.id)}}},{key:"outgoing",get:function(){return{nodes:this.graphModel.getNodeOutgoingNode(this.id),edges:this.graphModel.getNodeOutgoingEdge(this.id)}}},{key:"initNodeData",value:function(u){if(u.properties||(u.properties={}),!u.id){var h=this.graphModel.idGenerator,d=
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ft,dt=!0,Et=!1;return{s:function(){_e=_e.call(Q)},n:function(){var zt=_e.next();return dt=zt.done,zt},e:function(zt){Et=!0,ft=zt},f:function(){try{dt||_e.return==null||_e.return()}finally{if(Et)throw ft}}}})(this.moveRules.concat(this.graphModel.nodeMoveRules));try{for(M.s();!(d=M.n()).done;){var j=(0,d.value)(this,u,h);if(!j)return!1;if(vb(j)==="object"){var V=j;if(V.x===!1&&V.y===!1)return!1;m=m&&V.x,w=w&&V.y}}}catch(Q){M.e(Q)}finally{M.f()}return{x:m,y:w}}},{key:"getConnectedTargetRules",value:function(){return this.targetRules}},{key:"getAnchorsByOffset",value:function(){var u=this.anchorsOffset,h=this.id,d=this.x,m=this.y;return u&&u.length>0?u.map((function(w,M){return w.length?(w=w,{id:"".concat(h,"_").concat(M),x:d+w[0],y:m+w[1]}):sl(sl({},w=w),{},{x:d+w.x,y:m+w.y,id:w.id||"".concat(h,"_").concat(M)})})):this.getDefaultAnchor()}},{key:"getDefaultAnchor",value:function(){return[]}},{key:"getTargetAnchor",value:function(u){return(function(h,d){for(var m,w=Ef(d),M=Number.MAX_SAFE_INTEGER,j=0;j<w.length;j++){var V=al(h.x,h.y,w[j].x,w[j].y);V<M&&(M=V,m={index:j,anchor:Al(Al({},w[j]),{},{x:w[j].x,y:w[j].y,id:w[j].id})})}return m})(u,this)}},{key:"getBounds",value:function(){return{x1:this.x-this.width/2,y1:this.y-this.height/2,x2:this.x+this.width/2,y2:this.y+this.height/2}}},{key:"anchors",get:function(){var u=this.getAnchorsByOffset(),h=this.x,d=this.y,m=this.rotate;return u.forEach((function(w){var M=w.x,j=w.y,V=AR(new Ms([M,j,1]).translate(-h,-d).rotate(m).translate(h,d)[0],2),Q=V[0],ne=V[1];w.x=Q,w.y=ne})),u}},{key:"getAnchorInfo",value:function(u){if(!SR(u))for(var h=0;h<this.anchors.length;h++){var d=this.anchors[h];if(d.id===u)return d}}},{key:"addNodeMoveRules",value:function(u){this.moveRules.includes(u)||this.moveRules.push(u)}},{key:"move",value:function(u,h){var d=arguments.length>2&&arguments[2]!==void 0&&arguments[2],m=!1,w=!1;if(d)m=!0,w=!0;else{var M=this.isAllowMoveNode(u,h);typeof M=="boolean"?(m=M,w=M):(m=M.x,w=M.y)}if(m){var j=this.x+u;this.x=j,this.text&&this.moveText(u,0)}if(w){var V=this.y+h;this.y=V,this.text&&this.moveText(0,h)}return m||w}},{key:"getMoveDistance",value:function(u,h){var d=arguments.length>2&&arguments[2]!==void 0&&arguments[2],m=!1,w=!1,M=0,j=0;if(d)m=!0,w=!0;else{var V=this.isAllowMoveNode(u,h);typeof V=="boolean"?(m=V,w=V):(m=V.x,w=V.y)}if(m&&u){var Q=this.x+u;this.x=Q,this.text&&this.moveText(u,0),M=u}if(w&&h){var ne=this.y+h;this.y=ne,this.text&&this.moveText(0,h),j=h}return[M,j]}},{key:"moveTo",value:function(u,h){var d=arguments.length>2&&arguments[2]!==void 0&&arguments[2],m=u-this.x,w=h-this.y;return!(!d&&!this.isAllowMoveNode(m,w)||(this.text&&this.text&&this.moveText(m,w),this.x=u,this.y=h,0))}},{key:"moveText",value:function(u,h){var d=this.text,m=d.x,w=d.y,M=d.value,j=d.draggable,V=d.editable;this.text={value:M,editable:V,draggable:j,x:m+u,y:w+h}}},{key:"updateText",value:function(u){this.text=sl(sl({},Object(c.I)(this.text)),{},{value:u})}},{key:"setSelected",value:function(){var u=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isSelected=u}},{key:"setHovered",value:function(){var u=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isHovered=u,this.setIsShowAnchor(u)}},{key:"setIsShowAnchor",value:function(){var u=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isShowAnchor=u}},{key:"setEnableRotate",value:function(){var u=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.enableRotate=u}},{key:"setHitable",value:function(){var u=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isHitable=u}},{key:"setElementState",value:function(u,h){this.state=u,this.additionStateData=h}},{key:"setProperty",value:function(u,h){this.properties=sl(sl({},Object(c.I)(this.properties)),{},Tl({},u,gi(h))),this.setAttributes()}},{key:"setProperties",value:function(u){this.properties=sl(sl({},Object(c.I)(this.properties)),gi(u)),this.setAttributes()}},{key:"deleteProperty",value:function(u){delete this.properties[u],this.set
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function uO(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function cO(i,o){var l=Object.keys(i);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(i);o&&(u=u.filter((function(h){return Object.getOwnPropertyDescriptor(i,h).enumerable}))),l.push.apply(l,u)}return l}function dO(i){for(var o=1;o<arguments.length;o++){var l=arguments[o]!=null?arguments[o]:{};o%2?cO(Object(l),!0).forEach((function(u){pO(i,u,l[u])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(l)):cO(Object(l)).forEach((function(u){Object.defineProperty(i,u,Object.getOwnPropertyDescriptor(l,u))}))}return i}function fO(i,o,l,u){l&&Object.defineProperty(i,o,{enumerable:l.enumerable,configurable:l.configurable,writable:l.writable,value:l.initializer?l.initializer.call(u):void 0})}function jR(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}function DR(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function Ob(){return Ob=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(i,o,l){var u=IR(i,o);if(u){var h=Object.getOwnPropertyDescriptor(u,o);return h.get?h.get.call(arguments.length<3?i:l):h.value}},Ob.apply(this,arguments)}function IR(i,o){for(;!Object.prototype.hasOwnProperty.call(i,o)&&(i=zh(i))!==null;);return i}function xb(i,o){return xb=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},xb(i,o)}function LR(i){var o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var l,u=zh(i);if(o){var h=zh(this).constructor;l=Reflect.construct(u,arguments,h)}else l=u.apply(this,arguments);return $R(this,l)}}function $R(i,o){if(o&&(wb(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Gh(i)}function Gh(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function zh(i){return zh=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},zh(i)}function pO(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}function Hh(i,o,l,u,h){var d={};return Object.keys(u).forEach((function(m){d[m]=u[m]})),d.enumerable=!!d.enumerable,d.configurable=!!d.configurable,("value"in d||d.initializer)&&(d.writable=!0),d=l.slice().reverse().reduce((function(m,w){return w(i,o,m)||m}),d),h&&d.initializer!==void 0&&(d.value=d.initializer?d.initializer.call(h):void 0,d.initializer=void 0),d.initializer===void 0&&(Object.defineProperty(i,o,d),d=null),d}var Ju,hO,vO,Sb=(Va=(function(i){(function(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(m&&m.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),m&&xb(d,m)})(h,i);var o,l,u=LR(h);function h(){var d;jR(this,h);for(var m=arguments.length,w=new Array(m),M=0;M<m;M++)w[M]=arguments[M];return pO(Gh(d=u.call.apply(u,[this].concat(w))),"modelType",Mr.DIAMOND_NODE),fO(Gh(d),"rx",lO,Gh(d)),fO(Gh(d),"ry",sO,Gh(d)),d}return o=h,(l=[{key:"getNodeStyle",value:function(){var d=Ob(zh(h.prototype),"getNodeStyle",this).call(this),m=this.graphModel.theme.diamond;return dO(dO({},d),no(m))}},{key:"points",get:function(){var d=this.x,m=this.y,w=this.rx,M=this.ry;return[[d,m-M],[d+w,m],[d,m+M],[d-w,m]]}},{key:"pointsPosition",get:function(){return this.points.map((function(d){return{x:d[0],y:d[1]}}))}},{key:"width",get:function(){var d=Number.MAX_SAFE_INTEGER,m=Number.MIN_SAFE_INTEGER;return this.points.forEach((function(w){var M=Eb(w,1)[0];M<d&&(d=M),M>m&&(m=M)})),m-d}},{key
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function wO(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function EO(i,o){var l=Object.keys(i);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(i);o&&(u=u.filter((function(h){return Object.getOwnPropertyDescriptor(i,h).enumerable}))),l.push.apply(l,u)}return l}function OO(i){for(var o=1;o<arguments.length;o++){var l=arguments[o]!=null?arguments[o]:{};o%2?EO(Object(l),!0).forEach((function(u){xO(i,u,l[u])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(l)):EO(Object(l)).forEach((function(u){Object.defineProperty(i,u,Object.getOwnPropertyDescriptor(l,u))}))}return i}function GR(i,o,l,u){l&&Object.defineProperty(i,o,{enumerable:l.enumerable,configurable:l.configurable,writable:l.writable,value:l.initializer?l.initializer.call(u):void 0})}function zR(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}function HR(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function Cb(){return Cb=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(i,o,l){var u=XR(i,o);if(u){var h=Object.getOwnPropertyDescriptor(u,o);return h.get?h.get.call(arguments.length<3?i:l):h.value}},Cb.apply(this,arguments)}function XR(i,o){for(;!Object.prototype.hasOwnProperty.call(i,o)&&(i=Yh(i))!==null;);return i}function Rb(i,o){return Rb=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},Rb(i,o)}function qR(i){var o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var l,u=Yh(i);if(o){var h=Yh(this).constructor;l=Reflect.construct(u,arguments,h)}else l=u.apply(this,arguments);return YR(this,l)}}function YR(i,o){if(o&&(Nb(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ey(i)}function Ey(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function Yh(i){return Yh=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},Yh(i)}function xO(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}function Oy(i,o,l,u,h){var d={};return Object.keys(u).forEach((function(m){d[m]=u[m]})),d.enumerable=!!d.enumerable,d.configurable=!!d.configurable,("value"in d||d.initializer)&&(d.writable=!0),d=l.slice().reverse().reduce((function(m,w){return w(i,o,m)||m}),d),h&&d.initializer!==void 0&&(d.value=d.initializer?d.initializer.call(h):void 0,d.initializer=void 0),d.initializer===void 0&&(Object.defineProperty(i,o,d),d=null),d}var jb,SO,Db=(Ts=(function(i){(function(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(m&&m.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),m&&Rb(d,m)})(h,i);var o,l,u=qR(h);function h(){var d;zR(this,h);for(var m=arguments.length,w=new Array(m),M=0;M<m;M++)w[M]=arguments[M];return xO(Ey(d=u.call.apply(u,[this].concat(w))),"modelType",Mr.POLYGON_NODE),GR(Ey(d),"points",bO,Ey(d)),d}return o=h,(l=[{key:"getNodeStyle",value:function(){var d=Cb(Yh(h.prototype),"getNodeStyle",this).call(this),m=this.graphModel.theme.polygon;return OO(OO({},d),no(m))}},{key:"pointsPosition",get:function(){var d=this.x,m=this.y,w=this.width,M=this.height;return this.points.map((function(j){return{x:j[0]+d-w/2,y:j[1]+m-M/2}}))}},{key:"width",get:function(){var d=Number.MAX_SAFE_INTEGER,m=Number.MIN_SAFE_INTEGER;return this.points.forEach((function(w){var M=Pb(w,1)[0];M<d&&(d=M),M>m&&(m=M)})),m-d}},{key:"height",get:function(){var d=Number.MAX_SAFE_INTEGER,m=Number.MIN_SAFE_IN
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function WO(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function h3(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function Yb(i,o){return Yb=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},Yb(i,o)}function v3(i){var o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var l,u=My(i);if(o){var h=My(this).constructor;l=Reflect.construct(u,arguments,h)}else l=u.apply(this,arguments);return m3(this,l)}}function m3(i,o){if(o&&(qb(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Qu(i)}function Qu(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function My(i){return My=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},My(i)}function ec(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}var y3=(function(i){(function(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(m&&m.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),m&&Yb(d,m)})(h,i);var o,l,u=v3(h);function h(){var d;return(function(m,w){if(!(m instanceof w))throw new TypeError("Cannot call a class as a function")})(this,h),ec(Qu(d=u.call(this)),"preTargetNode",void 0),ec(Qu(d),"sourceRuleResults",void 0),ec(Qu(d),"targetRuleResults",void 0),ec(Qu(d),"dragHandler",void 0),ec(Qu(d),"t",void 0),ec(Qu(d),"onDragStart",(function(m){var w=m.event,M=d.props,j=M.anchorData,V=M.nodeModel,Q=M.graphModel;Q.overlapMode,Q.selectNodeById(V.id),V.autoToFront&&Q.toFront(V.id),Q.eventCenter.emit(Dn.ANCHOR_DRAGSTART,{data:j,e:w,nodeModel:V}),d.setState({startX:j.x,startY:j.y,endX:j.x,endY:j.y})})),ec(Qu(d),"onDragging",(function(m){var w=m.event,M=d.props,j=M.graphModel,V=M.nodeModel,Q=M.anchorData,ne=j.transformModel,_e=j.eventCenter,ke=j.width,Ie=j.height,ft=j.editConfigModel,dt=ft.autoExpand,Et=ft.stopMoveGraph,zt=w.clientX,En=w.clientY,wn=j.getPointByClient({x:zt,y:En}),Yn=wn.domOverlayPosition,gn=Yn.x,Fn=Yn.y,Mn=wn.canvasOverlayPosition,$r=Mn.x,Wr=Mn.y;d.t&&Ay(d.t);var vr=[];gn<10?vr=[10,0]:gn+10>ke?vr=[-10,0]:Fn<10?vr=[0,10]:Fn+10>Ie&&(vr=[0,-10]),d.setState({endX:$r,endY:Wr,dragging:!0}),d.moveAnchorEnd($r,Wr),vr.length>0&&!Et&&dt&&(d.t=VO((function(){var Jr=p3(vr,2),_i=Jr[0],bi=Jr[1];ne.translate(_i,bi);var Ma=d.state,ts=Ma.endX,ns=Ma.endY;d.setState({endX:ts-_i,endY:ns-bi}),d.moveAnchorEnd(ts-_i,ns-bi)}))),_e.emit(Dn.ANCHOR_DRAG,{data:Q,e:w,nodeModel:V})})),ec(Qu(d),"onDragEnd",(function(m){var w=m.event;d.t&&Ay(d.t);var M=d.checkEnd(w);d.setState({startX:0,startY:0,endX:0,endY:0,dragging:!1}),d.sourceRuleResults.clear(),d.targetRuleResults.clear();var j=d.props,V=j.graphModel,Q=j.nodeModel,ne=j.anchorData;V.eventCenter.emit(Dn.ANCHOR_DRAGEND,{data:ne,e:w,nodeModel:Q,edgeModel:M})})),ec(Qu(d),"checkEnd",(function(m){var w=d.props,M=w.graphModel,j=w.nodeModel,V=w.anchorData,Q=V.x,ne=V.y,_e=V.id,ke=(M.edgeType,d.state),Ie=ke.endX,ft=ke.endY,dt=ke.dragging,Et=Qc({x:Ie,y:ft},M);if(d.preTargetNode&&d.preTargetNode.state!==Zr.DEFAULT&&d.preTargetNode.setElementState(Zr.DEFAULT),dt&&Et&&Et.node){var zt=Et.node,En=Et.anchor.id,wn="".concat(j.id,"_").concat(zt.id,"_").concat(En,"_").concat(_e),Yn=d.sourceRuleResults.get(wn)||{},gn=Yn.isAllPass,Fn=Yn.msg,Mn=d.targetRuleResults.get(wn)||{},$r=Mn.isAllPass,Wr=Mn.msg;if(gn&&$r){zt.setElementState(Zr.DEFAULT);var vr=M.edgeGenerator(j.getData(),M.getNodeModelById(Et.node.id).getData()),Jr=M.addEdge(sm(sm({},vr),{},{sourceNode
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function zO(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function HO(i){var o=i.x,l=o===void 0?0:o,u=i.y,h=u===void 0?0:u,d=i.value,m=i.fontSize,w=i.fill,M=w===void 0?"currentColor":w,j=i.overflowMode,V=j===void 0?"default":j,Q=i.textWidth,ne=Q===void 0?"":Q,_e=i.model,ke={textAnchor:"middle","dominant-baseline":"middle",x:l,y:h,fill:M};if(Object.entries(i).forEach((function(En){var wn=b3(En,2),Yn=wn[0],gn=wn[1];Kb(gn)!=="object"&&(ke[Yn]=gn)})),d){var Ie=String(d).split(/[\r\n]/g),ft=Ie.length;if(V!=="default"){var dt=_e.BaseType,Et=_e.modelType;if(dt===co.NODE&&Et!==Mr.TEXT_NODE||dt===co.EDGE&&ne)return(function(En){var wn=En.value,Yn=En.fontSize,gn=En.model,Fn=En.fontFamily,Mn=Fn===void 0?"":Fn,$r=En.lineHeight,Wr=En.wrapPadding,vr=Wr===void 0?"0, 0":Wr,Jr=En.overflowMode,_i=En.x,bi=En.y,Ma=gn.width,ts=gn.textHeight,ns=En.textWidth||Ma,rc=String(wn).split(/[\r\n]/g),Gp=rc.length,Jy=od({rows:rc,style:{fontSize:"".concat(Yn,"px"),width:"".concat(ns,"px"),fontFamily:Mn,lineHeight:$r,padding:vr},rowsLength:Gp,className:"lf-get-text-height"}),zp=gn.height>Jy?gn.height:Jy;ts&&(zp=ts);var jf=Jr==="ellipsis";return jf&&(zp=Yn+2),Object(We.g)("g",null,Object(We.g)("foreignObject",{width:ns,height:zp,x:_i-ns/2,y:bi-zp/2},Object(We.g)("div",{className:"lf-node-text-auto-wrap",style:{minHeight:zp,width:ns,padding:vr}},Object(We.g)("div",{className:jf?"lf-node-text-ellipsis-content":"lf-node-text-auto-wrap-content",title:jf?rc.join(""):"",style:g3({},En)},rc.map((function(Df){return Object(We.g)("div",{className:"lf-node-text--auto-wrap-inner"},Df)}))))))})(i)}if(ft>1){var zt=Ie.map((function(En,wn){var Yn=(wn-(ft-1)/2)*(m+2);return Object(We.g)("tspan",{className:"lf-text-tspan",x:l,y:h+Yn},En)}));return Object(We.g)("text",ke,zt)}return Object(We.g)("text",ke,d)}}function Zb(i){return Zb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Zb(i)}function Jb(){return Jb=Object.assign||function(i){for(var o=1;o<arguments.length;o++){var l=arguments[o];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(i[u]=l[u])}return i},Jb.apply(this,arguments)}function w3(i,o){return(function(l){if(Array.isArray(l))return l})(i)||(function(l,u){var h=l==null?null:typeof Symbol<"u"&&l[Symbol.iterator]||l["@@iterator"];if(h!=null){var d,m,w=[],M=!0,j=!1;try{for(h=h.call(l);!(M=(d=h.next()).done)&&(w.push(d.value),!u||w.length!==u);M=!0);}catch(V){j=!0,m=V}finally{try{M||h.return==null||h.return()}finally{if(j)throw m}}return w}})(i,o)||(function(l,u){if(l){if(typeof l=="string")return XO(l,u);var h=Object.prototype.toString.call(l).slice(8,-1);if(h==="Object"&&l.constructor&&(h=l.constructor.name),h==="Map"||h==="Set")return Array.from(l);if(h==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(h))return XO(l,u)}})(i,o)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function XO(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function E3(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function Qb(i,o){return Qb=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},Qb(i,o)}function O3(i){var o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var l,u=ky(i);if(o){var h=ky(this).constructor;l=Reflect.construct(u,arguments,h)}else l=u.apply(this,arguments);return x3(this,l)}}function x3(i,o){if(o&&(Zb(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Cf(i)}function Cf(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function ky(i){return ky=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},ky(i)}function Bp(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}var qO=(function(i){(function(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(m&&m.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),m&&Qb(d,m)})(h,i);var o,l,u=O3(h);function h(d){var m;(function(M,j){if(!(M instanceof j))throw new TypeError("Cannot call a class as a function")})(this,h),Bp(Cf(m=u.call(this)),"dragHandler",void 0),Bp(Cf(m),"sumDeltaX",0),Bp(Cf(m),"sumDeltaY",0),Bp(Cf(m),"stepDrag",void 0),Bp(Cf(m),"onDragging",(function(M){var j=M.deltaX,V=M.deltaY,Q=m.props,ne=Q.model,_e=w3(Q.graphModel.transformModel.fixDeltaXY(j,V),2),ke=_e[0],Ie=_e[1];ne.moveText(ke,Ie)})),Bp(Cf(m),"dblClickHandler",(function(){m.props.editable&&m.props.model.setElementState(Zr.TEXT_EDIT)})),Bp(Cf(m),"mouseDownHandle",(function(M){var j=m.props,V=j.draggable,Q=j.model,ne=j.graphModel.editConfigModel.nodeTextDraggable;(V||ne)&&(m.stepDrag.model=Q,m.stepDrag.handleMouseDown(M))})),d.model;var w=d.draggable;return m.stepDrag=new ye({onDragging:m.onDragging,step:1,isStopPropagation:w}),m}return o=h,(l=[{key:"getShape",value:function(){var d=this.props,m=d.model,w=d.graphModel,M=m.text,j=w.editConfigModel,V=M.value,Q=M.x,ne=M.y,_e=M.editable,ke=M.draggable,Ie={x:Q,y:ne,className:"",value:V};_e?Ie.className="lf-element-text":ke||j.nodeTextDraggable?Ie.className="lf-text-draggable":Ie.className="lf-text-disabled";var ft=m.getTextStyle();return Object(We.g)(HO,Jb({},Ie,ft,{model:m}))}},{key:"render",value:function(){if(this.props.model.text)return Object(We.g)("g",{onMouseDown:this.mouseDownHandle,onDblClick:this.dblClickHandler},this.getShape())}}])&&E3(o.prototype,l),h})(We.a),S3=Ws(window,"navigator.userAgent","").match(/MSIE|Trident/)!==null,YO=r(130);function e0(i){return e0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},e0(i)}function t0(){return t0=Object.assign||function(i){for(var o=1;o<arguments.length;o++){var l=arguments[o];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(i[u]=l[u])}return i},t0.apply(this,arguments)}function A3(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function n0(i,o){return n0=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},n0(i,o)}function M3(i){var o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.co
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function KO(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function ZO(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function o0(i,o){return o0=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},o0(i,o)}function C3(i){var o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var l,u=Cy(i);if(o){var h=Cy(this).constructor;l=Reflect.construct(u,arguments,h)}else l=u.apply(this,arguments);return R3(this,l)}}function R3(i,o){if(o&&(r0(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ra(i)}function ra(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function Cy(i){return Cy=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},Cy(i)}function da(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}var gd=(function(i){(function(m,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function");m.prototype=Object.create(w&&w.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),w&&o0(m,w)})(d,i);var o,l,u,h=C3(d);function d(m){var w;(function(ne,_e){if(!(ne instanceof _e))throw new TypeError("Cannot call a class as a function")})(this,d),da(ra(w=h.call(this)),"t",void 0),da(ra(w),"moveOffset",void 0),da(ra(w),"stepDrag",void 0),da(ra(w),"contextMenuTime",void 0),da(ra(w),"mouseUpDrag",void 0),da(ra(w),"startTime",void 0),da(ra(w),"clickTimer",void 0),da(ra(w),"modelDisposer",void 0),da(ra(w),"onDragStart",(function(ne){var _e=ne.event,ke=_e.clientX,Ie=_e.clientY,ft=w.props,dt=ft.model,Et=ft.graphModel.getPointByClient({x:ke,y:Ie}).canvasOverlayPosition,zt=Et.x,En=Et.y;w.moveOffset={x:dt.x-zt,y:dt.y-En}})),da(ra(w),"onDragging",(function(ne){var _e=ne.event,ke=w.props,Ie=ke.model,ft=ke.graphModel,dt=ft.editConfigModel,Et=dt.stopMoveGraph,zt=dt.autoExpand,En=ft.transformModel,wn=ft.selectNodes,Yn=ft.width,gn=ft.height,Fn=ft.gridSize;Ie.isDragging=!0;var Mn=_e.clientX,$r=_e.clientY,Wr=ft.getPointByClient({x:Mn,y:$r}).canvasOverlayPosition,vr=Wr.x,Jr=Wr.y,_i=Py(En.CanvasPointToHtmlPoint([vr,Jr]),2),bi=_i[0],Ma=_i[1];if(vr+=w.moveOffset.x,Jr+=w.moveOffset.y,vr=nl(vr,Fn),Jr=nl(Jr,Fn),Yn&&gn){if(!zt||Et||!(bi<0||Ma<0||bi>Yn||Ma>gn)){var ts=Py(En.CanvasPointToHtmlPoint([vr-Ie.width/2,Jr-Ie.height/2]),2),ns=ts[0],rc=ts[1],Gp=Py(En.CanvasPointToHtmlPoint([vr+Ie.width/2,Jr+Ie.height/2]),2),Jy=Gp[0],zp=Gp[1],jf=Math.max(Fn,20),Df=[];ns<0?Df=[jf,0]:Jy>ft.width?Df=[-jf,0]:rc<0?Df=[0,jf]:zp>ft.height&&(Df=[0,-jf]),w.t&&Ay(w.t);var m8=new kf(-vr,-Jr).rotate(Ie.rotate).translate(vr,Jr).toString();Ie.transform=m8;var Qy=wn.map((function(eg){return eg.id}));Qy.indexOf(Ie.id)===-1&&(Qy=[Ie.id]),Df.length>0&&!Et&&zt?w.t=VO((function(){var eg=Py(Df,2),Px=eg[0],Cx=eg[1];En.translate(Px,Cx);var y8=-Px/En.SCALE_X,g8=-Cx/En.SCALE_X;ft.moveNodes(Qy,y8,g8)})):ft.moveNodes(Qy,vr-Ie.x,Jr-Ie.y)}}else ft.moveNode2Coordinate(Ie.id,vr,Jr)})),da(ra(w),"onDragEnd",(function(){w.t&&Ay(w.t),w.props.model.isDragging=!1})),da(ra(w),"handleMouseUp",(function(){var ne=w.props.model;w.mouseUpDrag=ne.isDragging})),da(ra(w),"handleClick",(function(ne){var _e=w.mouseUpDrag===!1;if(w.startTime){var ke=w.props,Ie=ke.model,ft=ke.graphModel;if(_e){var dt={data:Ie.getData(),e:ne,position:ft.getPointByClient({x:ne.clientX,y:ne.clientY}),isSelected:!1,isMultiple:!1},Et=ne.button===2,zt=ne.detail===2;if(!Et){var En=ft.editConfigModel,wn=Wu(ne,En);dt.isMultiple=wn,Ie.isSelected&&!zt&&wn?(dt.isSelected=!1,Ie.setSelected(
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function JO(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function QO(i){var o=i.points,l=i.className,u={fill:"transparent",fillOpacity:1,strokeWidth:1,stroke:"#000",strokeOpacity:1,points:""};return Object.entries(i).forEach((function(h){var d=U3(h,2),m=d[0],w=d[1];p0(w)!=="object"&&(u[m]=w)})),u.className=l?"lf-basic-shape ".concat(l):"lf-basic-shape",u.points=o.map((function(h){return h.join(",")})).join(" "),Object(We.g)("polygon",u)}function h0(i){return h0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},h0(i)}function v0(){return v0=Object.assign||function(i){for(var o=1;o<arguments.length;o++){var l=arguments[o];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(i[u]=l[u])}return i},v0.apply(this,arguments)}function W3(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}function G3(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function m0(i,o){return m0=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},m0(i,o)}function z3(i){var o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var l,u=Dy(i);if(o){var h=Dy(this).constructor;l=Reflect.construct(u,arguments,h)}else l=u.apply(this,arguments);return H3(this,l)}}function H3(i,o){if(o&&(h0(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(l){if(l===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l})(i)}function Dy(i){return Dy=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},Dy(i)}var y0=(function(i){(function(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(m&&m.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),m&&m0(d,m)})(h,i);var o,l,u=z3(h);function h(){return W3(this,h),u.apply(this,arguments)}return o=h,(l=[{key:"getShape",value:function(){var d=this.props.model,m=d.x,w=d.y,M=d.width,j=d.height,V=d.points,Q=d.getNodeStyle(),ne={transform:"matrix(1 0 0 1 ".concat(m-M/2," ").concat(w-j/2,")")};return Object(We.g)("g",ne,Object(We.g)(QO,v0({},Q,{points:V,x:m,y:w})))}}])&&G3(o.prototype,l),h})(gd);function g0(i){return g0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},g0(i)}function _0(){return _0=Object.assign||function(i){for(var o=1;o<arguments.length;o++){var l=arguments[o];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(i[u]=l[u])}return i},_0.apply(this,arguments)}function X3(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}function q3(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function b0(i,o){return b0=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},b0(i,o)}function Y3(i){var o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var l,u=Iy(i);if(o){var h=Iy(this).constructor;l=Reflect.construct(u,arguments,h)}else l=u.apply(this,arguments);return K3(this,l)}}function K3(i,o){if(o&&(g0(o)==="
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function ex(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function J3(i){var o=i.x,l=o===void 0?0:o,u=i.y,h=u===void 0?0:u,d=i.rx,m=d===void 0?4:d,w=i.ry,M=w===void 0?4:w,j=i.className,V={cx:l,cy:h,rx:m,ry:M,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(i).forEach((function(Q){var ne=Z3(Q,2),_e=ne[0],ke=ne[1];E0(ke)!=="object"&&(V[_e]=ke)})),V.className=j?"lf-basic-shape ".concat(j):"lf-basic-shape",Object(We.g)("ellipse",V)}function O0(i){return O0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},O0(i)}function x0(){return x0=Object.assign||function(i){for(var o=1;o<arguments.length;o++){var l=arguments[o];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(i[u]=l[u])}return i},x0.apply(this,arguments)}function Q3(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}function ej(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function S0(i,o){return S0=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},S0(i,o)}function tj(i){var o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var l,u=Ly(i);if(o){var h=Ly(this).constructor;l=Reflect.construct(u,arguments,h)}else l=u.apply(this,arguments);return nj(this,l)}}function nj(i,o){if(o&&(O0(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(l){if(l===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l})(i)}function Ly(i){return Ly=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},Ly(i)}var A0=(function(i){(function(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(m&&m.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),m&&S0(d,m)})(h,i);var o,l,u=tj(h);function h(){return Q3(this,h),u.apply(this,arguments)}return o=h,(l=[{key:"getShape",value:function(){var d=this.props.model,m=d.getNodeStyle();return Object(We.g)(J3,x0({},m,{x:d.x,y:d.y,rx:d.rx,ry:d.ry}))}}])&&ej(o.prototype,l),h})(gd);function M0(i){return M0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},M0(i)}function tx(i,o){var l=Object.keys(i);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(i);o&&(u=u.filter((function(h){return Object.getOwnPropertyDescriptor(i,h).enumerable}))),l.push.apply(l,u)}return l}function nx(i){for(var o=1;o<arguments.length;o++){var l=arguments[o]!=null?arguments[o]:{};o%2?tx(Object(l),!0).forEach((function(u){rj(i,u,l[u])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(l)):tx(Object(l)).forEach((function(u){Object.defineProperty(i,u,Object.getOwnPropertyDescriptor(l,u))}))}return i}function rj(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}function oj(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}function ij(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function k0(i,o){return k0=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},k0(i,o)}function aj(i){var o=(functio
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function ix(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function _j(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function B0(i,o){return B0=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},B0(i,o)}function bj(i){var o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var l,u=Uy(i);if(o){var h=Uy(this).constructor;l=Reflect.construct(u,arguments,h)}else l=u.apply(this,arguments);return wj(this,l)}}function wj(i,o){if(o&&(F0(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ql(i)}function Ql(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function Uy(i){return Uy=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},Uy(i)}function es(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}(function(i){i.SOURCE="SOURCE",i.TARGET="TARGET"})(tc||(tc={}));var ax=(function(i){(function(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(m&&m.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),m&&B0(d,m)})(h,i);var o,l,u=bj(h);function h(d){var m;(function(V,Q){if(!(V instanceof Q))throw new TypeError("Cannot call a class as a function")})(this,h),es(Ql(m=u.call(this)),"stepDragData",void 0),es(Ql(m),"stepDrag",void 0),es(Ql(m),"oldEdge",void 0),es(Ql(m),"preTargetNode",void 0),es(Ql(m),"targetRuleResults",void 0),es(Ql(m),"sourceRuleResults",void 0),es(Ql(m),"handleMouseDown",(function(V){m.stepDrag&&m.stepDrag.handleMouseDown(V)})),es(Ql(m),"onDragStart",(function(){var V=m.props,Q=V.x,ne=V.y,_e=V.edgeModel,ke=_e.startPoint,Ie=_e.endPoint,ft=_e.pointsList;m.oldEdge={startPoint:ke,endPoint:Ie,pointsList:ft},m.setState({endX:Q,endY:ne,dragging:!0})})),es(Ql(m),"onDragging",(function(V){var Q=V.deltaX,ne=V.deltaY,_e=m.state,ke=_e.endX,Ie=_e.endY,ft=m.props,dt=ft.graphModel,Et=ft.type,zt=dt.transformModel,En=dt.editConfigModel,wn=gj(zt.moveCanvasPointByHtml([ke,Ie],Q,ne),2),Yn=wn[0],gn=wn[1];m.setState({endX:Yn,endY:gn,dragging:!0});var Fn=m.props.edgeModel,Mn=Qc({x:ke,y:Ie},dt);if(Mn&&Mn.node&&m.isAllowAdjust(Mn).pass){var $r,Wr=Fn.startPoint,vr=Fn.endPoint,Jr=Fn.sourceNode,_i=Fn.targetNode;Et===tc.SOURCE?$r={startPoint:{x:Mn.anchor.x,y:Mn.anchor.y},endPoint:{x:vr.x,y:vr.y},sourceNode:Mn.node,targetNode:_i}:Et===tc.TARGET&&($r={startPoint:{x:Wr.x,y:Wr.y},endPoint:{x:Mn.anchor.x,y:Mn.anchor.y},sourceNode:Jr,targetNode:Mn.node}),Fn.updateAfterAdjustStartAndEnd($r)}else Et===tc.SOURCE?Fn.updateStartPoint({x:Yn,y:gn}):Et===tc.TARGET&&Fn.updateEndPoint({x:Yn,y:gn});Fn.text.value&&En.adjustEdge&&Fn.setText(Object.assign({},Fn.text,Fn.textPosition))})),es(Ql(m),"onDragEnd",(function(V){var Q=V.event;try{var ne;m.setState({dragging:!1});var _e=m.props,ke=_e.graphModel,Ie=_e.edgeModel,ft=_e.type,dt=m.state,Et=dt.endX,zt=dt.endY,En=dt.dragging,wn=Qc({x:Et,y:zt},ke);if(!En)return;var Yn,gn=!1;if(wn&&wn.node){var Fn=m.isAllowAdjust(wn),Mn=Fn.pass,$r=Fn.msg,Wr=Fn.newTargetNode;if(Mn){var vr=Ie.getData(),Jr=vr.text,_i=vr.sourceAnchorId,bi=_i===void 0?"":_i,Ma=vr.targetAnchorId;Yn=_d(_d({sourceAnchorId:bi,targetAnchorId:Ma===void 0?"":Ma},yj(vr,mj)),{},{text:(Jr==null?void 0:Jr.value)||""}),ft===tc.SOURCE?(Yn=_d(_d({},ke.edgeGenerator(ke.getNodeModelById(wn.node.id).getData(),ke.getNodeModelById(Ie.targetNodeId).getData(),Yn)),{},{sourceNodeId:wn.node.id,sourceAnchorId:wn.anchor.id,startPoint:{x:wn.anchor.x,y:wn.anchor.y},targetNodeId
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function lx(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function Oj(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}function xj(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function U0(i,o){return U0=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},U0(i,o)}function Sj(i){var o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var l,u=Wy(i);if(o){var h=Wy(this).constructor;l=Reflect.construct(u,arguments,h)}else l=u.apply(this,arguments);return Aj(this,l)}}function Aj(i,o){if(o&&(V0(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return yu(i)}function yu(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function Wy(i){return Wy=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},Wy(i)}function nc(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}var fm=(function(i){(function(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(m&&m.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),m&&U0(d,m)})(h,i);var o,l,u=Sj(h);function h(){var d;Oj(this,h);for(var m=arguments.length,w=new Array(m),M=0;M<m;M++)w[M]=arguments[M];return nc(yu(d=u.call.apply(u,[this].concat(w))),"startTime",void 0),nc(yu(d),"contextMenuTime",void 0),nc(yu(d),"clickTimer",void 0),nc(yu(d),"textRef",Object(We.f)()),nc(yu(d),"handleHover",(function(j,V){var Q=d.props,ne=Q.model,_e=Q.graphModel.eventCenter;ne.setHovered(j);var ke=j?Dn.EDGE_MOUSEENTER:Dn.EDGE_MOUSELEAVE,Ie=ne.getData();_e.emit(ke,{data:Ie,e:V})})),nc(yu(d),"setHoverON",(function(j){d.props.model.isHovered||(d.textRef&&d.textRef.current&&d.textRef.current.setHoverON(),d.handleHover(!0,j))})),nc(yu(d),"setHoverOFF",(function(j){d.props.model.isHovered&&(d.textRef&&d.textRef.current&&d.textRef.current.setHoverOFF(),d.handleHover(!1,j))})),nc(yu(d),"handleContextMenu",(function(j){j.preventDefault(),d.contextMenuTime=new Date().getTime(),d.clickTimer&&clearTimeout(d.clickTimer);var V=d.props,Q=V.model,ne=V.graphModel,_e=ne.getPointByClient({x:j.clientX,y:j.clientY});ne.setElementStateById(Q.id,Zr.SHOW_MENU,_e.domOverlayPosition),d.toFront(),Q.isSelected||ne.selectEdgeById(Q.id);var ke=Q==null?void 0:Q.getData();ne.eventCenter.emit(Dn.EDGE_CONTEXTMENU,{data:ke,e:j,position:_e})})),nc(yu(d),"handleMouseDown",(function(j){j.stopPropagation(),d.startTime=new Date().getTime()})),nc(yu(d),"handleMouseUp",(function(j){if(d.startTime&&!(new Date().getTime()-d.startTime>200||j.button===2)){var V=j.detail===2,Q=d.props,ne=Q.model,_e=Q.graphModel,ke=ne==null?void 0:ne.getData(),Ie=_e.getPointByClient({x:j.clientX,y:j.clientY});if(V){var ft=_e.editConfigModel,dt=_e.textEditElement;if(dt&&dt.id===ne.id&&_e.setElementStateById(ne.id,Zr.DEFAULT),ft.edgeTextEdit&&ne.text.editable&&_e.setElementStateById(ne.id,Zr.TEXT_EDIT),ne.modelType===Mr.POLYLINE_EDGE){var Et=ne,zt=_e.getPointByClient({x:j.x,y:j.y}).canvasOverlayPosition,En=zt.x,wn=zt.y,Yn=Tr({x:En,y:wn},Et.points);Et.dbClickPosition=Yn}_e.eventCenter.emit(Dn.EDGE_DBCLICK,{data:ke,e:j,position:Ie})}else _e.eventCenter.emit(Dn.ELEMENT_CLICK,{data:ke,e:j,position:Ie}),_e.eventCenter.emit(Dn.EDGE_CLICK,{data:ke,e:j,position:Ie});var gn=_e.editConfigModel;_e.selectEdgeById(ne.id,Wu(j,gn)),d.toFront()}})),d}return o=h,(l=[{key:"getShape",value:function(){return Object(We.g)("g",null,this.getEdge())}},{key:"getTextStyle
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function sx(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}var pm=function(i){var o={d:""};return Object.entries(i).forEach((function(l){var u=Mj(l,2),h=u[0],d=u[1],m=W0(d);h!=="style"&&m==="object"||(o[h]=d)})),Object(We.g)("path",o)};function G0(i){return G0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},G0(i)}function z0(){return z0=Object.assign||function(i){for(var o=1;o<arguments.length;o++){var l=arguments[o];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(i[u]=l[u])}return i},z0.apply(this,arguments)}function kj(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}function Tj(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function H0(i,o){return H0=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},H0(i,o)}function Nj(i){var o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var l,u=Gy(i);if(o){var h=Gy(this).constructor;l=Reflect.construct(u,arguments,h)}else l=u.apply(this,arguments);return Pj(this,l)}}function Pj(i,o){if(o&&(G0(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(l){if(l===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l})(i)}function Gy(i){return Gy=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},Gy(i)}var X0=(function(i){(function(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(m&&m.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),m&&H0(d,m)})(h,i);var o,l,u=Nj(h);function h(){return kj(this,h),u.apply(this,arguments)}return o=h,(l=[{key:"getEdge",value:function(){var d=this.props.model,m=d.startPoint,w=d.endPoint,M=d.isAnimation,j=d.arrowConfig,V=d.getEdgeStyle(),Q=d.getEdgeAnimationStyle(),ne=Q.strokeDasharray,_e=Q.stroke,ke=Q.strokeDashoffset,Ie=Q.animationName,ft=Q.animationDuration,dt=Q.animationIterationCount,Et=Q.animationTimingFunction,zt=Q.animationDirection;return Object(We.g)(Bh,z0({},V,{x1:m.x,y1:m.y,x2:w.x,y2:w.y},j,M?{strokeDasharray:ne,stroke:_e,style:{strokeDashoffset:ke,animationName:Ie,animationDuration:ft,animationIterationCount:dt,animationTimingFunction:Et,animationDirection:zt}}:{}))}},{key:"getAppendWidth",value:function(){var d=this.props.model,m=d.startPoint,w=d.endPoint,M=fi({start:m,end:w}),j=M.d,V=M.strokeWidth,Q=M.fill,ne=M.strokeDasharray,_e=M.stroke;return Object(We.g)(pm,{d:j,fill:Q,strokeWidth:V,stroke:_e,strokeDasharray:ne})}}])&&Tj(o.prototype,l),h})(fm);function q0(i){return q0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},q0(i)}function Cj(i,o){return(function(l){if(Array.isArray(l))return l})(i)||(function(l,u){var h=l==null?null:typeof Symbol<"u"&&l[Symbol.iterator]||l["@@iterator"];if(h!=null){var d,m,w=[],M=!0,j=!1;try{for(h=h.call(l);!(M=(d=h.next()).done)&&(w.push(d.value),!u||w.length!==u);M=!0);}catch(V){j=!0,m=V}finally{try{M||h.return==null||h.return()}finally{if(j)throw m}}return w}})(i,o)||(function(l,u){if(l){if(typeof l=="string")return ux(l,u);var h=Object.prototype.toString.call(l).slice(8,-1);if(h==="Object"&&l.constructor&&(h=l.constructor.name),h==="Map"||h==="Set")return Array.from(l);if(h==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function ux(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}var Rj=function(i){var o={points:"",fill:"none"};return Object.entries(i).forEach((function(l){var u=Cj(l,2),h=u[0],d=u[1];(h==="style"||q0(d)!=="object")&&(o[h]=d)})),Object(We.g)("polyline",o)};function Y0(i){return Y0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Y0(i)}function cx(i,o){var l=Object.keys(i);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(i);o&&(u=u.filter((function(h){return Object.getOwnPropertyDescriptor(i,h).enumerable}))),l.push.apply(l,u)}return l}function zy(i){for(var o=1;o<arguments.length;o++){var l=arguments[o]!=null?arguments[o]:{};o%2?cx(Object(l),!0).forEach((function(u){wd(i,u,l[u])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(l)):cx(Object(l)).forEach((function(u){Object.defineProperty(i,u,Object.getOwnPropertyDescriptor(l,u))}))}return i}function K0(){return K0=Object.assign||function(i){for(var o=1;o<arguments.length;o++){var l=arguments[o];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(i[u]=l[u])}return i},K0.apply(this,arguments)}function jj(i,o){return(function(l){if(Array.isArray(l))return l})(i)||(function(l,u){var h=l==null?null:typeof Symbol<"u"&&l[Symbol.iterator]||l["@@iterator"];if(h!=null){var d,m,w=[],M=!0,j=!1;try{for(h=h.call(l);!(M=(d=h.next()).done)&&(w.push(d.value),!u||w.length!==u);M=!0);}catch(V){j=!0,m=V}finally{try{M||h.return==null||h.return()}finally{if(j)throw m}}return w}})(i,o)||(function(l,u){if(l){if(typeof l=="string")return dx(l,u);var h=Object.prototype.toString.call(l).slice(8,-1);if(h==="Object"&&l.constructor&&(h=l.constructor.name),h==="Map"||h==="Set")return Array.from(l);if(h==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(h))return dx(l,u)}})(i,o)||(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 dx(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function Dj(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function Z0(i,o){return Z0=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},Z0(i,o)}function Ij(i){var o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var l,u=Hy(i);if(o){var h=Hy(this).constructor;l=Reflect.construct(u,arguments,h)}else l=u.apply(this,arguments);return Lj(this,l)}}function Lj(i,o){if(o&&(Y0(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return bd(i)}function bd(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function Hy(i){return Hy=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},Hy(i)}function wd(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}var J0=(function(i){(function(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(m&&m.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),m&&Z0(d,m)})(h,i);var o,l,u=Ij(h);function h(){var d;return(function(m,w){if(!(m instanceof w))throw new TypeError("Cannot call a class as a function")})(this,h),wd(bd(d=u.call(this)),"drag",void 0),wd(bd(d),"isDragging",void 0),wd(bd(d),"isShowAdjustPointTemp",void 0),wd(bd(d),"appendInfo",void 0),wd(bd(d),"onDragStart",(function(){var m=d.props.model;m.dragAppendStart(),d.isShowAdjustPointTemp=m.isShowAdjustPoint,m.isShowAdjustPoint=!1})),wd(bd(d),"onDragging",(function(m){var w=m.deltaX,M=m.deltaY,j=d.props,V=j.model,Q=j.graphModel;d.isDragging=!0;var ne=Q.transformModel,_e=Q.editConfigModel,ke=jj(ne.fixDeltaXY(w,M),2),Ie=ke[0],ft=ke[1],dt=V,Et=_e.adjustEdgeMiddle;d.appendInfo=Et?dt.dragAppendSimple(d.appendInfo,{x:Ie,y:ft}):dt.dragAppend(d.appendInfo,{x:Ie,y:ft})})),wd(bd(d),"onDragEnd",(function(){var m=d.props,w=m.model,M=m.graphModel.eventCenter,j=w;j.dragAppendEnd(),d.isDragging=!1,j.isShowAdjustPoint=d.isShowAdjustPointTemp,d.appendInfo=void 0,M.emit(Dn.EDGE_ADJUST,{data:j.getData()})})),wd(bd(d),"beforeDragStart",(function(m,w){w.dragAble&&d.drag.handleMouseDown(m),d.appendInfo=w})),d.drag=new ye({onDragStart:d.onDragStart,onDragging:d.onDragging,onDragEnd:d.onDragEnd,isStopPropagation:!1}),d}return o=h,(l=[{key:"getEdge",value:function(){var d=this.props.model,m=d.points,w=d.isAnimation,M=d.arrowConfig,j=d.getEdgeStyle(),V=d.getEdgeAnimationStyle(),Q=V.strokeDasharray,ne=V.stroke,_e=V.strokeDashoffset,ke=V.animationName,Ie=V.animationDuration,ft=V.animationIterationCount,dt=V.animationTimingFunction,Et=V.animationDirection;return Object(We.g)(Rj,K0({points:m},j,M,w?{strokeDasharray:Q,stroke:ne,style:{strokeDashoffset:_e,animationName:ke,animationDuration:Ie,animationIterationCount:ft,animationTimingFunction:dt,animationDirection:Et}}:{}))}},{key:"getArrowInfo",value:function(){var d=this.props.model,m=d.points,w=d.isSelected,M={start:null,end:null,hover:this.state.hover,isSelected:w},j=ir(m);return j.length>=2&&(M.start=j[j.length-2],M.end=j[j.length-1]),M}},{key:"getLastTwoPoints",value:function(){var d=this.props.model.points,m=ir(d);return m.length>=2?[m[m.length-2],m[m.length-1]]:[null,null]}},{key:"getAppendAttributes",value:function(d){var m,w=d.start,M=d.end;if(w.x===M.x&&w.y===M.y)m="";else{var j={start:w,end:M,offset:10,verticalLength:5},V=du(zy(zy({},j),{},{type:"start"})),Q=du(zy(zy({},j),{},{type:"end"}));m="M".concat(V.leftX," ").concat(V.leftY,`
|
|||
|
|
L`).concat(V.rightX," ").concat(V.rightY,`
|
|||
|
|
L`).concat(Q.rightX," ").concat(Q.rightY,`
|
|||
|
|
L`).concat(Q.leftX," ").concat(Q.leftY," z")}return{d:m,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}}},{key:"getAppendShape",value:function(d){var m=this.getAppendAttributes(d),w=m.d,M=m.strokeWidth,j=m.fill,V=m.strokeDasharray,Q=m.stroke;return Object(We.g)(pm,{d:w,fill:j,strokeWidth:M,stroke:Q,strokeDasharray:V})}},{key:"getAppendWidth",value:function(){for(var d=this,m=this.props,w=m.model,M=m.graphModel,j=w.pointsList,V=w.draggable,Q=[],ne=j.length,_e=function(Ie){var ft="lf-polyline-append",dt={start:{x:j[Ie].x,y:j[Ie].y},end:{x:j[Ie+1].x,y:j[Ie+1].y},startIndex:Ie,endIndex:Ie+1,direction:"",dragAble:!0},Et=Object(We.g)("g",{className:ft},d.getAppendShape(dt)),zt=M.editConfigModel,En=zt.adjustEdge,wn=zt.adjustEdgeMiddle;if(En&&V){var Yn=dt.startIndex,gn=dt.endIndex,Fn=wn&&(Yn===0||gn===ne-1);dt.dragAble=!Fn,dt.start.x===dt.end.x?(dt.dragAble&&(ft+="-ew-resize"),dt.direction=fo.VERTICAL):dt.start.y===dt.end.y&&(dt.dragAble&&(ft+="-ns-resize"),dt.direction=fo.HORIZONTAL),Et=Object(We.g)("g",{className:d.isDragging?"lf-dragging":"lf-drag-able",onMouseDown:function(Mn){return d.beforeDragStart(Mn,dt)}},Object(We.g)("g",{className:ft},d.getAppendShape(dt)))}Q.push(Et)},ke=0;ke<ne-1;ke++)_e(ke);return Object(We.g)("g",null,Q)}}])&&Dj(o.prototype,l),h})(fm);function Q0(i){return Q0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Q0(i)}function $j(i,o){return(function(l){if(Array.isArray(l))return l})(i)||(function(l,u){var h=l==null?null:typeof Symbol<"u"&&l[Symbol.iterator]||l["@@iterator"];if(h!=null){var d,m,w=[],M=!0,j=!1;try{for(h=h.call(l);!(M=(d=h.next()).done)&&(w.push(d.value),!u||w.length!==u);M=!0);}catch(V){j=!0,m=V}finally{try{M||h.return==null||h.return()}finally{if(j)throw m}}return w}})(i,o)||(function(l,u){if(l){if(typeof l=="string")return fx(l,u);var h=Object.prototype.toString.call(l).slice(8,-1);if(h==="Object"&&l.constructor&&(h=l.constructor.name),h==="Map"||h==="Set")return Array.from(l);if(h==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(h))return fx(l,u)}})(i,o)||(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 fx(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function e1(){return e1=Object.assign||function(i){for(var o=1;o<arguments.length;o++){var l=arguments[o];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(i[u]=l[u])}return i},e1.apply(this,arguments)}function Fj(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}function Bj(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function t1(i,o){return t1=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},t1(i,o)}function Vj(i){var o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var l,u=Xy(i);if(o){var h=Xy(this).constructor;l=Reflect.construct(u,arguments,h)}else l=u.apply(this,arguments);return Uj(this,l)}}function Uj(i,o){if(o&&(Q0(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(l){if(l===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l})(i)}function Xy(i){return Xy=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},Xy(i)}var n1=(function(i){(function(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(m&&m.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),m&&t1(d,m)})(h,i);var o,l,u=Vj(h);function h(){return Fj(this,h),u.apply(this,arguments)}return o=h,(l=[{key:"getEdge",value:function(){var d=this.props.model,m=d.getEdgeStyle(),w=d.path,M=d.isAnimation,j=d.arrowConfig,V=d.getEdgeAnimationStyle(),Q=V.strokeDasharray,ne=V.stroke,_e=V.strokeDashoffset,ke=V.animationName,Ie=V.animationDuration,ft=V.animationIterationCount,dt=V.animationTimingFunction,Et=V.animationDirection;return Object(We.g)(pm,e1({d:w},m,j,M?{strokeDasharray:Q,stroke:ne,style:{strokeDashoffset:_e,animationName:ke,animationDuration:Ie,animationIterationCount:ft,animationTimingFunction:dt,animationDirection:Et}}:{}))}},{key:"getAppendWidth",value:function(){var d=this.props.model.path;return Object(We.g)(pm,{d,strokeWidth:10,stroke:"transparent",fill:"none"})}},{key:"getArrowInfo",value:function(){var d=this.props.model,m=this.state.hover,w=d.isSelected,M=d.getArrowStyle().offset,j=d.pointsList.map((function(Q){return{x:Q.x,y:Q.y}})),V=$j(pi(j,M),2);return{start:V[0],end:V[1],hover:m,isSelected:w}}},{key:"getLastTwoPoints",value:function(){var d=this.props.model,m=d.getArrowStyle().offset,w=d.pointsList.map((function(M){return{x:M.x,y:M.y}}));return pi(w,m)}}])&&Bj(o.prototype,l),h})(fm);function r1(i){return r1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},r1(i)}function px(i,o){var l=Object.keys(i);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(i);o&&(u=u.filter((function(h){return Object.getOwnPropertyDescriptor(i,h).enumerable}))),l.push.apply(l,u)}return l}function Wj(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}function Gj(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}function zj(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function o1(i,o){return o1=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},o1(i,o)}function Hj(i){var o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sha
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function gx(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function _x(i,o){var l=Object.keys(i);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(i);o&&(u=u.filter((function(h){return Object.getOwnPropertyDescriptor(i,h).enumerable}))),l.push.apply(l,u)}return l}function Up(i){for(var o=1;o<arguments.length;o++){var l=arguments[o]!=null?arguments[o]:{};o%2?_x(Object(l),!0).forEach((function(u){Wp(i,u,l[u])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(l)):_x(Object(l)).forEach((function(u){Object.defineProperty(i,u,Object.getOwnPropertyDescriptor(l,u))}))}return i}function bx(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function l1(i,o){return l1=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},l1(i,o)}function r8(i){var o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var l,u=Yy(i);if(o){var h=Yy(this).constructor;l=Reflect.construct(u,arguments,h)}else l=u.apply(this,arguments);return o8(this,l)}}function o8(i,o){if(o&&(a1(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Qh(i)}function Qh(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function Yy(i){return Yy=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},Yy(i)}function Wp(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}var wx,Ex,Ox,s1=gu((yx=mx=(function(i){(function(m,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function");m.prototype=Object.create(w&&w.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),w&&l1(m,w)})(d,i);var o,l,u,h=r8(d);function d(){var m;return(function(w,M){if(!(w instanceof M))throw new TypeError("Cannot call a class as a function")})(this,d),Wp(Qh(m=h.call(this)),"ref",Object(We.f)()),Wp(Qh(m),"__prevText",{type:"",text:"",id:""}),Wp(Qh(m),"keyupHandler",(function(w){var M=m.props.graphModel.textEditElement;w.key==="Enter"&&w.altKey&&M.setElementState(0)})),Wp(Qh(m),"inputHandler",(function(w){var M=w.target.innerText,j=m.props.graphModel.textEditElement;m.__prevText={type:j.type,text:M.replace(/(\r\n)+$|(\n)+$/,""),id:j.id}})),Wp(Qh(m),"keydownHandler",(function(w){w.stopPropagation()})),m.state={style:{left:0,top:0}},m}return o=d,u=[{key:"getDerivedStateFromProps",value:function(m){var w,M=m.graphModel,j=M.transformModel,V=M.theme,Q=V.inputText,ne=M.textEditElement;if(ne){var _e;if((_e=ne.text)===null||_e===void 0||!_e.value)if(ne.BaseType===co.EDGE){var ke=(ne=ne).text,Ie=ne.textPosition,ft=Ie.x,dt=Ie.y;ke.x=ft,ke.y=dt,ne.setText(ke)}else ne=ne;var Et={resize:"auto",whiteSpace:"normal",wordBreak:"break-all"};if(ne.BaseType===co.EDGE){var zt=V.edgeText,En=zt.overflowMode,wn=zt.lineHeight,Yn=zt.wrapPadding,gn=zt.textWidth;gn&&En==="autoWrap"&&(w=Up(Up({},Et),{},{width:gn,minWidth:gn,lineHeight:wn,padding:Yn}))}else if(ne.BaseType===co.NODE){var Fn=V.nodeText,Mn=Fn.overflowMode,$r=Fn.lineHeight,Wr=Fn.wrapPadding,vr=Fn.textWidth,Jr=ne,_i=Jr.width,bi=Jr.modelType,Ma=Jr.textWidth||vr||_i;(bi!==Mr.TEXT_NODE&&Mn==="autoWrap"||bi===Mr.TEXT_NODE&&vr)&&(w=Up(Up({},Et),{},{width:Ma,minWidth:Ma,lineHeight:$r,padding:Wr}))}var ts=ne.text,ns=ts.x,rc=ts.y,Gp=n8(j.CanvasPointToHtmlPoint([ns,rc]),2);return{style:Up(Up({left:Gp[0],top:Gp[1]},w),Q)}}}}],(l=[{key:"componentDidUpdate",value:function(){var m=this.props.graphModel;if(this.ref.current&&(this.ref.current.focus(),this.placeCaretAtEnd(this
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function a8(i){return(function(o){if(Array.isArray(o))return c1(o)})(i)||(function(o){if(typeof Symbol<"u"&&o[Symbol.iterator]!=null||o["@@iterator"]!=null)return Array.from(o)})(i)||Sx(i)||(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 Sx(i,o){if(i){if(typeof i=="string")return c1(i,o);var l=Object.prototype.toString.call(i).slice(8,-1);return l==="Object"&&i.constructor&&(l=i.constructor.name),l==="Map"||l==="Set"?Array.from(i):l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?c1(i,o):void 0}}function c1(i,o){(o==null||o>i.length)&&(o=i.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=i[l];return u}function l8(i,o){for(var l=0;l<o.length;l++){var u=o[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}function d1(i,o){return d1=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},d1(i,o)}function s8(i){var o=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var l,u=Ky(i);if(o){var h=Ky(this).constructor;l=Reflect.construct(u,arguments,h)}else l=u.apply(this,arguments);return u8(this,l)}}function u8(i,o){if(o&&(u1(o)==="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ev(i)}function ev(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function Ky(i){return Ky=Object.setPrototypeOf?Object.getPrototypeOf:function(o){return o.__proto__||Object.getPrototypeOf(o)},Ky(i)}function tv(i,o,l){return o in i?Object.defineProperty(i,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[o]=l,i}var f1=gu((Ox=Ex=(function(i){(function(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(m&&m.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),m&&d1(d,m)})(h,i);var o,l,u=s8(h);function h(d){var m;(function(V,Q){if(!(V instanceof Q))throw new TypeError("Cannot call a class as a function")})(this,h),tv(ev(m=u.call(this)),"stepDrag",void 0),tv(ev(m),"handleMouseDown",(function(V){m.stepDrag.handleMouseDown(V)})),tv(ev(m),"handleWheelEvent",(function(V){var Q,ne;V.preventDefault();var _e=V.deltaX,ke=V.deltaY,Ie=V.clientX,ft=V.clientY,dt=V.ctrlKey,Et=new WheelEvent("wheel",{deltaX:_e,deltaY:ke,clientX:Ie,clientY:ft,ctrlKey:dt});(Q=m.props.logicFlow.container)===null||Q===void 0||(ne=Q.querySelector('.lf-canvas-overlay[name="canvas-overlay"]'))===null||ne===void 0||ne.dispatchEvent(Et)})),tv(ev(m),"onDragging",(function(V){var Q=V.deltaX,ne=V.deltaY,_e=m.props.graphModel,ke=_e.getSelectElements(!0);_e.moveNodes(ke.nodes.map((function(Ie){return Ie.id})),Q,ne)})),tv(ev(m),"handleContextMenu",(function(V){V.preventDefault();var Q=m.props,ne=Q.graphModel,_e=Q.graphModel,ke=_e.eventCenter,Ie=_e.selectElements,ft=ne.getPointByClient({x:V.clientX,y:V.clientY}),dt={nodes:[],edges:[]};a8(Ie.values()).forEach((function(Et){Et.BaseType===co.NODE&&dt.nodes.push(Et.getData()),Et.BaseType===co.EDGE&&dt.edges.push(Et.getData())})),ke.emit(Dn.SELECTION_CONTEXTMENU,{data:dt,e:V,position:ft})}));var w=d.graphModel,M=w.gridSize,j=w.eventCenter;return m.stepDrag=new ye({onDragging:m.onDragging,step:M,eventType:"SELECTION",eventCenter:j}),m}return o=h,(l=[{key:"render",value:function(){var d=this.props.graphModel,m=d.selectElements,w=d.transformModel;if(!(m.size<=1)){var M=Number.MAX_SAFE_INTEGER,j=Number.MAX_SAFE_INTEGER,V=Number.MIN_SAFE_INTEGER,Q=Number.MIN_SAFE_INTEGER;m.forEach((function(Ie){var ft={x:0,y:0,x1:0,y1:0};Ie.BaseType===co.NODE&&(ft=(function(dt){var Et=dt.x,zt=dt.y,En=dt.width,wn=dt.height;return{x:Et-En/2,y:zt-wn/2,x1:Et+En/2,y1:zt+wn/2}})(Ie)),Ie.BaseType===co.EDGE&&(ft=i8(Ie)),M=Math.min(M,ft.x),j=Math.min(j,ft.y),V=Math.max(V,ft.x1),Q=Math.max(Q,ft.y1)}));var ne=xx(w.CanvasPointToHtmlPoint([M,j]),2);M=ne[0],j=ne[1];var _e=xx(w.CanvasPointToHtmlPoint([V,Q]),2);V=_e[0],Q=_e[1];var ke={left:"".concat(M-10,"px"),top:"".concat(j-10,"px"),width:""
|
|||
|
|
`;function vg(e,t,n){var a=OV(n),r="";if(t==="#text")return rv+a+e;if(t==="#cdata-section")return rv+a+"<![CDATA["+e+"]]>";if(t==="#comment")return rv+a+"<!--"+e+"-->";if((""+t).charAt(0)==="-")return" "+t.substring(1)+'="'+xV(e)+'"';if(Array.isArray(e))e.forEach(function(f){r+=vg(f,t,n+1)});else if(LT(e)==="[object Object]"){var s=Object.keys(e),c="",v="";r+=(n===0?"":rv+a)+"<"+t,s.forEach(function(f){f.charAt(0)==="-"?c+=vg(e[f],f,n+1):v+=vg(e[f],f,n+1)}),r+=c+(v!==""?">"+v+(rv+a)+"</"+t+">":" />")}else r+=rv+a+("<"+t+">"+e.toString()+"</"+t+">");return r}function SV(e){var t="";for(var n in e)t+=vg(e[n],n,0);return t}var hl=function(){};hl.ObjTree=function(){return this};hl.ObjTree.VERSION="0.23";hl.ObjTree.prototype.xmlDecl=`<?xml version="1.0" encoding="UTF-8" ?>
|
|||
|
|
`;hl.ObjTree.prototype.attr_prefix="-";hl.ObjTree.prototype.parseXML=function(e){var t;if(window.DOMParser){var n=new DOMParser,a=n.parseFromString(e,"application/xml");if(!a)return;t=a.documentElement}else window.ActiveXObject&&(n=new ActiveXObject("Microsoft.XMLDOM"),n.async=!1,n.loadXML(e),t=n.documentElement);if(t)return this.parseDOM(t)};hl.ObjTree.prototype.parseHTTP=function(e,t,n){var a={};for(var r in t)a[r]=t[r];if(a.method||(typeof a.postBody>"u"&&typeof a.postbody>"u"&&typeof a.parameters>"u"?a.method="get":a.method="post"),n){a.asynchronous=!0;var s=this,c=n,v=a.onComplete;a.onComplete=function(_){var b;_&&_.responseXML&&_.responseXML.documentElement&&(b=s.parseDOM(_.responseXML.documentElement)),c(b,_),v&&v(_)}}else a.asynchronous=!1;var f;if(typeof HTTP<"u"&&HTTP.Request){a.uri=e;var g=new HTTP.Request(a);g&&(f=g.transport)}else if(typeof Ajax<"u"&&Ajax.Request){var g=new Ajax.Request(e,a);g&&(f=g.transport)}if(n)return f;if(f&&f.responseXML&&f.responseXML.documentElement)return this.parseDOM(f.responseXML.documentElement)};hl.ObjTree.prototype.parseDOM=function(e){if(e){if(this.__force_array={},this.force_array)for(var t=0;t<this.force_array.length;t++)this.__force_array[this.force_array[t]]=1;var n=this.parseElement(e);if(this.__force_array[e.nodeName]&&(n=[n]),e.nodeType!=11){var a={};a[e.nodeName]=n,n=a}return n}};hl.ObjTree.prototype.parseElement=function(e){if(e.nodeType!=7){if(e.nodeType==3||e.nodeType==4||e.nodeType==8){var t=e.nodeValue.match(/[^\x00-\x20]/);return t==null?void 0:e.nodeValue}var n=null,a={};if(e.attributes&&e.attributes.length){n={};for(var r=0;r<e.attributes.length;r++){var s=e.attributes[r].nodeName;if(typeof s=="string"){var c=e.attributes[r].nodeValue;try{c=JSON.parse(e.attributes[r].nodeValue.replace(/'/g,'"'))}catch{c=e.attributes[r].nodeValue}c&&(s=this.attr_prefix+s,typeof a[s]>"u"&&(a[s]=0),a[s]++,this.addNode(n,s,a[s],c))}}}if(e.childNodes&&e.childNodes.length){var v=!0;n&&(v=!1);for(var r=0;r<e.childNodes.length&&v;r++){var f=e.childNodes[r].nodeType;f==3||f==4||f==8||(v=!1)}if(v){n||(n="");for(var r=0;r<e.childNodes.length;r++)n+=e.childNodes[r].nodeValue}else{n||(n={});for(var r=0;r<e.childNodes.length;r++){var s=e.childNodes[r].nodeName;if(typeof s=="string"){var c=this.parseElement(e.childNodes[r]);c&&(typeof a[s]>"u"&&(a[s]=0),a[s]++,this.addNode(n,s,a[s],c))}}}}else n===null&&(n={});return n}};hl.ObjTree.prototype.addNode=function(e,t,n,a){this.__force_array[t]?(n==1&&(e[t]=[]),e[t][e[t].length]=a):n==1?e[t]=a:n==2?e[t]=[e[t],a]:e[t][e[t].length]=a};hl.ObjTree.prototype.writeXML=function(e){var t=this.hash_to_xml(null,e);return this.xmlDecl+t};hl.ObjTree.prototype.hash_to_xml=function(e,t){var n=[],a=[];for(var r in t)if(t.hasOwnProperty(r)){var s=t[r];r.charAt(0)!=this.attr_prefix?typeof s>"u"||s==null?n[n.length]="<"+r+" />":typeof s=="object"&&s.constructor==Array?n[n.length]=this.array_to_xml(r,s):typeof s=="object"?n[n.length]=this.hash_to_xml(r,s):n[n.length]=this.scalar_to_xml(r,s):a[a.length]=" "+r.substring(1)+'="'+this.xml_escape(s)+'"'}var c=a.join(""),v=n.join("");return typeof e>"u"||e==null||(n.length>0?v.match(/\n/)?v="<"+e+c+`>
|
|||
|
|
`+v+"</"+e+`>
|
|||
|
|
`:v="<"+e+c+">"+v+"</"+e+`>
|
|||
|
|
`:v="<"+e+c+` />
|
|||
|
|
`),v};hl.ObjTree.prototype.array_to_xml=function(e,t){for(var n=[],a=0;a<t.length;a++){var r=t[a];typeof r>"u"||r==null?n[n.length]="<"+e+" />":typeof r=="object"&&r.constructor==Array?n[n.length]=this.array_to_xml(e,r):typeof r=="object"?n[n.length]=this.hash_to_xml(e,r):n[n.length]=this.scalar_to_xml(e,r)}return n.join("")};hl.ObjTree.prototype.scalar_to_xml=function(e,t){return e=="#text"?this.xml_escape(t):"<"+e+">"+this.xml_escape(t)+"</"+e+`>
|
|||
|
|
`};hl.ObjTree.prototype.xml_escape=function(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"')};var AV=function(e){return new hl.ObjTree().parseXML(e)},MV=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,r){a.__proto__=r}||function(a,r){for(var s in r)r.hasOwnProperty(s)&&(a[s]=r[s])},e(t,n)};return function(t,n){e(t,n);function a(){this.constructor=t}t.prototype=n===null?Object.create(n):(a.prototype=n.prototype,new a)}})(),bw=function(){return bw=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++){t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},bw.apply(this,arguments)},w_=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var a=n.call(e),r,s=[],c;try{for(;(t===void 0||t-- >0)&&!(r=a.next()).done;)s.push(r.value)}catch(v){c={error:v}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(c)throw c.error}}return s},uc;(function(e){e.START="bpmn:startEvent",e.END="bpmn:endEvent",e.GATEWAY="bpmn:exclusiveGateway",e.USER="bpmn:userTask",e.SYSTEM="bpmn:serviceTask",e.FLOW="bpmn:sequenceFlow"})(uc||(uc={}));var $T=["-name","-id","bpmn:incoming","bpmn:outgoing","-sourceRef","-targetRef"],bS=["properties","startPoint","endPoint","pointsList"];function wS(e){var t=e?bS.concat(e):bS;return function(n){function a(r){var s={};return typeof r=="string"?r:Array.isArray(r)?r.map(function(c){return a(c)}):(Object.entries(r).forEach(function(c){var v=w_(c,2),f=v[0],g=v[1];typeof g!="object"?f.indexOf("-")===0||["#text","#cdata-section","#comment"].includes(f)?s[f]=g:s["-"+f]=g:t.includes(f)?s["-"+f]=a(g):s[f]=a(g)}),s)}return a(n)}}function Dg(e){var t={};return Object.entries(e).forEach(function(n){var a=w_(n,2),r=a[0],s=a[1];r.indexOf("-")===0?t[r.substring(1)]=jg(s):typeof s=="string"?t[r]=s:Object.prototype.toString.call(s)==="[object Object]"?t[r]=Dg(s):Array.isArray(s)?t[r]=s.map(function(c){return Dg(c)}):t[r]=s}),t}function kV(e,t,n){var a=new Map;t.nodes.forEach(function(s){var c,v={"-id":s.id};if(!((c=s.text)===null||c===void 0)&&c.value&&(v["-name"]=s.text.value),s.properties){var f=wS(n)(s.properties);Object.assign(v,f)}a.set(s.id,v),e[s.type]?Array.isArray(e[s.type])?e[s.type].push(v):e[s.type]=[e[s.type],v]:e[s.type]=v});var r=t.edges.map(function(s){var c,v,f=a.get(s.targetNodeId);f["bpmn:incoming"]?Array.isArray(f["bpmn:incoming"])?f["bpmn:incoming"].push(s.id):f["bpmn:incoming"]=[f["bpmn:incoming"],s.id]:f["bpmn:incoming"]=s.id;var g={"-id":s.id,"-sourceRef":s.sourceNodeId,"-targetRef":s.targetNodeId};if(!((c=s.text)===null||c===void 0)&&c.value&&(g["-name"]=(v=s.text)===null||v===void 0?void 0:v.value),s.properties){var _=wS(n)(s.properties);Object.assign(g,_)}return g});t.edges.forEach(function(s){var c=a.get(s.sourceNodeId);c["bpmn:outgoing"]?Array.isArray(c["bpmn:outgoing"])?c["bpmn:outgoing"].push(s.id):c["bpmn:outgoing"]=[c["bpmn:outgoing"],s.id]:c["bpmn:outgoing"]=s.id}),e[uc.FLOW]=r}function TV(e,t){e["bpmndi:BPMNEdge"]=t.edges.map(function(n){var a,r=n.id,s=n.pointsList.map(function(v){var f=v.x,g=v.y;return{"-x":f,"-y":g}}),c={"-id":r+"_di","-bpmnElement":r,"di:waypoint":s};return!((a=n.text)===null||a===void 0)&&a.value&&(c["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":n.text.x-n.text.value.length*10/2,"-y":n.text.y-7,"-width":n.text.value.length*10,"-height":14}}),c}),e["bpmndi:BPMNShape"]=t.nodes.map(function(n){var a,r=n.id,s=100,c=80,v=n.x,f=n.y,g=Qf.shapeConfigMap.get(n.type);g&&(s=g.width,c=g.height),v-=s/2,f-=c/2;var _={"-id":r+"_di","-bpmnElement":r,"dc:Bounds":{"-x":v,"-y":f,"-width":s,"-height":c}};return!((a=n.text)===null||a===void 0)&&a.value&&(_["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":n.text.x-n.text.value.length*10/2,"-y":n.text.y-7,"-width":n.text.value.length*10,"-height":14}}),_})}function NV(e){var t=[],n=[],a=e["bpmn:definitions"];if(a){var r=a["bpmn:process"];Object.keys(r).forEach(function(s){if(s.indexOf("bpmn:")===0){var c=r[s];if(s===uc.FLOW){var v=a["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNE
|
|||
|
|
`).forEach(function(f){s<f.length&&(s=f.length)}),n={value:a,x:Number(r["-x"])+s*10/2,y:Number(r["-y"])+7}}var c;Object.entries(t).forEach(function(f){var g=w_(f,2),_=g[0],b=g[1];$T.indexOf(_)===-1&&(c||(c={}),c[_]=b)}),c&&(c=Dg(c));var v={id:t["-id"],type:uc.FLOW,pointsList:e["di:waypoint"].map(function(f){return{x:Number(f["-x"]),y:Number(f["-y"])}}),sourceNodeId:t["-sourceRef"],targetNodeId:t["-targetRef"],properties:c};return n&&(v.text=n),v}var Qf=(function(){function e(t){var n=this,a=t.lf;this.adapterOut=function(r,s){var c=bw({},n.processAttributes);kV(c,r,s);var v={"-id":"BPMNPlane_1","-bpmnElement":c["-id"]};TV(v,r);var f=n.definitionAttributes;f["bpmn:process"]=c,f["bpmndi:BPMNDiagram"]={"-id":"BPMNDiagram_1","bpmndi:BPMNPlane":v};var g={"bpmn:definitions":f};return g},this.adapterIn=function(r){if(r)return NV(r)},a.adapterIn=function(r){return n.adapterIn(r)},a.adapterOut=function(r,s){return n.adapterOut(r,s)},this.processAttributes={"-isExecutable":"true","-id":"Process_"+_S()},this.definitionAttributes={"-id":"Definitions_"+_S(),"-xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","-xmlns:bpmn":"http://www.omg.org/spec/BPMN/20100524/MODEL","-xmlns:bpmndi":"http://www.omg.org/spec/BPMN/20100524/DI","-xmlns:dc":"http://www.omg.org/spec/DD/20100524/DC","-xmlns:di":"http://www.omg.org/spec/DD/20100524/DI","-targetNamespace":"http://logic-flow.org","-exporter":"logicflow","-exporterVersion":"1.2.0"}}return e.prototype.setCustomShape=function(t,n){e.shapeConfigMap.set(t,n)},e.pluginName="bpmn-adapter",e.shapeConfigMap=new Map,e})();Qf.shapeConfigMap.set(uc.START,{width:hS.width,height:hS.height});Qf.shapeConfigMap.set(uc.END,{width:vS.width,height:vS.height});Qf.shapeConfigMap.set(uc.GATEWAY,{width:mS.width,height:mS.height});Qf.shapeConfigMap.set(uc.SYSTEM,{width:yS.width,height:yS.height});Qf.shapeConfigMap.set(uc.USER,{width:gS.width,height:gS.height});(function(e){MV(t,e);function t(n){var a=e.call(this,n)||this;a.adapterXmlIn=function(s){var c=AV(s);return a.adapterIn(c)},a.adapterXmlOut=function(s,c){var v=a.adapterOut(s,c);return SV(v)};var r=n.lf;return r.adapterIn=a.adapterXmlIn,r.adapterOut=a.adapterXmlOut,a}return t.pluginName="bpmnXmlAdapter",t})(Qf);var RV=(function(){function e(){globalThis._ids=this,this._ids=new Set}return e.prototype.generateId=function(){var t="xxxxxxx".replace(/[x]/g,function(n){var a=Math.random()*16|0,r=n==="x"?a:a&3|8;return r.toString(16)});return t},e.prototype.next=function(){for(var t=this.generateId();this._ids.has(t);)t=this.generateId();return this._ids.add(t),t},e})(),jV=(globalThis==null?void 0:globalThis._ids)||new RV;function DV(){return jV.next()}hn.h("circle",{cx:18,cy:18,r:11,style:"stroke-linecap: round;stroke-linejoin: round;stroke: rgb(34, 36, 42);stroke-width: 2px;fill: white"}),hn.h("path",{d:"M 18,18 l 2.25,-7.5 m -2.25,7.5 l 5.25,1.5",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 2px;"}),hn.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(0,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),hn.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(30,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),hn.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(60,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),hn.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(90,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),hn.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(120,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),hn.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(150,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),hn.h("path",{
|
|||
|
|
`;vl.ObjTree.prototype.attr_prefix="-";vl.ObjTree.prototype.parseXML=function(e){var t;if(window.DOMParser){var n=new DOMParser,a=n.parseFromString(e,"application/xml");if(!a)return;t=a.documentElement}else window.ActiveXObject&&(n=new ActiveXObject("Microsoft.XMLDOM"),n.async=!1,n.loadXML(e),t=n.documentElement);if(t){var r=this.parseDOM(t);return r}};vl.ObjTree.prototype.parseHTTP=function(e,t,n){var a={};for(var r in t)a[r]=t[r];if(a.method||(typeof a.postBody>"u"&&typeof a.postbody>"u"&&typeof a.parameters>"u"?a.method="get":a.method="post"),n){a.asynchronous=!0;var s=this,c=n,v=a.onComplete;a.onComplete=function(_){var b;_&&_.responseXML&&_.responseXML.documentElement&&(b=s.parseDOM(_.responseXML.documentElement)),c(b,_),v&&v(_)}}else a.asynchronous=!1;var f;if(typeof HTTP<"u"&&HTTP.Request){a.uri=e;var g=new HTTP.Request(a);g&&(f=g.transport)}else if(typeof Ajax<"u"&&Ajax.Request){var g=new Ajax.Request(e,a);g&&(f=g.transport)}if(n)return f;if(f&&f.responseXML&&f.responseXML.documentElement)return this.parseDOM(f.responseXML.documentElement)};vl.ObjTree.prototype.parseDOM=function(e){if(e){if(this.__force_array={},this.force_array)for(var t=0;t<this.force_array.length;t++)this.__force_array[this.force_array[t]]=1;var n=this.parseElement(e);if(this.__force_array[e.nodeName]&&(n=[n]),e.nodeType!==11){var a={};a[e.nodeName]=n,n=a}return n}};vl.ObjTree.prototype.parseElement=function(e){if(e.nodeType!==7){if(e.nodeType===3||e.nodeType===4||e.nodeType===8){var t=e.nodeValue.match(/[^\x00-\x20]/);return t==null?void 0:e.nodeValue}var n=null,a={};if(e.attributes&&e.attributes.length){n={};for(var r=0;r<e.attributes.length;r++){var s=e.attributes[r].nodeName;if(typeof s=="string"){var c=e.attributes[r].nodeValue;try{c=JSON.parse(e.attributes[r].nodeValue.replace(/'/g,'"'))}catch{c=e.attributes[r].nodeValue}c!=null&&(s=this.attr_prefix+s,typeof a[s]>"u"&&(a[s]=0),a[s]++,this.addNode(n,s,a[s],c))}}}if(e.childNodes&&e.childNodes.length){var v=!0;n&&(v=!1);for(var r=0;r<e.childNodes.length&&v;r++){var f=e.childNodes[r].nodeType;f===3||f===4||f===8||(v=!1)}if(v){n||(n="");for(var r=0;r<e.childNodes.length;r++)n+=e.childNodes[r].nodeValue}else{n||(n={});for(var r=0;r<e.childNodes.length;r++){var s=e.childNodes[r].nodeName;if(typeof s=="string"){var c=this.parseElement(e.childNodes[r]);c&&(typeof a[s]>"u"&&(a[s]=0),a[s]++,this.addNode(n,s,a[s],c))}}}}else n===null&&(n={});return n}};vl.ObjTree.prototype.addNode=function(e,t,n,a){this.__force_array[t]?(n===1&&(e[t]=[]),e[t][e[t].length]=a):n===1?e[t]=a:n===2?e[t]=[e[t],a]:e[t][e[t].length]=a};vl.ObjTree.prototype.writeXML=function(e){var t=this.hash_to_xml(null,e);return this.xmlDecl+t};vl.ObjTree.prototype.hash_to_xml=function(e,t){var n=[],a=[];for(var r in t)if(t!=null&&t.hasOwnProperty(r)){var s=t[r];r.charAt(0)!==this.attr_prefix?typeof s>"u"||s==null?n[n.length]="<"+r+" />":typeof s=="object"&&s.constructor===Array?n[n.length]=this.array_to_xml(r,s):typeof s=="object"?n[n.length]=this.hash_to_xml(r,s):n[n.length]=this.scalar_to_xml(r,s):a[a.length]=" "+r.substring(1)+'="'+this.xml_escape(s)+'"'}var c=a.join(""),v=n.join("");return typeof e>"u"||e==null||(n.length>0?v.match(/\n/)?v="<"+e+c+`>
|
|||
|
|
`+v+"</"+e+`>
|
|||
|
|
`:v="<"+e+c+">"+v+"</"+e+`>
|
|||
|
|
`:v="<"+e+c+` />
|
|||
|
|
`),v};vl.ObjTree.prototype.array_to_xml=function(e,t){for(var n=[],a=0;a<t.length;a++){var r=t[a];typeof r>"u"||r==null?n[n.length]="<"+e+" />":typeof r=="object"&&r.constructor===Array?n[n.length]=this.array_to_xml(e,r):typeof r=="object"?n[n.length]=this.hash_to_xml(e,r):n[n.length]=this.scalar_to_xml(e,r)}return n.join("")};vl.ObjTree.prototype.scalar_to_xml=function(e,t){return e==="#text"?this.xml_escape(t):"<"+e+">"+this.xml_escape(t)+"</"+e+`>
|
|||
|
|
`};vl.ObjTree.prototype.xml_escape=function(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"')};var rU=function(e){return new vl.ObjTree().parseXML(e)};function rN(e){return Object.prototype.toString.call(e)}function BS(e){return" ".repeat(e)}function Vg(e){return rN(e)==="[object Object]"?Object.keys(e).reduce(function(t,n){var a=n;return n.charAt(0)==="-"&&(a=n.substring(1)),t[a]=Vg(e[n]),t},{}):Array.isArray(e)?e.map(function(t){return Vg(t)}):e}function oU(e){var t=e;try{typeof t!="string"&&(t=JSON.parse(e))}catch{t=JSON.stringify(Vg(e)).replace(/"/g,"'")}return t}var VS=`
|
|||
|
|
`;function yg(e,t,n){var a=BS(n),r="",s=VS+a;if(t==="-json")return"";if(t==="#text")return s+e;if(t==="#cdata-section")return s+"<![CDATA["+e+"]]>";if(t==="#comment")return s+"<!--"+e+"-->";if((""+t).charAt(0)==="-")return" "+t.substring(1)+'="'+oU(e)+'"';if(Array.isArray(e))r+=e.map(function(g){return yg(g,t,n+1)}).join("");else if(rN(e)==="[object Object]"){var c=Object.keys(e),v="",f=e["-json"]?VS+BS(n+1)+e["-json"]:"";r+=(n===0?"":s)+"<"+t,c.forEach(function(g){g.charAt(0)==="-"?v+=yg(e[g],g,n+1):f+=yg(e[g],g,n+1)}),r+=v+(f!==""?">"+f+s+"</"+t+">":" />")}else r+=s+"<"+t+">"+e.toString()+"</"+t+">";return r}function iU(e){var t="";for(var n in e)t+=yg(e[n],n,0);return t}var aU=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,r){a.__proto__=r}||function(a,r){for(var s in r)r.hasOwnProperty(s)&&(a[s]=r[s])},e(t,n)};return function(t,n){e(t,n);function a(){this.constructor=t}t.prototype=n===null?Object.create(n):(a.prototype=n.prototype,new a)}})(),Aw=function(){return Aw=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++){t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},Aw.apply(this,arguments)},US=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]]);return n},PE=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],a=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&a>=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Uv=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var a=n.call(e),r,s=[],c;try{for(;(t===void 0||t-- >0)&&!(r=a.next()).done;)s.push(r.value)}catch(v){c={error:v}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(c)throw c.error}}return s},_v=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Uv(arguments[t]));return e},fl;(function(e){e.START="bpmn:startEvent",e.END="bpmn:endEvent",e.INTERMEDIATE_CATCH="bpmn:intermediateCatchEvent",e.INTERMEDIATE_THROW="bpmn:intermediateThrowEvent",e.BOUNDARY="bpmn:boundaryEvent",e.PARALLEL_GATEWAY="bpmn:parallelGateway",e.INCLUSIVE_GATEWAY="bpmn:inclusiveGateway",e.EXCLUSIVE_GATEWAY="bpmn:exclusiveGateway",e.USER="bpmn:userTask",e.SYSTEM="bpmn:serviceTask",e.FLOW="bpmn:sequenceFlow",e.SUBPROCESS="bpmn:subProcess"})(fl||(fl={}));var oN=["-name","-id","bpmn:incoming","bpmn:outgoing","-sourceRef","-targetRef","-children"],lU=["properties","startPoint","endPoint","pointsList"],Ug={in:[],out:["properties.panels","properties.nodeSize","properties.definitionId","properties.timerValue","properties.timerType","properties.definitionType","properties.parent","properties.isBoundaryEventTouchingTask"]},iN=function(e,t){var n=Object.keys(t||{});return n.forEach(function(a){if(e[a]){var r=t[a],s=r.in,c=r.out;s&&(e[a].in=s),c&&(e[a].out=c)}else e[a]=t[a]}),e},Rs={"bpmn:startEvent":{out:function(e){var t,n,a=e.properties;return((n=(t=Rs[a.definitionType])===null||t===void 0?void 0:t.out)===null||n===void 0?void 0:n.call(t,e))||{}}},"bpmn:intermediateCatchEvent":{out:function(e){var t,n,a=e.properties;return((n=(t=Rs[a.definitionType])===null||t===void 0?void 0:t.out)===null||n===void 0?void 0:n.call(t,e))||{}}},"bpmn:intermediateThrowEvent":{out:function(e){var t,n,a=e.properties;return((n=(t=Rs[a.definitionType])===null||t===void 0?void 0:t.out)===null||n===void 0?void 0:n.call(t,e))||{}}},"bpmn:boundaryEvent":{out:function(e){var t,n,a=e.properties;return((n=(t=Rs[a.definitionType])===null||t===void 0?void 0:t.out)===null||n===void 0?void 0:n.call(t,e))||{}}},"bpmn:sequenceFlow":{out:function(e){var t=e.properties,n=t.expressionType,a=t.condition;return a?n==="cdata"?{json:'<bpmn:conditionExpression xsi:type="bpmn2
|
|||
|
|
`).forEach(function(g){s<g.length&&(s=g.length)}),n={value:a,x:Number(r["-x"])+s*10/2,y:Number(r["-y"])+7}}var c={};Object.entries(t).forEach(function(g){var _=Uv(g,2),b=_[0],x=_[1];oN.includes(b)||(c[b]=x)}),c=Wg(c);var v=e["di:waypoint"].map(function(g){return{x:Number(g["-x"]),y:Number(g["-y"])}}),f={id:t["-id"],type:fl.FLOW,pointsList:v,sourceNodeId:t["-sourceRef"],targetNodeId:t["-targetRef"],properties:c};return n&&(f.text=n),f}var Dl=(function(){function e(t){var n=this,a=t.lf;this.adapterOut=function(r,s){var c,v,f=Aw({},n.processAttributes);uU(f,r,s);var g={"-id":"BPMNPlane_1","-bpmnElement":f["-id"]};cU(g,r);var _=n.definitionAttributes;_["bpmn:process"]=f,_["bpmndi:BPMNDiagram"]={"-id":"BPMNDiagram_1","bpmndi:BPMNPlane":g};var b={"bpmn:definitions":_};if(!((c=s==null?void 0:s.mapping)===null||c===void 0)&&c.out){var x=(v=s==null?void 0:s.mapping)===null||v===void 0?void 0:v.out,S=function(A){Array.isArray(A)&&A.forEach(function(E){return S(E)}),typeof A=="object"&&Object.keys(A).forEach(function(E){var T;(T=x[E])?(A[T]=ce.cloneDeep(A[E]),delete A[E],S(A[T])):S(A[E])})};S(b)}return b},this.adapterIn=function(r,s){if(r)return fU(r,s)},a.adapterIn=this.adapterIn,a.adapterOut=this.adapterOut,this.processAttributes={"-isExecutable":"true","-id":"Process"},this.definitionAttributes={"-id":"Definitions","-xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","-xmlns:bpmn":"http://www.omg.org/spec/BPMN/20100524/MODEL","-xmlns:bpmndi":"http://www.omg.org/spec/BPMN/20100524/DI","-xmlns:dc":"http://www.omg.org/spec/DD/20100524/DC","-xmlns:di":"http://www.omg.org/spec/DD/20100524/DI","-targetNamespace":"http://logic-flow.org","-exporter":"logicflow","-exporterVersion":"1.2.10"}}return e.prototype.setCustomShape=function(t,n){e.shapeConfigMap.set(t,n)},e.pluginName="bpmn-adapter",e.shapeConfigMap=new Map,e})();Dl.shapeConfigMap.set(fl.START,{width:PS.width,height:PS.height});Dl.shapeConfigMap.set(fl.END,{width:CS.width,height:CS.height});Dl.shapeConfigMap.set(fl.INTERMEDIATE_CATCH,{width:Bg.width,height:Bg.height});Dl.shapeConfigMap.set(fl.INTERMEDIATE_THROW,{width:Bg.width,height:Bg.height});Dl.shapeConfigMap.set(fl.BOUNDARY,{width:RS.width,height:RS.height});Dl.shapeConfigMap.set(fl.PARALLEL_GATEWAY,{width:jS.width,height:jS.height});Dl.shapeConfigMap.set(fl.INCLUSIVE_GATEWAY,{width:DS.width,height:DS.height});Dl.shapeConfigMap.set(fl.EXCLUSIVE_GATEWAY,{width:IS.width,height:IS.height});Dl.shapeConfigMap.set(fl.SYSTEM,{width:LS.width,height:LS.height});Dl.shapeConfigMap.set(fl.USER,{width:$S.width,height:$S.height});Dl.shapeConfigMap.set(fl.SUBPROCESS,{width:FS.width,height:FS.height});(function(e){aU(t,e);function t(n){var a=e.call(this,n)||this;a.adapterXmlIn=function(c){var v=rU(c);return a.adapterIn(v,a.props)},a.adapterXmlOut=function(c){var v=a.adapterOut(c,a.props);return iU(v)};var r=n.lf,s=n.props;return r.adapterIn=a.adapterXmlIn,r.adapterOut=a.adapterXmlOut,a.props=s,a}return t.pluginName="BPMNAdapter",t})(Dl);var zS;(function(e){e.HORIZONTAL="horizontal",e.VERTICAL="vertical"})(zS||(zS={}));var vU=(function(){function e(t){var n=this,a=t.lf;this.__disabled=!1,this.isDefaultStopMoveGraph=!1,this.isWholeNode=!0,this.isWholeEdge=!0,this.__draw=function(s){var c=n.lf.getPointByClient(s.clientX,s.clientY).domOverlayPosition,v=c.x,f=c.y;n.endPoint={x:v,y:f};var g=n.startPoint,_=g.x,b=g.y,x=n.wrapper.style,S=_,A=b,E=v-_,T=f-b;v<_&&(S=v,E=_-v),f<b&&(A=f,T=b-f),x.left=S+"px",x.top=A+"px",x.width=E+"px",x.height=T+"px"},this.__drawOff=function(){document.removeEventListener("mousemove",n.__draw),document.removeEventListener("mouseup",n.__drawOff),n.wrapper.oncontextmenu=null,n.__domContainer.removeChild(n.wrapper);var s=n.startPoint,c=s.x,v=s.y,f=n.endPoint,g=f.x,_=f.y;if(!(Math.abs(g-c)<10&&Math.abs(_-v)<10)){var b=[Math.min(c,g),Math.min(v,_)],x=[Math.max(c,g),Math.max(v,_)],S=n.lf.graphModel.getAreaElement(b,x,n.isWholeEdge,n.isWholeNode,!0),A=n.lf.graphModel.group;S.forEach(function(E){(!A||!A.getNodeGroup(E.id))&&n.lf.selectElementById(E.id,!0)}),n.lf.emit("selection:selected",S)}},this.__zoom=function(s){var c,
|
|||
|
|
<g filter="url(#filter0_d_5119_232585)">
|
|||
|
|
<path d="M20.9998 29.8333C28.0875 29.8333 33.8332 24.0876 33.8332 17C33.8332 9.91231 28.0875 4.16663 20.9998 4.16663C13.9122 4.16663 8.1665 9.91231 8.1665 17C8.1665 24.0876 13.9122 29.8333 20.9998 29.8333Z" fill="white"/>
|
|||
|
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M20.9998 27.5C26.7988 27.5 31.4998 22.799 31.4998 17C31.4998 11.201 26.7988 6.49996 20.9998 6.49996C15.2008 6.49996 10.4998 11.201 10.4998 17C10.4998 22.799 15.2008 27.5 20.9998 27.5ZM33.8332 17C33.8332 24.0876 28.0875 29.8333 20.9998 29.8333C13.9122 29.8333 8.1665 24.0876 8.1665 17C8.1665 9.91231 13.9122 4.16663 20.9998 4.16663C28.0875 4.16663 33.8332 9.91231 33.8332 17Z" fill="#3370FF"/>
|
|||
|
|
</g>
|
|||
|
|
<defs>
|
|||
|
|
<filter id="filter0_d_5119_232585" x="-1" y="-1" width="44" height="44" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|||
|
|
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|||
|
|
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|||
|
|
<feOffset dy="4"/>
|
|||
|
|
<feGaussianBlur stdDeviation="4"/>
|
|||
|
|
<feComposite in2="hardAlpha" operator="out"/>
|
|||
|
|
<feColorMatrix type="matrix" values="0 0 0 0 0.2 0 0 0 0 0.439216 0 0 0 0 1 0 0 0 0.1 0"/>
|
|||
|
|
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_5119_232585"/>
|
|||
|
|
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_5119_232585" result="shape"/>
|
|||
|
|
</filter>
|
|||
|
|
</defs>
|
|||
|
|
</svg>
|
|||
|
|
`:`<svg width="100%" height="100%" viewBox="0 0 42 42" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|||
|
|
<g filter="url(#filter0_d_5199_166905)">
|
|||
|
|
<path d="M20.9998 29.8333C28.0875 29.8333 33.8332 24.0876 33.8332 17C33.8332 9.91231 28.0875 4.16663 20.9998 4.16663C13.9122 4.16663 8.1665 9.91231 8.1665 17C8.1665 24.0876 13.9122 29.8333 20.9998 29.8333Z" fill="#3370FF"/>
|
|||
|
|
<path d="M19.8332 11.75C19.8332 11.4278 20.0943 11.1666 20.4165 11.1666H21.5832C21.9053 11.1666 22.1665 11.4278 22.1665 11.75V15.8333H26.2498C26.572 15.8333 26.8332 16.0945 26.8332 16.4166V17.5833C26.8332 17.9055 26.572 18.1666 26.2498 18.1666H22.1665V22.25C22.1665 22.5721 21.9053 22.8333 21.5832 22.8333H20.4165C20.0943 22.8333 19.8332 22.5721 19.8332 22.25V18.1666H15.7498C15.4277 18.1666 15.1665 17.9055 15.1665 17.5833V16.4166C15.1665 16.0945 15.4277 15.8333 15.7498 15.8333H19.8332V11.75Z" fill="white"/>
|
|||
|
|
</g>
|
|||
|
|
<defs>
|
|||
|
|
<filter id="filter0_d_5199_166905" x="-1" y="-1" width="44" height="44" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|||
|
|
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|||
|
|
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|||
|
|
<feOffset dy="4"/>
|
|||
|
|
<feGaussianBlur stdDeviation="4"/>
|
|||
|
|
<feComposite in2="hardAlpha" operator="out"/>
|
|||
|
|
<feColorMatrix type="matrix" values="0 0 0 0 0.2 0 0 0 0 0.439216 0 0 0 0 1 0 0 0 0.1 0"/>
|
|||
|
|
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_5199_166905"/>
|
|||
|
|
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_5199_166905" result="shape"/>
|
|||
|
|
</filter>
|
|||
|
|
</defs>
|
|||
|
|
</svg>`}})])}setHtml(n){if(this.isMounted)this.r&&this.r.component&&(this.r.component.props.properties=this.props.model.getProperties());else{this.isMounted=!0;const a=document.createElement("div");n.appendChild(a),this.renderVueComponent(a)}}componentWillUnmount(){super.componentWillUnmount(),this.unmount()}getComponentContainer(){return this.root}targetId(){return`${this.props.graphModel.flowId}:${this.props.model.id}`}renderVueComponent(n){var s;this.unmountVueComponent(),this.root=n;const{model:a,graphModel:r}=this.props;if(n)if(Gg())lN(this.targetId(),this.component,n,a,r,void 0,this.props.graphModel.get_provide);else{this.r=kv(this.component,{properties:this.props.model.properties,nodeModel:this.props.model}),this.app=JM({render(){return this.r},provide(){return{getNode:()=>a,getGraph:()=>r,workflowMode:Is.Application}}}),this.app.use(OD,{locale:xD}),this.app.use(SD),this.app.use(AD),this.app.use(ZM);for(const[c,v]of Object.entries(MD))this.app.component(c,v);(s=this.app)==null||s.mount(n)}}unmountVueComponent(){return this.app&&(this.app.unmount(),this.app=null),this.root&&(this.root.innerHTML=""),this.root}unmount(){Gg()&&sN(this.targetId()),this.unmountVueComponent()}}class vo extends tN.model{refreshDeges(){this.incoming.edges.forEach(t=>{t.updatePathByAnchor()}),this.outgoing.edges.forEach(t=>{t.updatePathByAnchor()})}set_position(t){const{x:n,y:a}=t;n&&(this.x=n),a&&(this.y=a),this.refreshDeges()}getResizeOutlineStyle(){const t=super.getResizeOutlineStyle();return t.stroke="none",t}getControlPointStyle(){const t=super.getControlPointStyle();return t.stroke="none",t.fill="none",t}getNodeStyle(){return{overflow:"visible"}}getOutlineStyle(){const t=super.getOutlineStyle();return t.stroke="none",t.hover&&(t.hover.stroke="none"),t}getAnchorStyle(t){const n=super.getAnchorStyle(t);return t.type==="left"?(n.fill="red",n.hover&&(n.hover.fill="transparent",n.hover.stroke="transpanrent"),n.className="lf-hide-default"):n.fill="green",n}setHeight(t){const n=this.height,a=t+100;this.height=a,this.properties.height=a,this.move(0,(a-n)/2),this.outgoing.edges.forEach(r=>{r.updatePathByAnchor()}),this.incoming.edges.forEach(r=>{r.updatePathByAnchor()})}get_width(){var t;return((t=this.properties)==null?void 0:t.width)||340}setAttributes(){const{t}=ZM.global;this.width=this.get_width();const n=(r,s)=>{const c=this.graphModel.getNodeIncomingNode(r);for(const v in c){const f=c[v];if(f.id===s)return!0;if(n(f.id,s))return!0}return!1},a={message:t("views.applicationWorkflow.tip.onlyRight"),validate:(r,s,c)=>c.type==="right"};this.sourceRules.push({message:t("views.applicationWorkflow.tip.notRecyclable"),validate:(r,s,c,v)=>s.id==r.id?!1:!this.graphModel.getNodeIncomingEdge(s.id).find(_=>_.targetAnchorId==v.id&&_.sourceAnchorId==c.id)&&!n(r.id,s.id)}),this.sourceRules.push(a),this.targetRules.push({message:t("views.applicationWorkflow.tip.onlyLeft"),validate:(r,s,c,v)=>v.type==="left"})}getDefaultAnchor(){const{id:t,x:n,y:a,width:r}=this,s=this.properties.showNode===void 0?!0:this.properties.showNode,c=[];return this.type&&this.type!==nr.Base.toString()&&([nr.Start.toString(),nr.LoopStartNode.toString()].includes(this.type)||c.push({x:n-r/2+10,y:s?a:a-15,id:`${t}_left`,edgeAddable:!1,type:"left"}),c.push({x:n+r/2-10,y:s?a:a-15,id:`${t}_right`,type:"right"})),c}}let xU=class extends ho{constructor(t){super(t,yV)}};const SU={type:"ai-chat-node",model:vo,view:xU},uN=Object.freeze(Object.defineProperty({__proto__:null,default:SU},Symbol.toStringTag,{value:"Module"})),AU={class:"title-decoration-1 mb-8"},MU={class:"flex align-center"},kU={class:"mr-4"},TU=Vn({__name:"index",props:{nodeModel:{}},setup(e){const t=Li(),n=$n(()=>t.path.includes("resource-management")?"systemManage":"workspace"),a={question_reference_address:["start-node","question"],api_input_field_list:[],user_input_field_list:[],document_list:["start-node","document"],image_list:["start-node","image"],audio_list:["start-node","audio"],video_list:["start-node","video"]},r=Re(),s=$n({get:()=>(f.nodeModel.properties.node_data||ge.set(f.nodeModel.properties,"node_data
|
|||
|
|
* Sortable 1.15.6
|
|||
|
|
* @author RubaXa <trash@rubaxa.org>
|
|||
|
|
* @author owenm <owen23355@gmail.com>
|
|||
|
|
* @license MIT
|
|||
|
|
*/function HS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,a)}return n}function cc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?HS(Object(n),!0).forEach(function(a){CU(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HS(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function gg(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?gg=function(t){return typeof t}:gg=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gg(e)}function CU(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Td(){return Td=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Td.apply(this,arguments)}function RU(e,t){if(e==null)return{};var n={},a=Object.keys(e),r,s;for(s=0;s<a.length;s++)r=a[s],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}function jU(e,t){if(e==null)return{};var n=RU(e,t),a,r;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)a=s[r],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var DU="1.15.6";function Md(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var Rd=Md(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Jm=Md(/Edge/i),XS=Md(/firefox/i),Nm=Md(/safari/i)&&!Md(/chrome/i)&&!Md(/android/i),CE=Md(/iP(ad|od|hone)/i),dN=Md(/chrome/i)&&Md(/android/i),fN={capture:!1,passive:!1};function ro(e,t,n){e.addEventListener(t,n,!Rd&&fN)}function Qr(e,t,n){e.removeEventListener(t,n,!Rd&&fN)}function zg(e,t){if(t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function pN(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function wu(e,t,n,a){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&zg(e,t):zg(e,t))||a&&e===n)return e;if(e===n)break}while(e=pN(e))}return null}var qS=/\s+/g;function rs(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var a=(" "+e.className+" ").replace(qS," ").replace(" "+t+" "," ");e.className=(a+(n?" "+t:"")).replace(qS," ")}}function xr(e,t,n){var a=e&&e.style;if(a){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in a)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),a[t]=n+(typeof n=="string"?"":"px")}}function bv(e,t){var n="";if(typeof e=="string")n=e;else do{var a=xr(e,"transform");a&&a!=="none"&&(n=a+" "+n)}while(!t&&(e=e.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(n)}function hN(e,t,n){if(e){var a=e.getElementsByTagName(t),r=0,s=a.length;if(n)for(;r<s;r++)n(a[r],r);return a}return[]}function sc(){var e=document.scrollingElement;return e||document.documentElement}function Yi(e,t,n,a,r){if(!(!e.getBoundingClientRect&&e!==window)){var s,c,v,f,g,_,b;if(e!==window&&e.parentNode&&e!==sc()?(s=e.getBoundingClientRect(),c=s.top,v=s.left,f=s.bottom,g=s.right,_=s.height,b=s.width):(c=0,v=0,f=window.innerHeight,g=window.innerWidth,_=window.innerHeight,b=window.innerWidth),(t||n)&&e!==window&&(r=r||e.parentNode,!Rd))do if(r&&r.getBoundingClientRect&&(xr(r,"transform")!=="none"||n&&xr(r,"position")!=="static")){var x=r.getBoundingClientRect();c-=x.top+parseInt(xr(r,"border-top-width")),v-=x.left+parseInt(xr(r,"border-left-width")),f=c+s.height,g=v+s.width;break}while(r=r.parentNode);if(a&&e!==window){var S=bv(r||e),
|
|||
|
|
{{form}}
|
|||
|
|
${yt("views.applicationWorkflow.nodes.formNode.form_content_format2")}`,form_field_list:[]}),S=$n({get:()=>(t.nodeModel.properties.node_data||ge.set(t.nodeModel.properties,"node_data",x.value),t.nodeModel.properties.node_data),set:R=>{ge.set(t.nodeModel.properties,"node_data",R)}}),A=R=>{var U;if(R.default_value){const D=(U=R.option_list)==null?void 0:U.filter(L=>R.default_value.indexOf(L.value)>-1).map(L=>L.label).join(",");return D||R.default_value}if(R.default_value!==void 0)return R.default_value},E=()=>{var R;return(R=n.value)==null?void 0:R.validate()};function T(R){ge.set(t.nodeModel.properties.node_data,"form_content_format",R)}function I(){if(!a.value)return;const U=a.value.$el.querySelector(".el-table__body-wrapper tbody");U&&_r.create(U,{animation:150,ghostClass:"ghost-row",onEnd:D=>{if(D.oldIndex===void 0||D.newIndex===void 0)return;const L=ge.cloneDeep([...S.value.form_field_list]),[W]=L.splice(D.oldIndex,1);L.splice(D.newIndex,0,W),S.value.form_field_list=L,c()}})}return Ir(()=>{ge.set(t.nodeModel,"validate",E),c(),t.nodeModel.graphModel.eventCenter.emit("refresh_incoming_node_field")}),(R,U)=>{const D=J("AppIcon"),L=J("el-tooltip"),W=J("MdEditorMagnify"),H=J("el-form-item"),B=J("el-button"),F=J("el-table-column"),q=J("el-tag"),K=J("el-switch"),X=J("el-table"),ee=J("el-form"),ue=J("el-card");return be(),at(wo,{nodeModel:e.nodeModel},{default:P(()=>[Y("h5",$G,de(R.$t("views.applicationWorkflow.nodeSetting")),1),k(ue,{shadow:"never",class:"card-never",style:{"--el-card-padding":"12px"}},{default:P(()=>[k(ee,{onSubmit:U[4]||(U[4]=rn(()=>{},["prevent"])),model:S.value,"label-position":"top","require-asterisk-position":"right","label-width":"auto",ref_key:"formNodeFormRef",ref:n,"hide-required-asterisk":""},{default:P(()=>[k(H,{label:R.$t("views.applicationWorkflow.nodes.formNode.formContent.label"),prop:"form_content_format",rules:{required:!0,message:R.$t("views.applicationWorkflow.nodes.formNode.formContent.requiredMessage"),trigger:"blur"}},{label:P(()=>[Y("div",FG,[Y("div",BG,[Y("span",null,[et(de(R.$t("views.applicationWorkflow.nodes.formNode.formContent.label")),1),U[5]||(U[5]=Y("span",{class:"color-danger"},"*",-1))])]),k(L,{effect:"dark",placement:"right","popper-class":"max-w-200"},{content:P(()=>[et(de(R.$t("views.applicationWorkflow.nodes.formNode.formContent.tooltip",{form:"{ form }"})),1)]),default:P(()=>[k(D,{iconName:"app-warning",class:"app-warning-icon"})]),_:1})])]),default:P(()=>[k(W,{title:R.$t("views.applicationWorkflow.nodes.formNode.formContent.label"),modelValue:S.value.form_content_format,"onUpdate:modelValue":U[0]||(U[0]=ae=>S.value.form_content_format=ae),style:{height:"150px"},onSubmitDialog:T},null,8,["title","modelValue"])]),_:1},8,["label","rules"]),k(H,{label:R.$t("views.applicationWorkflow.nodes.formNode.formSetting"),onClick:U[3]||(U[3]=rn(()=>{},["prevent"]))},{label:P(()=>[Y("div",VG,[Y("h5",UG,de(R.$t("views.applicationWorkflow.nodes.formNode.formSetting")),1),k(B,{link:"",type:"primary",onClick:U[1]||(U[1]=ae=>g())},{default:P(()=>[k(D,{iconName:"app-add-outlined",class:"mr-4"}),et(" "+de(R.$t("common.add")),1)]),_:1})])]),default:P(()=>[S.value.form_field_list.length>0?(be(),at(X,{key:0,class:"border",data:S.value.form_field_list,ref_key:"tableRef",ref:a,"row-key":"field"},{default:P(()=>[k(F,{prop:"field",label:R.$t("dynamicsForm.paramForm.field.label"),width:"95"},{default:P(({row:ae})=>[Y("span",{title:ae.field,class:"ellipsis-1"},de(ae.field),9,WG)]),_:1},8,["label"]),k(F,{prop:"label",label:R.$t("dynamicsForm.paramForm.name.label")},{default:P(({row:ae})=>[ae.label&&ae.label.input_type==="TooltipLabel"?(be(),Ht("span",GG,[Y("span",{title:ae.label.label,class:"ellipsis-1"},de(ae.label.label),9,zG)])):(be(),Ht("span",HG,[Y("span",{title:ae.label,class:"ellipsis-1"},de(ae.label),9,XG)]))]),_:1},8,["label"]),k(F,{label:R.$t("dynamicsForm.paramForm.input_type.label"),width:"110px"},{default:P(({row:ae})=>[k(q,{type:"info",class:"info-tag"},{default:P(()=>{var we;return[et(de((we=_n(PD).find(je=>je.value===ae.input_type))==null?void 0:we.label),1)]}),_:2},1024)]),_:1},8,["
|
|||
|
|
"math": {
|
|||
|
|
"url": "your_server",
|
|||
|
|
"transport": "sse"
|
|||
|
|
}
|
|||
|
|
}`,LH=Vn({__name:"index",props:{nodeModel:{}},setup(e){const t=e,n=Li(),{params:{id:a}}=n,s=ha("getApplicationDetail")(),c=$n(()=>n.path.includes("resource-management")?"systemManage":"workspace"),v=Re(),f=Re(!1),g=B=>B.ctrlKey===!0?(B.preventDefault(),!0):(B.stopPropagation(),!0),_={mcp_tool:"",mcp_tools:[],mcp_servers:"",mcp_server:"",mcp_source:"referencing",mcp_tool_id:"",tool_params:{},tool_form_field:[],params_nested:""},b=Re([]);function x(B){ge.set(t.nodeModel.properties.node_data,"mcp_servers",B)}async function S(){const B=await po({type:"tool",systemType:c.value}).getToolById(D.value.mcp_tool_id,f);D.value.mcp_servers=B.data.code}function A(){if(D.value.mcp_source==="referencing"&&!D.value.mcp_tool_id){ei(yt("views.applicationWorkflow.nodes.mcpNode.mcpToolTip"));return}if(D.value.mcp_source==="referencing"&&D.value.mcp_tool_id&&!b.value.find(B=>B.id===D.value.mcp_tool_id)){ei(yt("views.applicationWorkflow.nodes.mcpNode.mcpToolTip"));return}if(D.value.mcp_source==="custom"&&!D.value.mcp_servers){ei(yt("views.applicationWorkflow.nodes.mcpNode.mcpServerTip"));return}try{JSON.parse(D.value.mcp_servers);const B=I(D.value.mcp_servers);if(B.length>0){T.value.open(B);return}}catch{ei(yt("views.applicationWorkflow.nodes.mcpNode.mcpServerTip"));return}E(D.value.mcp_servers)}function E(B){po({type:"application",systemType:c.value}).getMcpTools(a,B,f).then(F=>{var q;D.value.mcp_tools=F.data,zf(yt("views.applicationWorkflow.nodes.mcpNode.getToolsSuccess")),D.value.mcp_server=(q=D.value.mcp_tools.find(K=>K.name===D.value.mcp_tool))==null?void 0:q.server})}const T=Re();function I(B){const F=/\{\{\s*([a-zA-Z_][\w.]*)\s*\}\}/g,q=new Set,K=X=>{if(typeof X=="string"){let ee;for(;(ee=F.exec(X))!==null;)q.add(ee[1])}else Array.isArray(X)?X.forEach(K):X&&typeof X=="object"&&Object.values(X).forEach(K)};if(typeof B=="string")try{K(JSON.parse(B))}catch{K(B)}else K(B);return[...q]}function R(B){let F=D.value.mcp_servers;for(const q in B)F=F.replace(`{{${q}}}`,B[q]);E(F)}function U(){var F,q,K,X,ee,ue;D.value.mcp_server=(F=D.value.mcp_tools.find(ae=>ae.name===D.value.mcp_tool))==null?void 0:F.server;const B=(q=D.value.mcp_tools.find(ae=>ae.name===D.value.mcp_tool))==null?void 0:q.args_schema;D.value.tool_form_field=[];for(const ae in B==null?void 0:B.properties){const we=B==null?void 0:B.properties[ae].properties;if(we){D.value.params_nested=ae;for(const je in we){let Te="TextInput";we[je].type==="string"?Te="TextInput":we[je].type==="number"?Te="NumberInput":we[je].type==="boolean"?Te="SwitchInput":(we[je].type==="array"||we[je].type==="object")&&(Te="JsonInput"),D.value.tool_form_field.push({field:je,label:{input_type:"TooltipLabel",label:je,attrs:{tooltip:we[je].description},props_info:{}},input_type:Te,source:"referencing",required:((K=B.properties[ae].required)==null?void 0:K.indexOf(je))!==-1,props_info:{rules:[{required:((X=B.properties[ae].required)==null?void 0:X.indexOf(je))!==-1,message:yt("dynamicsForm.tip.requiredMessage"),trigger:"blur"}]}})}}else{D.value.params_nested="";let je="TextInput";B.properties[ae].type==="string"?je="TextInput":B.properties[ae].type==="number"?je="NumberInput":B.properties[ae].type==="boolean"?je="SwitchInput":(B.properties[ae].type==="array"||B.properties[ae].type==="object")&&(je="JsonInput"),D.value.tool_form_field.push({field:ae,label:{input_type:"TooltipLabel",label:ae,attrs:{tooltip:B.properties[ae].description},props_info:{}},input_type:je,source:"referencing",required:((ee=B.required)==null?void 0:ee.indexOf(ae))!==-1,props_info:{rules:[{required:((ue=B.required)==null?void 0:ue.indexOf(ae))!==-1,message:yt("dynamicsForm.tip.requiredMessage"),trigger:"blur"}]}})}}D.value.params_nested?D.value.tool_params={[D.value.params_nested]:{}}:D.value.tool_params={}}const D=$n({get:()=>(t.nodeModel.properties.node_data||ge.set(t.nodeModel.properties,"node_data",_),t.nodeModel.properties.node_data),set:B=>{ge.set(t.nodeModel.properties,"node_data",B)}}),L=Re(),W=async()=>{if(v.value){const B=D.value.tool_form_field.filter(F=>F.required).map(F=>F.label.label);if(B.length>0){for(const F of B)if(D.valu
|
|||
|
|
`,r);return}throw r}n(" updateInputGraph",()=>{oJ(e,a)})})},nJ=(e,t,n)=>{t(" removeSelfEdges",()=>{wJ(e)}),t(" acyclic",()=>{dA.run(e)}),t(" nestingGraph.run",()=>{yA.run(e)}),t(" rank",()=>{uZ(rP(e))}),t(" injectEdgeLabelProxies",()=>{pJ(e)}),t(" removeEmptyRanks",()=>{WK(e)}),t(" nestingGraph.cleanup",()=>{yA.cleanup(e)}),t(" normalizeRanks",()=>{UK(e)}),t(" assignRankMinMax",()=>{hJ(e)}),t(" removeEdgeLabelProxies",()=>{vJ(e)}),t(" normalize.run",()=>{hA.run(e)}),t(" parentDummyChains",()=>{hZ(e)}),t(" addBorderSegments",()=>{_Z(e)}),n&&n.keepNodeOrder&&t(" initDataOrder",()=>{eJ(e,n.nodeOrder)}),t(" order",()=>{LZ(e,n==null?void 0:n.keepNodeOrder)}),t(" insertSelfEdges",()=>{EJ(e)}),t(" adjustCoordinateSystem",()=>{bA.adjust(e)}),t(" position",()=>{QZ(e)}),t(" positionSelfEdges",()=>{OJ(e)}),t(" removeBorderNodes",()=>{bJ(e)}),t(" normalize.undo",()=>{hA.undo(e)}),t(" fixupEdgeLabelCoords",()=>{gJ(e)}),t(" undoCoordinateSystem",()=>{bA.undo(e)}),t(" translateGraph",()=>{mJ(e)}),t(" assignNodeIntersects",()=>{yJ(e)}),t(" reversePoints",()=>{_J(e)}),t(" acyclic.undo",()=>{dA.undo(e)})},rJ=(e,t)=>{e.nodes().forEach(n=>{const a=e.node(n),r=t.node(n);r!==void 0?(a.fixorder=r._order,delete r._order):delete a.fixorder})},oJ=(e,t)=>{e.nodes().forEach(n=>{var a;const r=e.node(n);if(r){const s=t.node(n);r.x=s.x,r.y=s.y,r._order=s.order,r._rank=s.rank,!((a=t.children(n))===null||a===void 0)&&a.length&&(r.width=s.width,r.height=s.height)}}),e.edges().forEach(n=>{const a=e.edge(n),r=t.edge(n);a.points=r?r.points:[],r&&r.hasOwnProperty("x")&&(a.x=r.x,a.y=r.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height},iJ=["nodesep","edgesep","ranksep","marginx","marginy"],aJ={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},D1=["acyclicer","ranker","rankdir","align"],lJ=["width","height","layer","fixorder"],sJ={width:0,height:0},uJ=["minlen","weight","width","height","labeloffset"],cJ={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},I1=["labelpos"],dJ=e=>{const t=new Nd({multigraph:!0,compound:!0}),n=$1(e.graph()),a={};return D1==null||D1.forEach(r=>{n[r]!==void 0&&(a[r]=n[r])}),t.setGraph(Object.assign({},aJ,L1(n,iJ),a)),e.nodes().forEach(r=>{const s=$1(e.node(r)),c=Object.assign(Object.assign({},sJ),s),v=L1(c,lJ);t.setNode(r,v),t.setParent(r,e.parent(r))}),e.edges().forEach(r=>{const s=$1(e.edge(r)),c={};I1==null||I1.forEach(v=>{s[v]!==void 0&&(c[v]=s[v])}),t.setEdgeObj(r,Object.assign({},cJ,L1(s,uJ),c))}),t},fJ=e=>{const t=e.graph();t.ranksep||(t.ranksep=0),t.ranksep/=2,e.nodes().forEach(n=>{const a=e.node(n);isNaN(a.layer)||a.layer||(a.layer=0)}),e.edges().forEach(n=>{var a;const r=e.edge(n);r.minlen*=2,((a=r.labelpos)===null||a===void 0?void 0:a.toLowerCase())!=="c"&&(t.rankdir==="TB"||t.rankdir==="BT"?r.width+=r.labeloffset:r.height+=r.labeloffset)})},pJ=e=>{e.edges().forEach(t=>{const n=e.edge(t);if(n.width&&n.height){const a=e.node(t.v),r=e.node(t.w),s={e:t,rank:(r.rank-a.rank)/2+a.rank};Wv(e,"edge-proxy",s,"_ep")}})},hJ=e=>{let t=0;e.nodes().forEach(n=>{var a,r;const s=e.node(n);s.borderTop&&(s.minRank=(a=e.node(s.borderTop))===null||a===void 0?void 0:a.rank,s.maxRank=(r=e.node(s.borderBottom))===null||r===void 0?void 0:r.rank,t=Math.max(t,s.maxRank||-1/0))}),e.graph().maxRank=t},vJ=e=>{e.nodes().forEach(t=>{const n=e.node(t);n.dummy==="edge-proxy"&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})},mJ=e=>{let t,n=0,a,r=0;const s=e.graph(),c=s.marginx||0,v=s.marginy||0,f=g=>{if(!g)return;const _=g.x,b=g.y,x=g.width,S=g.height;!isNaN(_)&&!isNaN(x)&&(t===void 0&&(t=_-x/2),t=Math.min(t,_-x/2),n=Math.max(n,_+x/2)),!isNaN(b)&&!isNaN(S)&&(a===void 0&&(a=b-S/2),a=Math.min(a,b-S/2),r=Math.max(r,b+S/2))};e.nodes().forEach(g=>{f(e.node(g))}),e.edges().forEach(g=>{const _=e.edge(g);_!=null&&_.hasOwnProperty("x")&&f(_)}),t-=c,a-=v,e.nodes().forEach(g=>{const _=e.node(g);_&&(_.x-=t,_.y-=a)}),e.edges().forEach(g=>{var _;const b=e.edge(g);(_=b.points)===null||_===void 0||_.forEach(x=>{x.x-=t,x.y-=a}),b.hasOwnProperty("x")&&(b.x-=t),b
|
|||
|
|
`;function s(G){return typeof atob<"u"?atob(G):"base64:"+G}function c(G){var se=new Error("(regl) "+G);throw console.error(se),se}function v(G,se){G||c(se)}function f(G){return G?": "+G:""}function g(G,se,Oe){G in se||c("unknown parameter ("+G+")"+f(Oe)+". possible values: "+Object.keys(se).join())}function _(G,se){n(G)||c("invalid parameter type"+f(se)+". must be a typed array")}function b(G,se){switch(se){case"number":return typeof G=="number";case"object":return typeof G=="object";case"string":return typeof G=="string";case"boolean":return typeof G=="boolean";case"function":return typeof G=="function";case"undefined":return typeof G>"u";case"symbol":return typeof G=="symbol"}}function x(G,se,Oe){b(G,se)||c("invalid parameter type"+f(Oe)+". expected "+se+", got "+typeof G)}function S(G,se){G>=0&&(G|0)===G||c("invalid parameter type, ("+G+")"+f(se)+". must be a nonnegative integer")}function A(G,se,Oe){se.indexOf(G)<0&&c("invalid value"+f(Oe)+". must be one of: "+se)}var E=["gl","canvas","container","attributes","pixelRatio","extensions","optionalExtensions","profile","onDone"];function T(G){Object.keys(G).forEach(function(se){E.indexOf(se)<0&&c('invalid regl constructor argument "'+se+'". must be one of '+E)})}function I(G,se){for(G=G+"";G.length<se;)G=" "+G;return G}function R(){this.name="unknown",this.lines=[],this.index={},this.hasErrors=!1}function U(G,se){this.number=G,this.line=se,this.errors=[]}function D(G,se,Oe){this.file=G,this.line=se,this.message=Oe}function L(){var G=new Error,se=(G.stack||G).toString(),Oe=/compileProcedure.*\n\s*at.*\((.*)\)/.exec(se);if(Oe)return Oe[1];var ut=/compileProcedure.*\n\s*at\s+(.*)(\n|$)/.exec(se);return ut?ut[1]:"unknown"}function W(){var G=new Error,se=(G.stack||G).toString(),Oe=/at REGLCommand.*\n\s+at.*\((.*)\)/.exec(se);if(Oe)return Oe[1];var ut=/at REGLCommand.*\n\s+at\s+(.*)\n/.exec(se);return ut?ut[1]:"unknown"}function H(G,se){var Oe=G.split(`
|
|||
|
|
`),ut=1,gt=0,ot={unknown:new R,0:new R};ot.unknown.name=ot[0].name=se||L(),ot.unknown.lines.push(new U(0,""));for(var mt=0;mt<Oe.length;++mt){var Rt=Oe[mt],Bt=/^\s*#\s*(\w+)\s+(.+)\s*$/.exec(Rt);if(Bt)switch(Bt[1]){case"line":var jt=/(\d+)(\s+\d+)?/.exec(Bt[2]);jt&&(ut=jt[1]|0,jt[2]&&(gt=jt[2]|0,gt in ot||(ot[gt]=new R)));break;case"define":var ht=/SHADER_NAME(_B64)?\s+(.*)$/.exec(Bt[2]);ht&&(ot[gt].name=ht[1]?s(ht[2]):ht[2]);break}ot[gt].lines.push(new U(ut++,Rt))}return Object.keys(ot).forEach(function(Kt){var Gt=ot[Kt];Gt.lines.forEach(function(Dt){Gt.index[Dt.number]=Dt})}),ot}function B(G){var se=[];return G.split(`
|
|||
|
|
`).forEach(function(Oe){if(!(Oe.length<5)){var ut=/^ERROR:\s+(\d+):(\d+):\s*(.*)$/.exec(Oe);ut?se.push(new D(ut[1]|0,ut[2]|0,ut[3].trim())):Oe.length>0&&se.push(new D("unknown",0,Oe))}}),se}function F(G,se){se.forEach(function(Oe){var ut=G[Oe.file];if(ut){var gt=ut.index[Oe.line];if(gt){gt.errors.push(Oe),ut.hasErrors=!0;return}}G.unknown.hasErrors=!0,G.unknown.lines[0].errors.push(Oe)})}function q(G,se,Oe,ut,gt){if(!G.getShaderParameter(se,G.COMPILE_STATUS)){var ot=G.getShaderInfoLog(se),mt=ut===G.FRAGMENT_SHADER?"fragment":"vertex";je(Oe,"string",mt+" shader source must be a string",gt);var Rt=H(Oe,gt),Bt=B(ot);F(Rt,Bt),Object.keys(Rt).forEach(function(jt){var ht=Rt[jt];if(!ht.hasErrors)return;var Kt=[""],Gt=[""];function Dt(At,Ze){Kt.push(At),Gt.push(Ze||"")}Dt("file number "+jt+": "+ht.name+`
|
|||
|
|
`,"color:red;text-decoration:underline;font-weight:bold"),ht.lines.forEach(function(At){if(At.errors.length>0){Dt(I(At.number,4)+"| ","background-color:yellow; font-weight:bold"),Dt(At.line+r,"color:red; background-color:yellow; font-weight:bold");var Ze=0;At.errors.forEach(function(pt){var $t=pt.message,tn=/^\s*'(.*)'\s*:\s*(.*)$/.exec($t);if(tn){var kt=tn[1];switch($t=tn[2],kt){case"assign":kt="=";break}Ze=Math.max(At.line.indexOf(kt,Ze),0)}else Ze=0;Dt(I("| ",6)),Dt(I("^^^",Ze+3)+r,"font-weight:bold"),Dt(I("| ",6)),Dt($t+r,"font-weight:bold")}),Dt(I("| ",6)+r)}else Dt(I(At.number,4)+"| "),Dt(At.line+r,"color:red")}),typeof document<"u"&&!window.chrome?(Gt[0]=Kt.join("%c"),console.log.apply(console,Gt)):console.log(Kt.join(""))}),v.raise("Error compiling "+mt+" shader, "+Rt[0].name)}}function K(G,se,Oe,ut,gt){if(!G.getProgramParameter(se,G.LINK_STATUS)){var ot=G.getProgramInfoLog(se),mt=H(Oe,gt),Rt=H(ut,gt),Bt='Error linking program with vertex shader, "'+Rt[0].name+'", and fragment shader "'+mt[0].name+'"';typeof document<"u"?console.log("%c"+Bt+r+"%c"+ot,"color:red;text-decoration:underline;font-weight:bold","color:red"):console.log(Bt+r+ot),v.raise(Bt)}}function X(G){G._commandRef=L()}function ee(G,se,Oe,ut){X(G);function gt(Bt){return Bt?ut.id(Bt):0}G._fragId=gt(G.static.frag),G._vertId=gt(G.static.vert);function ot(Bt,jt){Object.keys(jt).forEach(function(ht){Bt[ut.id(ht)]=!0})}var mt=G._uniformSet={};ot(mt,se.static),ot(mt,se.dynamic);var Rt=G._attributeSet={};ot(Rt,Oe.static),ot(Rt,Oe.dynamic),G._hasCount="count"in G.static||"count"in G.dynamic||"elements"in G.static||"elements"in G.dynamic}function ue(G,se){var Oe=W();c(G+" in command "+(se||L())+(Oe==="unknown"?"":" called from "+Oe))}function ae(G,se,Oe){G||ue(se,Oe||L())}function we(G,se,Oe,ut){G in se||ue("unknown parameter ("+G+")"+f(Oe)+". possible values: "+Object.keys(se).join(),ut||L())}function je(G,se,Oe,ut){b(G,se)||ue("invalid parameter type"+f(Oe)+". expected "+se+", got "+typeof G,ut||L())}function Te(G){G()}function Me(G,se,Oe){G.texture?A(G.texture._texture.internalformat,se,"unsupported texture format for attachment"):A(G.renderbuffer._renderbuffer.format,Oe,"unsupported renderbuffer format for attachment")}var Ne=33071,rt=9728,tt=9984,Be=9985,lt=9986,St=9987,He=5120,Jt=5121,Fe=5122,me=5123,Le=5124,Ye=5125,Ot=5126,bt=32819,Ft=32820,Qt=33635,on=34042,Wt=36193,nt={};nt[He]=nt[Jt]=1,nt[Fe]=nt[me]=nt[Wt]=nt[Qt]=nt[bt]=nt[Ft]=2,nt[Le]=nt[Ye]=nt[Ot]=nt[on]=4;function sn(G,se){return G===Ft||G===bt||G===Qt?2:G===on?4:nt[G]*se}function We(G){return!(G&G-1)&&!!G}function yn(G,se,Oe){var ut,gt=se.width,ot=se.height,mt=se.channels;v(gt>0&><=Oe.maxTextureSize&&ot>0&&ot<=Oe.maxTextureSize,"invalid texture shape"),(G.wrapS!==Ne||G.wrapT!==Ne)&&v(We(gt)&&We(ot),"incompatible wrap mode for texture, both width and height must be power of 2"),se.mipmask===1?gt!==1&&ot!==1&&v(G.minFilter!==tt&&G.minFilter!==lt&&G.minFilter!==Be&&G.minFilter!==St,"min filter requires mipmap"):(v(We(gt)&&We(ot),"texture must be a square power of 2 to support mipmapping"),v(se.mipmask===(gt<<1)-1,"missing or incomplete mipmap data")),se.type===Ot&&(Oe.extensions.indexOf("oes_texture_float_linear")<0&&v(G.minFilter===rt&&G.magFilter===rt,"filter not supported, must enable oes_texture_float_linear"),v(!G.genMipmaps,"mipmap generation not supported with float textures"));var Rt=se.images;for(ut=0;ut<16;++ut)if(Rt[ut]){var Bt=gt>>ut,jt=ot>>ut;v(se.mipmask&1<<ut,"missing mipmap data");var ht=Rt[ut];if(v(ht.width===Bt&&ht.height===jt,"invalid shape for mip images"),v(ht.format===se.format&&ht.internalformat===se.internalformat&&ht.type===se.type,"incompatible type for mip image"),!ht.compressed)if(ht.data){var Kt=Math.ceil(sn(ht.type,mt)*Bt/ht.unpackAlignment)*ht.unpackAlignment;v(ht.data.byteLength===Kt*jt,"invalid data for image, buffer size is inconsistent with image format")}else ht.element||ht.copy}else G.genMipmaps||v((se.mipmask&1<<ut)===0,"extra mipmap data");se.compressed&&v(!G.genMipmaps,"mipmap generation for compressed images not supported")}function Kn(G,se,Oe,ut){var gt
|
|||
|
|
`).replace(/}/g,`}
|
|||
|
|
`).replace(/{/g,`{
|
|||
|
|
`),Dt=Function.apply(null,se.concat(Gt));return Dt.apply(null,Oe)}return{global:Rt,link:ut,block:gt,proc:jt,scope:ot,cond:mt,compile:ht}}var Xl="xyzw".split(""),Js=5121,Qs=1,eu=2,ff=0,ql=1,tu=2,pf=3,nl=4,zc=5,Hc=6,Vu="dither",Uu="blend.enable",Wu="blend.color",hf="blend.equation",Gu="blend.func",Ep="depth.enable",vf="depth.func",Nh="depth.range",Op="depth.mask",rl="colorMask",xp="cull.enable",Sp="cull.face",Ap="frontFace",zu="lineWidth",xl="polygonOffset.enable",Xc="polygonOffset.offset",mf="sample.alpha",yf="sample.enable",gs="sample.coverage",_s="stencil.enable",rr="stencil.mask",Hu="stencil.func",qc="stencil.opFront",ol="stencil.opBack",di="scissor.enable",nu="scissor.box",Do="viewport",bs="profile",ta="framebuffer",Yc="vert",Ii="frag",Ho="elements",Sl="primitive",Al="count",gf="offset",Ct="instances",ru="vao",Kc="Width",Zc="Height",ws=ta+Kc,ou=ta+Zc,_f=Do+Kc,Mp=Do+Zc,iu="drawingBuffer",Jc=iu+Kc,bf=iu+Zc,kp=[Gu,hf,Hu,qc,ol,gs,Do,nu,Xc],Ml=34962,Tp=34963,il=35632,Es=35633,wf=3553,Ph=34067,Ch=2884,Rh=3042,Np=3024,Ef=2960,Qc=2929,jh=3089,al=32823,Os=32926,Qv=32928,xo=5126,ed=35664,au=35665,td=35666,Xu=5124,nd=35667,rd=35668,od=35669,lu=35670,Yl=35671,gi=35672,Of=35673,id=35674,su=35675,qu=35676,Si=35678,Po=35680,ad=4,Hi=1028,Wn=1029,xf=2304,ld=2305,Sf=32775,Pp=32776,Dh=519,xs=7680,Ih=0,uu=1,Lh=32774,Cp=513,sd=36160,$h=36064,$a={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Kl=["constant color, constant alpha","one minus constant color, constant alpha","constant color, one minus constant alpha","one minus constant color, one minus constant alpha","constant alpha, constant color","constant alpha, one minus constant color","one minus constant alpha, constant color","one minus constant alpha, one minus constant color"],Ss={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},zn={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Rp={frag:il,vert:Es},Yu={cw:xf,ccw:ld};function Zl(G){return Array.isArray(G)||n(G)||$i(G)}function ud(G){return G.sort(function(se,Oe){return se===Do?-1:Oe===Do?1:se<Oe?-1:1})}function Xi(G,se,Oe,ut){this.thisDep=G,this.contextDep=se,this.propDep=Oe,this.append=ut}function ll(G){return G&&!(G.thisDep||G.contextDep||G.propDep)}function Io(G){return new Xi(!1,!1,!1,G)}function ua(G,se){var Oe=G.type;if(Oe===ff){var ut=G.data.length;return new Xi(!0,ut>=1,ut>=2,se)}else if(Oe===nl){var gt=G.data;return new Xi(gt.thisDep,gt.contextDep,gt.propDep,se)}else{if(Oe===zc)return new Xi(!1,!1,!1,se);if(Oe===Hc){for(var ot=!1,mt=!1,Rt=!1,Bt=0;Bt<G.data.length;++Bt){var jt=G.data[Bt];if(jt.type===ql)Rt=!0;else if(jt.type===tu)mt=!0;else if(jt.type===pf)ot=!0;else if(jt.type===ff){ot=!0;var ht=jt.data;ht>=1&&(mt=!0),ht>=2&&(Rt=!0)}else jt.type===nl&&(ot=ot||jt.data.thisDep,mt=mt||jt.data.contextDep,Rt=Rt||jt.data.propDep)}return new Xi(ot,mt,Rt,se)}else return new Xi(Oe===pf,Oe===tu,Oe===ql,se)}}var Fa=new Xi(!1,!1,!1,function(){});function em(G,se,Oe,ut,gt,ot,mt,Rt,Bt,jt,ht,Kt,Gt,Dt,At){var Ze=jt.Record,pt={add:32774,subtract:32778,"reverse subtract":32779};Oe.ext_blend_minmax&&(pt.min=Sf,pt.max=Pp);var $t=Oe.angle_instanced_arrays,tn=Oe.webgl_draw_buffers,kt={dirty:!0,profile:At.profile},ln={},Nt=[],qt={},Tt={};function Zt(he){return he.replace(".","_")}function Cn(he,oe,Pe){var Ge=Zt(he);Nt.push(he),ln[Ge]=kt[Ge]=!!Pe,qt[Ge]=oe}function Hn(he,oe,Pe){var Ge=Zt(he);Nt.push(he),Array.isArray(Pe)?(kt[Ge]=Pe.slice(),ln[Ge]=Pe.slice()):kt[Ge]=ln[Ge]=Pe,Tt[Ge]=oe}Cn(Vu,Np),Cn(Uu,Rh),Hn(Wu,"blendColor",[0,0,0,0]),Hn(hf,"blendEquationSeparate",[Lh,Lh]),Hn(Gu,"blendFuncSeparate",[uu,Ih,uu,Ih]),Cn(Ep,Qc,!0),Hn(vf,"depthFunc",Cp),Hn(Nh,"depthRange",[0,1]),Hn(Op,"
|