@oneclick.dev/cms-kit 0.0.58 → 0.0.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +0,0 @@
1
- import{h as e,getCurrentScope as t,inject as n,effectScope as o,watch as i,provide as r,getCurrentInstance as a,reactive as l,computed as u,onScopeDispose as s,defineComponent as c,isRef as d,toRefs as f,customRef as v,Fragment as h,unref as p,ref as g,useAttrs as m,createElementBlock as y,openBlock as w,createElementVNode as x,createCommentVNode as b,createBlock as _,mergeProps as E,createPropsRestProxy as S,toRef as N,onMounted as k,normalizeClass as M,renderSlot as C,nextTick as I,normalizeStyle as P,resolveDynamicComponent as T,createTextVNode as A,toDisplayString as $,markRaw as D,toValue as O,useSlots as z,onUnmounted as B,createVNode as V,withCtx as L,onBeforeMount as R,shallowRef as H,renderList as Y,onBeforeUnmount as G,isMemoSame as F,Teleport as X,resolveComponent as U,readonly as Z}from"vue";const j=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),W=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()))(e);return t.charAt(0).toUpperCase()+t.slice(1)},K=(...e)=>e.filter((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim(),q=e=>""===e;var J={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};const Q=({name:t,iconNode:n,absoluteStrokeWidth:o,"absolute-stroke-width":i,strokeWidth:r,"stroke-width":a,size:l=J.width,color:u=J.stroke,...s},{slots:c})=>e("svg",{...J,...s,width:l,height:l,stroke:u,"stroke-width":q(o)||q(i)||!0===o||!0===i?24*Number(r||a||J["stroke-width"])/Number(l):r||a||J["stroke-width"],class:K("lucide",s.class,...t?[`lucide-${j(W(t))}-icon`,`lucide-${j(t)}`]:["lucide-icon"])},[...n.map(t=>e(...t)),...c.default?[c.default()]:[]]),ee=(t,n)=>(o,{slots:i,attrs:r})=>e(Q,{...r,...o,iconNode:n,name:t},i),te=ee("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);function ne(e){return!!t()&&(s(e),!0)}function oe(e){return"function"==typeof e?e():p(e)}const ie="undefined"!=typeof window&&"undefined"!=typeof document,re=Object.prototype.toString,ae=()=>{};const le=e=>e();function ue(e,t=!1,n="Timeout"){return new Promise((o,i)=>{t?setTimeout(()=>i(n),e):setTimeout(o,e)})}function se(e,t,n={}){const{eventFilter:o=le,...r}=n;return i(e,(a=o,l=t,function(...e){return new Promise((t,n)=>{Promise.resolve(a(()=>l.apply(this,e),{fn:l,thisArg:this,args:e})).then(t).catch(n)})}),r);var a,l}function ce(e,t,n={}){const{eventFilter:o,...i}=n,{eventFilter:r,pause:a,resume:l,isActive:u}=function(e=le){const t=g(!0);return{isActive:Z(t),pause:function(){t.value=!1},resume:function(){t.value=!0},eventFilter:(...n)=>{t.value&&e(...n)}}}(o);return{stop:se(e,t,{...i,eventFilter:r}),pause:a,resume:l,isActive:u}}function de(e,t={}){if(!d(e))return f(e);const n=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const o in e.value)n[o]=v(()=>({get:()=>e.value[o],set(n){var i;if(null==(i=oe(t.replaceRef))||i)if(Array.isArray(e.value)){const t=[...e.value];t[o]=n,e.value=t}else{const t={...e.value,[o]:n};Object.setPrototypeOf(t,Object.getPrototypeOf(e.value)),e.value=t}else e.value[o]=n}}));return n}function fe(e,t=!1){function n(n,{flush:o="sync",deep:r=!1,timeout:a,throwOnTimeout:l}={}){let u=null;const s=[new Promise(a=>{u=i(e,e=>{n(e)!==t&&(null==u||u(),a(e))},{flush:o,deep:r,immediate:!0})})];return null!=a&&s.push(ue(a,l).then(()=>oe(e)).finally(()=>null==u?void 0:u())),Promise.race(s)}function o(o,r){if(!d(o))return n(e=>e===o,r);const{flush:a="sync",deep:l=!1,timeout:u,throwOnTimeout:s}=null!=r?r:{};let c=null;const f=[new Promise(n=>{c=i([e,o],([e,o])=>{t!==(e===o)&&(null==c||c(),n(e))},{flush:a,deep:l,immediate:!0})})];return null!=u&&f.push(ue(u,s).then(()=>oe(e)).finally(()=>(null==c||c(),oe(e)))),Promise.race(f)}function r(e){return a(1,e)}function a(e=1,t){let o=-1;return n(()=>(o+=1,o>=e),t)}if(Array.isArray(oe(e))){return{toMatch:n,toContains:function(e,t){return n(t=>{const n=Array.from(t);return n.includes(e)||n.includes(oe(e))},t)},changed:r,changedTimes:a,get not(){return fe(e,!t)}}}return{toMatch:n,toBe:o,toBeTruthy:function(e){return n(e=>Boolean(e),e)},toBeNull:function(e){return o(null,e)},toBeNaN:function(e){return n(Number.isNaN,e)},toBeUndefined:function(e){return o(void 0,e)},changed:r,changedTimes:a,get not(){return fe(e,!t)}}}function ve(e){return fe(e)}function he(e){var t;const n=oe(e);return null!=(t=null==n?void 0:n.$el)?t:n}const pe=ie?window:void 0;function ge(...e){let t,n,o,r;if("string"==typeof e[0]||Array.isArray(e[0])?([n,o,r]=e,t=pe):[t,n,o,r]=e,!t)return ae;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const a=[],l=()=>{a.forEach(e=>e()),a.length=0},u=i(()=>[he(t),oe(r)],([e,t])=>{if(l(),!e)return;const i=(r=t,"[object Object]"===re.call(r)?{...t}:t);var r;a.push(...n.flatMap(t=>o.map(n=>((e,t,n,o)=>(e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)))(e,t,n,i))))},{immediate:!0,flush:"post"}),s=()=>{u(),l()};return ne(s),s}function me(...e){let t,n,o={};3===e.length?(t=e[0],n=e[1],o=e[2]):2===e.length?"object"==typeof e[1]?(t=!0,n=e[0],o=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:i=pe,eventName:r="keydown",passive:a=!1,dedupe:l=!1}=o,u="function"==typeof(s=t)?s:"string"==typeof s?e=>e.key===s:Array.isArray(s)?e=>s.includes(e.key):()=>!0;var s;return ge(i,r,e=>{e.repeat&&oe(l)||u(e)&&n(e)},a)}function ye(e,t,n,o={}){var r,l,s;const{clone:c=!1,passive:d=!1,eventName:f,deep:v=!1,defaultValue:h,shouldEmit:p}=o,m=a(),y=n||(null==m?void 0:m.emit)||(null==(r=null==m?void 0:m.$emit)?void 0:r.bind(m))||(null==(s=null==(l=null==m?void 0:m.proxy)?void 0:l.$emit)?void 0:s.bind(null==m?void 0:m.proxy));let w=f;t||(t="modelValue"),w=w||`update:${t.toString()}`;const x=e=>{return c?"function"==typeof c?c(e):(t=e,JSON.parse(JSON.stringify(t))):e;var t},b=()=>void 0!==e[t]?x(e[t]):h,_=e=>{p?p(e)&&y(w,e):y(w,e)};if(d){const n=b(),o=g(n);let r=!1;return i(()=>e[t],e=>{r||(r=!0,o.value=x(e),I(()=>r=!1))}),i(o,n=>{r||n===e[t]&&!v||_(n)},{deep:v}),o}return u({get:()=>b(),set(e){_(e)}})}var we={value:()=>{}};function xe(){for(var e,t=0,n=arguments.length,o={};t<n;++t){if(!(e=arguments[t]+"")||e in o||/[\s.]/.test(e))throw new Error("illegal type: "+e);o[e]=[]}return new be(o)}function be(e){this._=e}function _e(e,t){for(var n,o=0,i=e.length;o<i;++o)if((n=e[o]).name===t)return n.value}function Ee(e,t,n){for(var o=0,i=e.length;o<i;++o)if(e[o].name===t){e[o]=we,e=e.slice(0,o).concat(e.slice(o+1));break}return null!=n&&e.push({name:t,value:n}),e}be.prototype=xe.prototype={constructor:be,on:function(e,t){var n,o,i=this._,r=(o=i,(e+"").trim().split(/^|\s+/).map(function(e){var t="",n=e.indexOf(".");if(n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),e&&!o.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:t}})),a=-1,l=r.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++a<l;)if(n=(e=r[a]).type)i[n]=Ee(i[n],e.name,t);else if(null==t)for(n in i)i[n]=Ee(i[n],e.name,null);return this}for(;++a<l;)if((n=(e=r[a]).type)&&(n=_e(i[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new be(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,o,i=new Array(n),r=0;r<n;++r)i[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(r=0,n=(o=this._[e]).length;r<n;++r)o[r].value.apply(t,i)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var o=this._[e],i=0,r=o.length;i<r;++i)o[i].value.apply(t,n)}};var Se="http://www.w3.org/1999/xhtml";const Ne={svg:"http://www.w3.org/2000/svg",xhtml:Se,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ke(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),Ne.hasOwnProperty(t)?{space:Ne[t],local:e}:e}function Me(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Se&&t.documentElement.namespaceURI===Se?t.createElement(e):t.createElementNS(n,e)}}function Ce(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Ie(e){var t=ke(e);return(t.local?Ce:Me)(t)}function Pe(){}function Te(e){return null==e?Pe:function(){return this.querySelector(e)}}function Ae(){return[]}function $e(e){return null==e?Ae:function(){return this.querySelectorAll(e)}}function De(e){return function(){return null==(t=e.apply(this,arguments))?[]:Array.isArray(t)?t:Array.from(t);var t}}function Oe(e){return function(){return this.matches(e)}}function ze(e){return function(t){return t.matches(e)}}var Be=Array.prototype.find;function Ve(){return this.firstElementChild}var Le=Array.prototype.filter;function Re(){return Array.from(this.children)}function He(e){return new Array(e.length)}function Ye(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function Ge(e,t,n,o,i,r){for(var a,l=0,u=t.length,s=r.length;l<s;++l)(a=t[l])?(a.__data__=r[l],o[l]=a):n[l]=new Ye(e,r[l]);for(;l<u;++l)(a=t[l])&&(i[l]=a)}function Fe(e,t,n,o,i,r,a){var l,u,s,c=/* @__PURE__ */new Map,d=t.length,f=r.length,v=new Array(d);for(l=0;l<d;++l)(u=t[l])&&(v[l]=s=a.call(u,u.__data__,l,t)+"",c.has(s)?i[l]=u:c.set(s,u));for(l=0;l<f;++l)s=a.call(e,r[l],l,r)+"",(u=c.get(s))?(o[l]=u,u.__data__=r[l],c.delete(s)):n[l]=new Ye(e,r[l]);for(l=0;l<d;++l)(u=t[l])&&c.get(v[l])===u&&(i[l]=u)}function Xe(e){return e.__data__}function Ue(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function Ze(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function je(e){return function(){this.removeAttribute(e)}}function We(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ke(e,t){return function(){this.setAttribute(e,t)}}function qe(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Je(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function Qe(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function et(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function tt(e){return function(){this.style.removeProperty(e)}}function nt(e,t,n){return function(){this.style.setProperty(e,t,n)}}function ot(e,t,n){return function(){var o=t.apply(this,arguments);null==o?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function it(e,t){return e.style.getPropertyValue(t)||et(e).getComputedStyle(e,null).getPropertyValue(t)}function rt(e){return function(){delete this[e]}}function at(e,t){return function(){this[e]=t}}function lt(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function ut(e){return e.trim().split(/^|\s+/)}function st(e){return e.classList||new ct(e)}function ct(e){this._node=e,this._names=ut(e.getAttribute("class")||"")}function dt(e,t){for(var n=st(e),o=-1,i=t.length;++o<i;)n.add(t[o])}function ft(e,t){for(var n=st(e),o=-1,i=t.length;++o<i;)n.remove(t[o])}function vt(e){return function(){dt(this,e)}}function ht(e){return function(){ft(this,e)}}function pt(e,t){return function(){(t.apply(this,arguments)?dt:ft)(this,e)}}function gt(){this.textContent=""}function mt(e){return function(){this.textContent=e}}function yt(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}function wt(){this.innerHTML=""}function xt(e){return function(){this.innerHTML=e}}function bt(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}function _t(){this.nextSibling&&this.parentNode.appendChild(this)}function Et(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function St(){return null}function Nt(){var e=this.parentNode;e&&e.removeChild(this)}function kt(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Mt(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ct(e){return function(){var t=this.__on;if(t){for(var n,o=0,i=-1,r=t.length;o<r;++o)n=t[o],e.type&&n.type!==e.type||n.name!==e.name?t[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?t.length=i:delete this.__on}}}function It(e,t,n){return function(){var o,i=this.__on,r=function(e){return function(t){e.call(this,t,this.__data__)}}(t);if(i)for(var a=0,l=i.length;a<l;++a)if((o=i[a]).type===e.type&&o.name===e.name)return this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=r,o.options=n),void(o.value=t);this.addEventListener(e.type,r,n),o={type:e.type,name:e.name,value:t,listener:r,options:n},i?i.push(o):this.__on=[o]}}function Pt(e,t,n){var o=et(e),i=o.CustomEvent;"function"==typeof i?i=new i(t,n):(i=o.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function Tt(e,t){return function(){return Pt(this,e,t)}}function At(e,t){return function(){return Pt(this,e,t.apply(this,arguments))}}Ye.prototype={constructor:Ye,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}},ct.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var $t=[null];function Dt(e,t){this._groups=e,this._parents=t}function Ot(){return new Dt([[document.documentElement]],$t)}function zt(e){return"string"==typeof e?new Dt([[document.querySelector(e)]],[document.documentElement]):new Dt([[e]],$t)}function Bt(e,t){if(e=function(e){let t;for(;t=e.sourceEvent;)e=t;return e}(e),void 0===t&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var o=n.createSVGPoint();return o.x=e.clientX,o.y=e.clientY,[(o=o.matrixTransform(t.getScreenCTM().inverse())).x,o.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}Dt.prototype=Ot.prototype={constructor:Dt,select:function(e){"function"!=typeof e&&(e=Te(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r,a,l=t[i],u=l.length,s=o[i]=new Array(u),c=0;c<u;++c)(r=l[c])&&(a=e.call(r,r.__data__,c,l))&&("__data__"in r&&(a.__data__=r.__data__),s[c]=a);return new Dt(o,this._parents)},selectAll:function(e){e="function"==typeof e?De(e):$e(e);for(var t=this._groups,n=t.length,o=[],i=[],r=0;r<n;++r)for(var a,l=t[r],u=l.length,s=0;s<u;++s)(a=l[s])&&(o.push(e.call(a,a.__data__,s,l)),i.push(a));return new Dt(o,i)},selectChild:function(e){return this.select(null==e?Ve:function(e){return function(){return Be.call(this.children,e)}}("function"==typeof e?e:ze(e)))},selectChildren:function(e){return this.selectAll(null==e?Re:function(e){return function(){return Le.call(this.children,e)}}("function"==typeof e?e:ze(e)))},filter:function(e){"function"!=typeof e&&(e=Oe(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r,a=t[i],l=a.length,u=o[i]=[],s=0;s<l;++s)(r=a[s])&&e.call(r,r.__data__,s,a)&&u.push(r);return new Dt(o,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,Xe);var n,o=t?Fe:Ge,i=this._parents,r=this._groups;"function"!=typeof e&&(n=e,e=function(){return n});for(var a=r.length,l=new Array(a),u=new Array(a),s=new Array(a),c=0;c<a;++c){var d=i[c],f=r[c],v=f.length,h=Ue(e.call(d,d&&d.__data__,c,i)),p=h.length,g=u[c]=new Array(p),m=l[c]=new Array(p);o(d,f,g,m,s[c]=new Array(v),h,t);for(var y,w,x=0,b=0;x<p;++x)if(y=g[x]){for(x>=b&&(b=x+1);!(w=m[b])&&++b<p;);y._next=w||null}}return(l=new Dt(l,i))._enter=u,l._exit=s,l},enter:function(){return new Dt(this._enter||this._groups.map(He),this._parents)},exit:function(){return new Dt(this._exit||this._groups.map(He),this._parents)},join:function(e,t,n){var o=this.enter(),i=this,r=this.exit();return"function"==typeof e?(o=e(o))&&(o=o.selection()):o=o.append(e+""),null!=t&&(i=t(i))&&(i=i.selection()),null==n?r.remove():n(r),o&&i?o.merge(i).order():i},merge:function(e){for(var t=e.selection?e.selection():e,n=this._groups,o=t._groups,i=n.length,r=o.length,a=Math.min(i,r),l=new Array(i),u=0;u<a;++u)for(var s,c=n[u],d=o[u],f=c.length,v=l[u]=new Array(f),h=0;h<f;++h)(s=c[h]||d[h])&&(v[h]=s);for(;u<i;++u)l[u]=n[u];return new Dt(l,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var o,i=e[t],r=i.length-1,a=i[r];--r>=0;)(o=i[r])&&(a&&4^o.compareDocumentPosition(a)&&a.parentNode.insertBefore(o,a),a=o);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=Ze);for(var n=this._groups,o=n.length,i=new Array(o),r=0;r<o;++r){for(var a,l=n[r],u=l.length,s=i[r]=new Array(u),c=0;c<u;++c)(a=l[c])&&(s[c]=a);s.sort(t)}return new Dt(i,this._parents).order()},call:function(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],i=0,r=o.length;i<r;++i){var a=o[i];if(a)return a}return null},size:function(){let e=0;for(const t of this)++e;return e},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,n=0,o=t.length;n<o;++n)for(var i,r=t[n],a=0,l=r.length;a<l;++a)(i=r[a])&&e.call(i,i.__data__,a,r);return this},attr:function(e,t){var n=ke(e);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((null==t?n.local?We:je:"function"==typeof t?n.local?Qe:Je:n.local?qe:Ke)(n,t))},style:function(e,t,n){return arguments.length>1?this.each((null==t?tt:"function"==typeof t?ot:nt)(e,t,null==n?"":n)):it(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?rt:"function"==typeof t?lt:at)(e,t)):this.node()[e]},classed:function(e,t){var n=ut(e+"");if(arguments.length<2){for(var o=st(this.node()),i=-1,r=n.length;++i<r;)if(!o.contains(n[i]))return!1;return!0}return this.each(("function"==typeof t?pt:t?vt:ht)(n,t))},text:function(e){return arguments.length?this.each(null==e?gt:("function"==typeof e?yt:mt)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?wt:("function"==typeof e?bt:xt)(e)):this.node().innerHTML},raise:function(){return this.each(_t)},lower:function(){return this.each(Et)},append:function(e){var t="function"==typeof e?e:Ie(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})},insert:function(e,t){var n="function"==typeof e?e:Ie(e),o=null==t?St:"function"==typeof t?t:Te(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})},remove:function(){return this.each(Nt)},clone:function(e){return this.select(e?Mt:kt)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,n){var o,i,r=function(e){return e.trim().split(/^|\s+/).map(function(e){var t="",n=e.indexOf(".");return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}(e+""),a=r.length;if(!(arguments.length<2)){for(l=t?It:Ct,o=0;o<a;++o)this.each(l(r[o],t,n));return this}var l=this.node().__on;if(l)for(var u,s=0,c=l.length;s<c;++s)for(o=0,u=l[s];o<a;++o)if((i=r[o]).type===u.type&&i.name===u.name)return u.value},dispatch:function(e,t){return this.each(("function"==typeof t?At:Tt)(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o,i=e[t],r=0,a=i.length;r<a;++r)(o=i[r])&&(yield o)}};const Vt={passive:!1},Lt={capture:!0,passive:!1};function Rt(e){e.stopImmediatePropagation()}function Ht(e){e.preventDefault(),e.stopImmediatePropagation()}function Yt(e){var t=e.document.documentElement,n=zt(e).on("dragstart.drag",Ht,Lt);"onselectstart"in t?n.on("selectstart.drag",Ht,Lt):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Gt(e,t){var n=e.document.documentElement,o=zt(e).on("dragstart.drag",null);t&&(o.on("click.drag",Ht,Lt),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in n?o.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Ft=e=>()=>e;function Xt(e,{sourceEvent:t,subject:n,target:o,identifier:i,active:r,x:a,y:l,dx:u,dy:s,dispatch:c}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:r,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:s,enumerable:!0,configurable:!0},_:{value:c}})}function Ut(e){return!e.ctrlKey&&!e.button}function Zt(){return this.parentNode}function jt(e,t){return null==t?{x:e.x,y:e.y}:t}function Wt(){return navigator.maxTouchPoints||"ontouchstart"in this}function Kt(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function qt(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function Jt(){}Xt.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};var Qt=.7,en=1/Qt,tn="\\s*([+-]?\\d+)\\s*",nn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",on="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",rn=/^#([0-9a-f]{3,8})$/,an=new RegExp(`^rgb\\(${tn},${tn},${tn}\\)$`),ln=new RegExp(`^rgb\\(${on},${on},${on}\\)$`),un=new RegExp(`^rgba\\(${tn},${tn},${tn},${nn}\\)$`),sn=new RegExp(`^rgba\\(${on},${on},${on},${nn}\\)$`),cn=new RegExp(`^hsl\\(${nn},${on},${on}\\)$`),dn=new RegExp(`^hsla\\(${nn},${on},${on},${nn}\\)$`),fn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function vn(){return this.rgb().formatHex()}function hn(){return this.rgb().formatRgb()}function pn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=rn.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?gn(t):3===n?new wn(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?mn(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?mn(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=an.exec(e))?new wn(t[1],t[2],t[3],1):(t=ln.exec(e))?new wn(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=un.exec(e))?mn(t[1],t[2],t[3],t[4]):(t=sn.exec(e))?mn(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=cn.exec(e))?Nn(t[1],t[2]/100,t[3]/100,1):(t=dn.exec(e))?Nn(t[1],t[2]/100,t[3]/100,t[4]):fn.hasOwnProperty(e)?gn(fn[e]):"transparent"===e?new wn(NaN,NaN,NaN,0):null}function gn(e){return new wn(e>>16&255,e>>8&255,255&e,1)}function mn(e,t,n,o){return o<=0&&(e=t=n=NaN),new wn(e,t,n,o)}function yn(e,t,n,o){return 1===arguments.length?((i=e)instanceof Jt||(i=pn(i)),i?new wn((i=i.rgb()).r,i.g,i.b,i.opacity):new wn):new wn(e,t,n,null==o?1:o);var i}function wn(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}function xn(){return`#${Sn(this.r)}${Sn(this.g)}${Sn(this.b)}`}function bn(){const e=_n(this.opacity);return`${1===e?"rgb(":"rgba("}${En(this.r)}, ${En(this.g)}, ${En(this.b)}${1===e?")":`, ${e})`}`}function _n(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function En(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Sn(e){return((e=En(e))<16?"0":"")+e.toString(16)}function Nn(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Mn(e,t,n,o)}function kn(e){if(e instanceof Mn)return new Mn(e.h,e.s,e.l,e.opacity);if(e instanceof Jt||(e=pn(e)),!e)return new Mn;if(e instanceof Mn)return e;var t=(e=e.rgb()).r/255,n=e.g/255,o=e.b/255,i=Math.min(t,n,o),r=Math.max(t,n,o),a=NaN,l=r-i,u=(r+i)/2;return l?(a=t===r?(n-o)/l+6*(n<o):n===r?(o-t)/l+2:(t-n)/l+4,l/=u<.5?r+i:2-r-i,a*=60):l=u>0&&u<1?0:a,new Mn(a,l,u,e.opacity)}function Mn(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}function Cn(e){return(e=(e||0)%360)<0?e+360:e}function In(e){return Math.max(0,Math.min(1,e||0))}function Pn(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Kt(Jt,pn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:vn,formatHex:vn,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return kn(this).formatHsl()},formatRgb:hn,toString:hn}),Kt(wn,yn,qt(Jt,{brighter(e){return e=null==e?en:Math.pow(en,e),new wn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?Qt:Math.pow(Qt,e),new wn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new wn(En(this.r),En(this.g),En(this.b),_n(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:xn,formatHex:xn,formatHex8:function(){return`#${Sn(this.r)}${Sn(this.g)}${Sn(this.b)}${Sn(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:bn,toString:bn})),Kt(Mn,function(e,t,n,o){return 1===arguments.length?kn(e):new Mn(e,t,n,null==o?1:o)},qt(Jt,{brighter(e){return e=null==e?en:Math.pow(en,e),new Mn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Qt:Math.pow(Qt,e),new Mn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,o=n+(n<.5?n:1-n)*t,i=2*n-o;return new wn(Pn(e>=240?e-240:e+120,i,o),Pn(e,i,o),Pn(e<120?e+240:e-120,i,o),this.opacity)},clamp(){return new Mn(Cn(this.h),In(this.s),In(this.l),_n(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=_n(this.opacity);return`${1===e?"hsl(":"hsla("}${Cn(this.h)}, ${100*In(this.s)}%, ${100*In(this.l)}%${1===e?")":`, ${e})`}`}}));const Tn=e=>()=>e;function An(e){return 1===(e=+e)?$n:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(o){return Math.pow(e+o*t,n)}}(t,n,e):Tn(isNaN(t)?n:t)}}function $n(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Tn(isNaN(e)?t:e)}const Dn=function e(t){var n=An(t);function o(e,t){var o=n((e=yn(e)).r,(t=yn(t)).r),i=n(e.g,t.g),r=n(e.b,t.b),a=$n(e.opacity,t.opacity);return function(t){return e.r=o(t),e.g=i(t),e.b=r(t),e.opacity=a(t),e+""}}return o.gamma=e,o}(1);function On(e,t){t||(t=[]);var n,o=e?Math.min(t.length,e.length):0,i=t.slice();return function(r){for(n=0;n<o;++n)i[n]=e[n]*(1-r)+t[n]*r;return i}}function zn(e,t){var n,o=t?t.length:0,i=e?Math.min(o,e.length):0,r=new Array(i),a=new Array(o);for(n=0;n<i;++n)r[n]=Gn(e[n],t[n]);for(;n<o;++n)a[n]=t[n];return function(e){for(n=0;n<i;++n)a[n]=r[n](e);return a}}function Bn(e,t){var n=/* @__PURE__ */new Date;return e=+e,t=+t,function(o){return n.setTime(e*(1-o)+t*o),n}}function Vn(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Ln(e,t){var n,o={},i={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?o[n]=Gn(e[n],t[n]):i[n]=t[n];return function(e){for(n in o)i[n]=o[n](e);return i}}var Rn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Hn=new RegExp(Rn.source,"g");function Yn(e,t){var n,o,i,r=Rn.lastIndex=Hn.lastIndex=0,a=-1,l=[],u=[];for(e+="",t+="";(n=Rn.exec(e))&&(o=Hn.exec(t));)(i=o.index)>r&&(i=t.slice(r,i),l[a]?l[a]+=i:l[++a]=i),(n=n[0])===(o=o[0])?l[a]?l[a]+=o:l[++a]=o:(l[++a]=null,u.push({i:a,x:Vn(n,o)})),r=Hn.lastIndex;return r<t.length&&(i=t.slice(r),l[a]?l[a]+=i:l[++a]=i),l.length<2?u[0]?function(e){return function(t){return e(t)+""}}(u[0].x):function(e){return function(){return e}}(t):(t=u.length,function(e){for(var n,o=0;o<t;++o)l[(n=u[o]).i]=n.x(e);return l.join("")})}function Gn(e,t){var n,o,i=typeof t;return null==t||"boolean"===i?Tn(t):("number"===i?Vn:"string"===i?(n=pn(t))?(t=n,Dn):Yn:t instanceof pn?Dn:t instanceof Date?Bn:(o=t,!ArrayBuffer.isView(o)||o instanceof DataView?Array.isArray(t)?zn:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?Ln:Vn:On))(e,t)}var Fn,Xn=180/Math.PI,Un={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Zn(e,t,n,o,i,r){var a,l,u;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(u=e*n+t*o)&&(n-=e*u,o-=t*u),(l=Math.sqrt(n*n+o*o))&&(n/=l,o/=l,u/=l),e*o<t*n&&(e=-e,t=-t,u=-u,a=-a),{translateX:i,translateY:r,rotate:Math.atan2(t,e)*Xn,skewX:Math.atan(u)*Xn,scaleX:a,scaleY:l}}function jn(e,t,n,o){function i(e){return e.length?e.pop()+" ":""}return function(r,a){var l=[],u=[];return r=e(r),a=e(a),function(e,o,i,r,a,l){if(e!==i||o!==r){var u=a.push("translate(",null,t,null,n);l.push({i:u-4,x:Vn(e,i)},{i:u-2,x:Vn(o,r)})}else(i||r)&&a.push("translate("+i+t+r+n)}(r.translateX,r.translateY,a.translateX,a.translateY,l,u),function(e,t,n,r){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),r.push({i:n.push(i(n)+"rotate(",null,o)-2,x:Vn(e,t)})):t&&n.push(i(n)+"rotate("+t+o)}(r.rotate,a.rotate,l,u),function(e,t,n,r){e!==t?r.push({i:n.push(i(n)+"skewX(",null,o)-2,x:Vn(e,t)}):t&&n.push(i(n)+"skewX("+t+o)}(r.skewX,a.skewX,l,u),function(e,t,n,o,r,a){if(e!==n||t!==o){var l=r.push(i(r)+"scale(",null,",",null,")");a.push({i:l-4,x:Vn(e,n)},{i:l-2,x:Vn(t,o)})}else 1===n&&1===o||r.push(i(r)+"scale("+n+","+o+")")}(r.scaleX,r.scaleY,a.scaleX,a.scaleY,l,u),r=a=null,function(e){for(var t,n=-1,o=u.length;++n<o;)l[(t=u[n]).i]=t.x(e);return l.join("")}}}var Wn=jn(function(e){const t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Un:Zn(t.a,t.b,t.c,t.d,t.e,t.f)},"px, ","px)","deg)"),Kn=jn(function(e){return null==e?Un:(Fn||(Fn=document.createElementNS("http://www.w3.org/2000/svg","g")),Fn.setAttribute("transform",e),(e=Fn.transform.baseVal.consolidate())?Zn((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):Un)},", ",")",")");function qn(e){return((e=Math.exp(e))+1/e)/2}const Jn=function e(t,n,o){function i(e,i){var r,a,l=e[0],u=e[1],s=e[2],c=i[0],d=i[1],f=i[2],v=c-l,h=d-u,p=v*v+h*h;if(p<1e-12)a=Math.log(f/s)/t,r=function(e){return[l+e*v,u+e*h,s*Math.exp(t*e*a)]};else{var g=Math.sqrt(p),m=(f*f-s*s+o*p)/(2*s*n*g),y=(f*f-s*s-o*p)/(2*f*n*g),w=Math.log(Math.sqrt(m*m+1)-m),x=Math.log(Math.sqrt(y*y+1)-y);a=(x-w)/t,r=function(e){var o,i=e*a,r=qn(w),c=s/(n*g)*(r*(o=t*i+w,((o=Math.exp(2*o))-1)/(o+1))-function(e){return((e=Math.exp(e))-1/e)/2}(w));return[l+c*v,u+c*h,s*r/qn(t*i+w)]}}return r.duration=1e3*a*t/Math.SQRT2,r}return i.rho=function(t){var n=Math.max(.001,+t),o=n*n;return e(n,o,o*o)},i}(Math.SQRT2,2,4);var Qn,eo,to=0,no=0,oo=0,io=0,ro=0,ao=0,lo="object"==typeof performance&&performance.now?performance:Date,uo="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function so(){return ro||(uo(co),ro=lo.now()+ao)}function co(){ro=0}function fo(){this._call=this._time=this._next=null}function vo(e,t,n){var o=new fo;return o.restart(e,t,n),o}function ho(){ro=(io=lo.now())+ao,to=no=0;try{!function(){so(),++to;for(var e,t=Qn;t;)(e=ro-t._time)>=0&&t._call.call(void 0,e),t=t._next;--to}()}finally{to=0,function(){var e,t,n=Qn,o=1/0;for(;n;)n._call?(o>n._time&&(o=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:Qn=t);eo=e,go(o)}(),ro=0}}function po(){var e=lo.now(),t=e-io;t>1e3&&(ao-=t,io=e)}function go(e){to||(no&&(no=clearTimeout(no)),e-ro>24?(e<1/0&&(no=setTimeout(ho,e-lo.now()-ao)),oo&&(oo=clearInterval(oo))):(oo||(io=lo.now(),oo=setInterval(po,1e3)),to=1,uo(ho)))}function mo(e,t,n){var o=new fo;return t=null==t?0:+t,o.restart(n=>{o.stop(),e(n+t)},t,n),o}fo.prototype=vo.prototype={constructor:fo,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?so():+n)+(null==t?0:+t),this._next||eo===this||(eo?eo._next=this:Qn=this,eo=this),this._call=e,this._time=n,go()},stop:function(){this._call&&(this._call=null,this._time=1/0,go())}};var yo=xe("start","end","cancel","interrupt"),wo=[];function xo(e,t,n,o,i,r){var a=e.__transition;if(a){if(n in a)return}else e.__transition={};!function(e,t,n){var o,i=e.__transition;function r(e){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=e&&a(e-n.delay)}function a(r){var s,c,d,f;if(1!==n.state)return u();for(s in i)if((f=i[s]).name===n.name){if(3===f.state)return mo(a);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete i[s]):+s<t&&(f.state=6,f.timer.stop(),f.on.call("cancel",e,e.__data__,f.index,f.group),delete i[s])}if(mo(function(){3===n.state&&(n.state=4,n.timer.restart(l,n.delay,n.time),l(r))}),n.state=2,n.on.call("start",e,e.__data__,n.index,n.group),2===n.state){for(n.state=3,o=new Array(d=n.tween.length),s=0,c=-1;s<d;++s)(f=n.tween[s].value.call(e,e.__data__,n.index,n.group))&&(o[++c]=f);o.length=c+1}}function l(t){for(var i=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(u),n.state=5,1),r=-1,a=o.length;++r<a;)o[r].call(e,i);5===n.state&&(n.on.call("end",e,e.__data__,n.index,n.group),u())}function u(){for(var o in n.state=6,n.timer.stop(),delete i[t],i)return;delete e.__transition}i[t]=n,n.timer=vo(r,0,n.time)}(e,n,{name:t,index:o,group:i,on:yo,tween:wo,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:0})}function bo(e,t){var n=Eo(e,t);if(n.state>0)throw new Error("too late; already scheduled");return n}function _o(e,t){var n=Eo(e,t);if(n.state>3)throw new Error("too late; already running");return n}function Eo(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function So(e,t){var n,o,i,r=e.__transition,a=!0;if(r){for(i in t=null==t?null:t+"",r)(n=r[i]).name===t?(o=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(o?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[i]):a=!1;a&&delete e.__transition}}function No(e,t){var n,o;return function(){var i=_o(this,e),r=i.tween;if(r!==n)for(var a=0,l=(o=n=r).length;a<l;++a)if(o[a].name===t){(o=o.slice()).splice(a,1);break}i.tween=o}}function ko(e,t,n){var o,i;if("function"!=typeof n)throw new Error;return function(){var r=_o(this,e),a=r.tween;if(a!==o){i=(o=a).slice();for(var l={name:t,value:n},u=0,s=i.length;u<s;++u)if(i[u].name===t){i[u]=l;break}u===s&&i.push(l)}r.tween=i}}function Mo(e,t,n){var o=e._id;return e.each(function(){var e=_o(this,o);(e.value||(e.value={}))[t]=n.apply(this,arguments)}),function(e){return Eo(e,o).value[t]}}function Co(e,t){var n;return("number"==typeof t?Vn:t instanceof pn?Dn:(n=pn(t))?(t=n,Dn):Yn)(e,t)}function Io(e){return function(){this.removeAttribute(e)}}function Po(e){return function(){this.removeAttributeNS(e.space,e.local)}}function To(e,t,n){var o,i,r=n+"";return function(){var a=this.getAttribute(e);return a===r?null:a===o?i:i=t(o=a,n)}}function Ao(e,t,n){var o,i,r=n+"";return function(){var a=this.getAttributeNS(e.space,e.local);return a===r?null:a===o?i:i=t(o=a,n)}}function $o(e,t,n){var o,i,r;return function(){var a,l,u=n(this);if(null!=u)return(a=this.getAttribute(e))===(l=u+"")?null:a===o&&l===i?r:(i=l,r=t(o=a,u));this.removeAttribute(e)}}function Do(e,t,n){var o,i,r;return function(){var a,l,u=n(this);if(null!=u)return(a=this.getAttributeNS(e.space,e.local))===(l=u+"")?null:a===o&&l===i?r:(i=l,r=t(o=a,u));this.removeAttributeNS(e.space,e.local)}}function Oo(e,t){var n,o;function i(){var i=t.apply(this,arguments);return i!==o&&(n=(o=i)&&function(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}(e,i)),n}return i._value=t,i}function zo(e,t){var n,o;function i(){var i=t.apply(this,arguments);return i!==o&&(n=(o=i)&&function(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}(e,i)),n}return i._value=t,i}function Bo(e,t){return function(){bo(this,e).delay=+t.apply(this,arguments)}}function Vo(e,t){return t=+t,function(){bo(this,e).delay=t}}function Lo(e,t){return function(){_o(this,e).duration=+t.apply(this,arguments)}}function Ro(e,t){return t=+t,function(){_o(this,e).duration=t}}var Ho=Ot.prototype.constructor;function Yo(e){return function(){this.style.removeProperty(e)}}var Go=0;function Fo(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function Xo(){return++Go}var Uo=Ot.prototype;Fo.prototype={constructor:Fo,select:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=Te(e));for(var o=this._groups,i=o.length,r=new Array(i),a=0;a<i;++a)for(var l,u,s=o[a],c=s.length,d=r[a]=new Array(c),f=0;f<c;++f)(l=s[f])&&(u=e.call(l,l.__data__,f,s))&&("__data__"in l&&(u.__data__=l.__data__),d[f]=u,xo(d[f],t,n,f,d,Eo(l,n)));return new Fo(r,this._parents,t,n)},selectAll:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=$e(e));for(var o=this._groups,i=o.length,r=[],a=[],l=0;l<i;++l)for(var u,s=o[l],c=s.length,d=0;d<c;++d)if(u=s[d]){for(var f,v=e.call(u,u.__data__,d,s),h=Eo(u,n),p=0,g=v.length;p<g;++p)(f=v[p])&&xo(f,t,n,p,v,h);r.push(v),a.push(u)}return new Fo(r,a,t,n)},selectChild:Uo.selectChild,selectChildren:Uo.selectChildren,filter:function(e){"function"!=typeof e&&(e=Oe(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r,a=t[i],l=a.length,u=o[i]=[],s=0;s<l;++s)(r=a[s])&&e.call(r,r.__data__,s,a)&&u.push(r);return new Fo(o,this._parents,this._name,this._id)},merge:function(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,o=t.length,i=n.length,r=Math.min(o,i),a=new Array(o),l=0;l<r;++l)for(var u,s=t[l],c=n[l],d=s.length,f=a[l]=new Array(d),v=0;v<d;++v)(u=s[v]||c[v])&&(f[v]=u);for(;l<o;++l)a[l]=t[l];return new Fo(a,this._parents,this._name,this._id)},selection:function(){return new Ho(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,n=Xo(),o=this._groups,i=o.length,r=0;r<i;++r)for(var a,l=o[r],u=l.length,s=0;s<u;++s)if(a=l[s]){var c=Eo(a,t);xo(a,e,n,s,l,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Fo(o,this._parents,e,n)},call:Uo.call,nodes:Uo.nodes,node:Uo.node,size:Uo.size,empty:Uo.empty,each:Uo.each,on:function(e,t){var n=this._id;return arguments.length<2?Eo(this.node(),n).on.on(e):this.each(function(e,t,n){var o,i,r=function(e){return(e+"").trim().split(/^|\s+/).every(function(e){var t=e.indexOf(".");return t>=0&&(e=e.slice(0,t)),!e||"start"===e})}(t)?bo:_o;return function(){var a=r(this,e),l=a.on;l!==o&&(i=(o=l).copy()).on(t,n),a.on=i}}(n,e,t))},attr:function(e,t){var n=ke(e),o="transform"===n?Kn:Co;return this.attrTween(e,"function"==typeof t?(n.local?Do:$o)(n,o,Mo(this,"attr."+e,t)):null==t?(n.local?Po:Io)(n):(n.local?Ao:To)(n,o,t))},attrTween:function(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;var o=ke(e);return this.tween(n,(o.local?Oo:zo)(o,t))},style:function(e,t,n){var o="transform"==(e+="")?Wn:Co;return null==t?this.styleTween(e,function(e,t){var n,o,i;return function(){var r=it(this,e),a=(this.style.removeProperty(e),it(this,e));return r===a?null:r===n&&a===o?i:i=t(n=r,o=a)}}(e,o)).on("end.style."+e,Yo(e)):"function"==typeof t?this.styleTween(e,function(e,t,n){var o,i,r;return function(){var a=it(this,e),l=n(this),u=l+"";return null==l&&(this.style.removeProperty(e),u=l=it(this,e)),a===u?null:a===o&&u===i?r:(i=u,r=t(o=a,l))}}(e,o,Mo(this,"style."+e,t))).each(function(e,t){var n,o,i,r,a="style."+t,l="end."+a;return function(){var u=_o(this,e),s=u.on,c=null==u.value[a]?r||(r=Yo(t)):void 0;s===n&&i===c||(o=(n=s).copy()).on(l,i=c),u.on=o}}(this._id,e)):this.styleTween(e,function(e,t,n){var o,i,r=n+"";return function(){var a=it(this,e);return a===r?null:a===o?i:i=t(o=a,n)}}(e,o,t),n).on("end.style."+e,null)},styleTween:function(e,t,n){var o="style."+(e+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(null==t)return this.tween(o,null);if("function"!=typeof t)throw new Error;return this.tween(o,function(e,t,n){var o,i;function r(){var r=t.apply(this,arguments);return r!==i&&(o=(i=r)&&function(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}(e,r,n)),o}return r._value=t,r}(e,t,null==n?"":n))},text:function(e){return this.tween("text","function"==typeof e?function(e){return function(){var t=e(this);this.textContent=null==t?"":t}}(Mo(this,"text",e)):function(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!=typeof e)throw new Error;return this.tween(t,function(e){var t,n;function o(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&function(e){return function(t){this.textContent=e.call(this,t)}}(o)),t}return o._value=e,o}(e))},remove:function(){return this.on("end.remove",(e=this._id,function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}));var e},tween:function(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o,i=Eo(this.node(),n).tween,r=0,a=i.length;r<a;++r)if((o=i[r]).name===e)return o.value;return null}return this.each((null==t?No:ko)(n,e,t))},delay:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?Bo:Vo)(t,e)):Eo(this.node(),t).delay},duration:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?Lo:Ro)(t,e)):Eo(this.node(),t).duration},ease:function(e){var t=this._id;return arguments.length?this.each(function(e,t){if("function"!=typeof t)throw new Error;return function(){_o(this,e).ease=t}}(t,e)):Eo(this.node(),t).ease},easeVarying:function(e){if("function"!=typeof e)throw new Error;return this.each(function(e,t){return function(){var n=t.apply(this,arguments);if("function"!=typeof n)throw new Error;_o(this,e).ease=n}}(this._id,e))},end:function(){var e,t,n=this,o=n._id,i=n.size();return new Promise(function(r,a){var l={value:a},u={value:function(){0===--i&&r()}};n.each(function(){var n=_o(this,o),i=n.on;i!==e&&((t=(e=i).copy())._.cancel.push(l),t._.interrupt.push(l),t._.end.push(u)),n.on=t}),0===i&&r()})},[Symbol.iterator]:Uo[Symbol.iterator]};var Zo={time:null,delay:0,duration:250,ease:function(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}};function jo(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}Ot.prototype.interrupt=function(e){return this.each(function(){So(this,e)})},Ot.prototype.transition=function(e){var t,n;e instanceof Fo?(t=e._id,e=e._name):(t=Xo(),(n=Zo).time=so(),e=null==e?null:e+"");for(var o=this._groups,i=o.length,r=0;r<i;++r)for(var a,l=o[r],u=l.length,s=0;s<u;++s)(a=l[s])&&xo(a,e,t,s,l,n||jo(a,t));return new Fo(o,this._parents,e,t)};const Wo=e=>()=>e;function Ko(e,{sourceEvent:t,target:n,transform:o,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:i}})}function qo(e,t,n){this.k=e,this.x=t,this.y=n}qo.prototype={constructor:qo,scale:function(e){return 1===e?this:new qo(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new qo(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Jo=new qo(1,0,0);function Qo(e){e.stopImmediatePropagation()}function ei(e){e.preventDefault(),e.stopImmediatePropagation()}function ti(e){return!(e.ctrlKey&&"wheel"!==e.type||e.button)}function ni(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e).hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]:[[0,0],[e.clientWidth,e.clientHeight]]}function oi(){return this.__zoom||Jo}function ii(e){return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function ri(){return navigator.maxTouchPoints||"ontouchstart"in this}function ai(e,t,n){var o=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],r=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(i>o?(o+i)/2:Math.min(0,o)||Math.max(0,i),a>r?(r+a)/2:Math.min(0,r)||Math.max(0,a))}qo.prototype;var li=/* @__PURE__ */(e=>(e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom",e))(li||{}),ui=/* @__PURE__ */(e=>(e.Partial="partial",e.Full="full",e))(ui||{}),si=/* @__PURE__ */(e=>(e.Bezier="default",e.SimpleBezier="simple-bezier",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e))(si||{}),ci=/* @__PURE__ */(e=>(e.Strict="strict",e.Loose="loose",e))(ci||{}),di=/* @__PURE__ */(e=>(e.Arrow="arrow",e.ArrowClosed="arrowclosed",e))(di||{}),fi=/* @__PURE__ */(e=>(e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal",e))(fi||{}),vi=/* @__PURE__ */(e=>(e.TopLeft="top-left",e.TopCenter="top-center",e.TopRight="top-right",e.BottomLeft="bottom-left",e.BottomCenter="bottom-center",e.BottomRight="bottom-right",e))(vi||{});const hi=["INPUT","SELECT","TEXTAREA"],pi="undefined"!=typeof document?document:null;function gi(e){var t,n;const o=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target,i="function"==typeof(null==o?void 0:o.hasAttribute)&&o.hasAttribute("contenteditable"),r="function"==typeof(null==o?void 0:o.closest)?o.closest(".nokey"):null;return hi.includes(null==o?void 0:o.nodeName)||i||!!r}function mi(e,t,n,o){const i=t.replace("+","\n").replace("\n\n","\n+").split("\n").map(e=>e.trim().toLowerCase());if(1===i.length)return e.toLowerCase()===t.toLowerCase();o||n.add(e.toLowerCase());const r=i.every((e,t)=>n.has(e)&&Array.from(n.values())[t]===i[t]);return o&&n.delete(e.toLowerCase()),r}function yi(e,t){const n=u(()=>O(null==t?void 0:t.target)??pi),o=H(!0===O(e));let r=!1;const a=/* @__PURE__ */new Set;let l=c(O(e));function s(){r=!1,a.clear(),o.value=!0===O(e)}function c(e){return null===e?(s(),()=>!1):"boolean"==typeof e?(s(),o.value=e,()=>!1):Array.isArray(e)||"string"==typeof e?function(e,t){return n=>{if(!n.code&&!n.key)return!1;const o=(i=n.code,e.includes(i)?"code":"key");var i;return Array.isArray(e)?e.some(e=>mi(n[o],e,t,"keyup"===n.type)):mi(n[o],e,t,"keyup"===n.type)}}(e,a):e}return i(()=>O(e),(e,t)=>{"boolean"==typeof t&&"boolean"!=typeof e&&s(),l=c(e)},{immediate:!0}),ge(["blur","contextmenu"],s),me((...e)=>l(...e),e=>{var n,i;const a=O(null==t?void 0:t.actInsideInputWithModifier)??!0,l=O(null==t?void 0:t.preventDefault)??!1;var u;r=(u=e).ctrlKey||u.metaKey||u.shiftKey||u.altKey;if((!r||r&&!a)&&gi(e))return;const s=(null==(i=null==(n=e.composedPath)?void 0:n.call(e))?void 0:i[0])||e.target,c="BUTTON"===(null==s?void 0:s.nodeName)||"A"===(null==s?void 0:s.nodeName);l||!r&&c||e.preventDefault(),o.value=!0},{eventName:"keydown",target:n}),me((...e)=>l(...e),e=>{const n=O(null==t?void 0:t.actInsideInputWithModifier)??!0;if(o.value){if((!r||r&&!n)&&gi(e))return;r=!1,o.value=!1}},{eventName:"keyup",target:n}),o}const wi="vue-flow__node-desc",xi="vue-flow__edge-desc",bi=["Enter"," ","Escape"],_i={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function Ei(e){return{...e.computedPosition||{x:0,y:0},width:e.dimensions.width||0,height:e.dimensions.height||0}}function Si(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 Ni(e){return{width:e.offsetWidth,height:e.offsetHeight}}function ki(e,t=0,n=1){return Math.min(Math.max(e,t),n)}function Mi(e,t){return{x:ki(e.x,t[0][0],t[1][0]),y:ki(e.y,t[0][1],t[1][1])}}function Ci(e){const t=e.getRootNode();return"elementFromPoint"in t?t:window.document}function Ii(e){return e&&"object"==typeof e&&"id"in e&&"source"in e&&"target"in e}function Pi(e){return e&&"object"==typeof e&&"id"in e&&"position"in e&&!Ii(e)}function Ti(e){return Pi(e)&&"computedPosition"in e}function Ai(e){return!Number.isNaN(e)&&Number.isFinite(e)}function $i(e,t,n){const o={id:e.id.toString(),type:e.type??"default",dimensions:D({width:0,height:0}),computedPosition:D({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:zr(e.data)?e.data:{},events:D(zr(e.events)?e.events:{})};return Object.assign(t??o,e,{id:e.id.toString(),parentNode:n})}function Di(e,t,n){var o,i;const r={id:e.id.toString(),type:e.type??(null==t?void 0:t.type)??"default",source:e.source.toString(),target:e.target.toString(),sourceHandle:null==(o=e.sourceHandle)?void 0:o.toString(),targetHandle:null==(i=e.targetHandle)?void 0:i.toString(),updatable:e.updatable??(null==n?void 0:n.updatable),selectable:e.selectable??(null==n?void 0:n.selectable),focusable:e.focusable??(null==n?void 0:n.focusable),data:zr(e.data)?e.data:{},events:D(zr(e.events)?e.events:{}),label:e.label??"",interactionWidth:e.interactionWidth??(null==n?void 0:n.interactionWidth),...n??{}};return Object.assign(t??r,e,{id:e.id.toString()})}function Oi(e,t,n,o){const i="string"==typeof e?e:e.id,r=/* @__PURE__ */new Set,a="source"===o?"target":"source";for(const l of n)l[a]===i&&r.add(l[o]);return t.filter(e=>r.has(e.id))}function zi({source:e,sourceHandle:t,target:n,targetHandle:o}){return`vueflow__edge-${e}${t??""}-${n}${o??""}`}function Bi({x:e,y:t},{x:n,y:o,zoom:i}){return{x:e*i+n,y:t*i+o}}function Vi({x:e,y:t},{x:n,y:o,zoom:i},r=!1,a=[1,1]){const l={x:(e-n)/i,y:(t-o)/i};return r?Er(l,a):l}function Li(e,t){return{x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}}function Ri({x:e,y:t,width:n,height:o}){return{x:e,y:t,x2:e+n,y2:t+o}}function Hi({x:e,y:t,x2:n,y2:o}){return{x:e,y:t,width:n-e,height:o-t}}function Yi(e,t){return Hi(Li(Ri(e),Ri(t)))}function Gi(e){let t={x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY,x2:Number.NEGATIVE_INFINITY,y2:Number.NEGATIVE_INFINITY};for(let n=0;n<e.length;n++){const o=e[n];t=Li(t,Ri({...o.computedPosition,...o.dimensions}))}return Hi(t)}function Fi(e,t,n={x:0,y:0,zoom:1},o=!1,i=!1){const r={...Vi(t,n),width:t.width/n.zoom,height:t.height/n.zoom},a=[];for(const l of e){const{dimensions:e,selectable:t=!0,hidden:n=!1}=l,u=e.width??l.width??null,s=e.height??l.height??null;if(i&&!t||n)continue;const c=Si(r,Ei(l));(null===u||null===s||o&&c>0||c>=(u??0)*(s??0)||l.dragging)&&a.push(l)}return a}function Xi(e,t){const n=/* @__PURE__ */new Set;if("string"==typeof e)n.add(e);else if(e.length>=1)for(const o of e)n.add(o.id);return t.filter(e=>n.has(e.source)||n.has(e.target))}function Ui(e,t){if("number"==typeof e)return Math.floor(.5*(t-t/(1+e)));if("string"==typeof e&&e.endsWith("px")){const t=Number.parseFloat(e);if(!Number.isNaN(t))return Math.floor(t)}if("string"==typeof e&&e.endsWith("%")){const n=Number.parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return Ar(`The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function Zi(e,t,n,o,i,r=.1){const a=function(e,t,n){if("string"==typeof e||"number"==typeof e){const o=Ui(e,n),i=Ui(e,t);return{top:o,right:i,bottom:o,left:i,x:2*i,y:2*o}}if("object"==typeof e){const o=Ui(e.top??e.y??0,n),i=Ui(e.bottom??e.y??0,n),r=Ui(e.left??e.x??0,t),a=Ui(e.right??e.x??0,t);return{top:o,right:a,bottom:i,left:r,x:r+a,y:o+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}(r,t,n),l=(t-a.x)/e.width,u=(n-a.y)/e.height,s=ki(Math.min(l,u),o,i),c=t/2-(e.x+e.width/2)*s,d=n/2-(e.y+e.height/2)*s,f=function(e,t,n,o,i,r){const{x:a,y:l}=Bi(e,{x:t,y:n,zoom:o}),{x:u,y:s}=Bi({x:e.x+e.width,y:e.y+e.height},{x:t,y:n,zoom:o}),c=i-u,d=r-s;return{left:Math.floor(a),top:Math.floor(l),right:Math.floor(c),bottom:Math.floor(d)}}(e,c,d,s,t,n),v=Math.min(f.left-a.left,0),h=Math.min(f.top-a.top,0);return{x:c-v+Math.min(f.right-a.right,0),y:d-h+Math.min(f.bottom-a.bottom,0),zoom:s}}function ji(e,t){if(!e.parentNode)return!1;const n=t.get(e.parentNode);return!!n&&(!!n.selected||ji(n,t))}function Wi(e,t){if(void 0===e)return"";if("string"==typeof e)return e;return`${t?`${t}__`:""}${Object.keys(e).sort().map(t=>`${t}=${e[t]}`).join("&")}`}function Ki(e){const t=e.ctrlKey&&_r()?10:1;return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*t}function qi(e,t,n){return e<t?ki(Math.abs(e-t),1,t)/t:e>n?-ki(Math.abs(e-n),1,t)/t:0}function Ji(e,t,n=15,o=40){return[qi(e.x,o,t.width-o)*n,qi(e.y,o,t.height-o)*n]}function Qi(e,t){if(t){const n=e.position.x+e.dimensions.width-t.dimensions.width,o=e.position.y+e.dimensions.height-t.dimensions.height;if(n>0||o>0||e.position.x<0||e.position.y<0){let i={};if("function"==typeof t.style?i={...t.style(t)}:t.style&&(i={...t.style}),i.width=i.width??`${t.dimensions.width}px`,i.height=i.height??`${t.dimensions.height}px`,n>0)if("string"==typeof i.width){const e=Number(i.width.replace("px",""));i.width=`${e+n}px`}else i.width+=n;if(o>0)if("string"==typeof i.height){const e=Number(i.height.replace("px",""));i.height=`${e+o}px`}else i.height+=o;if(e.position.x<0){const n=Math.abs(e.position.x);if(t.position.x=t.position.x-n,"string"==typeof i.width){const e=Number(i.width.replace("px",""));i.width=`${e+n}px`}else i.width+=n;e.position.x=0}if(e.position.y<0){const n=Math.abs(e.position.y);if(t.position.y=t.position.y-n,"string"==typeof i.height){const e=Number(i.height.replace("px",""));i.height=`${e+n}px`}else i.height+=n;e.position.y=0}t.dimensions.width=Number(i.width.toString().replace("px","")),t.dimensions.height=Number(i.height.toString().replace("px","")),"function"==typeof t.style?t.style=e=>({...(0,t.style)(e),...i}):t.style={...t.style,...i}}}}function er(e,t){var n,o;const i=e.filter(e=>"add"===e.type||"remove"===e.type);for(const a of i)if("add"===a.type){-1===t.findIndex(e=>e.id===a.item.id)&&t.push(a.item)}else if("remove"===a.type){const e=t.findIndex(e=>e.id===a.id);-1!==e&&t.splice(e,1)}const r=t.map(e=>e.id);for(const a of t)for(const i of e)if(i.id===a.id)switch(i.type){case"select":a.selected=i.selected;break;case"position":if(Ti(a)&&(void 0!==i.position&&(a.position=i.position),void 0!==i.dragging&&(a.dragging=i.dragging),a.expandParent&&a.parentNode)){const e=t[r.indexOf(a.parentNode)];e&&Ti(e)&&Qi(a,e)}break;case"dimensions":if(Ti(a)&&(void 0!==i.dimensions&&(a.dimensions=i.dimensions),void 0!==i.updateStyle&&i.updateStyle&&(a.style={...a.style||{},width:`${null==(n=i.dimensions)?void 0:n.width}px`,height:`${null==(o=i.dimensions)?void 0:o.height}px`}),void 0!==i.resizing&&(a.resizing=i.resizing),a.expandParent&&a.parentNode)){const e=t[r.indexOf(a.parentNode)];if(e&&Ti(e)){!!e.dimensions.width&&!!e.dimensions.height?Qi(a,e):I(()=>{Qi(a,e)})}}}return t}function tr(e,t){return{id:e,type:"select",selected:t}}function nr(e){return{item:e,type:"add"}}function or(e){return{id:e,type:"remove"}}function ir(e,t,n,o,i){return{id:e,source:t,target:n,sourceHandle:o||null,targetHandle:i||null,type:"remove"}}function rr(e,t=/* @__PURE__ */new Set,n=!1){const o=[];for(const[i,r]of e){const e=t.has(i);void 0===r.selected&&!e||r.selected===e||(n&&(r.selected=e),o.push(tr(r.id,e)))}return o}const ar=()=>{};function lr(e){const t=/* @__PURE__ */new Set;let n=ar,o=()=>!1;const i=()=>t.size>0||o(),r=e=>{t.delete(e)};return{on:e=>{t.add(e);const n=()=>r(e);return ne(n),{off:n}},off:r,trigger:o=>{const r=[n];return i()?r.push(...t):e&&r.push(e),Promise.allSettled(r.map(e=>e(o)))},hasListeners:i,listeners:t,setEmitter:e=>{n=e},removeEmitter:()=>{n=ar},setHasEmitListeners:e=>{o=e},removeHasEmitListeners:()=>{o=()=>!1}}}function ur(e,t,n){let o=e;do{if(o&&o.matches(t))return!0;if(o===n)return!1;o=o.parentElement}while(o);return!1}function sr({id:e,dragItems:t,findNode:n}){const o=[];for(const i of t){const e=n(i.id);e&&o.push(e)}return[e?o.find(t=>t.id===e):o[0],o]}function cr(e){if(Array.isArray(e))switch(e.length){case 1:return[e[0],e[0],e[0],e[0]];case 2:return[e[0],e[1],e[0],e[1]];case 3:return[e[0],e[1],e[2],e[1]];case 4:return e;default:return[0,0,0,0]}return[e,e,e,e]}function dr(e,t,n,o){let i=e.extent||n;if("parent"!==i&&(Array.isArray(i)||"parent"!==(null==i?void 0:i.range))||e.expandParent){if(Array.isArray(i)){const e=(null==o?void 0:o.computedPosition.x)||0,t=(null==o?void 0:o.computedPosition.y)||0;i=[[i[0][0]+e,i[0][1]+t],[i[1][0]+e,i[1][1]+t]]}else if("parent"!==i&&(null==i?void 0:i.range)&&Array.isArray(i.range)){const[e,t,n,r]=cr(i.padding),a=(null==o?void 0:o.computedPosition.x)||0,l=(null==o?void 0:o.computedPosition.y)||0;i=[[i.range[0][0]+a+r,i.range[0][1]+l+e],[i.range[1][0]+a-t,i.range[1][1]+l-n]]}}else if(e.parentNode&&o&&e.dimensions.width&&e.dimensions.height){const e=function(e,t,n){const[o,i,r,a]="string"!=typeof e?cr(e.padding):[0,0,0,0];return!(!n||void 0===n.computedPosition.x||void 0===n.computedPosition.y||void 0===n.dimensions.width||void 0===n.dimensions.height)&&[[n.computedPosition.x+a,n.computedPosition.y+o],[n.computedPosition.x+n.dimensions.width-i,n.computedPosition.y+n.dimensions.height-r]]}(i,0,o);e&&(i=e)}else t(new wr(mr.NODE_EXTENT_INVALID,e.id)),i=n;return"parent"===i?[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]]:i}function fr(e,t,n,o,i){const r=Mi(t,function({width:e,height:t},n){return[n[0],[n[1][0]-(e||0),n[1][1]-(t||0)]]}(e.dimensions,dr(e,n,o,i)));return{position:{x:r.x-((null==i?void 0:i.computedPosition.x)||0),y:r.y-((null==i?void 0:i.computedPosition.y)||0)},computedPosition:r}}function vr(e,t,n=li.Left,o=!1){const i=((null==t?void 0:t.x)??0)+e.computedPosition.x,r=((null==t?void 0:t.y)??0)+e.computedPosition.y,{width:a,height:l}=t??function(e){var t,n;return{width:(null==(t=e.dimensions)?void 0:t.width)??e.width??0,height:(null==(n=e.dimensions)?void 0:n.height)??e.height??0}}(e);if(o)return{x:i+a/2,y:r+l/2};switch((null==t?void 0:t.position)??n){case li.Top:return{x:i+a/2,y:r};case li.Right:return{x:i+a,y:r+l/2};case li.Bottom:return{x:i+a/2,y:r+l};case li.Left:return{x:i,y:r+l/2}}}function hr(e,t){return e&&(t?e.find(e=>e.id===t):e[0])||null}function pr({sourcePos:e,targetPos:t,sourceWidth:n,sourceHeight:o,targetWidth:i,targetHeight:r,width:a,height:l,viewport:u}){const s={x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x+n,t.x+i),y2:Math.max(e.y+o,t.y+r)};s.x===s.x2&&(s.x2+=1),s.y===s.y2&&(s.y2+=1);const c=Ri({x:(0-u.x)/u.zoom,y:(0-u.y)/u.zoom,width:a/u.zoom,height:l/u.zoom}),d=Math.max(0,Math.min(c.x2,s.x2)-Math.max(c.x,s.x)),f=Math.max(0,Math.min(c.y2,s.y2)-Math.max(c.y,s.y));return Math.ceil(d*f)>0}function gr(e,t,n=!1){const o="number"==typeof e.zIndex;let i=o?e.zIndex:0;const r=t(e.source),a=t(e.target);return r&&a?(n&&(i=o?e.zIndex:Math.max(r.computedPosition.z||0,a.computedPosition.z||0)),i):0}var mr=/* @__PURE__ */(e=>(e.MISSING_STYLES="MISSING_STYLES",e.MISSING_VIEWPORT_DIMENSIONS="MISSING_VIEWPORT_DIMENSIONS",e.NODE_INVALID="NODE_INVALID",e.NODE_NOT_FOUND="NODE_NOT_FOUND",e.NODE_MISSING_PARENT="NODE_MISSING_PARENT",e.NODE_TYPE_MISSING="NODE_TYPE_MISSING",e.NODE_EXTENT_INVALID="NODE_EXTENT_INVALID",e.EDGE_INVALID="EDGE_INVALID",e.EDGE_NOT_FOUND="EDGE_NOT_FOUND",e.EDGE_SOURCE_MISSING="EDGE_SOURCE_MISSING",e.EDGE_TARGET_MISSING="EDGE_TARGET_MISSING",e.EDGE_TYPE_MISSING="EDGE_TYPE_MISSING",e.EDGE_SOURCE_TARGET_SAME="EDGE_SOURCE_TARGET_SAME",e.EDGE_SOURCE_TARGET_MISSING="EDGE_SOURCE_TARGET_MISSING",e.EDGE_ORPHANED="EDGE_ORPHANED",e.USEVUEFLOW_OPTIONS="USEVUEFLOW_OPTIONS",e))(mr||{});const yr={MISSING_STYLES:()=>"It seems that you haven't loaded the necessary styles. Please import '@vue-flow/core/dist/style.css' to ensure that the graph is rendered correctly",MISSING_VIEWPORT_DIMENSIONS:()=>"The Vue Flow parent container needs a width and a height to render the graph",NODE_INVALID:e=>`Node is invalid\nNode: ${e}`,NODE_NOT_FOUND:e=>`Node not found\nNode: ${e}`,NODE_MISSING_PARENT:(e,t)=>`Node is missing a parent\nNode: ${e}\nParent: ${t}`,NODE_TYPE_MISSING:e=>`Node type is missing\nType: ${e}`,NODE_EXTENT_INVALID:e=>`Only child nodes can use a parent extent\nNode: ${e}`,EDGE_INVALID:e=>`An edge needs a source and a target\nEdge: ${e}`,EDGE_SOURCE_MISSING:(e,t)=>`Edge source is missing\nEdge: ${e} \nSource: ${t}`,EDGE_TARGET_MISSING:(e,t)=>`Edge target is missing\nEdge: ${e} \nTarget: ${t}`,EDGE_TYPE_MISSING:e=>`Edge type is missing\nType: ${e}`,EDGE_SOURCE_TARGET_SAME:(e,t,n)=>`Edge source and target are the same\nEdge: ${e} \nSource: ${t} \nTarget: ${n}`,EDGE_SOURCE_TARGET_MISSING:(e,t,n)=>`Edge source or target is missing\nEdge: ${e} \nSource: ${t} \nTarget: ${n}`,EDGE_ORPHANED:e=>`Edge was orphaned (suddenly missing source or target) and has been removed\nEdge: ${e}`,EDGE_NOT_FOUND:e=>`Edge not found\nEdge: ${e}`,USEVUEFLOW_OPTIONS:()=>"The options parameter is deprecated and will be removed in the next major version. Please use the id parameter instead"};class wr extends Error{constructor(e,...t){var n;super(null==(n=yr[e])?void 0:n.call(yr,...t)),this.name="VueFlowError",this.code=e,this.args=t}}function xr(e){return"clientX"in e}function br(e,t){let n,o;return xr(e)?(n=e.clientX,o=e.clientY):"touches"in e&&e.touches.length>0?(n=e.touches[0].clientX,o=e.touches[0].clientY):"changedTouches"in e&&e.changedTouches.length>0?(n=e.changedTouches[0].clientX,o=e.changedTouches[0].clientY):(n=0,o=0),{x:n-((null==t?void 0:t.left)??0),y:o-((null==t?void 0:t.top)??0)}}const _r=()=>{var e;return"undefined"!=typeof navigator&&(null==(e=null==navigator?void 0:navigator.userAgent)?void 0:e.indexOf("Mac"))>=0};function Er(e,t=[1,1]){return{x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}}const Sr=()=>!0;function Nr(e){null==e||e.classList.remove("valid","connecting","vue-flow__handle-valid","vue-flow__handle-connecting")}function kr(e,t,n,o){var i,r;let a=[],l=Number.POSITIVE_INFINITY;const u=function(e,t,n){const o=[],i={x:e.x-n,y:e.y-n,width:2*n,height:2*n};for(const r of t.values())Si(i,Ei(r))>0&&o.push(r);return o}(e,n,t+250);for(const s of u){const n=[...(null==(i=s.handleBounds)?void 0:i.source)??[],...(null==(r=s.handleBounds)?void 0:r.target)??[]];for(const i of n){if(o.nodeId===i.nodeId&&o.type===i.type&&o.id===i.id)continue;const{x:n,y:r}=vr(s,i,i.position,!0),u=Math.sqrt((n-e.x)**2+(r-e.y)**2);u>t||(u<l?(a=[{...i,x:n,y:r}],l=u):u===l&&a.push({...i,x:n,y:r}))}}if(!a.length)return null;if(a.length>1){const e="source"===o.type?"target":"source";return a.find(t=>t.type===e)??a[0]}return a[0]}function Mr(e,{handle:t,connectionMode:n,fromNodeId:o,fromHandleId:i,fromType:r,doc:a,lib:l,flowId:u,isValidConnection:s=Sr},c,d,f,v){const h="target"===r,p=t?a.querySelector(`.${l}-flow__handle[data-id="${u}-${null==t?void 0:t.nodeId}-${null==t?void 0:t.id}-${null==t?void 0:t.type}"]`):null,{x:g,y:m}=br(e),y=a.elementFromPoint(g,m),w=(null==y?void 0:y.classList.contains(`${l}-flow__handle`))?y:p,x={handleDomNode:w,isValid:!1,connection:null,toHandle:null};if(w){const e=Cr(void 0,w),t=w.getAttribute("data-nodeid"),r=w.getAttribute("data-handleid"),a=w.classList.contains("connectable"),l=w.classList.contains("connectableend");if(!t||!e)return x;const u={source:h?t:o,sourceHandle:h?r:i,target:h?o:t,targetHandle:h?i:r};x.connection=u;const p=a&&l&&(n===ci.Strict?h&&"source"===e||!h&&"target"===e:t!==o||r!==i);x.isValid=p&&s(u,{nodes:d,edges:c,sourceNode:f(u.source),targetNode:f(u.target)}),x.toHandle=Ir(t,e,r,v,n,!0)}return x}function Cr(e,t){return e||((null==t?void 0:t.classList.contains("target"))?"target":(null==t?void 0:t.classList.contains("source"))?"source":null)}function Ir(e,t,n,o,i,r=!1){var a,l,u;const s=o.get(e);if(!s)return null;const c=i===ci.Strict?null==(a=s.handleBounds)?void 0:a[t]:[...(null==(l=s.handleBounds)?void 0:l.source)??[],...(null==(u=s.handleBounds)?void 0:u.target)??[]],d=(n?null==c?void 0:c.find(e=>e.id===n):null==c?void 0:c[0])??null;return d&&r?{...d,...vr(s,d,d.position,!0)}:d}const Pr={[li.Left]:li.Right,[li.Right]:li.Left,[li.Top]:li.Bottom,[li.Bottom]:li.Top},Tr=["production","prod"];function Ar(e,...t){$r()&&console.warn(`[Vue Flow]: ${e}`,...t)}function $r(){return!Tr.includes(process.env.NODE_ENV||"")}function Dr(e,t,n,o,i){const r=t.querySelectorAll(`.vue-flow__handle.${e}`);return(null==r?void 0:r.length)?Array.from(r).map(t=>{const r=t.getBoundingClientRect();return{id:t.getAttribute("data-handleid"),type:e,nodeId:i,position:t.getAttribute("data-handlepos"),x:(r.left-n.left)/o,y:(r.top-n.top)/o,...Ni(t)}}):null}function Or(e,t,n,o,i,r=!1,a){i.value=!1,e.selected?(r||e.selected&&t)&&(o([e]),I(()=>{a.blur()})):n([e])}function zr(e){return void 0!==p(e)}function Br(e,t,n,o){if(!e||!e.source||!e.target)return n(new wr(mr.EDGE_INVALID,(null==e?void 0:e.id)??"[ID UNKNOWN]")),!1;let i;return i=Ii(e)?e:{...e,id:zi(e)},i=Di(i,void 0,o),!function(e,t){return t.some(t=>Ii(t)&&t.source===e.source&&t.target===e.target&&(t.sourceHandle===e.sourceHandle||!t.sourceHandle&&!e.sourceHandle)&&(t.targetHandle===e.targetHandle||!t.targetHandle&&!e.targetHandle))}(i,t)&&i}function Vr(e,t,n){const o={},i=[];for(let r=0;r<e.length;++r){const a=e[r];if(!Pi(a)){n(new wr(mr.NODE_INVALID,null==a?void 0:a.id)||`[ID UNKNOWN|INDEX ${r}]`);continue}const l=$i(a,t(a.id),a.parentNode);a.parentNode&&(o[a.parentNode]=!0),i[r]=l}for(const r of i){const e=t(r.parentNode)||i.find(e=>e.id===r.parentNode);r.parentNode&&!e&&n(new wr(mr.NODE_MISSING_PARENT,r.id,r.parentNode)),(r.parentNode||o[r.id])&&(o[r.id]&&(r.isParent=!0),e&&(e.isParent=!0))}return i}function Lr(e,t,n,o,i,r){let a=i;const l=o.get(a)||/* @__PURE__ */new Map;o.set(a,l.set(n,t)),a=`${i}-${e}`;const u=o.get(a)||/* @__PURE__ */new Map;if(o.set(a,u.set(n,t)),r){a=`${i}-${e}-${r}`;const l=o.get(a)||/* @__PURE__ */new Map;o.set(a,l.set(n,t))}}function Rr(e,t,n){e.clear();for(const o of n){const{source:t,target:n,sourceHandle:i=null,targetHandle:r=null}=o,a={edgeId:o.id,source:t,target:n,sourceHandle:i,targetHandle:r},l=`${t}-${i}--${n}-${r}`;Lr("source",a,`${n}-${r}--${t}-${i}`,e,t,i),Lr("target",a,l,e,n,r)}}function Hr(e,t,n){if(!n)return;const o=[];for(const i of e.keys())t.has(i)||o.push(e.get(i));o.length&&n(o)}function Yr(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function Gr(e,t,n,o,i,r,a,l){const u=[];for(const s of e){const e=Ii(s)?s:Br(s,l,i,r);if(!e)continue;const c=n(e.source),d=n(e.target);if(!c||!d){i(new wr(mr.EDGE_SOURCE_TARGET_MISSING,e.id,e.source,e.target));continue}if(!c){i(new wr(mr.EDGE_SOURCE_MISSING,e.id,e.source));continue}if(!d){i(new wr(mr.EDGE_TARGET_MISSING,e.id,e.target));continue}if(t){if(!t(e,{edges:l,nodes:a,sourceNode:c,targetNode:d})){i(new wr(mr.EDGE_INVALID,e.id));continue}}const f=o(e.id);u.push({...Di(e,f,r),sourceNode:c,targetNode:d})}return u}const Fr=Symbol("vueFlow"),Xr=Symbol("nodeId"),Ur=Symbol("nodeRef"),Zr=Symbol("edgeId"),jr=Symbol("edgeRef"),Wr=Symbol("slots");function Kr(e){const{vueFlowRef:t,snapToGrid:n,snapGrid:o,noDragClassName:r,nodeLookup:a,nodeExtent:l,nodeDragThreshold:u,viewport:s,autoPanOnNodeDrag:c,autoPanSpeed:d,nodesDraggable:f,panBy:v,findNode:h,multiSelectionActive:p,nodesSelectionActive:g,selectNodesOnDrag:m,removeSelectedElements:y,addSelectedNodes:w,updateNodePositions:x,emits:b}=Za(),{onStart:_,onDrag:E,onStop:S,onClick:N,el:k,disabled:M,id:C,selectable:I,dragHandle:P}=e,T=H(!1);let A,$=[],D=null,z={x:void 0,y:void 0},B={x:0,y:0},V=null,L=!1,R=!1,Y=0,G=!1;const F=function(){const{viewport:e,snapGrid:t,snapToGrid:n,vueFlowRef:o}=Za();return i=>{var r;const a=(null==(r=o.value)?void 0:r.getBoundingClientRect())??{left:0,top:0},l=function(e){return"sourceEvent"in e}(i)?i.sourceEvent:i,{x:u,y:s}=br(l,a),c=Vi({x:u,y:s},e.value),{x:d,y:f}=n.value?Er(c,t.value):c;return{xSnapped:d,ySnapped:f,...c}}}(),X=({x:e,y:t})=>{z={x:e,y:t};let i=!1;if($=$.map(r=>{const a={x:e-r.distance.x,y:t-r.distance.y},{computedPosition:u}=fr(r,n.value?Er(a,o.value):a,b.error,l.value,r.parentNode?h(r.parentNode):void 0);return i=i||r.position.x!==u.x||r.position.y!==u.y,r.position=u,r}),R=R||i,i&&(x($,!0,!0),T.value=!0,V)){const[e,t]=sr({id:C,dragItems:$,findNode:h});E({event:V,node:e,nodes:t})}},U=()=>{if(!D)return;const[e,t]=Ji(B,D,d.value);if(0!==e||0!==t){const n={x:(z.x??0)-e/s.value.zoom,y:(z.y??0)-t/s.value.zoom};v({x:e,y:t})&&X(n)}Y=requestAnimationFrame(U)},Z=(e,t)=>{L=!0;const n=h(C);m.value||p.value||!n||n.selected||y(),n&&O(I)&&m.value&&Or(n,p.value,w,y,g,!1,t);const o=F(e.sourceEvent);if(z=o,$=function(e,t,n,o){var i,r;const a=/* @__PURE__ */new Map;for(const[l,u]of e)!u.selected&&u.id!==o||u.parentNode&&ji(u,e)||!(u.draggable||t&&void 0===u.draggable)||e.get(l)&&a.set(l,{id:u.id,position:u.position||{x:0,y:0},distance:{x:n.x-(null==(i=u.computedPosition)?void 0:i.x)||0,y:n.y-(null==(r=u.computedPosition)?void 0:r.y)||0},from:{x:u.computedPosition.x,y:u.computedPosition.y},extent:u.extent,parentNode:u.parentNode,dimensions:{...u.dimensions},expandParent:u.expandParent});return Array.from(a.values())}(a.value,f.value,o,C),$.length){const[t,n]=sr({id:C,dragItems:$,findNode:h});_({event:e.sourceEvent,node:t,nodes:n})}};return i([()=>O(M),k],([e,n],o,i)=>{if(n){const o=zt(n);e||(A=function(){var e,t,n,o,i=Ut,r=Zt,a=jt,l=Wt,u={},s=xe("start","drag","end"),c=0,d=0;function f(e){e.on("mousedown.drag",v).filter(l).on("touchstart.drag",g).on("touchmove.drag",m,Vt).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(a,l){if(!o&&i.call(this,a,l)){var u=w(this,r.call(this,a,l),a,l,"mouse");u&&(zt(a.view).on("mousemove.drag",h,Lt).on("mouseup.drag",p,Lt),Yt(a.view),Rt(a),n=!1,e=a.clientX,t=a.clientY,u("start",a))}}function h(o){if(Ht(o),!n){var i=o.clientX-e,r=o.clientY-t;n=i*i+r*r>d}u.mouse("drag",o)}function p(e){zt(e.view).on("mousemove.drag mouseup.drag",null),Gt(e.view,n),Ht(e),u.mouse("end",e)}function g(e,t){if(i.call(this,e,t)){var n,o,a=e.changedTouches,l=r.call(this,e,t),u=a.length;for(n=0;n<u;++n)(o=w(this,l,e,t,a[n].identifier,a[n]))&&(Rt(e),o("start",e,a[n]))}}function m(e){var t,n,o=e.changedTouches,i=o.length;for(t=0;t<i;++t)(n=u[o[t].identifier])&&(Ht(e),n("drag",e,o[t]))}function y(e){var t,n,i=e.changedTouches,r=i.length;for(o&&clearTimeout(o),o=setTimeout(function(){o=null},500),t=0;t<r;++t)(n=u[i[t].identifier])&&(Rt(e),n("end",e,i[t]))}function w(e,t,n,o,i,r){var l,d,v,h=s.copy(),p=Bt(r||n,t);if(null!=(v=a.call(e,new Xt("beforestart",{sourceEvent:n,target:f,identifier:i,active:c,x:p[0],y:p[1],dx:0,dy:0,dispatch:h}),o)))return l=v.x-p[0]||0,d=v.y-p[1]||0,function n(r,a,s){var g,m=p;switch(r){case"start":u[i]=n,g=c++;break;case"end":delete u[i],--c;case"drag":p=Bt(s||a,t),g=c}h.call(r,e,new Xt(r,{sourceEvent:a,subject:v,target:f,identifier:i,active:g,x:p[0]+l,y:p[1]+d,dx:p[0]-m[0],dy:p[1]-m[1],dispatch:h}),o)}}return f.filter=function(e){return arguments.length?(i="function"==typeof e?e:Ft(!!e),f):i},f.container=function(e){return arguments.length?(r="function"==typeof e?e:Ft(e),f):r},f.subject=function(e){return arguments.length?(a="function"==typeof e?e:Ft(e),f):a},f.touchable=function(e){return arguments.length?(l="function"==typeof e?e:Ft(!!e),f):l},f.on=function(){var e=s.on.apply(s,arguments);return e===s?f:e},f.clickDistance=function(e){return arguments.length?(d=(e=+e)*e,f):Math.sqrt(d)},f}().on("start",e=>((e,n)=>{var o;"touchmove"===e.sourceEvent.type&&e.sourceEvent.touches.length>1||(R=!1,0===u.value&&Z(e,n),z=F(e.sourceEvent),D=(null==(o=t.value)?void 0:o.getBoundingClientRect())||null,B=br(e.sourceEvent,D))})(e,n)).on("drag",e=>((e,t)=>{const n=F(e.sourceEvent);if(!G&&L&&c.value&&(G=!0,U()),!L){const o=n.xSnapped-(z.x??0),i=n.ySnapped-(z.y??0);Math.sqrt(o*o+i*i)>u.value&&Z(e,t)}(z.x!==n.xSnapped||z.y!==n.ySnapped)&&$.length&&L&&(V=e.sourceEvent,B=br(e.sourceEvent,D),X(n))})(e,n)).on("end",e=>(e=>{let t=!1;if(!L&&!T.value&&!p.value){const n=e.sourceEvent,o=F(n),i=o.xSnapped-(z.x??0),r=o.ySnapped-(z.y??0),a=Math.sqrt(i*i+r*r);0!==a&&a<=u.value&&(null==N||N(n),t=!0)}if($.length&&!t){R&&(x($,!1,!1),R=!1);const[t,n]=sr({id:C,dragItems:$,findNode:h});S({event:e.sourceEvent,node:t,nodes:n})}$=[],T.value=!1,G=!1,L=!1,z={x:void 0,y:void 0},cancelAnimationFrame(Y)})(e)).filter(e=>{const t=e.target,o=O(P);return!e.button&&(!r.value||!ur(t,`.${r.value}`,n)&&(!o||ur(t,o,n)))}),o.call(A)),i(()=>{o.on(".drag",null),A&&(A.on("start",null),A.on("drag",null),A.on("end",null))})}}),T}function qr(e,t){const n={doubleClick:lr(),click:lr(),mouseEnter:lr(),mouseMove:lr(),mouseLeave:lr(),contextMenu:lr(),updateStart:lr(),update:lr(),updateEnd:lr()};return n.doubleClick.on(n=>{var o,i;t.edgeDoubleClick(n),null==(i=null==(o=e.events)?void 0:o.doubleClick)||i.call(o,n)}),n.click.on(n=>{var o,i;t.edgeClick(n),null==(i=null==(o=e.events)?void 0:o.click)||i.call(o,n)}),n.mouseEnter.on(n=>{var o,i;t.edgeMouseEnter(n),null==(i=null==(o=e.events)?void 0:o.mouseEnter)||i.call(o,n)}),n.mouseMove.on(n=>{var o,i;t.edgeMouseMove(n),null==(i=null==(o=e.events)?void 0:o.mouseMove)||i.call(o,n)}),n.mouseLeave.on(n=>{var o,i;t.edgeMouseLeave(n),null==(i=null==(o=e.events)?void 0:o.mouseLeave)||i.call(o,n)}),n.contextMenu.on(n=>{var o,i;t.edgeContextMenu(n),null==(i=null==(o=e.events)?void 0:o.contextMenu)||i.call(o,n)}),n.updateStart.on(n=>{var o,i;t.edgeUpdateStart(n),null==(i=null==(o=e.events)?void 0:o.updateStart)||i.call(o,n)}),n.update.on(n=>{var o,i;t.edgeUpdate(n),null==(i=null==(o=e.events)?void 0:o.update)||i.call(o,n)}),n.updateEnd.on(n=>{var o,i;t.edgeUpdateEnd(n),null==(i=null==(o=e.events)?void 0:o.updateEnd)||i.call(o,n)}),Object.entries(n).reduce((e,[t,n])=>(e.emit[t]=n.trigger,e.on[t]=n.on,e),{emit:{},on:{}})}function Jr(){return!0}function Qr({handleId:e,nodeId:t,type:n,isValidConnection:o,edgeUpdaterType:i,onEdgeUpdate:r,onEdgeUpdateEnd:a}){const{id:l,vueFlowRef:u,connectionMode:s,connectionRadius:c,connectOnClick:d,connectionClickStartHandle:f,nodesConnectable:v,autoPanOnConnect:h,autoPanSpeed:p,findNode:g,panBy:m,startConnection:y,updateConnection:w,endConnection:x,emits:b,viewport:_,edges:E,nodes:S,isValidConnection:N,nodeLookup:k}=Za();let M=null,C=!1,I=null;return{handlePointerDown:function(d){var f;const v="target"===O(n),P=xr(d),T=Ci(d.target),A=d.currentTarget;if(A&&(P&&0===d.button||!P)){let n=function(n){F=br(n,H),D=kr(Vi(F,_.value,!1,[1,1]),c.value,k.value,Z),X||(U(),X=!0);const o=Mr(n,{handle:D,connectionMode:s.value,fromNodeId:O(t),fromHandleId:O(e),fromType:v?"target":"source",isValidConnection:z,doc:T,lib:"vue",flowId:l,nodeLookup:k.value},E.value,S.value,g,k.value);I=o.handleDomNode,M=o.connection,C=function(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}(!!D,o.isValid);const i={...K,isValid:C,to:o.toHandle&&C?Bi({x:o.toHandle.x,y:o.toHandle.y},_.value):F,toHandle:o.toHandle,toPosition:C&&o.toHandle?o.toHandle.position:Pr[Z.position],toNode:o.toHandle?k.value.get(o.toHandle.nodeId):null};if(C&&D&&(null==K?void 0:K.toHandle)&&i.toHandle&&K.toHandle.type===i.toHandle.type&&K.toHandle.nodeId===i.toHandle.nodeId&&K.toHandle.id===i.toHandle.id&&K.to.x===i.to.x&&K.to.y===i.to.y)return;const r=D??o.toHandle;if(w(r&&C?Bi({x:r.x,y:r.y},_.value):F,o.toHandle,function(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}(!!r,C)),K=i,!D&&!C&&!I)return Nr(G);M&&M.source!==M.target&&I&&(Nr(G),G=I,I.classList.add("connecting","vue-flow__handle-connecting"),I.classList.toggle("valid",!!C),I.classList.toggle("vue-flow__handle-valid",!!C))},P=function(e){"touches"in e&&e.touches.length>0||((D||I)&&M&&C&&(r?r(e,M):b.connect(M)),b.connectEnd(e),i&&(null==a||a(e)),Nr(G),cancelAnimationFrame(B),x(e),X=!1,C=!1,M=null,I=null,T.removeEventListener("mousemove",n),T.removeEventListener("mouseup",P),T.removeEventListener("touchmove",n),T.removeEventListener("touchend",P))};const $=g(O(t));let D,z=O(o)||N.value||Jr;!z&&$&&(z=(v?$.isValidSourcePos:$.isValidTargetPos)||Jr);let B=0;const{x:V,y:L}=br(d),R=Cr(O(i),A),H=null==(f=u.value)?void 0:f.getBoundingClientRect();if(!H||!R)return;const Y=Ir(O(t),R,O(e),k.value,s.value);if(!Y)return;let G,F=br(d,H),X=!1;const U=()=>{if(!h.value)return;const[e,t]=Ji(F,H,p.value);m({x:e,y:t}),B=requestAnimationFrame(U)},Z={...Y,nodeId:O(t),type:R,position:Y.position},j=k.value.get(O(t)),W={inProgress:!0,isValid:null,from:vr(j,Z,li.Left,!0),fromHandle:Z,fromPosition:Z.position,fromNode:j,to:F,toHandle:null,toPosition:Pr[Z.position],toNode:null};y({nodeId:O(t),id:O(e),type:R,position:(null==A?void 0:A.getAttribute("data-handlepos"))||li.Top,...F},{x:V-H.left,y:L-H.top}),b.connectStart({event:d,nodeId:O(t),handleId:O(e),handleType:R});let K=W;T.addEventListener("mousemove",n),T.addEventListener("mouseup",P),T.addEventListener("touchmove",n),T.addEventListener("touchend",P)}},handleClick:function(i){var r,a;if(!d.value)return;const u="target"===O(n);if(!f.value)return b.clickConnectStart({event:i,nodeId:O(t),handleId:O(e)}),void y({nodeId:O(t),type:O(n),id:O(e),position:li.Top,...br(i)},void 0,!0);let c=O(o)||N.value||Jr;const h=g(O(t));if(!c&&h&&(c=(u?h.isValidSourcePos:h.isValidTargetPos)||Jr),h&&!1===(void 0===h.connectable?v.value:h.connectable))return;const p=Ci(i.target),m=Mr(i,{handle:{nodeId:O(t),id:O(e),type:O(n),position:li.Top,...br(i)},connectionMode:s.value,fromNodeId:f.value.nodeId,fromHandleId:f.value.id??null,fromType:f.value.type,isValidConnection:c,doc:p,lib:"vue",flowId:l,nodeLookup:k.value},E.value,S.value,g,k.value),w=(null==(r=m.connection)?void 0:r.source)===(null==(a=m.connection)?void 0:a.target);m.isValid&&m.connection&&!w&&b.connect(m.connection),b.clickConnectEnd(i),x(i,!0)}}}function ea(){return n(Xr,"")}function ta(e){const t=e??ea()??"",o=n(Ur,g(null)),{findNode:i,edges:r,emits:a}=Za(),l=i(t);return l||a.error(new wr(mr.NODE_NOT_FOUND,t)),{id:t,nodeEl:o,node:l,parentNode:u(()=>i(l.parentNode)),connectedEdges:u(()=>Xi([l],r.value))}}function na(e,t){const n={doubleClick:lr(),click:lr(),mouseEnter:lr(),mouseMove:lr(),mouseLeave:lr(),contextMenu:lr(),dragStart:lr(),drag:lr(),dragStop:lr()};return n.doubleClick.on(n=>{var o,i;t.nodeDoubleClick(n),null==(i=null==(o=e.events)?void 0:o.doubleClick)||i.call(o,n)}),n.click.on(n=>{var o,i;t.nodeClick(n),null==(i=null==(o=e.events)?void 0:o.click)||i.call(o,n)}),n.mouseEnter.on(n=>{var o,i;t.nodeMouseEnter(n),null==(i=null==(o=e.events)?void 0:o.mouseEnter)||i.call(o,n)}),n.mouseMove.on(n=>{var o,i;t.nodeMouseMove(n),null==(i=null==(o=e.events)?void 0:o.mouseMove)||i.call(o,n)}),n.mouseLeave.on(n=>{var o,i;t.nodeMouseLeave(n),null==(i=null==(o=e.events)?void 0:o.mouseLeave)||i.call(o,n)}),n.contextMenu.on(n=>{var o,i;t.nodeContextMenu(n),null==(i=null==(o=e.events)?void 0:o.contextMenu)||i.call(o,n)}),n.dragStart.on(n=>{var o,i;t.nodeDragStart(n),null==(i=null==(o=e.events)?void 0:o.dragStart)||i.call(o,n)}),n.drag.on(n=>{var o,i;t.nodeDrag(n),null==(i=null==(o=e.events)?void 0:o.drag)||i.call(o,n)}),n.dragStop.on(n=>{var o,i;t.nodeDragStop(n),null==(i=null==(o=e.events)?void 0:o.dragStop)||i.call(o,n)}),Object.entries(n).reduce((e,[t,n])=>(e.emit[t]=n.trigger,e.on[t]=n.on,e),{emit:{},on:{}})}function oa(){const{getSelectedNodes:e,nodeExtent:t,updateNodePositions:n,findNode:o,snapGrid:i,snapToGrid:r,nodesDraggable:a,emits:l}=Za();return(u,s=!1)=>{const c=r.value?i.value[0]:5,d=r.value?i.value[1]:5,f=s?4:1,v=u.x*c*f,h=u.y*d*f,p=[];for(const n of e.value)if(n.draggable||a&&void 0===n.draggable){const e={x:n.computedPosition.x+v,y:n.computedPosition.y+h},{position:i}=fr(n,e,l.error,t.value,n.parentNode?o(n.parentNode):void 0);p.push({id:n.id,position:i,from:n.position,distance:{x:u.x,y:u.y},dimensions:n.dimensions})}n(p,!0,!1)}}const ia=.1,ra=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2;function aa(){return Ar("Viewport not initialized yet."),Promise.resolve(!1)}const la={zoomIn:aa,zoomOut:aa,zoomTo:aa,fitView:aa,setCenter:aa,fitBounds:aa,project:e=>e,screenToFlowCoordinate:e=>e,flowToScreenCoordinate:e=>e,setViewport:aa,setTransform:aa,getViewport:()=>({x:0,y:0,zoom:1}),getTransform:()=>({x:0,y:0,zoom:1}),viewportInitialized:!1};function ua(e,t=0,n=ra,o=()=>{}){const i="number"==typeof t&&t>0;return i||o(),i?e.transition().duration(t).ease(n).on("end",o):e}function sa(e,t,n){const r=o(!0);return r.run(()=>{r.run(()=>{let t,o,i=!(!n.nodes.value.length&&!n.edges.value.length);t=ce([e.modelValue,()=>{var t,n;return null==(n=null==(t=e.modelValue)?void 0:t.value)?void 0:n.length}],([e])=>{e&&Array.isArray(e)&&(null==o||o.pause(),n.setElements(e),o||i||!e.length?null==o||o.resume():i=!0)}),o=ce([n.nodes,n.edges,()=>n.edges.value.length,()=>n.nodes.value.length],([n,o])=>{var i;(null==(i=e.modelValue)?void 0:i.value)&&Array.isArray(e.modelValue.value)&&(null==t||t.pause(),e.modelValue.value=[...n,...o],I(()=>{null==t||t.resume()}))},{immediate:i}),s(()=>{null==t||t.stop(),null==o||o.stop()})}),r.run(()=>{let t,o,i=!!n.nodes.value.length;t=ce([e.nodes,()=>{var t,n;return null==(n=null==(t=e.nodes)?void 0:t.value)?void 0:n.length}],([e])=>{e&&Array.isArray(e)&&(null==o||o.pause(),n.setNodes(e),o||i||!e.length?null==o||o.resume():i=!0)}),o=ce([n.nodes,()=>n.nodes.value.length],([n])=>{var o;(null==(o=e.nodes)?void 0:o.value)&&Array.isArray(e.nodes.value)&&(null==t||t.pause(),e.nodes.value=[...n],I(()=>{null==t||t.resume()}))},{immediate:i}),s(()=>{null==t||t.stop(),null==o||o.stop()})}),r.run(()=>{let t,o,i=!!n.edges.value.length;t=ce([e.edges,()=>{var t,n;return null==(n=null==(t=e.edges)?void 0:t.value)?void 0:n.length}],([e])=>{e&&Array.isArray(e)&&(null==o||o.pause(),n.setEdges(e),o||i||!e.length?null==o||o.resume():i=!0)}),o=ce([n.edges,()=>n.edges.value.length],([n])=>{var o;(null==(o=e.edges)?void 0:o.value)&&Array.isArray(e.edges.value)&&(null==t||t.pause(),e.edges.value=[...n],I(()=>{null==t||t.resume()}))},{immediate:i}),s(()=>{null==t||t.stop(),null==o||o.stop()})}),r.run(()=>{i(()=>t.minZoom,()=>{t.minZoom&&zr(t.minZoom)&&n.setMinZoom(t.minZoom)},{immediate:!0})}),r.run(()=>{i(()=>t.maxZoom,()=>{t.maxZoom&&zr(t.maxZoom)&&n.setMaxZoom(t.maxZoom)},{immediate:!0})}),r.run(()=>{i(()=>t.translateExtent,()=>{t.translateExtent&&zr(t.translateExtent)&&n.setTranslateExtent(t.translateExtent)},{immediate:!0})}),r.run(()=>{i(()=>t.nodeExtent,()=>{t.nodeExtent&&zr(t.nodeExtent)&&n.setNodeExtent(t.nodeExtent)},{immediate:!0})}),r.run(()=>{i(()=>t.applyDefault,()=>{zr(t.applyDefault)&&(n.applyDefault.value=t.applyDefault)},{immediate:!0})}),r.run(()=>{const e=async e=>{let o=e;"function"==typeof t.autoConnect&&(o=await t.autoConnect(e)),!1!==o&&n.addEdges([o])};i(()=>t.autoConnect,()=>{zr(t.autoConnect)&&(n.autoConnect.value=t.autoConnect)},{immediate:!0}),i(n.autoConnect,(t,o,i)=>{t?n.onConnect(e):n.hooks.value.connect.off(e),i(()=>{n.hooks.value.connect.off(e)})},{immediate:!0})}),(()=>{const e=["id","modelValue","translateExtent","nodeExtent","edges","nodes","maxZoom","minZoom","applyDefault","autoConnect"];for(const o of Object.keys(t)){const a=o;if(!e.includes(a)){const e=N(()=>t[a]),o=n[a];d(o)&&r.run(()=>{i(e,e=>{zr(e)&&(o.value=e)},{immediate:!0})})}}})()}),()=>r.stop()}function ca(){return{vueFlowRef:null,viewportRef:null,nodes:[],edges:[],connectionLookup:/* @__PURE__ */new Map,nodeTypes:{},edgeTypes:{},initialized:!1,dimensions:{width:0,height:0},viewport:{x:0,y:0,zoom:1},d3Zoom:null,d3Selection:null,d3ZoomHandler:null,minZoom:.5,maxZoom:2,translateExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],nodeExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],selectionMode:ui.Full,paneDragging:!1,preventScrolling:!0,zoomOnScroll:!0,zoomOnPinch:!0,zoomOnDoubleClick:!0,panOnScroll:!1,panOnScrollSpeed:.5,panOnScrollMode:fi.Free,paneClickDistance:0,panOnDrag:!0,edgeUpdaterRadius:10,onlyRenderVisibleElements:!1,defaultViewport:{x:0,y:0,zoom:1},nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,defaultMarkerColor:"#b1b1b7",connectionLineStyle:{},connectionLineType:null,connectionLineOptions:{type:si.Bezier,style:{}},connectionMode:ci.Loose,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectionPosition:{x:Number.NaN,y:Number.NaN},connectionRadius:20,connectOnClick:!0,connectionStatus:null,isValidConnection:null,snapGrid:[15,15],snapToGrid:!1,edgesUpdatable:!1,edgesFocusable:!0,nodesFocusable:!0,nodesConnectable:!0,nodesDraggable:!0,nodeDragThreshold:1,elementsSelectable:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,selectionKeyCode:"Shift",multiSelectionKeyCode:_r()?"Meta":"Control",zoomActivationKeyCode:_r()?"Meta":"Control",deleteKeyCode:"Backspace",panActivationKeyCode:"Space",hooks:{edgesChange:lr(),nodesChange:lr(),nodeDoubleClick:lr(),nodeClick:lr(),nodeMouseEnter:lr(),nodeMouseMove:lr(),nodeMouseLeave:lr(),nodeContextMenu:lr(),nodeDragStart:lr(),nodeDrag:lr(),nodeDragStop:lr(),nodesInitialized:lr(),miniMapNodeClick:lr(),miniMapNodeDoubleClick:lr(),miniMapNodeMouseEnter:lr(),miniMapNodeMouseMove:lr(),miniMapNodeMouseLeave:lr(),connect:lr(),connectStart:lr(),connectEnd:lr(),clickConnectStart:lr(),clickConnectEnd:lr(),paneReady:lr(),init:lr(),move:lr(),moveStart:lr(),moveEnd:lr(),selectionDragStart:lr(),selectionDrag:lr(),selectionDragStop:lr(),selectionContextMenu:lr(),selectionStart:lr(),selectionEnd:lr(),viewportChangeStart:lr(),viewportChange:lr(),viewportChangeEnd:lr(),paneScroll:lr(),paneClick:lr(),paneContextMenu:lr(),paneMouseEnter:lr(),paneMouseMove:lr(),paneMouseLeave:lr(),edgeContextMenu:lr(),edgeMouseEnter:lr(),edgeMouseMove:lr(),edgeMouseLeave:lr(),edgeDoubleClick:lr(),edgeClick:lr(),edgeUpdateStart:lr(),edgeUpdate:lr(),edgeUpdateEnd:lr(),updateNodeInternals:lr(),error:lr(e=>Ar(e.message))},applyDefault:!0,autoConnect:!1,fitViewOnInit:!1,fitViewOnInitDone:!1,noDragClassName:"nodrag",noWheelClassName:"nowheel",noPanClassName:"nopan",defaultEdgeOptions:void 0,elevateEdgesOnSelect:!1,elevateNodesOnSelect:!0,autoPanOnNodeDrag:!0,autoPanOnConnect:!0,autoPanSpeed:15,disableKeyboardA11y:!1,ariaLiveMessage:""}}const da=["id","vueFlowRef","viewportRef","initialized","modelValue","nodes","edges","maxZoom","minZoom","translateExtent","hooks","defaultEdgeOptions"];function fa(e,t,n){const o=function(e){function t(t,n){return new Promise(o=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.interpolate("linear"===(null==n?void 0:n.interpolate)?Gn:Jn).scaleBy(ua(e.d3Selection,null==n?void 0:n.duration,null==n?void 0:n.ease,()=>{o(!0)}),t):o(!1)})}function n(t,n,o,i){return new Promise(r=>{var a;const{x:l,y:u}=Mi({x:-t,y:-n},e.translateExtent),s=Jo.translate(-l,-u).scale(o);e.d3Selection&&e.d3Zoom?null==(a=e.d3Zoom)||a.interpolate("linear"===(null==i?void 0:i.interpolate)?Gn:Jn).transform(ua(e.d3Selection,null==i?void 0:i.duration,null==i?void 0:i.ease,()=>{r(!0)}),s):r(!1)})}return u(()=>e.d3Zoom&&e.d3Selection&&e.dimensions.width&&e.dimensions.height?{viewportInitialized:!0,zoomIn:e=>t(1.2,e),zoomOut:e=>t(1/1.2,e),zoomTo:(t,n)=>new Promise(o=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.interpolate("linear"===(null==n?void 0:n.interpolate)?Gn:Jn).scaleTo(ua(e.d3Selection,null==n?void 0:n.duration,null==n?void 0:n.ease,()=>{o(!0)}),t):o(!1)}),setViewport:(e,t)=>n(e.x,e.y,e.zoom,t),setTransform:(e,t)=>n(e.x,e.y,e.zoom,t),getViewport:()=>({x:e.viewport.x,y:e.viewport.y,zoom:e.viewport.zoom}),getTransform:()=>({x:e.viewport.x,y:e.viewport.y,zoom:e.viewport.zoom}),fitView:(t={padding:ia,includeHiddenNodes:!1,duration:0})=>{var o,i;const r=[];for(const n of e.nodes)n.dimensions.width&&n.dimensions.height&&((null==t?void 0:t.includeHiddenNodes)||!n.hidden)&&(!(null==(o=t.nodes)?void 0:o.length)||(null==(i=t.nodes)?void 0:i.length)&&t.nodes.includes(n.id))&&r.push(n);if(!r.length)return Promise.resolve(!1);const a=Gi(r),{x:l,y:u,zoom:s}=Zi(a,e.dimensions.width,e.dimensions.height,t.minZoom??e.minZoom,t.maxZoom??e.maxZoom,t.padding??ia);return n(l,u,s,t)},setCenter:(t,o,i)=>{const r=void 0!==(null==i?void 0:i.zoom)?i.zoom:e.maxZoom;return n(e.dimensions.width/2-t*r,e.dimensions.height/2-o*r,r,i)},fitBounds:(t,o={padding:ia})=>{const{x:i,y:r,zoom:a}=Zi(t,e.dimensions.width,e.dimensions.height,e.minZoom,e.maxZoom,o.padding??ia);return n(i,r,a,o)},project:t=>Vi(t,e.viewport,e.snapToGrid,e.snapGrid),screenToFlowCoordinate:t=>{if(e.vueFlowRef){const{x:n,y:o}=e.vueFlowRef.getBoundingClientRect();return Vi({x:t.x-n,y:t.y-o},e.viewport,e.snapToGrid,e.snapGrid)}return{x:0,y:0}},flowToScreenCoordinate:t=>{if(e.vueFlowRef){const{x:n,y:o}=e.vueFlowRef.getBoundingClientRect();return Bi({x:t.x+n,y:t.y+o},e.viewport)}return{x:0,y:0}}}:la)}(e),i=t=>{const n=t??[];e.hooks.updateNodeInternals.trigger(n)},r=t=>Xi(t,e.edges),a=e=>{if(e)return t.value.get(e)},l=e=>{if(e)return n.value.get(e)},s=(o,i)=>{const r=/* @__PURE__ */new Set,a=/* @__PURE__ */new Set;for(const e of o)Pi(e)?r.add(e.id):Ii(e)&&a.add(e.id);const l=rr(t.value,r,!0),u=rr(n.value,a);if(e.multiSelectionActive){for(const e of r)l.push(tr(e,i));for(const e of a)u.push(tr(e,i))}l.length&&e.hooks.nodesChange.trigger(l),u.length&&e.hooks.edgesChange.trigger(u)},c=t=>{var n;null==(n=e.d3Zoom)||n.scaleExtent([t,e.maxZoom]),e.minZoom=t},d=t=>{var n;null==(n=e.d3Zoom)||n.scaleExtent([e.minZoom,t]),e.maxZoom=t},f=t=>{var n;null==(n=e.d3Zoom)||n.translateExtent(t),e.translateExtent=t},v=t=>{const n=t instanceof Function?t(e.nodes):t;(e.initialized||n.length)&&(e.nodes=Vr(n,a,e.hooks.error.trigger))},h=t=>{const o=t instanceof Function?t(e.edges):t;if(!e.initialized&&!o.length)return;const i=Gr(o,e.isValidConnection,a,l,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges);Rr(e.connectionLookup,n.value,i),e.edges=i},p=t=>{const n=t instanceof Function?t([...e.nodes,...e.edges]):t;(e.initialized||n.length)&&(v(n.filter(Pi)),h(n.filter(Ii)))},g=e=>{const t=Ai((n=e).width)&&Ai(n.height)&&Ai(n.x)&&Ai(n.y);var n;const o=t?null:Ti(e)?e:a(e.id);if(!t&&!o)return[null,null,t];return[t?e:Ei(o),o,t]},m=t=>{const n=t instanceof Function?t(e):t,o=["d3Zoom","d3Selection","d3ZoomHandler","viewportRef","vueFlowRef","dimensions","hooks"];zr(n.defaultEdgeOptions)&&(e.defaultEdgeOptions=n.defaultEdgeOptions);const i=n.modelValue||n.nodes||n.edges?[]:void 0;i&&(n.modelValue&&i.push(...n.modelValue),n.nodes&&i.push(...n.nodes),n.edges&&i.push(...n.edges),p(i));for(const r of Object.keys(n)){const t=r,i=n[t];![...da,...o].includes(t)&&zr(i)&&(e[t]=i)}ve(()=>e.d3Zoom).not.toBeNull().then(()=>{zr(n.maxZoom)&&d(n.maxZoom),zr(n.minZoom)&&c(n.minZoom),zr(n.translateExtent)&&f(n.translateExtent)}),e.initialized||(e.initialized=!0)};return{updateNodePositions:(t,n,o)=>{var i,r;const l=[];for(const e of t){const t={id:e.id,type:"position",dragging:o,from:e.from};if(n&&(t.position=e.position,e.parentNode)){const n=a(e.parentNode);t.position={x:t.position.x-((null==(i=null==n?void 0:n.computedPosition)?void 0:i.x)??0),y:t.position.y-((null==(r=null==n?void 0:n.computedPosition)?void 0:r.y)??0)}}l.push(t)}(null==l?void 0:l.length)&&e.hooks.nodesChange.trigger(l)},updateNodeDimensions:t=>{if(!e.vueFlowRef)return;const n=e.vueFlowRef.querySelector(".vue-flow__transformationpane");if(!n)return;const i=window.getComputedStyle(n),{m22:r}=new window.DOMMatrixReadOnly(i.transform),l=[];for(const e of t){const t=e,n=a(t.id);if(n){const e=Ni(t.nodeElement);if(!(!e.width||!e.height||n.dimensions.width===e.width&&n.dimensions.height===e.height&&!t.forceUpdate)){const o=t.nodeElement.getBoundingClientRect();n.dimensions=e,n.handleBounds.source=Dr("source",t.nodeElement,o,r,n.id),n.handleBounds.target=Dr("target",t.nodeElement,o,r,n.id),l.push({id:n.id,type:"dimensions",dimensions:e})}}}!e.fitViewOnInitDone&&e.fitViewOnInit&&o.value.fitView().then(()=>{e.fitViewOnInitDone=!0}),l.length&&e.hooks.nodesChange.trigger(l)},setElements:p,setNodes:v,setEdges:h,addNodes:t=>{let n=t instanceof Function?t(e.nodes):t;n=Array.isArray(n)?n:[n];const o=Vr(n,a,e.hooks.error.trigger),i=[];for(const e of o)i.push(nr(e));i.length&&e.hooks.nodesChange.trigger(i)},addEdges:t=>{let n=t instanceof Function?t(e.edges):t;n=Array.isArray(n)?n:[n];const o=Gr(n,e.isValidConnection,a,l,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges),i=[];for(const e of o)i.push(nr(e));i.length&&e.hooks.edgesChange.trigger(i)},removeNodes:(t,n=!0,o=!1)=>{const i=t instanceof Function?t(e.nodes):t,l=Array.isArray(i)?i:[i],u=[],s=[];function c(e){const t=r(e);for(const n of t)zr(n.deletable)&&!n.deletable||s.push(ir(n.id,n.source,n.target,n.sourceHandle,n.targetHandle))}function d(t){const o=[];for(const n of e.nodes)n.parentNode===t&&o.push(n);if(o.length){for(const e of o)u.push(or(e.id));n&&c(o);for(const e of o)d(e.id)}}for(const e of l){const t="string"==typeof e?a(e):e;t&&(zr(t.deletable)&&!t.deletable||(u.push(or(t.id)),n&&c([t]),o&&d(t.id)))}s.length&&e.hooks.edgesChange.trigger(s),u.length&&e.hooks.nodesChange.trigger(u)},removeEdges:t=>{const n=t instanceof Function?t(e.edges):t,o=Array.isArray(n)?n:[n],i=[];for(const e of o){const t="string"==typeof e?l(e):e;t&&(zr(t.deletable)&&!t.deletable||i.push(ir("string"==typeof e?e:e.id,t.source,t.target,t.sourceHandle,t.targetHandle)))}e.hooks.edgesChange.trigger(i)},findNode:a,findEdge:l,updateEdge:(t,o,i=!0)=>{const r=l(t.id);if(!r)return!1;const u=e.edges.indexOf(r),s=function(e,t,n,o,i){if(!t.source||!t.target)return i(new wr(mr.EDGE_INVALID,e.id)),!1;if(!n)return i(new wr(mr.EDGE_NOT_FOUND,e.id)),!1;const{id:r,...a}=e;return{...a,id:o?zi(t):r,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle}}(t,o,r,i,e.hooks.error.trigger);if(s){const[t]=Gr([s],e.isValidConnection,a,l,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges);return e.edges=e.edges.map((e,n)=>n===u?t:e),Rr(e.connectionLookup,n.value,[t]),t}return!1},updateEdgeData:(e,t,n={replace:!1})=>{const o=l(e);if(!o)return;const i="function"==typeof t?t(o):t;o.data=n.replace?i:{...o.data,...i}},updateNode:(t,n,o={replace:!1})=>{const i=a(t);if(!i)return;const r="function"==typeof n?n(i):n;o.replace?e.nodes.splice(e.nodes.indexOf(i),1,r):Object.assign(i,r)},updateNodeData:(e,t,n={replace:!1})=>{const o=a(e);if(!o)return;const i="function"==typeof t?t(o):t;o.data=n.replace?i:{...o.data,...i}},applyEdgeChanges:t=>{const o=er(t,e.edges);return Rr(e.connectionLookup,n.value,o),o},applyNodeChanges:t=>er(t,e.nodes),addSelectedElements:e=>{s(e,!0)},addSelectedNodes:o=>{if(e.multiSelectionActive){const t=o.map(e=>tr(e.id,!0));return void e.hooks.nodesChange.trigger(t)}e.hooks.nodesChange.trigger(rr(t.value,new Set(o.map(e=>e.id)),!0)),e.hooks.edgesChange.trigger(rr(n.value))},addSelectedEdges:o=>{if(e.multiSelectionActive){const t=o.map(e=>tr(e.id,!0));return void e.hooks.edgesChange.trigger(t)}e.hooks.edgesChange.trigger(rr(n.value,new Set(o.map(e=>e.id)))),e.hooks.nodesChange.trigger(rr(t.value,/* @__PURE__ */new Set,!0))},setMinZoom:c,setMaxZoom:d,setTranslateExtent:f,setNodeExtent:t=>{e.nodeExtent=t,i()},setPaneClickDistance:t=>{var n;null==(n=e.d3Zoom)||n.clickDistance(t)},removeSelectedElements:t=>{if(!t||!t.length)return s([],!1);const n=t.reduce((e,t)=>{const n=tr(t.id,!1);return Pi(t)?e.nodes.push(n):e.edges.push(n),e},{nodes:[],edges:[]});n.nodes.length&&e.hooks.nodesChange.trigger(n.nodes),n.edges.length&&e.hooks.edgesChange.trigger(n.edges)},removeSelectedNodes:t=>{const n=(t||e.nodes).map(e=>(e.selected=!1,tr(e.id,!1)));e.hooks.nodesChange.trigger(n)},removeSelectedEdges:t=>{const n=(t||e.edges).map(e=>(e.selected=!1,tr(e.id,!1)));e.hooks.edgesChange.trigger(n)},startConnection:(t,n,o=!1)=>{o?e.connectionClickStartHandle=t:e.connectionStartHandle=t,e.connectionEndHandle=null,e.connectionStatus=null,n&&(e.connectionPosition=n)},updateConnection:(t,n=null,o=null)=>{e.connectionStartHandle&&(e.connectionPosition=t,e.connectionEndHandle=n,e.connectionStatus=o)},endConnection:(t,n)=>{e.connectionPosition={x:Number.NaN,y:Number.NaN},e.connectionEndHandle=null,e.connectionStatus=null,n?e.connectionClickStartHandle=null:e.connectionStartHandle=null},setInteractive:t=>{e.nodesDraggable=t,e.nodesConnectable=t,e.elementsSelectable=t},setState:m,getIntersectingNodes:(t,n=!0,o=e.nodes)=>{const[i,r,a]=g(t);if(!i)return[];const l=[];for(const u of o||e.nodes){if(!(a||u.id!==r.id&&u.computedPosition))continue;const e=Ei(u),t=Si(e,i);(n&&t>0||t>=e.width*e.height||t>=Number(i.width)*Number(i.height))&&l.push(u)}return l},getIncomers:t=>function(...e){if(3===e.length){const[t,n,o]=e;return Oi(t,n,o,"source")}const[t,n]=e,o="string"==typeof t?t:t.id;return n.filter(e=>Ii(e)&&e.target===o).map(e=>n.find(t=>Pi(t)&&t.id===e.source))}(t,e.nodes,e.edges),getOutgoers:t=>function(...e){if(3===e.length){const[t,n,o]=e;return Oi(t,n,o,"target")}const[t,n]=e,o="string"==typeof t?t:t.id;return n.filter(e=>Ii(e)&&e.source===o).map(e=>n.find(t=>Pi(t)&&t.id===e.target))}(t,e.nodes,e.edges),getConnectedEdges:r,getHandleConnections:({id:t,type:n,nodeId:o})=>{var i;const r=t?`-${n}-${t}`:`-${n}`;return Array.from((null==(i=e.connectionLookup.get(`${o}${r}`))?void 0:i.values())??[])},isNodeIntersecting:(e,t,n=!0)=>{const[o]=g(e);if(!o)return!1;const i=Si(o,t);return n&&i>0||i>=Number(o.width)*Number(o.height)},panBy:t=>{const{viewport:n,dimensions:o,d3Zoom:i,d3Selection:r,translateExtent:a}=e;if(!i||!r||!t.x&&!t.y)return!1;const l=Jo.translate(n.x+t.x,n.y+t.y).scale(n.zoom),u=[[0,0],[o.width,o.height]],s=i.constrain()(l,u,a),c=e.viewport.x!==s.x||e.viewport.y!==s.y||e.viewport.zoom!==s.k;return i.transform(r,s),c},fitView:e=>o.value.fitView(e),zoomIn:e=>o.value.zoomIn(e),zoomOut:e=>o.value.zoomOut(e),zoomTo:(e,t)=>o.value.zoomTo(e,t),setViewport:(e,t)=>o.value.setViewport(e,t),setTransform:(e,t)=>o.value.setTransform(e,t),getViewport:()=>o.value.getViewport(),getTransform:()=>o.value.getTransform(),setCenter:(e,t,n)=>o.value.setCenter(e,t,n),fitBounds:(e,t)=>o.value.fitBounds(e,t),project:e=>o.value.project(e),screenToFlowCoordinate:e=>o.value.screenToFlowCoordinate(e),flowToScreenCoordinate:e=>o.value.flowToScreenCoordinate(e),toObject:()=>{const t=[],n=[];for(const o of e.nodes){const{computedPosition:e,handleBounds:n,selected:i,dimensions:r,isParent:a,resizing:l,dragging:u,events:s,...c}=o;t.push(c)}for(const o of e.edges){const{selected:e,sourceNode:t,targetNode:i,events:r,...a}=o;n.push(a)}return JSON.parse(JSON.stringify({nodes:t,edges:n,position:[e.viewport.x,e.viewport.y],zoom:e.viewport.zoom,viewport:e.viewport}))},fromObject:t=>new Promise(n=>{const{nodes:i,edges:r,position:a,zoom:l,viewport:u}=t;i&&v(i),r&&h(r);const[s,c]=(null==u?void 0:u.x)&&(null==u?void 0:u.y)?[u.x,u.y]:a??[null,null];if(s&&c){const t=(null==u?void 0:u.zoom)||l||e.viewport.zoom;return ve(()=>o.value.viewportInitialized).toBe(!0).then(()=>{o.value.setViewport({x:s,y:c,zoom:t}).then(()=>{n(!0)})})}n(!0)}),updateNodeInternals:i,viewportHelper:o,$reset:()=>{const t=ca();if(e.edges=[],e.nodes=[],e.d3Zoom&&e.d3Selection){const n=Jo.translate(t.defaultViewport.x??0,t.defaultViewport.y??0).scale(ki(t.defaultViewport.zoom??1,t.minZoom,t.maxZoom)),o=e.viewportRef.getBoundingClientRect(),i=[[0,0],[o.width,o.height]],r=e.d3Zoom.constrain()(n,i,t.translateExtent);e.d3Zoom.transform(e.d3Selection,r)}m(t)},$destroy:()=>{}}}const va=["data-id","data-handleid","data-nodeid","data-handlepos"],ha=/* @__PURE__ */c({name:"Handle",compatConfig:{MODE:3},props:{id:{default:null},type:{},position:{default:()=>li.Top},isValidConnection:{type:Function},connectable:{type:[Boolean,Number,String,Function],default:void 0},connectableStart:{type:Boolean,default:!0},connectableEnd:{type:Boolean,default:!0}},setup(e,{expose:t}){const n=S(e,["position","connectable","connectableStart","connectableEnd","id"]),o=N(()=>n.type??"source"),i=N(()=>n.isValidConnection??null),{id:r,connectionStartHandle:a,connectionClickStartHandle:l,connectionEndHandle:s,vueFlowRef:c,nodesConnectable:d,noDragClassName:f,noPanClassName:v}=Za(),{id:h,node:m,nodeEl:x,connectedEdges:b}=ta(),_=g(),E=N(()=>void 0===e.connectableStart||e.connectableStart),I=N(()=>void 0===e.connectableEnd||e.connectableEnd),P=N(()=>{var t,n,i,r,l,u;return(null==(t=a.value)?void 0:t.nodeId)===h&&(null==(n=a.value)?void 0:n.id)===e.id&&(null==(i=a.value)?void 0:i.type)===o.value||(null==(r=s.value)?void 0:r.nodeId)===h&&(null==(l=s.value)?void 0:l.id)===e.id&&(null==(u=s.value)?void 0:u.type)===o.value}),T=N(()=>{var t,n,i;return(null==(t=l.value)?void 0:t.nodeId)===h&&(null==(n=l.value)?void 0:n.id)===e.id&&(null==(i=l.value)?void 0:i.type)===o.value}),{handlePointerDown:A,handleClick:$}=Qr({nodeId:h,handleId:e.id,isValidConnection:i,type:o}),D=u(()=>"string"==typeof e.connectable&&"single"===e.connectable?!b.value.some(t=>{const n=t[`${o.value}Handle`];return t[o.value]===h&&(!n||n===e.id)}):"number"==typeof e.connectable?b.value.filter(t=>{const n=t[`${o.value}Handle`];return t[o.value]===h&&(!n||n===e.id)}).length<e.connectable:"function"==typeof e.connectable?e.connectable(m,b.value):zr(e.connectable)?e.connectable:d.value);function O(e){const t=xr(e);D.value&&E.value&&(t&&0===e.button||!t)&&A(e)}function z(e){h&&(l.value||E.value)&&D.value&&$(e)}return k(()=>{var t;if(!m.dimensions.width||!m.dimensions.height)return;const n=null==(t=m.handleBounds[o.value])?void 0:t.find(t=>t.id===e.id);if(!c.value||n)return;const i=c.value.querySelector(".vue-flow__transformationpane");if(!(x.value&&_.value&&i&&e.id))return;const r=x.value.getBoundingClientRect(),a=_.value.getBoundingClientRect(),l=window.getComputedStyle(i),{m22:u}=new window.DOMMatrixReadOnly(l.transform),s={id:e.id,position:e.position,x:(a.left-r.left)/u,y:(a.top-r.top)/u,type:o.value,nodeId:h,...Ni(_.value)};m.handleBounds[o.value]=[...m.handleBounds[o.value]??[],s]}),t({handleClick:$,handlePointerDown:A,onClick:z,onPointerDown:O}),(t,n)=>(w(),y("div",{ref_key:"handle",ref:_,"data-id":`${p(r)}-${p(h)}-${e.id}-${o.value}`,"data-handleid":e.id,"data-nodeid":p(h),"data-handlepos":t.position,class:M(["vue-flow__handle",[`vue-flow__handle-${t.position}`,`vue-flow__handle-${e.id}`,p(f),p(v),o.value,{connectable:D.value,connecting:T.value,connectablestart:E.value,connectableend:I.value,connectionindicator:D.value&&(E.value&&!P.value||I.value&&P.value)}]]),onMousedown:O,onTouchstartPassive:O,onClick:z},[C(t.$slots,"default",{id:t.id})],42,va))}}),pa=function({sourcePosition:t=li.Bottom,targetPosition:n=li.Top,label:o,connectable:i=!0,isValidTargetPos:r,isValidSourcePos:a,data:l}){const u=l.label??o;return[e(ha,{type:"target",position:n,connectable:i,isValidConnection:r}),"string"!=typeof u&&u?e(u):e(h,[u]),e(ha,{type:"source",position:t,connectable:i,isValidConnection:a})]};pa.props=["sourcePosition","targetPosition","label","isValidTargetPos","isValidSourcePos","connectable","data"],pa.inheritAttrs=!1,pa.compatConfig={MODE:3};const ga=pa,ma=function({targetPosition:t=li.Top,label:n,connectable:o=!0,isValidTargetPos:i,data:r}){const a=r.label??n;return[e(ha,{type:"target",position:t,connectable:o,isValidConnection:i}),"string"!=typeof a&&a?e(a):e(h,[a])]};ma.props=["targetPosition","label","isValidTargetPos","connectable","data"],ma.inheritAttrs=!1,ma.compatConfig={MODE:3};const ya=ma,wa=function({sourcePosition:t=li.Bottom,label:n,connectable:o=!0,isValidSourcePos:i,data:r}){const a=r.label??n;return["string"!=typeof a&&a?e(a):e(h,[a]),e(ha,{type:"source",position:t,connectable:o,isValidConnection:i})]};wa.props=["sourcePosition","label","isValidSourcePos","connectable","data"],wa.inheritAttrs=!1,wa.compatConfig={MODE:3};const xa=wa,ba=["transform"],_a=["width","height","x","y","rx","ry"],Ea=["y"],Sa=/* @__PURE__ */c({name:"EdgeText",compatConfig:{MODE:3},props:{x:{},y:{},label:{},labelStyle:{default:()=>({})},labelShowBg:{type:Boolean,default:!0},labelBgStyle:{default:()=>({})},labelBgPadding:{default:()=>[2,4]},labelBgBorderRadius:{default:2}},setup(e){const t=g({x:0,y:0,width:0,height:0}),n=g(null),o=u(()=>`translate(${e.x-t.value.width/2} ${e.y-t.value.height/2})`);function r(){if(!n.value)return;const e=n.value.getBBox();e.width===t.value.width&&e.height===t.value.height||(t.value=e)}return k(r),i([()=>e.x,()=>e.y,n,()=>e.label],r),(e,i)=>(w(),y("g",{transform:o.value,class:"vue-flow__edge-textwrapper"},[e.labelShowBg?(w(),y("rect",{key:0,class:"vue-flow__edge-textbg",width:`${t.value.width+2*e.labelBgPadding[0]}px`,height:`${t.value.height+2*e.labelBgPadding[1]}px`,x:-e.labelBgPadding[0],y:-e.labelBgPadding[1],style:P(e.labelBgStyle),rx:e.labelBgBorderRadius,ry:e.labelBgBorderRadius},null,12,_a)):b("",!0),x("text",E(e.$attrs,{ref_key:"el",ref:n,class:"vue-flow__edge-text",y:t.value.height/2,dy:"0.3em",style:e.labelStyle}),[C(e.$slots,"default",{},()=>["string"!=typeof e.label?(w(),_(T(e.label),{key:0})):(w(),y(h,{key:1},[A($(e.label),1)],64))])],16,Ea)],8,ba))}}),Na=["id","d","marker-end","marker-start"],ka=["d","stroke-width"],Ma=/* @__PURE__ */c({name:"BaseEdge",inheritAttrs:!1,compatConfig:{MODE:3},props:{id:{},labelX:{},labelY:{},path:{},label:{},markerStart:{},markerEnd:{},interactionWidth:{default:20},labelStyle:{},labelShowBg:{type:Boolean},labelBgStyle:{},labelBgPadding:{},labelBgBorderRadius:{}},setup(e,{expose:t}){const n=g(null),o=g(null),i=g(null),r=m();return t({pathEl:n,interactionEl:o,labelEl:i}),(e,t)=>(w(),y(h,null,[x("path",E(p(r),{id:e.id,ref_key:"pathEl",ref:n,d:e.path,class:"vue-flow__edge-path","marker-end":e.markerEnd,"marker-start":e.markerStart}),null,16,Na),e.interactionWidth?(w(),y("path",{key:0,ref_key:"interactionEl",ref:o,fill:"none",d:e.path,"stroke-width":e.interactionWidth,"stroke-opacity":0,class:"vue-flow__edge-interaction"},null,8,ka)):b("",!0),e.label&&e.labelX&&e.labelY?(w(),_(Sa,{key:1,ref_key:"labelEl",ref:i,x:e.labelX,y:e.labelY,label:e.label,"label-show-bg":e.labelShowBg,"label-bg-style":e.labelBgStyle,"label-bg-padding":e.labelBgPadding,"label-bg-border-radius":e.labelBgBorderRadius,"label-style":e.labelStyle},null,8,["x","y","label","label-show-bg","label-bg-style","label-bg-padding","label-bg-border-radius","label-style"])):b("",!0)],64))}});function Ca({sourceX:e,sourceY:t,targetX:n,targetY:o}){const i=Math.abs(n-e)/2,r=n<e?n+i:n-i,a=Math.abs(o-t)/2;return[r,o<t?o+a:o-a,i,a]}function Ia({sourceX:e,sourceY:t,targetX:n,targetY:o,sourceControlX:i,sourceControlY:r,targetControlX:a,targetControlY:l}){const u=.125*e+.375*i+.375*a+.125*n,s=.125*t+.375*r+.375*l+.125*o;return[u,s,Math.abs(u-e),Math.abs(s-t)]}function Pa(e,t){return e>=0?.5*e:25*t*Math.sqrt(-e)}function Ta({pos:e,x1:t,y1:n,x2:o,y2:i,c:r}){let a,l;switch(e){case li.Left:a=t-Pa(t-o,r),l=n;break;case li.Right:a=t+Pa(o-t,r),l=n;break;case li.Top:a=t,l=n-Pa(n-i,r);break;case li.Bottom:a=t,l=n+Pa(i-n,r)}return[a,l]}function Aa(e){const{sourceX:t,sourceY:n,sourcePosition:o=li.Bottom,targetX:i,targetY:r,targetPosition:a=li.Top,curvature:l=.25}=e,[u,s]=Ta({pos:o,x1:t,y1:n,x2:i,y2:r,c:l}),[c,d]=Ta({pos:a,x1:i,y1:r,x2:t,y2:n,c:l}),[f,v,h,p]=Ia({sourceX:t,sourceY:n,targetX:i,targetY:r,sourceControlX:u,sourceControlY:s,targetControlX:c,targetControlY:d});return[`M${t},${n} C${u},${s} ${c},${d} ${i},${r}`,f,v,h,p]}function $a({pos:e,x1:t,y1:n,x2:o,y2:i}){let r,a;switch(e){case li.Left:case li.Right:r=.5*(t+o),a=n;break;case li.Top:case li.Bottom:r=t,a=.5*(n+i)}return[r,a]}function Da(e){const{sourceX:t,sourceY:n,sourcePosition:o=li.Bottom,targetX:i,targetY:r,targetPosition:a=li.Top}=e,[l,u]=$a({pos:o,x1:t,y1:n,x2:i,y2:r}),[s,c]=$a({pos:a,x1:i,y1:r,x2:t,y2:n}),[d,f,v,h]=Ia({sourceX:t,sourceY:n,targetX:i,targetY:r,sourceControlX:l,sourceControlY:u,targetControlX:s,targetControlY:c});return[`M${t},${n} C${l},${u} ${s},${c} ${i},${r}`,d,f,v,h]}const Oa={[li.Left]:{x:-1,y:0},[li.Right]:{x:1,y:0},[li.Top]:{x:0,y:-1},[li.Bottom]:{x:0,y:1}};function za(e,t){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)}function Ba({source:e,sourcePosition:t=li.Bottom,target:n,targetPosition:o=li.Top,center:i,offset:r}){const a=Oa[t],l=Oa[o],u={x:e.x+a.x*r,y:e.y+a.y*r},s={x:n.x+l.x*r,y:n.y+l.y*r},c=function({source:e,sourcePosition:t=li.Bottom,target:n}){return t===li.Left||t===li.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1}}({source:u,sourcePosition:t,target:s}),d=0!==c.x?"x":"y",f=c[d];let v,h,p;const g={x:0,y:0},m={x:0,y:0},[y,w,x,b]=Ca({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(a[d]*l[d]===-1){h=i.x??y,p=i.y??w;const e=[{x:h,y:u.y},{x:h,y:s.y}],t=[{x:u.x,y:p},{x:s.x,y:p}];v=a[d]===f?"x"===d?e:t:"x"===d?t:e}else{const i=[{x:u.x,y:s.y}],c=[{x:s.x,y:u.y}];if(v="x"===d?a.x===f?c:i:a.y===f?i:c,t===o){const t=Math.abs(e[d]-n[d]);if(t<=r){const o=Math.min(r-1,r-t);a[d]===f?g[d]=(u[d]>e[d]?-1:1)*o:m[d]=(s[d]>n[d]?-1:1)*o}}if(t!==o){const e="x"===d?"y":"x",t=a[d]===l[e],n=u[e]>s[e],o=u[e]<s[e];(1===a[d]&&(!t&&n||t&&o)||1!==a[d]&&(!t&&o||t&&n))&&(v="x"===d?i:c)}const y={x:u.x+g.x,y:u.y+g.y},w={x:s.x+m.x,y:s.y+m.y};Math.max(Math.abs(y.x-v[0].x),Math.abs(w.x-v[0].x))>=Math.max(Math.abs(y.y-v[0].y),Math.abs(w.y-v[0].y))?(h=(y.x+w.x)/2,p=v[0].y):(h=v[0].x,p=(y.y+w.y)/2)}return[[e,{x:u.x+g.x,y:u.y+g.y},...v,{x:s.x+m.x,y:s.y+m.y},n],h,p,x,b]}function Va(e){const{sourceX:t,sourceY:n,sourcePosition:o=li.Bottom,targetX:i,targetY:r,targetPosition:a=li.Top,borderRadius:l=5,centerX:u,centerY:s,offset:c=20}=e,[d,f,v,h,p]=Ba({source:{x:t,y:n},sourcePosition:o,target:{x:i,y:r},targetPosition:a,center:{x:u,y:s},offset:c});return[d.reduce((e,t,n)=>{let o;return o=n>0&&n<d.length-1?function(e,t,n,o){const i=Math.min(za(e,t)/2,za(t,n)/2,o),{x:r,y:a}=t;if(e.x===r&&r===n.x||e.y===a&&a===n.y)return`L${r} ${a}`;if(e.y===a)return`L ${r+i*(e.x<n.x?-1:1)},${a}Q ${r},${a} ${r},${a+i*(e.y<n.y?1:-1)}`;const l=e.x<n.x?1:-1;return`L ${r},${a+i*(e.y<n.y?-1:1)}Q ${r},${a} ${r+i*l},${a}`}(d[n-1],t,d[n+1],l):`${0===n?"M":"L"}${t.x} ${t.y}`,e+=o},""),f,v,h,p]}const La=c({name:"StraightEdge",props:["label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup:(t,{attrs:n})=>()=>{const[o,i,r]=function(e){const{sourceX:t,sourceY:n,targetX:o,targetY:i}=e,[r,a,l,u]=Ca({sourceX:t,sourceY:n,targetX:o,targetY:i});return[`M ${t},${n}L ${o},${i}`,r,a,l,u]}(t);return e(Ma,{path:o,labelX:i,labelY:r,...n,...t})}}),Ra=c({name:"SmoothStepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","borderRadius","markerEnd","markerStart","interactionWidth","offset"],compatConfig:{MODE:3},setup:(t,{attrs:n})=>()=>{const[o,i,r]=Va({...t,sourcePosition:t.sourcePosition??li.Bottom,targetPosition:t.targetPosition??li.Top});return e(Ma,{path:o,labelX:i,labelY:r,...n,...t})}}),Ha=c({name:"StepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],setup:(t,{attrs:n})=>()=>e(Ra,{...t,...n,borderRadius:0})}),Ya=c({name:"BezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","curvature","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup:(t,{attrs:n})=>()=>{const[o,i,r]=Aa({...t,sourcePosition:t.sourcePosition??li.Bottom,targetPosition:t.targetPosition??li.Top});return e(Ma,{path:o,labelX:i,labelY:r,...n,...t})}}),Ga=c({name:"SimpleBezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup:(t,{attrs:n})=>()=>{const[o,i,r]=Da({...t,sourcePosition:t.sourcePosition??li.Bottom,targetPosition:t.targetPosition??li.Top});return e(Ma,{path:o,labelX:i,labelY:r,...n,...t})}}),Fa={input:xa,default:ga,output:ya},Xa={default:Ya,straight:La,step:Ha,smoothstep:Ra,simplebezier:Ga};class Ua{constructor(){this.currentId=0,this.flows=/* @__PURE__ */new Map}static getInstance(){var e;const t=null==(e=a())?void 0:e.appContext.app,n=(null==t?void 0:t.config.globalProperties.$vueFlowStorage)??Ua.instance;return Ua.instance=n??new Ua,t&&(t.config.globalProperties.$vueFlowStorage=Ua.instance),Ua.instance}set(e,t){return this.flows.set(e,t)}get(e){return this.flows.get(e)}remove(e){return this.flows.delete(e)}create(e,t){const n=ca(),o=l(n),i={};for(const[l,u]of Object.entries(o.hooks)){i[`on${l.charAt(0).toUpperCase()+l.slice(1)}`]=u.on}const r={};for(const[l,u]of Object.entries(o.hooks))r[l]=u.trigger;const a=u(()=>{const e=/* @__PURE__ */new Map;for(const t of o.nodes)e.set(t.id,t);return e}),s=u(()=>{const e=/* @__PURE__ */new Map;for(const t of o.edges)e.set(t.id,t);return e}),c=function(e,t,n){const o=u(()=>e=>t.value.get(e)),i=u(()=>e=>n.value.get(e)),r=u(()=>{const t={...Xa,...e.edgeTypes},n=Object.keys(t);for(const o of e.edges)o.type&&!n.includes(o.type)&&(t[o.type]=o.type);return t}),a=u(()=>{const t={...Fa,...e.nodeTypes},n=Object.keys(t);for(const o of e.nodes)o.type&&!n.includes(o.type)&&(t[o.type]=o.type);return t}),l=u(()=>e.onlyRenderVisibleElements?Fi(e.nodes,{x:0,y:0,width:e.dimensions.width,height:e.dimensions.height},e.viewport,!0):e.nodes),s=u(()=>{if(e.onlyRenderVisibleElements){const n=[];for(const o of e.edges){const i=t.value.get(o.source),r=t.value.get(o.target);pr({sourcePos:i.computedPosition||{x:0,y:0},targetPos:r.computedPosition||{x:0,y:0},sourceWidth:i.dimensions.width,sourceHeight:i.dimensions.height,targetWidth:r.dimensions.width,targetHeight:r.dimensions.height,width:e.dimensions.width,height:e.dimensions.height,viewport:e.viewport})&&n.push(o)}return n}return e.edges}),c=u(()=>[...l.value,...s.value]),d=u(()=>{const t=[];for(const n of e.nodes)n.selected&&t.push(n);return t}),f=u(()=>{const t=[];for(const n of e.edges)n.selected&&t.push(n);return t}),v=u(()=>[...d.value,...f.value]),h=u(()=>{const t=[];for(const n of e.nodes)n.dimensions.width&&n.dimensions.height&&void 0!==n.handleBounds&&t.push(n);return t}),p=u(()=>l.value.length>0&&h.value.length===l.value.length);return{getNode:o,getEdge:i,getElements:c,getEdgeTypes:r,getNodeTypes:a,getEdges:s,getNodes:l,getSelectedElements:v,getSelectedNodes:d,getSelectedEdges:f,getNodesInitialized:h,areNodesInitialized:p}}(o,a,s),d=fa(o,a,s);d.setState({...o,...t});const f={...i,...c,...d,...de(o),nodeLookup:a,edgeLookup:s,emits:r,id:e,vueFlowVersion:"1.48.0",$destroy:()=>{this.remove(e)}};return this.set(e,f),f}getId(){return"vue-flow-"+this.currentId++}}function Za(e){const l=Ua.getInstance(),u=t(),s="object"==typeof e,c=s?e:{id:e},d=c.id,f=d??(null==u?void 0:u.vueFlowId);let v;if(u){const e=n(Fr,null);null==e||f&&e.id!==f||(v=e)}if(v||f&&(v=l.get(f)),!v||f&&v.id!==f){const e=d??l.getId(),t=l.create(e,c);v=t;(u??o(!0)).run(()=>{i(t.applyDefault,(e,n,o)=>{const i=e=>{t.applyNodeChanges(e)},r=e=>{t.applyEdgeChanges(e)};e?(t.onNodesChange(i),t.onEdgesChange(r)):(t.hooks.value.nodesChange.off(i),t.hooks.value.edgesChange.off(r)),o(()=>{t.hooks.value.nodesChange.off(i),t.hooks.value.edgesChange.off(r)})},{immediate:!0}),ne(()=>{if(v){const e=l.get(v.id);e?e.$destroy():Ar(`No store instance found for id ${v.id} in storage.`)}})})}else s&&v.setState(c);if(u&&(r(Fr,v),u.vueFlowId=v.id),s){const e=a();"VueFlow"!==(null==e?void 0:e.type.name)&&v.emits.error(new wr(mr.USEVUEFLOW_OPTIONS))}return v}const ja=/* @__PURE__ */c({name:"UserSelection",compatConfig:{MODE:3},props:{userSelectionRect:{}},setup:e=>(e,t)=>(w(),y("div",{class:"vue-flow__selection vue-flow__container",style:P({width:`${e.userSelectionRect.width}px`,height:`${e.userSelectionRect.height}px`,transform:`translate(${e.userSelectionRect.x}px, ${e.userSelectionRect.y}px)`})},null,4))}),Wa=["tabIndex"],Ka=/* @__PURE__ */c({name:"NodesSelection",compatConfig:{MODE:3},setup(e){const{emits:t,viewport:n,getSelectedNodes:o,noPanClassName:i,disableKeyboardA11y:r,userSelectionActive:a}=Za(),l=oa(),s=g(null),c=Kr({el:s,onStart(e){t.selectionDragStart(e),t.nodeDragStart(e)},onDrag(e){t.selectionDrag(e),t.nodeDrag(e)},onStop(e){t.selectionDragStop(e),t.nodeDragStop(e)}});k(()=>{var e;r.value||null==(e=s.value)||e.focus({preventScroll:!0})});const d=u(()=>Gi(o.value)),f=u(()=>({width:`${d.value.width}px`,height:`${d.value.height}px`,top:`${d.value.y}px`,left:`${d.value.x}px`}));function v(e){t.selectionContextMenu({event:e,nodes:o.value})}function h(e){r.value||_i[e.key]&&(e.preventDefault(),l({x:_i[e.key].x,y:_i[e.key].y},e.shiftKey))}return(e,t)=>!p(a)&&d.value.width&&d.value.height?(w(),y("div",{key:0,class:M(["vue-flow__nodesselection vue-flow__container",p(i)]),style:P({transform:`translate(${p(n).x}px,${p(n).y}px) scale(${p(n).zoom})`})},[x("div",{ref_key:"el",ref:s,class:M([{dragging:p(c)},"vue-flow__nodesselection-rect"]),style:P(f.value),tabIndex:p(r)?void 0:-1,onContextmenu:v,onKeydown:h},null,46,Wa)],6)):b("",!0)}});const qa=/* @__PURE__ */c({name:"Pane",compatConfig:{MODE:3},props:{isSelecting:{type:Boolean},selectionKeyPressed:{type:Boolean}},setup(e){const{vueFlowRef:t,nodes:n,viewport:o,emits:r,userSelectionActive:a,removeSelectedElements:l,userSelectionRect:u,elementsSelectable:s,nodesSelectionActive:c,getSelectedEdges:d,getSelectedNodes:f,removeNodes:v,removeEdges:h,selectionMode:m,deleteKeyCode:x,multiSelectionKeyCode:E,multiSelectionActive:S,edgeLookup:k,nodeLookup:I,connectionLookup:P,defaultEdgeOptions:T,connectionStartHandle:A}=Za(),$=g(null),D=g(/* @__PURE__ */new Set),O=g(/* @__PURE__ */new Set),z=g(),B=N(()=>s.value&&(e.isSelecting||a.value)),V=N(()=>null!==A.value);let L=!1,R=!1;const H=yi(x,{actInsideInputWithModifier:!1}),Y=yi(E);function G(e,t){return n=>{n.target===t&&(null==e||e(n))}}function F(e){L||V.value?L=!1:(r.paneClick(e),l(),c.value=!1)}function X(e){e.preventDefault(),e.stopPropagation(),r.paneContextMenu(e)}function U(e){r.paneScroll(e)}return i(H,e=>{e&&(v(f.value),h(d.value),c.value=!1)}),i(Y,e=>{S.value=e}),(i,d)=>(w(),y("div",{ref_key:"container",ref:$,class:M(["vue-flow__pane vue-flow__container",{selection:i.isSelecting}]),onClick:d[0]||(d[0]=e=>B.value?void 0:G(F,$.value)(e)),onContextmenu:d[1]||(d[1]=e=>G(X,$.value)(e)),onWheelPassive:d[2]||(d[2]=e=>G(U,$.value)(e)),onPointerenter:d[3]||(d[3]=e=>B.value?void 0:p(r).paneMouseEnter(e)),onPointerdown:d[4]||(d[4]=n=>B.value?function(n){var o,i,a;if(z.value=null==(o=t.value)?void 0:o.getBoundingClientRect(),!s.value||!e.isSelecting||0!==n.button||n.target!==$.value||!z.value)return;null==(a=null==(i=n.target)?void 0:i.setPointerCapture)||a.call(i,n.pointerId);const{x:c,y:d}=function(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}(n,z.value);R=!0,L=!1,l(),u.value={width:0,height:0,startX:c,startY:d,x:c,y:d},r.selectionStart(n)}(n):p(r).paneMouseMove(n)),onPointermove:d[5]||(d[5]=e=>B.value?function(e){var t;if(!z.value||!u.value)return;L=!0;const{x:i,y:l}=br(e,z.value),{startX:s=0,startY:d=0}=u.value,f={startX:s,startY:d,x:i<s?i:s,y:l<d?l:d,width:Math.abs(i-s),height:Math.abs(l-d)},v=D.value,h=O.value;D.value=new Set(Fi(n.value,f,o.value,m.value===ui.Partial,!0).map(e=>e.id)),O.value=/* @__PURE__ */new Set;const p=(null==(t=T.value)?void 0:t.selectable)??!0;for(const n of D.value){const e=P.value.get(n);if(e)for(const{edgeId:t}of e.values()){const e=k.value.get(t);e&&(e.selectable??p)&&O.value.add(t)}}if(!Yr(v,D.value)){const e=rr(I.value,D.value,!0);r.nodesChange(e)}if(!Yr(h,O.value)){const e=rr(k.value,O.value);r.edgesChange(e)}u.value=f,a.value=!0,c.value=!1}(e):p(r).paneMouseMove(e)),onPointerup:d[6]||(d[6]=t=>B.value?function(t){var n;0===t.button&&R&&(null==(n=t.target)||n.releasePointerCapture(t.pointerId),!a.value&&u.value&&t.target===$.value&&F(t),a.value=!1,u.value=null,c.value=D.value.size>0,r.selectionEnd(t),e.selectionKeyPressed&&(L=!1),R=!1)}(t):void 0),onPointerleave:d[7]||(d[7]=e=>p(r).paneMouseLeave(e))},[C(i.$slots,"default"),p(a)&&p(u)?(w(),_(ja,{key:0,"user-selection-rect":p(u)},null,8,["user-selection-rect"])):b("",!0),p(c)&&p(f).length?(w(),_(Ka,{key:1})):b("",!0)],34))}}),Ja=/* @__PURE__ */c({name:"Transform",compatConfig:{MODE:3},setup(e){const{viewport:t,fitViewOnInit:n,fitViewOnInitDone:o}=Za(),i=u(()=>!!n.value&&!o.value),r=u(()=>`translate(${t.value.x}px,${t.value.y}px) scale(${t.value.zoom})`);return(e,t)=>(w(),y("div",{class:"vue-flow__transformationpane vue-flow__container",style:P({transform:r.value,opacity:i.value?0:void 0})},[C(e.$slots,"default")],4))}}),Qa=/* @__PURE__ */c({name:"Viewport",compatConfig:{MODE:3},setup(e){const{minZoom:t,maxZoom:n,defaultViewport:o,translateExtent:r,zoomActivationKeyCode:a,selectionKeyCode:l,panActivationKeyCode:u,panOnScroll:s,panOnScrollMode:c,panOnScrollSpeed:d,panOnDrag:f,zoomOnDoubleClick:v,zoomOnPinch:h,zoomOnScroll:g,preventScrolling:m,noWheelClassName:x,noPanClassName:b,emits:_,connectionStartHandle:E,userSelectionActive:S,paneDragging:I,d3Zoom:P,d3Selection:T,d3ZoomHandler:A,viewport:$,viewportRef:D,paneClickDistance:O}=Za();!function(e){const{emits:t,dimensions:n}=Za();let o;k(()=>{const i=()=>{var o,i;if(!e.value||!((null==(i=(o=e.value).checkVisibility)?void 0:i.call(o))??1))return;const r=Ni(e.value);0!==r.width&&0!==r.height||t.error(new wr(mr.MISSING_VIEWPORT_DIMENSIONS)),n.value={width:r.width||500,height:r.height||500}};i(),window.addEventListener("resize",i),e.value&&(o=new ResizeObserver(()=>i()),o.observe(e.value)),G(()=>{window.removeEventListener("resize",i),o&&e.value&&o.unobserve(e.value)})})}(D);const z=H(!1),B=H(!1);let R=null,Y=!1,F=0,X={x:0,y:0,zoom:0};const U=yi(u),Z=yi(l),j=yi(a),W=N(()=>(!Z.value||Z.value&&!0===l.value)&&(U.value||f.value)),K=N(()=>U.value||s.value),q=N(()=>Z.value||!0===l.value&&!0!==W.value),J=N(()=>null!==E.value);function Q(e,t){return 2===t&&Array.isArray(e)&&e.includes(2)}function ee(e){return{x:e.x,y:e.y,zoom:e.k}}function te(e,t){return e.target.closest(`.${t}`)}return k(()=>{if(!D.value)return void Ar("Viewport element is missing");const e=D.value,a=e.getBoundingClientRect(),u=function(){var e,t,n,o=ti,i=ni,r=ai,a=ii,l=ri,u=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],c=250,d=Jn,f=xe("start","zoom","end"),v=0,h=10;function p(e){e.property("__zoom",oi).on("wheel.zoom",_,{passive:!1}).on("mousedown.zoom",E).on("dblclick.zoom",S).filter(l).on("touchstart.zoom",N).on("touchmove.zoom",k).on("touchend.zoom touchcancel.zoom",M).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(e,t){return(t=Math.max(u[0],Math.min(u[1],t)))===e.k?e:new qo(t,e.x,e.y)}function m(e,t,n){var o=t[0]-n[0]*e.k,i=t[1]-n[1]*e.k;return o===e.x&&i===e.y?e:new qo(e.k,o,i)}function y(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function w(e,t,n,o){e.on("start.zoom",function(){x(this,arguments).event(o).start()}).on("interrupt.zoom end.zoom",function(){x(this,arguments).event(o).end()}).tween("zoom",function(){var e=this,r=arguments,a=x(e,r).event(o),l=i.apply(e,r),u=null==n?y(l):"function"==typeof n?n.apply(e,r):n,s=Math.max(l[1][0]-l[0][0],l[1][1]-l[0][1]),c=e.__zoom,f="function"==typeof t?t.apply(e,r):t,v=d(c.invert(u).concat(s/c.k),f.invert(u).concat(s/f.k));return function(e){if(1===e)e=f;else{var t=v(e),n=s/t[2];e=new qo(n,u[0]-t[0]*n,u[1]-t[1]*n)}a.zoom(null,e)}})}function x(e,t,n){return!n&&e.__zooming||new b(e,t)}function b(e,t){this.that=e,this.args=t,this.active=0,this.sourceEvent=null,this.extent=i.apply(e,t),this.taps=0}function _(e,...t){if(o.apply(this,arguments)){var n=x(this,t).event(e),i=this.__zoom,l=Math.max(u[0],Math.min(u[1],i.k*Math.pow(2,a.apply(this,arguments)))),c=Bt(e);if(n.wheel)n.mouse[0][0]===c[0]&&n.mouse[0][1]===c[1]||(n.mouse[1]=i.invert(n.mouse[0]=c)),clearTimeout(n.wheel);else{if(i.k===l)return;n.mouse=[c,i.invert(c)],So(this),n.start()}ei(e),n.wheel=setTimeout(function(){n.wheel=null,n.end()},150),n.zoom("mouse",r(m(g(i,l),n.mouse[0],n.mouse[1]),n.extent,s))}}function E(e,...t){if(!n&&o.apply(this,arguments)){var i=e.currentTarget,a=x(this,t,!0).event(e),l=zt(e.view).on("mousemove.zoom",function(e){if(ei(e),!a.moved){var t=e.clientX-c,n=e.clientY-d;a.moved=t*t+n*n>v}a.event(e).zoom("mouse",r(m(a.that.__zoom,a.mouse[0]=Bt(e,i),a.mouse[1]),a.extent,s))},!0).on("mouseup.zoom",function(e){l.on("mousemove.zoom mouseup.zoom",null),Gt(e.view,a.moved),ei(e),a.event(e).end()},!0),u=Bt(e,i),c=e.clientX,d=e.clientY;Yt(e.view),Qo(e),a.mouse=[u,this.__zoom.invert(u)],So(this),a.start()}}function S(e,...t){if(o.apply(this,arguments)){var n=this.__zoom,a=Bt(e.changedTouches?e.changedTouches[0]:e,this),l=n.invert(a),u=n.k*(e.shiftKey?.5:2),d=r(m(g(n,u),a,l),i.apply(this,t),s);ei(e),c>0?zt(this).transition().duration(c).call(w,d,a,e):zt(this).call(p.transform,d,a,e)}}function N(n,...i){if(o.apply(this,arguments)){var r,a,l,u,s=n.touches,c=s.length,d=x(this,i,n.changedTouches.length===c).event(n);for(Qo(n),a=0;a<c;++a)u=[u=Bt(l=s[a],this),this.__zoom.invert(u),l.identifier],d.touch0?d.touch1||d.touch0[2]===u[2]||(d.touch1=u,d.taps=0):(d.touch0=u,r=!0,d.taps=1+!!e);e&&(e=clearTimeout(e)),r&&(d.taps<2&&(t=u[0],e=setTimeout(function(){e=null},500)),So(this),d.start())}}function k(e,...t){if(this.__zooming){var n,o,i,a,l=x(this,t).event(e),u=e.changedTouches,c=u.length;for(ei(e),n=0;n<c;++n)i=Bt(o=u[n],this),l.touch0&&l.touch0[2]===o.identifier?l.touch0[0]=i:l.touch1&&l.touch1[2]===o.identifier&&(l.touch1[0]=i);if(o=l.that.__zoom,l.touch1){var d=l.touch0[0],f=l.touch0[1],v=l.touch1[0],h=l.touch1[1],p=(p=v[0]-d[0])*p+(p=v[1]-d[1])*p,y=(y=h[0]-f[0])*y+(y=h[1]-f[1])*y;o=g(o,Math.sqrt(p/y)),i=[(d[0]+v[0])/2,(d[1]+v[1])/2],a=[(f[0]+h[0])/2,(f[1]+h[1])/2]}else{if(!l.touch0)return;i=l.touch0[0],a=l.touch0[1]}l.zoom("touch",r(m(o,i,a),l.extent,s))}}function M(e,...o){if(this.__zooming){var i,r,a=x(this,o).event(e),l=e.changedTouches,u=l.length;for(Qo(e),n&&clearTimeout(n),n=setTimeout(function(){n=null},500),i=0;i<u;++i)r=l[i],a.touch0&&a.touch0[2]===r.identifier?delete a.touch0:a.touch1&&a.touch1[2]===r.identifier&&delete a.touch1;if(a.touch1&&!a.touch0&&(a.touch0=a.touch1,delete a.touch1),a.touch0)a.touch0[1]=this.__zoom.invert(a.touch0[0]);else if(a.end(),2===a.taps&&(r=Bt(r,this),Math.hypot(t[0]-r[0],t[1]-r[1])<h)){var s=zt(this).on("dblclick.zoom");s&&s.apply(this,arguments)}}}return p.transform=function(e,t,n,o){var i=e.selection?e.selection():e;i.property("__zoom",oi),e!==i?w(e,t,n,o):i.interrupt().each(function(){x(this,arguments).event(o).start().zoom(null,"function"==typeof t?t.apply(this,arguments):t).end()})},p.scaleBy=function(e,t,n,o){p.scaleTo(e,function(){return this.__zoom.k*("function"==typeof t?t.apply(this,arguments):t)},n,o)},p.scaleTo=function(e,t,n,o){p.transform(e,function(){var e=i.apply(this,arguments),o=this.__zoom,a=null==n?y(e):"function"==typeof n?n.apply(this,arguments):n,l=o.invert(a),u="function"==typeof t?t.apply(this,arguments):t;return r(m(g(o,u),a,l),e,s)},n,o)},p.translateBy=function(e,t,n,o){p.transform(e,function(){return r(this.__zoom.translate("function"==typeof t?t.apply(this,arguments):t,"function"==typeof n?n.apply(this,arguments):n),i.apply(this,arguments),s)},null,o)},p.translateTo=function(e,t,n,o,a){p.transform(e,function(){var e=i.apply(this,arguments),a=this.__zoom,l=null==o?y(e):"function"==typeof o?o.apply(this,arguments):o;return r(Jo.translate(l[0],l[1]).scale(a.k).translate("function"==typeof t?-t.apply(this,arguments):-t,"function"==typeof n?-n.apply(this,arguments):-n),e,s)},o,a)},b.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return 1===++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(e,t){return this.mouse&&"mouse"!==e&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&"touch"!==e&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&"touch"!==e&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit("zoom"),this},end:function(){return 0===--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(e){var t=zt(this.that).datum();f.call(e,this.that,new Ko(e,{sourceEvent:this.sourceEvent,target:p,transform:this.that.__zoom,dispatch:f}),t)}},p.wheelDelta=function(e){return arguments.length?(a="function"==typeof e?e:Wo(+e),p):a},p.filter=function(e){return arguments.length?(o="function"==typeof e?e:Wo(!!e),p):o},p.touchable=function(e){return arguments.length?(l="function"==typeof e?e:Wo(!!e),p):l},p.extent=function(e){return arguments.length?(i="function"==typeof e?e:Wo([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),p):i},p.scaleExtent=function(e){return arguments.length?(u[0]=+e[0],u[1]=+e[1],p):[u[0],u[1]]},p.translateExtent=function(e){return arguments.length?(s[0][0]=+e[0][0],s[1][0]=+e[1][0],s[0][1]=+e[0][1],s[1][1]=+e[1][1],p):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},p.constrain=function(e){return arguments.length?(r=e,p):r},p.duration=function(e){return arguments.length?(c=+e,p):c},p.interpolate=function(e){return arguments.length?(d=e,p):d},p.on=function(){var e=f.on.apply(f,arguments);return e===f?p:e},p.clickDistance=function(e){return arguments.length?(v=(e=+e)*e,p):Math.sqrt(v)},p.tapDistance=function(e){return arguments.length?(h=+e,p):h},p}().clickDistance(O.value).scaleExtent([t.value,n.value]).translateExtent(r.value),p=zt(e).call(u),y=p.on("wheel.zoom"),w=Jo.translate(o.value.x??0,o.value.y??0).scale(ki(o.value.zoom??1,t.value,n.value)),E=[[0,0],[a.width,a.height]],N=u.constrain()(w,E,r.value);u.transform(p,N),u.wheelDelta(Ki),P.value=u,T.value=p,A.value=y,$.value={x:N.x,y:N.y,zoom:N.k},u.on("start",e=>{var t;if(!e.sourceEvent)return null;F=e.sourceEvent.button,z.value=!0;const n=ee(e.transform);"mousedown"===(null==(t=e.sourceEvent)?void 0:t.type)&&(I.value=!0),X=n,_.viewportChangeStart(n),_.moveStart({event:e,flowTransform:n})}),u.on("end",e=>{if(!e.sourceEvent)return null;if(z.value=!1,I.value=!1,Q(W.value,F??0)&&!Y&&_.paneContextMenu(e.sourceEvent),Y=!1,t=X,n=e.transform,t.x!==n.x&&!Number.isNaN(n.x)||t.y!==n.y&&!Number.isNaN(n.y)||t.zoom!==n.k&&!Number.isNaN(n.k)){const t=ee(e.transform);X=t,_.viewportChangeEnd(t),_.moveEnd({event:e,flowTransform:t})}var t,n}),u.filter(e=>{var t;const n=j.value||g.value,o=h.value&&e.ctrlKey,i=e.button,r="wheel"===e.type;if(1===i&&"mousedown"===e.type&&(te(e,"vue-flow__node")||te(e,"vue-flow__edge")))return!0;if(!(W.value||n||K.value||v.value||h.value))return!1;if(S.value)return!1;if(J.value&&!r)return!1;if(!v.value&&"dblclick"===e.type)return!1;if(te(e,x.value)&&r)return!1;if(te(e,b.value)&&(!r||K.value&&r&&!j.value))return!1;if(!h.value&&e.ctrlKey&&r)return!1;if(!n&&!K.value&&!o&&r)return!1;if(!h&&"touchstart"===e.type&&(null==(t=e.touches)?void 0:t.length)>1)return e.preventDefault(),!1;if(!W.value&&("mousedown"===e.type||"touchstart"===e.type))return!1;if(!0===l.value&&Array.isArray(f.value)&&f.value.includes(0)&&0===i)return!1;if(Array.isArray(f.value)&&!f.value.includes(i)&&("mousedown"===e.type||"touchstart"===e.type))return!1;const a=Array.isArray(f.value)&&f.value.includes(i)||!0===l.value&&Array.isArray(f.value)&&!f.value.includes(0)||!i||i<=1;return(!e.ctrlKey||U.value||r)&&a}),i([S,W],()=>{S.value&&!z.value?u.on("zoom",null):S.value||u.on("zoom",e=>{$.value={x:e.transform.x,y:e.transform.y,zoom:e.transform.k};const t=ee(e.transform);Y=Q(W.value,F??0),_.viewportChange(t),_.move({event:e,flowTransform:t})})},{immediate:!0}),i([S,K,c,j,h,m,x],()=>{!K.value||j.value||S.value?void 0!==y&&p.on("wheel.zoom",function(e,t){const n=!m.value&&"wheel"===e.type&&!e.ctrlKey,o=j.value||g.value,i=h.value&&e.ctrlKey;if(!o&&!s.value&&!i&&"wheel"===e.type||n||te(e,x.value))return null;e.preventDefault(),y.call(this,e,t)},{passive:!1}):p.on("wheel.zoom",e=>{if(te(e,x.value))return!1;const t=j.value||g.value,n=h.value&&e.ctrlKey;if(!(!m.value||K.value||t||n))return!1;e.preventDefault(),e.stopImmediatePropagation();const o=p.property("__zoom").k||1,i=_r();if(!U.value&&e.ctrlKey&&h.value&&i){const t=Bt(e),n=o*2**Ki(e);return void u.scaleTo(p,n,t,e)}const r=1===e.deltaMode?20:1;let a=c.value===fi.Vertical?0:e.deltaX*r,l=c.value===fi.Horizontal?0:e.deltaY*r;!i&&e.shiftKey&&c.value!==fi.Vertical&&!a&&l&&(a=l,l=0),u.translateBy(p,-a/o*d.value,-l/o*d.value);const s=ee(p.property("__zoom"));R&&clearTimeout(R),B.value?(_.move({event:e,flowTransform:s}),_.viewportChange(s),R=setTimeout(()=>{_.moveEnd({event:e,flowTransform:s}),_.viewportChangeEnd(s),B.value=!1},150)):(B.value=!0,_.moveStart({event:e,flowTransform:s}),_.viewportChangeStart(s))},{passive:!1})},{immediate:!0})}),(e,t)=>(w(),y("div",{ref_key:"viewportRef",ref:D,class:"vue-flow__viewport vue-flow__container"},[V(qa,{"is-selecting":q.value,"selection-key-pressed":p(Z),class:M({connecting:J.value,dragging:p(I),draggable:!0===p(f)||Array.isArray(p(f))&&p(f).includes(0)})},{default:L(()=>[V(Ja,null,{default:L(()=>[C(e.$slots,"default")]),_:3})]),_:3},8,["is-selecting","selection-key-pressed","class"])],512))}}),el=["id"],tl=["id"],nl=["id"],ol=/* @__PURE__ */c({name:"A11yDescriptions",compatConfig:{MODE:3},setup(e){const{id:t,disableKeyboardA11y:n,ariaLiveMessage:o}=Za();return(e,i)=>(w(),y(h,null,[x("div",{id:`${p(wi)}-${p(t)}`,style:{display:"none"}}," Press enter or space to select a node. "+$(p(n)?"":"You can then use the arrow keys to move the node around.")+" You can then use the arrow keys to move the node around, press delete to remove it and press escape to cancel. ",9,el),x("div",{id:`${p(xi)}-${p(t)}`,style:{display:"none"}}," Press enter or space to select an edge. You can then press delete to remove it or press escape to cancel. ",8,tl),p(n)?b("",!0):(w(),y("div",{key:0,id:`${p("vue-flow__aria-live")}-${p(t)}`,"aria-live":"assertive","aria-atomic":"true",style:{position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)","clip-path":"inset(100%)"}},$(p(o)),9,nl))],64))}});function il(e,t,n){return n===li.Left?e-t:n===li.Right?e+t:e}function rl(e,t,n){return n===li.Top?e-t:n===li.Bottom?e+t:e}const al=function({radius:t=10,centerX:n=0,centerY:o=0,position:i=li.Top,type:r}){return e("circle",{class:`vue-flow__edgeupdater vue-flow__edgeupdater-${r}`,cx:il(n,t,i),cy:rl(o,t,i),r:t,stroke:"transparent",fill:"transparent"})};al.props=["radius","centerX","centerY","position","type"],al.compatConfig={MODE:3};const ll=al,ul=c({name:"Edge",compatConfig:{MODE:3},props:["id"],setup(t){const{id:o,addSelectedEdges:i,connectionMode:l,edgeUpdaterRadius:s,emits:c,nodesSelectionActive:d,noPanClassName:f,getEdgeTypes:v,removeSelectedEdges:h,findEdge:p,findNode:m,isValidConnection:y,multiSelectionActive:w,disableKeyboardA11y:x,elementsSelectable:b,edgesUpdatable:_,edgesFocusable:E,hooks:S}=Za(),k=u(()=>p(t.id)),{emit:M,on:C}=qr(k.value,c),I=n(Wr),P=a(),T=g(!1),A=g(!1),$=g(""),D=g(null),O=g("source"),z=g(null),B=N(()=>void 0===k.value.selectable?b.value:k.value.selectable),V=N(()=>void 0===k.value.updatable?_.value:k.value.updatable),L=N(()=>void 0===k.value.focusable?E.value:k.value.focusable);r(Zr,t.id),r(jr,z);const R=u(()=>k.value.class instanceof Function?k.value.class(k.value):k.value.class),H=u(()=>k.value.style instanceof Function?k.value.style(k.value):k.value.style),Y=u(()=>{const e=k.value.type||"default",t=null==I?void 0:I[`edge-${e}`];if(t)return t;let n=k.value.template??v.value[e];if("string"==typeof n&&P){const t=Object.keys(P.appContext.components);t&&t.includes(e)&&(n=U(e,!1))}return n&&"string"!=typeof n?n:(c.error(new wr(mr.EDGE_TYPE_MISSING,n)),!1)}),{handlePointerDown:G}=Qr({nodeId:$,handleId:D,type:O,isValidConnection:y,edgeUpdaterType:O,onEdgeUpdate:function(e,t){M.update({event:e,edge:k.value,connection:t})},onEdgeUpdateEnd:function(e){M.updateEnd({event:e,edge:k.value}),A.value=!1}});return()=>{const n=m(k.value.source),i=m(k.value.target),r="pathOptions"in k.value?k.value.pathOptions:{};if(!n&&!i)return c.error(new wr(mr.EDGE_SOURCE_TARGET_MISSING,k.value.id,k.value.source,k.value.target)),null;if(!n)return c.error(new wr(mr.EDGE_SOURCE_MISSING,k.value.id,k.value.source)),null;if(!i)return c.error(new wr(mr.EDGE_TARGET_MISSING,k.value.id,k.value.target)),null;if(!k.value||k.value.hidden||n.hidden||i.hidden)return null;let a;a=l.value===ci.Strict?n.handleBounds.source:[...n.handleBounds.source||[],...n.handleBounds.target||[]];const u=hr(a,k.value.sourceHandle);let d;d=l.value===ci.Strict?i.handleBounds.target:[...i.handleBounds.target||[],...i.handleBounds.source||[]];const h=hr(d,k.value.targetHandle),p=(null==u?void 0:u.position)||li.Bottom,g=(null==h?void 0:h.position)||li.Top,{x:y,y:w}=vr(n,u,p),{x:x,y:b}=vr(i,h,g);return k.value.sourceX=y,k.value.sourceY=w,k.value.targetX=x,k.value.targetY=b,e("g",{ref:z,key:t.id,"data-id":t.id,class:["vue-flow__edge",`vue-flow__edge-${!1===Y.value?"default":k.value.type||"default"}`,f.value,R.value,{updating:T.value,selected:k.value.selected,animated:k.value.animated,inactive:!B.value&&!S.value.edgeClick.hasListeners()}],tabIndex:L.value?0:void 0,"aria-label":null===k.value.ariaLabel?void 0:k.value.ariaLabel??`Edge from ${k.value.source} to ${k.value.target}`,"aria-describedby":L.value?`${xi}-${o}`:void 0,"aria-roledescription":"edge",role:L.value?"group":"img",...k.value.domAttributes,onClick:j,onContextmenu:W,onDblclick:K,onMouseenter:q,onMousemove:J,onMouseleave:Q,onKeyDown:L.value?ne:void 0},[A.value?null:e(!1===Y.value?v.value.default:Y.value,{id:t.id,sourceNode:n,targetNode:i,source:k.value.source,target:k.value.target,type:k.value.type,updatable:V.value,selected:k.value.selected,animated:k.value.animated,label:k.value.label,labelStyle:k.value.labelStyle,labelShowBg:k.value.labelShowBg,labelBgStyle:k.value.labelBgStyle,labelBgPadding:k.value.labelBgPadding,labelBgBorderRadius:k.value.labelBgBorderRadius,data:k.value.data,events:{...k.value.events,...C},style:H.value,markerStart:`url('#${Wi(k.value.markerStart,o)}')`,markerEnd:`url('#${Wi(k.value.markerEnd,o)}')`,sourcePosition:p,targetPosition:g,sourceX:y,sourceY:w,targetX:x,targetY:b,sourceHandleId:k.value.sourceHandle,targetHandleId:k.value.targetHandle,interactionWidth:k.value.interactionWidth,...r}),["source"===V.value||!0===V.value?[e("g",{onMousedown:ee,onMouseenter:F,onMouseout:X},e(ll,{position:p,centerX:y,centerY:w,radius:s.value,type:"source","data-type":"source"}))]:null,"target"===V.value||!0===V.value?[e("g",{onMousedown:te,onMouseenter:F,onMouseout:X},e(ll,{position:g,centerX:x,centerY:b,radius:s.value,type:"target","data-type":"target"}))]:null]])};function F(){T.value=!0}function X(){T.value=!1}function Z(e,t){0===e.button&&(A.value=!0,$.value=t?k.value.target:k.value.source,D.value=(t?k.value.targetHandle:k.value.sourceHandle)??null,O.value=t?"target":"source",M.updateStart({event:e,edge:k.value}),G(e))}function j(e){var t;const n={event:e,edge:k.value};B.value&&(d.value=!1,k.value.selected&&w.value?(h([k.value]),null==(t=z.value)||t.blur()):i([k.value])),M.click(n)}function W(e){M.contextMenu({event:e,edge:k.value})}function K(e){M.doubleClick({event:e,edge:k.value})}function q(e){M.mouseEnter({event:e,edge:k.value})}function J(e){M.mouseMove({event:e,edge:k.value})}function Q(e){M.mouseLeave({event:e,edge:k.value})}function ee(e){Z(e,!0)}function te(e){Z(e,!1)}function ne(e){var n;if(!x.value&&bi.includes(e.key)&&B.value){"Escape"===e.key?(null==(n=z.value)||n.blur(),h([p(t.id)])):i([p(t.id)])}}}}),sl=c({name:"ConnectionLine",compatConfig:{MODE:3},setup(){var t;const{id:o,connectionMode:i,connectionStartHandle:r,connectionEndHandle:a,connectionPosition:l,connectionLineType:s,connectionLineStyle:c,connectionLineOptions:d,connectionStatus:f,viewport:v,findNode:h}=Za(),p=null==(t=n(Wr))?void 0:t["connection-line"],g=u(()=>{var e;return h(null==(e=r.value)?void 0:e.nodeId)}),m=u(()=>{var e;return h(null==(e=a.value)?void 0:e.nodeId)??null}),y=u(()=>({x:(l.value.x-v.value.x)/v.value.zoom,y:(l.value.y-v.value.y)/v.value.zoom})),w=u(()=>d.value.markerStart?`url(#${Wi(d.value.markerStart,o)})`:""),x=u(()=>d.value.markerEnd?`url(#${Wi(d.value.markerEnd,o)})`:"");return()=>{var t,n,o;if(!g.value||!r.value)return null;const l=r.value.id,u=r.value.type,v=g.value.handleBounds;let h=(null==v?void 0:v[u])??[];if(i.value===ci.Loose){const e=(null==v?void 0:v["source"===u?"target":"source"])??[];h=[...h,...e]}if(!h)return null;const b=(l?h.find(e=>e.id===l):h[0])??null,_=(null==b?void 0:b.position)??li.Top,{x:E,y:S}=vr(g.value,b,_);let N=null;m.value&&(N=i.value===ci.Strict?(null==(t=m.value.handleBounds["source"===u?"target":"source"])?void 0:t.find(e=>{var t;return e.id===(null==(t=a.value)?void 0:t.id)}))||null:(null==(n=[...m.value.handleBounds.source??[],...m.value.handleBounds.target??[]])?void 0:n.find(e=>{var t;return e.id===(null==(t=a.value)?void 0:t.id)}))||null);const k=(null==(o=a.value)?void 0:o.position)??(_?Pr[_]:null);if(!_||!k)return null;const M=s.value??d.value.type??si.Bezier;let C="";const I={sourceX:E,sourceY:S,sourcePosition:_,targetX:y.value.x,targetY:y.value.y,targetPosition:k};return M===si.Bezier?[C]=Aa(I):M===si.Step?[C]=Va({...I,borderRadius:0}):M===si.SmoothStep?[C]=Va(I):M===si.SimpleBezier?[C]=Da(I):C=`M${E},${S} ${y.value.x},${y.value.y}`,e("svg",{class:"vue-flow__edges vue-flow__connectionline vue-flow__container"},e("g",{class:"vue-flow__connection"},p?e(p,{sourceX:E,sourceY:S,sourcePosition:_,targetX:y.value.x,targetY:y.value.y,targetPosition:k,sourceNode:g.value,sourceHandle:b,targetNode:m.value,targetHandle:N,markerEnd:x.value,markerStart:w.value,connectionStatus:f.value}):e("path",{d:C,class:[d.value.class,f.value,"vue-flow__connection-path"],style:{...c.value,...d.value.style},"marker-end":x.value,"marker-start":w.value})))}}}),cl=["id","markerWidth","markerHeight","markerUnits","orient"],dl=/* @__PURE__ */c({name:"MarkerType",compatConfig:{MODE:3},props:{id:{},type:{},color:{default:"none"},width:{default:12.5},height:{default:12.5},markerUnits:{default:"strokeWidth"},orient:{default:"auto-start-reverse"},strokeWidth:{default:1}},setup:e=>(e,t)=>(w(),y("marker",{id:e.id,class:"vue-flow__arrowhead",viewBox:"-10 -10 20 20",refX:"0",refY:"0",markerWidth:`${e.width}`,markerHeight:`${e.height}`,markerUnits:e.markerUnits,orient:e.orient},[e.type===p(di).ArrowClosed?(w(),y("polyline",{key:0,style:P({stroke:e.color,fill:e.color,strokeWidth:e.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",points:"-5,-4 0,0 -5,4 -5,-4"},null,4)):b("",!0),e.type===p(di).Arrow?(w(),y("polyline",{key:1,style:P({stroke:e.color,strokeWidth:e.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",fill:"none",points:"-5,-4 0,0 -5,4"},null,4)):b("",!0)],8,cl))}),fl={class:"vue-flow__marker vue-flow__container","aria-hidden":"true"},vl=/* @__PURE__ */c({name:"MarkerDefinitions",compatConfig:{MODE:3},setup(e){const{id:t,edges:n,connectionLineOptions:o,defaultMarkerColor:i}=Za(),r=u(()=>{const e=/* @__PURE__ */new Set,r=[],a=n=>{if(n){const o=Wi(n,t);e.has(o)||("object"==typeof n?r.push({...n,id:o,color:n.color||i.value}):r.push({id:o,color:i.value,type:n}),e.add(o))}};for(const t of[o.value.markerEnd,o.value.markerStart])a(t);for(const t of n.value)for(const e of[t.markerStart,t.markerEnd])a(e);return r.sort((e,t)=>e.id.localeCompare(t.id))});return(e,t)=>(w(),y("svg",fl,[x("defs",null,[(w(!0),y(h,null,Y(r.value,e=>(w(),_(dl,{id:e.id,key:e.id,type:e.type,color:e.color,width:e.width,height:e.height,markerUnits:e.markerUnits,"stroke-width":e.strokeWidth,orient:e.orient},null,8,["id","type","color","width","height","markerUnits","stroke-width","orient"]))),128))])]))}}),hl=/* @__PURE__ */c({name:"Edges",compatConfig:{MODE:3},setup(e){const{findNode:t,getEdges:n,elevateEdgesOnSelect:o}=Za();return(e,i)=>(w(),y(h,null,[V(vl),(w(!0),y(h,null,Y(p(n),e=>(w(),y("svg",{key:e.id,class:"vue-flow__edges vue-flow__container",style:P({zIndex:p(gr)(e,p(t),p(o))})},[V(p(ul),{id:e.id},null,8,["id"])],4))),128)),V(p(sl))],64))}}),pl=c({name:"Node",compatConfig:{MODE:3},props:["id","resizeObserver"],setup(t){const{id:o,noPanClassName:l,selectNodesOnDrag:s,nodesSelectionActive:c,multiSelectionActive:d,emits:f,removeSelectedNodes:v,addSelectedNodes:h,updateNodeDimensions:p,onUpdateNodeInternals:m,getNodeTypes:y,nodeExtent:w,elevateNodesOnSelect:x,disableKeyboardA11y:b,ariaLiveMessage:_,snapToGrid:E,snapGrid:S,nodeDragThreshold:M,nodesDraggable:C,elementsSelectable:P,nodesConnectable:T,nodesFocusable:A,hooks:$}=Za(),D=g(null);r(Ur,D),r(Xr,t.id);const O=n(Wr),z=a(),B=oa(),{node:V,parentNode:L}=ta(t.id),{emit:R,on:H}=na(V,f),Y=N(()=>void 0===V.draggable?C.value:V.draggable),G=N(()=>void 0===V.selectable?P.value:V.selectable),F=N(()=>void 0===V.connectable?T.value:V.connectable),X=N(()=>void 0===V.focusable?A.value:V.focusable),Z=u(()=>G.value||Y.value||$.value.nodeClick.hasListeners()||$.value.nodeDoubleClick.hasListeners()||$.value.nodeMouseEnter.hasListeners()||$.value.nodeMouseMove.hasListeners()||$.value.nodeMouseLeave.hasListeners()),j=N(()=>!!V.dimensions.width&&!!V.dimensions.height),W=u(()=>{const e=V.type||"default",t=null==O?void 0:O[`node-${e}`];if(t)return t;let n=V.template||y.value[e];if("string"==typeof n&&z){const t=Object.keys(z.appContext.components);t&&t.includes(e)&&(n=U(e,!1))}return n&&"string"!=typeof n?n:(f.error(new wr(mr.NODE_TYPE_MISSING,n)),!1)}),K=Kr({id:t.id,el:D,disabled:()=>!Y.value,selectable:G,dragHandle:()=>V.dragHandle,onStart(e){R.dragStart(e)},onDrag(e){R.drag(e)},onStop(e){R.dragStop(e)},onClick(e){le(e)}}),q=u(()=>V.class instanceof Function?V.class(V):V.class),J=u(()=>{const e=(V.style instanceof Function?V.style(V):V.style)||{},t=V.width instanceof Function?V.width(V):V.width,n=V.height instanceof Function?V.height(V):V.height;return!e.width&&t&&(e.width="string"==typeof t?t:`${t}px`),!e.height&&n&&(e.height="string"==typeof n?n:`${n}px`),e}),Q=N(()=>Number(V.zIndex??J.value.zIndex??0));return m(e=>{!e.includes(t.id)&&e.length||te()}),k(()=>{i(()=>V.hidden,(e=!1,n,o)=>{!e&&D.value&&(t.resizeObserver.observe(D.value),o(()=>{D.value&&t.resizeObserver.unobserve(D.value)}))},{immediate:!0,flush:"post"})}),i([()=>V.type,()=>V.sourcePosition,()=>V.targetPosition],()=>{I(()=>{p([{id:t.id,nodeElement:D.value,forceUpdate:!0}])})}),i([()=>V.position.x,()=>V.position.y,()=>{var e;return null==(e=L.value)?void 0:e.computedPosition.x},()=>{var e;return null==(e=L.value)?void 0:e.computedPosition.y},()=>{var e;return null==(e=L.value)?void 0:e.computedPosition.z},Q,()=>V.selected,()=>V.dimensions.height,()=>V.dimensions.width,()=>{var e;return null==(e=L.value)?void 0:e.dimensions.height},()=>{var e;return null==(e=L.value)?void 0:e.dimensions.width}],([e,t,n,o,i,r])=>{const a={x:e,y:t,z:r+(x.value&&V.selected?1e3:0)};var l,u;V.computedPosition=void 0!==n&&void 0!==o?{x:(u=a).x+(l={x:n,y:o,z:i}).x,y:u.y+l.y,z:(l.z>u.z?l.z:u.z)+1}:a},{flush:"post",immediate:!0}),i([()=>V.extent,w],([e,t],[n,o])=>{e===n&&t===o||ee()}),"parent"===V.extent||"object"==typeof V.extent&&"range"in V.extent&&"parent"===V.extent.range?ve(()=>j).toBe(!0).then(ee):ee(),()=>V.hidden?null:e("div",{ref:D,"data-id":V.id,class:["vue-flow__node",`vue-flow__node-${!1===W.value?"default":V.type||"default"}`,{[l.value]:Y.value,dragging:null==K?void 0:K.value,draggable:Y.value,selected:V.selected,selectable:G.value,parent:V.isParent},q.value],style:{visibility:j.value?"visible":"hidden",zIndex:V.computedPosition.z??Q.value,transform:`translate(${V.computedPosition.x}px,${V.computedPosition.y}px)`,pointerEvents:Z.value?"all":"none",...J.value},tabIndex:X.value?0:void 0,role:X.value?"group":void 0,"aria-describedby":b.value?void 0:`${wi}-${o}`,"aria-label":V.ariaLabel,"aria-roledescription":"node",...V.domAttributes,onMouseenter:ne,onMousemove:oe,onMouseleave:ie,onContextmenu:re,onClick:le,onDblclick:ae,onKeydown:ue},[e(!1===W.value?y.value.default:W.value,{id:V.id,type:V.type,data:V.data,events:{...V.events,...H},selected:V.selected,resizing:V.resizing,dragging:K.value,connectable:F.value,position:V.computedPosition,dimensions:V.dimensions,isValidTargetPos:V.isValidTargetPos,isValidSourcePos:V.isValidSourcePos,parent:V.parentNode,parentNodeId:V.parentNode,zIndex:V.computedPosition.z??Q.value,targetPosition:V.targetPosition,sourcePosition:V.sourcePosition,label:V.label,dragHandle:V.dragHandle,onUpdateNodeInternals:te})]);function ee(){const e=V.computedPosition,{computedPosition:t,position:n}=fr(V,E.value?Er(e,S.value):e,f.error,w.value,L.value);V.computedPosition.x===t.x&&V.computedPosition.y===t.y||(V.computedPosition={...V.computedPosition,...t}),V.position.x===n.x&&V.position.y===n.y||(V.position=n)}function te(){D.value&&p([{id:t.id,nodeElement:D.value,forceUpdate:!0}])}function ne(e){(null==K?void 0:K.value)||R.mouseEnter({event:e,node:V})}function oe(e){(null==K?void 0:K.value)||R.mouseMove({event:e,node:V})}function ie(e){(null==K?void 0:K.value)||R.mouseLeave({event:e,node:V})}function re(e){return R.contextMenu({event:e,node:V})}function ae(e){return R.doubleClick({event:e,node:V})}function le(e){G.value&&(!s.value||!Y.value||M.value>0)&&Or(V,d.value,h,v,c,!1,D.value),R.click({event:e,node:V})}function ue(e){if(!gi(e)&&!b.value)if(bi.includes(e.key)&&G.value){const t="Escape"===e.key;Or(V,d.value,h,v,c,t,D.value)}else Y.value&&V.selected&&_i[e.key]&&(e.preventDefault(),_.value=`Moved selected node ${e.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~V.position.x}, y: ${~~V.position.y}`,B({x:_i[e.key].x,y:_i[e.key].y},e.shiftKey))}}}),gl={height:"0",width:"0"},ml=/* @__PURE__ */c({name:"EdgeLabelRenderer",compatConfig:{MODE:3},setup(e){const{viewportRef:t}=Za(),n=N(()=>{var e;return null==(e=t.value)?void 0:e.getElementsByClassName("vue-flow__edge-labels")[0]});return(e,t)=>(w(),y("svg",null,[(w(),y("foreignObject",gl,[(w(),_(X,{to:n.value,disabled:!n.value},[C(e.$slots,"default")],8,["to","disabled"]))]))]))}});const yl={class:"vue-flow__nodes vue-flow__container"},wl=/* @__PURE__ */c({name:"Nodes",compatConfig:{MODE:3},setup(e){const{getNodes:t,updateNodeDimensions:n,emits:o}=Za(),r=function(e={includeHiddenNodes:!1}){const{nodes:t}=Za();return u(()=>{if(0===t.value.length)return!1;for(const n of t.value)if((e.includeHiddenNodes||!n.hidden)&&(void 0===(null==n?void 0:n.handleBounds)||0===n.dimensions.width||0===n.dimensions.height))return!1;return!0})}(),a=g();return i(r,e=>{e&&I(()=>{o.nodesInitialized(t.value)})},{immediate:!0}),k(()=>{a.value=new ResizeObserver(e=>{const t=e.map(e=>({id:e.target.getAttribute("data-id"),nodeElement:e.target,forceUpdate:!0}));I(()=>n(t))})}),G(()=>{var e;return null==(e=a.value)?void 0:e.disconnect()}),(e,n)=>(w(),y("div",yl,[a.value?(w(!0),y(h,{key:0},Y(p(t),(e,t,n,o)=>{const i=[e.id];if(o&&o.key===e.id&&F(o,i))return o;const r=(w(),_(p(pl),{id:e.id,key:e.id,"resize-observer":a.value},null,8,["id","resize-observer"]));return r.memo=i,r},n,0),128)):b("",!0)]))}});const xl=/* @__PURE__ */x("div",{class:"vue-flow__edge-labels"},null,-1),bl=/* @__PURE__ */c({name:"VueFlow",compatConfig:{MODE:3},props:{id:{},modelValue:{},nodes:{},edges:{},edgeTypes:{},nodeTypes:{},connectionMode:{},connectionLineType:{},connectionLineStyle:{default:void 0},connectionLineOptions:{default:void 0},connectionRadius:{},isValidConnection:{type:[Function,null],default:void 0},deleteKeyCode:{default:void 0},selectionKeyCode:{type:[Boolean,null],default:void 0},multiSelectionKeyCode:{default:void 0},zoomActivationKeyCode:{default:void 0},panActivationKeyCode:{default:void 0},snapToGrid:{type:Boolean,default:void 0},snapGrid:{},onlyRenderVisibleElements:{type:Boolean,default:void 0},edgesUpdatable:{type:[Boolean,String],default:void 0},nodesDraggable:{type:Boolean,default:void 0},nodesConnectable:{type:Boolean,default:void 0},nodeDragThreshold:{},elementsSelectable:{type:Boolean,default:void 0},selectNodesOnDrag:{type:Boolean,default:void 0},panOnDrag:{type:[Boolean,Array],default:void 0},minZoom:{},maxZoom:{},defaultViewport:{},translateExtent:{},nodeExtent:{},defaultMarkerColor:{},zoomOnScroll:{type:Boolean,default:void 0},zoomOnPinch:{type:Boolean,default:void 0},panOnScroll:{type:Boolean,default:void 0},panOnScrollSpeed:{},panOnScrollMode:{},paneClickDistance:{},zoomOnDoubleClick:{type:Boolean,default:void 0},preventScrolling:{type:Boolean,default:void 0},selectionMode:{},edgeUpdaterRadius:{},fitViewOnInit:{type:Boolean,default:void 0},connectOnClick:{type:Boolean,default:void 0},applyDefault:{type:Boolean,default:void 0},autoConnect:{type:[Boolean,Function],default:void 0},noDragClassName:{},noWheelClassName:{},noPanClassName:{},defaultEdgeOptions:{},elevateEdgesOnSelect:{type:Boolean,default:void 0},elevateNodesOnSelect:{type:Boolean,default:void 0},disableKeyboardA11y:{type:Boolean,default:void 0},edgesFocusable:{type:Boolean,default:void 0},nodesFocusable:{type:Boolean,default:void 0},autoPanOnConnect:{type:Boolean,default:void 0},autoPanOnNodeDrag:{type:Boolean,default:void 0},autoPanSpeed:{}},emits:["nodesChange","edgesChange","nodesInitialized","paneReady","init","updateNodeInternals","error","connect","connectStart","connectEnd","clickConnectStart","clickConnectEnd","moveStart","move","moveEnd","selectionDragStart","selectionDrag","selectionDragStop","selectionContextMenu","selectionStart","selectionEnd","viewportChangeStart","viewportChange","viewportChangeEnd","paneScroll","paneClick","paneContextMenu","paneMouseEnter","paneMouseMove","paneMouseLeave","edgeUpdate","edgeContextMenu","edgeMouseEnter","edgeMouseMove","edgeMouseLeave","edgeDoubleClick","edgeClick","edgeUpdateStart","edgeUpdateEnd","nodeContextMenu","nodeMouseEnter","nodeMouseMove","nodeMouseLeave","nodeDoubleClick","nodeClick","nodeDragStart","nodeDrag","nodeDragStop","miniMapNodeClick","miniMapNodeDoubleClick","miniMapNodeMouseEnter","miniMapNodeMouseMove","miniMapNodeMouseLeave","update:modelValue","update:nodes","update:edges"],setup(e,{expose:t,emit:n}){const o=e,l=z(),u=ye(o,"modelValue",n),s=ye(o,"nodes",n),c=ye(o,"edges",n),d=Za(o),f=sa({modelValue:u,nodes:s,edges:c},o,d);return function(e,t){const n=a();function o(e){var t;const o=function(e){const[t,...n]=e.split(":");return`on${t.replace(/(?:^|-)(\w)/g,(e,t)=>t.toUpperCase())}${n.length?`:${n.join(":")}`:""}`}(e);return!!(null==(t=null==n?void 0:n.vnode.props)?void 0:t[o])}R(()=>{for(const[n,i]of Object.entries(t.value)){const t=t=>{e(n,t)};i.setEmitter(t),ne(i.removeEmitter),i.setHasEmitListeners(()=>o(n)),ne(i.removeHasEmitListeners)}})}(n,d.hooks),function(){const e=Za();i(()=>e.viewportHelper.value.viewportInitialized,t=>{t&&setTimeout(()=>{e.emits.init(e),e.emits.paneReady(e)},1)})}(),function(){const{emits:e}=Za();k(()=>{if($r()){const t=document.querySelector(".vue-flow__pane");t&&"1"!==window.getComputedStyle(t).zIndex&&e.error(new wr(mr.MISSING_STYLES))}})}(),r(Wr,l),B(f),t(d),(e,t)=>(w(),y("div",{ref:p(d).vueFlowRef,class:"vue-flow"},[V(Qa,null,{default:L(()=>[V(hl),xl,V(wl),C(e.$slots,"zoom-pane")]),_:3}),C(e.$slots,"default"),V(ol)],512))}}),_l=/* @__PURE__ */c({name:"Panel",compatConfig:{MODE:3},props:{position:{}},setup(e){const t=e,{userSelectionActive:n}=Za(),o=u(()=>`${t.position}`.split("-"));return(e,t)=>(w(),y("div",{class:M(["vue-flow__panel",o.value]),style:P({pointerEvents:p(n)?"none":"all"})},[C(e.$slots,"default")],6))}});function El(e={}){const{handleType:t,handleId:n,nodeId:o,onConnect:r,onDisconnect:a}=e,{connectionLookup:l}=Za(),s=ea(),c=g(null),d=g(),f=u(()=>{const e=O(o)??s,i=O(t),r=O(n);let a="";return i&&(a=r?`-${i}-${r}`:`-${i}`),`${e}${a}`});return i(()=>l.value.get(f.value),e=>{(function(e,t){if(!e&&!t)return!0;if(!e||!t||e.size!==t.size)return!1;if(!e.size&&!t.size)return!0;for(const n of e.keys())if(!t.has(n))return!1;return!0})(d.value,e)||(d.value=e)},{immediate:!0}),i([d,()=>void 0!==r,()=>void 0!==a],([e=/* @__PURE__ */new Map])=>{c.value&&c.value!==e&&(Hr(c.value,e,a),Hr(e,c.value,r)),c.value=e},{immediate:!0}),u(()=>d.value?Array.from(d.value.values()):[])}const Sl=/* @__PURE__ */c({name:"NodeToolbar",compatConfig:{MODE:3},inheritAttrs:!1,props:{nodeId:{},isVisible:{type:Boolean,default:void 0},position:{default:li.Top},offset:{default:10},align:{default:"center"}},setup(e){const t=e,o=n(Xr,null),{viewportRef:i,viewport:r,getSelectedNodes:a,findNode:l}=Za(),s=u(()=>(Array.isArray(t.nodeId)?t.nodeId:[t.nodeId||o||""]).reduce((e,t)=>{const n=l(t);return n&&e.push(n),e},[])),c=u(()=>"boolean"==typeof t.isVisible?t.isVisible:1===s.value.length&&s.value[0].selected&&1===a.value.length),d=u(()=>Gi(s.value)),f=u(()=>Math.max(...s.value.map(e=>(e.computedPosition.z||1)+1))),v=u(()=>({position:"absolute",transform:h(d.value,r.value,t.position,t.offset,t.align),zIndex:f.value}));function h(e,t,n,o,i){let r=.5;"start"===i?r=0:"end"===i&&(r=1);let a=[(e.x+e.width*r)*t.zoom+t.x,e.y*t.zoom+t.y-o],l=[-100*r,-100];switch(n){case li.Right:a=[(e.x+e.width)*t.zoom+t.x+o,(e.y+e.height*r)*t.zoom+t.y],l=[0,-100*r];break;case li.Bottom:a[1]=(e.y+e.height)*t.zoom+t.y+o,l[1]=0;break;case li.Left:a=[e.x*t.zoom+t.x-o,(e.y+e.height*r)*t.zoom+t.y],l=[-100,-100*r]}return`translate(${a[0]}px, ${a[1]}px) translate(${l[0]}%, ${l[1]}%)`}return(e,t)=>(w(),_(X,{to:p(i),disabled:!p(i)},[c.value&&s.value.length?(w(),y("div",E({key:0},e.$attrs,{style:v.value,class:"vue-flow__node-toolbar"}),[C(e.$slots,"default")],16)):b("",!0)],8,["to","disabled"]))}}),Nl=/* @__PURE__ */c({inheritAttrs:!1,__name:"DefaultToolbar",props:{nodeId:{type:String,required:!0},toolbarVisible:{type:Boolean,default:!1},toolbarPosition:{type:String,default:li.Right}},setup(e){const t=e,o=n("createNewNode"),i=()=>{o({type:"empty",parentId:t.nodeId,sourceHandle:"success"})};return(t,n)=>{const o=U("Button");return w(),y(h,null,[V(p(Sl),{"is-visible":e.toolbarVisible,position:e.toolbarPosition},{default:L(()=>[V(o,{size:"icon",class:"rounded-full bg-purple-500 hover:bg-purple-600",onClick:i},{default:L(()=>[V(p(te),{class:"text-white size-5"})]),_:1})]),_:1},8,["is-visible","position"]),C(t.$slots,"default")],64)}}}),kl=/* @__PURE__ */c({__name:"NodeContextMenu",props:{nodeId:{type:String,required:!0},hasErrorSource:{type:Boolean,default:!1},circleNode:{type:Boolean,default:!1}},setup:e=>(t,n)=>{const o=U("ContextMenuTrigger"),i=U("ContextMenuItem"),r=U("ContextMenuSeparator"),a=U("ContextMenuContent"),l=U("ContextMenu");return w(),_(l,null,{default:L(()=>[V(o,null,{default:L(()=>[x("div",{class:M(["absolute top-0 left-0 w-full h-full",""+(e.circleNode?"rounded-full":"rounded-[0.5rem]")])},null,2)]),_:1}),V(a,{class:"w-64"},{default:L(()=>[V(i,{inset:""},{default:L(()=>[A($(e.hasErrorSource?"Add Success Path...":"Add New Node..."),1)]),_:1}),e.hasErrorSource?(w(),_(i,{key:0,inset:""},{default:L(()=>[...n[0]||(n[0]=[A(" Add Error Path... ",-1)])]),_:1})):b("",!0),V(r),V(i,{inset:""},{default:L(()=>[...n[1]||(n[1]=[A(" Edit Node... ",-1)])]),_:1}),V(i,{inset:""},{default:L(()=>[...n[2]||(n[2]=[A(" Copy Node... ",-1)])]),_:1}),V(i,{inset:""},{default:L(()=>[...n[3]||(n[3]=[A(" Duplicate Node... ",-1)])]),_:1}),V(r),V(i,{inset:"",variant:"destructive"},{default:L(()=>[...n[4]||(n[4]=[A(" Delete Node... ",-1)])]),_:1})]),_:1})]),_:1})}});export{ci as C,te as P,_l as _,Yi as a,Xi as b,ee as c,El as d,Nl as e,kl as f,Gi as g,ha as h,_r as i,li as j,Sl as k,Aa as l,Ma as m,ml as n,vi as o,bl as p,Za as u,Ki as w};
package/dist/cms-kit2.cjs DELETED
@@ -1 +0,0 @@
1
- "use strict";const e=require("./NodeContextMenu.vue_vue_type_script_setup_true_lang-DB8mkGJV.cjs"),t={id:{type:String,required:!0},position:{type:Object,required:!0},data:{type:Object}},r={NodeContextMenu:e._sfc_main$2,NodeToolbarWrapper:e._sfc_main$1,nodeProps:t};module.exports=r;
package/dist/cms-kit2.js DELETED
@@ -1 +0,0 @@
1
- import{e,f as t}from"./NodeContextMenu.vue_vue_type_script_setup_true_lang-DcZ2WodM.js";const o={NodeContextMenu:t,NodeToolbarWrapper:e,nodeProps:{id:{type:String,required:!0},position:{type:Object,required:!0},data:{type:Object}}};export{o as default};
@@ -1 +0,0 @@
1
- export {}