216 lines
1.9 MiB
JavaScript
216 lines
1.9 MiB
JavaScript
|
|
var p$=Object.defineProperty;var h$=(t,e,n)=>e in t?p$(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var hs=(t,e,n)=>h$(t,typeof e!="symbol"?e+"":e,n);import{dr as Pg,eP as Jc,dn as zo,eQ as IN,db as tm,eR as G_,eS as sp,eT as nm,eU as Qy,eV as qu,ef as qd,dc as qa,eW as v$,dd as Kd,ea as hj,eX as m$,eY as z_,eZ as Ju,e6 as OE,e8 as N2,dk as rm,au as Zd,e_ as om,e$ as im,eg as Kg,f0 as P2,di as Yo,f1 as SE,dM as AE,ee as lp,dS as Ri,f2 as kg,dj as Nh,f3 as Zg,f4 as H_,dR as Jd,dh as El,df as _i,f5 as g$,f6 as vj,eE as Qu,ed as js,f7 as y$,f8 as _$,f9 as Jg,fa as ME,fb as mj,dL as am,fc as gj,bL as ec,dg as X_,at as Ph,dQ as w_,dO as Hv,e9 as b$,ec as FN,eb as w$,as as yj,fd as _j,fe as E$,dm as TE,de as x$,ei as lw,ff as O$,fg as bj,fh as wj,fi as S$,fj as Ej,fk as A$,dp as M$,fl as T$,fm as C$,fn as N$,fo as uw,fp as P$,el as k$,fq as xj,dN as Oj,eh as k2,fr as Sj,fs as R2,ft as R$,dl as Y_,fu as Aj,fv as D$,fw as Mj,fx as Tj,fy as j$,fz as L$,fA as I$,em as E_,eC as F$,fB as B$,fC as $$,aw as U$,fD as V$,fE as W$,fF as D2,fG as G$,fH as Cj,fI as z$,fJ as H$,ai as X$,eF as to,fK as Y$,ax as cw,fL as uA,fM as q$,fN as K$,fO as wl,fP as Z$,fQ as J$,av as Xv,fR as Q$,eG as Yv,fS as e7,eD as Vv,fT as Nj,fU as t7,fV as n7,fW as r7,ay as _r,aB as He,aV as q_,aD as ne,aE as Ne,aW as mn,aX as Ir,aH as P,aI as ee,aY as No,aF as bt,aG as j,b2 as Wn,c$ as cA,bX as mh,dw as BN,aJ as _e,bY as j2,aK as ft,b1 as Bn,aS as gn,cf as kh,fX as Qs,aQ as ja,aA as Pj,aN as Hd,aO as hr,aP as kj,b6 as bo,b8 as Js,bc as Rj,ch as Eh,cq as dw,fY as fw,bW as l0,aT as oi,aZ as Me,b7 as Rg,ce as Gl,cF as Dj,cj as x_,c1 as Xi,aC as kt,c0 as L2,aM as Pr,fZ as CE,ci as bl,d5 as K_,bB as Dg,aU as Rh,f_ as o7,f$ as i7,g0 as jj,g1 as Lj,g2 as a7,g3 as s7,g4 as l7,g5 as u7,g6 as c7,g7 as Go,du as I2,dv as d7,cu as f7,bD as xh,dJ as p7,b3 as Oh,g8 as yu,cJ as h7,g9 as $N,ga as Lv,gb as v7,gc as F2,gd as B2,ge as m7,gf as g7,b4 as Ij,bZ as dA,az as y7,er as UN,cY as _7,bG as Qf,bH as Vl,bI as Ic,bK as Xs,bJ as lh}from"./admin-CnH_8TZZ.js";import{g as b7,t as VN,a as WN,i as Qd,n as w7,c as $2,l as u0,d as E7}from"./data-cu6BW6ua.js";import{_ as dp}from"./AIModeParamSettingDialog.vue_vue_type_script_setup_true_lang-BZr4rym-.js";import{G as U2,d as x7,e as O7,f as S7,_ as Fj,c as Bj,b as A7,a as M7}from"./ToolDialog.vue_vue_type_style_index_0_lang-oOSZB_a-.js";import{d as $j,c as sm,v as Z_,e as T7,g as Uj,f as C7,a as ri,r as Vj}from"./reduce-DpYeC9an.js";import{c as N7,a as P7,b as k7,e as Wj,f as Sh,m as R7,d as D7,h as pw}from"./min-Crc9rp_P.js";import{c as V2,b as NE,i as W2,p as Gj,n as G2,a as j7,d as z2,e as L7,f as I7,g as F7,h as B7,u as $7,j as U7,k as V7,l as zj,m as W7,r as G7,o as z7,q as H7,s as X7,t as Xo}from"./uniqBy-CdVnY9Au.js";import{d as Hj,e as Y7,g as q7,h as K7,i as Z7,z as J7,s as Q7,m as e9,a as t9,b as n9,f as r9,c as o9,r as i9,u as a9}from"./zipObject-SY87gjXg.js";import{l as Xj,_ as Yj}from"./vue-draggable-plus-BxeEefwL.js";import{_ as s9}from"./FieldFormDialog.vue_vue_type_script_setup_true_lang-BVTxG_wc.js";import{_ as Fn}from"./defineProperty-DbXIQDXj.js";import"./typeof-QjJsDpFa.js";const qj=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Kme}},Symbol.toStringTag,{value:"Module"}));var l9=NaN;function GN(t){return typeof t=="number"?t:Pg(t)?l9:+t}function PE(t,e){return function(n,o){var r;if(n===void 0&&o===void 0)return e;if(n!==void 0&&(r=n),o!==void 0){if(r===void 0)return o;typeof n=="string"||typeof o=="string"?(n=Jc(n),o=Jc(o)):(n=GN(n),o=GN(o)),r=t(n,o)}return r}}var u9=PE(function(t,e){return t+e},0),c9="Expected a function";function d9(t,e){if(typeof e!="function")throw new TypeError(c9);return t=zo(t),function(){if(--t<1)return e.apply(this,arguments)}}var hw=IN&&new IN,Kj=hw?function(t,e){return hw.set(t,e),t}:tm;function O_(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4
|
|||
|
|
/* [wrapped with `+e+`] */
|
|||
|
|
`)}var M9=1,T9=2,C9=8,N9=16,P9=32,k9=64,R9=128,D9=256,j9=512,L9=[["ary",R9],["bind",M9],["bindKey",T9],["curry",C9],["curryRight",N9],["flip",j9],["partial",P9],["partialRight",k9],["rearg",D9]];function I9(t,e){return Kd(L9,function(n){var o="_."+n[0];e&n[1]&&!hj(t,o)&&t.push(o)}),t.sort()}function tL(t,e,n){var o=e+"";return m$(t,A9(o,I9(O9(o),n)))}var F9=4,B9=8,zN=32,HN=64;function nL(t,e,n,o,r,i,a,l,s,f){var h=e&B9,v=h?a:void 0,b=h?void 0:a,w=h?i:void 0,O=h?void 0:i;e|=h?zN:HN,e&=~(h?HN:zN),e&F9||(e&=-4);var E=[t,e,r,w,v,O,b,l,s,f],S=n.apply(void 0,E);return fA(t)&&eL(S,E),S.placeholder=o,tL(S,t,e)}function Qg(t){var e=t;return e.placeholder}var $9=Math.min;function U9(t,e){for(var n=t.length,o=$9(e.length,n),r=qu(t);o--;){var i=e[o];t[o]=z_(i,n)?r[i]:void 0}return t}var XN="__lodash_placeholder__";function Ah(t,e){for(var n=-1,o=t.length,r=0,i=[];++n<o;){var a=t[n];(a===e||a===XN)&&(t[n]=XN,i[r++]=n)}return i}var V9=1,W9=2,G9=8,z9=16,H9=128,X9=512;function RE(t,e,n,o,r,i,a,l,s,f){var h=e&H9,v=e&V9,b=e&W9,w=e&(G9|z9),O=e&X9,E=b?void 0:O_(t);function S(){for(var M=arguments.length,C=Array(M),$=M;$--;)C[$]=arguments[$];if(w)var D=Qg(S),k=m9(C,D);if(o&&(C=Zj(C,o,r,w)),i&&(C=Jj(C,i,a,w)),M-=k,w&&M<f){var B=Ah(C,D);return nL(t,e,RE,S.placeholder,n,C,B,l,s,f-M)}var F=v?n:this,I=b?F[t]:t;return M=C.length,l?C=U9(C,l):O&&M>1&&C.reverse(),h&&s<M&&(C.length=s),this&&this!==nm&&this instanceof S&&(I=E||O_(I)),I.apply(F,C)}return S}function Y9(t,e,n){var o=O_(t);function r(){for(var i=arguments.length,a=Array(i),l=i,s=Qg(r);l--;)a[l]=arguments[l];var f=i<3&&a[0]!==s&&a[i-1]!==s?[]:Ah(a,s);if(i-=f.length,i<n)return nL(t,e,RE,r.placeholder,void 0,a,f,void 0,void 0,n-i);var h=this&&this!==nm&&this instanceof r?o:t;return Ju(h,this,a)}return r}var q9=1;function K9(t,e,n,o){var r=e&q9,i=O_(t);function a(){for(var l=-1,s=arguments.length,f=-1,h=o.length,v=Array(h+s),b=this&&this!==nm&&this instanceof a?i:t;++f<h;)v[f]=o[f];for(;s--;)v[f++]=arguments[++l];return Ju(b,r?n:this,v)}return a}var YN="__lodash_placeholder__",YO=1,Z9=2,J9=4,qN=8,jy=128,KN=256,Q9=Math.min;function eU(t,e){var n=t[1],o=e[1],r=n|o,i=r<(YO|Z9|jy),a=o==jy&&n==qN||o==jy&&n==KN&&t[7].length<=e[8]||o==(jy|KN)&&e[7].length<=e[8]&&n==qN;if(!(i||a))return t;o&YO&&(t[2]=e[2],r|=n&YO?0:J9);var l=e[3];if(l){var s=t[3];t[3]=s?Zj(s,l,e[4]):l,t[4]=s?Ah(t[3],YN):e[4]}return l=e[5],l&&(s=t[5],t[5]=s?Jj(s,l,e[6]):l,t[6]=s?Ah(t[5],YN):e[6]),l=e[7],l&&(t[7]=l),o&jy&&(t[8]=t[8]==null?e[8]:Q9(t[8],e[8])),t[9]==null&&(t[9]=e[9]),t[0]=e[0],t[1]=r,t}var tU="Expected a function",ZN=1,nU=2,JN=8,QN=16,eP=32,rU=64,tP=Math.max;function fp(t,e,n,o,r,i,a,l){var s=e&nU;if(!s&&typeof t!="function")throw new TypeError(tU);var f=o?o.length:0;if(f||(e&=-97,o=r=void 0),a=a===void 0?a:tP(zo(a),0),l=l===void 0?l:zo(l),f-=r?r.length:0,e&rU){var h=o,v=r;o=r=void 0}var b=s?void 0:H2(t),w=[t,e,n,o,r,h,v,i,a,l];if(b&&eU(w,b),t=w[0],e=w[1],n=w[2],o=w[3],r=w[4],l=w[9]=w[9]===void 0?s?0:t.length:tP(w[9]-f,0),!l&&e&(JN|QN)&&(e&=-25),!e||e==ZN)var O=p9(t,e,n);else e==JN||e==QN?O=Y9(t,e,l):(e==eP||e==(ZN|eP))&&!r.length?O=K9(t,e,n,o):O=RE.apply(void 0,w);var E=b?Kj:eL;return tL(E(O,w),t,e)}var oU=128;function rL(t,e,n){return e=n?void 0:e,e=t&&e==null?t.length:e,fp(t,oU,void 0,void 0,void 0,void 0,e)}var iU=OE(function(t,e){N2(e,rm(e),t)}),pA=OE(function(t,e,n,o){N2(e,rm(e),t,o)}),aU=OE(function(t,e,n,o){N2(e,Zd(e),t,o)});function X2(t,e){for(var n=-1,o=e.length,r=Array(o),i=t==null;++n<o;)r[n]=i?void 0:om(t,e[n]);return r}var sU=im(X2),lU="[object DOMException]",uU="[object Error]";function Y2(t){if(!qd(t))return!1;var e=Kg(t);return e==uU||e==lU||typeof t.message=="string"&&typeof t.name=="string"&&!P2(t)}var oL=Yo(function(t,e){try{return Ju(t,void 0,e)}catch(n){return Y2(n)?n:new Error(n)}}),cU="Expected a function";function iL(t,e){var n;if(typeof e!="function")throw new TypeError(cU);return t=zo(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=void 0),n}}var dU=1,fU=32,DE=Yo(function(t,e,n){var o=dU;if(n.length){var r=Ah(n,Qg(DE));o|=fU}return fp(t,o,e,n,r)});DE.placeholder={};var pU=im(fu
|
|||
|
|
`:"";t.replace(b,function(S,M,C,$,D,k){return C||(C=$),v+=t.slice(f,k).replace(AX,gX),M&&(l=!0,v+=`' +
|
|||
|
|
__e(`+M+`) +
|
|||
|
|
'`),D&&(s=!0,v+=`';
|
|||
|
|
`+D+`;
|
|||
|
|
__p += '`),C&&(v+=`' +
|
|||
|
|
((__t = (`+C+`)) == null ? '' : __t) +
|
|||
|
|
'`),f=k+S.length,S}),v+=`';
|
|||
|
|
`;var O=fP.call(e,"variable")&&e.variable;if(!O)v=`with (obj) {
|
|||
|
|
`+v+`
|
|||
|
|
}
|
|||
|
|
`;else if(OX.test(O))throw new Error(bX);v=(s?v.replace(wX,""):v).replace(EX,"$1").replace(xX,"$1;"),v="function("+(O||"obj")+`) {
|
|||
|
|
`+(O?"":`obj || (obj = {});
|
|||
|
|
`)+"var __t, __p = ''"+(l?", __e = _.escape":"")+(s?`, __j = Array.prototype.join;
|
|||
|
|
function print() { __p += __j.call(arguments, '') }
|
|||
|
|
`:`;
|
|||
|
|
`)+v+`return __p
|
|||
|
|
}`;var E=oL(function(){return Function(i,w+"return "+v).apply(void 0,a)});if(E.source=v,Y2(E))throw E;return E}function UE(t,e){return e(t)}var CX=9007199254740991,KO=4294967295,NX=Math.min;function PX(t,e){if(t=zo(t),t<1||t>CX)return[];var n=KO,o=NX(t,KO);e=sm(e),t-=KO;for(var r=Aj(o,e);++n<t;)e(n);return r}function kX(){return this}function uI(t,e){var n=t;return n instanceof $o&&(n=n.value()),$j(e,function(o,r){return r.func.apply(r.thisArg,H_([o],r.args))},n)}function RX(){return uI(this.__wrapped__,this.__actions__)}function DX(t){return Ri(t).toLowerCase()}function jX(t){return qa(t)?El(t,SE):Pg(t)?[t]:qu(D$(Ri(t)))}var pP=9007199254740991;function LX(t){return t?Jg(zo(t),-pP,pP):t===0?t:0}function IX(t){return Ri(t).toUpperCase()}function FX(t,e,n){var o=qa(t),r=o||Mj(t)||Tj(t);if(e=_i(e),n==null){var i=t&&t.constructor;r?n=o?new i:[]:sp(t)?n=Ph(i)?G_(j$(t)):{}:n={}}return(r?Kd:am)(t,function(a,l,s){return e(n,a,l,s)}),n}function cI(t,e){for(var n=t.length;n--&&k2(e,t[n],0)>-1;);return n}function dI(t,e){for(var n=-1,o=t.length;++n<o&&k2(e,t[n],0)>-1;);return n}function BX(t,e,n){if(t=Ri(t),t&&(n||e===void 0))return L$(t);if(!t||!(e=Jc(e)))return t;var o=Qc(t),r=Qc(e),i=dI(o,r),a=cI(o,r)+1;return Dh(o,i,a).join("")}function $X(t,e,n){if(t=Ri(t),t&&(n||e===void 0))return t.slice(0,I$(t)+1);if(!t||!(e=Jc(e)))return t;var o=Qc(t),r=cI(o,Qc(e))+1;return Dh(o,0,r).join("")}var UX=/^\s+/;function VX(t,e,n){if(t=Ri(t),t&&(n||e===void 0))return t.replace(UX,"");if(!t||!(e=Jc(e)))return t;var o=Qc(t),r=dI(o,Qc(e));return Dh(o,r).join("")}var WX=30,GX="...",zX=/\w*$/;function HX(t,e){var n=WX,o=GX;if(sp(e)){var r="separator"in e?e.separator:r;n="length"in e?zo(e.length):n,o="omission"in e?Jc(e.omission):o}t=Ri(t);var i=t.length;if(ey(t)){var a=Qc(t);i=a.length}if(n>=i)return t;var l=n-ny(o);if(l<1)return o;var s=a?Dh(a,0,l).join(""):t.slice(0,l);if(r===void 0)return s+o;if(a&&(l+=s.length-l),z2(r)){if(t.slice(l).search(r)){var f,h=s;for(r.global||(r=RegExp(r.source,Ri(zX.exec(r))+"g")),r.lastIndex=0;f=r.exec(h);)var v=f.index;s=s.slice(0,v===void 0?l:v)}}else if(t.indexOf(Jc(r),l)!=l){var b=s.lastIndexOf(r);b>-1&&(s=s.slice(0,b))}return s+o}function XX(t){return rL(t,1)}var YX={"&":"&","<":"<",">":">",""":'"',"'":"'"},qX=Z2(YX),fI=/&(?:amp|lt|gt|quot|#39);/g,KX=RegExp(fI.source);function ZX(t){return t=Ri(t),t&&KX.test(t)?t.replace(fI,qX):t}var JX=Yo(function(t){var e=Qu(t);return js(e)&&(e=void 0),E_(Jd(t,1,js,!0),_i(e))}),QX=Yo(function(t){var e=Qu(t);return e=typeof e=="function"?e:void 0,E_(Jd(t,1,js,!0),void 0,e)});function eY(t,e){return e=typeof e=="function"?e:void 0,t&&t.length?E_(t,void 0,e):[]}function tY(t,e){return t==null?!0:Sj(t,e)}var nY=Math.max;function cM(t){if(!(t&&t.length))return[];var e=0;return t=X_(t,function(n){if(js(n))return e=nY(n.length,e),!0}),Aj(e,function(n){return El(t,xj(n))})}function pI(t,e){if(!(t&&t.length))return[];var n=cM(t);return e==null?n:El(n,function(o){return Ju(e,void 0,o)})}function hI(t,e,n,o){return R2(t,e,n(Oj(t,e)),o)}function rY(t,e,n){return t==null?t:hI(t,e,sm(n))}function oY(t,e,n,o){return o=typeof o=="function"?o:void 0,t==null?t:hI(t,e,sm(n),o)}var iY=ty(function(t,e,n){return t+(n?" ":"")+e.toUpperCase()});function aY(t){return t==null?[]:Uj(t,rm(t))}var sY=Yo(function(t,e){return js(t)?NE(t,e):[]});function lY(t,e){return FE(sm(e),t)}var uY=im(function(t){var e=t.length,n=e?t[0]:0,o=this.__wrapped__,r=function(i){return X2(i,t)};return e>1||this.__actions__.length||!(o instanceof $o)||!z_(n)?this.thru(r):(o=o.slice(n,+n+(e?1:0)),o.__actions__.push({func:UE,args:[r],thisArg:void 0}),new tc(o,this.__chain__).thru(function(i){return e&&!i.length&&i.push(void 0),i}))});function cY(){return CL(this)}function dY(){var t=this.__wrapped__;if(t instanceof $o){var e=t;return this.__actions__.length&&(e=new $o(this)),e=e.reverse(),e.__actions__.push({func:UE,args:[_A],thisArg:void 0}),new tc(e,this.__chain__)}return this.thru(_A)}function dM(t,e,n){var o=t.length;if(o<2)return o?E_(t[0]):[];for(var r=-1,i=Array(o);++r<o;)for(var a=t[r],l=-1;++l<o;)l!=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 TY="4.17.23",CY=2,NY=1,PY=3,vI=4294967295,kY=Array.prototype,RY=Object.prototype,mI=RY.hasOwnProperty,hP=uw?uw.iterator:void 0,DY=Math.max,vP=Math.min,pM=(function(t){return function(e,n,o){if(o==null){var r=sp(n),i=r&&Zd(n),a=i&&i.length&&LE(n,i);(a?a.length:r)||(o=n,n=e,e=this)}return t(e,n,o)}})(nz);ge.after=Ta.after;ge.ary=Ta.ary;ge.assign=io.assign;ge.assignIn=io.assignIn;ge.assignInWith=io.assignInWith;ge.assignWith=io.assignWith;ge.at=io.at;ge.before=Ta.before;ge.bind=Ta.bind;ge.bindAll=bi.bindAll;ge.bindKey=Ta.bindKey;ge.castArray=Vr.castArray;ge.chain=ef.chain;ge.chunk=mr.chunk;ge.compact=mr.compact;ge.concat=mr.concat;ge.cond=bi.cond;ge.conforms=bi.conforms;ge.constant=bi.constant;ge.countBy=Di.countBy;ge.create=io.create;ge.curry=Ta.curry;ge.curryRight=Ta.curryRight;ge.debounce=Ta.debounce;ge.defaults=io.defaults;ge.defaultsDeep=io.defaultsDeep;ge.defer=Ta.defer;ge.delay=Ta.delay;ge.difference=mr.difference;ge.differenceBy=mr.differenceBy;ge.differenceWith=mr.differenceWith;ge.drop=mr.drop;ge.dropRight=mr.dropRight;ge.dropRightWhile=mr.dropRightWhile;ge.dropWhile=mr.dropWhile;ge.fill=mr.fill;ge.filter=Di.filter;ge.flatMap=Di.flatMap;ge.flatMapDeep=Di.flatMapDeep;ge.flatMapDepth=Di.flatMapDepth;ge.flatten=mr.flatten;ge.flattenDeep=mr.flattenDeep;ge.flattenDepth=mr.flattenDepth;ge.flip=Ta.flip;ge.flow=bi.flow;ge.flowRight=bi.flowRight;ge.fromPairs=mr.fromPairs;ge.functions=io.functions;ge.functionsIn=io.functionsIn;ge.groupBy=Di.groupBy;ge.initial=mr.initial;ge.intersection=mr.intersection;ge.intersectionBy=mr.intersectionBy;ge.intersectionWith=mr.intersectionWith;ge.invert=io.invert;ge.invertBy=io.invertBy;ge.invokeMap=Di.invokeMap;ge.iteratee=bi.iteratee;ge.keyBy=Di.keyBy;ge.keys=Zd;ge.keysIn=io.keysIn;ge.map=Di.map;ge.mapKeys=io.mapKeys;ge.mapValues=io.mapValues;ge.matches=bi.matches;ge.matchesProperty=bi.matchesProperty;ge.memoize=Ta.memoize;ge.merge=io.merge;ge.mergeWith=io.mergeWith;ge.method=bi.method;ge.methodOf=bi.methodOf;ge.mixin=pM;ge.negate=G2;ge.nthArg=bi.nthArg;ge.omit=io.omit;ge.omitBy=io.omitBy;ge.once=Ta.once;ge.orderBy=Di.orderBy;ge.over=bi.over;ge.overArgs=Ta.overArgs;ge.overEvery=bi.overEvery;ge.overSome=bi.overSome;ge.partial=Ta.partial;ge.partialRight=Ta.partialRight;ge.partition=Di.partition;ge.pick=io.pick;ge.pickBy=io.pickBy;ge.property=bi.property;ge.propertyOf=bi.propertyOf;ge.pull=mr.pull;ge.pullAll=mr.pullAll;ge.pullAllBy=mr.pullAllBy;ge.pullAllWith=mr.pullAllWith;ge.pullAt=mr.pullAt;ge.range=bi.range;ge.rangeRight=bi.rangeRight;ge.rearg=Ta.rearg;ge.reject=Di.reject;ge.remove=mr.remove;ge.rest=Ta.rest;ge.reverse=mr.reverse;ge.sampleSize=Di.sampleSize;ge.set=io.set;ge.setWith=io.setWith;ge.shuffle=Di.shuffle;ge.slice=mr.slice;ge.sortBy=Di.sortBy;ge.sortedUniq=mr.sortedUniq;ge.sortedUniqBy=mr.sortedUniqBy;ge.split=pi.split;ge.spread=Ta.spread;ge.tail=mr.tail;ge.take=mr.take;ge.takeRight=mr.takeRight;ge.takeRightWhile=mr.takeRightWhile;ge.takeWhile=mr.takeWhile;ge.tap=ef.tap;ge.throttle=Ta.throttle;ge.thru=UE;ge.toArray=Vr.toArray;ge.toPairs=io.toPairs;ge.toPairsIn=io.toPairsIn;ge.toPath=bi.toPath;ge.toPlainObject=Vr.toPlainObject;ge.transform=io.transform;ge.unary=Ta.unary;ge.union=mr.union;ge.unionBy=mr.unionBy;ge.unionWith=mr.unionWith;ge.uniq=mr.uniq;ge.uniqBy=mr.uniqBy;ge.uniqWith=mr.uniqWith;ge.unset=io.unset;ge.unzip=mr.unzip;ge.unzipWith=mr.unzipWith;ge.update=io.update;ge.updateWith=io.updateWith;ge.values=io.values;ge.valuesIn=io.valuesIn;ge.without=mr.without;ge.words=pi.words;ge.wrap=Ta.wrap;ge.xor=mr.xor;ge.xorBy=mr.xorBy;ge.xorWith=mr.xorWith;ge.zip=mr.zip;ge.zipObject=mr.zipObject;ge.zipObjectDeep=mr.zipObjectDeep;ge.zipWith=mr.zipWith;ge.entries=io.toPairs;ge.entriesIn=io.toPairsIn;ge.extend=io.assignIn;ge.extendWith=io.assignInWith;pM(ge,ge);ge.add=Sl.add;ge.attempt=bi.attempt;ge.camelCase=pi.camelCase;ge.capitalize=pi.capitalize;ge.ceil=Sl.ceil;ge.clamp=fM.clamp;ge.clone=Vr.clone;ge.cloneDeep=Vr.cloneDeep;ge.cloneDeepWith=Vr.cloneDeepWith;ge.cloneWith=Vr.cloneWith;ge.conformsTo=Vr.conformsTo;ge.deburr=pi.deburr;ge.defaultTo=bi.defaultTo;ge.divide=Sl.divide;ge.
|
|||
|
|
{{${kt("views.applicationWorkflow.nodes.searchKnowledgeNode.label")}.data}}
|
|||
|
|
${kt("views.problem.title")}:
|
|||
|
|
{{${kt("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}},v=hr({get:()=>b.nodeModel.properties.node_data?(b.nodeModel.properties.node_data.model_setting||Me.set(b.nodeModel.properties.node_data,"model_setting",{reasoning_content_start:"<think>",reasoning_content_end:"</think>",reasoning_content_enable:!1}),b.nodeModel.properties.node_data):(Me.set(b.nodeModel.properties,"node_data",h),b.nodeModel.properties.node_data),set:Be=>{Me.set(b.nodeModel.properties,"node_data",Be)}}),b=t,w=He(),O=He(null),E=He(),S=He(),M=()=>{var Be;return(Be=w.value)==null?void 0:Be.validate().catch(Je=>Promise.reject({node:b.nodeModel,errMessage:Je}))},C=e();function $(){var Je;const Be=r.value==="systemManage"?{model_type:"LLM",workspace_id:(Je=C.value)==null?void 0:Je.workspace_id}:{model_type:"LLM"};oi({type:"model",systemType:r.value}).getSelectModelList(Be).then(gt=>{O.value=Me.groupBy(gt==null?void 0:gt.data,"provider")})}const D=Be=>{var Je;Be&&((Je=E.value)==null||Je.open(Be,o,v.value.model_params_setting))},k=He(),B=Be=>{var Je;Be&&((Je=k.value)==null||Je.open(Be,o))},F=Be=>{Me.set(b.nodeModel.properties.node_data,"system",Be)},I=()=>{var Be;(Be=S.value)==null||Be.open(v.value.model_setting)};function V(Be){Me.set(b.nodeModel.properties.node_data,"model_params_setting",Be)}function z(Be){let Je=Me.cloneDeep(b.nodeModel.properties.node_data.model_setting);Je={...Je,...Be},Me.set(b.nodeModel.properties.node_data,"model_setting",Je)}const X=He();function Y(){const Be={mcp_servers:v.value.mcp_servers,mcp_tool_ids:v.value.mcp_tool_ids,mcp_source:v.value.mcp_source};X.value.open(Be,ze.value)}function W(Be){Me.set(b.nodeModel.properties.node_data,"mcp_servers",Be.mcp_servers),Me.set(b.nodeModel.properties.node_data,"mcp_tool_ids",Be.mcp_tool_ids),Me.set(b.nodeModel.properties.node_data,"mcp_source",Be.mcp_source)}const Q=He();function J(){Q.value.open(v.value.tool_ids)}function ie(Be){Me.set(b.nodeModel.properties.node_data,"tool_ids",Be.tool_ids)}function Se(Be){const Je=b.nodeModel.properties.node_data.tool_ids.filter(gt=>gt!==Be);Me.set(b.nodeModel.properties.node_data,"tool_ids",Je)}function Ae(Be){const Je=b.nodeModel.properties.node_data.mcp_tool_ids.filter(gt=>gt!==Be);Me.set(b.nodeModel.properties.node_data,"mcp_tool_ids",Je)}const ke=He([]);function De(){var Je;const Be=r.value==="systemManage"?{scope:"WORKSPACE",tool_type:"CUSTOM",workspace_id:(Je=C.value)==null?void 0:Je.workspace_id}:{scope:"WORKSPACE",tool_type:"CUSTOM"};oi({type:"tool",systemType:r.value}).getAllToolList(Be).then(gt=>{ke.value=[...gt.data.shared_tools,...gt.data.tools].filter(se=>se.is_active)})}const ze=He([]);function Ye(){var Je;const Be=r.value==="systemManage"?{scope:"WORKSPACE",tool_type:"MCP",workspace_id:(Je=C.value)==null?void 0:Je.workspace_id}:{scope:"WORKSPACE",tool_type:"MCP"};oi({type:"tool",systemType:r.value}).getAllToolList(Be).then(gt=>{ze.value=[...gt.data.shared_tools,...gt.data.tools].filter(se=>se.is_active)})}return bo(()=>{var Be,Je,gt,se;$(),typeof((Be=b.nodeModel.properties.node_data)==null?void 0:Be.is_result)>"u"&&Qd(b.nodeModel)&&Me.set(b.nodeModel.properties.node_data,"is_result",!0),Me.set(b.nodeModel,"validate",M),v.value.dialogue_type||(v.value.dialogue_type="WORKFLOW"),(Je=b.nodeModel.properties.node_data)!=null&&Je.mcp_tool_id&&(Me.set(b.nodeModel.properties.node_data,"mcp_tool_ids",[(gt=b.nodeModel.properties.node_data)==null?void 0:gt.mcp_tool_id]),Me.set(b.nodeModel.properties.node_data,"mcp_tool_id",void 0)),((se=b.nodeModel.properties.node_data)==null?void 0:se.mcp_output_enable)===void 0&&Me.set(b.nodeModel.properties.node_data,"mcp_output_enable",!0),De(),Ye()}),(Be,Je)=>{const gt=ne("AppIcon"),se=ne("el-button"),Ze=ne("ModelSelect"),pe=ne("el-form-item"),le=ne("el-tooltip"),we=ne("MdEditorMagnify"),$e=ne("el-option"),rt=ne("el-select"),pt=ne("el-input-number"),Lt=ne("el-switch"),Jt=ne("el-avatar"),en=ne("Tool
|
|||
|
|
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 OA=function(t,e){return OA=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var r in o)o.hasOwnProperty(r)&&(n[r]=o[r])},OA(t,e)};function rK(t,e){OA(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var Ew=function(){return Ew=Object.assign||function(e){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Ew.apply(this,arguments)};function Ud(t){var e=typeof Symbol=="function"&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function _g(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var o=n.call(t),r,i=[],a;try{for(;(e===void 0||e-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(l){a={error:l}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}function EM(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(_g(arguments[e]));return t}var xw=Symbol("mobx did run lazy initializers"),Gy=Symbol("mobx pending decorators"),oK={},iK={};function aK(t,e){var n=e?oK:iK;return n[t]||(n[t]={configurable:!0,enumerable:e,get:function(){return qv(this),this[t]},set:function(o){qv(this),this[t]=o}})}function qv(t){var e,n;if(t[xw]!==!0){var o=t[Gy];if(o){oy(t,xw,!0);var r=EM(Object.getOwnPropertySymbols(o),Object.keys(o));try{for(var i=Ud(r),a=i.next();!a.done;a=i.next()){var l=a.value,s=o[l];s.propertyCreator(t,s.prop,s.descriptor,s.decoratorTarget,s.decoratorArguments)}}catch(f){e={error:f}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}}}}function PI(t,e){return function(){var o,r=function(a,l,s,f){if(f===!0)return e(a,l,s,a,o),null;if(!Object.prototype.hasOwnProperty.call(a,Gy)){var h=a[Gy];oy(a,Gy,Ew({},h))}return a[Gy][l]={prop:l,propertyCreator:e,descriptor:s,decoratorTarget:a,decoratorArguments:o},aK(l,t)};return sK(arguments)?(o=ww,r.apply(null,arguments)):(o=Array.prototype.slice.call(arguments),r)}}function sK(t){return(t.length===2||t.length===3)&&(typeof t[1]=="string"||typeof t[1]=="symbol")||t.length===4&&t[3]===!0}function tb(t,e,n){return Ug(t)?t:Array.isArray(t)?Ut.array(t,{name:n}):ry(t)?Ut.object(t,void 0,{name:n}):iy(t)?Ut.map(t,{name:n}):eb(t)?Ut.set(t,{name:n}):t}function lK(t,e,n){return t==null||td(t)||tf(t)||Yl(t)||nc(t)?t:Array.isArray(t)?Ut.array(t,{name:n,deep:!1}):ry(t)?Ut.object(t,void 0,{name:n,deep:!1}):iy(t)?Ut.map(t,{name:n,deep:!1}):eb(t)?Ut.set(t,{name:n,deep:!1}):Qo(!1)}function GE(t){return t}function uK(t,e,n){return r3(t,e)?e:t}function zE(t){Wv(t);var e=PI(!0,function(o,r,i,a,l){var s=i?i.initializer?i.initializer.call(o):i.value:void 0;MM(o).addObservableProp(r,s,t)}),n=e;return n.enhancer=t,n}var kI={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(kI);function pg(t){return t==null?kI:typeof t=="string"?{name:t,deep:!0,proxy:!0}:t}var xM=zE(tb),cK=zE(lK),RI=zE(GE),dK=zE(uK);function p0(t){return t.defaultDecorator?t.defaultDecorator.enhancer:t.deep===!1?GE:tb}function fK(t,e,n){if(typeof arguments[1]=="string"||typeof arguments[1]=="symbol")return xM.apply(null,arguments);if(Ug(t))return t;var o=ry(t)?Ut.object(t,e,n):Array.isArray(t)?Ut.array(t,e):iy(t)?Ut.map(t,e):eb(t)?Ut.set(t,e):t;if(o!==t)return o;Qo(!1)}var AP={box:function(t,e){arguments.length>2&&Ly("box");var n=pg(e);return new zv(t,p0(n),n.name,!0,n.equals)},array:function(t,e){arguments.length>2&&Ly("array");var n=pg(e);return KK(t,p0(n),n.name)},map:function(t,e){arguments.length>2&&Ly("map");var n=pg(e);return new AM(t,p0(n),n.name)},set:function(t,e){arguments.length>2&&Ly("set");var n=pg(e);return new t3(t,p0(n),n.name)},object:function(t,e,n){typeof arguments[1]=="string"&&Ly("object");var o=pg(n);if(o.proxy===!1)return NA({},t,e,o);var r=qI(o),i=NA({},void 0,void 0,o),a=XK(i);return KI(a,t,e,r),a},ref:RI,shallow:cK,deep:xM,struct:dK},Ut=fK;Object.keys(AP).forEach(function(t
|
|||
|
|
/*
|
|||
|
|
Tracing '`+t.name+`'
|
|||
|
|
|
|||
|
|
You are entering this break point because derivation '`+t.name+"' is being traced and '"+e.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.
|
|||
|
|
|
|||
|
|
`+(t instanceof Bg?t.derivation.toString().replace(/[*]\//g,"/"):"")+`
|
|||
|
|
|
|||
|
|
The dependencies for this derivation are:
|
|||
|
|
|
|||
|
|
`+n.join(`
|
|||
|
|
`)+`
|
|||
|
|
*/
|
|||
|
|
`)()}}function WI(t,e,n){if(e.length>=1e3){e.push("(and many more)");return}e.push(""+new Array(n).join(" ")+t.name),t.dependencies&&t.dependencies.forEach(function(o){return WI(o,e,n+1)})}var S_=(function(){function t(e,n,o,r){e===void 0&&(e="Reaction@"+Hl()),r===void 0&&(r=!1),this.name=e,this.onInvalidate=n,this.errorHandler=o,this.requiresObservable=r,this.observing=[],this.newObserving=[],this.dependenciesState=ii.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+Hl(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=Vd.NONE}return t.prototype.onBecomeStale=function(){this.schedule()},t.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,yr.pendingReactions.push(this),GI())},t.prototype.isScheduled=function(){return this._isScheduled},t.prototype.runReaction=function(){if(!this.isDisposed){if(Yc(),this._isScheduled=!1,SA(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending&&Ku()}catch(e){this.reportExceptionInDerivation(e)}}qc()}},t.prototype.track=function(e){if(!this.isDisposed){Yc(),this._isRunning=!0;var n=DI(this,e,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&AA(this),zy(n)&&this.reportExceptionInDerivation(n.cause),qc()}},t.prototype.reportExceptionInDerivation=function(e){var n=this;if(this.errorHandler){this.errorHandler(e,this);return}if(yr.disableErrorBoundaries)throw e;var o="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";yr.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(o,e),yr.globalReactionErrorHandlers.forEach(function(r){return r(e,n)})},t.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(Yc(),AA(this),qc()))},t.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e[eo]=this,e},t.prototype.toString=function(){return"Reaction["+this.name+"]"},t.prototype.trace=function(e){e===void 0&&(e=!1),GK(this,e)},t})(),TP=100,CA=function(t){return t()};function GI(){yr.inBatch>0||yr.isRunningReactions||CA(SK)}function SK(){yr.isRunningReactions=!0;for(var t=yr.pendingReactions,e=0;t.length>0;){++e===TP&&(console.error("Reaction doesn't converge to a stable state after "+TP+" iterations."+(" Probably there is a cycle in the reactive function: "+t[0])),t.splice(0));for(var n=t.splice(0),o=0,r=n.length;o<r;o++)n[o].runReaction()}yr.isRunningReactions=!1}var Mw=jh("Reaction",S_);function AK(t){var e=CA;CA=function(n){return t(function(){return e(n)})}}function Ku(){return!1}function MK(t){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}function TK(){Qo(!1)}function CP(t){return function(e,n,o){if(o){if(o.value)return{value:Gv(t,o.value),enumerable:!1,configurable:!0,writable:!0};var r=o.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return Gv(t,r.call(this))}}}return CK(t).apply(this,arguments)}}function CK(t){return function(e,n,o){Object.defineProperty(e,n,{configurable:!0,enumerable:!1,get:function(){},set:function(r){oy(this,n,Bt(t,r))}})}}function NK(t,e,n,o){return o===!0?(ZO(t,e,n.value),null):n?{configurable:!0,enumerable:!1,get:function(){return ZO(this,e,n.value||n.initializer.call(this)),this[e]},set:TK}:{enumerable:!1,configurable:!0,set:function(r){ZO(this,e,r)},get:function(){}}}var Bt=function(e,n,o,r){if(arguments.length===1&&typeof e=="function")return Gv(e.name||"<unnamed action>",e);if(arguments.length===2&&typeof n=="function")return Gv(e,n);if(arguments.length===1&&typeof e=="string")return CP(e);if(r===!0)oy(e,n,Gv(e.name||n,o.value,this));else return CP(n).apply(null,arguments)};Bt.bound=NK;function PK(t,e){var n=typeof t=="string"?t:t.name||"<unnamed action>",o=typeof t=="function"?t:e;return II(n,o,this,void 0)}function ZO(t,e,n){oy(t,e,Gv(e,n.bind(t)))}function kK(t,e){e===void 0&&(e=yM);var n=e&&e.name||t.name||"Autorun@"+Hl(),o=!e.scheduler&&!e.delay,r;if(o)r=new S_(n
|
|||
|
|
L`).concat(i.rightX," ").concat(i.rightY,`
|
|||
|
|
L`).concat(a.rightX," ").concat(a.rightY,`
|
|||
|
|
L`).concat(a.leftX," ").concat(a.leftY," z")}return{d:o,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}},yk=function(t){var e=t.start,n=t.end,o=t.sourceNode,r=t.targetNode,i=t.offset,a=gu(o),l=gu(r),s=Cw(a,i),f=Cw(l,i),h=Nw(s,a,e),v=Nw(f,l,n);return{sNext:h,ePre:v}},CM=function(t){var e=t.replace(/M/g,"").replace(/C/g,",").split(","),n=_0(e[0]),o=_0(e[1]),r=_0(e[2]),i=_0(e[3]);return[n,o,r,i]},_0=function(t){var e=Xu(t.replace(/(^\s*)/g,"").split(" "),2),n=e[0],o=e[1];return{x:+n,y:+o}},_k=function(t,e){var n=Xu(t,4),o=n[0],r=n[1],i=n[2],a=n[3],l=WJ(o,r,i,a,e);return[l,t[3]]},g3=function(t,e){for(var n=t.x,o=t.y,r=Kv(e),i=Number.MAX_SAFE_INTEGER,a,l=[],s=0;s<r.length;s++)l.push({start:r[s],end:r[(s+1)%r.length]});if(l.forEach(function(b){var w=b.start,O=b.end;if(w.x===O.x){var E={x:w.x,y:o},S=M_(E,w,O);if(S){var M=Math.abs(w.x-n);M<i&&(i=M,a=E)}}else if(w.y===O.y){var E={x:n,y:w.y},S=M_(E,w,O);if(S){var M=Math.abs(w.y-o);M<i&&(i=M,a=E)}}}),!a){var f=l[0],h=f.start,v=f.end;a={x:h.x+(v.x-h.x)/2,y:h.y+(v.y-h.y)/2}}return a},eJ=function(t){return Vv(t,["id","type","sourceNodeId","sourceAnchorId","targetNodeId","targetAnchorId","pointsList","startPoint","endPoint","properties"])},bk=function(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))};function tJ(t,e){return typeof e!="function"?function(n,o,r){return Object.assign({type:t.edgeType},r)}:function(n,o,r){var i=e(n,o,r);return i?typeof i=="string"?Object.assign({},r,{type:i}):Object.assign({type:i},r):{type:t.edgeType}}}var nJ=function(t){var e=t.rows,n=t.rowsLength,o=t.fontSize,r=0;return ri(e,function(i){var a=m3(i);r=a>r?a:r}),{width:Math.ceil(r/2)*o+o/4,height:n*(o+2)+o/4}},ng=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var o=n.call(t),r,i=[],a;try{for(;(e===void 0||e-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(l){a={error:l}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},b0=function(t,e,n){if(n||arguments.length===2)for(var o=0,r=e.length,i;o<r;o++)(i||!(o in e))&&(i||(i=Array.prototype.slice.call(e,0,o)),i[o]=e[o]);return t.concat(i||Array.prototype.slice.call(e))};function Wg(t,e,n){return n&&e*Math.round(t/e)||t}function rJ(t,e,n){if(!t)return[];var o=Math.min.apply(Math,b0([],ng(t.map(function(E){return E[0]})),!1)),r=Math.max.apply(Math,b0([],ng(t.map(function(E){return E[0]})),!1)),i=Math.min.apply(Math,b0([],ng(t.map(function(E){return E[1]})),!1)),a=Math.max.apply(Math,b0([],ng(t.map(function(E){return E[1]})),!1)),l=-o,s=-i,f=t.map(function(E){var S=ng(E,2),M=S[0],C=S[1];return[M+l,C+s]}),h=r-o,v=a-i,b=e?e/h:1,w=n?n/v:1,O=Math.min(b,w);return f.map(function(E){var S=ng(E,2),M=S[0],C=S[1];return[M*O,C*O]})}var eS=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var o=n.call(t),r,i=[],a;try{for(;(e===void 0||e-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(l){a={error:l}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},tS=function(t,e,n){var o=eS(t,2),r=o[0],i=o[1],a=eS(e,2),l=a[0],s=a[1],f=eS(n,2),h=f[0],v=f[1];return r>l&&r<h&&i>s&&i<v},y3=function(t,e){var n=e.multipleSelectKey,o=!1;switch(n){case"meta":o=t.metaKey;break;case"alt":o=t.altKey;break;case"shift":o=t.shiftKey;break;case"ctrl":o=t.ctrlKey;break;default:o=!1;break}return o},NM=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,r){o.__proto__=r}||function(o,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(o[i]=r[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function o(){this.constructor=e}e.prototype=n===null?Object.create(n):(o.prototype=n.prototype,new o)}})();function wk(t,e){return t instanceof Ls&&e instanceof Ls}var _3=(function(t){NM(e,t);function e(n,o,r){var i=t.call(this,3)||this;return i[0]=n,i[1]=o,i[2]=r,i.x=n,i.y=o,i.z=r,Object.setPrototypeOf(i,e.prototype),i}return e.prototype.add=function(n){if(wk(this,n)
|
|||
|
|
C `).concat(i.x," ").concat(i.y,`,
|
|||
|
|
`).concat(a.x," ").concat(a.y,`,
|
|||
|
|
`).concat(l.x," ").concat(l.y)},e.prototype.initPoints=function(){this.pointsList.length>0?this.path=this.getPath(this.pointsList):this.updatePoints()},e.prototype.updatePoints=function(){var n=this.getControls(),o=n.sNext,r=n.ePre;this.updatePath(o,r)},e.prototype.updatePath=function(n,o){n=to(n),o=to(o);var r={x:this.startPoint.x,y:this.startPoint.y},i={x:this.endPoint.x,y:this.endPoint.y};if(!n||!o){var a=this.getControls();n=a.sNext,o=a.ePre}this.pointsList=[r,n,o,i],this.path=this.getPath(this.pointsList)},e.prototype.updateStartPoint=function(n){this.startPoint=Object.assign({},n),this.updatePoints()},e.prototype.updateEndPoint=function(n){this.endPoint=Object.assign({},n),this.updatePoints()},e.prototype.moveStartPoint=function(n,o){this.startPoint.x+=n,this.startPoint.y+=o;var r=rS(this.pointsList,3),i=r[1],a=r[2];i.x+=n,i.y+=o,this.updatePath(i,a)},e.prototype.moveEndPoint=function(n,o){this.endPoint.x+=n,this.endPoint.y+=o;var r=rS(this.pointsList,3),i=r[1],a=r[2];a.x+=n,a.y+=o,this.updatePath(i,a)},e.prototype.updateAdjustAnchor=function(n,o){var r;o==="sNext"?this.pointsList[1]=n:o==="ePre"&&(this.pointsList[2]=n),this.path=this.getPath(this.pointsList),!((r=this.text)===null||r===void 0)&&r.value&&this.setText(Xo({},this.text,this.textPosition))},e.prototype.getAdjustStart=function(){return this.pointsList[0]||this.startPoint},e.prototype.getAdjustEnd=function(){var n=this.pointsList;return n[n.length-1]||this.endPoint},e.prototype.updateAfterAdjustStartAndEnd=function(n){var o=n.startPoint,r=n.endPoint,i=n.sourceNode,a=n.targetNode,l=yk({start:o,end:r,sourceNode:i,targetNode:a,offset:this.offset}),s=l.sNext,f=l.ePre;this.pointsList=[o,s,f,r],this.initPoints()},Uu([Ut],e.prototype,"offset",void 0),Uu([Ut],e.prototype,"path",void 0),Uu([Bt],e.prototype,"initPoints",null),Uu([Bt],e.prototype,"updatePoints",null),Uu([Bt],e.prototype,"updateStartPoint",null),Uu([Bt],e.prototype,"updateEndPoint",null),Uu([Bt],e.prototype,"moveStartPoint",null),Uu([Bt],e.prototype,"moveEndPoint",null),Uu([Bt],e.prototype,"updateAdjustAnchor",null),Uu([Bt],e.prototype,"getAdjustStart",null),Uu([Bt],e.prototype,"getAdjustEnd",null),Uu([Bt],e.prototype,"updateAfterAdjustStartAndEnd",null),e})(KE),cQ=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,r){o.__proto__=r}||function(o,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(o[i]=r[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function o(){this.constructor=e}e.prototype=n===null?Object.create(n):(o.prototype=n.prototype,new o)}})(),n_=function(){return n_=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},n_.apply(this,arguments)},Nk=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var o=n.call(t),r,i=[],a;try{for(;(e===void 0||e-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(l){a={error:l}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},dQ=function(t,e,n){if(n||arguments.length===2)for(var o=0,r=e.length,i;o<r;o++)(i||!(o in e))&&(i||(i=Array.prototype.slice.call(e,0,o)),i[o]=e[o]);return t.concat(i||Array.prototype.slice.call(e))},Pk=(function(t){cQ(e,t);function e(){var n=t.apply(this,dQ([],Nk(arguments),!1))||this;return n.modelType=_o.LINE_EDGE,n}return e.prototype.getEdgeStyle=function(){var n=this.graphModel.theme.line,o=t.prototype.getEdgeStyle.call(this),r=this.properties.style,i=r===void 0?{}:r;return n_(n_(n_({},o),to(n)),to(i))},e.prototype.initEdgeData=function(n){t.prototype.initEdgeData.call(this,n),this.points=this.getPath([this.startPoint,this.endPoint])},e.prototype.getPath=function(n){var o=Nk(n,2),r=o[0],i=o[1];return"".concat(r.x,",").concat(r.y," ").concat(i.x,",").concat(i.y)},e.prototype.getTextPosition=function(){return{x:(this.startPoint.x+this.endPoint.x)/2,y:(this.startPoint.y+this.endPo
|
|||
|
|
Copyright (c) 2018 Jed Watson.
|
|||
|
|
Licensed under the MIT License (MIT), see
|
|||
|
|
http://jedwatson.github.io/classnames
|
|||
|
|
*/var Ik;function vee(){return Ik||(Ik=1,(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var i="",a=0;a<arguments.length;a++){var l=arguments[a];l&&(i=r(i,o(l)))}return i}function o(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return n.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var a="";for(var l in i)e.call(i,l)&&i[l]&&(a=r(a,l));return a}function r(i,a){return a?i?i+" "+a:i+a:i}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(aS)),aS.exports}var mee=vee();const ZA=K_(mee);var gee=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,r){o.__proto__=r}||function(o,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(o[i]=r[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function o(){this.constructor=e}e.prototype=n===null?Object.create(n):(o.prototype=n.prototype,new o)}})(),JA=function(){return JA=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},JA.apply(this,arguments)},yee=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var o=n.call(t),r,i=[],a;try{for(;(e===void 0||e-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(l){a={error:l}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},T3=(function(t){gee(e,t);function e(n){var o=t.call(this)||this;o.mouseDownHandler=function(i){var a=o.props,l=a.draggable,s=a.model,f=a.graphModel,h=f.editConfigModel.nodeTextDraggable;(l??h)&&(i.stopPropagation(),o.stepperDrag.model=s,o.stepperDrag.handleMouseDown(i))},o.onDragging=function(i){var a=i.deltaX,l=i.deltaY,s=o.props,f=s.model,h=s.graphModel.transformModel;if(a||l){var v=yee(h.fixDeltaXY(a,l),2),b=v[0],w=v[1];f.moveText(b,w)}},o.dbClickHandler=function(){var i=o.props,a=i.editable,l=i.graphModel.eventCenter,s=i.model;a&&s.setElementState(Wo.TEXT_EDIT),l.emit(pr.TEXT_DBCLICK,{data:s.text,model:s})};var r=n.draggable;return o.stepperDrag=new oc({onDragging:o.onDragging,step:1,eventType:"TEXT",isStopPropagation:r}),o}return e.prototype.getShape=function(){var n=this.props,o=n.model,r=n.graphModel,i=r.editConfigModel,a=o.text,l=a.value,s=a.x,f=a.y,h=a.editable,v=a.draggable,b={x:s,y:f,className:"",value:l},w=o.getTextStyle(),O=i.nodeTextDraggable||v;return $t(E3,JA({},b,w,{className:ZA({"lf-element-text":h,"lf-text-draggable":!h&&O,"lf-text-disabled":!h&&!O}),model:o}))},e.prototype.render=function(){var n=this.props.model.text;if(n)return $t("g",{onMouseDown:this.mouseDownHandler,onDblClick:this.dbClickHandler,children:this.getShape()})},e})(Po),_ee=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,r){o.__proto__=r}||function(o,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(o[i]=r[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function o(){this.constructor=e}e.prototype=n===null?Object.create(n):(o.prototype=n.prototype,new o)}})(),Uc=function(){return Uc=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},Uc.apply(this,arguments)},T0=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var o=n.call(t),r,i=[],a;try{for(;(e===void 0||e-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(l){a={error:l}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},bee=(function(t){_ee(e,t);function e(n){var o=t.call(this,n)||this;return o.setHoverOn=function(){o.setState({isHovered:!0})},o.setHoverOff=function(){o.setState({isHovered:!1})},o.state={isHovered:!1},o}return
|
|||
|
|
L`).concat(l.rightX," ").concat(l.rightY,`
|
|||
|
|
L`).concat(s.rightX," ").concat(s.rightY,`
|
|||
|
|
L`).concat(s.leftX," ").concat(s.leftY," z")}return{d:i,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}},e.prototype.getAppendShape=function(n){var o=this.getAppendAttributes(n),r=o.d,i=o.strokeWidth,a=o.fill,l=o.strokeDasharray,s=o.stroke;return $t(P_,{d:r,fill:a,strokeWidth:i,stroke:s,strokeDasharray:l})},e.prototype.getAppendWidth=function(){for(var n=this,o=this.props,r=o.model,i=o.graphModel,a=r.pointsList,l=r.draggable,s=[],f=a.length,h=function(w){var O="lf-polyline-append",E={start:{x:a[w].x,y:a[w].y},end:{x:a[w+1].x,y:a[w+1].y},startIndex:w,endIndex:w+1,direction:ni.HORIZONTAL,draggable:!0},S=$t("g",{className:O,children:v.getAppendShape(E)}),M=i.editConfigModel,C=M.adjustEdge,$=M.adjustEdgeMiddle;if(C&&l){var D=E.startIndex,k=E.endIndex,B=$&&(D===0||k===f-1);E.draggable=!B,E.start.x===E.end.x?(E.draggable&&(O+="-ew-resize"),E.direction=ni.VERTICAL):E.start.y===E.end.y&&(E.draggable&&(O+="-ns-resize"),E.direction=ni.HORIZONTAL),S=$t("g",{className:v.isDragging?"lf-dragging":"lf-drag-able",onMouseDown:function(F){return n.beforeDragStart(F,E)},children:$t("g",{className:O,children:v.getAppendShape(E)})})}s.push(S)},v=this,b=0;b<f-1;b++)h(b);return $t("g",{children:s})},e})(ZE),wg=function(){return wg=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},wg.apply(this,arguments)},Wee=(function(){function t(e){var n=this;this.nodeConfig=null,this.fakeNode=null,this.stopDrag=function(){n.nodeConfig=null,window.document.removeEventListener("mouseup",n.stopDrag)},this.dragEnter=function(r){!n.nodeConfig||n.fakeNode||(n.fakeNode=n.lf.createFakeNode(wg(wg({},n.nodeConfig),n.clientToLocalPoint({x:r.clientX,y:r.clientY}))))},this.onDragOver=function(r){if(n.lf.graphModel.eventCenter.emit(pr.BLANK_CANVAS_MOUSEMOVE,{e:r}),r.preventDefault(),n.fakeNode){var i=n.clientToLocalPoint({x:r.clientX,y:r.clientY}),a=i.x,l=i.y;n.fakeNode.moveTo(a,l);var s=n.fakeNode.getData();n.lf.setNodeSnapLine(s),n.lf.graphModel.eventCenter.emit(pr.NODE_DND_DRAG,{data:s,e:r})}return!1},this.onDragLeave=function(){n.fakeNode&&(n.lf.removeNodeSnapLine(),n.lf.graphModel.removeFakeNode(),n.fakeNode=null)},this.onDrop=function(r){!n.lf.graphModel||!r||!n.nodeConfig||(n.lf.addNode(wg(wg({},n.nodeConfig),n.clientToLocalPoint({x:r.clientX,y:r.clientY})),pr.NODE_DND_ADD,r),r.preventDefault(),r.stopPropagation(),n.nodeConfig=null,n.lf.removeNodeSnapLine(),n.lf.graphModel.removeFakeNode(),n.fakeNode=null)};var o=e.lf;this.lf=o}return t.prototype.clientToLocalPoint=function(e){var n=e.x,o=e.y,r=om(this.lf.options,["grid","size"]),i=this.lf.graphModel.getPointByClient({x:n,y:o}),a=i.canvasOverlayPosition,l=a.x,s=a.y,f=this.lf.graphModel.editConfigModel.snapGrid;return{x:Wg(l,r,f),y:Wg(s,r,f)}},t.prototype.startDrag=function(e){var n=this.lf.graphModel.editConfigModel;n!=null&&n.isSilentMode||(this.nodeConfig=e,window.document.addEventListener("mouseup",this.stopDrag))},t.prototype.eventMap=function(){return{onMouseEnter:this.dragEnter,onMouseOver:this.dragEnter,onMouseMove:this.onDragOver,onMouseLeave:this.onDragLeave,onMouseUp:this.onDrop}},t})();function Gee(t,e){t.on("node:mousemove",function(n){var o=n.data;e.setNodeSnapLine(o)}),t.on("node:mouseup",function(){e.clearSnapline()})}var zee=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,r){o.__proto__=r}||function(o,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(o[i]=r[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function o(){this.constructor=e}e.prototype=n===null?Object.create(n):(o.prototype=n.prototype,new o)}})(),np=function(){return np=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},np.apply(this,arguments)},Hee=function(t,e,n,o){var r=arguments.length,i=r<3
|
|||
|
|
`;function K0(t,e,n){var o=yte(n);if(t!==0&&t!==!1&&!t)return Tv+o+"<".concat(e," />");var r="";if(e==="#text")return Tv+o+Zw(String(t));if(e==="#cdata-section")return Tv+o+"<![CDATA["+t+"]]>";if(e==="#comment")return Tv+o+"<!--"+t+"-->";if("".concat(e).charAt(0)==="-")return" "+e.substring(1)+'="'+_te(t)+'"';if(Array.isArray(t))t.forEach(function(s){r+=K0(s,e,n+1)});else if(I3(t)==="[object Object]"){var i=Object.keys(t),a="",l="";r+=(n===0?"":Tv+o)+"<"+e,i.forEach(function(s){s.charAt(0)==="-"?a+=K0(t[s],s,n+1):l+=K0(t[s],s,n+1)}),r+=a+(l!==""?">".concat(l).concat(Tv+o,"</").concat(e,">"):" />")}else r+=Tv+o+"<".concat(e,">").concat(Zw(String(t)),"</").concat(e,">");return r}function bte(t){var e="";for(var n in t)e+=K0(t[n],n,0);return e}var Al=function(){};Al.ObjTree=function(){return this};Al.ObjTree.VERSION="0.23";Al.ObjTree.prototype.xmlDecl=`<?xml version="1.0" encoding="UTF-8" ?>
|
|||
|
|
`;Al.ObjTree.prototype.attr_prefix="-";Al.ObjTree.prototype.parseXML=function(t){var e;if(window.DOMParser){var n=new DOMParser,o=n.parseFromString(t,"application/xml");if(!o)return;e=o.documentElement}else window.ActiveXObject&&(n=new ActiveXObject("Microsoft.XMLDOM"),n.async=!1,n.loadXML(t),e=n.documentElement);if(e)return this.parseDOM(e)};Al.ObjTree.prototype.parseHTTP=function(t,e,n){var o={};for(var r in e)o[r]=e[r];if(o.method||(typeof o.postBody>"u"&&typeof o.postbody>"u"&&typeof o.parameters>"u"?o.method="get":o.method="post"),n){o.asynchronous=!0;var i=this,a=n,l=o.onComplete;o.onComplete=function(h){var v;h&&h.responseXML&&h.responseXML.documentElement&&(v=i.parseDOM(h.responseXML.documentElement)),a(v,h),l&&l(h)}}else o.asynchronous=!1;var s;if(typeof HTTP<"u"&&HTTP.Request){o.uri=t;var f=new HTTP.Request(o);f&&(s=f.transport)}else if(typeof Ajax<"u"&&Ajax.Request){var f=new Ajax.Request(t,o);f&&(s=f.transport)}if(n)return s;if(s&&s.responseXML&&s.responseXML.documentElement)return this.parseDOM(s.responseXML.documentElement)};Al.ObjTree.prototype.parseDOM=function(t){if(t){if(this.__force_array={},this.force_array)for(var e=0;e<this.force_array.length;e++)this.__force_array[this.force_array[e]]=1;var n=this.parseElement(t);if(this.__force_array[t.nodeName]&&(n=[n]),t.nodeType!=11){var o={};o[t.nodeName]=n,n=o}return n}};Al.ObjTree.prototype.parseElement=function(t){if(t.nodeType!=7){if(t.nodeType==3||t.nodeType==4||t.nodeType==8){var e=t.nodeValue.match(/[^\x00-\x20]/);return e==null?void 0:t.nodeValue}var n=null,o={};if(t.attributes&&t.attributes.length){n={};for(var r=0;r<t.attributes.length;r++){var i=t.attributes[r].nodeName;if(typeof i=="string"){var a=t.attributes[r].nodeValue;try{a=JSON.parse(t.attributes[r].nodeValue.replace(/'/g,'"'))}catch{a=t.attributes[r].nodeValue}a&&(i=this.attr_prefix+i,typeof o[i]>"u"&&(o[i]=0),o[i]++,this.addNode(n,i,o[i],a))}}}if(t.childNodes&&t.childNodes.length){var l=!0;n&&(l=!1);for(var r=0;r<t.childNodes.length&&l;r++){var s=t.childNodes[r].nodeType;s==3||s==4||s==8||(l=!1)}if(l){n||(n="");for(var r=0;r<t.childNodes.length;r++)n+=t.childNodes[r].nodeValue}else{n||(n={});for(var r=0;r<t.childNodes.length;r++){var i=t.childNodes[r].nodeName;if(typeof i=="string"){var a=this.parseElement(t.childNodes[r]);a&&(typeof o[i]>"u"&&(o[i]=0),o[i]++,this.addNode(n,i,o[i],a))}}}}else n===null&&(n={});return n}};Al.ObjTree.prototype.addNode=function(t,e,n,o){this.__force_array[e]?(n==1&&(t[e]=[]),t[e][t[e].length]=o):n==1?t[e]=o:n==2?t[e]=[t[e],o]:t[e][t[e].length]=o};Al.ObjTree.prototype.writeXML=function(t){var e=this.hash_to_xml(null,t);return this.xmlDecl+e};Al.ObjTree.prototype.hash_to_xml=function(t,e){var n=[],o=[];for(var r in e)if(e.hasOwnProperty(r)){var i=e[r];r.charAt(0)!=this.attr_prefix?typeof i>"u"||i==null?n[n.length]="<"+r+" />":typeof i=="object"&&i.constructor==Array?n[n.length]=this.array_to_xml(r,i):typeof i=="object"?n[n.length]=this.hash_to_xml(r,i):n[n.length]=this.scalar_to_xml(r,i):o[o.length]=" "+r.substring(1)+'="'+this.xml_escape(i)+'"'}var a=o.join(""),l=n.join("");return typeof t>"u"||t==null||(n.length>0?l.match(/\n/)?l="<"+t+a+`>
|
|||
|
|
`+l+"</"+t+`>
|
|||
|
|
`:l="<"+t+a+">"+l+"</"+t+`>
|
|||
|
|
`:l="<"+t+a+` />
|
|||
|
|
`),l};Al.ObjTree.prototype.array_to_xml=function(t,e){for(var n=[],o=0;o<e.length;o++){var r=e[o];typeof r>"u"||r==null?n[n.length]="<"+t+" />":typeof r=="object"&&r.constructor==Array?n[n.length]=this.array_to_xml(t,r):typeof r=="object"?n[n.length]=this.hash_to_xml(t,r):n[n.length]=this.scalar_to_xml(t,r)}return n.join("")};Al.ObjTree.prototype.scalar_to_xml=function(t,e){return t=="#text"?this.xml_escape(e):"<"+t+">"+this.xml_escape(e)+"</"+t+`>
|
|||
|
|
`};Al.ObjTree.prototype.xml_escape=Zw;var wte=function(t){return new Al.ObjTree().parseXML(t)},Ete=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,r){o.__proto__=r}||function(o,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(o[i]=r[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function o(){this.constructor=e}e.prototype=n===null?Object.create(n):(o.prototype=n.prototype,new o)}})(),f2=function(){return f2=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},f2.apply(this,arguments)},JE=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var o=n.call(t),r,i=[],a;try{for(;(e===void 0||e-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(l){a={error:l}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},Xd;(function(t){t.START="bpmn:startEvent",t.END="bpmn:endEvent",t.GATEWAY="bpmn:exclusiveGateway",t.USER="bpmn:userTask",t.SYSTEM="bpmn:serviceTask",t.FLOW="bpmn:sequenceFlow"})(Xd||(Xd={}));var F3=["-name","-id","bpmn:incoming","bpmn:outgoing","-sourceRef","-targetRef"],Yk=["properties","startPoint","endPoint","pointsList"],B3=function(t){return String(t||"").replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&").replace(/"/g,'"').replace(/'/g,"'")};function qk(t){var e=t?Yk.concat(t):Yk;return function(n){function o(r){var i={};return typeof r=="string"?r:Array.isArray(r)?r.map(function(a){return o(a)}):(Object.entries(r).forEach(function(a){var l=JE(a,2),s=l[0],f=l[1];typeof f!="object"?s.indexOf("-")===0||["#text","#cdata-section","#comment"].includes(s)?i[s]=f:i["-".concat(s)]=f:e.includes(s)?i["-".concat(s)]=o(f):i[s]=o(f)}),i)}return o(n)}}function Jw(t){var e={};return Object.entries(t).forEach(function(n){var o=JE(n,2),r=o[0],i=o[1];r.indexOf("-")===0?e[r.substring(1)]=Kw(i):typeof i=="string"?e[r]=i:Object.prototype.toString.call(i)==="[object Object]"?e[r]=Jw(i):Array.isArray(i)?e[r]=i.map(function(a){return Jw(a)}):e[r]=i}),e}function xte(t,e,n){var o=new Map;e.nodes.forEach(function(i){var a,l={"-id":i.id};if(!((a=i.text)===null||a===void 0)&&a.value&&(l["-name"]=i.text.value),i.properties){var s=qk(n)(i.properties);Object.assign(l,s)}o.set(i.id,l),t[i.type]?Array.isArray(t[i.type])?t[i.type].push(l):t[i.type]=[t[i.type],l]:t[i.type]=l});var r=e.edges.map(function(i){var a,l,s=o.get(i.targetNodeId);s["bpmn:incoming"]?Array.isArray(s["bpmn:incoming"])?s["bpmn:incoming"].push(i.id):s["bpmn:incoming"]=[s["bpmn:incoming"],i.id]:s["bpmn:incoming"]=i.id;var f={"-id":i.id,"-sourceRef":i.sourceNodeId,"-targetRef":i.targetNodeId};if(!((a=i.text)===null||a===void 0)&&a.value&&(f["-name"]=(l=i.text)===null||l===void 0?void 0:l.value),i.properties){var h=qk(n)(i.properties);Object.assign(f,h)}return f});e.edges.forEach(function(i){var a=o.get(i.sourceNodeId);a["bpmn:outgoing"]?Array.isArray(a["bpmn:outgoing"])?a["bpmn:outgoing"].push(i.id):a["bpmn:outgoing"]=[a["bpmn:outgoing"],i.id]:a["bpmn:outgoing"]=i.id}),t[Xd.FLOW]=r}function Ote(t,e){t["bpmndi:BPMNEdge"]=e.edges.map(function(n){var o,r=n.id,i=n.pointsList.map(function(l){var s=l.x,f=l.y;return{"-x":s,"-y":f}}),a={"-id":"".concat(r,"_di"),"-bpmnElement":r,"di:waypoint":i};return!((o=n.text)===null||o===void 0)&&o.value&&(a["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}}),a}),t["bpmndi:BPMNShape"]=e.nodes.map(function(n){var o,r=n.id,i=100,a=80,l=n.x,s=n.y,f=Fh.shapeConfigMap.get(n.type);f&&(i=f.width,a=f.height),l-=i/2,s-=a/2;var h={"-id":"".concat(r,"_di"),"-bpmnElement":r,"dc:Bounds":{"-x":l,"-y":s,"-width":i,"-height":a}};return!((o=n.text)===null||o===void 0)&&o.value&&(h["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}})
|
|||
|
|
`).forEach(function(w){i<w.length&&(i=w.length)}),r)n={value:o,x:Number(r["-x"])+i*10/2,y:Number(r["-y"])+7};else{var a=t["di:waypoint"]||[],l=a[0],s=a[a.length-1]||l,f=(Number((l==null?void 0:l["-x"])||0)+Number((s==null?void 0:s["-x"])||0))/2,h=(Number((l==null?void 0:l["-y"])||0)+Number((s==null?void 0:s["-y"])||0))/2;n={value:o,x:f,y:h}}}var v;Object.entries(e).forEach(function(w){var O=JE(w,2),E=O[0],S=O[1];F3.indexOf(E)===-1&&(v||(v={}),v[E]=S)}),v&&(v=Jw(v));var b={id:e["-id"],type:Xd.FLOW,pointsList:t["di:waypoint"].map(function(w){return{x:Number(w["-x"]),y:Number(w["-y"])}}),sourceNodeId:e["-sourceRef"],targetNodeId:e["-targetRef"],properties:v};return n&&(b.text=n),b}var Fh=(function(){function t(e){var n=e.lf,o=this;this.adapterOut=function(r,i){var a=f2({},o.processAttributes);xte(a,r,i);var l={"-id":"BPMNPlane_1","-bpmnElement":a["-id"]};Ote(l,r);var s=o.definitionAttributes;s["bpmn:process"]=a,s["bpmndi:BPMNDiagram"]={"-id":"BPMNDiagram_1","bpmndi:BPMNPlane":l};var f={"bpmn:definitions":s};return f},this.adapterIn=function(r){if(r)return Ste(r)},n.adapterIn=function(r){return o.adapterIn(r)},n.adapterOut=function(r,i){return o.adapterOut(r,i)},this.processAttributes={"-isExecutable":"true","-id":"Process_".concat(Xk())},this.definitionAttributes={"-id":"Definitions_".concat(Xk()),"-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 t.prototype.setCustomShape=function(e,n){t.shapeConfigMap.set(e,n)},t.pluginName="bpmn-adapter",t.shapeConfigMap=new Map,t})();Fh.shapeConfigMap.set(Xd.START,{width:gP.width,height:gP.height});Fh.shapeConfigMap.set(Xd.END,{width:yP.width,height:yP.height});Fh.shapeConfigMap.set(Xd.GATEWAY,{width:_P.width,height:_P.height});Fh.shapeConfigMap.set(Xd.SYSTEM,{width:bP.width,height:bP.height});Fh.shapeConfigMap.set(Xd.USER,{width:wP.width,height:wP.height});(function(t){Ete(e,t);function e(n){var o=t.call(this,n)||this;o.adapterXmlIn=function(i){var a=typeof i=="string"?o.sanitizeNameAttributes(i):i,l=wte(a);return o.adapterIn(l)},o.adapterXmlOut=function(i,a){var l=o.adapterOut(i,a);return bte(l)};var r=n.lf;return r.adapterIn=o.adapterXmlIn,r.adapterOut=o.adapterXmlOut,o}return e.prototype.sanitizeNameAttributes=function(n){return n.replace(/name="([^"]*)"/g,function(o,r){var i=r.replace(/&(?!#?\w+;)/g,"&").replace(/</g,"<").replace(/>/g,">");return'name="'.concat(i,'"')})},e.pluginName="bpmnXmlAdapter",e})(Fh);var Tte=(function(){function t(){globalThis._ids=this,this._ids=new Set}return t.prototype.generateId=function(){var e="xxxxxxx".replace(/[x]/g,function(n){var o=Math.random()*16|0,r=n==="x"?o:o&3|8;return r.toString(16)});return e},t.prototype.next=function(){for(var e=this.generateId();this._ids.has(e);)e=this.generateId();return this._ids.add(e),e},t})(),Cte=(globalThis==null?void 0:globalThis._ids)||new Tte;function Nte(){return Cte.next()}Lr("circle",{cx:18,cy:18,r:11,style:"stroke-linecap: round;stroke-linejoin: round;stroke: rgb(34, 36, 42);stroke-width: 2px;fill: white"}),Lr("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;"}),Lr("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;"}),Lr("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;"}),Lr("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;"}),Lr("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rot
|
|||
|
|
`;function Z0(t,e,n){var o=cR(n),r="",i=dR+o;if(e==="-json")return"";if(e==="#text")return i+rE(String(t));if(e==="#cdata-section")return"".concat(i,"<![CDATA[").concat(t,"]]>");if(e==="#comment")return"".concat(i,"<!--").concat(t,"-->");if(t!==0&&t!==!1&&!t)return"".concat(i,"<").concat(e," />");if("".concat(e).charAt(0)==="-")return" ".concat(e.substring(1),'="').concat(Vte(t),'"');if(Array.isArray(t))r+=t.map(function(f){return Z0(f,e,n+1)}).join("");else if(H3(t)==="[object Object]"){var a=Object.keys(t),l="",s=t["-json"]?dR+cR(n+1)+t["-json"]:"";r+="".concat(n===0?"":i,"<").concat(e),a.forEach(function(f){f.charAt(0)==="-"?l+=Z0(t[f],f,n+1):s+=Z0(t[f],f,n+1)}),r+=l+(s!==""?">".concat(s).concat(i,"</").concat(e,">"):" />")}else r+="".concat(i,"<").concat(e,">").concat(rE(String(t)),"</").concat(e,">");return r}function Wte(t){var e="";for(var n in t)e+=Z0(t[n],n,0);return e}var Ml=function(){};Ml.ObjTree=function(){return this};Ml.ObjTree.VERSION="0.23";Ml.ObjTree.prototype.xmlDecl=`<?xml version="1.0" encoding="UTF-8" ?>
|
|||
|
|
`;Ml.ObjTree.prototype.attr_prefix="-";Ml.ObjTree.prototype.parseXML=function(t){var e;if(window.DOMParser){var n=new DOMParser,o=n.parseFromString(t,"application/xml");if(!o)return;e=o.documentElement}else window.ActiveXObject&&(n=new ActiveXObject("Microsoft.XMLDOM"),n.async=!1,n.loadXML(t),e=n.documentElement);if(e){var r=this.parseDOM(e);return r}};Ml.ObjTree.prototype.parseHTTP=function(t,e,n){var o={};for(var r in e)o[r]=e[r];if(o.method||(typeof o.postBody>"u"&&typeof o.postbody>"u"&&typeof o.parameters>"u"?o.method="get":o.method="post"),n){o.asynchronous=!0;var i=this,a=n,l=o.onComplete;o.onComplete=function(h){var v;h&&h.responseXML&&h.responseXML.documentElement&&(v=i.parseDOM(h.responseXML.documentElement)),a(v,h),l&&l(h)}}else o.asynchronous=!1;var s;if(typeof HTTP<"u"&&HTTP.Request){o.uri=t;var f=new HTTP.Request(o);f&&(s=f.transport)}else if(typeof Ajax<"u"&&Ajax.Request){var f=new Ajax.Request(t,o);f&&(s=f.transport)}if(n)return s;if(s&&s.responseXML&&s.responseXML.documentElement)return this.parseDOM(s.responseXML.documentElement)};Ml.ObjTree.prototype.parseDOM=function(t){if(t){if(this.__force_array={},this.force_array)for(var e=0;e<this.force_array.length;e++)this.__force_array[this.force_array[e]]=1;var n=this.parseElement(t);if(this.__force_array[t.nodeName]&&(n=[n]),t.nodeType!==11){var o={};o[t.nodeName]=n,n=o}return n}};Ml.ObjTree.prototype.parseElement=function(t){if(t.nodeType!==7){if(t.nodeType===3||t.nodeType===4||t.nodeType===8){var e=t.nodeValue.match(/[^\x00-\x20]/);return e==null?void 0:t.nodeValue}var n=null,o={};if(t.attributes&&t.attributes.length){n={};for(var r=0;r<t.attributes.length;r++){var i=t.attributes[r].nodeName;if(typeof i=="string"){var a=t.attributes[r].nodeValue;try{a=JSON.parse(t.attributes[r].nodeValue.replace(/'/g,'"'))}catch{a=t.attributes[r].nodeValue}a!=null&&(i=this.attr_prefix+i,typeof o[i]>"u"&&(o[i]=0),o[i]++,this.addNode(n,i,o[i],a))}}}if(t.childNodes&&t.childNodes.length){var l=!0;n&&(l=!1);for(var r=0;r<t.childNodes.length&&l;r++){var s=t.childNodes[r].nodeType;s===3||s===4||s===8||(l=!1)}if(l){n||(n="");for(var r=0;r<t.childNodes.length;r++)n+=t.childNodes[r].nodeValue}else{n||(n={});for(var r=0;r<t.childNodes.length;r++){var i=t.childNodes[r].nodeName;if(typeof i=="string"){var a=this.parseElement(t.childNodes[r]);a&&(typeof o[i]>"u"&&(o[i]=0),o[i]++,this.addNode(n,i,o[i],a))}}}}else n===null&&(n={});return n}};Ml.ObjTree.prototype.addNode=function(t,e,n,o){this.__force_array[e]?(n===1&&(t[e]=[]),t[e][t[e].length]=o):n===1?t[e]=o:n===2?t[e]=[t[e],o]:t[e][t[e].length]=o};Ml.ObjTree.prototype.writeXML=function(t){var e=this.hash_to_xml(null,t);return this.xmlDecl+e};Ml.ObjTree.prototype.hash_to_xml=function(t,e){var n=[],o=[];for(var r in e)if(pw(e,r)){var i=e[r];r.charAt(0)!==this.attr_prefix?typeof i>"u"||i==null?n[n.length]="<".concat(r," />"):typeof i=="object"&&i.constructor===Array?n[n.length]=this.array_to_xml(r,i):typeof i=="object"?n[n.length]=this.hash_to_xml(r,i):n[n.length]=this.scalar_to_xml(r,i):o[o.length]=" ".concat(r.substring(1),'="').concat(this.xml_escape(i),'"')}var a=o.join(""),l=n.join("");return typeof t>"u"||t==null||(n.length>0?l.match(/\n/)?l="<".concat(t).concat(a,`>
|
|||
|
|
`).concat(l,"</").concat(t,`>
|
|||
|
|
`):l="<".concat(t).concat(a,">").concat(l,"</").concat(t,`>
|
|||
|
|
`):l="<".concat(t).concat(a,` />
|
|||
|
|
`)),l};Ml.ObjTree.prototype.array_to_xml=function(t,e){for(var n=[],o=0;o<e.length;o++){var r=e[o];typeof r>"u"||r==null?n[n.length]="<".concat(t," />"):typeof r=="object"&&r.constructor===Array?n[n.length]=this.array_to_xml(t,r):typeof r=="object"?n[n.length]=this.hash_to_xml(t,r):n[n.length]=this.scalar_to_xml(t,r)}return n.join("")};Ml.ObjTree.prototype.scalar_to_xml=function(t,e){return t==="#text"?this.xml_escape(e):"<".concat(t,">").concat(this.xml_escape(e),"</").concat(t,`>
|
|||
|
|
`)};Ml.ObjTree.prototype.xml_escape=rE;var Gte=function(t){return new Ml.ObjTree().parseXML(t)},zte=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,r){o.__proto__=r}||function(o,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(o[i]=r[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function o(){this.constructor=e}e.prototype=n===null?Object.create(n):(o.prototype=n.prototype,new o)}})(),h2=function(){return h2=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},h2.apply(this,arguments)},fR=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]]);return n},RM=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],o=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&o>=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ks=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var o=n.call(t),r,i=[],a;try{for(;(e===void 0||e-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(l){a={error:l}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},zc=function(t,e,n){if(n||arguments.length===2)for(var o=0,r=e.length,i;o<r;o++)(i||!(o in e))&&(i||(i=Array.prototype.slice.call(e,0,o)),i[o]=e[o]);return t.concat(i||Array.prototype.slice.call(e))},Ol;(function(t){t.START="bpmn:startEvent",t.END="bpmn:endEvent",t.INTERMEDIATE_CATCH="bpmn:intermediateCatchEvent",t.INTERMEDIATE_THROW="bpmn:intermediateThrowEvent",t.BOUNDARY="bpmn:boundaryEvent",t.PARALLEL_GATEWAY="bpmn:parallelGateway",t.INCLUSIVE_GATEWAY="bpmn:inclusiveGateway",t.EXCLUSIVE_GATEWAY="bpmn:exclusiveGateway",t.USER="bpmn:userTask",t.SYSTEM="bpmn:serviceTask",t.FLOW="bpmn:sequenceFlow",t.SUBPROCESS="bpmn:subProcess"})(Ol||(Ol={}));var X3=["-name","-id","bpmn:incoming","bpmn:outgoing","-sourceRef","-targetRef","-children"],Hte=["properties","startPoint","endPoint","pointsList"],oE={in:[],out:["properties.panels","properties.nodeSize","properties.definitionId","properties.timerValue","properties.timerType","properties.definitionType","properties.parent","properties.isBoundaryEventTouchingTask"]},Y3=function(t,e){var n=Object.keys(e||{});return n.forEach(function(o){if(t[o]){var r=e[o],i=r.in,a=r.out;i&&(t[o].in=i),a&&(t[o].out=a)}else t[o]=e[o]}),t},Hu={"bpmn:startEvent":{out:function(t){var e,n,o=t.properties;return((n=(e=Hu[o.definitionType])===null||e===void 0?void 0:e.out)===null||n===void 0?void 0:n.call(e,t))||{}}},"bpmn:intermediateCatchEvent":{out:function(t){var e,n,o=t.properties;return((n=(e=Hu[o.definitionType])===null||e===void 0?void 0:e.out)===null||n===void 0?void 0:n.call(e,t))||{}}},"bpmn:intermediateThrowEvent":{out:function(t){var e,n,o=t.properties;return((n=(e=Hu[o.definitionType])===null||e===void 0?void 0:e.out)===null||n===void 0?void 0:n.call(e,t))||{}}},"bpmn:boundaryEvent":{out:function(t){var e,n,o=t.properties;return((n=(e=Hu[o.definitionType])===null||e===void 0?void 0:e.out)===null||n===void 0?void 0:n.call(e,t))||{}}},"bpmn:sequenceFlow":{out:function(t){var e=t.properties,n=e.expressionType,o=e.condition;return o?n==="cdata"?{json:'<bpmn:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[${'.concat(o,"}]]></bpmn:conditionExpression>")}:{json:'<bpmn:conditionExpression xsi:type="bpmn2:tFormalExpression">'.concat(o,"</bpmn:conditionExpression>")}:{json:""}}},"bpmn:timerEventDefinition":{out:function(t){var e=t.properties,n=e.timerType,o=e.timerValue,r=e.definitionId,i=function(){return"<bpmn:".c
|
|||
|
|
`).forEach(function(f){i<f.length&&(i=f.length)}),n={value:o,x:Number(r["-x"])+i*10/2,y:Number(r["-y"])+7}}var a={};Object.entries(e).forEach(function(f){var h=Ks(f,2),v=h[0],b=h[1];X3.includes(v)||(a[v]=b)}),a=iE(a);var l=t["di:waypoint"].map(function(f){return{x:Number(f["-x"]),y:Number(f["-y"])}}),s={id:e["-id"],type:Ol.FLOW,pointsList:l,sourceNodeId:e["-sourceRef"],targetNodeId:e["-targetRef"],properties:a};return n&&(s.text=n),s}var ql=(function(){function t(e){var n=e.lf,o=this;this.adapterOut=function(r,i){var a,l,s=h2({},o.processAttributes);Yte(s,r,i);var f={"-id":"BPMNPlane_1","-bpmnElement":s["-id"]};qte(f,r);var h=o.definitionAttributes;h["bpmn:process"]=s,h["bpmndi:BPMNDiagram"]={"-id":"BPMNDiagram_1","bpmndi:BPMNPlane":f};var v={"bpmn:definitions":h};if(!((a=i==null?void 0:i.mapping)===null||a===void 0)&&a.out){var b=(l=i==null?void 0:i.mapping)===null||l===void 0?void 0:l.out,w=function(O){Array.isArray(O)&&O.forEach(function(E){return w(E)}),typeof O=="object"&&Object.keys(O).forEach(function(E){var S;(S=b[E])?(O[S]=ge.cloneDeep(O[E]),delete O[E],w(O[S])):w(O[E])})};w(v)}return v},this.adapterIn=function(r,i){if(r)return Zte(r,i)},n.adapterIn=this.adapterIn,n.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 t.prototype.setCustomShape=function(e,n){t.shapeConfigMap.set(e,n)},t.pluginName="bpmn-adapter",t.shapeConfigMap=new Map,t})();ql.shapeConfigMap.set(Ol.START,{width:tR.width,height:tR.height});ql.shapeConfigMap.set(Ol.END,{width:nR.width,height:nR.height});ql.shapeConfigMap.set(Ol.INTERMEDIATE_CATCH,{width:tE.width,height:tE.height});ql.shapeConfigMap.set(Ol.INTERMEDIATE_THROW,{width:tE.width,height:tE.height});ql.shapeConfigMap.set(Ol.BOUNDARY,{width:rR.width,height:rR.height});ql.shapeConfigMap.set(Ol.PARALLEL_GATEWAY,{width:oR.width,height:oR.height});ql.shapeConfigMap.set(Ol.INCLUSIVE_GATEWAY,{width:iR.width,height:iR.height});ql.shapeConfigMap.set(Ol.EXCLUSIVE_GATEWAY,{width:aR.width,height:aR.height});ql.shapeConfigMap.set(Ol.SYSTEM,{width:sR.width,height:sR.height});ql.shapeConfigMap.set(Ol.USER,{width:lR.width,height:lR.height});ql.shapeConfigMap.set(Ol.SUBPROCESS,{width:uR.width,height:uR.height});(function(t){zte(e,t);function e(n){var o=t.call(this,n)||this;o.adapterXmlIn=function(a){var l=Gte(a);return o.adapterIn(l,o.props)},o.adapterXmlOut=function(a){var l=o.adapterOut(a,o.props);return Wte(l)};var r=n.lf,i=n.props;return r.adapterIn=o.adapterXmlIn,r.adapterOut=o.adapterXmlOut,o.props=i,o}return e.pluginName="BPMNAdapter",e})(ql);function ene(t,e,n){var o=e.x,r=e.y,i=t.x,a=t.y,l=i-o,s=a-r,f=l*Math.cos(n)-s*Math.sin(n),h=l*Math.sin(n)+s*Math.cos(n),v=f+o,b=h+r;return{x:v,y:b}}var tne=(function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,r){o.__proto__=r}||function(o,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(o[i]=r[i])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function o(){this.constructor=e}e.prototype=n===null?Object.create(n):(o.prototype=n.prototype,new o)}})(),aE=function(){return aE=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},aE.apply(this,arguments)},nne=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var o=n.call(t),r,i=[],a;try{for(;(e===void 0||e-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(l){a={error:l}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.er
|
|||
|
|
`,"\r"," "," "," "," "," ","\u2028","\u2029"],o="com|net|org|edu|gov|mil|aero|asia|biz|cat|coop|info|int|jobs|mobi|museum|name|post|pro|tel|travel|xxx|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cs|cu|cv|cx|cy|cz|dd|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|ja|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw",r="(((?:(https?://|ftps?://|nntp://)|www\\d{0,3}[.]|[a-z0-9.\\-]+[.]("+o+")\\/)\\S+(?:[^\\s`!\\[\\]{};:'\".,?«»“”‘’])))|(([a-z0-9\\-]+\\.)?[a-z0-9\\-]+\\.("+o+"))",i=new RegExp("^("+o+")$","i"),a=new RegExp(r,"gi");function l(f){return!e.util.getClosestTag(f,"a")}var s=e.Extension.extend({init:function(){e.Extension.prototype.init.apply(this,arguments),this.disableEventHandling=!1,this.subscribe("editableKeypress",this.onKeypress.bind(this)),this.subscribe("editableBlur",this.onBlur.bind(this)),this.document.execCommand("AutoUrlDetect",!1,!1)},isLastInstance:function(){for(var f=0,h=0;h<this.window._mediumEditors.length;h++){var v=this.window._mediumEditors[h];v!==null&&v.getExtensionByName("autoLink")!==void 0&&f++}return f===1},destroy:function(){this.document.queryCommandSupported("AutoUrlDetect")&&this.isLastInstance()&&this.document.execCommand("AutoUrlDetect",!1,!0)},onBlur:function(f,h){this.performLinking(h)},onKeypress:function(f){this.disableEventHandling||e.util.isKey(f,[e.util.keyCode.SPACE,e.util.keyCode.ENTER])&&(clearTimeout(this.performLinkingTimeout),this.performLinkingTimeout=setTimeout((function(){try{var h=this.base.exportSelection();this.performLinking(f.target)&&this.base.importSelection(h,!0)}catch(v){window.console&&window.console.error("Failed to perform linking",v),this.disableEventHandling=!0}}).bind(this),0))},performLinking:function(f){var h=e.util.splitByBlockElements(f),v=!1;h.length===0&&(h=[f]);for(var b=0;b<h.length;b++)v=this.removeObsoleteAutoLinkSpans(h[b])||v,v=this.performLinkingWithinElement(h[b])||v;return this.base.events.updateInput(f,{target:f,currentTarget:f}),v},removeObsoleteAutoLinkSpans:function(f){if(!f||f.nodeType===3)return!1;for(var h=f.querySelectorAll('span[data-auto-link="true"]'),v=!1,b=0;b<h.length;b++){var w=h[b].textContent;if(w.indexOf("://")===-1&&(w=e.util.ensureUrlHasProtocol(w)),h[b].getAttribute("data-href")!==w&&l(h[b])){v=!0;var O=w.replace(/\s+$/,"");if(h[b].getAttribute("data-href")===O){var E=w.length-O.length,S=e.util.splitOffDOMTree(h[b],this.splitTextBeforeEnd(h[b],E));h[b].parentNode.insertBefore(S,h[b].nextSibling)}else e.util.unwrap(h[b],this.document)}}return v},splitTextBeforeEnd:function(f,h){for(var v=this.document.createTreeWalker(f,NodeFilter.SHOW_TEXT,null,!1),b=!0;b;)b=v.lastChild()!==null;for(var w,O,E;h>0&&E!==null;)w=v.currentNode,O=w.nodeValue,O.length>h?(E=w.splitText(O.length-h),h=0):(E=v.previousNode(),h-=O.length);return E},performLinkingWithinElement:function(f){for(var h=this.findLinkableText(f),v=!1,b=0;b<h.length;b++){var w=e.util.findOrCreateMatchingTextNodes(this.document,f,h[b]);this.shouldNotLink(w)||this.createAutoLink(w,h[b].href)}return v},shouldNotLink:function(f){for(var h=!1,v=0;v<f.length&&h===!1;v++)h=!!e.util.traverseUp(f[v],function(b){return b.nodeName.toLowerCase()==="a"||b.getAttribute&&b.getAttribute("data-auto-link")==="true"});return h},findLinkableText:function(f){for(var h=f.textContent,v=null,b=[];(v=a.exec(h))!==null;){var w=!0,O=v.index+v[0].length;w=(v.index===0||n.indexOf(h[v.index-1])!==-1)&&(O===h.length||n.indexOf(h[O])!==-1),w=w&&(v[0].indexOf("/")!==-1||i.test(v[0].split(".").po
|
|||
|
|
* vanilla-picker v2.12.3
|
|||
|
|
* https://vanilla-picker.js.org
|
|||
|
|
*
|
|||
|
|
* Copyright 2017-2024 Andreas Borgen (https://github.com/Sphinxxxx), Adam Brooks (https://github.com/dissimulate)
|
|||
|
|
* Released under the ISC license.
|
|||
|
|
*/var DM=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},jM=(function(){function t(e,n){for(var o=0;o<n.length;o++){var r=n[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}})(),D0=(function(){function t(e,n){var o=[],r=!0,i=!1,a=void 0;try{for(var l=e[Symbol.iterator](),s;!(r=(s=l.next()).done)&&(o.push(s.value),!(n&&o.length===n));r=!0);}catch(f){i=!0,a=f}finally{try{!r&&l.return&&l.return()}finally{if(i)throw a}}return o}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})();String.prototype.startsWith=String.prototype.startsWith||function(t){return this.indexOf(t)===0};String.prototype.padStart=String.prototype.padStart||function(t,e){for(var n=this;n.length<t;)n=e+n;return n};var yne={cb:"0f8ff",tqw:"aebd7",q:"-ffff",qmrn:"7fffd4",zr:"0ffff",bg:"5f5dc",bsq:"e4c4",bck:"---",nch:"ebcd",b:"--ff",bvt:"8a2be2",brwn:"a52a2a",brw:"deb887",ctb:"5f9ea0",hrt:"7fff-",chcT:"d2691e",cr:"7f50",rnw:"6495ed",crns:"8dc",crms:"dc143c",cn:"-ffff",Db:"--8b",Dcn:"-8b8b",Dgnr:"b8860b",Dgr:"a9a9a9",Dgrn:"-64-",Dkhk:"bdb76b",Dmgn:"8b-8b",Dvgr:"556b2f",Drng:"8c-",Drch:"9932cc",Dr:"8b--",Dsmn:"e9967a",Dsgr:"8fbc8f",DsTb:"483d8b",DsTg:"2f4f4f",Dtrq:"-ced1",Dvt:"94-d3",ppnk:"1493",pskb:"-bfff",mgr:"696969",grb:"1e90ff",rbrc:"b22222",rwht:"af0",stg:"228b22",chs:"-ff",gnsb:"dcdcdc",st:"8f8ff",g:"d7-",gnr:"daa520",gr:"808080",grn:"-8-0",grnw:"adff2f",hnw:"0fff0",htpn:"69b4",nnr:"cd5c5c",ng:"4b-82",vr:"0",khk:"0e68c",vnr:"e6e6fa",nrb:"0f5",wngr:"7cfc-",mnch:"acd",Lb:"add8e6",Lcr:"08080",Lcn:"e0ffff",Lgnr:"afad2",Lgr:"d3d3d3",Lgrn:"90ee90",Lpnk:"b6c1",Lsmn:"a07a",Lsgr:"20b2aa",Lskb:"87cefa",LsTg:"778899",Lstb:"b0c4de",Lw:"e0",m:"-ff-",mgrn:"32cd32",nn:"af0e6",mgnt:"-ff",mrn:"8--0",mqm:"66cdaa",mmb:"--cd",mmrc:"ba55d3",mmpr:"9370db",msg:"3cb371",mmsT:"7b68ee","":"-fa9a",mtr:"48d1cc",mmvt:"c71585",mnLb:"191970",ntc:"5fffa",mstr:"e4e1",mccs:"e4b5",vjw:"dead",nv:"--80",c:"df5e6",v:"808-0",vrb:"6b8e23",rng:"a5-",rngr:"45-",rch:"da70d6",pgnr:"eee8aa",pgrn:"98fb98",ptrq:"afeeee",pvtr:"db7093",ppwh:"efd5",pchp:"dab9",pr:"cd853f",pnk:"c0cb",pm:"dda0dd",pwrb:"b0e0e6",prp:"8-080",cc:"663399",r:"--",sbr:"bc8f8f",rb:"4169e1",sbrw:"8b4513",smn:"a8072",nbr:"4a460",sgrn:"2e8b57",ssh:"5ee",snn:"a0522d",svr:"c0c0c0",skb:"87ceeb",sTb:"6a5acd",sTgr:"708090",snw:"afa",n:"-ff7f",stb:"4682b4",tn:"d2b48c",t:"-8080",thst:"d8bfd8",tmT:"6347",trqs:"40e0d0",vt:"ee82ee",whT:"5deb3",wht:"",hts:"5f5f5",w:"-",wgrn:"9acd32"};function gR(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,n=e>0?t.toFixed(e).replace(/0+$/,"").replace(/\.$/,""):t.toString();return n||"0"}var _ne=(function(){function t(e,n,o,r){DM(this,t);var i=this;function a(s){if(s.startsWith("hsl")){var f=s.match(/([\-\d\.e]+)/g).map(Number),h=D0(f,4),v=h[0],b=h[1],w=h[2],O=h[3];O===void 0&&(O=1),v/=360,b/=100,w/=100,i.hsla=[v,b,w,O]}else if(s.startsWith("rgb")){var E=s.match(/([\-\d\.e]+)/g).map(Number),S=D0(E,4),M=S[0],C=S[1],$=S[2],D=S[3];D===void 0&&(D=1),i.rgba=[M,C,$,D]}else s.startsWith("#")?i.rgba=t.hexToRgb(s):i.rgba=t.nameToRgb(s)||t.hexToRgb(s)}if(e!==void 0)if(Array.isArray(e))this.rgba=e;else if(o===void 0){var l=e&&""+e;l&&a(l.toLowerCase())}else this.rgba=[e,n,o,r===void 0?1:r]}return jM(t,[{key:"printRGB",value:function(n){var o=n?this.rgba:this.rgba.slice(0,3),r=o.map(function(i,a){return gR(i,a===3?3:0)});return n?"rgba("+r+")":"rgb("+r+")"}},{key:"printHSL",value:function(n){var o=[360,100,100,1],r=["","%","%",""],i=n?this.hsla:this.hsla.slice(0,3),a=i.map(function(l,s){return gR(l*o[s],s===3?3:1)+r[s]});return n?"hsla("+a+")":"hsl("+a+")"}},{key:"printHex",value:function(n){var o=this.hex;return n?o:o.substring(0,7)}},{key:"rgba",get:function(){if(this._rgba)return this._rgba;if(!this._hsla)throw new Error("No color is set");return this._rgba=t.hslToRgb(this._hsla)},set:function(n){n.length
|
|||
|
|
linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em / 2em 2em`,xne=360,q3="keydown",j0="mousedown",gS="focusin";function kd(t,e){return(e||document).querySelector(t)}function One(t){t.preventDefault(),t.stopPropagation()}function yS(t,e,n,o,r){t.add(e,q3,function(i){n.indexOf(i.key)>=0&&o(i)})}var K3=(function(){function t(e){DM(this,t),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,defaultColor:"#0cf"},this._events=new bne,this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(e)}return jM(t,[{key:"setOptions",value:function(n){var o=this;if(!n)return;var r=this.settings;function i(f,h,v){for(var b in f)h[b]=f[b]}if(n instanceof HTMLElement)r.parent=n;else{r.parent&&n.parent&&r.parent!==n.parent&&(this._events.remove(r.parent),this._popupInited=!1),i(n,r),n.onChange&&(this.onChange=n.onChange),n.onDone&&(this.onDone=n.onDone),n.onOpen&&(this.onOpen=n.onOpen),n.onClose&&(this.onClose=n.onClose);var a=n.color||n.colour;a&&this._setColor(a)}var l=r.parent;if(l&&r.popup&&!this._popupInited){var s=function(h){return o.openHandler(h)};this._events.add(l,"click",s),yS(this._events,l,[" ","Spacebar","Enter"],s),this._popupInited=!0}else n.parent&&!r.popup&&this.show()}},{key:"openHandler",value:function(n){if(this.show()){n&&n.preventDefault(),this.settings.parent.style.pointerEvents="none";var o=n&&n.type===q3?this._domEdit:this.domElement;setTimeout(function(){return o.focus()},100),this.onOpen&&this.onOpen(this.colour)}}},{key:"closeHandler",value:function(n){var o=n&&n.type,r=!1;if(!n)r=!0;else if(o===j0||o===gS){var i=(this.__containedEvent||0)+100;n.timeStamp>i&&(r=!0)}else One(n),r=!0;r&&this.hide()&&(this.settings.parent.style.pointerEvents="",o!==j0&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}},{key:"movePopup",value:function(n,o){this.closeHandler(),this.setOptions(n),o&&this.openHandler()}},{key:"setColor",value:function(n,o){this._setColor(n,{silent:o})}},{key:"_setColor",value:function(n,o){if(typeof n=="string"&&(n=n.trim()),!!n){o=o||{};var r=void 0;try{r=new _ne(n)}catch(a){if(o.failSilently)return;throw a}if(!this.settings.alpha){var i=r.hsla;i[3]=1,r.hsla=i}this.colour=this.color=r,this._setHSLA(null,null,null,null,o)}}},{key:"setColour",value:function(n,o){this.setColor(n,o)}},{key:"show",value:function(){var n=this.settings.parent;if(!n)return!1;if(this.domElement){var o=this._toggleDOM(!0);return this._setPosition(),o}var r=this.settings.template||'<div class="picker_wrapper" tabindex="-1"><div class="picker_arrow"></div><div class="picker_hue picker_slider"><div class="picker_selector"></div></div><div class="picker_sl"><div class="picker_selector"></div></div><div class="picker_alpha picker_slider"><div class="picker_selector"></div></div><div class="picker_editor"><input aria-label="Type a color name or hex value"/></div><div class="picker_sample"></div><div class="picker_done"><button>Ok</button></div><div class="picker_cancel"><button>Cancel</button></div></div>',i=wne(r);return this.domElement=i,this._domH=kd(".picker_hue",i),this._domSL=kd(".picker_sl",i),this._domA=kd(".picker_alpha",i),this._domEdit=kd(".picker_editor input",i),this._domSample=kd(".picker_sample",i),this._domOkay=kd(".picker_done button",i),this._domCancel=kd(".picker_cancel button",i),i.classList.add("layout_"+this.settings.layout),this.settings.alpha||i.classList.add("no_alpha"),this.settings.editor||i.classList.add("no_editor"),this.settings.cancelButton||i.classList.add("no_cancel"),this._ifPopup(function(){return i.classList.add("popup")}),this._setPosition(),this.colour?this._updateUI():this._setColor(this.settings.defaultColor),this._bindEvents(),!0}},{key:"hide",value:function(){return this._toggleDOM(!1)}},{key:"destroy",value:function(){this._events.destroy(),this.domElement&&this.settings.parent.removeChild(this.domElement)}},{key:"_bindEvents",value:function(){var n=this,o=this,r=this.domElement,i=this._events;function a(f,h,v){i.add(f,h,v)}a(r,"cl
|
|||
|
|
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 Q=function(){return Q=Object.assign||function(R){for(var L,Z=1,fe=arguments.length;Z<fe;Z++)for(var Re in L=arguments[Z])Object.prototype.hasOwnProperty.call(L,Re)&&(R[Re]=L[Re]);return R},Q.apply(this,arguments)};function J(R){var L=typeof Symbol=="function"&&R[Symbol.iterator],Z=0;return L?L.call(R):{next:function(){return R&&Z>=R.length&&(R=void 0),{value:R&&R[Z++],done:!R}}}}function ie(R,L){var Z=typeof Symbol=="function"&&R[Symbol.iterator];if(!Z)return R;var fe,Re,st=Z.call(R),It=[];try{for(;(L===void 0||L-- >0)&&!(fe=st.next()).done;)It.push(fe.value)}catch(bn){Re={error:bn}}finally{try{fe&&!fe.done&&(Z=st.return)&&Z.call(st)}finally{if(Re)throw Re.error}}return It}function Se(){for(var R=[],L=0;L<arguments.length;L++)R=R.concat(ie(arguments[L]));return R}var Ae=Symbol("mobx did run lazy initializers"),ke=Symbol("mobx pending decorators"),De={},ze={};function Ye(R,L){var Z=L?De:ze;return Z[R]||(Z[R]={configurable:!0,enumerable:L,get:function(){return Be(this),this[R]},set:function(fe){Be(this),this[R]=fe}})}function Be(R){var L,Z;if(R[Ae]!==!0){var fe=R[ke];if(fe){S(R,Ae,!0);var Re=Se(Object.getOwnPropertySymbols(fe),Object.keys(fe));try{for(var st=J(Re),It=st.next();!It.done;It=st.next()){var bn=fe[It.value];bn.propertyCreator(R,bn.prop,bn.descriptor,bn.decoratorTarget,bn.decoratorArguments)}}catch(Jn){L={error:Jn}}finally{try{It&&!It.done&&(Z=st.return)&&Z.call(st)}finally{if(L)throw L.error}}}}}function Je(R,L){return function(){var Z,fe=function(Re,st,It,bn){if(bn===!0)return L(Re,st,It,Re,Z),null;if(!Object.prototype.hasOwnProperty.call(Re,ke)){var Jn=Re[ke];S(Re,ke,Q({},Jn))}return Re[ke][st]={prop:st,propertyCreator:L,descriptor:It,decoratorTarget:Re,decoratorArguments:Z},Ye(st,R)};return gt(arguments)?(Z=l,fe.apply(null,arguments)):(Z=Array.prototype.slice.call(arguments),fe)}}function gt(R){return(R.length===2||R.length===3)&&(typeof R[1]=="string"||typeof R[1]=="symbol")||R.length===4&&R[3]===!0}function se(R,L,Z){return ra(R)?R:Array.isArray(R)?zt.array(R,{name:Z}):E(R)?zt.object(R,void 0,{name:Z}):C(R)?zt.map(R,{name:Z}):$(R)?zt.set(R,{name:Z}):R}function Ze(R){return R}function pe(R){v(R);var L=Je(!0,(function(fe,Re,st,It,bn){var Jn=st?st.initializer?st.initializer.call(fe):st.value:void 0;ss(fe).addObservableProp(Re,Jn,R)})),Z=(i!==void 0&&i.env,L);return Z.enhancer=R,Z}var le={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function we(R){return R==null?le:typeof R=="string"?{name:R,deep:!0,proxy:!0}:R}Object.freeze(le);var $e=pe(se),rt=pe((function(R,L,Z){return R==null||ia(R)||Es(R)||Wi(R)||Ki(R)?R:Array.isArray(R)?zt.array(R,{name:Z,deep:!1}):E(R)?zt.object(R,void 0,{name:Z,deep:!1}):C(R)?zt.map(R,{name:Z,deep:!1}):$(R)?zt.set(R,{name:Z,deep:!1}):h(!1)})),pt=pe(Ze),Lt=pe((function(R,L,Z){return un(R,L)?L:R}));function Jt(R){return R.defaultDecorator?R.defaultDecorator.enhancer:R.deep===!1?Ze:se}var en={box:function(R,L){arguments.length>2&&it("box");var Z=we(L);return new In(R,Jt(Z),Z.name,!0,Z.equals)},array:function(R,L){arguments.length>2&&it("array");var Z=we(L);return Kl(R,Jt(Z),Z.name)},map:function(R,L){arguments.length>2&&it("map");var Z=we(L);return new sf(R,Jt(Z),Z.name)},set:function(R,L){arguments.length>2&&it("set");var Z=we(L);return new ol(R,Jt(Z),Z.name)},object:function(R,L,Z){typeof arguments[1]=="string"&&it("object");var fe=we(Z);if(fe.proxy===!1)return sr({},R,L,fe);var Re=qr(fe),st=sr({},void 0,void 0,fe),It=bu(st);return na(It,R,L,Re),It},ref:pt,shallow:rt,deep:$e,struct:Lt},zt=function(R,L,Z){if(typeof arguments[1]=="string"||typeof arguments[1]=="symbol")return $e.apply(null,arguments);if(ra(R))return R;var fe=E(R)?zt.object(R,L,Z):Array.isArray(R)?zt.array(R,L):C(R)?zt.map(R,L):$(R)?zt.set(R,L):R;if(fe!==R)return fe;h(!1)};function it(R){h("Expected one or two arguments to observable."+R+". Did you accidentally try to use observable."+R+" as decorator?")}Object.keys(en).forEach((function(R){return zt[R]=en[R]}));var ae,re,je=Je(!1,(function(R,L,Z,fe,Re){var st=Z.get,It=Z.set,bn=
|
|||
|
|
/*
|
|||
|
|
Tracing '`+R.name+`'
|
|||
|
|
|
|||
|
|
You are entering this break point because derivation '`+R.name+"' is being traced and '"+L.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.
|
|||
|
|
|
|||
|
|
`+(R instanceof wo?R.derivation.toString().replace(/[*]\//g,"/"):"")+`
|
|||
|
|
|
|||
|
|
The dependencies for this derivation are:
|
|||
|
|
|
|||
|
|
`+Z.join(`
|
|||
|
|
`)+`
|
|||
|
|
*/
|
|||
|
|
`)()}}function qi(R,L,Z){L.length>=1e3?L.push("(and many more)"):(L.push(""+new Array(Z).join(" ")+R.name),R.dependencies&&R.dependencies.forEach((function(fe){return qi(fe,L,Z+1)})))}var Na=(function(){function R(L,Z,fe,Re){L===void 0&&(L="Reaction@"+f()),Re===void 0&&(Re=!1),this.name=L,this.onInvalidate=Z,this.errorHandler=fe,this.requiresObservable=Re,this.observing=[],this.newObserving=[],this.dependenciesState=ae.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+f(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=re.NONE}return R.prototype.onBecomeStale=function(){this.schedule()},R.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Sn.pendingReactions.push(this),gs())},R.prototype.isScheduled=function(){return this._isScheduled},R.prototype.runReaction=function(){if(!this.isDisposed){if(Ui(),this._isScheduled=!1,Gt(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending}catch(L){this.reportExceptionInDerivation(L)}}gr()}},R.prototype.track=function(L){if(!this.isDisposed){Ui(),this._isRunning=!0;var Z=On(this,L,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&Pe(this),Rt(Z)&&this.reportExceptionInDerivation(Z.cause),gr()}},R.prototype.reportExceptionInDerivation=function(L){var Z=this;if(this.errorHandler)this.errorHandler(L,this);else{if(Sn.disableErrorBoundaries)throw L;Sn.suppressReactionErrors,Sn.globalReactionErrorHandlers.forEach((function(fe){return fe(L,Z)}))}},R.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(Ui(),Pe(this),gr()))},R.prototype.getDisposer=function(){var L=this.dispose.bind(this);return L[I]=this,L},R.prototype.toString=function(){return"Reaction["+this.name+"]"},R.prototype.trace=function(L){L===void 0&&(L=!1),(function(){for(var Z=[],fe=0;fe<arguments.length;fe++)Z[fe]=arguments[fe];var Re=!1;typeof Z[Z.length-1]=="boolean"&&(Re=Z.pop());var st=Mo(Z);if(!st)return h(!1);st.isTracing,re.NONE,st.isTracing=Re?re.BREAK:re.LOG})(this,L)},R})(),as=function(R){return R()};function gs(){Sn.inBatch>0||Sn.isRunningReactions||as(Cl)}function Cl(){Sn.isRunningReactions=!0;for(var R=Sn.pendingReactions,L=0;R.length>0;){++L==100&&R.splice(0);for(var Z=R.splice(0),fe=0,Re=Z.length;fe<Re;fe++)Z[fe].runReaction()}Sn.isRunningReactions=!1}var ys=M("Reaction",Na);function tl(R){var L=as;as=function(Z){return R((function(){return L(Z)}))}}function ve(R){return function(){}}function mt(){h(!1)}function cn(R){return function(L,Z,fe){if(fe){if(fe.value)return{value:yo(R,fe.value),enumerable:!1,configurable:!0,writable:!0};var Re=fe.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return yo(R,Re.call(this))}}}return Kn(R).apply(this,arguments)}}function Kn(R){return function(L,Z,fe){Object.defineProperty(L,Z,{configurable:!0,enumerable:!1,get:function(){},set:function(Re){S(this,Z,br(R,Re))}})}}var br=function(R,L,Z,fe){return arguments.length===1&&typeof R=="function"?yo(R.name||"<unnamed action>",R):arguments.length===2&&typeof L=="function"?yo(R,L):arguments.length===1&&typeof R=="string"?cn(R):fe!==!0?cn(L).apply(null,arguments):void S(R,L,yo(R.name||L,Z.value,this))};function lo(R,L){return ho(typeof R=="string"?R:R.name||"<unnamed action>",typeof R=="function"?R:L,this,void 0)}function li(R){return typeof R=="function"&&R.isMobxAction===!0}function ye(R,L,Z){S(R,L,yo(L,Z.bind(R)))}function ht(R,L){L===void 0&&(L=s);var Z,fe=L&&L.name||R.name||"Autorun@"+f();if(!L.scheduler&&!L.delay)Z=new Na(fe,(function(){this.track(It)}),L.onError,L.requiresObservable);else{var Re=Rn(L),st=!1;Z=new Na(fe,(function(){st||(st=!0,Re((function(){st=!1,Z.isDisposed||Z.track(It)})))}),L.onError,L.requiresObservable)}function It(){R(Z)}return Z.schedule(),Z.getDisposer()}br.bound=function(R,L,Z,fe){return fe===!0?(ye(R,L,Z.value),null):Z?{configurable:!0,enumerable:!1,get:function(){return ye(this,L,Z.value||Z.initializer.call(this)),this[L]},set:mt}:{enumerable:!1,configurable:!0,set:function(Re){ye(this,L,Re)},
|
|||
|
|
`)&&(se="(?: "+se+")",pe=" "+pe,Ze++),W=new RegExp("^(?:"+se+")",gt)),z&&(W=new RegExp("^"+se+"$(?!\\s)",gt)),I&&(Q=ke.lastIndex),J=l(C,Je?W:ke,pe),Je?J?(J.input=F(J.input,Ze),J[0]=F(J[0],Ze),J.index=ke.lastIndex,ke.lastIndex+=J[0].length):ke.lastIndex=0:I&&J&&(ke.lastIndex=ke.global?J.index+J[0].length:Q),z&&J&&J.length>1&&l(M,J[0],W,(function(){for(ie=1;ie<arguments.length-2;ie++)arguments[ie]===void 0&&(J[ie]=void 0)})),J&&Be)for(J.groups=Se=w(null),ie=0;ie<Be.length;ie++)Se[(Ae=Be[ie])[0]]=J[Ae[1]];return J}),n.exports=$},function(n,o,r){var i=r(16),a=r(7),l=r(75),s=r(59),f=r(45),h=r(40),v=r(115),b=r(63),w=r(81)("splice"),O=a.TypeError,E=Math.max,S=Math.min,M=9007199254740991,C="Maximum allowed length exceeded";i({target:"Array",proto:!0,forced:!w},{splice:function($,D){var k,B,F,I,V,z,X=h(this),Y=f(X),W=l($,Y),Q=arguments.length;if(Q===0?k=B=0:Q===1?(k=0,B=Y-W):(k=Q-2,B=S(E(s(D),0),Y-W)),Y+k-B>M)throw O(C);for(F=v(X,B),I=0;I<B;I++)(V=W+I)in X&&b(F,I,X[V]);if(F.length=B,k<B){for(I=W;I<Y-B;I++)z=I+k,(V=I+B)in X?X[z]=X[V]:delete X[z];for(I=Y;I>Y-B+k;I--)delete X[I-1]}else if(k>B)for(I=Y-B;I>W;I--)z=I+k-1,(V=I+B-1)in X?X[z]=X[V]:delete X[z];for(I=0;I<k;I++)X[I+W]=arguments[I+2];return X.length=Y-B+k,F}})},function(n,o,r){var i=r(16),a=r(205);i({target:"String",proto:!0,forced:r(206)("anchor")},{anchor:function(l){return a(this,"a","name",l)}})},function(n,o,r){(function(i){var a=typeof i=="object"&&i&&i.Object===Object&&i;o.a=a}).call(this,r(68))},function(n,o,r){(function(i){var a=r(31),l=e&&!e.nodeType&&e,s=l&&typeof i=="object"&&i&&!i.nodeType&&i,f=s&&s.exports===l?a.a.Buffer:void 0,h=f?f.allocUnsafe:void 0;o.a=function(v,b){if(b)return v.slice();var w=v.length,O=h?h(w):new v.constructor(w);return v.copy(O),O}}).call(this,r(122)(n))},function(n,o,r){var i=r(70),a=r(18);n.exports=!!Object.getOwnPropertySymbols&&!a((function(){var l=Symbol();return!String(l)||!(Object(l)instanceof Symbol)||!Symbol.sham&&i&&i<41}))},function(n,o,r){var i=r(7),a=r(110),l="__core-js_shared__",s=i[l]||a(l,{});n.exports=s},function(n,o,r){var i=r(7),a=Object.defineProperty;n.exports=function(l,s){try{a(i,l,{value:s,configurable:!0,writable:!0})}catch{i[l]=s}return s}},function(n,o){n.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(n,o){o.f=Object.getOwnPropertySymbols},function(n,o,r){var i={};i[r(28)("toStringTag")]="z",n.exports=String(i)==="[object z]"},function(n,o,r){var i=r(7),a=r(75),l=r(45),s=r(63),f=i.Array,h=Math.max;n.exports=function(v,b,w){for(var O=l(v),E=a(b,O),S=a(w===void 0?O:w,O),M=f(h(S-E,0)),C=0;E<S;E++,C++)s(M,C,v[E]);return M.length=C,M}},function(n,o,r){var i=r(178);n.exports=function(a,l){return new(i(a))(l===0?0:l)}},function(n,o,r){var i=r(16),a=r(34),l=r(71),s=r(73),f=r(30),h=r(180),v=r(101),b=r(102),w=r(78),O=r(57),E=r(42),S=r(28),M=r(80),C=r(142),$=s.PROPER,D=s.CONFIGURABLE,k=C.IteratorPrototype,B=C.BUGGY_SAFARI_ITERATORS,F=S("iterator"),I="keys",V="values",z="entries",X=function(){return this};n.exports=function(Y,W,Q,J,ie,Se,Ae){h(Q,W,J);var ke,De,ze,Ye=function(le){if(le===ie&&Ze)return Ze;if(!B&&le in gt)return gt[le];switch(le){case I:case V:case z:return function(){return new Q(this,le)}}return function(){return new Q(this)}},Be=W+" Iterator",Je=!1,gt=Y.prototype,se=gt[F]||gt["@@iterator"]||ie&>[ie],Ze=!B&&se||Ye(ie),pe=W=="Array"&>.entries||se;if(pe&&(ke=v(pe.call(new Y)))!==Object.prototype&&ke.next&&(l||v(ke)===k||(b?b(ke,k):f(ke[F])||E(ke,F,X)),w(ke,Be,!0,!0),l&&(M[Be]=X)),$&&ie==V&&se&&se.name!==V&&(!l&&D?O(gt,"name",V):(Je=!0,Ze=function(){return a(se,this)})),ie)if(De={values:Ye(V),keys:Se?Ze:Ye(I),entries:Ye(z)},Ae)for(ze in De)(B||Je||!(ze in gt))&&E(gt,ze,De[ze]);else i({target:W,proto:!0,forced:B||Je},De);return l&&!Ae||gt[F]===Ze||E(gt,F,Ze,{name:ie}),M[W]=Ze,De}},function(n,o,r){var i=r(7),a=r(64),l=r(34),s=r(32),f=r(88),h=r(145),v=r(45),b=r(54),w=r(146),O=r(118),E=r(147),S=i.TypeError,M=function($,D){this.stopped=$,this.result=D},C=M.prototype;n.exports=function($,D,k){var B,F,I,V,z,X,Y,W=k&&k.that,Q=!(!k||!k
|
|||
|
|
* @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 s,f="Expected a function",h="__lodash_hash_undefined__",v="__lodash_placeholder__",b=16,w=32,O=64,E=128,S=256,M=1/0,C=9007199254740991,$=NaN,D=4294967295,k=[["ary",E],["bind",1],["bindKey",2],["curry",8],["curryRight",b],["flip",512],["partial",w],["partialRight",O],["rearg",S]],B="[object Arguments]",F="[object Array]",I="[object Boolean]",V="[object Date]",z="[object Error]",X="[object Function]",Y="[object GeneratorFunction]",W="[object Map]",Q="[object Number]",J="[object Object]",ie="[object Promise]",Se="[object RegExp]",Ae="[object Set]",ke="[object String]",De="[object Symbol]",ze="[object WeakMap]",Ye="[object ArrayBuffer]",Be="[object DataView]",Je="[object Float32Array]",gt="[object Float64Array]",se="[object Int8Array]",Ze="[object Int16Array]",pe="[object Int32Array]",le="[object Uint8Array]",we="[object Uint8ClampedArray]",$e="[object Uint16Array]",rt="[object Uint32Array]",pt=/\b__p \+= '';/g,Lt=/\b(__p \+=) '' \+/g,Jt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,en=/&(?:amp|lt|gt|quot|#39);/g,zt=/[&<>"']/g,it=RegExp(en.source),ae=RegExp(zt.source),re=/<%-([\s\S]+?)%>/g,je=/<%([\s\S]+?)%>/g,vt=/<%=([\s\S]+?)%>/g,q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Pt=/^\w*$/,Rt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Gt=/[\\^$.*+?()[\]{}|]/g,kn=RegExp(Gt.source),qt=/^\s+/,On=/\s/,Pe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ke=/\{\n\/\* \[wrapped with (.+)\] \*/,Le=/,? & /,dt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,At=/[()=,{}\[\]\/\s]/,Tt=/\\(\\)?/g,En=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Zn=/\w*$/,ao=/^[-+]0x[0-9a-f]+$/i,Lo=/^0b[01]+$/i,yo=/^\[object .+?Constructor\]$/,ho=/^0o[0-7]+$/i,Nn=/^(?:0|[1-9]\d*)$/,qn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,rr=/($^)/,ut=/['\n\r\u2028\u2029\\]/g,vn="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",In="\\u2700-\\u27bf",lr="a-z\\xdf-\\xf6\\xf8-\\xff",wo="A-Z\\xc0-\\xd6\\xd8-\\xde",oo="\\ufe0e\\ufe0f",ta="\\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",Ca="['’]",Yi="[\\ud800-\\udfff]",fa="["+ta+"]",Ka="["+vn+"]",Sn="\\d+",Tl="[\\u2700-\\u27bf]",Oo="["+lr+"]",el="[^\\ud800-\\udfff"+ta+Sn+In+lr+wo+"]",Ui="\\ud83c[\\udffb-\\udfff]",gr="[^\\ud800-\\udfff]",ms="(?:\\ud83c[\\udde6-\\uddff]){2}",pa="[\\ud800-\\udbff][\\udc00-\\udfff]",qi="["+wo+"]",Na="(?:"+Oo+"|"+el+")",as="(?:"+qi+"|"+el+")",gs="(?:['’](?:d|ll|m|re|s|t|ve))?",Cl="(?:['’](?:D|LL|M|RE|S|T|VE))?",ys="(?:"+Ka+"|"+Ui+")?",tl="[\\ufe0e\\ufe0f]?",ve=tl+ys+("(?:\\u200d(?:"+[gr,ms,pa].join("|")+")"+tl+ys+")*"),mt="(?:"+[Tl,ms,pa].join("|")+")"+ve,cn="(?:"+[gr+Ka+"?",Ka,ms,pa,Yi].join("|")+")",Kn=RegExp(Ca,"g"),br=RegExp(Ka,"g"),lo=RegExp(Ui+"(?="+Ui+")|"+cn+ve,"g"),li=RegExp([qi+"?"+Oo+"+"+gs+"(?="+[fa,qi,"$"].join("|")+")",as+"+"+Cl+"(?="+[fa,qi+Na,"$"].join("|")+")",qi+"?"+Na+"+"+gs,qi+"+"+Cl,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Sn,mt].join("|"),"g"),ye=RegExp("[\\u200d\\ud800-\\udfff"+vn+oo+"]"),ht=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,fn=["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"],Rn=-1,Cn={};Cn[Je]=Cn[gt]=Cn[se]=Cn[Ze]=Cn[pe]=Cn[le]=Cn[we]=Cn[$e]=Cn[rt]=!0,Cn[B]=Cn[F]=Cn[Ye]=Cn[I]=Cn[Be]=Cn[V]=Cn[z]=Cn[X]=Cn[W]=Cn[Q]=Cn[J]=Cn[Se]=Cn[Ae]=Cn[ke]=Cn[ze]=!1;var nr={};nr[B]=nr[F]=nr[Ye]=nr[Be]=nr[I]=nr[V]=nr[Je]=nr[gt]=nr[se]=nr[Ze]=nr[pe]=nr[W]=nr[Q]=nr[J]=nr[Se]=nr[Ae]=nr[ke]=nr[De]=nr[le]=nr[we]=nr[$e]=nr[rt]=!0,nr[z]=nr[X]=nr[ze]=!1;var Mn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},or=parseFloat,sr=parseInt,qr=typeof i=="object"&&i&&i.Object===Obj
|
|||
|
|
/* [wrapped with `+ce+`] */
|
|||
|
|
`)})(G,(function(te,ce){return Fa(k,(function(Oe){var Fe="_."+Oe[0];ce&Oe[1]&&!Za(te,Fe)&&te.push(Fe)})),te.sort()})((function(te){var ce=te.match(Ke);return ce?ce[1].split(Le):[]})(G),T)))}function cv(g){var x=0,T=0;return function(){var G=Ep(),te=16-(G-T);if(T=G,te>0){if(++x>=800)return arguments[0]}else x=0;return g.apply(s,arguments)}}function Bl(g,x){var T=-1,G=g.length,te=G-1;for(x=x===s?G:x;++T<x;){var ce=ev(T,te),Oe=g[ce];g[ce]=g[T],g[T]=Oe}return g.length=x,g}var dv=(function(g){var x=lu(g,(function(G){return T.size===500&&T.clear(),G})),T=x.cache;return x})((function(g){var x=[];return g.charCodeAt(0)===46&&x.push(""),g.replace(Rt,(function(T,G,te,ce){x.push(te?ce.replace(Tt,"$1"):G||T)})),x}));function vl(g){if(typeof g=="string"||Dt(g))return g;var x=g+"";return x=="0"&&1/g==-1/0?"-0":x}function Ru(g){if(g!=null){try{return no.call(g)}catch{}try{return g+""}catch{}}return""}function Xp(g){if(g instanceof go)return g.clone();var x=new $s(g.__wrapped__,g.__chain__);return x.__actions__=va(g.__actions__),x.__index__=g.__index__,x.__values__=g.__values__,x}var Cm=uo((function(g,x){return Oi(g)?cl(g,Ji(x,1,Oi,!0)):[]})),Nm=uo((function(g,x){var T=gi(x);return Oi(T)&&(T=s),Oi(g)?cl(g,Ji(x,1,Oi,!0),Rr(T,2)):[]})),Pm=uo((function(g,x){var T=gi(x);return Oi(T)&&(T=s),Oi(g)?cl(g,Ji(x,1,Oi,!0),s,T):[]}));function fv(g,x,T){var G=g==null?0:g.length;if(!G)return-1;var te=T==null?0:Mt(T);return te<0&&(te=ji(G+te,0)),$a(g,Rr(x,3),te)}function Yp(g,x,T){var G=g==null?0:g.length;if(!G)return-1;var te=G-1;return T!==s&&(te=Mt(T),te=T<0?ji(G+te,0):Wa(te,G-1)),$a(g,Rr(x,3),te,!0)}function Cf(g){return g!=null&&g.length?Ji(g,1):[]}function km(g){return g&&g.length?g[0]:s}var ml=uo((function(g){var x=Mo(g,jp);return x.length&&x[0]===g[0]?mf(x):[]})),Du=uo((function(g){var x=gi(g),T=Mo(g,jp);return x===gi(T)?x=s:T.pop(),T.length&&T[0]===g[0]?mf(T,Rr(x,2)):[]})),_y=uo((function(g){var x=gi(g),T=Mo(g,jp);return(x=typeof x=="function"?x:s)&&T.pop(),T.length&&T[0]===g[0]?mf(T,s,x):[]}));function gi(g){var x=g==null?0:g.length;return x?g[x-1]:s}var Nf=uo(Oc);function Oc(g,x){return g&&g.length&&x&&x.length?Np(g,x):g}var Pf=Ll((function(g,x){var T=g==null?0:g.length,G=hf(g,x);return Qh(g,Mo(x,(function(te){return Ra(te,T)?+te:te})).sort(pd)),G}));function bd(g){return g==null?g:dy.call(g)}var kf=uo((function(g){return Tu(Ji(g,1,Oi,!0))})),Rf=uo((function(g){var x=gi(g);return Oi(x)&&(x=s),Tu(Ji(g,1,Oi,!0),Rr(x,2))})),Df=uo((function(g){var x=gi(g);return x=typeof x=="function"?x:s,Tu(Ji(g,1,Oi,!0),s,x)}));function Sc(g){if(!g||!g.length)return[];var x=0;return g=Ba(g,(function(T){if(Oi(T))return x=ji(T.length,x),!0})),Kl(x,(function(T){return Mo(g,Ua(T))}))}function au(g,x){if(!g||!g.length)return[];var T=Sc(g);return x==null?T:Mo(T,(function(G){return qo(x,s,G)}))}var ma=uo((function(g,x){return Oi(g)?cl(g,x):[]})),qp=uo((function(g){return Dp(Ba(g,Oi))})),jf=uo((function(g){var x=gi(g);return Oi(x)&&(x=s),Dp(Ba(g,Oi),Rr(x,2))})),Ac=uo((function(g){var x=gi(g);return x=typeof x=="function"?x:s,Dp(Ba(g,Oi),s,x)})),wd=uo(Sc),wa=uo((function(g){var x=g.length,T=x>1?g[x-1]:s;return T=typeof T=="function"?(g.pop(),T):s,au(g,T)}));function xi(g){var x=he(g);return x.__chain__=!0,x}function Lf(g,x){return x(g)}var za=Ll((function(g){var x=g.length,T=x?g[0]:0,G=this.__wrapped__,te=function(ce){return hf(ce,g)};return!(x>1||this.__actions__.length)&&G instanceof go&&Ra(T)?((G=G.slice(T,+T+(x?1:0))).__actions__.push({func:Lf,args:[te],thisArg:s}),new $s(G,this.__chain__).thru((function(ce){return x&&!ce.length&&ce.push(s),ce}))):this.thru(te)})),wr=ou((function(g,x,T){$n.call(g,T)?++g[T]:ul(g,T,1)})),Kp=Bp(fv),If=Bp(Yp);function Zp(g,x){return(Jr(g)?Fa:mi)(g,Rr(x,3))}function pv(g,x){return(Jr(g)?gp:ym)(g,Rr(x,3))}var Rm=ou((function(g,x,T){$n.call(g,T)?g[T].push(x):ul(g,T,[x])})),ju=uo((function(g,x,T){var G=-1,te=typeof x=="function",ce=fs(g)?Gn(g.length):[];return mi(g,(function(Oe){ce[++G]=te?qo(x,Oe,T):Ga(Oe,x,T)})),ce})),Dm=ou((function(g,x,T){ul(g,T,x)}));function Mc(g,x){return(Jr(g)?Mo:As)(g,Rr(x,3))}var jm=ou((function(g,x,T){g[T?0:1].
|
|||
|
|
`;g.replace(Yn,(function(Tn,Br,ir,at,Yr,Ao){return ir||(ir=at),yn+=g.slice(jt,Ao).replace(ut,ac),Br&&(te=!0,yn+=`' +
|
|||
|
|
__e(`+Br+`) +
|
|||
|
|
'`),Yr&&(ce=!0,yn+=`';
|
|||
|
|
`+Yr+`;
|
|||
|
|
__p += '`),ir&&(yn+=`' +
|
|||
|
|
((__t = (`+ir+`)) == null ? '' : __t) +
|
|||
|
|
'`),jt=Ao+Tn.length,Tn})),yn+=`';
|
|||
|
|
`;var Sr=$n.call(x,"variable")&&x.variable;if(Sr){if(At.test(Sr))throw new mo("Invalid `variable` option passed into `_.template`")}else yn=`with (obj) {
|
|||
|
|
`+yn+`
|
|||
|
|
}
|
|||
|
|
`;yn=(ce?yn.replace(pt,""):yn).replace(Lt,"$1").replace(Jt,"$1;"),yn="function("+(Sr||"obj")+`) {
|
|||
|
|
`+(Sr?"":`obj || (obj = {});
|
|||
|
|
`)+"var __t, __p = ''"+(te?", __e = _.escape":"")+(ce?`, __j = Array.prototype.join;
|
|||
|
|
function print() { __p += __j.call(arguments, '') }
|
|||
|
|
`:`;
|
|||
|
|
`)+yn+`return __p
|
|||
|
|
}`;var an=Cr((function(){return ci(Fe,Qn+"return "+yn).apply(s,et)}));if(an.source=yn,Ea(an))throw an;return an},he.times=function(g,x){if((g=Mt(g))<1||g>C)return[];var T=D,G=Wa(g,D);x=Rr(x),g-=D;for(var te=Kl(G,x);++T<g;)x(T);return te},he.toFinite=nn,he.toInteger=Mt,he.toLength=wn,he.toLower=function(g){return Wt(g).toLowerCase()},he.toNumber=pn,he.toSafeInteger=function(g){return g?Au(Mt(g),-9007199254740991,C):g===0?g:0},he.toString=Wt,he.toUpper=function(g){return Wt(g).toUpperCase()},he.trim=function(g,x,T){if((g=Wt(g))&&(T||x===s))return Bs(g);if(!g||!(x=cs(x)))return g;var G=Qa(g),te=Qa(x);return Uo(G,Es(G,te),af(G,te)+1).join("")},he.trimEnd=function(g,x,T){if((g=Wt(g))&&(T||x===s))return g.slice(0,ia(g)+1);if(!g||!(x=cs(x)))return g;var G=Qa(g);return Uo(G,0,af(G,Qa(x))+1).join("")},he.trimStart=function(g,x,T){if((g=Wt(g))&&(T||x===s))return g.replace(qt,"");if(!g||!(x=cs(x)))return g;var G=Qa(g);return Uo(G,Es(G,Qa(x))).join("")},he.truncate=function(g,x){var T=30,G="...";if(Ni(x)){var te="separator"in x?x.separator:te;T="length"in x?Mt(x.length):T,G="omission"in x?cs(x.omission):G}var ce=(g=Wt(g)).length;if(ol(g)){var Oe=Qa(g);ce=Oe.length}if(T>=ce)return g;var Fe=T-Va(G);if(Fe<1)return G;var et=Oe?Uo(Oe,0,Fe).join(""):g.slice(0,Fe);if(te===s)return et+G;if(Oe&&(Fe+=et.length-Fe),me(te)){if(g.slice(Fe).search(te)){var jt,Vt=et;for(te.global||(te=Z(te.source,Wt(Zn.exec(te))+"g")),te.lastIndex=0;jt=te.exec(Vt);)var yn=jt.index;et=et.slice(0,yn===s?Fe:yn)}}else if(g.indexOf(cs(te),Fe)!=Fe){var Yn=et.lastIndexOf(te);Yn>-1&&(et=et.slice(0,Yn))}return et+G},he.unescape=function(g){return(g=Wt(g))&&it.test(g)?g.replace(en,ls):g},he.uniqueId=function(g){var x=++Do;return Wt(g)+x},he.upperCase=sa,he.upperFirst=zi,he.each=Zp,he.eachRight=pv,he.first=km,Te(he,(Ue={},ur(he,(function(g,x){$n.call(he.prototype,x)||(Ue[x]=g)})),Ue),{chain:!1}),he.VERSION="4.17.21",Fa(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(g){he[g].placeholder=he})),Fa(["drop","take"],(function(g,x){go.prototype[g]=function(T){T=T===s?1:ji(Mt(T),0);var G=this.__filtered__&&!x?new go(this):this.clone();return G.__filtered__?G.__takeCount__=Wa(T,G.__takeCount__):G.__views__.push({size:Wa(T,D),type:g+(G.__dir__<0?"Right":"")}),G},go.prototype[g+"Right"]=function(T){return this.reverse()[g](T).reverse()}})),Fa(["filter","map","takeWhile"],(function(g,x){var T=x+1,G=T==1||T==3;go.prototype[g]=function(te){var ce=this.clone();return ce.__iteratees__.push({iteratee:Rr(te,3),type:T}),ce.__filtered__=ce.__filtered__||G,ce}})),Fa(["head","last"],(function(g,x){var T="take"+(x?"Right":"");go.prototype[g]=function(){return this[T](1).value()[0]}})),Fa(["initial","tail"],(function(g,x){var T="drop"+(x?"":"Right");go.prototype[g]=function(){return this.__filtered__?new go(this):this[T](1)}})),go.prototype.compact=function(){return this.filter(Nr)},go.prototype.find=function(g){return this.filter(g).head()},go.prototype.findLast=function(g){return this.reverse().find(g)},go.prototype.invokeMap=uo((function(g,x){return typeof g=="function"?new go(this):this.map((function(T){return Ga(T,g,x)}))})),go.prototype.reject=function(g){return this.filter(Bf(Rr(g)))},go.prototype.slice=function(g,x){g=Mt(g);var T=this;return T.__filtered__&&(g>0||x<0)?new go(T):(g<0?T=T.takeRight(-g):g&&(T=T.drop(g)),x!==s&&(T=(x=Mt(x))<0?T.dropRight(-x):T.take(x-g)),T)},go.prototype.takeRightWhile=function(g){return this.reverse().takeWhile(g).reverse()},go.prototype.toArray=function(){return this.take(D)},ur(go.prototype,(function(g,x){var T=/^(?:filter|find|map|reject)|While$/.test(x),G=/^(?:head|last)$/.test(x),te=he[G?"take"+(x=="last"?"Right":""):x],ce=G||/^find/.test(x);te&&(he.prototype[x]=function(){var Oe=this.__wrapped__,Fe=G?[1]:arguments,et=Oe instanceof go,jt=Fe[0],Vt=et||Jr(Oe),yn=function(Br){var ir=te.apply(he,oa([Br],Fe));return G&&Yn?ir[0]:ir};Vt&&T&&typeof jt=="function"&&jt.length!=1&&(et=Vt=!1);var Yn=this.__chain__,Qn=!!this.__actions__.length,Sr=ce&&!Yn,an=et&&!Qn;if(!ce&&Vt){Oe=an?Oe:new go(this);var Tn=g.apply(Oe,Fe);return Tn.__actions
|
|||
|
|
\v\f\r \u2028\u2029\uFEFF`},function(n,o){var r,i,a=n.exports={};function l(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function f(C){if(r===setTimeout)return setTimeout(C,0);if((r===l||!r)&&setTimeout)return r=setTimeout,setTimeout(C,0);try{return r(C,0)}catch{try{return r.call(null,C,0)}catch{return r.call(this,C,0)}}}(function(){try{r=typeof setTimeout=="function"?setTimeout:l}catch{r=l}try{i=typeof clearTimeout=="function"?clearTimeout:s}catch{i=s}})();var h,v=[],b=!1,w=-1;function O(){b&&h&&(b=!1,h.length?v=h.concat(v):w=-1,v.length&&E())}function E(){if(!b){var C=f(O);b=!0;for(var $=v.length;$;){for(h=v,v=[];++w<$;)h&&h[w].run();w=-1,$=v.length}h=null,b=!1,(function(D){if(i===clearTimeout)return clearTimeout(D);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(D);try{i(D)}catch{try{return i.call(null,D)}catch{return i.call(this,D)}}})(C)}}function S(C,$){this.fun=C,this.array=$}function M(){}a.nextTick=function(C){var $=new Array(arguments.length-1);if(arguments.length>1)for(var D=1;D<arguments.length;D++)$[D-1]=arguments[D];v.push(new S(C,$)),v.length!==1||b||f(E)},S.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=M,a.addListener=M,a.once=M,a.off=M,a.removeListener=M,a.removeAllListeners=M,a.emit=M,a.prependListener=M,a.prependOnceListener=M,a.listeners=function(C){return[]},a.binding=function(C){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(C){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},function(n,o,r){var i=r(32),a=r(165),l=r(28)("species");n.exports=function(s,f){var h,v=i(s).constructor;return v===void 0||(h=i(v)[l])==null?f:a(h)}},function(n,o,r){var i=r(7),a=r(99),l=r(88),s=i.TypeError;n.exports=function(f){if(a(f))return f;throw s(l(f)+" is not a constructor")}},function(n,o,r){var i=r(16),a=r(161).trim;i({target:"String",proto:!0,forced:r(200)("trim")},{trim:function(){return a(this)}})},function(n,o,r){var i=r(34),a=r(123),l=r(32),s=r(94),f=r(39),h=r(44),v=r(62),b=r(124),w=r(125);a("match",(function(O,E,S){return[function(M){var C=h(this),$=M==null?void 0:v(M,O);return $?i($,M,C):new RegExp(M)[O](f(C))},function(M){var C=l(this),$=f(M),D=S(E,C,$);if(D.done)return D.value;if(!C.global)return w(C,$);var k=C.unicode;C.lastIndex=0;for(var B,F=[],I=0;(B=w(C,$))!==null;){var V=f(B[0]);F[I]=V,V===""&&(C.lastIndex=b($,s(C.lastIndex),k)),I++}return I===0?null:F}]}))},function(n,o,r){var i,a,l,s,f=r(7),h=r(76),v=r(64),b=r(30),w=r(35),O=r(18),E=r(138),S=r(98),M=r(91),C=r(169),$=r(128),D=f.setImmediate,k=f.clearImmediate,B=f.process,F=f.Dispatch,I=f.Function,V=f.MessageChannel,z=f.String,X=0,Y={},W="onreadystatechange";try{i=f.location}catch{}var Q=function(Ae){if(w(Y,Ae)){var ke=Y[Ae];delete Y[Ae],ke()}},J=function(Ae){return function(){Q(Ae)}},ie=function(Ae){Q(Ae.data)},Se=function(Ae){f.postMessage(z(Ae),i.protocol+"//"+i.host)};D&&k||(D=function(Ae){var ke=S(arguments,1);return Y[++X]=function(){h(b(Ae)?Ae:I(Ae),void 0,ke)},a(X),X},k=function(Ae){delete Y[Ae]},$?a=function(Ae){B.nextTick(J(Ae))}:F&&F.now?a=function(Ae){F.now(J(Ae))}:V&&!C?(s=(l=new V).port2,l.port1.onmessage=ie,a=v(s.postMessage,s)):f.addEventListener&&b(f.postMessage)&&!f.importScripts&&i&&i.protocol!=="file:"&&!O(Se)?(a=Se,f.addEventListener("message",ie,!1)):a=W in M("script")?function(Ae){E.appendChild(M("script")).onreadystatechange=function(){E.removeChild(this),Q(Ae)}}:function(Ae){setTimeout(J(Ae),0)}),n.exports={set:D,clear:k}},function(n,o,r){var i=r(55);n.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(i)},function(n,o,r){var i=r(56),a=function(l){var s,f;this.promise=new l((function(h,v){if(s!==void 0||f!==void 0)throw TypeError("Bad Promise constructor");s=h,f=v})),this.resolve=i(s),this.reject=i(f)};n.exports.f=function(l){return new a(l)}},function(n,o,r){o.a=function(){return!1}},function(n,o,r){(function(i){r.d(o,"
|
|||
|
|
`)&&l.flags==="s")}))},function(n,o,r){var i=r(18),a=r(7).RegExp;n.exports=i((function(){var l=a("(?<a>b)","g");return l.exec("b").groups.a!=="b"||"b".replace(l,"$<a>c")!=="bc"}))},function(n,o,r){var i=r(16),a=r(15),l=r(56),s=r(40),f=r(45),h=r(39),v=r(18),b=r(193),w=r(121),O=r(194),E=r(195),S=r(70),M=r(196),C=[],$=a(C.sort),D=a(C.push),k=v((function(){C.sort(void 0)})),B=v((function(){C.sort(null)})),F=w("sort"),I=!v((function(){if(S)return S<70;if(!(O&&O>3)){if(E)return!0;if(M)return M<603;var V,z,X,Y,W="";for(V=65;V<76;V++){switch(z=String.fromCharCode(V),V){case 66:case 69:case 70:case 72:X=3;break;case 68:case 71:X=4;break;default:X=2}for(Y=0;Y<47;Y++)C.push({k:z+Y,v:X})}for(C.sort((function(Q,J){return J.v-Q.v})),Y=0;Y<C.length;Y++)z=C[Y].k.charAt(0),W.charAt(W.length-1)!==z&&(W+=z);return W!=="DGBEFHACIJK"}}));i({target:"Array",proto:!0,forced:k||!B||!F||!I},{sort:function(V){V!==void 0&&l(V);var z=s(this);if(I)return V===void 0?$(z):$(z,V);var X,Y,W=[],Q=f(z);for(Y=0;Y<Q;Y++)Y in z&&D(W,z[Y]);for(b(W,(function(J){return function(ie,Se){return Se===void 0?-1:ie===void 0?1:J!==void 0?+J(ie,Se)||0:h(ie)>h(Se)?1:-1}})(V)),X=W.length,Y=0;Y<X;)z[Y]=W[Y++];for(;Y<Q;)delete z[Y++];return z}})},function(n,o,r){var i=r(114),a=Math.floor,l=function(h,v){var b=h.length,w=a(b/2);return b<8?s(h,v):f(h,l(i(h,0,w),v),l(i(h,w),v),v)},s=function(h,v){for(var b,w,O=h.length,E=1;E<O;){for(w=E,b=h[E];w&&v(h[w-1],b)>0;)h[w]=h[--w];w!==E++&&(h[w]=b)}return h},f=function(h,v,b,w){for(var O=v.length,E=b.length,S=0,M=0;S<O||M<E;)h[S+M]=S<O&&M<E?w(v[S],b[M])<=0?v[S++]:b[M++]:S<O?v[S++]:b[M++];return h};n.exports=l},function(n,o,r){var i=r(55).match(/firefox\/(\d+)/i);n.exports=!!i&&+i[1]},function(n,o,r){var i=r(55);n.exports=/MSIE|Trident/.test(i)},function(n,o,r){var i=r(55).match(/AppleWebKit\/(\d+)\./);n.exports=!!i&&+i[1]},function(n,o,r){var i=r(7),a=r(159),l=i.TypeError;n.exports=function(s){if(a(s))throw l("The method doesn't accept regular expressions");return s}},function(n,o,r){var i=r(28)("match");n.exports=function(a){var l=/./;try{"/./"[a](l)}catch{try{return l[i]=!1,"/./"[a](l)}catch{}}return!1}},function(n,o,r){r(16)({target:"Number",stat:!0},{isNaN:function(i){return i!=i}})},function(n,o,r){var i=r(73).PROPER,a=r(18),l=r(162);n.exports=function(s){return a((function(){return!!l[s]()||"
"[s]()!=="
"||i&&l[s].name!==s}))}},function(n,o,r){var i=r(15),a=r(40),l=Math.floor,s=i("".charAt),f=i("".replace),h=i("".slice),v=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,b=/\$([$&'`]|\d{1,2})/g;n.exports=function(w,O,E,S,M,C){var $=E+w.length,D=S.length,k=b;return M!==void 0&&(M=a(M),k=v),f(C,k,(function(B,F){var I;switch(s(F,0)){case"$":return"$";case"&":return w;case"`":return h(O,0,E);case"'":return h(O,$);case"<":I=M[h(F,1,-1)];break;default:var V=+F;if(V===0)return B;if(V>D){var z=l(V/10);return z===0?B:z<=D?S[z-1]===void 0?s(F,1):S[z-1]+s(F,1):B}I=S[V-1]}return I===void 0?"":I}))}},function(n,o,r){var i=r(36),a=r(15),l=r(34),s=r(18),f=r(77),h=r(112),v=r(84),b=r(40),w=r(85),O=Object.assign,E=Object.defineProperty,S=a([].concat);n.exports=!O||s((function(){if(i&&O({b:1},O(E({},"a",{enumerable:!0,get:function(){E(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var M={},C={},$=Symbol(),D="abcdefghijklmnopqrst";return M[$]=7,D.split("").forEach((function(k){C[k]=k})),O({},M)[$]!=7||f(O({},C)).join("")!=D}))?function(M,C){for(var $=b(M),D=arguments.length,k=1,B=h.f,F=v.f;D>k;)for(var I,V=w(arguments[k++]),z=B?S(f(V),B(V)):f(V),X=z.length,Y=0;X>Y;)I=z[Y++],i&&!l(F,V,I)||($[I]=V[I]);return $}:O},function(n,o,r){var i=r(7),a=r(15),l=r(56),s=r(33),f=r(35),h=r(98),v=i.Function,b=a([].concat),w=a([].join),O={},E=function(S,M,C){if(!f(O,M)){for(var $=[],D=0;D<M;D++)$[D]="a["+D+"]";O[M]=v("C,a","return new C("+w($,",")+")")}return O[M](S,C)};n.exports=v.bind||function(S){var M=l(this),C=M.prototype,$=h(arguments,1),D=function(){var k=b($,h(arguments));return this instanceof D?E(M,k.length,k):M.apply(S,k)};return s(C)&&(D.prototype=C),D}},function(n,o,r){var i=r(35);n.exports=function(a){return a!==void 0&&(i(a,"value")||i(a,"writ
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function ru(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function Vs(c,u,d,p){d&&Object.defineProperty(c,u,{enumerable:d.enumerable,configurable:d.configurable,writable:d.writable,value:d.initializer?d.initializer.call(p):void 0})}function _m(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function jl(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}function As(c,u,d,p,y){var m={};return Object.keys(p).forEach((function(_){m[_]=p[_]})),m.enumerable=!!m.enumerable,m.configurable=!!m.configurable,("value"in m||m.initializer)&&(m.writable=!0),m=d.slice().reverse().reduce((function(_,A){return A(c,u,_)||_}),m),y&&m.initializer!==void 0&&(m.value=m.initializer?m.initializer.call(y):void 0,m.initializer=void 0),m.initializer===void 0&&(Object.defineProperty(c,u,m),m=null),m}(function(c){c[c.DEFAULT=0]="DEFAULT",c[c.INCREASE=1]="INCREASE"})(Ei||(Ei={}));var Zh={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]},Jh=(Mi=(function(){function c(p,y){(function(A,N){if(!(A instanceof N))throw new TypeError("Cannot call a class as a function")})(this,c),jl(this,"MINI_SCALE_SIZE",.2),jl(this,"MAX_SCALE_SIZE",16),Vs(this,"SCALE_X",qh,this),Vs(this,"SKEW_Y",Kh,this),Vs(this,"SKEW_X",mf,this),Vs(this,"SCALE_Y",Ga,this),Vs(this,"TRANSLATE_X",Tp,this),Vs(this,"TRANSLATE_Y",fd,this),Vs(this,"ZOOM_SIZE",Us,this),jl(this,"eventCenter",void 0),jl(this,"translateLimitMinX",void 0),jl(this,"translateLimitMinY",void 0),jl(this,"translateLimitMaxX",void 0),jl(this,"translateLimitMaxY",void 0),this.eventCenter=p;var m=y.stopMoveGraph,_=m!==void 0&&m;this.updateTranslateLimits(_)}var u,d;return u=c,d=[{key:"setZoomMiniSize",value:function(p){this.MINI_SCALE_SIZE=p}},{key:"setZoomMaxSize",value:function(p){this.MAX_SCALE_SIZE=p}},{key:"HtmlPointToCanvasPoint",value:function(p){var y=Mu(p,2),m=y[0],_=y[1];return[(m-this.TRANSLATE_X)/this.SCALE_X,(_-this.TRANSLATE_Y)/this.SCALE_Y]}},{key:"CanvasPointToHtmlPoint",value:function(p){var y=Mu(p,2),m=y[0],_=y[1];return[m*this.SCALE_X+this.TRANSLATE_X,_*this.SCALE_Y+this.TRANSLATE_Y]}},{key:"moveCanvasPointByHtml",value:function(p,y,m){var _=Mu(p,2),A=_[0],N=_[1];return[A+y/this.SCALE_X,N+m/this.SCALE_Y]}},{key:"fixDeltaXY",value:function(p,y){return[p/this.SCALE_X,y/this.SCALE_Y]}},{key:"getTransformStyle",value:function(){var p=[this.SCALE_X,this.SKEW_Y,this.SKEW_X,this.SCALE_Y,this.TRANSLATE_X,this.TRANSLATE_Y].join(",");return{transform:"matrix(".concat(p,")")}}},{key:"zoom",value:function(){var p=arguments.length>0&&arguments[0]!==void 0&&arguments[0],y=arguments.length>1?arguments[1]:void 0,m=this.SCALE_X,_=this.SCALE_Y;return p===!0?(m+=this.ZOOM_SIZE,_+=this.ZOOM_SIZE):p===!1?(m-=this.ZOOM_SIZE,_-=this.ZOOM_SIZE):typeof p=="number"&&(m=p,_=p),m<this.MINI_SCALE_SIZE||m>this.MAX_SCALE_SIZE||(y&&(this.TRANSLATE_X-=(m-this.SCALE_X)*y[0],this.TRANSLATE_Y-=(_-this.SCALE_Y)*y[1]),this.SCALE_X=m,this.SCALE_Y=_,this.emitGraphTransform("zoom")),"".concat(100*this.SCALE_X,"%")}},{key:"emitGraphTransform",value:function(p){this.eventCenter.emit(ur.GRAPH_TRANSFORM,{type:p,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(p,y){this.TRANSLATE_X+p<=this.translateLimitMaxX&&this.TRANSLATE_X+p>=this.translateLimitMinX&&(this.TRANSLATE_X+=p),this.TRANSLATE_Y+y<=this.translateLimitMaxY&&this.TRANSLATE_Y+y>=this.translateLimitMinY&&(this.TRANSLATE_Y+=y),this.emitGraphTransform("translate")}},{key:"focusOn",value:function(p,y,m,_){var A=Mu(this.CanvasPointToHtmlPoint([p,y]),2),N=m/2-A[0],U=_/2-A[1];this.TRANSLATE_X+=N,this.TRANSLATE_Y+=U,this.emit
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function hd(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}var vd=function(c,u,d){var p=Ef(c,2),y=p[0],m=p[1],_=Ef(u,2),A=_[0],N=_[1],U=Ef(d,2),H=U[0],oe=U[1];return y>A&&y<H&&m>N&&m<oe},md=function(c,u){var d=!1;switch(u.multipleSelectKey){case"meta":d=c.metaKey;break;case"alt":d=c.altKey;break;case"shift":d=c.shiftKey;break;case"ctrl":d=c.ctrlKey;break;default:d=!1}return d};r(167),r(126),r(83),r(29),r(12),r(13),r(14),r(47);var $p=function(c){return function(u,d,p){var y=Object(u);if(!Wi(u)){var m=cf(d);u=ac(u),d=function(A){return m(y[A],A,y)}}var _=c(u,d,p);return _>-1?y[m?u[_]:_]:void 0}},gd=function(c,u,d,p){for(var y=c.length,m=d+-1;++m<y;)if(u(c[m],m,c))return m;return-1},ov=/\s/,Up=function(c){for(var u=c.length;u--&&ov.test(c.charAt(u)););return u},Tm=/^\s+/,iv=function(c){return c&&c.slice(0,Up(c)+1).replace(Tm,"")},pl=/^[-+]0x[0-9a-f]+$/i,av=/^0b[01]+$/i,sv=/^0o[0-7]+$/i,lv=parseInt,yd=function(c){if(typeof c=="number")return c;if(Kr(c))return NaN;if(In(c)){var u=typeof c.valueOf=="function"?c.valueOf():c;c=In(u)?u+"":u}if(typeof c!="string")return c===0?c:+c;c=iv(c);var d=av.test(c);return d||sv.test(c)?lv(c.slice(2),d?2:8):pl.test(c)?NaN:+c},Ll=1/0,xf=function(c){return c?(c=yd(c))===Ll||c===-1/0?17976931348623157e292*(c<0?-1:1):c==c?c:0:c===0?c:0},Vp=function(c){var u=xf(c),d=u%1;return u==u?d?u-d:u:0},Wp=Math.max,Cu,Nu=$p((function(c,u,d){var p=c==null?0:c.length;if(!p)return-1;var y=d==null?0:Vp(d);return y<0&&(y=Wp(p+y,0)),gd(c,cf(u),y)})),Rr=new Uint8Array(16);function _d(){if(!Cu&&!(Cu=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 Cu(Rr)}for(var Of=/^(?:[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,hl=function(c){return typeof c=="string"&&Of.test(c)},aa=[],bc=0;bc<256;++bc)aa.push((bc+256).toString(16).substr(1));var Ti=function(c){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,d=(aa[c[u+0]]+aa[c[u+1]]+aa[c[u+2]]+aa[c[u+3]]+"-"+aa[c[u+4]]+aa[c[u+5]]+"-"+aa[c[u+6]]+aa[c[u+7]]+"-"+aa[c[u+8]]+aa[c[u+9]]+"-"+aa[c[u+10]]+aa[c[u+11]]+aa[c[u+12]]+aa[c[u+13]]+aa[c[u+14]]+aa[c[u+15]]).toLowerCase();if(!hl(d))throw TypeError("Stringified UUID is invalid");return d},Pu=function(c,u,d){var p=(c=c||{}).random||(c.rng||_d)();return p[6]=15&p[6]|64,p[8]=63&p[8]|128,Ti(p)},ts=function(){return Pu()},Sf=function(c){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",d=c.nodes.reduce((function(p,y){return p[y.id]=u+Pu(),y.id=p[y.id],p}),{});return c.edges.forEach((function(p){p.id=u+Pu(),p.sourceNodeId=d[p.sourceNodeId],p.targetNodeId=d[p.targetNodeId]})),c},Ra=(r(105),r(127),r(207),function(c,u,d){var p=c.x,y=c.y,m=u.x,_=u.y,A=d.x,N=d.y,U=(N-_)/(A-m),H=_-U*m;return p>=m&&p<=A&&y>=_&&y<=N&&Math.abs(y-U*p+H)<Number.EPSILON});function Fi(c){return Fi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},Fi(c)}function Il(c,u){var d=Object.keys(c);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(c);u&&(p=p.filter((function(y){return Object.getOwnPropertyDescriptor(c,y).enumerable}))),d.push.apply(d,p)}return d}function Fl(c){for(var u=1;u<arguments.length;u++){var d=arguments[u]!=null?arguments[u]:{};u%2?Il(Object(d),!0).forEach((function(p){Gp(c,p,d[p])})):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(d)):Il(Object(d)).forEach((function(p){Object.defineProperty(c,p,Object.getOwnPropertyDescriptor(d,p))}))}return c}function Gp(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writa
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function Ha(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function gl(c,u){var d=Object.keys(c);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(c);u&&(p=p.filter((function(y){return Object.getOwnPropertyDescriptor(c,y).enumerable}))),d.push.apply(d,p)}return d}function Ci(c){for(var u=1;u<arguments.length;u++){var d=arguments[u]!=null?arguments[u]:{};u%2?gl(Object(d),!0).forEach((function(p){mv(c,p,d[p])})):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(d)):gl(Object(d)).forEach((function(p){Object.defineProperty(c,p,Object.getOwnPropertyDescriptor(d,p))}))}return c}function ds(c,u,d,p){d&&Object.defineProperty(c,u,{enumerable:d.enumerable,configurable:d.configurable,writable:d.writable,value:d.initializer?d.initializer.call(p):void 0})}function Gs(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}function by(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function $f(){return $f=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(c,u,d){var p=Tc(c,u);if(p){var y=Object.getOwnPropertyDescriptor(p,u);return y.get?y.get.call(arguments.length<3?c:d):y.value}},$f.apply(this,arguments)}function Tc(c,u){for(;!Object.prototype.hasOwnProperty.call(c,u)&&(c=ns(c))!==null;);return c}function Jr(c,u){return Jr=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},Jr(c,u)}function Im(c){var u=(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 d,p=ns(c);if(u){var y=ns(this).constructor;d=Reflect.construct(p,arguments,y)}else d=p.apply(this,arguments);return fs(this,d)}}function fs(c,u){if(u&&(lu(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Oi(c)}function Oi(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}function ns(c){return ns=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},ns(c)}function mv(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}function Ea(c,u,d,p,y){var m={};return Object.keys(p).forEach((function(_){m[_]=p[_]})),m.enumerable=!!m.enumerable,m.configurable=!!m.configurable,("value"in m||m.initializer)&&(m.writable=!0),m=d.slice().reverse().reduce((function(_,A){return A(c,u,_)||_}),m),y&&m.initializer!==void 0&&(m.value=m.initializer?m.initializer.call(y):void 0,m.initializer=void 0),m.initializer===void 0&&(Object.defineProperty(c,u,m),m=null),m}var Ts=(Er=(function(c){(function(m,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");m.prototype=Object.create(_&&_.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),_&&Jr(m,_)})(y,c);var u,d,p=Im(y);function y(){var m;Gs(this,y);for(var _=arguments.length,A=new Array(_),N=0;N<_;N++)A[N]=arguments[N];return mv(Oi(m=p.call.apply(p,[this].concat(A))),"modelType",so.POLYLINE_EDGE),mv(Oi(m),"draggingPointList",void 0),ds(Oi(m),"dbClickPosition",vv,Oi(m)),m}return u=y,(d=[{key:"initEdgeData",value:function(m){this.offset=30,$f(ns(y.prototype),"initEdgeData",this).call(this,m)}},{key:"getEdgeStyle",value:function(){var m=this.graphModel.theme.polyline;return Ci(Ci({},$f(ns(y.prototype),"getEdgeStyle",this).call(this)),Uo(m))}},{key:"getTextPosition",value:function(){var m,_=(m=this.text)===null||m===void 0?void 0:m.value;if(this.dbClickPosition&&!_){var A=this.dbClickPosition;return{x:A.x,y:A.y}}var N=jr(this.points),U=Bf(Or(N),2),H=U[0],oe=U[1];return{x:(H.x+oe.x)/2,y:(H.y+oe.y)/2}}},{ke
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function Dt(c){return Dt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},Dt(c)}function yt(c,u){return(function(d){if(Array.isArray(d))return d})(c)||(function(d,p){var y=d==null?null:typeof Symbol<"u"&&d[Symbol.iterator]||d["@@iterator"];if(y!=null){var m,_,A=[],N=!0,U=!1;try{for(y=y.call(d);!(N=(m=y.next()).done)&&(A.push(m.value),!p||A.length!==p);N=!0);}catch(H){U=!0,_=H}finally{try{N||y.return==null||y.return()}finally{if(U)throw _}}return A}})(c,u)||Nt(c,u)||(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 Nt(c,u){if(c){if(typeof c=="string")return tn(c,u);var d=Object.prototype.toString.call(c).slice(8,-1);return d==="Object"&&c.constructor&&(d=c.constructor.name),d==="Map"||d==="Set"?Array.from(c):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?tn(c,u):void 0}}function tn(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}var ln=function(c,u){var d;switch(c.type){case"line":default:d=new Ed(c,u);break;case"polyline":d=new Ts(c,u)}return d},nn=function(c,u){return 2*Math.abs(c.centerX-u.centerX)<c.width+u.width&&2*Math.abs(c.centerY-u.centerY)<c.height+u.height},Mt=function(c){var u=[],d={};return c.forEach((function(p){var y="".concat(p.x,"-").concat(p.y);p.id=y,d[y]=p})),Object.keys(d).forEach((function(p){u.push(d[p])})),u},wn=function(c,u){var d=[c,{x:c.x,y:u.y},u];return Mt(d)},pn=function(c,u){return c.width===0&&c.height===0?c:{centerX:c.centerX,centerY:c.centerY,minX:c.minX-u,minY:c.minY-u,maxX:c.maxX+u,maxY:c.maxY+u,height:c.height+2*u,width:c.width+2*u}},rn=function(c,u){var d=Math.abs(c.x-u.centerX),p=Math.abs(c.y-u.centerY);return d/u.width>p/u.height?ti.HORIZONTAL:ti.VERTICAL},Wt=function(c,u,d){return rn(d,u)===ti.HORIZONTAL?{x:d.x>c.centerX?c.maxX:c.minX,y:d.y}:{x:d.x,y:d.y>c.centerY?c.maxY:c.minY}},lt=function(c,u){var d=Math.min(c.minX,u.minX),p=Math.min(c.minY,u.minY),y=Math.max(c.maxX,u.maxX),m=Math.max(c.maxY,u.maxY);return{centerX:(d+y)/2,centerY:(p+m)/2,minX:d,minY:p,maxX:y,maxY:m,height:m-p,width:y-d}},St=function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],u=arguments.length>1?arguments[1]:void 0,d=[],p=[];c.forEach((function(H){d.push(H.x),p.push(H.y)}));var y=Math.min.apply(Math,d),m=Math.max.apply(Math,d),_=Math.min.apply(Math,p),A=Math.max.apply(Math,p),N=m-y,U=A-_;return u&&(N+=u,U+=u),{centerX:(y+m)/2,centerY:(_+A)/2,maxX:m,maxY:A,minX:y,minY:_,x:(y+m)/2,y:(_+A)/2,height:U,width:N}},sn=function(c){var u=c.minX,d=c.minY,p=c.maxX,y=c.maxY;return[{x:u,y:d},{x:p,y:d},{x:p,y},{x:u,y}]},An=function(c,u){var d=c.x,p=c.y;return d<u.minX||d>u.maxX||p<u.minY||p>u.maxY},Xt=function(c,u){return u<c.minX||u>c.maxX?[]:[{x:u,y:c.minY},{x:u,y:c.maxY}]},Pn=function(c,u){return u<c.minY||u>c.maxY?[]:[{x:c.minX,y:u},{x:c.maxX,y:u}]},Kt=function(c,u){return Xt(c,u.x).concat(Pn(c,u.y))},_n=function(c,u){return Math.abs(c.x-u.x)+Math.abs(c.y-u.y)},Yt=function(c,u){var d=0;return u.forEach((function(p){p&&(c.x===p.x&&(d+=-2),c.y===p.y&&(d+=-2))})),d},xn=function(c,u,d,p,y){return _n(c,u)+_n(c,d)+Yt(c,[u,d,p,y])},ar=function c(u,d,p,y,m){m||(m=0),u.unshift(d[y]),p[y]&&p[y]!==y&&m<=100&&c(u,d,p,p[y],m+1)},xr=function(c,u){var d=c.indexOf(u);d>-1&&c.splice(d,1)},on=function(c,u,d,p){var y=u.x-c.x,m=u.y-c.y,_=p.x-d.x,A=p.y-d.y,N=(-m*(c.x-d.x)+y*(c.y-d.y))/(-_*m+y*A),U=(_*(c.y-d.y)-A*(c.x-d.x))/(-_*m+y*A);return N>=0&&N<=1&&U>=0&&U<=1},Zt=function(c,u,d){if(d.width===0&&d.height===0)return!1;var p=yt(sn(d),4),y=p[0],m=p[1],_=p[2],A=p[3];return on(c,u,y,m)||on(c,u,y,A)||on(c,u,m,_)||on(c,u,_,A)},Ht=function(c,u,d,p){var y=[];return c.forEach((function(m){m!==u&&(m.x!==u.x&&m.y!==u.y||Zt(m,u,d)||Zt(m,u,p)||y.push(m))})),Mt(y)},fr=function(c,u,d,p,y,m,_){var A=[],N=[u],U={},H={},oe={};H[u.id]=0,oe[u.id]=xn(u,d,u);var ue={};c.forEach((function(qe){ue[qe.id]=qe}));for(var Ce=function(){var qe=void 0,Ot=1/0;if(N.forEach((function(Ft){oe[Ft.id]<Ot&&(Ot=oe[Ft.id],qe=Ft)})),qe===d){var xt=[];return ar(xt,ue,U,d.id),{v:xt}}xr(N,qe),A.push(qe),Ht(c,qe,p,y).forEach((function(Ft){if(A.indexOf(Ft)===-1){N.indexOf(Ft)===-1&&N.push(Ft);var hn=oe[qe.id]+_n(qe,Ft);H[Ft.id]&&hn>=H[Ft.id]||(U[Ft.id]=qe.id,H[Ft.id]=hn,oe[Ft.id]=H[Ft.id]+xn(Ft,d,u,m,_))}}))};N.length;){var Ve=Ce();if(Dt(Ve)==="object")return Ve.v}return[u,d]},Dr=function(c){return gi(c)},Un=function(c){for(var u=1;u<c.length-1;){var d=c[u-1],p=c[u],y=c[u+1];d.x===p.x&&p.x===y.x||d.y===p.y&&p.y===y.y?c.splice(u,1):u++}return c},$r=function(c,u,d,p,y){var m=Dr(d),_=Dr(p),A=pn(m,y),N=pn(_,y),U=Wt
|
|||
|
|
L`).concat(m.rightX," ").concat(m.rightY,`
|
|||
|
|
L`).concat(_.rightX," ").concat(_.rightY,`
|
|||
|
|
L`).concat(_.leftX," ").concat(_.leftY," z")}return{d:u,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}},zi=function(c){var u=c.start,d=c.end,p=c.sourceNode,y=c.targetNode,m=c.offset,_=gi(p),A=gi(y),N=pn(_,m),U=pn(A,m);return{sNext:Wt(N,_,u),ePre:Wt(U,A,d)}},di=function(c){var u=c.replace(/M/g,"").replace(/C/g,",").split(",");return[Cr(u[0]),Cr(u[1]),Cr(u[2]),Cr(u[3])]},Cr=function(c){var u=yt(c.replace(/(^\s*)/g,"").split(" "),2);return{x:+u[0],y:+u[1]}},la=function(c,u){var d=yt(c,4);return[Ni(d[0],d[1],d[2],d[3],u),c[3]]},co=function(c,u){for(var d,p=c.x,y=c.y,m=jr(u),_=Number.MAX_SAFE_INTEGER,A=[],N=0;N<m.length;N++)A.push({start:m[N],end:m[(N+1)%m.length]});if(A.forEach((function(ue){var Ce=ue.start,Ve=ue.end;if(Ce.x===Ve.x){var qe={x:Ce.x,y};if(Ra(qe,Ce,Ve)){var Ot=Math.abs(Ce.x-p);Ot<_&&(_=Ot,d=qe)}}else if(Ce.y===Ve.y){var xt={x:p,y:Ce.y};if(Ra(xt,Ce,Ve)){var Ft=Math.abs(Ce.y-y);Ft<_&&(_=Ft,d=xt)}}})),!d){var U=A[0],H=U.start,oe=U.end;d={x:H.x+(oe.x-H.x)/2,y:H.y+(oe.y-H.y)/2}}return d},cr=function(c){return cl(c,["id","type","sourceNodeId","sourceAnchorId","targetNodeId","targetAnchorId","pointsList","startPoint","endPoint","properties"])},Xr=function(c,u){return Math.sqrt(Math.pow(c.x-u.x,2)+Math.pow(c.y-u.y,2))};function Nr(c,u){return typeof u!="function"?function(d,p,y){return Object.assign({type:c.edgeType},y)}:function(d,p,y){var m=u(d,p,y);return m?typeof m=="string"?Object.assign({},y,{type:m}):Object.assign({type:m},y):{type:c.edgeType}}}r(208);var fi=function(){};function $l(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function yi(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}var Te=(function(){function c(p){var y=this,m=p.onDragStart,_=m===void 0?fi:m,A=p.onDragging,N=A===void 0?fi:A,U=p.onDragEnd,H=U===void 0?fi:U,oe=p.eventType,ue=oe===void 0?"":oe,Ce=p.eventCenter,Ve=Ce===void 0?null:Ce,qe=p.step,Ot=qe===void 0?1:qe,xt=p.isStopPropagation,Ft=xt===void 0||xt,hn=p.model,Hn=hn===void 0?null:hn,zn=p.data,Ar=zn===void 0?null:zn;(function(Vn,vr){if(!(Vn instanceof vr))throw new TypeError("Cannot call a class as a function")})(this,c),yi(this,"onDragStart",void 0),yi(this,"onDragging",void 0),yi(this,"onDragEnd",void 0),yi(this,"step",void 0),yi(this,"isStopPropagation",void 0),yi(this,"isDragging",!1),yi(this,"isStartDragging",!1),yi(this,"startX",0),yi(this,"startY",0),yi(this,"sumDeltaX",0),yi(this,"sumDeltaY",0),yi(this,"eventType",void 0),yi(this,"eventCenter",void 0),yi(this,"model",void 0),yi(this,"data",void 0),yi(this,"startTime",void 0),yi(this,"handleMouseDown",(function(Vn){var vr,er,Eo,Co=(vr=window)===null||vr===void 0?void 0:vr.document;if(Vn.button===0){y.isStopPropagation&&Vn.stopPropagation(),y.isStartDragging=!0,y.startX=Vn.clientX,y.startY=Vn.clientY,Co.addEventListener("mousemove",y.handleMouseMove,!1),Co.addEventListener("mouseup",y.handleMouseUp,!1);var zr=(er=y.model)===null||er===void 0?void 0:er.getData();(Eo=y.eventCenter)===null||Eo===void 0||Eo.emit(ur["".concat(y.eventType,"_MOUSEDOWN")],{e:Vn,data:y.data||zr}),y.startTime=new Date().getTime()}})),yi(this,"handleMouseMove",(function(Vn){if(y.isStopPropagation&&Vn.stopPropagation(),y.isStartDragging&&(y.sumDeltaX+=Vn.clientX-y.startX,y.sumDeltaY+=Vn.clientY-y.startY,y.startX=Vn.clientX,y.startY=Vn.clientY,y.step<=1||Math.abs(y.sumDeltaX)>y.step||Math.abs(y.sumDeltaY)>y.step)){var vr,er=y.sumDeltaX%y.step,Eo=y.sumDeltaY%y.step,Co=y.sumDeltaX-er,zr=y.sumDeltaY-Eo;y.sumDeltaX=er,y.sumDeltaY=Eo;var Fo,ga=(vr=y.model)===null||vr===void 0?void 0:vr.getData();y.isDragging||((Fo=y.eventCenter)===null||Fo===void 0||Fo.emit(ur["".concat(y.eventType,"_DRAGSTART")],{e:Vn,data:y.data||ga}),y.onDragStart({event:Vn})),y.isDragging=!0,Promise.resolve().then((function(){var ya,Cs;y.onDragging({deltaX:Co,deltaY:zr,event:Vn}),(ya=y.eventCenter)===null||ya===void 0||ya.emit(ur["".concat(y.eventType,"_MOUSEMOVE")],{e:Vn,data:y.data||ga}),(Cs=y.
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function G(c){return(function(u){if(Array.isArray(u))return ce(u)})(c)||(function(u){if(typeof Symbol<"u"&&u[Symbol.iterator]!=null||u["@@iterator"]!=null)return Array.from(u)})(c)||te(c)||(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 te(c,u){if(c){if(typeof c=="string")return ce(c,u);var d=Object.prototype.toString.call(c).slice(8,-1);return d==="Object"&&c.constructor&&(d=c.constructor.name),d==="Map"||d==="Set"?Array.from(c):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?ce(c,u):void 0}}function ce(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function Oe(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}function Fe(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function et(c,u,d){return u&&Fe(c.prototype,u),c}function jt(c,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(u&&u.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),u&&Tn(c,u)}function Vt(c){var u=an();return function(){var d,p=Br(c);if(u){var y=Br(this).constructor;d=Reflect.construct(p,arguments,y)}else d=p.apply(this,arguments);return yn(this,d)}}function yn(c,u){if(u&&(x(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Yn(c)}function Yn(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}function Qn(c){var u=typeof Map=="function"?new Map:void 0;return Qn=function(d){if(d===null||(p=d,Function.toString.call(p).indexOf("[native code]")===-1))return d;var p;if(typeof d!="function")throw new TypeError("Super expression must either be null or a function");if(u!==void 0){if(u.has(d))return u.get(d);u.set(d,y)}function y(){return Sr(d,arguments,Br(this).constructor)}return y.prototype=Object.create(d.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),Tn(y,d)},Qn(c)}function Sr(c,u,d){return Sr=an()?Reflect.construct:function(p,y,m){var _=[null];_.push.apply(_,y);var A=new(Function.bind.apply(p,_));return m&&Tn(A,m.prototype),A},Sr.apply(null,arguments)}function an(){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 Tn(c,u){return Tn=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},Tn(c,u)}function Br(c){return Br=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},Br(c)}function ir(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}var at,Yr,Ao,Mr,Ur,xa,zs,uu,Oa,Iu,Nc,Qp,yv,Fu=(function(c){jt(d,c);var u=Vt(d);function d(){var p;Oe(this,d);for(var y=arguments.length,m=new Array(y),_=0;_<y;_++)m[_]=arguments[_];return ir(Yn(p=u.call(this,m.length)),"rows",void 0),ir(Yn(p),"columns",void 0),p.fill(new Array(3)),m.forEach((function(A,N){p[N]=A})),p.columns=m[0].length,p.rows=m.length,Object.setPrototypeOf(Yn(p),d.prototype),p}return et(d,[{key:"getRow",value:function(p){return this[p]}},{key:"getColumn",value:function(p){return G(this.map((function(y){return y[p]})))}},{key:"transpose",value:function(){for(var p=[],y=0;y<this.columns;y++)p.push(this.getColumn(y));return Sr(d,p)}},{key:"cross",value:function(p){var y=new Array(this.rows).fill("").map((function(){return[]}));if(this.columns===p.rows)for(var m=0;m<this.rows;m++)for(var _=this.getRow(m),A=function(U){var H=p.getColumn(U);y[m][U]=_.reduce((function(oe,ue,Ce){return oe+ue*H[Ce]}),0)},N=0;N<p.columns;N++)A(N);return Sr(d,G(y))}},{key:"to2D",value:function(){return this.map((function(p){return[p[0],p[1]]}))}},{key:"toPoints",value:function(){return this.map((function(p){return new g(p[0],p[1])}))}},{key:"toString",value:function(){var p=T(this[0],2),y=p[0],m=p[1],_=T(this[1],2),A=_[0],N=_[1],U=T(this[2],2),H=U[0],oe=U[1];return"matrix(".concat(y," ").concat(m,
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function Pc(c){return(function(u){if(Array.isArray(u))return m1(u)})(c)||(function(u){if(typeof Symbol<"u"&&u[Symbol.iterator]!=null||u["@@iterator"]!=null)return Array.from(u)})(c)||wv(c)||(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 wv(c,u){if(c){if(typeof c=="string")return m1(c,u);var d=Object.prototype.toString.call(c).slice(8,-1);return d==="Object"&&c.constructor&&(d=c.constructor.name),d==="Map"||d==="Set"?Array.from(c):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?m1(c,u):void 0}}function m1(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function fb(c){return fb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},fb(c)}function Bu(c,u,d,p){d&&Object.defineProperty(c,u,{enumerable:d.enumerable,configurable:d.configurable,writable:d.writable,value:d.initializer?d.initializer.call(p):void 0})}function h5(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function kc(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}function Tr(c,u,d,p,y){var m={};return Object.keys(p).forEach((function(_){m[_]=p[_]})),m.enumerable=!!m.enumerable,m.configurable=!!m.configurable,("value"in m||m.initializer)&&(m.writable=!0),m=d.slice().reverse().reduce((function(_,A){return A(c,u,_)||_}),m),y&&m.initializer!==void 0&&(m.value=m.initializer?m.initializer.call(y):void 0,m.initializer=void 0),m.initializer===void 0&&(Object.defineProperty(c,u,m),m=null),m}var iT,aT=200,sT=(at=(function(){function c(p){(function(Ce,Ve){if(!(Ce instanceof Ve))throw new TypeError("Cannot call a class as a function")})(this,c),kc(this,"rootEl",void 0),Bu(this,"width",Yr,this),Bu(this,"height",Ao,this),kc(this,"theme",void 0),kc(this,"eventCenter",void 0),kc(this,"modelMap",new Map),kc(this,"topElement",void 0),kc(this,"animation",void 0),kc(this,"idGenerator",void 0),kc(this,"edgeGenerator",void 0),kc(this,"nodeMoveRules",[]),kc(this,"customTrajectory",void 0),Bu(this,"edgeType",Mr,this),Bu(this,"nodes",Ur,this),Bu(this,"edges",xa,this),Bu(this,"overlapMode",zs,this),Bu(this,"background",uu,this),Bu(this,"transformModel",Oa,this),Bu(this,"editConfigModel",Iu,this),Bu(this,"gridSize",Nc,this),Bu(this,"partial",Qp,this),Bu(this,"fakerNode",yv,this);var y,m=p.container,_=p.background,A=_===void 0?{}:_,N=p.grid,U=p.idGenerator,H=p.edgeGenerator,oe=p.animation,ue=p.customTrajectory;this.background=A,fb(N)==="object"&&(this.gridSize=N.size),this.rootEl=m,this.editConfigModel=new Mp(p),this.eventCenter=new Bp,this.transformModel=new Jh(this.eventCenter,p),this.theme=iu(p.style),this.edgeType=p.edgeType||"polyline",this.width=p.width,this.height=p.height,this.animation=(y=oe)&&typeof y!="boolean"?yc(Uo(_v),y):Uo(y===!0?Ey:_v),this.partial=p.partial,this.overlapMode=p.overlapMode||0,this.idGenerator=U,this.customTrajectory=ue,this.edgeGenerator=Nr(this,H),this.width=p.width||this.rootEl.getBoundingClientRect().width,this.height=p.height||this.rootEl.getBoundingClientRect().height,this.flowId=ts()}var u,d;return u=c,d=[{key:"nodesMap",get:function(){return this.nodes.reduce((function(p,y,m){return p[y.id]={index:m,model:y},p}),{})}},{key:"edgesMap",get:function(){return this.edges.reduce((function(p,y,m){return p[y.id]={index:m,model:y},p}),{})}},{key:"modelsMap",get:function(){return[].concat(Pc(this.nodes),Pc(this.edges)).reduce((function(p,y){return p[y.id]=y,p}),{})}},{key:"sortElements",get:function(){var p=[];this.nodes.forEach((function(U){return p.push(U)})),this.edges.forEach((function(U){return p.push(U)})),p=p.sort((function(U,H){return U.zIndex-H.zIndex}));for(var y=[],m=[-200,-200],_=[this.width+aT,this.height+aT],A=0;A<p.length;A++){var N=p[A];N.visible&&(!this.partial||N.isSelected||this.isElementInArea(N,m,_,!1,!1))&&y.push(N)}return y}},{key:"textEditElement",get:function(){var p=this.nodes.find((function(m){return m.state===Io.TEXT_EDIT})),y=this.edges.find((function(m){return m.state===Io.TEXT_EDIT}));retu
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function fT(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}var pT,Fm=function(c){var u={x1:10,y1:10,x2:20,y2:20,stroke:"black"};return Object.entries(c).forEach((function(d){var p=j5(d,2),y=p[0],m=p[1];(y==="style"||A1(m)!=="object")&&(u[y]=m)})),Object(re.g)("line",u)};function M1(c){return M1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},M1(c)}function hT(c,u){var d=Object.keys(c);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(c);u&&(p=p.filter((function(y){return Object.getOwnPropertyDescriptor(c,y).enumerable}))),d.push.apply(d,p)}return d}function gb(c){for(var u=1;u<arguments.length;u++){var d=arguments[u]!=null?arguments[u]:{};u%2?hT(Object(d),!0).forEach((function(p){L5(c,p,d[p])})):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(d)):hT(Object(d)).forEach((function(p){Object.defineProperty(c,p,Object.getOwnPropertyDescriptor(d,p))}))}return c}function L5(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}function I5(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}function F5(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function T1(c,u){return T1=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},T1(c,u)}function B5(c){var u=(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 d,p=yb(c);if(u){var y=yb(this).constructor;d=Reflect.construct(p,arguments,y)}else d=p.apply(this,arguments);return $5(this,d)}}function $5(c,u){if(u&&(M1(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d})(c)}function yb(c){return yb=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},yb(c)}var vT,U5=Lc(pT=(function(c){(function(m,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");m.prototype=Object.create(_&&_.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),_&&T1(m,_)})(y,c);var u,d,p=B5(y);function y(){return I5(this,y),p.apply(this,arguments)}return u=y,(d=[{key:"render",value:function(){var m=this.props.snaplineModel,_=m.position,A=m.isShowHorizontal,N=m.isShowVertical,U=m.getStyle(),H=_.x,oe=H===void 0?0:H,ue=_.y,Ce=ue===void 0?0:ue,Ve=gb(gb({x1:-1e5,y1:Ce,x2:1e5,y2:Ce},U),{},{stroke:A?U.stroke:"none"}),qe=gb(gb({x1:oe,y1:-1e5,x2:oe,y2:1e5},U),{},{stroke:N?U.stroke:"none"});return Object(re.g)("g",{className:"lf-snapline"},Object(re.g)(Fm,Ve),Object(re.g)(Fm,qe))}}])&&F5(u.prototype,d),y})(re.a))||pT;function C1(c){return C1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},C1(c)}function V5(c,u){return(function(d){if(Array.isArray(d))return d})(c)||(function(d,p){var y=d==null?null:typeof Symbol<"u"&&d[Symbol.iterator]||d["@@iterator"];if(y!=null){var m,_,A=[],N=!0,U=!1;try{for(y=y.call(d);!(N=(m=y.next()).done)&&(A.push(m.value),!p||A.length!==p);N=!0);}catch(H){U=!0,_=H}finally{try{N||y.return==null||y.return()}finally{if(U)throw _}}return A}})(c,u)||(function(d,p){if(d){if(typeof d=="string")return mT(d,p);var y=Object.prototype.toString.call(d).slice(8,-1);if(y==="Object"&&d.construct
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function mT(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function th(c){var u=c.x,d=c.y,p=c.width,y=c.height,m=c.className,_=c.radius,A=u-p/2,N=d-y/2,U={};return Object.entries(c).forEach((function(H){var oe=V5(H,2),ue=oe[0],Ce=oe[1];C1(Ce)!=="object"&&(U[ue]=Ce)})),U.className=m?"lf-basic-shape ".concat(m):"lf-basic-shape",_&&(U.rx=_,U.ry=_),U.x=A,U.y=N,Object(re.g)("rect",U)}function N1(c){return N1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},N1(c)}function Bm(){return Bm=Object.assign||function(c){for(var u=1;u<arguments.length;u++){var d=arguments[u];for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&(c[p]=d[p])}return c},Bm.apply(this,arguments)}function gT(c,u){var d=Object.keys(c);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(c);u&&(p=p.filter((function(y){return Object.getOwnPropertyDescriptor(c,y).enumerable}))),d.push.apply(d,p)}return d}function yT(c){for(var u=1;u<arguments.length;u++){var d=arguments[u]!=null?arguments[u]:{};u%2?gT(Object(d),!0).forEach((function(p){W5(c,p,d[p])})):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(d)):gT(Object(d)).forEach((function(p){Object.defineProperty(c,p,Object.getOwnPropertyDescriptor(d,p))}))}return c}function W5(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}function G5(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}function z5(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function P1(c,u){return P1=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},P1(c,u)}function H5(c){var u=(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 d,p=_b(c);if(u){var y=_b(this).constructor;d=Reflect.construct(p,arguments,y)}else d=p.apply(this,arguments);return X5(this,d)}}function X5(c,u){if(u&&(N1(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d})(c)}function _b(c){return _b=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},_b(c)}th.defaultProps={className:"",radius:""};var _T,Y5=Lc(vT=(function(c){(function(m,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");m.prototype=Object.create(_&&_.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),_&&P1(m,_)})(y,c);var u,d,p=H5(y);function y(){return G5(this,y),p.apply(this,arguments)}return u=y,(d=[{key:"getNodesOutline",value:function(){var m=this.props.graphModel,_=m.nodes,A=m.editConfigModel,N=A.hoverOutline,U=A.nodeSelectedOutline,H=[];return _.forEach((function(oe){if(oe.isHovered||oe.isSelected){var ue=oe.isHovered,Ce=oe.isSelected,Ve=oe.x,qe=oe.y,Ot=oe.width,xt=oe.height;if(U&&Ce||N&&ue){var Ft=oe.getOutlineStyle(),hn={};if(Object.keys(Ft).forEach((function(zn){zn!=="hover"&&(hn[zn]=Ft[zn])})),ue){var Hn=Ft.hover;hn=yT(yT({},hn),Hn)}H.push(Object(re.g)(th,Bm({transform:oe.transform,className:"lf-outline-node",x:Ve,y:qe,width:Ot+10,height:xt+10},hn)))}}})),H}},{key:"getEdgeOutline",value:function(){for(var m=this.props.graphModel,_=m.edges,A=m.editConfigModel,N=A.edgeSelectedOutline,U=A.hoverOutline,H=[],oe=0;oe<_.length;oe++){var ue=_[oe];(N&&ue.isSelected||U&&ue.isHovered)&&(ue.modelType===so.LINE_EDGE?H.push(this.get
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function bT(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function $m(c){var u=c.x,d=u===void 0?0:u,p=c.y,y=p===void 0?0:p,m=c.r,_=m===void 0?4:m,A=c.className,N={cx:d,cy:y,r:_,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(c).forEach((function(U){var H=q5(U,2),oe=H[0],ue=H[1];k1(ue)!=="object"&&(N[oe]=ue)})),N.className=A?"lf-basic-shape ".concat(A):"lf-basic-shape",Object(re.g)("circle",N)}function R1(c){return R1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},R1(c)}function K5(c,u){return(function(d){if(Array.isArray(d))return d})(c)||(function(d,p){var y=d==null?null:typeof Symbol<"u"&&d[Symbol.iterator]||d["@@iterator"];if(y!=null){var m,_,A=[],N=!0,U=!1;try{for(y=y.call(d);!(N=(m=y.next()).done)&&(A.push(m.value),!p||A.length!==p);N=!0);}catch(H){U=!0,_=H}finally{try{N||y.return==null||y.return()}finally{if(U)throw _}}return A}})(c,u)||(function(d,p){if(d){if(typeof d=="string")return wT(d,p);var y=Object.prototype.toString.call(d).slice(8,-1);if(y==="Object"&&d.constructor&&(y=d.constructor.name),y==="Map"||y==="Set")return Array.from(d);if(y==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(y))return wT(d,p)}})(c,u)||(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 wT(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function xy(){return xy=Object.assign||function(c){for(var u=1;u<arguments.length;u++){var d=arguments[u];for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&(c[p]=d[p])}return c},xy.apply(this,arguments)}function ET(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}function Z5(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function xT(c,u,d){return u&&Z5(c.prototype,u),c}function OT(c,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(u&&u.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),u&&D1(c,u)}function D1(c,u){return D1=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},D1(c,u)}function ST(c){var u=(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 d,p=wb(c);if(u){var y=wb(this).constructor;d=Reflect.construct(p,arguments,y)}else d=p.apply(this,arguments);return J5(this,d)}}function J5(c,u){if(u&&(R1(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return bb(c)}function bb(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}function wb(c){return wb=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},wb(c)}function j1(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}var AT,MT=(function(c){OT(d,c);var u=ST(d);function d(){var p;return ET(this,d),j1(bb(p=u.call(this)),"dragHandler",void 0),j1(bb(p),"onDragging",(function(y){var m=y.event,_=p.props,A=_.graphModel,N=_.bezierModel,U=_.type,H=A.getPointByClient({x:m.clientX,y:m.clientY}).canvasOverlayPosition,oe=H.x,ue=H.y;N.updateAdjustAnchor({x:oe,y:ue},U),A.eventCenter.emit(ur.EDGE_ADJUST,{data:N.getData()})})),j1(bb(p),"onDragEnd",(function(){p.props.bezierModel.isDragging=!1})),p.dragHandler=new Te({onDragging:p.onDragging,onDragEnd:p.onDragEnd}),p}return xT(d,[{key:"render",value:function(){var p=this,y=this.props.position,m=y.x,_=y.y,A=this.props.bezierModel.getEdgeStyle().adjustAnchor;return Object(re.g)($m,xy({className:"lf-bezier-adjust-anchor",x:m,y:_},A,{onMouseDown:function(N){p.dragHandler.handleMouseDown(N)}}))}}]),d})(re.a),Q5=Lc(_T=(function(c){OT(d,c);var u=ST(d);function d(){return ET(this,d),u.apply(this,arguments)}return xT(d,[{key:"getBezierAdjust",value:function(p,y){var m=p.path,_=p.id,A=K5(di(m),4),N=A[0],U=A[1],H=A[2],oe=A[3],ue=p.getEdgeStyle().adjustLine,Ce=[];return Ce.push(Object(re.g)(Fm,xy({x1:N.x,y1:N.y,x2:U.x,y2:U.y},ue))),Ce.push(Object(re.g)(MT,{position:U,bezierModel:p,graphModel:y,key:"".concat(_,"_ePre"),type:"sNext"})),Ce.push(Object(re.g)(Fm,xy({x1:oe.x,y1:oe.y,x2:H.x,y2:H.y},ue))),Ce.push(Object(re.g)(MT,{position:H,bezierModel:p,graphModel:y,key:"".concat(_,"_sNext"),type:"ePre"})),Ce}},{key:"selectedBezierEdge",value:function(){for(var p=this.props.graphModel,y=p.edges,m=[],_=0;_<y.length;_++){var A=y[_];A.isSelected&&A.modelType===so.BEZIER_EDGE&&A.draggable&&m.push(this.getBezierAdjust(A,p))}return m}},{key:"render",value:function(){return Object(re.g)("g",{className:"lf-bezier-adjust"},this.selectedBezierEdge())}}]),d})(re.a))||_T;function L1(c){return L1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},L1(c)}function e6(c,u){if(!(c instanceof u))throw new TypeError("Canno
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function RT(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function DT(c,u){var d=Object.keys(c);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(c);u&&(p=p.filter((function(y){return Object.getOwnPropertyDescriptor(c,y).enumerable}))),d.push.apply(d,p)}return d}function Sb(c){for(var u=1;u<arguments.length;u++){var d=arguments[u]!=null?arguments[u]:{};u%2?DT(Object(d),!0).forEach((function(p){jT(c,p,d[p])})):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(d)):DT(Object(d)).forEach((function(p){Object.defineProperty(c,p,Object.getOwnPropertyDescriptor(d,p))}))}return c}function p6(c,u,d,p){d&&Object.defineProperty(c,u,{enumerable:d.enumerable,configurable:d.configurable,writable:d.writable,value:d.initializer?d.initializer.call(p):void 0})}function h6(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}function v6(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function Oy(){return Oy=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(c,u,d){var p=m6(c,u);if(p){var y=Object.getOwnPropertyDescriptor(p,u);return y.get?y.get.call(arguments.length<3?c:d):y.value}},Oy.apply(this,arguments)}function m6(c,u){for(;!Object.prototype.hasOwnProperty.call(c,u)&&(c=nh(c))!==null;);return c}function W1(c,u){return W1=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},W1(c,u)}function g6(c){var u=(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 d,p=nh(c);if(u){var y=nh(this).constructor;d=Reflect.construct(p,arguments,y)}else d=p.apply(this,arguments);return y6(this,d)}}function y6(c,u){if(u&&(U1(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ab(c)}function Ab(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}function nh(c){return nh=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},nh(c)}function jT(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}function Rc(c,u,d,p,y){var m={};return Object.keys(p).forEach((function(_){m[_]=p[_]})),m.enumerable=!!m.enumerable,m.configurable=!!m.configurable,("value"in m||m.initializer)&&(m.writable=!0),m=d.slice().reverse().reduce((function(_,A){return A(c,u,_)||_}),m),y&&m.initializer!==void 0&&(m.value=m.initializer?m.initializer.call(y):void 0,m.initializer=void 0),m.initializer===void 0&&(Object.defineProperty(c,u,m),m=null),m}var G1=(Zo=(function(c){(function(m,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");m.prototype=Object.create(_&&_.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),_&&W1(m,_)})(y,c);var u,d,p=g6(y);function y(){var m;h6(this,y);for(var _=arguments.length,A=new Array(_),N=0;N<_;N++)A[N]=arguments[N];return jT(Ab(m=p.call.apply(p,[this].concat(A))),"modelType",so.BEZIER_EDGE),p6(Ab(m),"path",PT,Ab(m)),m}return u=y,(d=[{key:"initEdgeData",value:function(m){this.offset=100,Oy(nh(y.prototype),"initEdgeData",this).call(this,m)}},{key:"getEdgeStyle",value:function(){var m=this.graphModel.theme.bezier;return Sb(Sb({},Oy(nh(y.prototype),"getEdgeStyle",this).call(this)),Uo(m))}},{key:"getTextPosition",value:function(){if(this.pointsList&&this.pointsList.length>0){var m=0,_=0;return this.pointsList.forEach((function(A){var N=A.x,U=A.y;m+=N,_+=U})),{x:m/this.pointsList.length,y:_/this.pointsList.length}}return{x:(this.startPoint.x+this.endPoint.x)/2,y:(this.startPoint.y+this.endPoint.y)/2}}},
|
|||
|
|
C `).concat(N.x," ").concat(N.y,`,
|
|||
|
|
`).concat(U.x," ").concat(U.y,`,
|
|||
|
|
`).concat(H.x," ").concat(H.y)}},{key:"initPoints",value:function(){this.pointsList.length>0?this.path=this.getPath(this.pointsList):this.updatePoints()}},{key:"updatePoints",value:function(){var m=this.getControls(),_=m.sNext,A=m.ePre;this.updatePath(_,A)}},{key:"updatePath",value:function(m,_){m=Uo(m),_=Uo(_);var A={x:this.startPoint.x,y:this.startPoint.y},N={x:this.endPoint.x,y:this.endPoint.y};if(!m||!_){var U=this.getControls();m=U.sNext,_=U.ePre}this.pointsList=[A,m,_,N],this.path=this.getPath(this.pointsList)}},{key:"updateStartPoint",value:function(m){this.startPoint=Object.assign({},m),this.updatePoints()}},{key:"updateEndPoint",value:function(m){this.endPoint=Object.assign({},m),this.updatePoints()}},{key:"moveStartPoint",value:function(m,_){this.startPoint.x+=m,this.startPoint.y+=_;var A=V1(this.pointsList,3),N=A[1],U=A[2];N.x+=m,N.y+=_,this.updatePath(N,U)}},{key:"moveEndPoint",value:function(m,_){this.endPoint.x+=m,this.endPoint.y+=_;var A=V1(this.pointsList,3),N=A[1],U=A[2];U.x+=m,U.y+=_,this.updatePath(N,U)}},{key:"updateAdjustAnchor",value:function(m,_){_==="sNext"?this.pointsList[1]=m:_==="ePre"&&(this.pointsList[2]=m),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 m=this.pointsList;return m[m.length-1]||this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(m){var _=m.startPoint,A=m.endPoint,N=m.sourceNode,U=m.targetNode,H=zi({start:_,end:A,sourceNode:N,targetNode:U,offset:this.offset}),oe=H.sNext,ue=H.ePre;this.pointsList=[_,oe,ue,A],this.initPoints()}}])&&v6(u.prototype,d),y})(If),PT=Rc(Zo.prototype,"path",[a.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Rc(Zo.prototype,"initPoints",[a.k],Object.getOwnPropertyDescriptor(Zo.prototype,"initPoints"),Zo.prototype),Rc(Zo.prototype,"updatePoints",[a.k],Object.getOwnPropertyDescriptor(Zo.prototype,"updatePoints"),Zo.prototype),Rc(Zo.prototype,"updateStartPoint",[a.k],Object.getOwnPropertyDescriptor(Zo.prototype,"updateStartPoint"),Zo.prototype),Rc(Zo.prototype,"updateEndPoint",[a.k],Object.getOwnPropertyDescriptor(Zo.prototype,"updateEndPoint"),Zo.prototype),Rc(Zo.prototype,"moveStartPoint",[a.k],Object.getOwnPropertyDescriptor(Zo.prototype,"moveStartPoint"),Zo.prototype),Rc(Zo.prototype,"moveEndPoint",[a.k],Object.getOwnPropertyDescriptor(Zo.prototype,"moveEndPoint"),Zo.prototype),Rc(Zo.prototype,"updateAdjustAnchor",[a.k],Object.getOwnPropertyDescriptor(Zo.prototype,"updateAdjustAnchor"),Zo.prototype),Rc(Zo.prototype,"getAdjustStart",[a.k],Object.getOwnPropertyDescriptor(Zo.prototype,"getAdjustStart"),Zo.prototype),Rc(Zo.prototype,"getAdjustEnd",[a.k],Object.getOwnPropertyDescriptor(Zo.prototype,"getAdjustEnd"),Zo.prototype),Rc(Zo.prototype,"updateAfterAdjustStartAndEnd",[a.k],Object.getOwnPropertyDescriptor(Zo.prototype,"updateAfterAdjustStartAndEnd"),Zo.prototype),Zo),Dn,LT,IT,FT,BT,$T,UT,VT,WT,GT,zT,HT,XT,YT,qT,KT,ZT,JT,QT,eC,tC,nC,rC,_6=function(c){return c==null};function b6(c,u){return(function(d){if(Array.isArray(d))return d})(c)||(function(d,p){var y=d==null?null:typeof Symbol<"u"&&d[Symbol.iterator]||d["@@iterator"];if(y!=null){var m,_,A=[],N=!0,U=!1;try{for(y=y.call(d);!(N=(m=y.next()).done)&&(A.push(m.value),!p||A.length!==p);N=!0);}catch(H){U=!0,_=H}finally{try{N||y.return==null||y.return()}finally{if(U)throw _}}return A}})(c,u)||oC(c,u)||(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 z1(c){return z1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},z1(c)}function oC(c,u){if(c){if(typeof c=="string")return iC(c,u);var d=Object.prototype.toString.call(c).slice(8,-1);return d==="Object"&&c.constructor&&(d=c.constructor.name),d==="Map"||d==="Set"?Array.from(c):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?iC(c,u):void 0}}function iC(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function aC(c,u){var d=Object.keys(c);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(c);u&&(p=p.filter((function(y){return Object.getOwnPropertyDescriptor(c,y).enumerable}))),d.push.apply(d,p)}return d}function yl(c){for(var u=1;u<arguments.length;u++){var d=arguments[u]!=null?arguments[u]:{};u%2?aC(Object(d),!0).forEach((function(p){Ul(c,p,d[p])})):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(d)):aC(Object(d)).forEach((function(p){Object.defineProperty(c,p,Object.getOwnPropertyDescriptor(d,p))}))}return c}function Sa(c,u,d,p){d&&Object.defineProperty(c,u,{enumerable:d.enumerable,configurable:d.configurable,writable:d.writable,value:d.initializer?d.initializer.call(p):void 0})}function w6(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function Ul(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}function fo(c,u,d,p,y){var m={};return Object.keys(p).forEach((function(_){m[_]=p[_]})),m.enumerable=!!m.enumerable,m.configurable=!!m.configurable,("value"in m||m.initializer)&&(m.writable=!0),m=d.slice().reverse().reduce((function(_,A){return A(c,u,_)||_}),m),y&&m.initializer!==void 0&&(m.value=m.initializer?m.initializer.call(y):void 0,m.initializer=void 0),m.initializer===void 0&&(Object.defineProperty(c,u,m),m=null),m}var Hf,sC,Xf=(Dn=(function(){function c(p,y){(function(m,_){if(!(m instanceof _))throw new TypeError("Cannot call a class as a function")})(this,c),Ul(this,"id",""),Sa(this,"type",LT,this),Sa(this,"x",IT,this),Sa(this,"y",FT,this),Sa(this,"text",BT,this),Sa(this,"properties",$T,this),Sa(this,"_width",UT,this),Sa(this,"_height",VT,this),Sa(this,"anchorsOffset",WT,this),Sa(this,"isSelected",GT,this),Sa(this,"isHovered",zT,this),Sa(this,"isShowAnchor",HT,this),Sa(this,"isDragging",XT,this),Sa(this,"isHitable",YT,this),Sa(this,"draggable",qT,this),Sa(this,"visible",KT,this),Sa(this,"enableRotate",ZT,this),Ul(this,"virtual",!1),Ul(this,"graphModel",void 0),Sa(this,"zIndex",JT,this),Sa(this,"state",QT,this),Sa(this,"autoToFront",eC,this),Sa(this,"style",tC,this),Sa(this,"transform",nC,this),Sa(this,"_rotate",rC,this),Ul(this,"BaseType",ei.NODE),Ul(this,"modelType",so.NODE),Ul(this,"additionStateData",void 0),Ul(this,"targetRules",[]),Ul(this,"sourceRules",[]),Ul(this,"moveRules",[]),Ul(this,"hasSetTargetRules",!1),Ul(this,"hasSetSourceRules",!1),this.graphModel=y,this.initNodeData(p),this.setAttributes()}var u,d;return u=c,d=[{key:"width",get:function(){return this._width},set:function(p){this._width=p}},{key:"height",get:function(){return this._height},set:function(p){this._height=p}},{key:"rotate",get:function(){return this._rotate},set:function(p){this._rotate=p;var y=this.x,m=y===void 0?0:y,_=this.y,A=_===void 0?0:_;this.transform=new eh(-m,-A).rotate(p).translate(m,A).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(p){if(p.properties||(p.properties={}),!p.id){var y=this.graphModel.idGenerator,m=
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Ot,xt=!0,Ft=!1;return{s:function(){Ce=Ce.call(oe)},n:function(){var hn=Ce.next();return xt=hn.done,hn},e:function(hn){Ft=!0,Ot=hn},f:function(){try{xt||Ce.return==null||Ce.return()}finally{if(Ft)throw Ot}}}})(this.moveRules.concat(this.graphModel.nodeMoveRules));try{for(N.s();!(m=N.n()).done;){var U=(0,m.value)(this,p,y);if(!U)return!1;if(z1(U)==="object"){var H=U;if(H.x===!1&&H.y===!1)return!1;_=_&&H.x,A=A&&H.y}}}catch(oe){N.e(oe)}finally{N.f()}return{x:_,y:A}}},{key:"getConnectedTargetRules",value:function(){return this.targetRules}},{key:"getAnchorsByOffset",value:function(){var p=this.anchorsOffset,y=this.id,m=this.x,_=this.y;return p&&p.length>0?p.map((function(A,N){return A.length?(A=A,{id:"".concat(y,"_").concat(N),x:m+A[0],y:_+A[1]}):yl(yl({},A=A),{},{x:m+A.x,y:_+A.y,id:A.id||"".concat(y,"_").concat(N)})})):this.getDefaultAnchor()}},{key:"getDefaultAnchor",value:function(){return[]}},{key:"getTargetAnchor",value:function(p){return(function(y,m){for(var _,A=Yp(m),N=Number.MAX_SAFE_INTEGER,U=0;U<A.length;U++){var H=ml(y.x,y.y,A[U].x,A[U].y);H<N&&(N=H,_={index:U,anchor:Fl(Fl({},A[U]),{},{x:A[U].x,y:A[U].y,id:A[U].id})})}return _})(p,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 p=this.getAnchorsByOffset(),y=this.x,m=this.y,_=this.rotate;return p.forEach((function(A){var N=A.x,U=A.y,H=b6(new Fu([N,U,1]).translate(-y,-m).rotate(_).translate(y,m)[0],2),oe=H[0],ue=H[1];A.x=oe,A.y=ue})),p}},{key:"getAnchorInfo",value:function(p){if(!_6(p))for(var y=0;y<this.anchors.length;y++){var m=this.anchors[y];if(m.id===p)return m}}},{key:"addNodeMoveRules",value:function(p){this.moveRules.includes(p)||this.moveRules.push(p)}},{key:"move",value:function(p,y){var m=arguments.length>2&&arguments[2]!==void 0&&arguments[2],_=!1,A=!1;if(m)_=!0,A=!0;else{var N=this.isAllowMoveNode(p,y);typeof N=="boolean"?(_=N,A=N):(_=N.x,A=N.y)}if(_){var U=this.x+p;this.x=U,this.text&&this.moveText(p,0)}if(A){var H=this.y+y;this.y=H,this.text&&this.moveText(0,y)}return _||A}},{key:"getMoveDistance",value:function(p,y){var m=arguments.length>2&&arguments[2]!==void 0&&arguments[2],_=!1,A=!1,N=0,U=0;if(m)_=!0,A=!0;else{var H=this.isAllowMoveNode(p,y);typeof H=="boolean"?(_=H,A=H):(_=H.x,A=H.y)}if(_&&p){var oe=this.x+p;this.x=oe,this.text&&this.moveText(p,0),N=p}if(A&&y){var ue=this.y+y;this.y=ue,this.text&&this.moveText(0,y),U=y}return[N,U]}},{key:"moveTo",value:function(p,y){var m=arguments.length>2&&arguments[2]!==void 0&&arguments[2],_=p-this.x,A=y-this.y;return!(!m&&!this.isAllowMoveNode(_,A)||(this.text&&this.text&&this.moveText(_,A),this.x=p,this.y=y,0))}},{key:"moveText",value:function(p,y){var m=this.text,_=m.x,A=m.y,N=m.value,U=m.draggable,H=m.editable;this.text={value:N,editable:H,draggable:U,x:_+p,y:A+y}}},{key:"updateText",value:function(p){this.text=yl(yl({},Object(a.I)(this.text)),{},{value:p})}},{key:"setSelected",value:function(){var p=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isSelected=p}},{key:"setHovered",value:function(){var p=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isHovered=p,this.setIsShowAnchor(p)}},{key:"setIsShowAnchor",value:function(){var p=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isShowAnchor=p}},{key:"setEnableRotate",value:function(){var p=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.enableRotate=p}},{key:"setHitable",value:function(){var p=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isHitable=p}},{key:"setElementState",value:function(p,y){this.state=p,this.additionStateData=y}},{key:"setProperty",value:function(p,y){this.properties=yl(yl({},Object(a.I)(this.properties)),{},Ul({},p,ma(y))),this.setAttributes()}},{key:"setProperties",value:function(p){this.properties=yl(yl({},Object(a.I)(this.properties)),ma(p)),this.setAttributes()}},{key:"deleteProperty",value:function(p){delete this.properties[p],t
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function pC(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function hC(c,u){var d=Object.keys(c);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(c);u&&(p=p.filter((function(y){return Object.getOwnPropertyDescriptor(c,y).enumerable}))),d.push.apply(d,p)}return d}function vC(c){for(var u=1;u<arguments.length;u++){var d=arguments[u]!=null?arguments[u]:{};u%2?hC(Object(d),!0).forEach((function(p){gC(c,p,d[p])})):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(d)):hC(Object(d)).forEach((function(p){Object.defineProperty(c,p,Object.getOwnPropertyDescriptor(d,p))}))}return c}function mC(c,u,d,p){d&&Object.defineProperty(c,u,{enumerable:d.enumerable,configurable:d.configurable,writable:d.writable,value:d.initializer?d.initializer.call(p):void 0})}function T6(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}function C6(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function Q1(){return Q1=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(c,u,d){var p=N6(c,u);if(p){var y=Object.getOwnPropertyDescriptor(p,u);return y.get?y.get.call(arguments.length<3?c:d):y.value}},Q1.apply(this,arguments)}function N6(c,u){for(;!Object.prototype.hasOwnProperty.call(c,u)&&(c=Wm(c))!==null;);return c}function ex(c,u){return ex=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},ex(c,u)}function P6(c){var u=(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 d,p=Wm(c);if(u){var y=Wm(this).constructor;d=Reflect.construct(p,arguments,y)}else d=p.apply(this,arguments);return k6(this,d)}}function k6(c,u){if(u&&(Z1(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Vm(c)}function Vm(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}function Wm(c){return Wm=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},Wm(c)}function gC(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}function Gm(c,u,d,p,y){var m={};return Object.keys(p).forEach((function(_){m[_]=p[_]})),m.enumerable=!!m.enumerable,m.configurable=!!m.configurable,("value"in m||m.initializer)&&(m.writable=!0),m=d.slice().reverse().reduce((function(_,A){return A(c,u,_)||_}),m),y&&m.initializer!==void 0&&(m.value=m.initializer?m.initializer.call(y):void 0,m.initializer=void 0),m.initializer===void 0&&(Object.defineProperty(c,u,m),m=null),m}var Sd,yC,_C,tx=(Hs=(function(c){(function(m,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");m.prototype=Object.create(_&&_.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),_&&ex(m,_)})(y,c);var u,d,p=P6(y);function y(){var m;T6(this,y);for(var _=arguments.length,A=new Array(_),N=0;N<_;N++)A[N]=arguments[N];return gC(Vm(m=p.call.apply(p,[this].concat(A))),"modelType",so.DIAMOND_NODE),mC(Vm(m),"rx",dC,Vm(m)),mC(Vm(m),"ry",fC,Vm(m)),m}return u=y,(d=[{key:"getNodeStyle",value:function(){var m=Q1(Wm(y.prototype),"getNodeStyle",this).call(this),_=this.graphModel.theme.diamond;return vC(vC({},m),Uo(_))}},{key:"points",get:function(){var m=this.x,_=this.y,A=this.rx,N=this.ry;return[[m,_-N],[m+A,_],[m,_+N],[m-A,_]]}},{key:"pointsPosition",get:function(){return this.points.map((function(m){return{x:m[0],y:m[1]}}))}},{key:"width",get:function(){var m=Number.MAX_SAFE_INTEGER,_=Number.MIN_SAFE_INTEGER;return this.points.forEach((function(A){var N=J1(A,1)[0];N<m&&(m=N),N>_&&(_=N)})),_-m}},{key
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function SC(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function AC(c,u){var d=Object.keys(c);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(c);u&&(p=p.filter((function(y){return Object.getOwnPropertyDescriptor(c,y).enumerable}))),d.push.apply(d,p)}return d}function MC(c){for(var u=1;u<arguments.length;u++){var d=arguments[u]!=null?arguments[u]:{};u%2?AC(Object(d),!0).forEach((function(p){TC(c,p,d[p])})):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(d)):AC(Object(d)).forEach((function(p){Object.defineProperty(c,p,Object.getOwnPropertyDescriptor(d,p))}))}return c}function F6(c,u,d,p){d&&Object.defineProperty(c,u,{enumerable:d.enumerable,configurable:d.configurable,writable:d.writable,value:d.initializer?d.initializer.call(p):void 0})}function B6(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}function $6(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function lx(){return lx=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(c,u,d){var p=U6(c,u);if(p){var y=Object.getOwnPropertyDescriptor(p,u);return y.get?y.get.call(arguments.length<3?c:d):y.value}},lx.apply(this,arguments)}function U6(c,u){for(;!Object.prototype.hasOwnProperty.call(c,u)&&(c=Xm(c))!==null;);return c}function ux(c,u){return ux=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},ux(c,u)}function V6(c){var u=(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 d,p=Xm(c);if(u){var y=Xm(this).constructor;d=Reflect.construct(p,arguments,y)}else d=p.apply(this,arguments);return W6(this,d)}}function W6(c,u){if(u&&(ax(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Cb(c)}function Cb(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}function Xm(c){return Xm=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},Xm(c)}function TC(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}function Nb(c,u,d,p,y){var m={};return Object.keys(p).forEach((function(_){m[_]=p[_]})),m.enumerable=!!m.enumerable,m.configurable=!!m.configurable,("value"in m||m.initializer)&&(m.writable=!0),m=d.slice().reverse().reduce((function(_,A){return A(c,u,_)||_}),m),y&&m.initializer!==void 0&&(m.value=m.initializer?m.initializer.call(y):void 0,m.initializer=void 0),m.initializer===void 0&&(Object.defineProperty(c,u,m),m=null),m}var cx,CC,dx=($u=(function(c){(function(m,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");m.prototype=Object.create(_&&_.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),_&&ux(m,_)})(y,c);var u,d,p=V6(y);function y(){var m;B6(this,y);for(var _=arguments.length,A=new Array(_),N=0;N<_;N++)A[N]=arguments[N];return TC(Cb(m=p.call.apply(p,[this].concat(A))),"modelType",so.POLYGON_NODE),F6(Cb(m),"points",OC,Cb(m)),m}return u=y,(d=[{key:"getNodeStyle",value:function(){var m=lx(Xm(y.prototype),"getNodeStyle",this).call(this),_=this.graphModel.theme.polygon;return MC(MC({},m),Uo(_))}},{key:"pointsPosition",get:function(){var m=this.x,_=this.y,A=this.width,N=this.height;return this.points.map((function(U){return{x:U[0]+m-A/2,y:U[1]+_-N/2}}))}},{key:"width",get:function(){var m=Number.MAX_SAFE_INTEGER,_=Number.MIN_SAFE_INTEGER;return this.points.forEach((function(A){var N=sx(A,1)[0];N<m&&(m=N),N>_&&(_=N)})),_-m}},{key:"height",get:function(){var m=Number.MAX_SAFE_INTEGER,_=Number.MIN_SAFE_IN
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function XC(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function lF(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function Sx(c,u){return Sx=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},Sx(c,u)}function uF(c){var u=(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 d,p=Db(c);if(u){var y=Db(this).constructor;d=Reflect.construct(p,arguments,y)}else d=p.apply(this,arguments);return cF(this,d)}}function cF(c,u){if(u&&(Ox(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ad(c)}function Ad(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}function Db(c){return Db=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},Db(c)}function Md(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}var dF=(function(c){(function(m,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");m.prototype=Object.create(_&&_.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),_&&Sx(m,_)})(y,c);var u,d,p=uF(y);function y(){var m;return(function(_,A){if(!(_ instanceof A))throw new TypeError("Cannot call a class as a function")})(this,y),Md(Ad(m=p.call(this)),"preTargetNode",void 0),Md(Ad(m),"sourceRuleResults",void 0),Md(Ad(m),"targetRuleResults",void 0),Md(Ad(m),"dragHandler",void 0),Md(Ad(m),"t",void 0),Md(Ad(m),"onDragStart",(function(_){var A=_.event,N=m.props,U=N.anchorData,H=N.nodeModel,oe=N.graphModel;oe.overlapMode,oe.selectNodeById(H.id),H.autoToFront&&oe.toFront(H.id),oe.eventCenter.emit(ur.ANCHOR_DRAGSTART,{data:U,e:A,nodeModel:H}),m.setState({startX:U.x,startY:U.y,endX:U.x,endY:U.y})})),Md(Ad(m),"onDragging",(function(_){var A=_.event,N=m.props,U=N.graphModel,H=N.nodeModel,oe=N.anchorData,ue=U.transformModel,Ce=U.eventCenter,Ve=U.width,qe=U.height,Ot=U.editConfigModel,xt=Ot.autoExpand,Ft=Ot.stopMoveGraph,hn=A.clientX,Hn=A.clientY,zn=U.getPointByClient({x:hn,y:Hn}),Ar=zn.domOverlayPosition,Vn=Ar.x,vr=Ar.y,er=zn.canvasOverlayPosition,Eo=er.x,Co=er.y;m.t&&Rb(m.t);var zr=[];Vn<10?zr=[10,0]:Vn+10>Ve?zr=[-10,0]:vr<10?zr=[0,10]:vr+10>qe&&(zr=[0,-10]),m.setState({endX:Eo,endY:Co,dragging:!0}),m.moveAnchorEnd(Eo,Co),zr.length>0&&!Ft&&xt&&(m.t=zC((function(){var Fo=sF(zr,2),ga=Fo[0],ya=Fo[1];ue.translate(ga,ya);var Cs=m.state,fu=Cs.endX,pu=Cs.endY;m.setState({endX:fu-ga,endY:pu-ya}),m.moveAnchorEnd(fu-ga,pu-ya)}))),Ce.emit(ur.ANCHOR_DRAG,{data:oe,e:A,nodeModel:H})})),Md(Ad(m),"onDragEnd",(function(_){var A=_.event;m.t&&Rb(m.t);var N=m.checkEnd(A);m.setState({startX:0,startY:0,endX:0,endY:0,dragging:!1}),m.sourceRuleResults.clear(),m.targetRuleResults.clear();var U=m.props,H=U.graphModel,oe=U.nodeModel,ue=U.anchorData;H.eventCenter.emit(ur.ANCHOR_DRAGEND,{data:ue,e:A,nodeModel:oe,edgeModel:N})})),Md(Ad(m),"checkEnd",(function(_){var A=m.props,N=A.graphModel,U=A.nodeModel,H=A.anchorData,oe=H.x,ue=H.y,Ce=H.id,Ve=(N.edgeType,m.state),qe=Ve.endX,Ot=Ve.endY,xt=Ve.dragging,Ft=Cf({x:qe,y:Ot},N);if(m.preTargetNode&&m.preTargetNode.state!==Io.DEFAULT&&m.preTargetNode.setElementState(Io.DEFAULT),xt&&Ft&&Ft.node){var hn=Ft.node,Hn=Ft.anchor.id,zn="".concat(U.id,"_").concat(hn.id,"_").concat(Hn,"_").concat(Ce),Ar=m.sourceRuleResults.get(zn)||{},Vn=Ar.isAllPass,vr=Ar.msg,er=m.targetRuleResults.get(zn)||{},Eo=er.isAllPass,Co=er.msg;if(Vn&&Eo){hn.setElementState(Io.DEFAULT);var zr=N.edgeGenerator(U.getData(),N.getNodeModelById(Ft.node.id).getData()),Fo=N.addEdge(Ty(Ty({},zr),{},{
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function qC(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function KC(c){var u=c.x,d=u===void 0?0:u,p=c.y,y=p===void 0?0:p,m=c.value,_=c.fontSize,A=c.fill,N=A===void 0?"currentColor":A,U=c.overflowMode,H=U===void 0?"default":U,oe=c.textWidth,ue=oe===void 0?"":oe,Ce=c.model,Ve={textAnchor:"middle","dominant-baseline":"middle",x:d,y,fill:N};if(Object.entries(c).forEach((function(Hn){var zn=hF(Hn,2),Ar=zn[0],Vn=zn[1];Ax(Vn)!=="object"&&(Ve[Ar]=Vn)})),m){var qe=String(m).split(/[\r\n]/g),Ot=qe.length;if(H!=="default"){var xt=Ce.BaseType,Ft=Ce.modelType;if(xt===ei.NODE&&Ft!==so.TEXT_NODE||xt===ei.EDGE&&ue)return(function(Hn){var zn=Hn.value,Ar=Hn.fontSize,Vn=Hn.model,vr=Hn.fontFamily,er=vr===void 0?"":vr,Eo=Hn.lineHeight,Co=Hn.wrapPadding,zr=Co===void 0?"0, 0":Co,Fo=Hn.overflowMode,ga=Hn.x,ya=Hn.y,Cs=Vn.width,fu=Vn.textHeight,pu=Hn.textWidth||Cs,Nd=String(zn).split(/[\r\n]/g),Av=Nd.length,i0=Df({rows:Nd,style:{fontSize:"".concat(Ar,"px"),width:"".concat(pu,"px"),fontFamily:er,lineHeight:Eo,padding:zr},rowsLength:Av,className:"lf-get-text-height"}),Mv=Vn.height>i0?Vn.height:i0;fu&&(Mv=fu);var ah=Fo==="ellipsis";return ah&&(Mv=Ar+2),Object(re.g)("g",null,Object(re.g)("foreignObject",{width:pu,height:Mv,x:ga-pu/2,y:ya-Mv/2},Object(re.g)("div",{className:"lf-node-text-auto-wrap",style:{minHeight:Mv,width:pu,padding:zr}},Object(re.g)("div",{className:ah?"lf-node-text-ellipsis-content":"lf-node-text-auto-wrap-content",title:ah?Nd.join(""):"",style:fF({},Hn)},Nd.map((function(sh){return Object(re.g)("div",{className:"lf-node-text--auto-wrap-inner"},sh)}))))))})(c)}if(Ot>1){var hn=qe.map((function(Hn,zn){var Ar=(zn-(Ot-1)/2)*(_+2);return Object(re.g)("tspan",{className:"lf-text-tspan",x:d,y:y+Ar},Hn)}));return Object(re.g)("text",Ve,hn)}return Object(re.g)("text",Ve,m)}}function Mx(c){return Mx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},Mx(c)}function Tx(){return Tx=Object.assign||function(c){for(var u=1;u<arguments.length;u++){var d=arguments[u];for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&(c[p]=d[p])}return c},Tx.apply(this,arguments)}function vF(c,u){return(function(d){if(Array.isArray(d))return d})(c)||(function(d,p){var y=d==null?null:typeof Symbol<"u"&&d[Symbol.iterator]||d["@@iterator"];if(y!=null){var m,_,A=[],N=!0,U=!1;try{for(y=y.call(d);!(N=(m=y.next()).done)&&(A.push(m.value),!p||A.length!==p);N=!0);}catch(H){U=!0,_=H}finally{try{N||y.return==null||y.return()}finally{if(U)throw _}}return A}})(c,u)||(function(d,p){if(d){if(typeof d=="string")return ZC(d,p);var y=Object.prototype.toString.call(d).slice(8,-1);if(y==="Object"&&d.constructor&&(y=d.constructor.name),y==="Map"||y==="Set")return Array.from(d);if(y==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(y))return ZC(d,p)}})(c,u)||(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 ZC(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function mF(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function Cx(c,u){return Cx=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},Cx(c,u)}function gF(c){var u=(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 d,p=jb(c);if(u){var y=jb(this).constructor;d=Reflect.construct(p,arguments,y)}else d=p.apply(this,arguments);return yF(this,d)}}function yF(c,u){if(u&&(Mx(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return oh(c)}function oh(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}function jb(c){return jb=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},jb(c)}function Ev(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}var JC=(function(c){(function(m,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");m.prototype=Object.create(_&&_.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),_&&Cx(m,_)})(y,c);var u,d,p=gF(y);function y(m){var _;(function(N,U){if(!(N instanceof U))throw new TypeError("Cannot call a class as a function")})(this,y),Ev(oh(_=p.call(this)),"dragHandler",void 0),Ev(oh(_),"sumDeltaX",0),Ev(oh(_),"sumDeltaY",0),Ev(oh(_),"stepDrag",void 0),Ev(oh(_),"onDragging",(function(N){var U=N.deltaX,H=N.deltaY,oe=_.props,ue=oe.model,Ce=vF(oe.graphModel.transformModel.fixDeltaXY(U,H),2),Ve=Ce[0],qe=Ce[1];ue.moveText(Ve,qe)})),Ev(oh(_),"dblClickHandler",(function(){_.props.editable&&_.props.model.setElementState(Io.TEXT_EDIT)})),Ev(oh(_),"mouseDownHandle",(function(N){var U=_.props,H=U.draggable,oe=U.model,ue=U.graphModel.editConfigModel.nodeTextDraggable;(H||ue)&&(_.stepDrag.model=oe,_.stepDrag.handleMouseDown(N))})),m.model;var A=m.draggable;return _.stepDrag=new Te({onDragging:_.onDragging,step:1,isStopPropagation:A}),_}return u=y,(d=[{key:"getShape",value:function(){var m=this.props,_=m.model,A=m.graphModel,N=_.text,U=A.editConfigModel,H=N.value,oe=N.x,ue=N.y,Ce=N.editable,Ve=N.draggable,qe={x:oe,y:ue,className:"",value:H};Ce?qe.className="lf-element-text":Ve||U.nodeTextDraggable?qe.className="lf-text-draggable":qe.className="lf-text-disabled";var Ot=_.getTextStyle();return Object(re.g)(KC,Tx({},qe,Ot,{model:_}))}},{key:"render",value:function(){if(this.props.model.text)return Object(re.g)("g",{onMouseDown:this.mouseDownHandle,onDblClick:this.dblClickHandler},this.getShape())}}])&&mF(u.prototype,d),y})(re.a),_F=sc(window,"navigator.userAgent","").match(/MSIE|Trident/)!==null,QC=r(130);function Nx(c){return Nx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},Nx(c)}function Px(){return Px=Object.assign||function(c){for(var u=1;u<arguments.length;u++){var d=arguments[u];for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&(c[p]=d[p])}return c},Px.apply(this,arguments)}function bF(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function kx(c,u){return kx=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},kx(c,u)}function wF(c){var u=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Ref
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function eN(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function tN(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function Dx(c,u){return Dx=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},Dx(c,u)}function AF(c){var u=(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 d,p=Bb(c);if(u){var y=Bb(this).constructor;d=Reflect.construct(p,arguments,y)}else d=p.apply(this,arguments);return MF(this,d)}}function MF(c,u){if(u&&(Rx(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return rs(c)}function rs(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}function Bb(c){return Bb=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},Bb(c)}function ps(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}var Yf=(function(c){(function(_,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function");_.prototype=Object.create(A&&A.prototype,{constructor:{value:_,writable:!0,configurable:!0}}),A&&Dx(_,A)})(m,c);var u,d,p,y=AF(m);function m(_){var A;(function(ue,Ce){if(!(ue instanceof Ce))throw new TypeError("Cannot call a class as a function")})(this,m),ps(rs(A=y.call(this)),"t",void 0),ps(rs(A),"moveOffset",void 0),ps(rs(A),"stepDrag",void 0),ps(rs(A),"contextMenuTime",void 0),ps(rs(A),"mouseUpDrag",void 0),ps(rs(A),"startTime",void 0),ps(rs(A),"clickTimer",void 0),ps(rs(A),"modelDisposer",void 0),ps(rs(A),"onDragStart",(function(ue){var Ce=ue.event,Ve=Ce.clientX,qe=Ce.clientY,Ot=A.props,xt=Ot.model,Ft=Ot.graphModel.getPointByClient({x:Ve,y:qe}).canvasOverlayPosition,hn=Ft.x,Hn=Ft.y;A.moveOffset={x:xt.x-hn,y:xt.y-Hn}})),ps(rs(A),"onDragging",(function(ue){var Ce=ue.event,Ve=A.props,qe=Ve.model,Ot=Ve.graphModel,xt=Ot.editConfigModel,Ft=xt.stopMoveGraph,hn=xt.autoExpand,Hn=Ot.transformModel,zn=Ot.selectNodes,Ar=Ot.width,Vn=Ot.height,vr=Ot.gridSize;qe.isDragging=!0;var er=Ce.clientX,Eo=Ce.clientY,Co=Ot.getPointByClient({x:er,y:Eo}).canvasOverlayPosition,zr=Co.x,Fo=Co.y,ga=Fb(Hn.CanvasPointToHtmlPoint([zr,Fo]),2),ya=ga[0],Cs=ga[1];if(zr+=A.moveOffset.x,Fo+=A.moveOffset.y,zr=fl(zr,vr),Fo=fl(Fo,vr),Ar&&Vn){if(!hn||Ft||!(ya<0||Cs<0||ya>Ar||Cs>Vn)){var fu=Fb(Hn.CanvasPointToHtmlPoint([zr-qe.width/2,Fo-qe.height/2]),2),pu=fu[0],Nd=fu[1],Av=Fb(Hn.CanvasPointToHtmlPoint([zr+qe.width/2,Fo+qe.height/2]),2),i0=Av[0],Mv=Av[1],ah=Math.max(vr,20),sh=[];pu<0?sh=[ah,0]:i0>Ot.width?sh=[-ah,0]:Nd<0?sh=[0,ah]:Mv>Ot.height&&(sh=[0,-ah]),A.t&&Rb(A.t);var c$=new eh(-zr,-Fo).rotate(qe.rotate).translate(zr,Fo).toString();qe.transform=c$;var a0=zn.map((function(s0){return s0.id}));a0.indexOf(qe.id)===-1&&(a0=[qe.id]),sh.length>0&&!Ft&&hn?A.t=zC((function(){var s0=Fb(sh,2),jN=s0[0],LN=s0[1];Hn.translate(jN,LN);var d$=-jN/Hn.SCALE_X,f$=-LN/Hn.SCALE_X;Ot.moveNodes(a0,d$,f$)})):Ot.moveNodes(a0,zr-qe.x,Fo-qe.y)}}else Ot.moveNode2Coordinate(qe.id,zr,Fo)})),ps(rs(A),"onDragEnd",(function(){A.t&&Rb(A.t),A.props.model.isDragging=!1})),ps(rs(A),"handleMouseUp",(function(){var ue=A.props.model;A.mouseUpDrag=ue.isDragging})),ps(rs(A),"handleClick",(function(ue){var Ce=A.mouseUpDrag===!1;if(A.startTime){var Ve=A.props,qe=Ve.model,Ot=Ve.graphModel;if(Ce){var xt={data:qe.getData(),e:ue,position:Ot.getPointByClient({x:ue.clientX,y:ue.clientY}),isSelected:!1,isMultiple:!1},Ft=ue.button===2,hn=ue.detail===2;if(!Ft){var Hn=Ot.editConfigModel,zn=md(ue,Hn);xt.isMultiple=zn,qe.isSelected&&!hn&&zn?(xt.isSelected=!1,qe.setSelected(
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function nN(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function rN(c){var u=c.points,d=c.className,p={fill:"transparent",fillOpacity:1,strokeWidth:1,stroke:"#000",strokeOpacity:1,points:""};return Object.entries(c).forEach((function(y){var m=LF(y,2),_=m[0],A=m[1];Wx(A)!=="object"&&(p[_]=A)})),p.className=d?"lf-basic-shape ".concat(d):"lf-basic-shape",p.points=u.map((function(y){return y.join(",")})).join(" "),Object(re.g)("polygon",p)}function Gx(c){return Gx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},Gx(c)}function zx(){return zx=Object.assign||function(c){for(var u=1;u<arguments.length;u++){var d=arguments[u];for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&(c[p]=d[p])}return c},zx.apply(this,arguments)}function IF(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}function FF(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function Hx(c,u){return Hx=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},Hx(c,u)}function BF(c){var u=(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 d,p=Vb(c);if(u){var y=Vb(this).constructor;d=Reflect.construct(p,arguments,y)}else d=p.apply(this,arguments);return $F(this,d)}}function $F(c,u){if(u&&(Gx(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d})(c)}function Vb(c){return Vb=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},Vb(c)}var Xx=(function(c){(function(m,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");m.prototype=Object.create(_&&_.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),_&&Hx(m,_)})(y,c);var u,d,p=BF(y);function y(){return IF(this,y),p.apply(this,arguments)}return u=y,(d=[{key:"getShape",value:function(){var m=this.props.model,_=m.x,A=m.y,N=m.width,U=m.height,H=m.points,oe=m.getNodeStyle(),ue={transform:"matrix(1 0 0 1 ".concat(_-N/2," ").concat(A-U/2,")")};return Object(re.g)("g",ue,Object(re.g)(rN,zx({},oe,{points:H,x:_,y:A})))}}])&&FF(u.prototype,d),y})(Yf);function Yx(c){return Yx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},Yx(c)}function qx(){return qx=Object.assign||function(c){for(var u=1;u<arguments.length;u++){var d=arguments[u];for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&(c[p]=d[p])}return c},qx.apply(this,arguments)}function UF(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}function VF(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function Kx(c,u){return Kx=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},Kx(c,u)}function WF(c){var u=(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 d,p=Wb(c);if(u){var y=Wb(this).constructor;d=Reflect.construct(p,arguments,y)}else d=p.apply(this,arguments);return GF(this,d)}}function GF(c,u){if(u&&(Yx(u)==
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function oN(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function HF(c){var u=c.x,d=u===void 0?0:u,p=c.y,y=p===void 0?0:p,m=c.rx,_=m===void 0?4:m,A=c.ry,N=A===void 0?4:A,U=c.className,H={cx:d,cy:y,rx:_,ry:N,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(c).forEach((function(oe){var ue=zF(oe,2),Ce=ue[0],Ve=ue[1];Jx(Ve)!=="object"&&(H[Ce]=Ve)})),H.className=U?"lf-basic-shape ".concat(U):"lf-basic-shape",Object(re.g)("ellipse",H)}function Qx(c){return Qx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},Qx(c)}function eO(){return eO=Object.assign||function(c){for(var u=1;u<arguments.length;u++){var d=arguments[u];for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&(c[p]=d[p])}return c},eO.apply(this,arguments)}function XF(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}function YF(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function tO(c,u){return tO=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},tO(c,u)}function qF(c){var u=(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 d,p=Gb(c);if(u){var y=Gb(this).constructor;d=Reflect.construct(p,arguments,y)}else d=p.apply(this,arguments);return KF(this,d)}}function KF(c,u){if(u&&(Qx(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d})(c)}function Gb(c){return Gb=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},Gb(c)}var nO=(function(c){(function(m,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");m.prototype=Object.create(_&&_.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),_&&tO(m,_)})(y,c);var u,d,p=qF(y);function y(){return XF(this,y),p.apply(this,arguments)}return u=y,(d=[{key:"getShape",value:function(){var m=this.props.model,_=m.getNodeStyle();return Object(re.g)(HF,eO({},_,{x:m.x,y:m.y,rx:m.rx,ry:m.ry}))}}])&&YF(u.prototype,d),y})(Yf);function rO(c){return rO=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},rO(c)}function iN(c,u){var d=Object.keys(c);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(c);u&&(p=p.filter((function(y){return Object.getOwnPropertyDescriptor(c,y).enumerable}))),d.push.apply(d,p)}return d}function aN(c){for(var u=1;u<arguments.length;u++){var d=arguments[u]!=null?arguments[u]:{};u%2?iN(Object(d),!0).forEach((function(p){ZF(c,p,d[p])})):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(d)):iN(Object(d)).forEach((function(p){Object.defineProperty(c,p,Object.getOwnPropertyDescriptor(d,p))}))}return c}function ZF(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}function JF(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}function QF(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function oO(c,u){return oO=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},oO(c,u)}function eB(c){var u=(funct
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function uN(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function pB(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function mO(c,u){return mO=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},mO(c,u)}function hB(c){var u=(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 d,p=qb(c);if(u){var y=qb(this).constructor;d=Reflect.construct(p,arguments,y)}else d=p.apply(this,arguments);return vB(this,d)}}function vB(c,u){if(u&&(vO(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return cu(c)}function cu(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}function qb(c){return qb=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},qb(c)}function du(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}(function(c){c.SOURCE="SOURCE",c.TARGET="TARGET"})(Td||(Td={}));var cN=(function(c){(function(m,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");m.prototype=Object.create(_&&_.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),_&&mO(m,_)})(y,c);var u,d,p=hB(y);function y(m){var _;(function(H,oe){if(!(H instanceof oe))throw new TypeError("Cannot call a class as a function")})(this,y),du(cu(_=p.call(this)),"stepDragData",void 0),du(cu(_),"stepDrag",void 0),du(cu(_),"oldEdge",void 0),du(cu(_),"preTargetNode",void 0),du(cu(_),"targetRuleResults",void 0),du(cu(_),"sourceRuleResults",void 0),du(cu(_),"handleMouseDown",(function(H){_.stepDrag&&_.stepDrag.handleMouseDown(H)})),du(cu(_),"onDragStart",(function(){var H=_.props,oe=H.x,ue=H.y,Ce=H.edgeModel,Ve=Ce.startPoint,qe=Ce.endPoint,Ot=Ce.pointsList;_.oldEdge={startPoint:Ve,endPoint:qe,pointsList:Ot},_.setState({endX:oe,endY:ue,dragging:!0})})),du(cu(_),"onDragging",(function(H){var oe=H.deltaX,ue=H.deltaY,Ce=_.state,Ve=Ce.endX,qe=Ce.endY,Ot=_.props,xt=Ot.graphModel,Ft=Ot.type,hn=xt.transformModel,Hn=xt.editConfigModel,zn=fB(hn.moveCanvasPointByHtml([Ve,qe],oe,ue),2),Ar=zn[0],Vn=zn[1];_.setState({endX:Ar,endY:Vn,dragging:!0});var vr=_.props.edgeModel,er=Cf({x:Ve,y:qe},xt);if(er&&er.node&&_.isAllowAdjust(er).pass){var Eo,Co=vr.startPoint,zr=vr.endPoint,Fo=vr.sourceNode,ga=vr.targetNode;Ft===Td.SOURCE?Eo={startPoint:{x:er.anchor.x,y:er.anchor.y},endPoint:{x:zr.x,y:zr.y},sourceNode:er.node,targetNode:ga}:Ft===Td.TARGET&&(Eo={startPoint:{x:Co.x,y:Co.y},endPoint:{x:er.anchor.x,y:er.anchor.y},sourceNode:Fo,targetNode:er.node}),vr.updateAfterAdjustStartAndEnd(Eo)}else Ft===Td.SOURCE?vr.updateStartPoint({x:Ar,y:Vn}):Ft===Td.TARGET&&vr.updateEndPoint({x:Ar,y:Vn});vr.text.value&&Hn.adjustEdge&&vr.setText(Object.assign({},vr.text,vr.textPosition))})),du(cu(_),"onDragEnd",(function(H){var oe=H.event;try{var ue;_.setState({dragging:!1});var Ce=_.props,Ve=Ce.graphModel,qe=Ce.edgeModel,Ot=Ce.type,xt=_.state,Ft=xt.endX,hn=xt.endY,Hn=xt.dragging,zn=Cf({x:Ft,y:hn},Ve);if(!Hn)return;var Ar,Vn=!1;if(zn&&zn.node){var vr=_.isAllowAdjust(zn),er=vr.pass,Eo=vr.msg,Co=vr.newTargetNode;if(er){var zr=qe.getData(),Fo=zr.text,ga=zr.sourceAnchorId,ya=ga===void 0?"":ga,Cs=zr.targetAnchorId;Ar=qf(qf({sourceAnchorId:ya,targetAnchorId:Cs===void 0?"":Cs},dB(zr,cB)),{},{text:(Fo==null?void 0:Fo.value)||""}),Ot===Td.SOURCE?(Ar=qf(qf({},Ve.edgeGenerator(Ve.getNodeModelById(zn.node.id).getData(),Ve.getNodeModelById(qe.targetNodeId).getData(),Ar)),{},{sourceNodeId:zn.node.id,sourceAnchorId:zn.anchor.id,startPoint:{x:zn.anchor.x,y:zn.anchor.y},targe
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function dN(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function gB(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}function yB(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function yO(c,u){return yO=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},yO(c,u)}function _B(c){var u=(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 d,p=Kb(c);if(u){var y=Kb(this).constructor;d=Reflect.construct(p,arguments,y)}else d=p.apply(this,arguments);return bB(this,d)}}function bB(c,u){if(u&&(gO(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return jc(c)}function jc(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}function Kb(c){return Kb=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},Kb(c)}function Cd(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}var ky=(function(c){(function(m,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");m.prototype=Object.create(_&&_.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),_&&yO(m,_)})(y,c);var u,d,p=_B(y);function y(){var m;gB(this,y);for(var _=arguments.length,A=new Array(_),N=0;N<_;N++)A[N]=arguments[N];return Cd(jc(m=p.call.apply(p,[this].concat(A))),"startTime",void 0),Cd(jc(m),"contextMenuTime",void 0),Cd(jc(m),"clickTimer",void 0),Cd(jc(m),"textRef",Object(re.f)()),Cd(jc(m),"handleHover",(function(U,H){var oe=m.props,ue=oe.model,Ce=oe.graphModel.eventCenter;ue.setHovered(U);var Ve=U?ur.EDGE_MOUSEENTER:ur.EDGE_MOUSELEAVE,qe=ue.getData();Ce.emit(Ve,{data:qe,e:H})})),Cd(jc(m),"setHoverON",(function(U){m.props.model.isHovered||(m.textRef&&m.textRef.current&&m.textRef.current.setHoverON(),m.handleHover(!0,U))})),Cd(jc(m),"setHoverOFF",(function(U){m.props.model.isHovered&&(m.textRef&&m.textRef.current&&m.textRef.current.setHoverOFF(),m.handleHover(!1,U))})),Cd(jc(m),"handleContextMenu",(function(U){U.preventDefault(),m.contextMenuTime=new Date().getTime(),m.clickTimer&&clearTimeout(m.clickTimer);var H=m.props,oe=H.model,ue=H.graphModel,Ce=ue.getPointByClient({x:U.clientX,y:U.clientY});ue.setElementStateById(oe.id,Io.SHOW_MENU,Ce.domOverlayPosition),m.toFront(),oe.isSelected||ue.selectEdgeById(oe.id);var Ve=oe==null?void 0:oe.getData();ue.eventCenter.emit(ur.EDGE_CONTEXTMENU,{data:Ve,e:U,position:Ce})})),Cd(jc(m),"handleMouseDown",(function(U){U.stopPropagation(),m.startTime=new Date().getTime()})),Cd(jc(m),"handleMouseUp",(function(U){if(m.startTime&&!(new Date().getTime()-m.startTime>200||U.button===2)){var H=U.detail===2,oe=m.props,ue=oe.model,Ce=oe.graphModel,Ve=ue==null?void 0:ue.getData(),qe=Ce.getPointByClient({x:U.clientX,y:U.clientY});if(H){var Ot=Ce.editConfigModel,xt=Ce.textEditElement;if(xt&&xt.id===ue.id&&Ce.setElementStateById(ue.id,Io.DEFAULT),Ot.edgeTextEdit&&ue.text.editable&&Ce.setElementStateById(ue.id,Io.TEXT_EDIT),ue.modelType===so.POLYLINE_EDGE){var Ft=ue,hn=Ce.getPointByClient({x:U.x,y:U.y}).canvasOverlayPosition,Hn=hn.x,zn=hn.y,Ar=co({x:Hn,y:zn},Ft.points);Ft.dbClickPosition=Ar}Ce.eventCenter.emit(ur.EDGE_DBCLICK,{data:Ve,e:U,position:qe})}else Ce.eventCenter.emit(ur.ELEMENT_CLICK,{data:Ve,e:U,position:qe}),Ce.eventCenter.emit(ur.EDGE_CLICK,{data:Ve,e:U,position:qe});var Vn=Ce.editConfigModel;Ce.selectEdgeById(ue.id,md(U,Vn)),m.toFront()}})),m}return u=y,(d=[{key:"getShape",value:function(){return Object(re.g)("g",null,this.getEdge())}},{key:"
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function fN(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}var Ry=function(c){var u={d:""};return Object.entries(c).forEach((function(d){var p=wB(d,2),y=p[0],m=p[1],_=_O(m);y!=="style"&&_==="object"||(u[y]=m)})),Object(re.g)("path",u)};function bO(c){return bO=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},bO(c)}function wO(){return wO=Object.assign||function(c){for(var u=1;u<arguments.length;u++){var d=arguments[u];for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&(c[p]=d[p])}return c},wO.apply(this,arguments)}function EB(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}function xB(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function EO(c,u){return EO=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},EO(c,u)}function OB(c){var u=(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 d,p=Zb(c);if(u){var y=Zb(this).constructor;d=Reflect.construct(p,arguments,y)}else d=p.apply(this,arguments);return SB(this,d)}}function SB(c,u){if(u&&(bO(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d})(c)}function Zb(c){return Zb=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},Zb(c)}var xO=(function(c){(function(m,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");m.prototype=Object.create(_&&_.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),_&&EO(m,_)})(y,c);var u,d,p=OB(y);function y(){return EB(this,y),p.apply(this,arguments)}return u=y,(d=[{key:"getEdge",value:function(){var m=this.props.model,_=m.startPoint,A=m.endPoint,N=m.isAnimation,U=m.arrowConfig,H=m.getEdgeStyle(),oe=m.getEdgeAnimationStyle(),ue=oe.strokeDasharray,Ce=oe.stroke,Ve=oe.strokeDashoffset,qe=oe.animationName,Ot=oe.animationDuration,xt=oe.animationIterationCount,Ft=oe.animationTimingFunction,hn=oe.animationDirection;return Object(re.g)(Fm,wO({},H,{x1:_.x,y1:_.y,x2:A.x,y2:A.y},U,N?{strokeDasharray:ue,stroke:Ce,style:{strokeDashoffset:Ve,animationName:qe,animationDuration:Ot,animationIterationCount:xt,animationTimingFunction:Ft,animationDirection:hn}}:{}))}},{key:"getAppendWidth",value:function(){var m=this.props.model,_=m.startPoint,A=m.endPoint,N=sa({start:_,end:A}),U=N.d,H=N.strokeWidth,oe=N.fill,ue=N.strokeDasharray,Ce=N.stroke;return Object(re.g)(Ry,{d:U,fill:oe,strokeWidth:H,stroke:Ce,strokeDasharray:ue})}}])&&xB(u.prototype,d),y})(ky);function OO(c){return OO=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},OO(c)}function AB(c,u){return(function(d){if(Array.isArray(d))return d})(c)||(function(d,p){var y=d==null?null:typeof Symbol<"u"&&d[Symbol.iterator]||d["@@iterator"];if(y!=null){var m,_,A=[],N=!0,U=!1;try{for(y=y.call(d);!(N=(m=y.next()).done)&&(A.push(m.value),!p||A.length!==p);N=!0);}catch(H){U=!0,_=H}finally{try{N||y.return==null||y.return()}finally{if(U)throw _}}return A}})(c,u)||(function(d,p){if(d){if(typeof d=="string")return pN(d,p);var y=Object.prototype.toString.call(d).slice(8,-1);if(y==="Object"&&d.constructor&&(y=d.constructor.name),y==="Map"||y==="Set")return Array.from(d);if(y==="Arguments"||/^(?:Ui|I)nt(?:
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function pN(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}var MB=function(c){var u={points:"",fill:"none"};return Object.entries(c).forEach((function(d){var p=AB(d,2),y=p[0],m=p[1];(y==="style"||OO(m)!=="object")&&(u[y]=m)})),Object(re.g)("polyline",u)};function SO(c){return SO=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},SO(c)}function hN(c,u){var d=Object.keys(c);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(c);u&&(p=p.filter((function(y){return Object.getOwnPropertyDescriptor(c,y).enumerable}))),d.push.apply(d,p)}return d}function Jb(c){for(var u=1;u<arguments.length;u++){var d=arguments[u]!=null?arguments[u]:{};u%2?hN(Object(d),!0).forEach((function(p){Zf(c,p,d[p])})):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(d)):hN(Object(d)).forEach((function(p){Object.defineProperty(c,p,Object.getOwnPropertyDescriptor(d,p))}))}return c}function AO(){return AO=Object.assign||function(c){for(var u=1;u<arguments.length;u++){var d=arguments[u];for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&(c[p]=d[p])}return c},AO.apply(this,arguments)}function TB(c,u){return(function(d){if(Array.isArray(d))return d})(c)||(function(d,p){var y=d==null?null:typeof Symbol<"u"&&d[Symbol.iterator]||d["@@iterator"];if(y!=null){var m,_,A=[],N=!0,U=!1;try{for(y=y.call(d);!(N=(m=y.next()).done)&&(A.push(m.value),!p||A.length!==p);N=!0);}catch(H){U=!0,_=H}finally{try{N||y.return==null||y.return()}finally{if(U)throw _}}return A}})(c,u)||(function(d,p){if(d){if(typeof d=="string")return vN(d,p);var y=Object.prototype.toString.call(d).slice(8,-1);if(y==="Object"&&d.constructor&&(y=d.constructor.name),y==="Map"||y==="Set")return Array.from(d);if(y==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(y))return vN(d,p)}})(c,u)||(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 vN(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function CB(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function MO(c,u){return MO=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},MO(c,u)}function NB(c){var u=(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 d,p=Qb(c);if(u){var y=Qb(this).constructor;d=Reflect.construct(p,arguments,y)}else d=p.apply(this,arguments);return PB(this,d)}}function PB(c,u){if(u&&(SO(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Kf(c)}function Kf(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}function Qb(c){return Qb=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},Qb(c)}function Zf(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}var TO=(function(c){(function(m,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");m.prototype=Object.create(_&&_.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),_&&MO(m,_)})(y,c);var u,d,p=NB(y);function y(){var m;return(function(_,A){if(!(_ instanceof A))throw new TypeError("Cannot call a class as a function")})(this,y),Zf(Kf(m=p.call(this)),"drag",void 0),Zf(Kf(m),"isDragging",void 0),Zf(Kf(m),"isShowAdjustPointTemp",void 0),Zf(Kf(m),"appendInfo",void 0),Zf(Kf(m),"onDragStart",(function(){var _=m.props.model;_.dragAppendStart(),m.isShowAdjustPointTemp=_.isShowAdjustPoint,_.isShowAdjustPoint=!1})),Zf(Kf(m),"onDragging",(function(_){var A=_.deltaX,N=_.deltaY,U=m.props,H=U.model,oe=U.graphModel;m.isDragging=!0;var ue=oe.transformModel,Ce=oe.editConfigModel,Ve=TB(ue.fixDeltaXY(A,N),2),qe=Ve[0],Ot=Ve[1],xt=H,Ft=Ce.adjustEdgeMiddle;m.appendInfo=Ft?xt.dragAppendSimple(m.appendInfo,{x:qe,y:Ot}):xt.dragAppend(m.appendInfo,{x:qe,y:Ot})})),Zf(Kf(m),"onDragEnd",(function(){var _=m.props,A=_.model,N=_.graphModel.eventCenter,U=A;U.dragAppendEnd(),m.isDragging=!1,U.isShowAdjustPoint=m.isShowAdjustPointTemp,m.appendInfo=void 0,N.emit(ur.EDGE_ADJUST,{data:U.getData()})})),Zf(Kf(m),"beforeDragStart",(function(_,A){A.dragAble&&m.drag.handleMouseDown(_),m.appendInfo=A})),m.drag=new Te({onDragStart:m.onDragStart,onDragging:m.onDragging,onDragEnd:m.onDragEnd,isStopPropagation:!1}),m}return u=y,(d=[{key:"getEdge",value:function(){var m=this.props.model,_=m.points,A=m.isAnimation,N=m.arrowConfig,U=m.getEdgeStyle(),H=m.getEdgeAnimationStyle(),oe=H.strokeDasharray,ue=H.stroke,Ce=H.strokeDashoffset,Ve=H.animationName,qe=H.animationDuration,Ot=H.animationIterationCount,xt=H.animationTimingFunction,Ft=H.animationDirection;return Object(re.g)(MB,AO({points:_},U,N,A?{strokeDasharray:oe,stroke:ue,style:{strokeDashoffset:Ce,animationName:Ve,animationDuration:qe,animationIterationCount:Ot,animationTimingFunction:xt,animationDirection:Ft}}:{}))}},{key:"getArrowInfo",value:function(){var m=this.props.model,_=m.points,A=m.isSelected,N={start:null,end:null,hover:this.state.hover,isSelected:A},U=jr(_);return U.length>=2&&(N.start=U[U.length-2],N.end=U[U.length-1]),N}},{key:"getLastTwoPoints",value:function(){var m=this.props.model.points,_=jr(m);return _.length>=2?[_[_.length-2],_[_.length-1]]:[null,null]}},{key:"getAppendAttributes",value:function(m){var _,A=m.start,N=m.end;if(A.x===N.x&&A.y===N.y)_="";else{var U={start:A,end:N,offset:10,verticalLength:5},H=Cc(Jb(Jb({},U),{},{type:"start"})),oe=Cc(Jb(Jb({},U),{},{type:"end"}));_="M".concat(H.leftX," ").concat(H.leftY,`
|
|||
|
|
L`).concat(H.rightX," ").concat(H.rightY,`
|
|||
|
|
L`).concat(oe.rightX," ").concat(oe.rightY,`
|
|||
|
|
L`).concat(oe.leftX," ").concat(oe.leftY," z")}return{d:_,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}}},{key:"getAppendShape",value:function(m){var _=this.getAppendAttributes(m),A=_.d,N=_.strokeWidth,U=_.fill,H=_.strokeDasharray,oe=_.stroke;return Object(re.g)(Ry,{d:A,fill:U,strokeWidth:N,stroke:oe,strokeDasharray:H})}},{key:"getAppendWidth",value:function(){for(var m=this,_=this.props,A=_.model,N=_.graphModel,U=A.pointsList,H=A.draggable,oe=[],ue=U.length,Ce=function(qe){var Ot="lf-polyline-append",xt={start:{x:U[qe].x,y:U[qe].y},end:{x:U[qe+1].x,y:U[qe+1].y},startIndex:qe,endIndex:qe+1,direction:"",dragAble:!0},Ft=Object(re.g)("g",{className:Ot},m.getAppendShape(xt)),hn=N.editConfigModel,Hn=hn.adjustEdge,zn=hn.adjustEdgeMiddle;if(Hn&&H){var Ar=xt.startIndex,Vn=xt.endIndex,vr=zn&&(Ar===0||Vn===ue-1);xt.dragAble=!vr,xt.start.x===xt.end.x?(xt.dragAble&&(Ot+="-ew-resize"),xt.direction=ti.VERTICAL):xt.start.y===xt.end.y&&(xt.dragAble&&(Ot+="-ns-resize"),xt.direction=ti.HORIZONTAL),Ft=Object(re.g)("g",{className:m.isDragging?"lf-dragging":"lf-drag-able",onMouseDown:function(er){return m.beforeDragStart(er,xt)}},Object(re.g)("g",{className:Ot},m.getAppendShape(xt)))}oe.push(Ft)},Ve=0;Ve<ue-1;Ve++)Ce(Ve);return Object(re.g)("g",null,oe)}}])&&CB(u.prototype,d),y})(ky);function CO(c){return CO=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},CO(c)}function kB(c,u){return(function(d){if(Array.isArray(d))return d})(c)||(function(d,p){var y=d==null?null:typeof Symbol<"u"&&d[Symbol.iterator]||d["@@iterator"];if(y!=null){var m,_,A=[],N=!0,U=!1;try{for(y=y.call(d);!(N=(m=y.next()).done)&&(A.push(m.value),!p||A.length!==p);N=!0);}catch(H){U=!0,_=H}finally{try{N||y.return==null||y.return()}finally{if(U)throw _}}return A}})(c,u)||(function(d,p){if(d){if(typeof d=="string")return mN(d,p);var y=Object.prototype.toString.call(d).slice(8,-1);if(y==="Object"&&d.constructor&&(y=d.constructor.name),y==="Map"||y==="Set")return Array.from(d);if(y==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(y))return mN(d,p)}})(c,u)||(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 mN(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function NO(){return NO=Object.assign||function(c){for(var u=1;u<arguments.length;u++){var d=arguments[u];for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&(c[p]=d[p])}return c},NO.apply(this,arguments)}function RB(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}function DB(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function PO(c,u){return PO=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},PO(c,u)}function jB(c){var u=(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 d,p=e0(c);if(u){var y=e0(this).constructor;d=Reflect.construct(p,arguments,y)}else d=p.apply(this,arguments);return LB(this,d)}}function LB(c,u){if(u&&(CO(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d})(c)}function e0(c){return e0=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},e0(c)}var kO=(function(c){(function(m,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");m.prototype=Object.create(_&&_.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),_&&PO(m,_)})(y,c);var u,d,p=jB(y);function y(){return RB(this,y),p.apply(this,arguments)}return u=y,(d=[{key:"getEdge",value:function(){var m=this.props.model,_=m.getEdgeStyle(),A=m.path,N=m.isAnimation,U=m.arrowConfig,H=m.getEdgeAnimationStyle(),oe=H.strokeDasharray,ue=H.stroke,Ce=H.strokeDashoffset,Ve=H.animationName,qe=H.animationDuration,Ot=H.animationIterationCount,xt=H.animationTimingFunction,Ft=H.animationDirection;return Object(re.g)(Ry,NO({d:A},_,U,N?{strokeDasharray:oe,stroke:ue,style:{strokeDashoffset:Ce,animationName:Ve,animationDuration:qe,animationIterationCount:Ot,animationTimingFunction:xt,animationDirection:Ft}}:{}))}},{key:"getAppendWidth",value:function(){var m=this.props.model.path;return Object(re.g)(Ry,{d:m,strokeWidth:10,stroke:"transparent",fill:"none"})}},{key:"getArrowInfo",value:function(){var m=this.props.model,_=this.state.hover,A=m.isSelected,N=m.getArrowStyle().offset,U=m.pointsList.map((function(oe){return{x:oe.x,y:oe.y}})),H=kB(la(U,N),2);return{start:H[0],end:H[1],hover:_,isSelected:A}}},{key:"getLastTwoPoints",value:function(){var m=this.props.model,_=m.getArrowStyle().offset,A=m.pointsList.map((function(N){return{x:N.x,y:N.y}}));return la(A,_)}}])&&DB(u.prototype,d),y})(ky);function RO(c){return RO=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},RO(c)}function gN(c,u){var d=Object.keys(c);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(c);u&&(p=p.filter((function(y){return Object.getOwnPropertyDescriptor(c,y).enumerable}))),d.push.apply(d,p)}return d}function IB(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}function FB(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}function BB(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function DO(c,u){return DO=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},DO(c,u)}function $B(c){var u=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.constr
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function EN(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function xN(c,u){var d=Object.keys(c);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(c);u&&(p=p.filter((function(y){return Object.getOwnPropertyDescriptor(c,y).enumerable}))),d.push.apply(d,p)}return d}function Ov(c){for(var u=1;u<arguments.length;u++){var d=arguments[u]!=null?arguments[u]:{};u%2?xN(Object(d),!0).forEach((function(p){Sv(c,p,d[p])})):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(d)):xN(Object(d)).forEach((function(p){Object.defineProperty(c,p,Object.getOwnPropertyDescriptor(d,p))}))}return c}function ON(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function IO(c,u){return IO=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},IO(c,u)}function ZB(c){var u=(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 d,p=n0(c);if(u){var y=n0(this).constructor;d=Reflect.construct(p,arguments,y)}else d=p.apply(this,arguments);return JB(this,d)}}function JB(c,u){if(u&&(LO(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Zm(c)}function Zm(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}function n0(c){return n0=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},n0(c)}function Sv(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}var SN,AN,MN,FO=Lc((wN=bN=(function(c){(function(_,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function");_.prototype=Object.create(A&&A.prototype,{constructor:{value:_,writable:!0,configurable:!0}}),A&&IO(_,A)})(m,c);var u,d,p,y=ZB(m);function m(){var _;return(function(A,N){if(!(A instanceof N))throw new TypeError("Cannot call a class as a function")})(this,m),Sv(Zm(_=y.call(this)),"ref",Object(re.f)()),Sv(Zm(_),"__prevText",{type:"",text:"",id:""}),Sv(Zm(_),"keyupHandler",(function(A){var N=_.props.graphModel.textEditElement;A.key==="Enter"&&A.altKey&&N.setElementState(0)})),Sv(Zm(_),"inputHandler",(function(A){var N=A.target.innerText,U=_.props.graphModel.textEditElement;_.__prevText={type:U.type,text:N.replace(/(\r\n)+$|(\n)+$/,""),id:U.id}})),Sv(Zm(_),"keydownHandler",(function(A){A.stopPropagation()})),_.state={style:{left:0,top:0}},_}return u=m,p=[{key:"getDerivedStateFromProps",value:function(_){var A,N=_.graphModel,U=N.transformModel,H=N.theme,oe=H.inputText,ue=N.textEditElement;if(ue){var Ce;if((Ce=ue.text)===null||Ce===void 0||!Ce.value)if(ue.BaseType===ei.EDGE){var Ve=(ue=ue).text,qe=ue.textPosition,Ot=qe.x,xt=qe.y;Ve.x=Ot,Ve.y=xt,ue.setText(Ve)}else ue=ue;var Ft={resize:"auto",whiteSpace:"normal",wordBreak:"break-all"};if(ue.BaseType===ei.EDGE){var hn=H.edgeText,Hn=hn.overflowMode,zn=hn.lineHeight,Ar=hn.wrapPadding,Vn=hn.textWidth;Vn&&Hn==="autoWrap"&&(A=Ov(Ov({},Ft),{},{width:Vn,minWidth:Vn,lineHeight:zn,padding:Ar}))}else if(ue.BaseType===ei.NODE){var vr=H.nodeText,er=vr.overflowMode,Eo=vr.lineHeight,Co=vr.wrapPadding,zr=vr.textWidth,Fo=ue,ga=Fo.width,ya=Fo.modelType,Cs=Fo.textWidth||zr||ga;(ya!==so.TEXT_NODE&&er==="autoWrap"||ya===so.TEXT_NODE&&zr)&&(A=Ov(Ov({},Ft),{},{width:Cs,minWidth:Cs,lineHeight:Eo,padding:Co}))}var fu=ue.text,pu=fu.x,Nd=fu.y,Av=KB(U.CanvasPointToHtmlPoint([pu,Nd]),2);return{style:Ov(Ov({left:Av[0],top:Av[1]},A),oe)}}}}],(d=[{key:"componentDidUpdate",value:function(){var _=this.props.graphModel;if(this.ref.current&&(this.ref.current.focus(),this.placeCaretAtEnd(th
|
|||
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function e$(c){return(function(u){if(Array.isArray(u))return $O(u)})(c)||(function(u){if(typeof Symbol<"u"&&u[Symbol.iterator]!=null||u["@@iterator"]!=null)return Array.from(u)})(c)||CN(c)||(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 CN(c,u){if(c){if(typeof c=="string")return $O(c,u);var d=Object.prototype.toString.call(c).slice(8,-1);return d==="Object"&&c.constructor&&(d=c.constructor.name),d==="Map"||d==="Set"?Array.from(c):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?$O(c,u):void 0}}function $O(c,u){(u==null||u>c.length)&&(u=c.length);for(var d=0,p=new Array(u);d<u;d++)p[d]=c[d];return p}function t$(c,u){for(var d=0;d<u.length;d++){var p=u[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(c,p.key,p)}}function UO(c,u){return UO=Object.setPrototypeOf||function(d,p){return d.__proto__=p,d},UO(c,u)}function n$(c){var u=(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 d,p=r0(c);if(u){var y=r0(this).constructor;d=Reflect.construct(p,arguments,y)}else d=p.apply(this,arguments);return r$(this,d)}}function r$(c,u){if(u&&(BO(u)==="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Jm(c)}function Jm(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}function r0(c){return r0=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},r0(c)}function Qm(c,u,d){return u in c?Object.defineProperty(c,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[u]=d,c}var VO=Lc((MN=AN=(function(c){(function(m,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");m.prototype=Object.create(_&&_.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),_&&UO(m,_)})(y,c);var u,d,p=n$(y);function y(m){var _;(function(H,oe){if(!(H instanceof oe))throw new TypeError("Cannot call a class as a function")})(this,y),Qm(Jm(_=p.call(this)),"stepDrag",void 0),Qm(Jm(_),"handleMouseDown",(function(H){_.stepDrag.handleMouseDown(H)})),Qm(Jm(_),"handleWheelEvent",(function(H){var oe,ue;H.preventDefault();var Ce=H.deltaX,Ve=H.deltaY,qe=H.clientX,Ot=H.clientY,xt=H.ctrlKey,Ft=new WheelEvent("wheel",{deltaX:Ce,deltaY:Ve,clientX:qe,clientY:Ot,ctrlKey:xt});(oe=_.props.logicFlow.container)===null||oe===void 0||(ue=oe.querySelector('.lf-canvas-overlay[name="canvas-overlay"]'))===null||ue===void 0||ue.dispatchEvent(Ft)})),Qm(Jm(_),"onDragging",(function(H){var oe=H.deltaX,ue=H.deltaY,Ce=_.props.graphModel,Ve=Ce.getSelectElements(!0);Ce.moveNodes(Ve.nodes.map((function(qe){return qe.id})),oe,ue)})),Qm(Jm(_),"handleContextMenu",(function(H){H.preventDefault();var oe=_.props,ue=oe.graphModel,Ce=oe.graphModel,Ve=Ce.eventCenter,qe=Ce.selectElements,Ot=ue.getPointByClient({x:H.clientX,y:H.clientY}),xt={nodes:[],edges:[]};e$(qe.values()).forEach((function(Ft){Ft.BaseType===ei.NODE&&xt.nodes.push(Ft.getData()),Ft.BaseType===ei.EDGE&&xt.edges.push(Ft.getData())})),Ve.emit(ur.SELECTION_CONTEXTMENU,{data:xt,e:H,position:Ot})}));var A=m.graphModel,N=A.gridSize,U=A.eventCenter;return _.stepDrag=new Te({onDragging:_.onDragging,step:N,eventType:"SELECTION",eventCenter:U}),_}return u=y,(d=[{key:"render",value:function(){var m=this.props.graphModel,_=m.selectElements,A=m.transformModel;if(!(_.size<=1)){var N=Number.MAX_SAFE_INTEGER,U=Number.MAX_SAFE_INTEGER,H=Number.MIN_SAFE_INTEGER,oe=Number.MIN_SAFE_INTEGER;_.forEach((function(qe){var Ot={x:0,y:0,x1:0,y1:0};qe.BaseType===ei.NODE&&(Ot=(function(xt){var Ft=xt.x,hn=xt.y,Hn=xt.width,zn=xt.height;return{x:Ft-Hn/2,y:hn-zn/2,x1:Ft+Hn/2,y1:hn+zn/2}})(qe)),qe.BaseType===ei.EDGE&&(Ot=QB(qe)),N=Math.min(N,Ot.x),U=Math.min(U,Ot.y),H=Math.max(H,Ot.x1),oe=Math.max(oe,Ot.y1)}));var ue=TN(A.CanvasPointToHtmlPoint([N,U]),2);N=ue[0],U=ue[1];var Ce=TN(A.CanvasPointToHtmlPoint([H,oe]),2);H=Ce[0],oe=Ce[1];var Ve={left:"".concat(N-10,"px"),top:"".concat(U-1
|
|||
|
|
* Sortable 1.15.6
|
|||
|
|
* @author RubaXa <trash@rubaxa.org>
|
|||
|
|
* @author owenm <owen23355@gmail.com>
|
|||
|
|
* @license MIT
|
|||
|
|
*/function NR(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,o)}return n}function Yd(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?NR(Object(n),!0).forEach(function(o){Kne(t,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):NR(Object(n)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))})}return t}function ew(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ew=function(e){return typeof e}:ew=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ew(t)}function Kne(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function up(){return up=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},up.apply(this,arguments)}function Zne(t,e){if(t==null)return{};var n={},o=Object.keys(t),r,i;for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&(n[r]=t[r]);return n}function Jne(t,e){if(t==null)return{};var n=Zne(t,e),o,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)o=i[r],!(e.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(t,o)&&(n[o]=t[o])}return n}var Qne="1.15.6";function ap(t){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(t)}var hp=ap(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),ib=ap(/Edge/i),PR=ap(/firefox/i),m_=ap(/safari/i)&&!ap(/chrome/i)&&!ap(/android/i),LM=ap(/iP(ad|od|hone)/i),i8=ap(/chrome/i)&&ap(/android/i),a8={capture:!1,passive:!1};function Vo(t,e,n){t.addEventListener(e,n,!hp&&a8)}function Bo(t,e,n){t.removeEventListener(e,n,!hp&&a8)}function dE(t,e){if(e){if(e[0]===">"&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch{return!1}return!1}}function s8(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function Wc(t,e,n,o){if(t){n=n||document;do{if(e!=null&&(e[0]===">"?t.parentNode===n&&dE(t,e):dE(t,e))||o&&t===n)return t;if(t===n)break}while(t=s8(t))}return null}var kR=/\s+/g;function vu(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(kR," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(kR," ")}}function ro(t,e,n){var o=t&&t.style;if(o){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),e===void 0?n:n[e];!(e in o)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),o[e]=n+(typeof n=="string"?"":"px")}}function Ag(t,e){var n="";if(typeof t=="string")n=t;else do{var o=ro(t,"transform");o&&o!=="none"&&(n=o+" "+n)}while(!e&&(t=t.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(n)}function l8(t,e,n){if(t){var o=t.getElementsByTagName(e),r=0,i=o.length;if(n)for(;r<i;r++)n(o[r],r);return o}return[]}function zd(){var t=document.scrollingElement;return t||document.documentElement}function Ya(t,e,n,o,r){if(!(!t.getBoundingClientRect&&t!==window)){var i,a,l,s,f,h,v;if(t!==window&&t.parentNode&&t!==zd()?(i=t.getBoundingClientRect(),a=i.top,l=i.left,s=i.bottom,f=i.right,h=i.height,v=i.width):(a=0,l=0,s=window.innerHeight,f=window.innerWidth,h=window.innerHeight,v=window.innerWidth),(e||n)&&t!==window&&(r=r||t.parentNode,!hp))do if(r&&r.getBoundingClientRect&&(ro(r,"transform")!=="none"||n&&ro(r,"position")!=="static")){var b=r.getBoundingClientRect();a-=b.top+parseInt(ro(r,"border-top-width")),l-=b.left+parseInt(ro(r,"border-left-width")),s=a+i.height,f=l+i.width;break}while(r=r.parentNode);if(o&&t!==window){var w=Ag(
|
|||
|
|
{{form}}
|
|||
|
|
${kt("views.applicationWorkflow.nodes.formNode.form_content_format2")}`,form_field_list:[]}),w=hr({get:()=>(e.nodeModel.properties.node_data||Me.set(e.nodeModel.properties,"node_data",b.value),e.nodeModel.properties.node_data),set:C=>{Me.set(e.nodeModel.properties,"node_data",C)}}),O=C=>{var $;if(C.default_value){const D=($=C.option_list)==null?void 0:$.filter(k=>C.default_value.indexOf(k.value)>-1).map(k=>k.label).join(",");return D||C.default_value}if(C.default_value!==void 0)return C.default_value},E=()=>{var C;return(C=n.value)==null?void 0:C.validate()};function S(C){Me.set(e.nodeModel.properties.node_data,"form_content_format",C)}function M(){if(!o.value)return;const $=o.value.$el.querySelector(".el-table__body-wrapper tbody");$&&Zr.create($,{animation:150,ghostClass:"ghost-row",onEnd:D=>{if(D.oldIndex===void 0||D.newIndex===void 0)return;const k=Me.cloneDeep([...w.value.form_field_list]),[B]=k.splice(D.oldIndex,1);k.splice(D.newIndex,0,B),w.value.form_field_list=k,a()}})}return bo(()=>{Me.set(e.nodeModel,"validate",E),a(),e.nodeModel.graphModel.eventCenter.emit("refresh_incoming_node_field")}),(C,$)=>{const D=ne("AppIcon"),k=ne("el-tooltip"),B=ne("MdEditorMagnify"),F=ne("el-form-item"),I=ne("el-button"),V=ne("el-table-column"),z=ne("el-tag"),X=ne("el-switch"),Y=ne("el-table"),W=ne("el-form"),Q=ne("el-card");return Ne(),bt(hi,{nodeModel:t.nodeModel},{default:j(()=>[ee("h5",nie,_e(C.$t("views.applicationWorkflow.nodeSetting")),1),P(Q,{shadow:"never",class:"card-never",style:{"--el-card-padding":"12px"}},{default:j(()=>[P(W,{onSubmit:$[4]||($[4]=gn(()=>{},["prevent"])),model:w.value,"label-position":"top","require-asterisk-position":"right","label-width":"auto",ref_key:"formNodeFormRef",ref:n,"hide-required-asterisk":""},{default:j(()=>[P(F,{label:C.$t("views.applicationWorkflow.nodes.formNode.formContent.label"),prop:"form_content_format",rules:{required:!0,message:C.$t("views.applicationWorkflow.nodes.formNode.formContent.requiredMessage"),trigger:"blur"}},{label:j(()=>[ee("div",rie,[ee("div",oie,[ee("span",null,[ft(_e(C.$t("views.applicationWorkflow.nodes.formNode.formContent.label")),1),$[5]||($[5]=ee("span",{class:"color-danger"},"*",-1))])]),P(k,{effect:"dark",placement:"right","popper-class":"max-w-200"},{content:j(()=>[ft(_e(C.$t("views.applicationWorkflow.nodes.formNode.formContent.tooltip",{form:"{ form }"})),1)]),default:j(()=>[P(D,{iconName:"app-warning",class:"app-warning-icon"})]),_:1})])]),default:j(()=>[P(B,{title:C.$t("views.applicationWorkflow.nodes.formNode.formContent.label"),modelValue:w.value.form_content_format,"onUpdate:modelValue":$[0]||($[0]=J=>w.value.form_content_format=J),style:{height:"150px"},onSubmitDialog:S},null,8,["title","modelValue"])]),_:1},8,["label","rules"]),P(F,{label:C.$t("views.applicationWorkflow.nodes.formNode.formSetting"),onClick:$[3]||($[3]=gn(()=>{},["prevent"]))},{label:j(()=>[ee("div",iie,[ee("h5",aie,_e(C.$t("views.applicationWorkflow.nodes.formNode.formSetting")),1),P(I,{link:"",type:"primary",onClick:$[1]||($[1]=J=>f())},{default:j(()=>[P(D,{iconName:"app-add-outlined",class:"mr-4"}),ft(" "+_e(C.$t("common.add")),1)]),_:1})])]),default:j(()=>[w.value.form_field_list.length>0?(Ne(),bt(Y,{key:0,class:"border",data:w.value.form_field_list,ref_key:"tableRef",ref:o,"row-key":"field"},{default:j(()=>[P(V,{prop:"field",label:C.$t("dynamicsForm.paramForm.field.label"),width:"95"},{default:j(({row:J})=>[ee("span",{title:J.field,class:"ellipsis-1"},_e(J.field),9,sie)]),_:1},8,["label"]),P(V,{prop:"label",label:C.$t("dynamicsForm.paramForm.name.label")},{default:j(({row:J})=>[J.label&&J.label.input_type==="TooltipLabel"?(Ne(),mn("span",lie,[ee("span",{title:J.label.label,class:"ellipsis-1"},_e(J.label.label),9,uie)])):(Ne(),mn("span",cie,[ee("span",{title:J.label,class:"ellipsis-1"},_e(J.label),9,die)]))]),_:1},8,["label"]),P(V,{label:C.$t("dynamicsForm.paramForm.input_type.label"),width:"110px"},{default:j(({row:J})=>[P(z,{type:"info",class:"info-tag"},{default:j(()=>{var ie;return[ft(_e((ie=Wn(h7).find(Se=>Se.value===J.input_type))==null?void 0:ie.label),1)]}),_:2},1024)
|
|||
|
|
"math": {
|
|||
|
|
"url": "your_server",
|
|||
|
|
"transport": "sse"
|
|||
|
|
}
|
|||
|
|
}`,tse=_r({__name:"index",props:{nodeModel:{}},setup(t){const e=t,n=ja(),{params:{id:o}}=n,i=Qs("getApplicationDetail")(),a=hr(()=>n.path.includes("resource-management")?"systemManage":"workspace"),l=He(),s=He(!1),f=I=>I.ctrlKey===!0?(I.preventDefault(),!0):(I.stopPropagation(),!0),h={mcp_tool:"",mcp_tools:[],mcp_servers:"",mcp_server:"",mcp_source:"referencing",mcp_tool_id:"",tool_params:{},tool_form_field:[],params_nested:""},v=He([]);function b(I){Me.set(e.nodeModel.properties.node_data,"mcp_servers",I)}async function w(){const I=await oi({type:"tool",systemType:a.value}).getToolById(D.value.mcp_tool_id,s);D.value.mcp_servers=I.data.code}function O(){if(D.value.mcp_source==="referencing"&&!D.value.mcp_tool_id){Xi(kt("views.applicationWorkflow.nodes.mcpNode.mcpToolTip"));return}if(D.value.mcp_source==="referencing"&&D.value.mcp_tool_id&&!v.value.find(I=>I.id===D.value.mcp_tool_id)){Xi(kt("views.applicationWorkflow.nodes.mcpNode.mcpToolTip"));return}if(D.value.mcp_source==="custom"&&!D.value.mcp_servers){Xi(kt("views.applicationWorkflow.nodes.mcpNode.mcpServerTip"));return}try{JSON.parse(D.value.mcp_servers);const I=M(D.value.mcp_servers);if(I.length>0){S.value.open(I);return}}catch{Xi(kt("views.applicationWorkflow.nodes.mcpNode.mcpServerTip"));return}E(D.value.mcp_servers)}function E(I){oi({type:"application",systemType:a.value}).getMcpTools(o,I,s).then(V=>{var z;D.value.mcp_tools=V.data,Oh(kt("views.applicationWorkflow.nodes.mcpNode.getToolsSuccess")),D.value.mcp_server=(z=D.value.mcp_tools.find(X=>X.name===D.value.mcp_tool))==null?void 0:z.server})}const S=He();function M(I){const V=/\{\{\s*([a-zA-Z_][\w.]*)\s*\}\}/g,z=new Set,X=Y=>{if(typeof Y=="string"){let W;for(;(W=V.exec(Y))!==null;)z.add(W[1])}else Array.isArray(Y)?Y.forEach(X):Y&&typeof Y=="object"&&Object.values(Y).forEach(X)};if(typeof I=="string")try{X(JSON.parse(I))}catch{X(I)}else X(I);return[...z]}function C(I){let V=D.value.mcp_servers;for(const z in I)V=V.replace(`{{${z}}}`,I[z]);E(V)}function $(){var V,z,X,Y,W,Q;D.value.mcp_server=(V=D.value.mcp_tools.find(J=>J.name===D.value.mcp_tool))==null?void 0:V.server;const I=(z=D.value.mcp_tools.find(J=>J.name===D.value.mcp_tool))==null?void 0:z.args_schema;D.value.tool_form_field=[];for(const J in I==null?void 0:I.properties){const ie=I==null?void 0:I.properties[J].properties;if(ie){D.value.params_nested=J;for(const Se in ie){let Ae="TextInput";ie[Se].type==="string"?Ae="TextInput":ie[Se].type==="number"?Ae="NumberInput":ie[Se].type==="boolean"?Ae="SwitchInput":(ie[Se].type==="array"||ie[Se].type==="object")&&(Ae="JsonInput"),D.value.tool_form_field.push({field:Se,label:{input_type:"TooltipLabel",label:Se,attrs:{tooltip:ie[Se].description},props_info:{}},input_type:Ae,source:"referencing",required:((X=I.properties[J].required)==null?void 0:X.indexOf(Se))!==-1,props_info:{rules:[{required:((Y=I.properties[J].required)==null?void 0:Y.indexOf(Se))!==-1,message:kt("dynamicsForm.tip.requiredMessage"),trigger:"blur"}]}})}}else{D.value.params_nested="";let Se="TextInput";I.properties[J].type==="string"?Se="TextInput":I.properties[J].type==="number"?Se="NumberInput":I.properties[J].type==="boolean"?Se="SwitchInput":(I.properties[J].type==="array"||I.properties[J].type==="object")&&(Se="JsonInput"),D.value.tool_form_field.push({field:J,label:{input_type:"TooltipLabel",label:J,attrs:{tooltip:I.properties[J].description},props_info:{}},input_type:Se,source:"referencing",required:((W=I.required)==null?void 0:W.indexOf(J))!==-1,props_info:{rules:[{required:((Q=I.required)==null?void 0:Q.indexOf(J))!==-1,message:kt("dynamicsForm.tip.requiredMessage"),trigger:"blur"}]}})}}D.value.params_nested?D.value.tool_params={[D.value.params_nested]:{}}:D.value.tool_params={}}const D=hr({get:()=>(e.nodeModel.properties.node_data||Me.set(e.nodeModel.properties,"node_data",h),e.nodeModel.properties.node_data),set:I=>{Me.set(e.nodeModel.properties,"node_data",I)}}),k=He(),B=async()=>{if(l.value){const I=D.value.tool_form_field.filter(V=>V.required).map(V=>V.label.label);if(I.length>0){for(const V of I)if(D.value.params_nested){if(!D.valu
|
|||
|
|
`,r);return}throw r}n(" updateInputGraph",()=>{Efe(t,o)})})},bfe=(t,e,n)=>{e(" removeSelfEdges",()=>{Bfe(t)}),e(" acyclic",()=>{qR.run(t)}),e(" nestingGraph.run",()=>{tD.run(t)}),e(" rank",()=>{Mde(Z8(t))}),e(" injectEdgeLabelProxies",()=>{Pfe(t)}),e(" removeEmptyRanks",()=>{sde(t)}),e(" nestingGraph.cleanup",()=>{tD.cleanup(t)}),e(" normalizeRanks",()=>{ade(t)}),e(" assignRankMinMax",()=>{kfe(t)}),e(" removeEdgeLabelProxies",()=>{Rfe(t)}),e(" normalize.run",()=>{JR.run(t)}),e(" parentDummyChains",()=>{kde(t)}),e(" addBorderSegments",()=>{Ide(t)}),n&&n.keepNodeOrder&&e(" initDataOrder",()=>{yfe(t,n.nodeOrder)}),e(" order",()=>{tfe(t,n==null?void 0:n.keepNodeOrder)}),e(" insertSelfEdges",()=>{$fe(t)}),e(" adjustCoordinateSystem",()=>{oD.adjust(t)}),e(" position",()=>{gfe(t)}),e(" positionSelfEdges",()=>{Ufe(t)}),e(" removeBorderNodes",()=>{Ffe(t)}),e(" normalize.undo",()=>{JR.undo(t)}),e(" fixupEdgeLabelCoords",()=>{Lfe(t)}),e(" undoCoordinateSystem",()=>{oD.undo(t)}),e(" translateGraph",()=>{Dfe(t)}),e(" assignNodeIntersects",()=>{jfe(t)}),e(" reversePoints",()=>{Ife(t)}),e(" acyclic.undo",()=>{qR.undo(t)})},wfe=(t,e)=>{t.nodes().forEach(n=>{const o=t.node(n),r=e.node(n);r!==void 0?(o.fixorder=r._order,delete r._order):delete o.fixorder})},Efe=(t,e)=>{t.nodes().forEach(n=>{var o;const r=t.node(n);if(r){const i=e.node(n);r.x=i.x,r.y=i.y,r._order=i.order,r._rank=i.rank,!((o=e.children(n))===null||o===void 0)&&o.length&&(r.width=i.width,r.height=i.height)}}),t.edges().forEach(n=>{const o=t.edge(n),r=e.edge(n);o.points=r?r.points:[],r&&r.hasOwnProperty("x")&&(o.x=r.x,o.y=r.y)}),t.graph().width=e.graph().width,t.graph().height=e.graph().height},xfe=["nodesep","edgesep","ranksep","marginx","marginy"],Ofe={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},LS=["acyclicer","ranker","rankdir","align"],Sfe=["width","height","layer","fixorder"],Afe={width:0,height:0},Mfe=["minlen","weight","width","height","labeloffset"],Tfe={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},IS=["labelpos"],Cfe=t=>{const e=new cp({multigraph:!0,compound:!0}),n=BS(t.graph()),o={};return LS==null||LS.forEach(r=>{n[r]!==void 0&&(o[r]=n[r])}),e.setGraph(Object.assign({},Ofe,FS(n,xfe),o)),t.nodes().forEach(r=>{const i=BS(t.node(r)),a=Object.assign(Object.assign({},Afe),i),l=FS(a,Sfe);e.setNode(r,l),e.setParent(r,t.parent(r))}),t.edges().forEach(r=>{const i=BS(t.edge(r)),a={};IS==null||IS.forEach(l=>{i[l]!==void 0&&(a[l]=i[l])}),e.setEdgeObj(r,Object.assign({},Tfe,FS(i,Mfe),a))}),e},Nfe=t=>{const e=t.graph();e.ranksep||(e.ranksep=0),e.ranksep/=2,t.nodes().forEach(n=>{const o=t.node(n);isNaN(o.layer)||o.layer||(o.layer=0)}),t.edges().forEach(n=>{var o;const r=t.edge(n);r.minlen*=2,((o=r.labelpos)===null||o===void 0?void 0:o.toLowerCase())!=="c"&&(e.rankdir==="TB"||e.rankdir==="BT"?r.width+=r.labeloffset:r.height+=r.labeloffset)})},Pfe=t=>{t.edges().forEach(e=>{const n=t.edge(e);if(n.width&&n.height){const o=t.node(e.v),r=t.node(e.w),i={e,rank:(r.rank-o.rank)/2+o.rank};uy(t,"edge-proxy",i,"_ep")}})},kfe=t=>{let e=0;t.nodes().forEach(n=>{var o,r;const i=t.node(n);i.borderTop&&(i.minRank=(o=t.node(i.borderTop))===null||o===void 0?void 0:o.rank,i.maxRank=(r=t.node(i.borderBottom))===null||r===void 0?void 0:r.rank,e=Math.max(e,i.maxRank||-1/0))}),t.graph().maxRank=e},Rfe=t=>{t.nodes().forEach(e=>{const n=t.node(e);n.dummy==="edge-proxy"&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))})},Dfe=t=>{let e,n=0,o,r=0;const i=t.graph(),a=i.marginx||0,l=i.marginy||0,s=f=>{if(!f)return;const h=f.x,v=f.y,b=f.width,w=f.height;!isNaN(h)&&!isNaN(b)&&(e===void 0&&(e=h-b/2),e=Math.min(e,h-b/2),n=Math.max(n,h+b/2)),!isNaN(v)&&!isNaN(w)&&(o===void 0&&(o=v-w/2),o=Math.min(o,v-w/2),r=Math.max(r,v+w/2))};t.nodes().forEach(f=>{s(t.node(f))}),t.edges().forEach(f=>{const h=t.edge(f);h!=null&&h.hasOwnProperty("x")&&s(h)}),e-=a,o-=l,t.nodes().forEach(f=>{const h=t.node(f);h&&(h.x-=e,h.y-=o)}),t.edges().forEach(f=>{var h;const v=t.edge(f);(h=v.points)===null||h===void 0||h.forEach(b=>{b.x-=e,b.y
|
|||
|
|
`;function i(K){return typeof atob<"u"?atob(K):"base64:"+K}function a(K){var me=new Error("(regl) "+K);throw console.error(me),me}function l(K,me){K||a(me)}function s(K){return K?": "+K:""}function f(K,me,Ie){K in me||a("unknown parameter ("+K+")"+s(Ie)+". possible values: "+Object.keys(me).join())}function h(K,me){n(K)||a("invalid parameter type"+s(me)+". must be a typed array")}function v(K,me){switch(me){case"number":return typeof K=="number";case"object":return typeof K=="object";case"string":return typeof K=="string";case"boolean":return typeof K=="boolean";case"function":return typeof K=="function";case"undefined":return typeof K>"u";case"symbol":return typeof K=="symbol"}}function b(K,me,Ie){v(K,me)||a("invalid parameter type"+s(Ie)+". expected "+me+", got "+typeof K)}function w(K,me){K>=0&&(K|0)===K||a("invalid parameter type, ("+K+")"+s(me)+". must be a nonnegative integer")}function O(K,me,Ie){me.indexOf(K)<0&&a("invalid value"+s(Ie)+". must be one of: "+me)}var E=["gl","canvas","container","attributes","pixelRatio","extensions","optionalExtensions","profile","onDone"];function S(K){Object.keys(K).forEach(function(me){E.indexOf(me)<0&&a('invalid regl constructor argument "'+me+'". must be one of '+E)})}function M(K,me){for(K=K+"";K.length<me;)K=" "+K;return K}function C(){this.name="unknown",this.lines=[],this.index={},this.hasErrors=!1}function $(K,me){this.number=K,this.line=me,this.errors=[]}function D(K,me,Ie){this.file=K,this.line=me,this.message=Ie}function k(){var K=new Error,me=(K.stack||K).toString(),Ie=/compileProcedure.*\n\s*at.*\((.*)\)/.exec(me);if(Ie)return Ie[1];var wt=/compileProcedure.*\n\s*at\s+(.*)(\n|$)/.exec(me);return wt?wt[1]:"unknown"}function B(){var K=new Error,me=(K.stack||K).toString(),Ie=/at REGLCommand.*\n\s+at.*\((.*)\)/.exec(me);if(Ie)return Ie[1];var wt=/at REGLCommand.*\n\s+at\s+(.*)\n/.exec(me);return wt?wt[1]:"unknown"}function F(K,me){var Ie=K.split(`
|
|||
|
|
`),wt=1,Dt=0,yt={unknown:new C,0:new C};yt.unknown.name=yt[0].name=me||k(),yt.unknown.lines.push(new $(0,""));for(var Nt=0;Nt<Ie.length;++Nt){var tn=Ie[Nt],ln=/^\s*#\s*(\w+)\s+(.+)\s*$/.exec(tn);if(ln)switch(ln[1]){case"line":var nn=/(\d+)(\s+\d+)?/.exec(ln[2]);nn&&(wt=nn[1]|0,nn[2]&&(Dt=nn[2]|0,Dt in yt||(yt[Dt]=new C)));break;case"define":var Mt=/SHADER_NAME(_B64)?\s+(.*)$/.exec(ln[2]);Mt&&(yt[Dt].name=Mt[1]?i(Mt[2]):Mt[2]);break}yt[Dt].lines.push(new $(wt++,tn))}return Object.keys(yt).forEach(function(wn){var pn=yt[wn];pn.lines.forEach(function(rn){pn.index[rn.number]=rn})}),yt}function I(K){var me=[];return K.split(`
|
|||
|
|
`).forEach(function(Ie){if(!(Ie.length<5)){var wt=/^ERROR:\s+(\d+):(\d+):\s*(.*)$/.exec(Ie);wt?me.push(new D(wt[1]|0,wt[2]|0,wt[3].trim())):Ie.length>0&&me.push(new D("unknown",0,Ie))}}),me}function V(K,me){me.forEach(function(Ie){var wt=K[Ie.file];if(wt){var Dt=wt.index[Ie.line];if(Dt){Dt.errors.push(Ie),wt.hasErrors=!0;return}}K.unknown.hasErrors=!0,K.unknown.lines[0].errors.push(Ie)})}function z(K,me,Ie,wt,Dt){if(!K.getShaderParameter(me,K.COMPILE_STATUS)){var yt=K.getShaderInfoLog(me),Nt=wt===K.FRAGMENT_SHADER?"fragment":"vertex";Se(Ie,"string",Nt+" shader source must be a string",Dt);var tn=F(Ie,Dt),ln=I(yt);V(tn,ln),Object.keys(tn).forEach(function(nn){var Mt=tn[nn];if(!Mt.hasErrors)return;var wn=[""],pn=[""];function rn(Wt,lt){wn.push(Wt),pn.push(lt||"")}rn("file number "+nn+": "+Mt.name+`
|
|||
|
|
`,"color:red;text-decoration:underline;font-weight:bold"),Mt.lines.forEach(function(Wt){if(Wt.errors.length>0){rn(M(Wt.number,4)+"| ","background-color:yellow; font-weight:bold"),rn(Wt.line+r,"color:red; background-color:yellow; font-weight:bold");var lt=0;Wt.errors.forEach(function(St){var sn=St.message,An=/^\s*'(.*)'\s*:\s*(.*)$/.exec(sn);if(An){var Xt=An[1];switch(sn=An[2],Xt){case"assign":Xt="=";break}lt=Math.max(Wt.line.indexOf(Xt,lt),0)}else lt=0;rn(M("| ",6)),rn(M("^^^",lt+3)+r,"font-weight:bold"),rn(M("| ",6)),rn(sn+r,"font-weight:bold")}),rn(M("| ",6)+r)}else rn(M(Wt.number,4)+"| "),rn(Wt.line+r,"color:red")}),typeof document<"u"&&!window.chrome?(pn[0]=wn.join("%c"),console.log.apply(console,pn)):console.log(wn.join(""))}),l.raise("Error compiling "+Nt+" shader, "+tn[0].name)}}function X(K,me,Ie,wt,Dt){if(!K.getProgramParameter(me,K.LINK_STATUS)){var yt=K.getProgramInfoLog(me),Nt=F(Ie,Dt),tn=F(wt,Dt),ln='Error linking program with vertex shader, "'+tn[0].name+'", and fragment shader "'+Nt[0].name+'"';typeof document<"u"?console.log("%c"+ln+r+"%c"+yt,"color:red;text-decoration:underline;font-weight:bold","color:red"):console.log(ln+r+yt),l.raise(ln)}}function Y(K){K._commandRef=k()}function W(K,me,Ie,wt){Y(K);function Dt(ln){return ln?wt.id(ln):0}K._fragId=Dt(K.static.frag),K._vertId=Dt(K.static.vert);function yt(ln,nn){Object.keys(nn).forEach(function(Mt){ln[wt.id(Mt)]=!0})}var Nt=K._uniformSet={};yt(Nt,me.static),yt(Nt,me.dynamic);var tn=K._attributeSet={};yt(tn,Ie.static),yt(tn,Ie.dynamic),K._hasCount="count"in K.static||"count"in K.dynamic||"elements"in K.static||"elements"in K.dynamic}function Q(K,me){var Ie=B();a(K+" in command "+(me||k())+(Ie==="unknown"?"":" called from "+Ie))}function J(K,me,Ie){K||Q(me,Ie||k())}function ie(K,me,Ie,wt){K in me||Q("unknown parameter ("+K+")"+s(Ie)+". possible values: "+Object.keys(me).join(),wt||k())}function Se(K,me,Ie,wt){v(K,me)||Q("invalid parameter type"+s(Ie)+". expected "+me+", got "+typeof K,wt||k())}function Ae(K){K()}function ke(K,me,Ie){K.texture?O(K.texture._texture.internalformat,me,"unsupported texture format for attachment"):O(K.renderbuffer._renderbuffer.format,Ie,"unsupported renderbuffer format for attachment")}var De=33071,ze=9728,Ye=9984,Be=9985,Je=9986,gt=9987,se=5120,Ze=5121,pe=5122,le=5123,we=5124,$e=5125,rt=5126,pt=32819,Lt=32820,Jt=33635,en=34042,zt=36193,it={};it[se]=it[Ze]=1,it[pe]=it[le]=it[zt]=it[Jt]=it[pt]=it[Lt]=2,it[we]=it[$e]=it[rt]=it[en]=4;function ae(K,me){return K===Lt||K===pt||K===Jt?2:K===en?4:it[K]*me}function re(K){return!(K&K-1)&&!!K}function je(K,me,Ie){var wt,Dt=me.width,yt=me.height,Nt=me.channels;l(Dt>0&&Dt<=Ie.maxTextureSize&&yt>0&&yt<=Ie.maxTextureSize,"invalid texture shape"),(K.wrapS!==De||K.wrapT!==De)&&l(re(Dt)&&re(yt),"incompatible wrap mode for texture, both width and height must be power of 2"),me.mipmask===1?Dt!==1&&yt!==1&&l(K.minFilter!==Ye&&K.minFilter!==Je&&K.minFilter!==Be&&K.minFilter!==gt,"min filter requires mipmap"):(l(re(Dt)&&re(yt),"texture must be a square power of 2 to support mipmapping"),l(me.mipmask===(Dt<<1)-1,"missing or incomplete mipmap data")),me.type===rt&&(Ie.extensions.indexOf("oes_texture_float_linear")<0&&l(K.minFilter===ze&&K.magFilter===ze,"filter not supported, must enable oes_texture_float_linear"),l(!K.genMipmaps,"mipmap generation not supported with float textures"));var tn=me.images;for(wt=0;wt<16;++wt)if(tn[wt]){var ln=Dt>>wt,nn=yt>>wt;l(me.mipmask&1<<wt,"missing mipmap data");var Mt=tn[wt];if(l(Mt.width===ln&&Mt.height===nn,"invalid shape for mip images"),l(Mt.format===me.format&&Mt.internalformat===me.internalformat&&Mt.type===me.type,"incompatible type for mip image"),!Mt.compressed)if(Mt.data){var wn=Math.ceil(ae(Mt.type,Nt)*ln/Mt.unpackAlignment)*Mt.unpackAlignment;l(Mt.data.byteLength===wn*nn,"invalid data for image, buffer size is inconsistent with image format")}else Mt.element||Mt.copy}else K.genMipmaps||l((me.mipmask&1<<wt)===0,"extra mipmap data");me.compressed&&l(!K.genMipmaps,"mipmap generation for compressed images not supported")}function vt(K,me,Ie,wt){var Dt=K.wid
|
|||
|
|
`).replace(/}/g,`}
|
|||
|
|
`).replace(/{/g,`{
|
|||
|
|
`),rn=Function.apply(null,me.concat(pn));return rn.apply(null,Ie)}return{global:tn,link:wt,block:Dt,proc:nn,scope:yt,cond:Nt,compile:Mt}}var ou="xyzw".split(""),mc=5121,gc=1,yc=2,Fp=0,iu=1,_c=2,Bp=3,fl=4,wf=5,Ef=6,hd="dither",vd="blend.enable",md="blend.color",$p="blend.equation",gd="blend.func",ov="depth.enable",Up="depth.func",Tm="depth.range",iv="depth.mask",pl="colorMask",av="cull.enable",sv="cull.face",lv="frontFace",yd="lineWidth",Ll="polygonOffset.enable",xf="polygonOffset.offset",Vp="sample.alpha",Wp="sample.enable",Cu="sample.coverage",Nu="stencil.enable",Rr="stencil.mask",_d="stencil.func",Of="stencil.opFront",hl="stencil.opBack",aa="scissor.enable",bc="scissor.box",Ti="viewport",Pu="profile",ts="framebuffer",Sf="vert",Ra="frag",Fi="elements",Il="primitive",Fl="count",Gp="offset",Qt="instances",wc="vao",Af="Width",Mf="Height",ku=ts+Af,Ec=ts+Mf,zp=Ti+Af,uv=Ti+Mf,xc="drawingBuffer",Tf=xc+Af,Hp=xc+Mf,cv=[gd,$p,_d,Of,hl,Cu,Ti,bc,xf],Bl=34962,dv=34963,vl=35632,Ru=35633,Xp=3553,Cm=34067,Nm=2884,Pm=3042,fv=3024,Yp=2960,Cf=2929,km=3089,ml=32823,Du=32926,_y=32928,gi=5126,Nf=35664,Oc=35665,Pf=35666,bd=5124,kf=35667,Rf=35668,Df=35669,Sc=35670,au=35671,ma=35672,qp=35673,jf=35674,Ac=35675,wd=35676,wa=35678,xi=35680,Lf=4,za=1028,wr=1029,Kp=2304,If=2305,Zp=32775,pv=32776,Rm=519,ju=7680,Dm=0,Mc=1,jm=32774,hv=513,Ff=36160,Lm=36064,Ws={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},su=["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"],Lu={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},Er={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},vv={frag:vl,vert:Ru},Ed={cw:Kp,ccw:If};function lu(K){return Array.isArray(K)||n(K)||Ia(K)}function Bf(K){return K.sort(function(me,Ie){return me===Ti?-1:Ie===Ti?1:me<Ie?-1:1})}function Ha(K,me,Ie,wt){this.thisDep=K,this.contextDep=me,this.propDep=Ie,this.append=wt}function gl(K){return K&&!(K.thisDep||K.contextDep||K.propDep)}function Ci(K){return new Ha(!1,!1,!1,K)}function ds(K,me){var Ie=K.type;if(Ie===Fp){var wt=K.data.length;return new Ha(!0,wt>=1,wt>=2,me)}else if(Ie===fl){var Dt=K.data;return new Ha(Dt.thisDep,Dt.contextDep,Dt.propDep,me)}else{if(Ie===wf)return new Ha(!1,!1,!1,me);if(Ie===Ef){for(var yt=!1,Nt=!1,tn=!1,ln=0;ln<K.data.length;++ln){var nn=K.data[ln];if(nn.type===iu)tn=!0;else if(nn.type===_c)Nt=!0;else if(nn.type===Bp)yt=!0;else if(nn.type===Fp){yt=!0;var Mt=nn.data;Mt>=1&&(Nt=!0),Mt>=2&&(tn=!0)}else nn.type===fl&&(yt=yt||nn.data.thisDep,Nt=Nt||nn.data.contextDep,tn=tn||nn.data.propDep)}return new Ha(yt,Nt,tn,me)}else return new Ha(Ie===Bp,Ie===_c,Ie===iu,me)}}var Gs=new Ha(!1,!1,!1,function(){});function by(K,me,Ie,wt,Dt,yt,Nt,tn,ln,nn,Mt,wn,pn,rn,Wt){var lt=nn.Record,St={add:32774,subtract:32778,"reverse subtract":32779};Ie.ext_blend_minmax&&(St.min=Zp,St.max=pv);var sn=Ie.angle_instanced_arrays,An=Ie.webgl_draw_buffers,Xt={dirty:!0,profile:Wt.profile},Pn={},Kt=[],_n={},Yt={};function xn(xe){return xe.replace(".","_")}function ar(xe,de,We){var tt=xn(xe);Kt.push(xe),Pn[tt]=Xt[tt]=!!We,_n[tt]=de}function xr(xe,de,We){var tt=xn(xe);Kt.push(xe),Array.isArray(We)?(Xt[tt]=We.slice(),Pn[tt]=We.slice()):Xt[tt]=Pn[tt]=We,Yt[tt]=de}ar(hd,fv),ar(vd,Pm),xr(md,"blendColor",[0,0,0,0]),xr($p,"blendEquationSeparate",[jm,jm]),xr(gd,"blendFuncSeparate",[Mc,Dm,Mc,Dm]),ar(ov,Cf,!0),xr(Up,"depthFunc",hv),xr(Tm,"depthRange",[0,1]),xr(iv,"
|