27 lines
195 KiB
JavaScript
27 lines
195 KiB
JavaScript
import{aN as me,bp as ut,bs as O,aG as ne,bF as ke,bk as rt,bS as V,aH as nl,bN as xe,bC as Ee,ay as ie,b6 as Pt,aT as Pi,c7 as ye,bY as ol,br as il,aK as ue,c8 as ge,b0 as At,b1 as Ai,bq as yn,bn as rl,aD as X,ai as Te,bE as je,bl as Oe,bj as We,bo as Oi,b7 as ll,aE as ve,aF as Se,bK as it,bL as Ce,bP as fe,bA as zi,b8 as So,bO as al,aL as sl,by as $t,b2 as be,bf as Gt,bB as ul,bG as Bi,bU as cl,bg as Vi,bH as xt,aJ as Pe,R as No,Q as dl,bI as fl,ak as wt,N as hl,O as pl,S as gl,a8 as vl,a4 as ml,Z as yl,L as wl,r as zn,I as _l,cb as Vo,K as bl,J as xl,bM as El,ad as Sl,X as $e,Y as zt}from"./index-D5GfLbIx.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */function Zt(e){return Ai()?(yn(e),!0):!1}function qe(e){return typeof e=="function"?e():V(e)}const Nl=typeof window<"u"&&typeof document<"u",kl=e=>typeof e<"u",Cl=Object.prototype.toString,$l=e=>Cl.call(e)==="[object Object]",Il=()=>{};function Ml(e,t){function n(...o){return new Promise((i,r)=>{Promise.resolve(e(()=>t.apply(this,o),{fn:t,thisArg:this,args:o})).then(i).catch(r)})}return n}const Ri=e=>e();function Tl(e=Ri){const t=Ee(!0);function n(){t.value=!1}function o(){t.value=!0}const i=(...r)=>{t.value&&e(...r)};return{isActive:ul(t),pause:n,resume:o,eventFilter:i}}function Ro(e,t=!1,n="Timeout"){return new Promise((o,i)=>{setTimeout(t?()=>i(n):o,e)})}function Dl(e,t,n={}){const{eventFilter:o=Ri,...i}=n;return ye(e,Ml(o,t),i)}function _t(e,t,n={}){const{eventFilter:o,...i}=n,{eventFilter:r,pause:l,resume:a,isActive:s}=Tl(o);return{stop:Dl(e,t,{...i,eventFilter:r}),pause:l,resume:a,isActive:s}}function Pl(e,t={}){if(!So(e))return al(e);const n=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const o in e.value)n[o]=sl(()=>({get(){return e.value[o]},set(i){var r;if((r=qe(t.replaceRef))!=null?r:!0)if(Array.isArray(e.value)){const a=[...e.value];a[o]=i,e.value=a}else{const a={...e.value,[o]:i};Object.setPrototypeOf(a,Object.getPrototypeOf(e.value)),e.value=a}else e.value[o]=i}}));return n}function so(e,t=!1){function n(h,{flush:p="sync",deep:v=!1,timeout:k,throwOnTimeout:w}={}){let x=null;const I=[new Promise(m=>{x=ye(e,C=>{h(C)!==t&&(x?.(),m(C))},{flush:p,deep:v,immediate:!0})})];return k!=null&&I.push(Ro(k,w).then(()=>qe(e)).finally(()=>x?.())),Promise.race(I)}function o(h,p){if(!So(h))return n(C=>C===h,p);const{flush:v="sync",deep:k=!1,timeout:w,throwOnTimeout:x}=p??{};let $=null;const m=[new Promise(C=>{$=ye([e,h],([z,Y])=>{t!==(z===Y)&&($?.(),C(z))},{flush:v,deep:k,immediate:!0})})];return w!=null&&m.push(Ro(w,x).then(()=>qe(e)).finally(()=>($?.(),qe(e)))),Promise.race(m)}function i(h){return n(p=>!!p,h)}function r(h){return o(null,h)}function l(h){return o(void 0,h)}function a(h){return n(Number.isNaN,h)}function s(h,p){return n(v=>{const k=Array.from(v);return k.includes(h)||k.includes(qe(h))},p)}function u(h){return c(1,h)}function c(h=1,p){let v=-1;return n(()=>(v+=1,v>=h),p)}return Array.isArray(qe(e))?{toMatch:n,toContains:s,changed:u,changedTimes:c,get not(){return so(e,!t)}}:{toMatch:n,toBe:o,toBeTruthy:i,toBeNull:r,toBeNaN:a,toBeUndefined:l,changed:u,changedTimes:c,get not(){return so(e,!t)}}}function uo(e){return so(e)}function Al(e){var t;const n=qe(e);return(t=n?.$el)!=null?t:n}const Hi=Nl?window:void 0;function Li(...e){let t,n,o,i;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,i]=e,t=Hi):[t,n,o,i]=e,!t)return Il;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const r=[],l=()=>{r.forEach(c=>c()),r.length=0},a=(c,h,p,v)=>(c.addEventListener(h,p,v),()=>c.removeEventListener(h,p,v)),s=ye(()=>[Al(t),qe(i)],([c,h])=>{if(l(),!c)return;const p=$l(h)?{...h}:h;r.push(...n.flatMap(v=>o.map(k=>a(c,v,k,p))))},{immediate:!0,flush:"post"}),u=()=>{s(),l()};re
|
|||
|
|
`).replace(`
|
||
|
|
|
||
|
|
`,`
|
||
|
|
+`).split(`
|
||
|
|
`).map(l=>l.trim().toLowerCase());if(i.length===1)return e.toLowerCase()===t.toLowerCase();o||n.add(e.toLowerCase());const r=i.every((l,a)=>n.has(l)&&Array.from(n.values())[a]===i[a]);return o&&n.delete(e.toLowerCase()),r}function bc(e,t){return n=>{if(!n.code&&!n.key)return!1;const o=xc(n.code,e);return Array.isArray(e)?e.some(i=>ii(n[o],i,t,n.type==="keyup")):ii(n[o],e,t,n.type==="keyup")}}function xc(e,t){return t.includes(e)?"code":"key"}function Xt(e,t){const n=ie(()=>fe(t?.target)??wc),o=it(fe(e)===!0);let i=!1;const r=new Set;let l=s(fe(e));ye(()=>fe(e),(u,c)=>{typeof c=="boolean"&&typeof u!="boolean"&&a(),l=s(u)},{immediate:!0}),Li(["blur","contextmenu"],a),Ho((...u)=>l(...u),u=>{var c,h;const p=fe(t?.actInsideInputWithModifier)??!0,v=fe(t?.preventDefault)??!1;if(i=_c(u),(!i||i&&!p)&&_o(u))return;const w=((h=(c=u.composedPath)==null?void 0:c.call(u))==null?void 0:h[0])||u.target,x=w?.nodeName==="BUTTON"||w?.nodeName==="A";!v&&(i||!x)&&u.preventDefault(),o.value=!0},{eventName:"keydown",target:n}),Ho((...u)=>l(...u),u=>{const c=fe(t?.actInsideInputWithModifier)??!0;if(o.value){if((!i||i&&!c)&&_o(u))return;i=!1,o.value=!1}},{eventName:"keyup",target:n});function a(){i=!1,r.clear(),o.value=fe(e)===!0}function s(u){return u===null?(a(),()=>!1):typeof u=="boolean"?(a(),o.value=u,()=>!1):Array.isArray(u)||typeof u=="string"?bc(u,r):u}return o}const vr="vue-flow__node-desc",mr="vue-flow__edge-desc",Ec="vue-flow__aria-live",yr=["Enter"," ","Escape"],kt={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function Tn(e){return{...e.computedPosition||{x:0,y:0},width:e.dimensions.width||0,height:e.dimensions.height||0}}function Dn(e,t){const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),o=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*o)}function Ln(e){return{width:e.offsetWidth,height:e.offsetHeight}}function mt(e,t=0,n=1){return Math.min(Math.max(e,t),n)}function wr(e,t){return{x:mt(e.x,t[0][0],t[1][0]),y:mt(e.y,t[0][1],t[1][1])}}function ri(e){const t=e.getRootNode();return"elementFromPoint"in t?t:window.document}function at(e){return e&&typeof e=="object"&&"id"in e&&"source"in e&&"target"in e}function pt(e){return e&&typeof e=="object"&&"id"in e&&"position"in e&&!at(e)}function Yt(e){return pt(e)&&"computedPosition"in e}function fn(e){return!Number.isNaN(e)&&Number.isFinite(e)}function Sc(e){return fn(e.width)&&fn(e.height)&&fn(e.x)&&fn(e.y)}function Nc(e,t,n){const o={id:e.id.toString(),type:e.type??"default",dimensions:Gt({width:0,height:0}),computedPosition:Gt({z:0,...e.position}),handleBounds:{source:[],target:[]},draggable:void 0,selectable:void 0,connectable:void 0,focusable:void 0,selected:!1,dragging:!1,resizing:!1,initialized:!1,isParent:!1,position:{x:0,y:0},data:Ie(e.data)?e.data:{},events:Gt(Ie(e.events)?e.events:{})};return Object.assign(t??o,e,{id:e.id.toString(),parentNode:n})}function _r(e,t,n){var o,i;const r={id:e.id.toString(),type:e.type??t?.type??"default",source:e.source.toString(),target:e.target.toString(),sourceHandle:(o=e.sourceHandle)==null?void 0:o.toString(),targetHandle:(i=e.targetHandle)==null?void 0:i.toString(),updatable:e.updatable??n?.updatable,selectable:e.selectable??n?.selectable,focusable:e.focusable??n?.focusable,data:Ie(e.data)?e.data:{},events:Gt(Ie(e.events)?e.events:{}),label:e.label??"",interactionWidth:e.interactionWidth??n?.interactionWidth,...n??{}};return Object.assign(t??r,e,{id:e.id.toString()})}function br(e,t,n,o){const i=typeof e=="string"?e:e.id,r=new Set,l=o==="source"?"target":"source";for(const a of n)a[l]===i&&r.add(a[o]);return t.filter(a=>r.has(a.id))}function kc(...e){if(e.length===3){const[r,l,a]=e;return br(r,l,a,"target")}const[t,n]=e,o=typeof t=="string"?t:t.id;return n.filter(r=>at(r)&&r.source===o).map(r=>n.find(l=>pt(l)&&l.id===r.target))}function Cc(...e){if(e.length===3){const[r,l,a]=e;return br(r,l,a,"source")}const[t,n]=e,o=typeof t=="string"?t:t.id;return n.filter(r=>at(r)&&r.target===o).map(r=>n.find(l=>pt(l)&&l.id===r.source))}function xr({source:e,sourceHan
|
||
|
|
Node: ${e}`,NODE_NOT_FOUND:e=>`Node not found
|
||
|
|
Node: ${e}`,NODE_MISSING_PARENT:(e,t)=>`Node is missing a parent
|
||
|
|
Node: ${e}
|
||
|
|
Parent: ${t}`,NODE_TYPE_MISSING:e=>`Node type is missing
|
||
|
|
Type: ${e}`,NODE_EXTENT_INVALID:e=>`Only child nodes can use a parent extent
|
||
|
|
Node: ${e}`,EDGE_INVALID:e=>`An edge needs a source and a target
|
||
|
|
Edge: ${e}`,EDGE_SOURCE_MISSING:(e,t)=>`Edge source is missing
|
||
|
|
Edge: ${e}
|
||
|
|
Source: ${t}`,EDGE_TARGET_MISSING:(e,t)=>`Edge target is missing
|
||
|
|
Edge: ${e}
|
||
|
|
Target: ${t}`,EDGE_TYPE_MISSING:e=>`Edge type is missing
|
||
|
|
Type: ${e}`,EDGE_SOURCE_TARGET_SAME:(e,t,n)=>`Edge source and target are the same
|
||
|
|
Edge: ${e}
|
||
|
|
Source: ${t}
|
||
|
|
Target: ${n}`,EDGE_SOURCE_TARGET_MISSING:(e,t,n)=>`Edge source or target is missing
|
||
|
|
Edge: ${e}
|
||
|
|
Source: ${t}
|
||
|
|
Target: ${n}`,EDGE_ORPHANED:e=>`Edge was orphaned (suddenly missing source or target) and has been removed
|
||
|
|
Edge: ${e}`,EDGE_NOT_FOUND:e=>`Edge not found
|
||
|
|
Edge: ${e}`,USEVUEFLOW_OPTIONS:()=>"The options parameter is deprecated and will be removed in the next major version. Please use the id parameter instead"};class De extends Error{constructor(t,...n){var o;super((o=vi[t])==null?void 0:o.call(vi,...n)),this.name="VueFlowError",this.code=t,this.args=n}}function Oo(e){return"clientX"in e}function Hc(e){return"sourceEvent"in e}function Ge(e,t){const n=Oo(e);let o,i;return n?(o=e.clientX,i=e.clientY):"touches"in e&&e.touches.length>0?(o=e.touches[0].clientX,i=e.touches[0].clientY):"changedTouches"in e&&e.changedTouches.length>0?(o=e.changedTouches[0].clientX,i=e.changedTouches[0].clientY):(o=0,i=0),{x:o-(t?.left??0),y:i-(t?.top??0)}}const Pn=()=>{var e;return typeof navigator<"u"&&((e=navigator?.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Lc(e){var t,n;return{width:((t=e.dimensions)==null?void 0:t.width)??e.width??0,height:((n=e.dimensions)==null?void 0:n.height)??e.height??0}}function Fn(e,t=[1,1]){return{x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}}const Fc=()=>!0;function oo(e){e?.classList.remove("valid","connecting","vue-flow__handle-valid","vue-flow__handle-connecting")}function Yc(e,t,n){const o=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const r of t.values())Dn(i,Tn(r))>0&&o.push(r);return o}const Gc=250;function Wc(e,t,n,o){var i,r;let l=[],a=Number.POSITIVE_INFINITY;const s=Yc(e,n,t+Gc);for(const u of s){const c=[...((i=u.handleBounds)==null?void 0:i.source)??[],...((r=u.handleBounds)==null?void 0:r.target)??[]];for(const h of c){if(o.nodeId===h.nodeId&&o.type===h.type&&o.id===h.id)continue;const{x:p,y:v}=Dt(u,h,h.position,!0),k=Math.sqrt((p-e.x)**2+(v-e.y)**2);k>t||(k<a?(l=[{...h,x:p,y:v}],a=k):k===a&&l.push({...h,x:p,y:v}))}}if(!l.length)return null;if(l.length>1){const u=o.type==="source"?"target":"source";return l.find(c=>c.type===u)??l[0]}return l[0]}function mi(e,{handle:t,connectionMode:n,fromNodeId:o,fromHandleId:i,fromType:r,doc:l,lib:a,flowId:s,isValidConnection:u=Fc},c,h,p,v){const k=r==="target",w=t?l.querySelector(`.${a}-flow__handle[data-id="${s}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x,y:$}=Ge(e),I=l.elementFromPoint(x,$),m=I?.classList.contains(`${a}-flow__handle`)?I:w,C={handleDomNode:m,isValid:!1,connection:null,toHandle:null};if(m){const z=Mr(void 0,m),Y=m.getAttribute("data-nodeid"),B=m.getAttribute("data-handleid"),R=m.classList.contains("connectable"),j=m.classList.contains("connectableend");if(!Y||!z)return C;const P={source:k?Y:o,sourceHandle:k?B:i,target:k?o:Y,targetHandle:k?i:B};C.connection=P;const E=R&&j&&(n===lt.Strict?k&&z==="source"||!k&&z==="target":Y!==o||B!==i);C.isValid=E&&u(P,{nodes:h,edges:c,sourceNode:p(P.source),targetNode:p(P.target)}),C.toHandle=Tr(Y,z,B,v,n,!0)}return C}function Mr(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function Uc(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}function Xc(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}function Tr(e,t,n,o,i,r=!1){var l,a,s;const u=o.get(e);if(!u)return null;const c=i===lt.Strict?(l=u.handleBounds)==null?void 0:l[t]:[...((a=u.handleBounds)==null?void 0:a.source)??[],...((s=u.handleBounds)==null?void 0:s.target)??[]],h=(n?c?.find(p=>p.id===n):c?.[0])??null;return h&&r?{...h,...Dt(u,h,h.position,!0)}:h}const bo={[K.Left]:K.Right,[K.Right]:K.Left,[K.Top]:K.Bottom,[K.Bottom]:K.Top},Zc=["production","prod"];function rn(e,...t){Dr()&&console.warn(`[Vue Flow]: ${e}`,...t)}function Dr(){return!Zc.includes("production")}function yi(e,t,n,o,i){const r=t.querySelectorAll(`.vue-flow__handle.${e}`);return r?.length?Array.from(r).map(l=>{const a=l.getBoundingClientRect();return{id:l.getAttribute("data-handleid"),type:e,nodeId:i,position:l.getAttribute("data-handlepos"),x:(a.left-n.left)/o,y:(a.top-n.top)/o,...Ln(l)}}):null}function xo(e,t,n,o,i,r=!1,l){i.value=!1,e.selected?(r||e.selected&&t)&&(o([e]),We(()=>{l.blur()})):n([e])}function Ie(e){return typeof V(e)<"u"}function qc(e,t,n,o){if(!e||!e.source||!e.target)return n(new De(Me.EDGE_INVALID,e?.id??"[ID UNKNOWN]")),!1;let i;return
|