CoreFiles by mySites.guru
workflow-graph.min.js63 lines, 361,550 bytes, from Joomla_6.1.3-Stable-Full_Package.zip
Raw History Compare with 6.1.2
md5
1bc207a7d67bc23f3ad22f007c472d82
sha1
c2e039bf670339186a1c67cd5437562b2828b044
sha256
bd850284a4aada11f7ad1a1f0e7b7e4b0b65a33bf5ab97abde2ea33e2245eded
import ua from"joomla.dialog";/**
* @vue/shared v3.5.30
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function Qr(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Fe={},Kn=[],Mt=()=>{},ca=()=>!1,wi=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),es=e=>e.startsWith("onUpdate:"),Ue=Object.assign,ts=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},ch=Object.prototype.hasOwnProperty,Te=(e,t)=>ch.call(e,t),ye=Array.isArray,Yn=e=>wo(e)==="[object Map]",da=e=>wo(e)==="[object Set]",fa=e=>wo(e)==="[object Date]",we=e=>typeof e=="function",ze=e=>typeof e=="string",yt=e=>typeof e=="symbol",Me=e=>e!==null&&typeof e=="object",ha=e=>(Me(e)||we(e))&&we(e.then)&&we(e.catch),ga=Object.prototype.toString,wo=e=>ga.call(e),dh=e=>wo(e).slice(8,-1),pa=e=>wo(e)==="[object Object]",bi=e=>ze(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,bo=Qr(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Si=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},fh=/-\w/g,ot=Si(e=>e.replace(fh,t=>t.slice(1).toUpperCase())),hh=/\B([A-Z])/g,dn=Si(e=>e.replace(hh,"-$1").toLowerCase()),Ei=Si(e=>e.charAt(0).toUpperCase()+e.slice(1)),ns=Si(e=>e?"on"+Ei(e):""),_t=(e,t)=>!Object.is(e,t),os=function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];for(let r=0;r<t.length;r++)t[r](...o)},va=function(t,n,o,i){i===void 0&&(i=!1),Object.defineProperty(t,n,{configurable:!0,enumerable:!1,writable:i,value:o})},gh=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let ma;const So=()=>ma||(ma=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Xe(e){if(ye(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],i=ze(o)?yh(o):Xe(o);if(i)for(const r in i)t[r]=i[r]}return t}else if(ze(e)||Me(e))return e}const ph=/;(?![^(]*\))/g,vh=/:([^]+)/,mh=/\/\*[^]*?\*\//g;function yh(e){const t={};return e.replace(mh,"").split(ph).forEach(n=>{if(n){const o=n.split(vh);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function Be(e){let t="";if(ze(e))t=e;else if(ye(e))for(let n=0;n<e.length;n++){const o=Be(e[n]);o&&(t+=o+" ")}else if(Me(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function _h(e){if(!e)return null;let t=e.class,n=e.style;return t&&!ze(t)&&(e.class=Be(t)),n&&(e.style=Xe(n)),e}const wh="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",bh=Qr(wh);function ya(e){return!!e||e===""}function Sh(e,t){if(e.length!==t.length)return!1;let n=!0;for(let o=0;n&&o<e.length;o++)n=is(e[o],t[o]);return n}function is(e,t){if(e===t)return!0;let n=fa(e),o=fa(t);if(n||o)return n&&o?e.getTime()===t.getTime():!1;if(n=yt(e),o=yt(t),n||o)return e===t;if(n=ye(e),o=ye(t),n||o)return n&&o?Sh(e,t):!1;if(n=Me(e),o=Me(t),n||o){if(!n||!o)return!1;const i=Object.keys(e).length,r=Object.keys(t).length;if(i!==r)return!1;for(const s in e){const l=e.hasOwnProperty(s),a=t.hasOwnProperty(s);if(l&&!a||!l&&a||!is(e[s],t[s]))return!1}}return String(e)===String(t)}const _a=e=>!!(e&&e.__v_isRef===!0),ve=e=>ze(e)?e:e==null?"":ye(e)||Me(e)&&(e.toString===ga||!we(e.toString))?_a(e)?ve(e.value):JSON.stringify(e,wa,2):String(e),wa=(e,t)=>_a(t)?wa(e,t.value):Yn(t)?{["Map("+t.size+")"]:[...t.entries()].reduce((n,o,i)=>{let r=o[0],s=o[1];return n[rs(r,i)+" =>"]=s,n},{})}:da(t)?{["Set("+t.size+")"]:[...t.values()].map(n=>rs(n))}:yt(t)?rs(t):Me(t)&&!ye(t)&&!pa(t)?String(t):t,rs=function(t,n){n===void 0&&(n="");var o;return yt(t)?"Symbol("+((o=t.description)!=null?o:n)+")":t};/**
* @vue/reactivity v3.5.30
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let Qe;class ba{constructor(t){t===void 0&&(t=!1),this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.__v_skip=!0,this.parent=Qe,!t&&Qe&&(this.index=(Qe.scopes||(Qe.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=Qe;try{return Qe=this,t()}finally{Qe=n}}}on(){++this._on===1&&(this.prevScope=Qe,Qe=this)}off(){this._on>0&&--this._on===0&&(Qe=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,o;for(n=0,o=this.effects.length;n<o;n++)this.effects[n].stop();for(this.effects.length=0,n=0,o=this.cleanups.length;n<o;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,o=this.scopes.length;n<o;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0}}}function ss(e){return new ba(e)}function ls(){return Qe}function xi(e,t){Qe&&Qe.cleanups.push(e)}let Le;const as=new WeakSet;class Sa{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Qe&&Qe.active&&Qe.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,as.has(this)&&(as.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||xa(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Ta(this),Aa(this);const t=Le,n=wt;Le=this,wt=!0;try{return this.fn()}finally{Oa(this),Le=t,wt=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)fs(t);this.deps=this.depsTail=void 0,Ta(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?as.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){ds(this)&&this.run()}get dirty(){return ds(this)}}let Ea=0,Eo,xo;function xa(e,t){if(t===void 0&&(t=!1),e.flags|=8,t){e.next=xo,xo=e;return}e.next=Eo,Eo=e}function us(){Ea++}function cs(){if(--Ea>0)return;if(xo){let t=xo;for(xo=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Eo;){let t=Eo;for(Eo=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(o){e||(e=o)}t=n}}if(e)throw e}function Aa(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Oa(e){let t,n=e.depsTail,o=n;for(;o;){const i=o.prevDep;o.version===-1?(o===n&&(n=i),fs(o),Eh(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=i}e.deps=t,e.depsTail=n}function ds(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ca(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Ca(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ao)||(e.globalVersion=Ao,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!ds(e))))return;e.flags|=2;const t=e.dep,n=Le,o=wt;Le=e,wt=!0;try{Aa(e);const i=e.fn(e._value);(t.version===0||_t(i,e._value))&&(e.flags|=128,e._value=i,t.version++)}catch(i){throw t.version++,i}finally{Le=n,wt=o,Oa(e),e.flags&=-3}}function fs(e,t){t===void 0&&(t=!1);const n=e.dep,o=e.prevSub,i=e.nextSub;if(o&&(o.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=o,e.nextSub=void 0),n.subs===e&&(n.subs=o,!o&&n.computed)){n.computed.flags&=-5;for(let r=n.computed.deps;r;r=r.nextDep)fs(r,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Eh(e){const t=e.prevDep,n=e.nextDep;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let wt=!0;const Na=[];function It(){Na.push(wt),wt=!1}function Pt(){const e=Na.pop();wt=e===void 0?!0:e}function Ta(e){const t=e.cleanup;if(e.cleanup=void 0,t){const n=Le;Le=void 0;try{t()}finally{Le=n}}}let Ao=0;class xh{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Ai{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Le||!wt||Le===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Le)n=this.activeLink=new xh(Le,this),Le.deps?(n.prevDep=Le.depsTail,Le.depsTail.nextDep=n,Le.depsTail=n):Le.deps=Le.depsTail=n,Ma(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const o=n.nextDep;o.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=o),n.prevDep=Le.depsTail,n.nextDep=void 0,Le.depsTail.nextDep=n,Le.depsTail=n,Le.deps===n&&(Le.deps=o)}return n}trigger(t){this.version++,Ao++,this.notify(t)}notify(t){us();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{cs()}}}function Ma(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let o=t.deps;o;o=o.nextDep)Ma(o)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Oi=new WeakMap,Cn=Symbol(""),hs=Symbol(""),Oo=Symbol("");function et(e,t,n){if(wt&&Le){let o=Oi.get(e);o||Oi.set(e,o=new Map);let i=o.get(n);i||(o.set(n,i=new Ai),i.map=o,i.key=n),i.track()}}function Xt(e,t,n,o,i,r){const s=Oi.get(e);if(!s){Ao++;return}const l=a=>{a&&a.trigger()};if(us(),t==="clear")s.forEach(l);else{const a=ye(e),u=a&&bi(n);if(a&&n==="length"){const c=Number(o);s.forEach((d,f)=>{(f==="length"||f===Oo||!yt(f)&&f>=c)&&l(d)})}else switch((n!==void 0||s.has(void 0))&&l(s.get(n)),u&&l(s.get(Oo)),t){case"add":a?u&&l(s.get("length")):(l(s.get(Cn)),Yn(e)&&l(s.get(hs)));break;case"delete":a||(l(s.get(Cn)),Yn(e)&&l(s.get(hs)));break;case"set":Yn(e)&&l(s.get(Cn));break}}cs()}function Ah(e,t){const n=Oi.get(e);return n&&n.get(t)}function Un(e){const t=Oe(e);return t===e?t:(et(t,"iterate",Oo),ht(e)?t:t.map(bt))}function Ci(e){return et(e=Oe(e),"iterate",Oo),e}function Rt(e,t){return Zt(e)?Xn(Nn(e)?bt(t):t):bt(t)}const Oh={__proto__:null,[Symbol.iterator](){return gs(this,Symbol.iterator,e=>Rt(this,e))},concat(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Un(this).concat(...t.map(o=>ye(o)?Un(o):o))},entries(){return gs(this,"entries",e=>(e[1]=Rt(this,e[1]),e))},every(e,t){return qt(this,"every",e,t,void 0,arguments)},filter(e,t){return qt(this,"filter",e,t,n=>n.map(o=>Rt(this,o)),arguments)},find(e,t){return qt(this,"find",e,t,n=>Rt(this,n),arguments)},findIndex(e,t){return qt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return qt(this,"findLast",e,t,n=>Rt(this,n),arguments)},findLastIndex(e,t){return qt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return qt(this,"forEach",e,t,void 0,arguments)},includes(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ps(this,"includes",t)},indexOf(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ps(this,"indexOf",t)},join(e){return Un(this).join(e)},lastIndexOf(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ps(this,"lastIndexOf",t)},map(e,t){return qt(this,"map",e,t,void 0,arguments)},pop(){return Co(this,"pop")},push(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Co(this,"push",t)},reduce(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return Ia(this,"reduce",e,n)},reduceRight(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return Ia(this,"reduceRight",e,n)},shift(){return Co(this,"shift")},some(e,t){return qt(this,"some",e,t,void 0,arguments)},splice(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Co(this,"splice",t)},toReversed(){return Un(this).toReversed()},toSorted(e){return Un(this).toSorted(e)},toSpliced(){return Un(this).toSpliced(...arguments)},unshift(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Co(this,"unshift",t)},values(){return gs(this,"values",e=>Rt(this,e))}};function gs(e,t,n){const o=Ci(e),i=o[t]();return o!==e&&!ht(e)&&(i._next=i.next,i.next=()=>{const r=i._next();return r.done||(r.value=n(r.value)),r}),i}const Ch=Array.prototype;function qt(e,t,n,o,i,r){const s=Ci(e),l=s!==e&&!ht(e),a=s[t];if(a!==Ch[t]){const d=a.apply(e,r);return l?bt(d):d}let u=n;s!==e&&(l?u=function(f,p){return n.call(this,Rt(e,f),p,e)}:n.length>2&&(u=function(f,p){return n.call(this,f,p,e)}));const c=a.call(s,u,o);return l&&i?i(c):c}function Ia(e,t,n,o){const i=Ci(e),r=i!==e&&!ht(e);let s=n,l=!1;i!==e&&(r?(l=o.length===0,s=function(c,d,f){return l&&(l=!1,c=Rt(e,c)),n.call(this,c,Rt(e,d),f,e)}):n.length>3&&(s=function(c,d,f){return n.call(this,c,d,f,e)}));const a=i[t](s,...o);return l?Rt(e,a):a}function ps(e,t,n){const o=Oe(e);et(o,"iterate",Oo);const i=o[t](...n);return(i===-1||i===!1)&&Ri(n[0])?(n[0]=Oe(n[0]),o[t](...n)):i}function Co(e,t,n){n===void 0&&(n=[]),It(),us();const o=Oe(e)[t].apply(e,n);return cs(),Pt(),o}const Nh=Qr("__proto__,__v_isRef,__isVue"),Pa=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(yt));function Th(e){yt(e)||(e=String(e));const t=Oe(this);return et(t,"has",e),t.hasOwnProperty(e)}class Ra{constructor(t,n){t===void 0&&(t=!1),n===void 0&&(n=!1),this._isReadonly=t,this._isShallow=n}get(t,n,o){if(n==="__v_skip")return t.__v_skip;const i=this._isReadonly,r=this._isShallow;if(n==="__v_isReactive")return!i;if(n==="__v_isReadonly")return i;if(n==="__v_isShallow")return r;if(n==="__v_raw")return o===(i?r?Ha:La:r?Fa:$a).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const s=ye(t);if(!i){let a;if(s&&(a=Oh[n]))return a;if(n==="hasOwnProperty")return Th}const l=Reflect.get(t,n,Ve(t)?t:o);if((yt(n)?Pa.has(n):Nh(n))||(i||et(t,"get",n),r))return l;if(Ve(l)){const a=s&&bi(n)?l:l.value;return i&&Me(a)?Ii(a):a}return Me(l)?i?Ii(l):No(l):l}}class Da extends Ra{constructor(t){t===void 0&&(t=!1),super(!1,t)}set(t,n,o,i){let r=t[n];const s=ye(t)&&bi(n);if(!this._isShallow){const u=Zt(r);if(!ht(o)&&!Zt(o)&&(r=Oe(r),o=Oe(o)),!s&&Ve(r)&&!Ve(o))return u||(r.value=o),!0}const l=s?Number(n)<t.length:Te(t,n),a=Reflect.set(t,n,o,Ve(t)?t:i);return t===Oe(i)&&(l?_t(o,r)&&Xt(t,"set",n,o):Xt(t,"add",n,o)),a}deleteProperty(t,n){const o=Te(t,n);t[n];const i=Reflect.deleteProperty(t,n);return i&&o&&Xt(t,"delete",n,void 0),i}has(t,n){const o=Reflect.has(t,n);return(!yt(n)||!Pa.has(n))&&et(t,"has",n),o}ownKeys(t){return et(t,"iterate",ye(t)?"length":Cn),Reflect.ownKeys(t)}}class ka extends Ra{constructor(t){t===void 0&&(t=!1),super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const Mh=new Da,Ih=new ka,Ph=new Da(!0),Rh=new ka(!0),vs=e=>e,Ni=e=>Reflect.getPrototypeOf(e);function Dh(e,t,n){return function(){const o=this.__v_raw,i=Oe(o),r=Yn(i),s=e==="entries"||e===Symbol.iterator&&r,l=e==="keys"&&r,a=o[e](...arguments),u=n?vs:t?Xn:bt;return!t&&et(i,"iterate",l?hs:Cn),Ue(Object.create(a),{next(){const c=a.next(),d=c.value,f=c.done;return f?{value:d,done:f}:{value:s?[u(d[0]),u(d[1])]:u(d),done:f}}})}}function Ti(e){return function(){return e==="delete"?!1:e==="clear"?void 0:this}}function kh(e,t){const n={get(i){const r=this.__v_raw,s=Oe(r),l=Oe(i);e||(_t(i,l)&&et(s,"get",i),et(s,"get",l));const a=Ni(s),u=a.has,c=t?vs:e?Xn:bt;if(u.call(s,i))return c(r.get(i));if(u.call(s,l))return c(r.get(l));r!==s&&r.get(i)},get size(){const i=this.__v_raw;return!e&&et(Oe(i),"iterate",Cn),i.size},has(i){const r=this.__v_raw,s=Oe(r),l=Oe(i);return e||(_t(i,l)&&et(s,"has",i),et(s,"has",l)),i===l?r.has(i):r.has(i)||r.has(l)},forEach(i,r){const s=this,l=s.__v_raw,a=Oe(l),u=t?vs:e?Xn:bt;return!e&&et(a,"iterate",Cn),l.forEach((c,d)=>i.call(r,u(c),u(d),s))}};return Ue(n,e?{add:Ti("add"),set:Ti("set"),delete:Ti("delete"),clear:Ti("clear")}:{add(i){const r=Oe(this),s=Ni(r),l=Oe(i),a=!t&&!ht(i)&&!Zt(i)?l:i;return s.has.call(r,a)||_t(i,a)&&s.has.call(r,i)||_t(l,a)&&s.has.call(r,l)||(r.add(a),Xt(r,"add",a,a)),this},set(i,r){!t&&!ht(r)&&!Zt(r)&&(r=Oe(r));const s=Oe(this),l=Ni(s),a=l.has,u=l.get;let c=a.call(s,i);c||(i=Oe(i),c=a.call(s,i));const d=u.call(s,i);return s.set(i,r),c?_t(r,d)&&Xt(s,"set",i,r):Xt(s,"add",i,r),this},delete(i){const r=Oe(this),s=Ni(r),l=s.has,a=s.get;let u=l.call(r,i);u||(i=Oe(i),u=l.call(r,i)),a&&a.call(r,i);const c=r.delete(i);return u&&Xt(r,"delete",i,void 0),c},clear(){const i=Oe(this),r=i.size!==0,s=i.clear();return r&&Xt(i,"clear",void 0,void 0),s}}),["keys","values","entries",Symbol.iterator].forEach(i=>{n[i]=Dh(i,e,t)}),n}function Mi(e,t){const n=kh(e,t);return(o,i,r)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?o:Reflect.get(Te(n,i)&&i in o?n:o,i,r)}const $h={get:Mi(!1,!1)},Fh={get:Mi(!1,!0)},Lh={get:Mi(!0,!1)},Hh={get:Mi(!0,!0)},$a=new WeakMap,Fa=new WeakMap,La=new WeakMap,Ha=new WeakMap;function Wh(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function zh(e){return e.__v_skip||!Object.isExtensible(e)?0:Wh(dh(e))}function No(e){return Zt(e)?e:Pi(e,!1,Mh,$h,$a)}function Bh(e){return Pi(e,!1,Ph,Fh,Fa)}function Ii(e){return Pi(e,!0,Ih,Lh,La)}function vO(e){return Pi(e,!0,Rh,Hh,Ha)}function Pi(e,t,n,o,i){if(!Me(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const r=zh(e);if(r===0)return e;const s=i.get(e);if(s)return s;const l=new Proxy(e,r===2?o:n);return i.set(e,l),l}function Nn(e){return Zt(e)?Nn(e.__v_raw):!!(e&&e.__v_isReactive)}function Zt(e){return!!(e&&e.__v_isReadonly)}function ht(e){return!!(e&&e.__v_isShallow)}function Ri(e){return e?!!e.__v_raw:!1}function Oe(e){const t=e&&e.__v_raw;return t?Oe(t):e}function To(e){return!Te(e,"__v_skip")&&Object.isExtensible(e)&&va(e,"__v_skip",!0),e}const bt=e=>Me(e)?No(e):e,Xn=e=>Me(e)?Ii(e):e;function Ve(e){return e?e.__v_isRef===!0:!1}function Ce(e){return Wa(e,!1)}function fn(e){return Wa(e,!0)}function Wa(e,t){return Ve(e)?e:new Vh(e,t)}class Vh{constructor(t,n){this.dep=new Ai,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Oe(t),this._value=n?t:bt(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,o=this.__v_isShallow||ht(t)||Zt(t);t=o?t:Oe(t),_t(t,n)&&(this._rawValue=t,this._value=o?t:bt(t),this.dep.trigger())}}function de(e){return Ve(e)?e.value:e}function xe(e){return we(e)?e():de(e)}const Gh={get:(e,t,n)=>t==="__v_raw"?e:de(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const i=e[t];return Ve(i)&&!Ve(n)?(i.value=n,!0):Reflect.set(e,t,n,o)}};function za(e){return Nn(e)?e:new Proxy(e,Gh)}class Kh{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new Ai,o=t(n.track.bind(n),n.trigger.bind(n)),i=o.get,r=o.set;this._get=i,this._set=r}get value(){return this._value=this._get()}set value(t){this._set(t)}}function Yh(e){return new Kh(e)}function Uh(e){const t=ye(e)?new Array(e.length):{};for(const n in e)t[n]=Ba(e,n);return t}class Xh{constructor(t,n,o){this._object=t,this._key=n,this._defaultValue=o,this.__v_isRef=!0,this._value=void 0,this._raw=Oe(t);let i=!0,r=t;if(!ye(t)||!bi(String(n)))do i=!Ri(r)||ht(r);while(i&&(r=r.__v_raw));this._shallow=i}get value(){let t=this._object[this._key];return this._shallow&&(t=de(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&Ve(this._raw[this._key])){const n=this._object[this._key];if(Ve(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return Ah(this._raw,this._key)}}class qh{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function De(e,t,n){return Ve(e)?e:we(e)?new qh(e):Me(e)&&arguments.length>1?Ba(e,t,n):Ce(e)}function Ba(e,t,n){return new Xh(e,t,n)}class Zh{constructor(t,n,o){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Ai(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ao-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=o}notify(){if(this.flags|=16,!(this.flags&8)&&Le!==this)return xa(this,!0),!0}get value(){const t=this.dep.track();return Ca(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function jh(e,t,n){n===void 0&&(n=!1);let o,i;return we(e)?o=e:(o=e.get,i=e.set),new Zh(o,i,n)}const Di={},ki=new WeakMap;let Tn;function Jh(e,t,n){if(n===void 0&&(n=Tn),n){let o=ki.get(n);o||ki.set(n,o=[]),o.push(e)}}function Qh(e,t,n){n===void 0&&(n=Fe);const o=n,i=o.immediate,r=o.deep,s=o.once,l=o.scheduler,a=o.augmentJob,u=o.call,c=F=>r?F:ht(F)||r===!1||r===0?hn(F,1):hn(F);let d,f,p,x,b=!1,_=!1;if(Ve(e)?(f=()=>e.value,b=ht(e)):Nn(e)?(f=()=>c(e),b=!0):ye(e)?(_=!0,b=e.some(F=>Nn(F)||ht(F)),f=()=>e.map(F=>{if(Ve(F))return F.value;if(Nn(F))return c(F);if(we(F))return u?u(F,2):F()})):we(e)?t?f=u?()=>u(e,2):e:f=()=>{if(p){It();try{p()}finally{Pt()}}const F=Tn;Tn=d;try{return u?u(e,3,[x]):e(x)}finally{Tn=F}}:f=Mt,t&&r){const F=f,z=r===!0?1/0:r;f=()=>hn(F(),z)}const A=ls(),P=()=>{d.stop(),A&&A.active&&ts(A.effects,d)};if(s&&t){const F=t;t=function(){F(...arguments),P()}}let I=_?new Array(e.length).fill(Di):Di;const m=F=>{if(!(!(d.flags&1)||!d.dirty&&!F))if(t){const z=d.run();if(r||b||(_?z.some((q,G)=>_t(q,I[G])):_t(z,I))){p&&p();const q=Tn;Tn=d;try{const G=[z,I===Di?void 0:_&&I[0]===Di?[]:I,x];I=z,u?u(t,3,G):t(...G)}finally{Tn=q}}}else d.run()};return a&&a(m),d=new Sa(f),d.scheduler=l?()=>l(m,!1):m,x=F=>Jh(F,!1,d),p=d.onStop=()=>{const F=ki.get(d);if(F){if(u)u(F,4);else for(const z of F)z();ki.delete(d)}},t?i?m(!0):I=d.run():l?l(m.bind(null,!0),!0):d.run(),P.pause=d.pause.bind(d),P.resume=d.resume.bind(d),P.stop=P,P}function hn(e,t,n){if(t===void 0&&(t=1/0),t<=0||!Me(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Ve(e))hn(e.value,t,n);else if(ye(e))for(let o=0;o<e.length;o++)hn(e[o],t,n);else if(da(e)||Yn(e))e.forEach(o=>{hn(o,t,n)});else if(pa(e)){for(const o in e)hn(e[o],t,n);for(const o of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,o)&&hn(e[o],t,n)}return e}/**
* @vue/runtime-core v3.5.30
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/const Mo=[];let ms=!1;function mO(e){if(ms)return;ms=!0,It();const t=Mo.length?Mo[Mo.length-1].component:null,n=t&&t.appContext.config.warnHandler,o=eg();for(var i=arguments.length,r=new Array(i>1?i-1:0),s=1;s<i;s++)r[s-1]=arguments[s];if(n)qn(n,t,11,[e+r.map(l=>{var a,u;return(u=(a=l.toString)==null?void 0:a.call(l))!=null?u:JSON.stringify(l)}).join(""),t&&t.proxy,o.map(l=>{let a=l.vnode;return"at <"+qu(t,a.type)+">"}).join(`
`),o]);else{const l=["[Vue warn]: "+e,...r];o.length&&l.push(`
`,...tg(o)),console.warn(...l)}Pt(),ms=!1}function eg(){let e=Mo[Mo.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const o=e.component&&e.component.parent;e=o&&o.vnode}return t}function tg(e){const t=[];return e.forEach((n,o)=>{t.push(...o===0?[]:[`
`],...ng(n))}),t}function ng(e){let t=e.vnode,n=e.recurseCount;const o=n>0?"... ("+n+" recursive calls)":"",i=t.component?t.component.parent==null:!1,r=" at <"+qu(t.component,t.type,i),s=">"+o;return t.props?[r,...og(t.props),s]:[r+s]}function og(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(o=>{t.push(...Va(o,e[o]))}),n.length>3&&t.push(" ..."),t}function Va(e,t,n){return ze(t)?(t=JSON.stringify(t),n?t:[e+"="+t]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[e+"="+t]:Ve(t)?(t=Va(e,Oe(t.value),!0),n?t:[e+"=Ref<",t,">"]):we(t)?[e+"=fn"+(t.name?"<"+t.name+">":"")]:(t=Oe(t),n?t:[e+"=",t])}function qn(e,t,n,o){try{return o?e(...o):e()}catch(i){$i(i,t,n)}}function Dt(e,t,n,o){if(we(e)){const i=qn(e,t,n,o);return i&&ha(i)&&i.catch(r=>{$i(r,t,n)}),i}if(ye(e)){const i=[];for(let r=0;r<e.length;r++)i.push(Dt(e[r],t,n,o));return i}}function $i(e,t,n,o){o===void 0&&(o=!0);const i=t?t.vnode:null,r=t&&t.appContext.config||Fe,s=r.errorHandler,l=r.throwUnhandledErrorInProduction;if(t){let a=t.parent;const u=t.proxy,c="https://vuejs.org/error-reference/#runtime-"+n;for(;a;){const d=a.ec;if(d){for(let f=0;f<d.length;f++)if(d[f](e,u,c)===!1)return}a=a.parent}if(s){It(),qn(s,null,10,[e,u,c]),Pt();return}}ig(e,n,i,o,l)}function ig(e,t,n,o,i){if(i===void 0&&(i=!1),i)throw e;console.error(e)}const it=[];let kt=-1;const Zn=[];let gn=null,jn=0;const Ga=Promise.resolve();let Fi=null;function $t(e){const t=Fi||Ga;return e?t.then(this?e.bind(this):e):t}function rg(e){let t=kt+1,n=it.length;for(;t<n;){const o=t+n>>>1,i=it[o],r=Io(i);r<e||r===e&&i.flags&2?t=o+1:n=o}return t}function ys(e){if(!(e.flags&1)){const t=Io(e),n=it[it.length-1];!n||!(e.flags&2)&&t>=Io(n)?it.push(e):it.splice(rg(t),0,e),e.flags|=1,Ka()}}function Ka(){Fi||(Fi=Ga.then(Xa))}function sg(e){ye(e)?Zn.push(...e):gn&&e.id===-1?gn.splice(jn+1,0,e):e.flags&1||(Zn.push(e),e.flags|=1),Ka()}function Ya(e,t,n){for(n===void 0&&(n=kt+1);n<it.length;n++){const o=it[n];if(o&&o.flags&2){if(e&&o.id!==e.uid)continue;it.splice(n,1),n--,o.flags&4&&(o.flags&=-2),o(),o.flags&4||(o.flags&=-2)}}}function Ua(e){if(Zn.length){const t=[...new Set(Zn)].sort((n,o)=>Io(n)-Io(o));if(Zn.length=0,gn){gn.push(...t);return}for(gn=t,jn=0;jn<gn.length;jn++){const n=gn[jn];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}gn=null,jn=0}}const Io=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Xa(e){const t=Mt;try{for(kt=0;kt<it.length;kt++){const n=it[kt];n&&!(n.flags&8)&&(n.flags&4&&(n.flags&=-2),qn(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2))}}finally{for(;kt<it.length;kt++){const n=it[kt];n&&(n.flags&=-2)}kt=-1,it.length=0,Ua(),Fi=null,(it.length||Zn.length)&&Xa()}}let rt=null,qa=null;function Li(e){const t=rt;return rt=e,qa=e&&e.type.__scopeId||null,t}function pn(e,t,n){if(t===void 0&&(t=rt),!t||e._n)return e;const o=function(){o._d&&Ui(-1);const r=Li(t);let s;try{s=e(...arguments)}finally{Li(r),o._d&&Ui(1)}return s};return o._n=!0,o._c=!0,o._d=!0,o}function Mn(e,t,n,o){const i=e.dirs,r=t&&t.dirs;for(let s=0;s<i.length;s++){const l=i[s];r&&(l.oldValue=r[s].value);let a=l.dir[o];a&&(It(),Dt(a,n,8,[e.el,l,e,t]),Pt())}}function vn(e,t){if(nt){let n=nt.provides;const o=nt.parent&&nt.parent.provides;o===n&&(n=nt.provides=Object.create(o)),n[e]=t}}function vt(e,t,n){n===void 0&&(n=!1);const o=mn();if(o||eo){let i=eo?eo._context.provides:o?o.parent==null||o.ce?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return n&&we(t)?t.call(o&&o.proxy):t}}const lg=Symbol.for("v-scx"),ag=()=>vt(lg);function ug(e,t){return _s(e,null,t)}function Ae(e,t,n){return _s(e,t,n)}function _s(e,t,n){n===void 0&&(n=Fe);const o=n,i=o.immediate;o.deep;const r=o.flush;o.once;const s=Ue({},n),l=t&&i||!t&&r!=="post";let a;if(zo){if(r==="sync"){const f=ag();a=f.__watcherHandles||(f.__watcherHandles=[])}else if(!l){const f=()=>{};return f.stop=Mt,f.resume=Mt,f.pause=Mt,f}}const u=nt;s.call=(f,p,x)=>Dt(f,u,p,x);let c=!1;r==="post"?s.scheduler=f=>{tt(f,u&&u.suspense)}:r!=="sync"&&(c=!0,s.scheduler=(f,p)=>{p?f():ys(f)}),s.augmentJob=f=>{t&&(f.flags|=4),c&&(f.flags|=2,u&&(f.id=u.uid,f.i=u))};const d=Qh(e,t,s);return zo&&(a?a.push(d):l&&d()),d}function cg(e,t,n){const o=this.proxy,i=ze(e)?e.includes(".")?Za(o,e):()=>o[e]:e.bind(o,o);let r;we(t)?r=t:(r=t.handler,n=t);const s=Wo(this),l=_s(i,r.bind(o),n);return s(),l}function Za(e,t){const n=t.split(".");return()=>{let o=e;for(let i=0;i<n.length&&o;i++)o=o[n[i]];return o}}const ja=Symbol("_vte"),dg=e=>e.__isTeleport,Po=e=>e&&(e.disabled||e.disabled===""),Ja=e=>e&&(e.defer||e.defer===""),Qa=e=>typeof SVGElement<"u"&&e instanceof SVGElement,eu=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,ws=(e,t)=>{const n=e&&e.to;return ze(n)?t?t(n):null:n},tu={name:"Teleport",__isTeleport:!0,process(e,t,n,o,i,r,s,l,a,u){const c=u.mc,d=u.pc,f=u.pbc,p=u.o,x=p.insert,b=p.querySelector,_=p.createText;p.createComment;const A=Po(t.props);let P=t.shapeFlag,I=t.children,m=t.dynamicChildren;if(e==null){const F=t.el=_(""),z=t.anchor=_("");x(F,n,o),x(z,n,o);const q=(K,Q)=>{P&16&&c(I,K,Q,i,r,s,l,a)},G=()=>{const K=t.target=ws(t.props,b),Q=bs(K,t,_,x);K&&(s!=="svg"&&Qa(K)?s="svg":s!=="mathml"&&eu(K)&&(s="mathml"),i&&i.isCE&&(i.ce._teleportTargets||(i.ce._teleportTargets=new Set)).add(K),A||(q(K,Q),Wi(t,!1)))};A&&(q(n,z),Wi(t,!0)),Ja(t.props)?(t.el.__isMounted=!1,tt(()=>{G(),delete t.el.__isMounted},r)):G()}else{if(Ja(t.props)&&e.el.__isMounted===!1){tt(()=>{tu.process(e,t,n,o,i,r,s,l,a,u)},r);return}t.el=e.el,t.targetStart=e.targetStart;const F=t.anchor=e.anchor,z=t.target=e.target,q=t.targetAnchor=e.targetAnchor,G=Po(e.props),K=G?n:z,Q=G?F:q;if(s==="svg"||Qa(z)?s="svg":(s==="mathml"||eu(z))&&(s="mathml"),m?(f(e.dynamicChildren,m,K,i,r,s,l),ku(e,t)):a||d(e,t,K,Q,i,r,s,l,!1),A)G?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Hi(t,n,F,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const re=t.target=ws(t.props,b);re&&Hi(t,re,null,u,0)}else G&&Hi(t,z,q,u,1);Wi(t,A)}},remove(e,t,n,o,i){let r=o.um,s=o.o.remove;const l=e.shapeFlag,a=e.children,u=e.anchor,c=e.targetStart,d=e.targetAnchor,f=e.target,p=e.props;if(f&&(s(c),s(d)),i&&s(u),l&16){const x=i||!Po(p);for(let b=0;b<a.length;b++){const _=a[b];r(_,t,n,x,!!_.dynamicChildren)}}},move:Hi,hydrate:fg};function Hi(e,t,n,o,i){let r=o.o.insert,s=o.m;i===void 0&&(i=2),i===0&&r(e.targetAnchor,t,n);const l=e.el,a=e.anchor,u=e.shapeFlag,c=e.children,d=e.props,f=i===2;if(f&&r(l,t,n),(!f||Po(d))&&u&16)for(let p=0;p<c.length;p++)s(c[p],t,n,2);f&&r(a,t,n)}function fg(e,t,n,o,i,r,s,l){let a=s.o,u=a.nextSibling,c=a.parentNode,d=a.querySelector,f=a.insert,p=a.createText;function x(P,I){let m=I;for(;m;){if(m&&m.nodeType===8){if(m.data==="teleport start anchor")t.targetStart=m;else if(m.data==="teleport anchor"){t.targetAnchor=m,P._lpa=t.targetAnchor&&u(t.targetAnchor);break}}m=u(m)}}function b(P,I){I.anchor=l(u(P),I,c(P),n,o,i,r)}const _=t.target=ws(t.props,d),A=Po(t.props);if(_){const P=_._lpa||_.firstChild;t.shapeFlag&16&&(A?(b(e,t),x(_,P),t.targetAnchor||bs(_,t,p,f,c(e)===_?e:null)):(t.anchor=u(e),x(_,P),t.targetAnchor||bs(_,t,p,f),l(P&&u(P),t,_,n,o,i,r))),Wi(t,A)}else A&&t.shapeFlag&16&&(b(e,t),t.targetStart=e,t.targetAnchor=u(e));return t.anchor&&u(t.anchor)}const hg=tu;function Wi(e,t){const n=e.ctx;if(n&&n.ut){let o,i;for(t?(o=e.el,i=e.anchor):(o=e.targetStart,i=e.targetAnchor);o&&o!==i;)o.nodeType===1&&o.setAttribute("data-v-owner",n.uid),o=o.nextSibling;n.ut()}}function bs(e,t,n,o,i){i===void 0&&(i=null);const r=t.targetStart=n(""),s=t.targetAnchor=n("");return r[ja]=s,e&&(o(r,e,i),o(s,e,i)),s}const gg=Symbol("_leaveCb");function Ss(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Ss(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function $e(e,t){return we(e)?Ue({name:e.name},t,{setup:e}):e}function nu(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function ou(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const zi=new WeakMap;function Ro(e,t,n,o,i){if(i===void 0&&(i=!1),ye(e)){e.forEach((b,_)=>Ro(b,t&&(ye(t)?t[_]:t),n,o,i));return}if(Jn(o)&&!i){o.shapeFlag&512&&o.type.__asyncResolved&&o.component.subTree.component&&Ro(e,t,n,o.component.subTree);return}const r=o.shapeFlag&4?Fs(o.component):o.el,s=i?null:r,l=e.i,a=e.r,u=t&&t.r,c=l.refs===Fe?l.refs={}:l.refs,d=l.setupState,f=Oe(d),p=d===Fe?ca:b=>ou(c,b)?!1:Te(f,b),x=(b,_)=>!(_&&ou(c,_));if(u!=null&&u!==a){if(iu(t),ze(u))c[u]=null,p(u)&&(d[u]=null);else if(Ve(u)){const b=t;x(u,b.k)&&(u.value=null),b.k&&(c[b.k]=null)}}if(we(a))qn(a,l,12,[s,c]);else{const b=ze(a),_=Ve(a);if(b||_){const A=()=>{if(e.f){const P=b?p(a)?d[a]:c[a]:x()||!e.k?a.value:c[e.k];if(i)ye(P)&&ts(P,r);else if(ye(P))P.includes(r)||P.push(r);else if(b)c[a]=[r],p(a)&&(d[a]=c[a]);else{const I=[r];x(a,e.k)&&(a.value=I),e.k&&(c[e.k]=I)}}else b?(c[a]=s,p(a)&&(d[a]=s)):_&&(x(a,e.k)&&(a.value=s),e.k&&(c[e.k]=s))};if(s){const P=()=>{A(),zi.delete(e)};P.id=-1,zi.set(e,P),tt(P,n)}else iu(e),A()}}}function iu(e){const t=zi.get(e);t&&(t.flags|=8,zi.delete(e))}So().requestIdleCallback,So().cancelIdleCallback;const Jn=e=>!!e.type.__asyncLoader,ru=e=>e.type.__isKeepAlive;function pg(e,t){su(e,"a",t)}function vg(e,t){su(e,"da",t)}function su(e,t,n){n===void 0&&(n=nt);const o=e.__wdc||(e.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(Bi(t,o,n),n){let i=n.parent;for(;i&&i.parent;)ru(i.parent.vnode)&&mg(o,t,n,i),i=i.parent}}function mg(e,t,n,o){const i=Bi(t,e,o,!0);Vi(()=>{ts(o[t],i)},n)}function Bi(e,t,n,o){if(n===void 0&&(n=nt),o===void 0&&(o=!1),n){const i=n[e]||(n[e]=[]),r=t.__weh||(t.__weh=function(){It();const s=Wo(n);for(var l=arguments.length,a=new Array(l),u=0;u<l;u++)a[u]=arguments[u];const c=Dt(t,n,e,a);return s(),Pt(),c});return o?i.unshift(r):i.push(r),r}}const jt=e=>function(t,n){n===void 0&&(n=nt),(!zo||e==="sp")&&Bi(e,function(){return t(...arguments)},n)},lu=jt("bm"),St=jt("m"),yg=jt("bu"),_g=jt("u"),Es=jt("bum"),Vi=jt("um"),wg=jt("sp"),bg=jt("rtg"),Sg=jt("rtc");function Eg(e,t){t===void 0&&(t=nt),Bi("ec",e,t)}const au="components";function Ft(e,t){return du(au,e,!0,t)||e}const uu=Symbol.for("v-ndc");function cu(e){return ze(e)?du(au,e)||e:e||uu}function du(e,t,n,o){o===void 0&&(o=!1);const i=rt||nt;if(i){const r=i.type;{const l=Xu(r,!1);if(l&&(l===t||l===ot(t)||l===Ei(ot(t))))return r}const s=fu(i[e]||r[e],t)||fu(i.appContext[e],t);return!s&&o?r:s}}function fu(e,t){return e&&(e[t]||e[ot(t)]||e[Ei(ot(t))])}function Qn(e,t,n,o){let i;const r=n&&n[o],s=ye(e);if(s||ze(e)){const l=s&&Nn(e);let a=!1,u=!1;l&&(a=!ht(e),u=Zt(e),e=Ci(e)),i=new Array(e.length);for(let c=0,d=e.length;c<d;c++)i[c]=t(a?u?Xn(bt(e[c])):bt(e[c]):e[c],c,void 0,r&&r[c])}else if(typeof e=="number"){i=new Array(e);for(let l=0;l<e;l++)i[l]=t(l+1,l,void 0,r&&r[l])}else if(Me(e))if(e[Symbol.iterator])i=Array.from(e,(l,a)=>t(l,a,void 0,r&&r[a]));else{const l=Object.keys(e);i=new Array(l.length);for(let a=0,u=l.length;a<u;a++){const c=l[a];i[a]=t(e[c],c,a,r&&r[a])}}else i=[];return n&&(n[o]=i),i}function mt(e,t,n,o,i){if(n===void 0&&(n={}),rt.ce||rt.parent&&Jn(rt.parent)&&rt.parent.ce){const u=Object.keys(n).length>0;return t!=="default"&&(n.name=t),se(),qe(He,null,[Ne("slot",n,o&&o())],u?-2:64)}let r=e[t];r&&r._c&&(r._d=!1),se();const s=r&&hu(r(n)),l=n.key||s&&s.key,a=qe(He,{key:(l&&!yt(l)?l:"_"+t)+(!s&&o?"_fb":"")},s||(o?o():[]),s&&e._===1?64:-2);return a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),r&&r._c&&(r._d=!0),a}function hu(e){return e.some(t=>Fo(t)?!(t.type===Jt||t.type===He&&!hu(t.children)):!0)?e:null}const xs=e=>e?Vu(e)?Fs(e):xs(e.parent):null,Do=Ue(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>xs(e.parent),$root:e=>xs(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Ns(e),$forceUpdate:e=>e.f||(e.f=()=>{ys(e.update)}),$nextTick:e=>e.n||(e.n=$t.bind(e.proxy)),$watch:e=>cg.bind(e)}),As=(e,t)=>e!==Fe&&!e.__isScriptSetup&&Te(e,t),xg={get(e,t){let n=e._;if(t==="__v_skip")return!0;const o=n.ctx,i=n.setupState,r=n.data,s=n.props,l=n.accessCache,a=n.type,u=n.appContext;if(t[0]!=="$"){const p=l[t];if(p!==void 0)switch(p){case 1:return i[t];case 2:return r[t];case 4:return o[t];case 3:return s[t]}else{if(As(i,t))return l[t]=1,i[t];if(r!==Fe&&Te(r,t))return l[t]=2,r[t];if(Te(s,t))return l[t]=3,s[t];if(o!==Fe&&Te(o,t))return l[t]=4,o[t];Cs&&(l[t]=0)}}const c=Do[t];let d,f;if(c)return t==="$attrs"&&et(n.attrs,"get",""),c(n);if((d=a.__cssModules)&&(d=d[t]))return d;if(o!==Fe&&Te(o,t))return l[t]=4,o[t];if(f=u.config.globalProperties,Te(f,t))return f[t]},set(e,t,n){let o=e._;const i=o.data,r=o.setupState,s=o.ctx;return As(r,t)?(r[t]=n,!0):i!==Fe&&Te(i,t)?(i[t]=n,!0):Te(o.props,t)||t[0]==="$"&&t.slice(1)in o?!1:(s[t]=n,!0)},has(e,t){let n=e._,o=n.data,i=n.setupState,r=n.accessCache,s=n.ctx,l=n.appContext,a=n.props,u=n.type,c;return!!(r[t]||o!==Fe&&t[0]!=="$"&&Te(o,t)||As(i,t)||Te(a,t)||Te(s,t)||Te(Do,t)||Te(l.config.globalProperties,t)||(c=u.__cssModules)&&c[t])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Te(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function gu(){return pu().slots}function Os(){return pu().attrs}function pu(e){const t=mn();return t.setupContext||(t.setupContext=Uu(t))}function vu(e){return ye(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function Ag(e,t){const n={};for(const o in e)t.includes(o)||Object.defineProperty(n,o,{enumerable:!0,get:()=>e[o]});return n}let Cs=!0;function Og(e){const t=Ns(e),n=e.proxy,o=e.ctx;Cs=!1,t.beforeCreate&&mu(t.beforeCreate,e,"bc");const i=t.data,r=t.computed,s=t.methods,l=t.watch,a=t.provide,u=t.inject,c=t.created,d=t.beforeMount,f=t.mounted,p=t.beforeUpdate,x=t.updated,b=t.activated,_=t.deactivated;t.beforeDestroy;const A=t.beforeUnmount;t.destroyed;const P=t.unmounted,I=t.render,m=t.renderTracked,F=t.renderTriggered,z=t.errorCaptured,q=t.serverPrefetch,G=t.expose,K=t.inheritAttrs,Q=t.components,re=t.directives;if(t.filters,u&&Cg(u,o),s)for(const oe in s){const g=s[oe];we(g)&&(o[oe]=g.bind(n))}if(i){const oe=i.call(n,n);Me(oe)&&(e.data=No(oe))}if(Cs=!0,r)for(const oe in r){const g=r[oe],O=we(g)?g.bind(n,n):we(g.get)?g.get.bind(n,n):Mt,R=!we(g)&&we(g.set)?g.set.bind(n):Mt,$=fe({get:O,set:R});Object.defineProperty(o,oe,{enumerable:!0,configurable:!0,get:()=>$.value,set:N=>$.value=N})}if(l)for(const oe in l)yu(l[oe],o,n,oe);if(a){const oe=we(a)?a.call(n):a;Reflect.ownKeys(oe).forEach(g=>{vn(g,oe[g])})}c&&mu(c,e,"c");function ee(oe,g){ye(g)?g.forEach(O=>oe(O.bind(n))):g&&oe(g.bind(n))}if(ee(lu,d),ee(St,f),ee(yg,p),ee(_g,x),ee(pg,b),ee(vg,_),ee(Eg,z),ee(Sg,m),ee(bg,F),ee(Es,A),ee(Vi,P),ee(wg,q),ye(G))if(G.length){const oe=e.exposed||(e.exposed={});G.forEach(g=>{Object.defineProperty(oe,g,{get:()=>n[g],set:O=>n[g]=O,enumerable:!0})})}else e.exposed||(e.exposed={});I&&e.render===Mt&&(e.render=I),K!=null&&(e.inheritAttrs=K),Q&&(e.components=Q),re&&(e.directives=re),q&&nu(e)}function Cg(e,t,n){ye(e)&&(e=Ts(e));for(const o in e){const i=e[o];let r;Me(i)?"default"in i?r=vt(i.from||o,i.default,!0):r=vt(i.from||o):r=vt(i),Ve(r)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>r.value,set:s=>r.value=s}):t[o]=r}}function mu(e,t,n){Dt(ye(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function yu(e,t,n,o){let i=o.includes(".")?Za(n,o):()=>n[o];if(ze(e)){const r=t[e];we(r)&&Ae(i,r)}else if(we(e))Ae(i,e.bind(n));else if(Me(e))if(ye(e))e.forEach(r=>yu(r,t,n,o));else{const r=we(e.handler)?e.handler.bind(n):t[e.handler];we(r)&&Ae(i,r,e)}}function Ns(e){const t=e.type,n=t.mixins,o=t.extends,i=e.appContext,r=i.mixins,s=i.optionsCache,l=i.config.optionMergeStrategies,a=s.get(t);let u;return a?u=a:!r.length&&!n&&!o?u=t:(u={},r.length&&r.forEach(c=>Gi(u,c,l,!0)),Gi(u,t,l)),Me(t)&&s.set(t,u),u}function Gi(e,t,n,o){o===void 0&&(o=!1);const i=t.mixins,r=t.extends;r&&Gi(e,r,n,!0),i&&i.forEach(s=>Gi(e,s,n,!0));for(const s in t)if(!(o&&s==="expose")){const l=Ng[s]||n&&n[s];e[s]=l?l(e[s],t[s]):t[s]}return e}const Ng={data:_u,props:wu,emits:wu,methods:ko,computed:ko,beforeCreate:st,created:st,beforeMount:st,mounted:st,beforeUpdate:st,updated:st,beforeDestroy:st,beforeUnmount:st,destroyed:st,unmounted:st,activated:st,deactivated:st,errorCaptured:st,serverPrefetch:st,components:ko,directives:ko,watch:Mg,provide:_u,inject:Tg};function _u(e,t){return t?e?function(){return Ue(we(e)?e.call(this,this):e,we(t)?t.call(this,this):t)}:t:e}function Tg(e,t){return ko(Ts(e),Ts(t))}function Ts(e){if(ye(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function st(e,t){return e?[...new Set([].concat(e,t))]:t}function ko(e,t){return e?Ue(Object.create(null),e,t):t}function wu(e,t){return e?ye(e)&&ye(t)?[...new Set([...e,...t])]:Ue(Object.create(null),vu(e),vu(t??{})):t}function Mg(e,t){if(!e)return t;if(!t)return e;const n=Ue(Object.create(null),e);for(const o in t)n[o]=st(e[o],t[o]);return n}function bu(){return{app:null,config:{isNativeTag:ca,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Ig=0;function Pg(e,t){return function(o,i){i===void 0&&(i=null),we(o)||(o=Ue({},o)),i!=null&&!Me(i)&&(i=null);const r=bu(),s=new WeakSet,l=[];let a=!1;const u=r.app={_uid:Ig++,_component:o,_props:i,_container:null,_context:r,_instance:null,version:dp,get config(){return r.config},set config(c){},use(c){for(var d=arguments.length,f=new Array(d>1?d-1:0),p=1;p<d;p++)f[p-1]=arguments[p];return s.has(c)||(c&&we(c.install)?(s.add(c),c.install(u,...f)):we(c)&&(s.add(c),c(u,...f))),u},mixin(c){return r.mixins.includes(c)||r.mixins.push(c),u},component(c,d){return d?(r.components[c]=d,u):r.components[c]},directive(c,d){return d?(r.directives[c]=d,u):r.directives[c]},mount(c,d,f){if(!a){const p=u._ceVNode||Ne(o,i);return p.appContext=r,f===!0?f="svg":f===!1&&(f=void 0),e(p,c,f),a=!0,u._container=c,c.__vue_app__=u,Fs(p.component)}},onUnmount(c){l.push(c)},unmount(){a&&(Dt(l,u._instance,16),e(null,u._container),delete u._container.__vue_app__)},provide(c,d){return r.provides[c]=d,u},runWithContext(c){const d=eo;eo=u;try{return c()}finally{eo=d}}};return u}}let eo=null;const Rg=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[t+"Modifiers"]||e[ot(t)+"Modifiers"]||e[dn(t)+"Modifiers"];function Dg(e,t){if(e.isUnmounted)return;const n=e.vnode.props||Fe;for(var o=arguments.length,i=new Array(o>2?o-2:0),r=2;r<o;r++)i[r-2]=arguments[r];let s=i;const l=t.startsWith("update:"),a=l&&Rg(n,t.slice(7));a&&(a.trim&&(s=i.map(f=>ze(f)?f.trim():f)),a.number&&(s=i.map(gh)));let u,c=n[u=ns(t)]||n[u=ns(ot(t))];!c&&l&&(c=n[u=ns(dn(t))]),c&&Dt(c,e,6,s);const d=n[u+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[u])return;e.emitted[u]=!0,Dt(d,e,6,s)}}const kg=new WeakMap;function Su(e,t,n){n===void 0&&(n=!1);const o=n?kg:t.emitsCache,i=o.get(e);if(i!==void 0)return i;const r=e.emits;let s={},l=!1;if(!we(e)){const a=u=>{const c=Su(u,t,!0);c&&(l=!0,Ue(s,c))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!r&&!l?(Me(e)&&o.set(e,null),null):(ye(r)?r.forEach(a=>s[a]=null):Ue(s,r),Me(e)&&o.set(e,s),s)}function Ki(e,t){return!e||!wi(t)?!1:(t=t.slice(2).replace(/Once$/,""),Te(e,t[0].toLowerCase()+t.slice(1))||Te(e,dn(t))||Te(e,t))}function yO(){}function Eu(e){const t=e.type,n=e.vnode,o=e.proxy,i=e.withProxy,r=e.propsOptions,s=r[0],l=e.slots,a=e.attrs,u=e.emit,c=e.render,d=e.renderCache,f=e.props,p=e.data,x=e.setupState,b=e.ctx,_=e.inheritAttrs,A=Li(e);let P,I;try{if(n.shapeFlag&4){const F=i||o,z=F;P=Ht(c.call(z,F,d,f,x,p,b)),I=a}else{const F=t;P=Ht(F.length>1?F(f,{attrs:a,slots:l,emit:u}):F(f,null)),I=t.props?a:$g(a)}}catch(F){$o.length=0,$i(F,e,1),P=Ne(Jt)}let m=P;if(I&&_!==!1){const F=Object.keys(I),z=m,q=z.shapeFlag;F.length&&q&7&&(s&&F.some(es)&&(I=Fg(I,s)),m=no(m,I,!1,!0))}return n.dirs&&(m=no(m,null,!1,!0),m.dirs=m.dirs?m.dirs.concat(n.dirs):n.dirs),n.transition&&Ss(m,n.transition),P=m,Li(A),P}const $g=e=>{let t;for(const n in e)(n==="class"||n==="style"||wi(n))&&((t||(t={}))[n]=e[n]);return t},Fg=(e,t)=>{const n={};for(const o in e)(!es(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function Lg(e,t,n){const o=e.props,i=e.children,r=e.component,s=t.props,l=t.children,a=t.patchFlag,u=r.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return o?xu(o,s,u):!!s;if(a&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const f=c[d];if(Au(s,o,f)&&!Ki(u,f))return!0}}}else return(i||l)&&(!l||!l.$stable)?!0:o===s?!1:o?s?xu(o,s,u):!0:!!s;return!1}function xu(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let i=0;i<o.length;i++){const r=o[i];if(Au(t,e,r)&&!Ki(n,r))return!0}return!1}function Au(e,t,n){const o=e[n],i=t[n];return n==="style"&&Me(o)&&Me(i)?!is(o,i):o!==i}function Hg(e,t){let n=e.vnode,o=e.parent;for(;o;){const i=o.subTree;if(i.suspense&&i.suspense.activeBranch===n&&(i.el=n.el),i===n)(n=o.vnode).el=t,o=o.parent;else break}}const Ou={},Cu=()=>Object.create(Ou),Nu=e=>Object.getPrototypeOf(e)===Ou;function Wg(e,t,n,o){o===void 0&&(o=!1);const i={},r=Cu();e.propsDefaults=Object.create(null),Tu(e,t,i,r);for(const s in e.propsOptions[0])s in i||(i[s]=void 0);n?e.props=o?i:Bh(i):e.type.props?e.props=i:e.props=r,e.attrs=r}function zg(e,t,n,o){const i=e.props,r=e.attrs,s=e.vnode.patchFlag,l=Oe(i),a=e.propsOptions,u=a[0];let c=!1;if((o||s>0)&&!(s&16)){if(s&8){const d=e.vnode.dynamicProps;for(let f=0;f<d.length;f++){let p=d[f];if(Ki(e.emitsOptions,p))continue;const x=t[p];if(u)if(Te(r,p))x!==r[p]&&(r[p]=x,c=!0);else{const b=ot(p);i[b]=Ms(u,l,b,x,e,!1)}else x!==r[p]&&(r[p]=x,c=!0)}}}else{Tu(e,t,i,r)&&(c=!0);let d;for(const f in l)(!t||!Te(t,f)&&((d=dn(f))===f||!Te(t,d)))&&(u?n&&(n[f]!==void 0||n[d]!==void 0)&&(i[f]=Ms(u,l,f,void 0,e,!0)):delete i[f]);if(r!==l)for(const f in r)(!t||!Te(t,f))&&(delete r[f],c=!0)}c&&Xt(e.attrs,"set","")}function Tu(e,t,n,o){const i=e.propsOptions,r=i[0],s=i[1];let l=!1,a;if(t)for(let u in t){if(bo(u))continue;const c=t[u];let d;r&&Te(r,d=ot(u))?!s||!s.includes(d)?n[d]=c:(a||(a={}))[d]=c:Ki(e.emitsOptions,u)||(!(u in o)||c!==o[u])&&(o[u]=c,l=!0)}if(s){const u=Oe(n),c=a||Fe;for(let d=0;d<s.length;d++){const f=s[d];n[f]=Ms(r,u,f,c[f],e,!Te(c,f))}}return l}function Ms(e,t,n,o,i,r){const s=e[n];if(s!=null){const l=Te(s,"default");if(l&&o===void 0){const a=s.default;if(s.type!==Function&&!s.skipFactory&&we(a)){const u=i.propsDefaults;if(n in u)o=u[n];else{const c=Wo(i);o=u[n]=a.call(null,t),c()}}else o=a;i.ce&&i.ce._setProp(n,o)}s[0]&&(r&&!l?o=!1:s[1]&&(o===""||o===dn(n))&&(o=!0))}return o}const Bg=new WeakMap;function Mu(e,t,n){n===void 0&&(n=!1);const o=n?Bg:t.propsCache,i=o.get(e);if(i)return i;const r=e.props,s={},l=[];let a=!1;if(!we(e)){const c=d=>{a=!0;const f=Mu(d,t,!0),p=f[0],x=f[1];Ue(s,p),x&&l.push(...x)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!r&&!a)return Me(e)&&o.set(e,Kn),Kn;if(ye(r))for(let c=0;c<r.length;c++){const d=ot(r[c]);Iu(d)&&(s[d]=Fe)}else if(r)for(const c in r){const d=ot(c);if(Iu(d)){const f=r[c],p=s[d]=ye(f)||we(f)?{type:f}:Ue({},f),x=p.type;let b=!1,_=!0;if(ye(x))for(let A=0;A<x.length;++A){const P=x[A],I=we(P)&&P.name;if(I==="Boolean"){b=!0;break}else I==="String"&&(_=!1)}else b=we(x)&&x.name==="Boolean";p[0]=b,p[1]=_,(b||Te(p,"default"))&&l.push(d)}}const u=[s,l];return Me(e)&&o.set(e,u),u}function Iu(e){return e[0]!=="$"&&!bo(e)}const Is=e=>e==="_"||e==="_ctx"||e==="$stable",Ps=e=>ye(e)?e.map(Ht):[Ht(e)],Vg=(e,t,n)=>{if(t._n)return t;const o=pn(function(){return Ps(t(...arguments))},n);return o._c=!1,o},Pu=(e,t,n)=>{const o=e._ctx;for(const i in e){if(Is(i))continue;const r=e[i];if(we(r))t[i]=Vg(i,r,o);else if(r!=null){const s=Ps(r);t[i]=()=>s}}},Ru=(e,t)=>{const n=Ps(t);e.slots.default=()=>n},Du=(e,t,n)=>{for(const o in t)(n||!Is(o))&&(e[o]=t[o])},Gg=(e,t,n)=>{const o=e.slots=Cu();if(e.vnode.shapeFlag&32){const i=t._;i?(Du(o,t,n),n&&va(o,"_",i,!0)):Pu(t,o)}else t&&Ru(e,t)},Kg=(e,t,n)=>{const o=e.vnode,i=e.slots;let r=!0,s=Fe;if(o.shapeFlag&32){const l=t._;l?n&&l===1?r=!1:Du(i,t,n):(r=!t.$stable,Pu(t,i)),s=t}else t&&(Ru(e,t),s={default:1});if(r)for(const l in i)!Is(l)&&s[l]==null&&delete i[l]};function Yg(){typeof __VUE_PROD_HYDRATION_MISMATCH_DETAILS__!="boolean"&&(So().__VUE_PROD_HYDRATION_MISMATCH_DETAILS__=!1)}const tt=jg;function Ug(e){return Xg(e)}function Xg(e,t){Yg();const n=So();n.__VUE__=!0;const o=e.insert,i=e.remove,r=e.patchProp,s=e.createElement,l=e.createText,a=e.createComment,u=e.setText,c=e.setElementText,d=e.parentNode,f=e.nextSibling,p=e.setScopeId,x=p===void 0?Mt:p,b=e.insertStaticContent,_=function(h,v,E,S,C,w,M,k,T){if(S===void 0&&(S=null),C===void 0&&(C=null),w===void 0&&(w=null),M===void 0&&(M=void 0),k===void 0&&(k=null),T===void 0&&(T=!!v.dynamicChildren),h===v)return;h&&!Lo(h,v)&&(S=ne(h),Z(h,C,w,!0),h=null),v.patchFlag===-2&&(T=!1,v.dynamicChildren=null);const B=v.type,V=v.ref,X=v.shapeFlag;switch(B){case Yi:A(h,v,E,S);break;case Jt:P(h,v,E,S);break;case Ds:h==null&&I(v,E,S,M);break;case He:oe(h,v,E,S,C,w,M,k,T);break;default:X&1?z(h,v,E,S,C,w,M,k,T):X&6?g(h,v,E,S,C,w,M,k,T):(X&64||X&128)&&B.process(h,v,E,S,C,w,M,k,T,_e)}V!=null&&C?Ro(V,h&&h.ref,w,v||h,!v):V==null&&h&&h.ref!=null&&Ro(h.ref,null,w,h,!0)},A=(y,h,v,E)=>{if(y==null)o(h.el=l(h.children),v,E);else{const S=h.el=y.el;h.children!==y.children&&u(S,h.children)}},P=(y,h,v,E)=>{y==null?o(h.el=a(h.children||""),v,E):h.el=y.el},I=(y,h,v,E)=>{var S=b(y.children,h,v,E,y.el,y.anchor);y.el=S[0],y.anchor=S[1]},m=(y,h,v)=>{let E=y.el,S=y.anchor,C;for(;E&&E!==S;)C=f(E),o(E,h,v),E=C;o(S,h,v)},F=y=>{let h=y.el,v=y.anchor,E;for(;h&&h!==v;)E=f(h),i(h),h=E;i(v)},z=(y,h,v,E,S,C,w,M,k)=>{if(h.type==="svg"?w="svg":h.type==="math"&&(w="mathml"),y==null)q(h,v,E,S,C,w,M,k);else{const T=y.el&&y.el._isVueCE?y.el:null;try{T&&T._beginPatch(),Q(y,h,S,C,w,M,k)}finally{T&&T._endPatch()}}},q=(y,h,v,E,S,C,w,M)=>{let k,T;const B=y.props,V=y.shapeFlag,X=y.transition,J=y.dirs;if(k=y.el=s(y.type,C,B&&B.is,B),V&8?c(k,y.children):V&16&&K(y.children,k,null,E,S,Rs(y,C),w,M),J&&Mn(y,null,E,"created"),G(k,y,y.scopeId,w,E),B){for(const be in B)be!=="value"&&!bo(be)&&r(k,be,null,B[be],C,E);"value"in B&&r(k,"value",null,B.value,C),(T=B.onVnodeBeforeMount)&&Wt(T,E,y)}J&&Mn(y,null,E,"beforeMount");const ue=qg(S,X);ue&&X.beforeEnter(k),o(k,h,v),((T=B&&B.onVnodeMounted)||ue||J)&&tt(()=>{T&&Wt(T,E,y),ue&&X.enter(k),J&&Mn(y,null,E,"mounted")},S)},G=(y,h,v,E,S)=>{if(v&&x(y,v),E)for(let C=0;C<E.length;C++)x(y,E[C]);if(S){let C=S.subTree;if(h===C||Hu(C.type)&&(C.ssContent===h||C.ssFallback===h)){const w=S.vnode;G(y,w,w.scopeId,w.slotScopeIds,S.parent)}}},K=function(h,v,E,S,C,w,M,k,T){T===void 0&&(T=0);for(let B=T;B<h.length;B++){const V=h[B]=k?Qt(h[B]):Ht(h[B]);_(null,V,v,E,S,C,w,M,k)}},Q=(y,h,v,E,S,C,w)=>{const M=h.el=y.el;let k=h.patchFlag,T=h.dynamicChildren,B=h.dirs;k|=y.patchFlag&16;const V=y.props||Fe,X=h.props||Fe;let J;if(v&&In(v,!1),(J=X.onVnodeBeforeUpdate)&&Wt(J,v,h,y),B&&Mn(h,y,v,"beforeUpdate"),v&&In(v,!0),(V.innerHTML&&X.innerHTML==null||V.textContent&&X.textContent==null)&&c(M,""),T?re(y.dynamicChildren,T,M,v,E,Rs(h,S),C):w||L(y,h,M,null,v,E,Rs(h,S),C,!1),k>0){if(k&16)ee(M,V,X,v,S);else if(k&2&&V.class!==X.class&&r(M,"class",null,X.class,S),k&4&&r(M,"style",V.style,X.style,S),k&8){const ue=h.dynamicProps;for(let be=0;be<ue.length;be++){const Se=ue[be],Re=V[Se],We=X[Se];(We!==Re||Se==="value")&&r(M,Se,Re,We,S,v)}}k&1&&y.children!==h.children&&c(M,h.children)}else!w&&T==null&&ee(M,V,X,v,S);((J=X.onVnodeUpdated)||B)&&tt(()=>{J&&Wt(J,v,h,y),B&&Mn(h,y,v,"updated")},E)},re=(y,h,v,E,S,C,w)=>{for(let M=0;M<h.length;M++){const k=y[M],T=h[M],B=k.el&&(k.type===He||!Lo(k,T)||k.shapeFlag&198)?d(k.el):v;_(k,T,B,null,E,S,C,w,!0)}},ee=(y,h,v,E,S)=>{if(h!==v){if(h!==Fe)for(const C in h)!bo(C)&&!(C in v)&&r(y,C,h[C],null,S,E);for(const C in v){if(bo(C))continue;const w=v[C],M=h[C];w!==M&&C!=="value"&&r(y,C,M,w,S,E)}"value"in v&&r(y,"value",h.value,v.value,S)}},oe=(y,h,v,E,S,C,w,M,k)=>{const T=h.el=y?y.el:l(""),B=h.anchor=y?y.anchor:l("");let V=h.patchFlag,X=h.dynamicChildren,J=h.slotScopeIds;J&&(M=M?M.concat(J):J),y==null?(o(T,v,E),o(B,v,E),K(h.children||[],v,B,S,C,w,M,k)):V>0&&V&64&&X&&y.dynamicChildren&&y.dynamicChildren.length===X.length?(re(y.dynamicChildren,X,v,S,C,w,M),(h.key!=null||S&&h===S.subTree)&&ku(y,h)):L(y,h,v,B,S,C,w,M,k)},g=(y,h,v,E,S,C,w,M,k)=>{h.slotScopeIds=M,y==null?h.shapeFlag&512?S.ctx.activate(h,v,E,w,k):O(h,v,E,S,C,w,k):R(y,h,k)},O=(y,h,v,E,S,C,w)=>{const M=y.component=op(y,E,S);if(ru(y)&&(M.ctx.renderer=_e),ip(M,!1,w),M.asyncDep){if(S&&S.registerDep(M,$,w),!y.el){const k=M.subTree=Ne(Jt);P(null,k,h,v),y.placeholder=k.el}}else $(M,y,h,v,S,C,w)},R=(y,h,v)=>{const E=h.component=y.component;if(Lg(y,h,v))if(E.asyncDep&&!E.asyncResolved){N(E,h,v);return}else E.next=h,E.update();else h.el=y.el,E.vnode=h},$=(y,h,v,E,S,C,w)=>{const M=()=>{if(y.isMounted){let V=y.next,X=y.bu,J=y.u,ue=y.parent,be=y.vnode;{const Je=$u(y);if(Je){V&&(V.el=be.el,N(y,V,w)),Je.asyncDep.then(()=>{tt(()=>{y.isUnmounted||T()},S)});return}}let Se=V,Re;In(y,!1),V?(V.el=be.el,N(y,V,w)):V=be,X&&os(X),(Re=V.props&&V.props.onVnodeBeforeUpdate)&&Wt(Re,ue,V,be),In(y,!0);const We=Eu(y),je=y.subTree;y.subTree=We,_(je,We,d(je.el),ne(je),y,S,C),V.el=We.el,Se===null&&Hg(y,We.el),J&&tt(J,S),(Re=V.props&&V.props.onVnodeUpdated)&&tt(()=>Wt(Re,ue,V,be),S)}else{let V;const X=h;X.el;const J=X.props,ue=y.bm,be=y.m,Se=y.parent,Re=y.root,We=y.type,je=Jn(h);In(y,!1),ue&&os(ue),!je&&(V=J&&J.onVnodeBeforeMount)&&Wt(V,Se,h),In(y,!0);{Re.ce&&Re.ce._hasShadowRoot()&&Re.ce._injectChildStyle(We,y.parent?y.parent.type:void 0);const Je=y.subTree=Eu(y);_(null,Je,v,E,y,S,C),h.el=Je.el}if(be&&tt(be,S),!je&&(V=J&&J.onVnodeMounted)){const Je=h;tt(()=>Wt(V,Se,Je),S)}(h.shapeFlag&256||Se&&Jn(Se.vnode)&&Se.vnode.shapeFlag&256)&&y.a&&tt(y.a,S),y.isMounted=!0,h=v=E=null}};y.scope.on();const k=y.effect=new Sa(M);y.scope.off();const T=y.update=k.run.bind(k),B=y.job=k.runIfDirty.bind(k);B.i=y,B.id=y.uid,k.scheduler=()=>ys(B),In(y,!0),T()},N=(y,h,v)=>{h.component=y;const E=y.vnode.props;y.vnode=h,y.next=null,zg(y,h.props,E,v),Kg(y,h.children,v),It(),Ya(y),Pt()},L=function(h,v,E,S,C,w,M,k,T){T===void 0&&(T=!1);const B=h&&h.children,V=h?h.shapeFlag:0,X=v.children,J=v.patchFlag,ue=v.shapeFlag;if(J>0){if(J&128){W(B,X,E,S,C,w,M,k,T);return}else if(J&256){H(B,X,E,S,C,w,M,k,T);return}}ue&8?(V&16&&j(B,C,w),X!==B&&c(E,X)):V&16?ue&16?W(B,X,E,S,C,w,M,k,T):j(B,C,w,!0):(V&8&&c(E,""),ue&16&&K(X,E,S,C,w,M,k,T))},H=(y,h,v,E,S,C,w,M,k)=>{y=y||Kn,h=h||Kn;const T=y.length,B=h.length,V=Math.min(T,B);let X;for(X=0;X<V;X++){const J=h[X]=k?Qt(h[X]):Ht(h[X]);_(y[X],J,v,null,S,C,w,M,k)}T>B?j(y,S,C,!0,!1,V):K(h,v,E,S,C,w,M,k,V)},W=(y,h,v,E,S,C,w,M,k)=>{let T=0;const B=h.length;let V=y.length-1,X=B-1;for(;T<=V&&T<=X;){const J=y[T],ue=h[T]=k?Qt(h[T]):Ht(h[T]);if(Lo(J,ue))_(J,ue,v,null,S,C,w,M,k);else break;T++}for(;T<=V&&T<=X;){const J=y[V],ue=h[X]=k?Qt(h[X]):Ht(h[X]);if(Lo(J,ue))_(J,ue,v,null,S,C,w,M,k);else break;V--,X--}if(T>V){if(T<=X){const J=X+1,ue=J<B?h[J].el:E;for(;T<=X;)_(null,h[T]=k?Qt(h[T]):Ht(h[T]),v,ue,S,C,w,M,k),T++}}else if(T>X)for(;T<=V;)Z(y[T],S,C,!0),T++;else{const J=T,ue=T,be=new Map;for(T=ue;T<=X;T++){const ft=h[T]=k?Qt(h[T]):Ht(h[T]);ft.key!=null&&be.set(ft.key,T)}let Se,Re=0;const We=X-ue+1;let je=!1,Je=0;const On=new Array(We);for(T=0;T<We;T++)On[T]=0;for(T=J;T<=V;T++){const ft=y[T];if(Re>=We){Z(ft,S,C,!0);continue}let Tt;if(ft.key!=null)Tt=be.get(ft.key);else for(Se=ue;Se<=X;Se++)if(On[Se-ue]===0&&Lo(ft,h[Se])){Tt=Se;break}Tt===void 0?Z(ft,S,C,!0):(On[Tt-ue]=T+1,Tt>=Je?Je=Tt:je=!0,_(ft,h[Tt],v,null,S,C,w,M,k),Re++)}const sa=je?Zg(On):Kn;for(Se=sa.length-1,T=We-1;T>=0;T--){const ft=ue+T,Tt=h[ft],la=h[ft+1],aa=ft+1<B?la.el||Lu(la):E;On[T]===0?_(null,Tt,v,aa,S,C,w,M,k):je&&(Se<0||T!==sa[Se]?D(Tt,v,aa,2):Se--)}}},D=function(h,v,E,S,C){C===void 0&&(C=null);const w=h.el,M=h.type,k=h.transition,T=h.children,B=h.shapeFlag;if(B&6){D(h.component.subTree,v,E,S);return}if(B&128){h.suspense.move(v,E,S);return}if(B&64){M.move(h,v,E,_e);return}if(M===He){o(w,v,E);for(let X=0;X<T.length;X++)D(T[X],v,E,S);o(h.anchor,v,E);return}if(M===Ds){m(h,v,E);return}if(S!==2&&B&1&&k)if(S===0)k.beforeEnter(w),o(w,v,E),tt(()=>k.enter(w),C);else{const X=k.leave,J=k.delayLeave,ue=k.afterLeave,be=()=>{h.ctx.isUnmounted?i(w):o(w,v,E)},Se=()=>{w._isLeaving&&w[gg](!0),X(w,()=>{be(),ue&&ue()})};J?J(w,be,Se):Se()}else o(w,v,E)},Z=function(h,v,E,S,C){S===void 0&&(S=!1),C===void 0&&(C=!1);const w=h.type,M=h.props,k=h.ref,T=h.children,B=h.dynamicChildren,V=h.shapeFlag,X=h.patchFlag,J=h.dirs,ue=h.cacheIndex;if(X===-2&&(C=!1),k!=null&&(It(),Ro(k,null,E,h,!0),Pt()),ue!=null&&(v.renderCache[ue]=void 0),V&256){v.ctx.deactivate(h);return}const be=V&1&&J,Se=!Jn(h);let Re;if(Se&&(Re=M&&M.onVnodeBeforeUnmount)&&Wt(Re,v,h),V&6)Y(h.component,E,S);else{if(V&128){h.suspense.unmount(E,S);return}be&&Mn(h,null,v,"beforeUnmount"),V&64?h.type.remove(h,v,E,_e,S):B&&!B.hasOnce&&(w!==He||X>0&&X&64)?j(B,v,E,!1,!0):(w===He&&X&384||!C&&V&16)&&j(T,v,E),S&&le(h)}(Se&&(Re=M&&M.onVnodeUnmounted)||be)&&tt(()=>{Re&&Wt(Re,v,h),be&&Mn(h,null,v,"unmounted")},E)},le=y=>{const h=y.type,v=y.el,E=y.anchor,S=y.transition;if(h===He){ce(v,E);return}if(h===Ds){F(y);return}const C=()=>{i(v),S&&!S.persisted&&S.afterLeave&&S.afterLeave()};if(y.shapeFlag&1&&S&&!S.persisted){const w=S.leave,M=S.delayLeave,k=()=>w(v,C);M?M(y.el,C,k):k()}else C()},ce=(y,h)=>{let v;for(;y!==h;)v=f(y),i(y),y=v;i(h)},Y=(y,h,v)=>{const E=y.bum,S=y.scope,C=y.job,w=y.subTree,M=y.um,k=y.m,T=y.a;Fu(k),Fu(T),E&&os(E),S.stop(),C&&(C.flags|=8,Z(w,y,h,v)),M&&tt(M,h),tt(()=>{y.isUnmounted=!0},h)},j=function(h,v,E,S,C,w){S===void 0&&(S=!1),C===void 0&&(C=!1),w===void 0&&(w=0);for(let M=w;M<h.length;M++)Z(h[M],v,E,S,C)},ne=y=>{if(y.shapeFlag&6)return ne(y.component.subTree);if(y.shapeFlag&128)return y.suspense.next();const h=f(y.anchor||y.el),v=h&&h[ja];return v?f(v):h};let pe=!1;const me=(y,h,v)=>{let E;y==null?h._vnode&&(Z(h._vnode,null,null,!0),E=h._vnode.component):_(h._vnode||null,y,h,null,null,null,v),h._vnode=y,pe||(pe=!0,Ya(E),Ua(),pe=!1)},_e={p:_,um:Z,m:D,r:le,mt:O,mc:K,pc:L,pbc:re,n:ne,o:e};return{render:me,hydrate:void 0,createApp:Pg(me)}}function Rs(e,t){let n=e.type,o=e.props;return t==="svg"&&n==="foreignObject"||t==="mathml"&&n==="annotation-xml"&&o&&o.encoding&&o.encoding.includes("html")?void 0:t}function In(e,t){let n=e.effect,o=e.job;t?(n.flags|=32,o.flags|=4):(n.flags&=-33,o.flags&=-5)}function qg(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ku(e,t,n){const o=e.children,i=t.children;if(ye(o)&&ye(i))for(let r=0;r<o.length;r++){const s=o[r];let l=i[r];l.shapeFlag&1&&!l.dynamicChildren&&(l.patchFlag<=0||l.patchFlag===32)&&(l=i[r]=Qt(i[r]),l.el=s.el),l.type===Yi&&(l.patchFlag===-1&&(l=i[r]=Qt(l)),l.el=s.el),l.type===Jt&&!l.el&&(l.el=s.el)}}function Zg(e){const t=e.slice(),n=[0];let o,i,r,s,l;const a=e.length;for(o=0;o<a;o++){const u=e[o];if(u!==0){if(i=n[n.length-1],e[i]<u){t[o]=i,n.push(o);continue}for(r=0,s=n.length-1;r<s;)l=r+s>>1,e[n[l]]<u?r=l+1:s=l;u<e[n[r]]&&(r>0&&(t[o]=n[r-1]),n[r]=o)}}for(r=n.length,s=n[r-1];r-- >0;)n[r]=s,s=t[s];return n}function $u(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:$u(t)}function Fu(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Lu(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?Lu(t.subTree):null}const Hu=e=>e.__isSuspense;function jg(e,t){t&&t.pendingBranch?ye(e)?t.effects.push(...e):t.effects.push(e):sg(e)}const He=Symbol.for("v-fgt"),Yi=Symbol.for("v-txt"),Jt=Symbol.for("v-cmt"),Ds=Symbol.for("v-stc"),$o=[];let lt=null;function se(e){e===void 0&&(e=!1),$o.push(lt=e?null:[])}function Jg(){$o.pop(),lt=$o[$o.length-1]||null}let to=1;function Ui(e,t){t===void 0&&(t=!1),to+=e,e<0&&lt&&t&&(lt.hasOnce=!0)}function Wu(e){return e.dynamicChildren=to>0?lt||Kn:null,Jg(),to>0&&lt&&lt.push(e),e}function ge(e,t,n,o,i,r){return Wu(te(e,t,n,o,i,r,!0))}function qe(e,t,n,o,i){return Wu(Ne(e,t,n,o,i,!0))}function Fo(e){return e?e.__v_isVNode===!0:!1}function Lo(e,t){return e.type===t.type&&e.key===t.key}const zu=e=>{let t=e.key;return t??null},Xi=e=>{let t=e.ref,n=e.ref_key,o=e.ref_for;return typeof t=="number"&&(t=""+t),t!=null?ze(t)||Ve(t)||we(t)?{i:rt,r:t,k:n,f:!!o}:t:null};function te(e,t,n,o,i,r,s,l){t===void 0&&(t=null),n===void 0&&(n=null),o===void 0&&(o=0),i===void 0&&(i=null),r===void 0&&(r=e===He?0:1),s===void 0&&(s=!1),l===void 0&&(l=!1);const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&zu(t),ref:t&&Xi(t),scopeId:qa,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:o,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:rt};return l?(ks(a,n),r&128&&e.normalize(a)):n&&(a.shapeFlag|=ze(n)?8:16),to>0&&!s&&lt&&(a.patchFlag>0||r&6)&&a.patchFlag!==32&&lt.push(a),a}const Ne=Qg;function Qg(e,t,n,o,i,r){if(t===void 0&&(t=null),n===void 0&&(n=null),o===void 0&&(o=0),i===void 0&&(i=null),r===void 0&&(r=!1),(!e||e===uu)&&(e=Jt),Fo(e)){const l=no(e,t,!0);return n&&ks(l,n),to>0&&!r&&lt&&(l.shapeFlag&6?lt[lt.indexOf(e)]=l:lt.push(l)),l.patchFlag=-2,l}if(up(e)&&(e=e.__vccOpts),t){t=ep(t);let l=t,a=l.class,u=l.style;a&&!ze(a)&&(t.class=Be(a)),Me(u)&&(Ri(u)&&!ye(u)&&(u=Ue({},u)),t.style=Xe(u))}const s=ze(e)?1:Hu(e)?128:dg(e)?64:Me(e)?4:we(e)?2:0;return te(e,t,n,o,i,s,r,!0)}function ep(e){return e?Ri(e)||Nu(e)?Ue({},e):e:null}function no(e,t,n,o){n===void 0&&(n=!1),o===void 0&&(o=!1);const i=e.props,r=e.ref,s=e.patchFlag,l=e.children,a=e.transition,u=t?Ho(i||{},t):i,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&zu(u),ref:t&&t.ref?n&&r?ye(r)?r.concat(Xi(t)):[r,Xi(t)]:Xi(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==He?s===-1?16:s|16:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&no(e.ssContent),ssFallback:e.ssFallback&&no(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&o&&Ss(c,a.clone(c)),c}function Lt(e,t){return e===void 0&&(e=" "),t===void 0&&(t=0),Ne(Yi,null,e,t)}function Ee(e,t){return e===void 0&&(e=""),t===void 0&&(t=!1),t?(se(),qe(Jt,null,e)):Ne(Jt,null,e)}function Ht(e){return e==null||typeof e=="boolean"?Ne(Jt):ye(e)?Ne(He,null,e.slice()):Fo(e)?Qt(e):Ne(Yi,null,String(e))}function Qt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:no(e)}function ks(e,t){let n=0;const o=e.shapeFlag;if(t==null)t=null;else if(ye(t))n=16;else if(typeof t=="object")if(o&65){const i=t.default;i&&(i._c&&(i._d=!1),ks(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!Nu(t)?t._ctx=rt:i===3&&rt&&(rt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else we(t)?(t={default:t,_ctx:rt},n=32):(t=String(t),o&64?(n=16,t=[Lt(t)]):n=8);e.children=t,e.shapeFlag|=n}function Ho(){const e={};for(let t=0;t<arguments.length;t++){const n=t<0||arguments.length<=t?void 0:arguments[t];for(const o in n)if(o==="class")e.class!==n.class&&(e.class=Be([e.class,n.class]));else if(o==="style")e.style=Xe([e.style,n.style]);else if(wi(o)){const i=e[o],r=n[o];r&&i!==r&&!(ye(i)&&i.includes(r))&&(e[o]=i?[].concat(i,r):r)}else o!==""&&(e[o]=n[o])}return e}function Wt(e,t,n,o){o===void 0&&(o=null),Dt(e,t,7,[n,o])}const tp=bu();let np=0;function op(e,t,n){const o=e.type,i=(t?t.appContext:e.appContext)||tp,r={uid:np++,vnode:e,type:o,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new ba(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(i.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Mu(o,i),emitsOptions:Su(o,i),emit:null,emitted:null,propsDefaults:Fe,inheritAttrs:o.inheritAttrs,ctx:Fe,data:Fe,props:Fe,attrs:Fe,slots:Fe,refs:Fe,setupState:Fe,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return r.ctx={_:r},r.root=t?t.root:r,r.emit=Dg.bind(null,r),e.ce&&e.ce(r),r}let nt=null;const mn=()=>nt||rt;let qi,$s;{const e=So(),t=(n,o)=>{let i;return(i=e[n])||(i=e[n]=[]),i.push(o),r=>{i.length>1?i.forEach(s=>s(r)):i[0](r)}};qi=t("__VUE_INSTANCE_SETTERS__",n=>nt=n),$s=t("__VUE_SSR_SETTERS__",n=>zo=n)}const Wo=e=>{const t=nt;return qi(e),e.scope.on(),()=>{e.scope.off(),qi(t)}},Bu=()=>{nt&&nt.scope.off(),qi(null)};function Vu(e){return e.vnode.shapeFlag&4}let zo=!1;function ip(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1),t&&$s(t);const o=e.vnode,i=o.props,r=o.children,s=Vu(e);Wg(e,i,s,t),Gg(e,r,n||t);const l=s?rp(e,t):void 0;return t&&$s(!1),l}function rp(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,xg);const o=n.setup;if(o){It();const i=e.setupContext=o.length>1?Uu(e):null,r=Wo(e),s=qn(o,e,0,[e.props,i]),l=ha(s);if(Pt(),r(),(l||e.sp)&&!Jn(e)&&nu(e),l){if(s.then(Bu,Bu),t)return s.then(a=>{Gu(e,a,t)}).catch(a=>{$i(a,e,0)});e.asyncDep=s}else Gu(e,s,t)}else Yu(e,t)}function Gu(e,t,n){we(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Me(t)&&(e.setupState=za(t)),Yu(e,n)}let Ku;function Yu(e,t,n){const o=e.type;if(!e.render){if(!t&&Ku&&!o.render){const i=o.template||Ns(e).template;if(i){const r=e.appContext.config,s=r.isCustomElement,l=r.compilerOptions,a=o.delimiters,u=o.compilerOptions,c=Ue(Ue({isCustomElement:s,delimiters:a},l),u);o.render=Ku(i,c)}}e.render=o.render||Mt}{const i=Wo(e);It();try{Og(e)}finally{Pt(),i()}}}const sp={get(e,t){return et(e,"get",""),e[t]}};function Uu(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,sp),slots:e.slots,emit:e.emit,expose:t}}function Fs(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(za(To(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Do)return Do[n](e)},has(t,n){return n in t||n in Do}})):e.proxy}const lp=/(?:^|[-_])\w/g,ap=e=>e.replace(lp,t=>t.toUpperCase()).replace(/[-_]/g,"");function Xu(e,t){return t===void 0&&(t=!0),we(e)?e.displayName||e.name:e.name||t&&e.__name}function qu(e,t,n){n===void 0&&(n=!1);let o=Xu(t);if(!o&&t.__file){const i=t.__file.match(/([^/\\]+)\.\w+$/);i&&(o=i[1])}if(!o&&e){const i=r=>{for(const s in r)if(r[s]===t)return s};o=i(e.components)||e.parent&&i(e.parent.type.components)||i(e.appContext.components)}return o?ap(o):n?"App":"Anonymous"}function up(e){return we(e)&&"__vccOpts"in e}const fe=(e,t)=>jh(e,t,zo);function Ie(e,t,n){try{Ui(-1);const o=arguments.length;return o===2?Me(t)&&!ye(t)?Fo(t)?Ne(e,null,[t]):Ne(e,t):Ne(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&Fo(n)&&(n=[n]),Ne(e,t,n))}finally{Ui(1)}}function cp(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let o=0;o<n.length;o++)if(_t(n[o],t[o]))return!1;return to>0&&lt&&lt.push(e),!0}const dp="3.5.30";/**
* @vue/runtime-dom v3.5.30
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let Ls;const Zu=typeof window<"u"&&window.trustedTypes;if(Zu)try{Ls=Zu.createPolicy("vue",{createHTML:e=>e})}catch{}const ju=Ls?e=>Ls.createHTML(e):e=>e,fp="http://www.w3.org/2000/svg",hp="http://www.w3.org/1998/Math/MathML",en=typeof document<"u"?document:null,Ju=en&&en.createElement("template"),gp={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const i=t==="svg"?en.createElementNS(fp,e):t==="mathml"?en.createElementNS(hp,e):n?en.createElement(e,{is:n}):en.createElement(e);return e==="select"&&o&&o.multiple!=null&&i.setAttribute("multiple",o.multiple),i},createText:e=>en.createTextNode(e),createComment:e=>en.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>en.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,i,r){const s=n?n.previousSibling:t.lastChild;if(i&&(i===r||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===r||!(i=i.nextSibling)););else{Ju.innerHTML=ju(o==="svg"?"<svg>"+e+"</svg>":o==="mathml"?"<math>"+e+"</math>":e);const l=Ju.content;if(o==="svg"||o==="mathml"){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},pp=Symbol("_vtc");function vp(e,t,n){const o=e[pp];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Qu=Symbol("_vod"),mp=Symbol("_vsh"),yp=Symbol(""),_p=/(?:^|;)\s*display\s*:/;function wp(e,t,n){const o=e.style,i=ze(n);let r=!1;if(n&&!i){if(t)if(ze(t))for(const s of t.split(";")){const l=s.slice(0,s.indexOf(":")).trim();n[l]==null&&Zi(o,l,"")}else for(const s in t)n[s]==null&&Zi(o,s,"");for(const s in n)s==="display"&&(r=!0),Zi(o,s,n[s])}else if(i){if(t!==n){const s=o[yp];s&&(n+=";"+s),o.cssText=n,r=_p.test(n)}}else t&&e.removeAttribute("style");Qu in e&&(e[Qu]=r?o.display:"",e[mp]&&(o.display="none"))}const ec=/\s*!important$/;function Zi(e,t,n){if(ye(n))n.forEach(o=>Zi(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=bp(e,t);ec.test(n)?e.setProperty(dn(o),n.replace(ec,""),"important"):e[o]=n}}const tc=["Webkit","Moz","ms"],Hs={};function bp(e,t){const n=Hs[t];if(n)return n;let o=ot(t);if(o!=="filter"&&o in e)return Hs[t]=o;o=Ei(o);for(let i=0;i<tc.length;i++){const r=tc[i]+o;if(r in e)return Hs[t]=r}return t}const nc="http://www.w3.org/1999/xlink";function oc(e,t,n,o,i,r){r===void 0&&(r=bh(t)),o&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(nc,t.slice(6,t.length)):e.setAttributeNS(nc,t,n):n==null||r&&!ya(n)?e.removeAttribute(t):e.setAttribute(t,r?"":yt(n)?String(n):n)}function ic(e,t,n,o,i){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?ju(n):n);return}const r=e.tagName;if(t==="value"&&r!=="PROGRESS"&&!r.includes("-")){const l=r==="OPTION"?e.getAttribute("value")||"":e.value,a=n==null?e.type==="checkbox"?"on":"":String(n);(l!==a||!("_value"in e))&&(e.value=a),n==null&&e.removeAttribute(t),e._value=n;return}let s=!1;if(n===""||n==null){const l=typeof e[t];l==="boolean"?n=ya(n):n==null&&l==="string"?(n="",s=!0):l==="number"&&(n=0,s=!0)}try{e[t]=n}catch{}s&&e.removeAttribute(i||t)}function Sp(e,t,n,o){e.addEventListener(t,n,o)}function Ep(e,t,n,o){e.removeEventListener(t,n,o)}const rc=Symbol("_vei");function xp(e,t,n,o,i){i===void 0&&(i=null);const r=e[rc]||(e[rc]={}),s=r[t];if(o&&s)s.value=o;else{const l=Ap(t),a=l[0],u=l[1];if(o){const c=r[t]=Np(o,i);Sp(e,a,c,u)}else s&&(Ep(e,a,s,u),r[t]=void 0)}}const sc=/(?:Once|Passive|Capture)$/;function Ap(e){let t;if(sc.test(e)){t={};let o;for(;o=e.match(sc);)e=e.slice(0,e.length-o[0].length),t[o[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):dn(e.slice(2)),t]}let Ws=0;const Op=Promise.resolve(),Cp=()=>Ws||(Op.then(()=>Ws=0),Ws=Date.now());function Np(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;Dt(Tp(o,n.value),t,5,[o])};return n.value=e,n.attached=Cp(),n}function Tp(e,t){if(ye(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(o=>i=>!i._stopped&&o&&o(i))}else return t}const lc=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Mp=(e,t,n,o,i,r)=>{const s=i==="svg";t==="class"?vp(e,o,s):t==="style"?wp(e,n,o):wi(t)?es(t)||xp(e,t,n,o,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Ip(e,t,o,s))?(ic(e,t,o),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&oc(e,t,o,s,r,t!=="value")):e._isVueCE&&(Pp(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!ze(o)))?ic(e,ot(t),o,r,t):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),oc(e,t,o,s))};function Ip(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&lc(t)&&we(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const i=e.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return lc(t)&&ze(n)?!1:t in e}function Pp(e,t){const n=e._def.props;if(!n)return!1;const o=ot(t);return Array.isArray(n)?n.some(i=>ot(i)===o):Object.keys(n).some(i=>ot(i)===o)}const Rp=["ctrl","shift","alt","meta"],Dp={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Rp.some(n=>e[n+"Key"]&&!t.includes(n))},Ge=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=function(i){for(let a=0;a<t.length;a++){const u=Dp[t[a]];if(u&&u(i,t))return}for(var r=arguments.length,s=new Array(r>1?r-1:0),l=1;l<r;l++)s[l-1]=arguments[l];return e(i,...s)})},kp={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Pe=(e,t)=>{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=i=>{if(!("key"in i))return;const r=dn(i.key);if(t.some(s=>s===r||kp[s]===r))return e(i)})},$p=Ue({patchProp:Mp},gp);let ac;function Fp(){return ac||(ac=Ug($p))}const Lp=function(){const t=Fp().createApp(...arguments),n=t.mount;return t.mount=o=>{const i=Wp(o);if(!i)return;const r=t._component;!we(r)&&!r.render&&!r.template&&(r.template=i.innerHTML),i.nodeType===1&&(i.textContent="");const s=n(i,!1,Hp(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),s},t};function Hp(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Wp(e){return ze(e)?document.querySelector(e):e}function zp(){return uc().__VUE_DEVTOOLS_GLOBAL_HOOK__}function uc(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const Bp=typeof Proxy=="function",Vp="devtools-plugin:setup",Gp="plugin:settings:set";let oo,zs;function Kp(){var e;return oo!==void 0||(typeof window<"u"&&window.performance?(oo=!0,zs=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?(oo=!0,zs=globalThis.perf_hooks.performance):oo=!1),oo}function Yp(){return Kp()?zs.now():Date.now()}class Up{constructor(t,n){var o=this;this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=n;const i={};if(t.settings)for(const l in t.settings){const a=t.settings[l];i[l]=a.defaultValue}const r="__vue-devtools-plugin-settings__"+t.id;let s=Object.assign({},i);try{const l=localStorage.getItem(r),a=JSON.parse(l);Object.assign(s,a)}catch{}this.fallbacks={getSettings(){return s},setSettings(l){try{localStorage.setItem(r,JSON.stringify(l))}catch{}s=l},now(){return Yp()}},n&&n.on(Gp,(l,a)=>{l===this.plugin.id&&this.fallbacks.setSettings(a)}),this.proxiedOn=new Proxy({},{get:(l,a)=>this.target?this.target.on[a]:function(){for(var u=arguments.length,c=new Array(u),d=0;d<u;d++)c[d]=arguments[d];o.onQueue.push({method:a,args:c})}}),this.proxiedTarget=new Proxy({},{get:(l,a)=>this.target?this.target[a]:a==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(a)?function(){for(var u=arguments.length,c=new Array(u),d=0;d<u;d++)c[d]=arguments[d];return o.targetQueue.push({method:a,args:c,resolve:()=>{}}),o.fallbacks[a](...c)}:function(){for(var u=arguments.length,c=new Array(u),d=0;d<u;d++)c[d]=arguments[d];return new Promise(f=>{o.targetQueue.push({method:a,args:c,resolve:f})})}})}async setRealTarget(t){this.target=t;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}}function Xp(e,t){const n=e,o=uc(),i=zp(),r=Bp&&n.enableEarlyProxy;if(i&&(o.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!r))i.emit(Vp,e,t);else{const s=r?new Up(n,i):null;(o.__VUE_DEVTOOLS_PLUGINS__=o.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:s}),s&&t(s.proxiedTarget)}}/*!
 * vuex v4.1.0
 * (c) 2022 Evan You
 * @license MIT
 */var cc="store";function dc(e){return e===void 0&&(e=null),vt(e!==null?e:cc)}function io(e,t){Object.keys(e).forEach(function(n){return t(e[n],n)})}function qp(e){return e!==null&&typeof e=="object"}function Zp(e){return e&&typeof e.then=="function"}function jp(e,t){return function(){return e(t)}}function fc(e,t,n){return t.indexOf(e)<0&&(n&&n.prepend?t.unshift(e):t.push(e)),function(){var o=t.indexOf(e);o>-1&&t.splice(o,1)}}function hc(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var n=e.state;ji(e,n,[],e._modules.root,!0),Bs(e,n,t)}function Bs(e,t,n){var o=e._state,i=e._scope;e.getters={},e._makeLocalGettersCache=Object.create(null);var r=e._wrappedGetters,s={},l={},a=ss(!0);a.run(function(){io(r,function(u,c){s[c]=jp(u,e),l[c]=fe(function(){return s[c]()}),Object.defineProperty(e.getters,c,{get:function(){return l[c].value},enumerable:!0})})}),e._state=No({data:t}),e._scope=a,e.strict&&nv(e),o&&n&&e._withCommit(function(){o.data=null}),i&&i.stop()}function ji(e,t,n,o,i){var r=!n.length,s=e._modules.getNamespace(n);if(o.namespaced&&(e._modulesNamespaceMap[s],e._modulesNamespaceMap[s]=o),!r&&!i){var l=Vs(t,n.slice(0,-1)),a=n[n.length-1];e._withCommit(function(){l[a]=o.state})}var u=o.context=Jp(e,s,n);o.forEachMutation(function(c,d){var f=s+d;Qp(e,f,c,u)}),o.forEachAction(function(c,d){var f=c.root?d:s+d,p=c.handler||c;ev(e,f,p,u)}),o.forEachGetter(function(c,d){var f=s+d;tv(e,f,c,u)}),o.forEachChild(function(c,d){ji(e,t,n.concat(d),c,i)})}function Jp(e,t,n){var o=t==="",i={dispatch:o?e.dispatch:function(r,s,l){var a=Ji(r,s,l),u=a.payload,c=a.options,d=a.type;return(!c||!c.root)&&(d=t+d),e.dispatch(d,u)},commit:o?e.commit:function(r,s,l){var a=Ji(r,s,l),u=a.payload,c=a.options,d=a.type;(!c||!c.root)&&(d=t+d),e.commit(d,u,c)}};return Object.defineProperties(i,{getters:{get:o?function(){return e.getters}:function(){return gc(e,t)}},state:{get:function(){return Vs(e.state,n)}}}),i}function gc(e,t){if(!e._makeLocalGettersCache[t]){var n={},o=t.length;Object.keys(e.getters).forEach(function(i){if(i.slice(0,o)===t){var r=i.slice(o);Object.defineProperty(n,r,{get:function(){return e.getters[i]},enumerable:!0})}}),e._makeLocalGettersCache[t]=n}return e._makeLocalGettersCache[t]}function Qp(e,t,n,o){var i=e._mutations[t]||(e._mutations[t]=[]);i.push(function(s){n.call(e,o.state,s)})}function ev(e,t,n,o){var i=e._actions[t]||(e._actions[t]=[]);i.push(function(s){var l=n.call(e,{dispatch:o.dispatch,commit:o.commit,getters:o.getters,state:o.state,rootGetters:e.getters,rootState:e.state},s);return Zp(l)||(l=Promise.resolve(l)),e._devtoolHook?l.catch(function(a){throw e._devtoolHook.emit("vuex:error",a),a}):l})}function tv(e,t,n,o){e._wrappedGetters[t]||(e._wrappedGetters[t]=function(r){return n(o.state,o.getters,r.state,r.getters)})}function nv(e){Ae(function(){return e._state.data},function(){},{deep:!0,flush:"sync"})}function Vs(e,t){return t.reduce(function(n,o){return n[o]},e)}function Ji(e,t,n){return qp(e)&&e.type&&(n=t,t=e,e=e.type),{type:e,payload:t,options:n}}var ov="vuex bindings",pc="vuex:mutations",Gs="vuex:actions",ro="vuex",iv=0;function rv(e,t){Xp({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:[ov]},function(n){n.addTimelineLayer({id:pc,label:"Vuex Mutations",color:vc}),n.addTimelineLayer({id:Gs,label:"Vuex Actions",color:vc}),n.addInspector({id:ro,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),n.on.getInspectorTree(function(o){if(o.app===e&&o.inspectorId===ro)if(o.filter){var i=[];wc(i,t._modules.root,o.filter,""),o.rootNodes=i}else o.rootNodes=[_c(t._modules.root,"")]}),n.on.getInspectorState(function(o){if(o.app===e&&o.inspectorId===ro){var i=o.nodeId;gc(t,i),o.state=av(cv(t._modules,i),i==="root"?t.getters:t._makeLocalGettersCache,i)}}),n.on.editInspectorState(function(o){if(o.app===e&&o.inspectorId===ro){var i=o.nodeId,r=o.path;i!=="root"&&(r=i.split("/").filter(Boolean).concat(r)),t._withCommit(function(){o.set(t._state.data,r,o.state.value)})}}),t.subscribe(function(o,i){var r={};o.payload&&(r.payload=o.payload),r.state=i,n.notifyComponentUpdate(),n.sendInspectorTree(ro),n.sendInspectorState(ro),n.addTimelineEvent({layerId:pc,event:{time:Date.now(),title:o.type,data:r}})}),t.subscribeAction({before:function(i,r){var s={};i.payload&&(s.payload=i.payload),i._id=iv++,i._time=Date.now(),s.state=r,n.addTimelineEvent({layerId:Gs,event:{time:i._time,title:i.type,groupId:i._id,subtitle:"start",data:s}})},after:function(i,r){var s={},l=Date.now()-i._time;s.duration={_custom:{type:"duration",display:l+"ms",tooltip:"Action duration",value:l}},i.payload&&(s.payload=i.payload),s.state=r,n.addTimelineEvent({layerId:Gs,event:{time:Date.now(),title:i.type,groupId:i._id,subtitle:"end",data:s}})}})})}var vc=8702998,sv=6710886,lv=16777215,mc={label:"namespaced",textColor:lv,backgroundColor:sv};function yc(e){return e&&e!=="root"?e.split("/").slice(-2,-1)[0]:"Root"}function _c(e,t){return{id:t||"root",label:yc(t),tags:e.namespaced?[mc]:[],children:Object.keys(e._children).map(function(n){return _c(e._children[n],t+n+"/")})}}function wc(e,t,n,o){o.includes(n)&&e.push({id:o||"root",label:o.endsWith("/")?o.slice(0,o.length-1):o||"Root",tags:t.namespaced?[mc]:[]}),Object.keys(t._children).forEach(function(i){wc(e,t._children[i],n,o+i+"/")})}function av(e,t,n){t=n==="root"?t:t[n];var o=Object.keys(t),i={state:Object.keys(e.state).map(function(s){return{key:s,editable:!0,value:e.state[s]}})};if(o.length){var r=uv(t);i.getters=Object.keys(r).map(function(s){return{key:s.endsWith("/")?yc(s):s,editable:!1,value:Ks(function(){return r[s]})}})}return i}function uv(e){var t={};return Object.keys(e).forEach(function(n){var o=n.split("/");if(o.length>1){var i=t,r=o.pop();o.forEach(function(s){i[s]||(i[s]={_custom:{value:{},display:s,tooltip:"Module",abstract:!0}}),i=i[s]._custom.value}),i[r]=Ks(function(){return e[n]})}else t[n]=Ks(function(){return e[n]})}),t}function cv(e,t){var n=t.split("/").filter(function(o){return o});return n.reduce(function(o,i,r){var s=o[i];if(!s)throw new Error('Missing module "'+i+'" for path "'+t+'".');return r===n.length-1?s:s._children},t==="root"?e:e.root._children)}function Ks(e){try{return e()}catch(t){return t}}var Et=function(t,n){this.runtime=n,this._children=Object.create(null),this._rawModule=t;var o=t.state;this.state=(typeof o=="function"?o():o)||{}},bc={namespaced:{configurable:!0}};bc.namespaced.get=function(){return!!this._rawModule.namespaced},Et.prototype.addChild=function(t,n){this._children[t]=n},Et.prototype.removeChild=function(t){delete this._children[t]},Et.prototype.getChild=function(t){return this._children[t]},Et.prototype.hasChild=function(t){return t in this._children},Et.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},Et.prototype.forEachChild=function(t){io(this._children,t)},Et.prototype.forEachGetter=function(t){this._rawModule.getters&&io(this._rawModule.getters,t)},Et.prototype.forEachAction=function(t){this._rawModule.actions&&io(this._rawModule.actions,t)},Et.prototype.forEachMutation=function(t){this._rawModule.mutations&&io(this._rawModule.mutations,t)},Object.defineProperties(Et.prototype,bc);var Pn=function(t){this.register([],t,!1)};Pn.prototype.get=function(t){return t.reduce(function(n,o){return n.getChild(o)},this.root)},Pn.prototype.getNamespace=function(t){var n=this.root;return t.reduce(function(o,i){return n=n.getChild(i),o+(n.namespaced?i+"/":"")},"")},Pn.prototype.update=function(t){Sc([],this.root,t)},Pn.prototype.register=function(t,n,o){var i=this;o===void 0&&(o=!0);var r=new Et(n,o);if(t.length===0)this.root=r;else{var s=this.get(t.slice(0,-1));s.addChild(t[t.length-1],r)}n.modules&&io(n.modules,function(l,a){i.register(t.concat(a),l,o)})},Pn.prototype.unregister=function(t){var n=this.get(t.slice(0,-1)),o=t[t.length-1],i=n.getChild(o);i&&i.runtime&&n.removeChild(o)},Pn.prototype.isRegistered=function(t){var n=this.get(t.slice(0,-1)),o=t[t.length-1];return n?n.hasChild(o):!1};function Sc(e,t,n){if(t.update(n),n.modules)for(var o in n.modules){if(!t.getChild(o))return;Sc(e.concat(o),t.getChild(o),n.modules[o])}}function dv(e){return new at(e)}var at=function(t){var n=this;t===void 0&&(t={});var o=t.plugins;o===void 0&&(o=[]);var i=t.strict;i===void 0&&(i=!1);var r=t.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new Pn(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._scope=null,this._devtools=r;var s=this,l=this,a=l.dispatch,u=l.commit;this.dispatch=function(f,p){return a.call(s,f,p)},this.commit=function(f,p,x){return u.call(s,f,p,x)},this.strict=i;var c=this._modules.root.state;ji(this,c,[],this._modules.root),Bs(this,c),o.forEach(function(d){return d(n)})},Ys={state:{configurable:!0}};at.prototype.install=function(t,n){t.provide(n||cc,this),t.config.globalProperties.$store=this;var o=this._devtools!==void 0?this._devtools:!1;o&&rv(t,this)},Ys.state.get=function(){return this._state.data},Ys.state.set=function(e){},at.prototype.commit=function(t,n,o){var i=this,r=Ji(t,n,o),s=r.type,l=r.payload,a={type:s,payload:l},u=this._mutations[s];u&&(this._withCommit(function(){u.forEach(function(d){d(l)})}),this._subscribers.slice().forEach(function(c){return c(a,i.state)}))},at.prototype.dispatch=function(t,n){var o=this,i=Ji(t,n),r=i.type,s=i.payload,l={type:r,payload:s},a=this._actions[r];if(a){try{this._actionSubscribers.slice().filter(function(c){return c.before}).forEach(function(c){return c.before(l,o.state)})}catch{}var u=a.length>1?Promise.all(a.map(function(c){return c(s)})):a[0](s);return new Promise(function(c,d){u.then(function(f){try{o._actionSubscribers.filter(function(p){return p.after}).forEach(function(p){return p.after(l,o.state)})}catch{}c(f)},function(f){try{o._actionSubscribers.filter(function(p){return p.error}).forEach(function(p){return p.error(l,o.state,f)})}catch{}d(f)})})}},at.prototype.subscribe=function(t,n){return fc(t,this._subscribers,n)},at.prototype.subscribeAction=function(t,n){var o=typeof t=="function"?{before:t}:t;return fc(o,this._actionSubscribers,n)},at.prototype.watch=function(t,n,o){var i=this;return Ae(function(){return t(i.state,i.getters)},n,Object.assign({},o))},at.prototype.replaceState=function(t){var n=this;this._withCommit(function(){n._state.data=t})},at.prototype.registerModule=function(t,n,o){o===void 0&&(o={}),typeof t=="string"&&(t=[t]),this._modules.register(t,n),ji(this,this.state,t,this._modules.get(t),o.preserveState),Bs(this,this.state)},at.prototype.unregisterModule=function(t){var n=this;typeof t=="string"&&(t=[t]),this._modules.unregister(t),this._withCommit(function(){var o=Vs(n.state,t.slice(0,-1));delete o[t[t.length-1]]}),hc(this)},at.prototype.hasModule=function(t){return typeof t=="string"&&(t=[t]),this._modules.isRegistered(t)},at.prototype.hotUpdate=function(t){this._modules.update(t),hc(this,!0)},at.prototype._withCommit=function(t){var n=this._committing;this._committing=!0,t(),this._committing=n},Object.defineProperties(at.prototype,Ys);var Us={name:"WorkflowTitlebar",props:{saveStatus:{type:String,default:"upToDate"}},computed:{workflow(){return this.$store.getters.workflow||{title:"COM_WORKFLOW_GRAPH_LOADING",published:!1}},stagesCount(){return this.$store.getters.stages?.length||0},transitionsCount(){return this.$store.getters.transitions?.length||0}}};const fv={class:"d-flex flex-wrap align-items-center justify-content-between","aria-labelledby":"workflow-main-title"},hv={class:"col-md-6 d-flex flex-column"},gv={id:"workflow-main-title",class:"mb-2"},pv={class:"d-flex align-items-center flex-wrap mb-0","aria-label":"Workflow Details"},vv={class:"visually-hidden"},mv={class:"me-3 mb-1 d-flex mb-0"},yv=["aria-label"],_v={class:"visually-hidden"},wv={class:"me-3 mb-1 d-flex mb-0"},bv={class:"visually-hidden"},Sv={class:"me-3 mb-1 d-flex mb-0"},Ev=["aria-label"];function xv(e,t,n,o,i,r){return se(),ge("section",fv,[te("div",hv,[te("h1",gv,ve(e.translate(r.workflow?.title)),1),te("dl",pv,[te("dt",vv,ve(e.translate("COM_WORKFLOW_GRAPH_STATUS")),1),te("dd",mv,[te("span",{class:Be(["badge",r.workflow.published?"bg-success":"bg-warning"]),role:"status","aria-label":`${r.workflow.published?e.translate("COM_WORKFLOW_GRAPH_ENABLED"):e.translate("COM_WORKFLOW_GRAPH_DISABLED")}`},ve(r.workflow.published?e.translate("COM_WORKFLOW_GRAPH_ENABLED"):e.translate("COM_WORKFLOW_GRAPH_DISABLED")),11,yv)]),te("dt",_v,ve(e.translate("COM_WORKFLOW_GRAPH_STAGE_COUNT")),1),te("dd",wv,[te("span",null,ve(r.stagesCount)+" "+ve(r.stagesCount===1?e.translate("COM_WORKFLOW_GRAPH_STAGE"):e.translate("COM_WORKFLOW_GRAPH_STAGES")),1)]),te("dt",bv,ve(e.translate("COM_WORKFLOW_GRAPH_TRANSITION_COUNT")),1),te("dd",Sv,[te("span",null,ve(r.transitionsCount)+" "+ve(r.transitionsCount===1?e.translate("COM_WORKFLOW_GRAPH_TRANSITION"):e.translate("COM_WORKFLOW_GRAPH_TRANSITIONS")),1)])])]),te("div",{id:"save-status",class:Be(["mb-2 fw-bold",{"text-warning":n.saveStatus?.value==="unsaved"}]),role:"status","aria-live":"polite","aria-label":e.translate(n.saveStatus?.value==="unsaved"?"COM_WORKFLOW_GRAPH_UNSAVED_CHANGES":"COM_WORKFLOW_GRAPH_UP_TO_DATE")},ve(n.saveStatus.value==="unsaved"?e.translate("COM_WORKFLOW_GRAPH_UNSAVED_CHANGES"):e.translate("COM_WORKFLOW_GRAPH_UP_TO_DATE")),11,Ev)])}Us.render=xv,Us.__file="administrator/components/com_workflow/resources/scripts/components/Titlebar.vue";function Av(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function ie(){return ie=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},ie.apply(null,arguments)}function Bo(e,t){if(e==null)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;n[o]=e[o]}return n}const Ov=["eventFilter"],Cv=["eventFilter"],Nv=["id"],Tv=["computedPosition","handleBounds","selected","dimensions","isParent","resizing","dragging","events"],Mv=["selected","sourceNode","targetNode","events"];function Vo(e){return ls()?(xi(e),!0):!1}function tn(e){return typeof e=="function"?e():de(e)}const Iv=typeof window<"u"&&typeof document<"u",Pv=e=>typeof e<"u",Rv=Object.prototype.toString,Dv=e=>Rv.call(e)==="[object Object]",kv=()=>{};function $v(e,t){function n(){for(var o=arguments.length,i=new Array(o),r=0;r<o;r++)i[r]=arguments[r];return new Promise((s,l)=>{Promise.resolve(e(()=>t.apply(this,i),{fn:t,thisArg:this,args:i})).then(s).catch(l)})}return n}const Ec=e=>e();function Fv(e){e===void 0&&(e=Ec);const t=Ce(!0);function n(){t.value=!1}function o(){t.value=!0}return{isActive:Ii(t),pause:n,resume:o,eventFilter:function(){t.value&&e(...arguments)}}}function xc(e,t,n){return t===void 0&&(t=!1),n===void 0&&(n="Timeout"),new Promise((o,i)=>{setTimeout(t?()=>i(n):o,e)})}function Lv(e,t,n){n===void 0&&(n={});const o=n,i=o.eventFilter,r=i===void 0?Ec:i,s=Bo(o,Ov);return Ae(e,$v(r,t),s)}function so(e,t,n){n===void 0&&(n={});const o=n,i=o.eventFilter,r=Bo(o,Cv),s=Fv(i),l=s.eventFilter,a=s.pause,u=s.resume,c=s.isActive;return{stop:Lv(e,t,ie({},r,{eventFilter:l})),pause:a,resume:u,isActive:c}}function Hv(e,t){if(t===void 0&&(t={}),!Ve(e))return Uh(e);const n=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const o in e.value)n[o]=Yh(()=>({get(){return e.value[o]},set(i){var r;if((r=tn(t.replaceRef))!=null?r:!0)if(Array.isArray(e.value)){const l=[...e.value];l[o]=i,e.value=l}else{const l=ie({},e.value,{[o]:i});Object.setPrototypeOf(l,Object.getPrototypeOf(e.value)),e.value=l}else e.value[o]=i}}));return n}function Xs(e,t){t===void 0&&(t=!1);function n(d,f){let p=f===void 0?{}:f,x=p.flush,b=x===void 0?"sync":x,_=p.deep,A=_===void 0?!1:_,P=p.timeout,I=p.throwOnTimeout,m=null;const z=[new Promise(q=>{m=Ae(e,G=>{d(G)!==t&&(m?.(),q(G))},{flush:b,deep:A,immediate:!0})})];return P!=null&&z.push(xc(P,I).then(()=>tn(e)).finally(()=>m?.())),Promise.race(z)}function o(d,f){if(!Ve(d))return n(q=>q===d,f);const p=f??{},x=p.flush,b=x===void 0?"sync":x,_=p.deep,A=_===void 0?!1:_,P=p.timeout,I=p.throwOnTimeout;let m=null;const z=[new Promise(q=>{m=Ae([e,d],G=>{let K=G[0],Q=G[1];t!==(K===Q)&&(m?.(),q(K))},{flush:b,deep:A,immediate:!0})})];return P!=null&&z.push(xc(P,I).then(()=>tn(e)).finally(()=>(m?.(),tn(e)))),Promise.race(z)}function i(d){return n(f=>!!f,d)}function r(d){return o(null,d)}function s(d){return o(void 0,d)}function l(d){return n(Number.isNaN,d)}function a(d,f){return n(p=>{const x=Array.from(p);return x.includes(d)||x.includes(tn(d))},f)}function u(d){return c(1,d)}function c(d,f){d===void 0&&(d=1);let p=-1;return n(()=>(p+=1,p>=d),f)}return Array.isArray(tn(e))?{toMatch:n,toContains:a,changed:u,changedTimes:c,get not(){return Xs(e,!t)}}:{toMatch:n,toBe:o,toBeTruthy:i,toBeNull:r,toBeNaN:l,toBeUndefined:s,changed:u,changedTimes:c,get not(){return Xs(e,!t)}}}function qs(e){return Xs(e)}function Wv(e){var t;const n=tn(e);return(t=n?.$el)!=null?t:n}const Ac=Iv?window:void 0;function Oc(){let e,t,n,o;for(var i=arguments.length,r=new Array(i),s=0;s<i;s++)r[s]=arguments[s];if(typeof r[0]=="string"||Array.isArray(r[0])?(t=r[0],n=r[1],o=r[2],e=Ac):(e=r[0],t=r[1],n=r[2],o=r[3]),!e)return kv;Array.isArray(t)||(t=[t]),Array.isArray(n)||(n=[n]);const l=[],a=()=>{l.forEach(f=>f()),l.length=0},u=(f,p,x,b)=>(f.addEventListener(p,x,b),()=>f.removeEventListener(p,x,b)),c=Ae(()=>[Wv(e),tn(o)],f=>{let p=f[0],x=f[1];if(a(),!p)return;const b=Dv(x)?ie({},x):x;l.push(...t.flatMap(_=>n.map(A=>u(p,_,A,b))))},{immediate:!0,flush:"post"}),d=()=>{c(),a()};return Vo(d),d}function zv(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function Cc(){let e,t,n={};arguments.length===3?(e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],n=arguments.length<=2?void 0:arguments[2]):arguments.length===2?typeof(arguments.length<=1?void 0:arguments[1])=="object"?(e=!0,t=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1]):(e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1]):(e=!0,t=arguments.length<=0?void 0:arguments[0]);const o=n,i=o.target,r=i===void 0?Ac:i,s=o.eventName,l=s===void 0?"keydown":s,a=o.passive,u=a===void 0?!1:a,c=o.dedupe,d=c===void 0?!1:c,f=zv(e);return Oc(r,l,x=>{x.repeat&&tn(d)||f(x)&&t(x)},u)}function Bv(e){return JSON.parse(JSON.stringify(e))}function Zs(e,t,n,o){o===void 0&&(o={});var i,r,s;const l=o,a=l.clone,u=a===void 0?!1:a,c=l.passive,d=c===void 0?!1:c,f=l.eventName,p=l.deep,x=p===void 0?!1:p,b=l.defaultValue,_=l.shouldEmit,A=mn(),P=n||A?.emit||((i=A?.$emit)==null?void 0:i.bind(A))||((s=(r=A?.proxy)==null?void 0:r.$emit)==null?void 0:s.bind(A?.proxy));let I=f;t||(t="modelValue"),I=I||"update:"+t.toString();const m=q=>u?typeof u=="function"?u(q):Bv(q):q,F=()=>Pv(e[t])?m(e[t]):b,z=q=>{_?_(q)&&P(I,q):P(I,q)};if(d){const q=F(),G=Ce(q);let K=!1;return Ae(()=>e[t],Q=>{K||(K=!0,G.value=m(Q),$t(()=>K=!1))}),Ae(G,Q=>{!K&&(Q!==e[t]||x)&&z(Q)},{deep:x}),G}else return fe({get(){return F()},set(q){z(q)}})}var Vv={value:()=>{}};function Qi(){for(var e=0,t=arguments.length,n={},o;e<t;++e){if(!(o=arguments[e]+"")||o in n||/[\s.]/.test(o))throw new Error("illegal type: "+o);n[o]=[]}return new er(n)}function er(e){this._=e}function Gv(e,t){return e.trim().split(/^|\s+/).map(function(n){var o="",i=n.indexOf(".");if(i>=0&&(o=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}er.prototype=Qi.prototype={constructor:er,on:function(t,n){var o=this._,i=Gv(t+"",o),r,s=-1,l=i.length;if(arguments.length<2){for(;++s<l;)if((r=(t=i[s]).type)&&(r=Kv(o[r],t.name)))return r;return}if(n!=null&&typeof n!="function")throw new Error("invalid callback: "+n);for(;++s<l;)if(r=(t=i[s]).type)o[r]=Nc(o[r],t.name,n);else if(n==null)for(r in o)o[r]=Nc(o[r],t.name,null);return this},copy:function(){var t={},n=this._;for(var o in n)t[o]=n[o].slice();return new er(t)},call:function(t,n){if((r=arguments.length-2)>0)for(var o=new Array(r),i=0,r,s;i<r;++i)o[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(s=this._[t],i=0,r=s.length;i<r;++i)s[i].value.apply(n,o)},apply:function(t,n,o){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],r=0,s=i.length;r<s;++r)i[r].value.apply(n,o)}};function Kv(e,t){for(var n=0,o=e.length,i;n<o;++n)if((i=e[n]).name===t)return i.value}function Nc(e,t,n){for(var o=0,i=e.length;o<i;++o)if(e[o].name===t){e[o]=Vv,e=e.slice(0,o).concat(e.slice(o+1));break}return n!=null&&e.push({name:t,value:n}),e}var js="http://www.w3.org/1999/xhtml";const Tc={svg:"http://www.w3.org/2000/svg",xhtml:js,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function tr(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Tc.hasOwnProperty(t)?{space:Tc[t],local:e}:e}function Yv(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===js&&t.documentElement.namespaceURI===js?t.createElement(e):t.createElementNS(n,e)}}function Uv(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Mc(e){var t=tr(e);return(t.local?Uv:Yv)(t)}function Xv(){}function Js(e){return e==null?Xv:function(){return this.querySelector(e)}}function qv(e){typeof e!="function"&&(e=Js(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r=t[i],s=r.length,l=o[i]=new Array(s),a,u,c=0;c<s;++c)(a=r[c])&&(u=e.call(a,a.__data__,c,r))&&("__data__"in a&&(u.__data__=a.__data__),l[c]=u);return new gt(o,this._parents)}function Zv(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function jv(){return[]}function Ic(e){return e==null?jv:function(){return this.querySelectorAll(e)}}function Jv(e){return function(){return Zv(e.apply(this,arguments))}}function Qv(e){typeof e=="function"?e=Jv(e):e=Ic(e);for(var t=this._groups,n=t.length,o=[],i=[],r=0;r<n;++r)for(var s=t[r],l=s.length,a,u=0;u<l;++u)(a=s[u])&&(o.push(e.call(a,a.__data__,u,s)),i.push(a));return new gt(o,i)}function Pc(e){return function(){return this.matches(e)}}function Rc(e){return function(t){return t.matches(e)}}var em=Array.prototype.find;function tm(e){return function(){return em.call(this.children,e)}}function nm(){return this.firstElementChild}function om(e){return this.select(e==null?nm:tm(typeof e=="function"?e:Rc(e)))}var im=Array.prototype.filter;function rm(){return Array.from(this.children)}function sm(e){return function(){return im.call(this.children,e)}}function lm(e){return this.selectAll(e==null?rm:sm(typeof e=="function"?e:Rc(e)))}function am(e){typeof e!="function"&&(e=Pc(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r=t[i],s=r.length,l=o[i]=[],a,u=0;u<s;++u)(a=r[u])&&e.call(a,a.__data__,u,r)&&l.push(a);return new gt(o,this._parents)}function Dc(e){return new Array(e.length)}function um(){return new gt(this._enter||this._groups.map(Dc),this._parents)}function nr(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}nr.prototype={constructor:nr,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function cm(e){return function(){return e}}function dm(e,t,n,o,i,r){for(var s=0,l,a=t.length,u=r.length;s<u;++s)(l=t[s])?(l.__data__=r[s],o[s]=l):n[s]=new nr(e,r[s]);for(;s<a;++s)(l=t[s])&&(i[s]=l)}function fm(e,t,n,o,i,r,s){var l,a,u=new Map,c=t.length,d=r.length,f=new Array(c),p;for(l=0;l<c;++l)(a=t[l])&&(f[l]=p=s.call(a,a.__data__,l,t)+"",u.has(p)?i[l]=a:u.set(p,a));for(l=0;l<d;++l)p=s.call(e,r[l],l,r)+"",(a=u.get(p))?(o[l]=a,a.__data__=r[l],u.delete(p)):n[l]=new nr(e,r[l]);for(l=0;l<c;++l)(a=t[l])&&u.get(f[l])===a&&(i[l]=a)}function hm(e){return e.__data__}function gm(e,t){if(!arguments.length)return Array.from(this,hm);var n=t?fm:dm,o=this._parents,i=this._groups;typeof e!="function"&&(e=cm(e));for(var r=i.length,s=new Array(r),l=new Array(r),a=new Array(r),u=0;u<r;++u){var c=o[u],d=i[u],f=d.length,p=pm(e.call(c,c&&c.__data__,u,o)),x=p.length,b=l[u]=new Array(x),_=s[u]=new Array(x),A=a[u]=new Array(f);n(c,d,b,_,A,p,t);for(var P=0,I=0,m,F;P<x;++P)if(m=b[P]){for(P>=I&&(I=P+1);!(F=_[I])&&++I<x;);m._next=F||null}}return s=new gt(s,o),s._enter=l,s._exit=a,s}function pm(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function vm(){return new gt(this._exit||this._groups.map(Dc),this._parents)}function mm(e,t,n){var o=this.enter(),i=this,r=this.exit();return typeof e=="function"?(o=e(o),o&&(o=o.selection())):o=o.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?r.remove():n(r),o&&i?o.merge(i).order():i}function ym(e){for(var t=e.selection?e.selection():e,n=this._groups,o=t._groups,i=n.length,r=o.length,s=Math.min(i,r),l=new Array(i),a=0;a<s;++a)for(var u=n[a],c=o[a],d=u.length,f=l[a]=new Array(d),p,x=0;x<d;++x)(p=u[x]||c[x])&&(f[x]=p);for(;a<i;++a)l[a]=n[a];return new gt(l,this._parents)}function _m(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var o=e[t],i=o.length-1,r=o[i],s;--i>=0;)(s=o[i])&&(r&&s.compareDocumentPosition(r)^4&&r.parentNode.insertBefore(s,r),r=s);return this}function wm(e){e||(e=bm);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var n=this._groups,o=n.length,i=new Array(o),r=0;r<o;++r){for(var s=n[r],l=s.length,a=i[r]=new Array(l),u,c=0;c<l;++c)(u=s[c])&&(a[c]=u);a.sort(t)}return new gt(i,this._parents).order()}function bm(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Sm(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Em(){return Array.from(this)}function xm(){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 s=o[i];if(s)return s}return null}function Am(){let e=0;for(const t of this)++e;return e}function Om(){return!this.node()}function Cm(e){for(var t=this._groups,n=0,o=t.length;n<o;++n)for(var i=t[n],r=0,s=i.length,l;r<s;++r)(l=i[r])&&e.call(l,l.__data__,r,i);return this}function Nm(e){return function(){this.removeAttribute(e)}}function Tm(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Mm(e,t){return function(){this.setAttribute(e,t)}}function Im(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Pm(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Rm(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Dm(e,t){var n=tr(e);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((t==null?n.local?Tm:Nm:typeof t=="function"?n.local?Rm:Pm:n.local?Im:Mm)(n,t))}function kc(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function km(e){return function(){this.style.removeProperty(e)}}function $m(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Fm(e,t,n){return function(){var o=t.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function Lm(e,t,n){return arguments.length>1?this.each((t==null?km:typeof t=="function"?Fm:$m)(e,t,n??"")):lo(this.node(),e)}function lo(e,t){return e.style.getPropertyValue(t)||kc(e).getComputedStyle(e,null).getPropertyValue(t)}function Hm(e){return function(){delete this[e]}}function Wm(e,t){return function(){this[e]=t}}function zm(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Bm(e,t){return arguments.length>1?this.each((t==null?Hm:typeof t=="function"?zm:Wm)(e,t)):this.node()[e]}function $c(e){return e.trim().split(/^|\s+/)}function Qs(e){return e.classList||new Fc(e)}function Fc(e){this._node=e,this._names=$c(e.getAttribute("class")||"")}Fc.prototype={add:function(t){var n=this._names.indexOf(t);n<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Lc(e,t){for(var n=Qs(e),o=-1,i=t.length;++o<i;)n.add(t[o])}function Hc(e,t){for(var n=Qs(e),o=-1,i=t.length;++o<i;)n.remove(t[o])}function Vm(e){return function(){Lc(this,e)}}function Gm(e){return function(){Hc(this,e)}}function Km(e,t){return function(){(t.apply(this,arguments)?Lc:Hc)(this,e)}}function Ym(e,t){var n=$c(e+"");if(arguments.length<2){for(var o=Qs(this.node()),i=-1,r=n.length;++i<r;)if(!o.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?Km:t?Vm:Gm)(n,t))}function Um(){this.textContent=""}function Xm(e){return function(){this.textContent=e}}function qm(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Zm(e){return arguments.length?this.each(e==null?Um:(typeof e=="function"?qm:Xm)(e)):this.node().textContent}function jm(){this.innerHTML=""}function Jm(e){return function(){this.innerHTML=e}}function Qm(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function e0(e){return arguments.length?this.each(e==null?jm:(typeof e=="function"?Qm:Jm)(e)):this.node().innerHTML}function t0(){this.nextSibling&&this.parentNode.appendChild(this)}function n0(){return this.each(t0)}function o0(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function i0(){return this.each(o0)}function r0(e){var t=typeof e=="function"?e:Mc(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function s0(){return null}function l0(e,t){var n=typeof e=="function"?e:Mc(e),o=t==null?s0:typeof t=="function"?t:Js(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function a0(){var e=this.parentNode;e&&e.removeChild(this)}function u0(){return this.each(a0)}function c0(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function d0(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function f0(e){return this.select(e?d0:c0)}function h0(e){return arguments.length?this.property("__data__",e):this.node().__data__}function g0(e){return function(t){e.call(this,t,this.__data__)}}function p0(e){return e.trim().split(/^|\s+/).map(function(t){var n="",o=t.indexOf(".");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{type:t,name:n}})}function v0(e){return function(){var t=this.__on;if(t){for(var n=0,o=-1,i=t.length,r;n<i;++n)r=t[n],(!e.type||r.type===e.type)&&r.name===e.name?this.removeEventListener(r.type,r.listener,r.options):t[++o]=r;++o?t.length=o:delete this.__on}}}function m0(e,t,n){return function(){var o=this.__on,i,r=g0(t);if(o){for(var s=0,l=o.length;s<l;++s)if((i=o[s]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=r,i.options=n),i.value=t;return}}this.addEventListener(e.type,r,n),i={type:e.type,name:e.name,value:t,listener:r,options:n},o?o.push(i):this.__on=[i]}}function y0(e,t,n){var o=p0(e+""),i,r=o.length,s;if(arguments.length<2){var l=this.node().__on;if(l){for(var a=0,u=l.length,c;a<u;++a)for(i=0,c=l[a];i<r;++i)if((s=o[i]).type===c.type&&s.name===c.name)return c.value}return}for(l=t?m0:v0,i=0;i<r;++i)this.each(l(o[i],t,n));return this}function Wc(e,t,n){var o=kc(e),i=o.CustomEvent;typeof i=="function"?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 _0(e,t){return function(){return Wc(this,e,t)}}function w0(e,t){return function(){return Wc(this,e,t.apply(this,arguments))}}function b0(e,t){return this.each((typeof t=="function"?w0:_0)(e,t))}function*S0(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],i=0,r=o.length,s;i<r;++i)(s=o[i])&&(yield s)}var zc=[null];function gt(e,t){this._groups=e,this._parents=t}function Go(){return new gt([[document.documentElement]],zc)}function E0(){return this}gt.prototype=Go.prototype={constructor:gt,select:qv,selectAll:Qv,selectChild:om,selectChildren:lm,filter:am,data:gm,enter:um,exit:vm,join:mm,merge:ym,selection:E0,order:_m,sort:wm,call:Sm,nodes:Em,node:xm,size:Am,empty:Om,each:Cm,attr:Dm,style:Lm,property:Bm,classed:Ym,text:Zm,html:e0,raise:n0,lower:i0,append:r0,insert:l0,remove:u0,clone:f0,datum:h0,on:y0,dispatch:b0,[Symbol.iterator]:S0};function xt(e){return typeof e=="string"?new gt([[document.querySelector(e)]],[document.documentElement]):new gt([[e]],zc)}function x0(e){let t;for(;t=e.sourceEvent;)e=t;return e}function zt(e,t){if(e=x0(e),t===void 0&&(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()),[o.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]}const A0={passive:!1},Ko={capture:!0,passive:!1};function el(e){e.stopImmediatePropagation()}function ao(e){e.preventDefault(),e.stopImmediatePropagation()}function Bc(e){var t=e.document.documentElement,n=xt(e).on("dragstart.drag",ao,Ko);"onselectstart"in t?n.on("selectstart.drag",ao,Ko):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Vc(e,t){var n=e.document.documentElement,o=xt(e).on("dragstart.drag",null);t&&(o.on("click.drag",ao,Ko),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 or=e=>()=>e;function tl(e,t){let n=t.sourceEvent,o=t.subject,i=t.target,r=t.identifier,s=t.active,l=t.x,a=t.y,u=t.dx,c=t.dy,d=t.dispatch;Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:o,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},identifier:{value:r,enumerable:!0,configurable:!0},active:{value:s,enumerable:!0,configurable:!0},x:{value:l,enumerable:!0,configurable:!0},y:{value:a,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:d}})}tl.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function O0(e){return!e.ctrlKey&&!e.button}function C0(){return this.parentNode}function N0(e,t){return t??{x:e.x,y:e.y}}function T0(){return navigator.maxTouchPoints||"ontouchstart"in this}function M0(){var e=O0,t=C0,n=N0,o=T0,i={},r=Qi("start","drag","end"),s=0,l,a,u,c,d=0;function f(m){m.on("mousedown.drag",p).filter(o).on("touchstart.drag",_).on("touchmove.drag",A,A0).on("touchend.drag touchcancel.drag",P).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(m,F){if(!(c||!e.call(this,m,F))){var z=I(this,t.call(this,m,F),m,F,"mouse");z&&(xt(m.view).on("mousemove.drag",x,Ko).on("mouseup.drag",b,Ko),Bc(m.view),el(m),u=!1,l=m.clientX,a=m.clientY,z("start",m))}}function x(m){if(ao(m),!u){var F=m.clientX-l,z=m.clientY-a;u=F*F+z*z>d}i.mouse("drag",m)}function b(m){xt(m.view).on("mousemove.drag mouseup.drag",null),Vc(m.view,u),ao(m),i.mouse("end",m)}function _(m,F){if(e.call(this,m,F)){var z=m.changedTouches,q=t.call(this,m,F),G=z.length,K,Q;for(K=0;K<G;++K)(Q=I(this,q,m,F,z[K].identifier,z[K]))&&(el(m),Q("start",m,z[K]))}}function A(m){var F=m.changedTouches,z=F.length,q,G;for(q=0;q<z;++q)(G=i[F[q].identifier])&&(ao(m),G("drag",m,F[q]))}function P(m){var F=m.changedTouches,z=F.length,q,G;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),q=0;q<z;++q)(G=i[F[q].identifier])&&(el(m),G("end",m,F[q]))}function I(m,F,z,q,G,K){var Q=r.copy(),re=zt(K||z,F),ee,oe,g;if((g=n.call(m,new tl("beforestart",{sourceEvent:z,target:f,identifier:G,active:s,x:re[0],y:re[1],dx:0,dy:0,dispatch:Q}),q))!=null)return ee=g.x-re[0]||0,oe=g.y-re[1]||0,function O(R,$,N){var L=re,H;switch(R){case"start":i[G]=O,H=s++;break;case"end":delete i[G],--s;case"drag":re=zt(N||$,F),H=s;break}Q.call(R,m,new tl(R,{sourceEvent:$,subject:g,target:f,identifier:G,active:H,x:re[0]+ee,y:re[1]+oe,dx:re[0]-L[0],dy:re[1]-L[1],dispatch:Q}),q)}}return f.filter=function(m){return arguments.length?(e=typeof m=="function"?m:or(!!m),f):e},f.container=function(m){return arguments.length?(t=typeof m=="function"?m:or(m),f):t},f.subject=function(m){return arguments.length?(n=typeof m=="function"?m:or(m),f):n},f.touchable=function(m){return arguments.length?(o=typeof m=="function"?m:or(!!m),f):o},f.on=function(){var m=r.on.apply(r,arguments);return m===r?f:m},f.clickDistance=function(m){return arguments.length?(d=(m=+m)*m,f):Math.sqrt(d)},f}function nl(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Gc(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function Yo(){}var Uo=.7,ir=1/Uo,uo="\\s*([+-]?\\d+)\\s*",Xo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Bt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",I0=/^#([0-9a-f]{3,8})$/,P0=new RegExp("^rgb\\("+uo+","+uo+","+uo+"\\)$"),R0=new RegExp("^rgb\\("+Bt+","+Bt+","+Bt+"\\)$"),D0=new RegExp("^rgba\\("+uo+","+uo+","+uo+","+Xo+"\\)$"),k0=new RegExp("^rgba\\("+Bt+","+Bt+","+Bt+","+Xo+"\\)$"),$0=new RegExp("^hsl\\("+Xo+","+Bt+","+Bt+"\\)$"),F0=new RegExp("^hsla\\("+Xo+","+Bt+","+Bt+","+Xo+"\\)$"),Kc={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};nl(Yo,Rn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Yc,formatHex:Yc,formatHex8:L0,formatHsl:H0,formatRgb:Uc,toString:Uc});function Yc(){return this.rgb().formatHex()}function L0(){return this.rgb().formatHex8()}function H0(){return Jc(this).formatHsl()}function Uc(){return this.rgb().formatRgb()}function Rn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=I0.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Xc(t):n===3?new ut(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?rr(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?rr(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=P0.exec(e))?new ut(t[1],t[2],t[3],1):(t=R0.exec(e))?new ut(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=D0.exec(e))?rr(t[1],t[2],t[3],t[4]):(t=k0.exec(e))?rr(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=$0.exec(e))?jc(t[1],t[2]/100,t[3]/100,1):(t=F0.exec(e))?jc(t[1],t[2]/100,t[3]/100,t[4]):Kc.hasOwnProperty(e)?Xc(Kc[e]):e==="transparent"?new ut(NaN,NaN,NaN,0):null}function Xc(e){return new ut(e>>16&255,e>>8&255,e&255,1)}function rr(e,t,n,o){return o<=0&&(e=t=n=NaN),new ut(e,t,n,o)}function W0(e){return e instanceof Yo||(e=Rn(e)),e?(e=e.rgb(),new ut(e.r,e.g,e.b,e.opacity)):new ut}function ol(e,t,n,o){return arguments.length===1?W0(e):new ut(e,t,n,o??1)}function ut(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}nl(ut,ol,Gc(Yo,{brighter(e){return e=e==null?ir:Math.pow(ir,e),new ut(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Uo:Math.pow(Uo,e),new ut(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ut(Dn(this.r),Dn(this.g),Dn(this.b),sr(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:qc,formatHex:qc,formatHex8:z0,formatRgb:Zc,toString:Zc}));function qc(){return"#"+kn(this.r)+kn(this.g)+kn(this.b)}function z0(){return"#"+kn(this.r)+kn(this.g)+kn(this.b)+kn((isNaN(this.opacity)?1:this.opacity)*255)}function Zc(){const e=sr(this.opacity);return(e===1?"rgb(":"rgba(")+Dn(this.r)+", "+Dn(this.g)+", "+Dn(this.b)+(e===1?")":", "+e+")")}function sr(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Dn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function kn(e){return e=Dn(e),(e<16?"0":"")+e.toString(16)}function jc(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new At(e,t,n,o)}function Jc(e){if(e instanceof At)return new At(e.h,e.s,e.l,e.opacity);if(e instanceof Yo||(e=Rn(e)),!e)return new At;if(e instanceof At)return e;e=e.rgb();var t=e.r/255,n=e.g/255,o=e.b/255,i=Math.min(t,n,o),r=Math.max(t,n,o),s=NaN,l=r-i,a=(r+i)/2;return l?(t===r?s=(n-o)/l+(n<o)*6:n===r?s=(o-t)/l+2:s=(t-n)/l+4,l/=a<.5?r+i:2-r-i,s*=60):l=a>0&&a<1?0:s,new At(s,l,a,e.opacity)}function B0(e,t,n,o){return arguments.length===1?Jc(e):new At(e,t,n,o??1)}function At(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}nl(At,B0,Gc(Yo,{brighter(e){return e=e==null?ir:Math.pow(ir,e),new At(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Uo:Math.pow(Uo,e),new At(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,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 ut(il(e>=240?e-240:e+120,i,o),il(e,i,o),il(e<120?e+240:e-120,i,o),this.opacity)},clamp(){return new At(Qc(this.h),lr(this.s),lr(this.l),sr(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=sr(this.opacity);return(e===1?"hsl(":"hsla(")+Qc(this.h)+", "+lr(this.s)*100+"%, "+lr(this.l)*100+"%"+(e===1?")":", "+e+")")}}));function Qc(e){return e=(e||0)%360,e<0?e+360:e}function lr(e){return Math.max(0,Math.min(1,e||0))}function il(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const rl=e=>()=>e;function V0(e,t){return function(n){return e+n*t}}function G0(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)}}function K0(e){return(e=+e)==1?ed:function(t,n){return n-t?G0(t,n,e):rl(isNaN(t)?n:t)}}function ed(e,t){var n=t-e;return n?V0(e,n):rl(isNaN(e)?t:e)}const ar=(function e(t){var n=K0(t);function o(i,r){var s=n((i=ol(i)).r,(r=ol(r)).r),l=n(i.g,r.g),a=n(i.b,r.b),u=ed(i.opacity,r.opacity);return function(c){return i.r=s(c),i.g=l(c),i.b=a(c),i.opacity=u(c),i+""}}return o.gamma=e,o})(1);function Y0(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,o=t.slice(),i;return function(r){for(i=0;i<n;++i)o[i]=e[i]*(1-r)+t[i]*r;return o}}function U0(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function X0(e,t){var n=t?t.length:0,o=e?Math.min(n,e.length):0,i=new Array(o),r=new Array(n),s;for(s=0;s<o;++s)i[s]=qo(e[s],t[s]);for(;s<n;++s)r[s]=t[s];return function(l){for(s=0;s<o;++s)r[s]=i[s](l);return r}}function q0(e,t){var n=new Date;return e=+e,t=+t,function(o){return n.setTime(e*(1-o)+t*o),n}}function Vt(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Z0(e,t){var n={},o={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=qo(e[i],t[i]):o[i]=t[i];return function(r){for(i in n)o[i]=n[i](r);return o}}var sl=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ll=new RegExp(sl.source,"g");function j0(e){return function(){return e}}function J0(e){return function(t){return e(t)+""}}function td(e,t){var n=sl.lastIndex=ll.lastIndex=0,o,i,r,s=-1,l=[],a=[];for(e=e+"",t=t+"";(o=sl.exec(e))&&(i=ll.exec(t));)(r=i.index)>n&&(r=t.slice(n,r),l[s]?l[s]+=r:l[++s]=r),(o=o[0])===(i=i[0])?l[s]?l[s]+=i:l[++s]=i:(l[++s]=null,a.push({i:s,x:Vt(o,i)})),n=ll.lastIndex;return n<t.length&&(r=t.slice(n),l[s]?l[s]+=r:l[++s]=r),l.length<2?a[0]?J0(a[0].x):j0(t):(t=a.length,function(u){for(var c=0,d;c<t;++c)l[(d=a[c]).i]=d.x(u);return l.join("")})}function qo(e,t){var n=typeof t,o;return t==null||n==="boolean"?rl(t):(n==="number"?Vt:n==="string"?(o=Rn(t))?(t=o,ar):td:t instanceof Rn?ar:t instanceof Date?q0:U0(t)?Y0:Array.isArray(t)?X0:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Z0:Vt)(e,t)}var nd=180/Math.PI,al={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function od(e,t,n,o,i,r){var s,l,a;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(a=e*n+t*o)&&(n-=e*a,o-=t*a),(l=Math.sqrt(n*n+o*o))&&(n/=l,o/=l,a/=l),e*o<t*n&&(e=-e,t=-t,a=-a,s=-s),{translateX:i,translateY:r,rotate:Math.atan2(t,e)*nd,skewX:Math.atan(a)*nd,scaleX:s,scaleY:l}}var ur;function Q0(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?al:od(t.a,t.b,t.c,t.d,t.e,t.f)}function ey(e){return e==null||(ur||(ur=document.createElementNS("http://www.w3.org/2000/svg","g")),ur.setAttribute("transform",e),!(e=ur.transform.baseVal.consolidate()))?al:(e=e.matrix,od(e.a,e.b,e.c,e.d,e.e,e.f))}function id(e,t,n,o){function i(u){return u.length?u.pop()+" ":""}function r(u,c,d,f,p,x){if(u!==d||c!==f){var b=p.push("translate(",null,t,null,n);x.push({i:b-4,x:Vt(u,d)},{i:b-2,x:Vt(c,f)})}else(d||f)&&p.push("translate("+d+t+f+n)}function s(u,c,d,f){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),f.push({i:d.push(i(d)+"rotate(",null,o)-2,x:Vt(u,c)})):c&&d.push(i(d)+"rotate("+c+o)}function l(u,c,d,f){u!==c?f.push({i:d.push(i(d)+"skewX(",null,o)-2,x:Vt(u,c)}):c&&d.push(i(d)+"skewX("+c+o)}function a(u,c,d,f,p,x){if(u!==d||c!==f){var b=p.push(i(p)+"scale(",null,",",null,")");x.push({i:b-4,x:Vt(u,d)},{i:b-2,x:Vt(c,f)})}else(d!==1||f!==1)&&p.push(i(p)+"scale("+d+","+f+")")}return function(u,c){var d=[],f=[];return u=e(u),c=e(c),r(u.translateX,u.translateY,c.translateX,c.translateY,d,f),s(u.rotate,c.rotate,d,f),l(u.skewX,c.skewX,d,f),a(u.scaleX,u.scaleY,c.scaleX,c.scaleY,d,f),u=c=null,function(p){for(var x=-1,b=f.length,_;++x<b;)d[(_=f[x]).i]=_.x(p);return d.join("")}}}var ty=id(Q0,"px, ","px)","deg)"),ny=id(ey,", ",")",")"),oy=1e-12;function rd(e){return((e=Math.exp(e))+1/e)/2}function iy(e){return((e=Math.exp(e))-1/e)/2}function ry(e){return((e=Math.exp(2*e))-1)/(e+1)}const cr=(function e(t,n,o){function i(r,s){var l=r[0],a=r[1],u=r[2],c=s[0],d=s[1],f=s[2],p=c-l,x=d-a,b=p*p+x*x,_,A;if(b<oy)A=Math.log(f/u)/t,_=function(G){return[l+G*p,a+G*x,u*Math.exp(t*G*A)]};else{var P=Math.sqrt(b),I=(f*f-u*u+o*b)/(2*u*n*P),m=(f*f-u*u-o*b)/(2*f*n*P),F=Math.log(Math.sqrt(I*I+1)-I),z=Math.log(Math.sqrt(m*m+1)-m);A=(z-F)/t,_=function(G){var K=G*A,Q=rd(F),re=u/(n*P)*(Q*ry(t*K+F)-iy(F));return[l+re*p,a+re*x,u*Q/rd(t*K+F)]}}return _.duration=A*1e3*t/Math.SQRT2,_}return i.rho=function(r){var s=Math.max(.001,+r),l=s*s,a=l*l;return e(s,l,a)},i})(Math.SQRT2,2,4);var co=0,Zo=0,jo=0,sd=1e3,dr,Jo,fr=0,$n=0,hr=0,Qo=typeof performance=="object"&&performance.now?performance:Date,ld=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function ul(){return $n||(ld(sy),$n=Qo.now()+hr)}function sy(){$n=0}function gr(){this._call=this._time=this._next=null}gr.prototype=ad.prototype={constructor:gr,restart:function(t,n,o){if(typeof t!="function")throw new TypeError("callback is not a function");o=(o==null?ul():+o)+(n==null?0:+n),!this._next&&Jo!==this&&(Jo?Jo._next=this:dr=this,Jo=this),this._call=t,this._time=o,cl()},stop:function(){this._call&&(this._call=null,this._time=1/0,cl())}};function ad(e,t,n){var o=new gr;return o.restart(e,t,n),o}function ly(){ul(),++co;for(var e=dr,t;e;)(t=$n-e._time)>=0&&e._call.call(void 0,t),e=e._next;--co}function ud(){$n=(fr=Qo.now())+hr,co=Zo=0;try{ly()}finally{co=0,uy(),$n=0}}function ay(){var e=Qo.now(),t=e-fr;t>sd&&(hr-=t,fr=e)}function uy(){for(var e,t=dr,n,o=1/0;t;)t._call?(o>t._time&&(o=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:dr=n);Jo=e,cl(o)}function cl(e){if(!co){Zo&&(Zo=clearTimeout(Zo));var t=e-$n;t>24?(e<1/0&&(Zo=setTimeout(ud,e-Qo.now()-hr)),jo&&(jo=clearInterval(jo))):(jo||(fr=Qo.now(),jo=setInterval(ay,sd)),co=1,ld(ud))}}function cd(e,t,n){var o=new gr;return t=t==null?0:+t,o.restart(i=>{o.stop(),e(i+t)},t,n),o}var cy=Qi("start","end","cancel","interrupt"),dy=[],dd=0,fd=1,dl=2,pr=3,hd=4,fl=5,vr=6;function mr(e,t,n,o,i,r){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;fy(e,n,{name:t,index:o,group:i,on:cy,tween:dy,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:dd})}function hl(e,t){var n=Ot(e,t);if(n.state>dd)throw new Error("too late; already scheduled");return n}function Gt(e,t){var n=Ot(e,t);if(n.state>pr)throw new Error("too late; already running");return n}function Ot(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function fy(e,t,n){var o=e.__transition,i;o[t]=n,n.timer=ad(r,0,n.time);function r(u){n.state=fd,n.timer.restart(s,n.delay,n.time),n.delay<=u&&s(u-n.delay)}function s(u){var c,d,f,p;if(n.state!==fd)return a();for(c in o)if(p=o[c],p.name===n.name){if(p.state===pr)return cd(s);p.state===hd?(p.state=vr,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete o[c]):+c<t&&(p.state=vr,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete o[c])}if(cd(function(){n.state===pr&&(n.state=hd,n.timer.restart(l,n.delay,n.time),l(u))}),n.state=dl,n.on.call("start",e,e.__data__,n.index,n.group),n.state===dl){for(n.state=pr,i=new Array(f=n.tween.length),c=0,d=-1;c<f;++c)(p=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(i[++d]=p);i.length=d+1}}function l(u){for(var c=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(a),n.state=fl,1),d=-1,f=i.length;++d<f;)i[d].call(e,c);n.state===fl&&(n.on.call("end",e,e.__data__,n.index,n.group),a())}function a(){n.state=vr,n.timer.stop(),delete o[t];for(var u in o)return;delete e.__transition}}function yr(e,t){var n=e.__transition,o,i,r=!0,s;if(n){t=t==null?null:t+"";for(s in n){if((o=n[s]).name!==t){r=!1;continue}i=o.state>dl&&o.state<fl,o.state=vr,o.timer.stop(),o.on.call(i?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete n[s]}r&&delete e.__transition}}function hy(e){return this.each(function(){yr(this,e)})}function gy(e,t){var n,o;return function(){var i=Gt(this,e),r=i.tween;if(r!==n){o=n=r;for(var s=0,l=o.length;s<l;++s)if(o[s].name===t){o=o.slice(),o.splice(s,1);break}}i.tween=o}}function py(e,t,n){var o,i;if(typeof n!="function")throw new Error;return function(){var r=Gt(this,e),s=r.tween;if(s!==o){i=(o=s).slice();for(var l={name:t,value:n},a=0,u=i.length;a<u;++a)if(i[a].name===t){i[a]=l;break}a===u&&i.push(l)}r.tween=i}}function vy(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o=Ot(this.node(),n).tween,i=0,r=o.length,s;i<r;++i)if((s=o[i]).name===e)return s.value;return null}return this.each((t==null?gy:py)(n,e,t))}function gl(e,t,n){var o=e._id;return e.each(function(){var i=Gt(this,o);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Ot(i,o).value[t]}}function gd(e,t){var n;return(typeof t=="number"?Vt:t instanceof Rn?ar:(n=Rn(t))?(t=n,ar):td)(e,t)}function my(e){return function(){this.removeAttribute(e)}}function yy(e){return function(){this.removeAttributeNS(e.space,e.local)}}function _y(e,t,n){var o,i=n+"",r;return function(){var s=this.getAttribute(e);return s===i?null:s===o?r:r=t(o=s,n)}}function wy(e,t,n){var o,i=n+"",r;return function(){var s=this.getAttributeNS(e.space,e.local);return s===i?null:s===o?r:r=t(o=s,n)}}function by(e,t,n){var o,i,r;return function(){var s,l=n(this),a;return l==null?void this.removeAttribute(e):(s=this.getAttribute(e),a=l+"",s===a?null:s===o&&a===i?r:(i=a,r=t(o=s,l)))}}function Sy(e,t,n){var o,i,r;return function(){var s,l=n(this),a;return l==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),a=l+"",s===a?null:s===o&&a===i?r:(i=a,r=t(o=s,l)))}}function Ey(e,t){var n=tr(e),o=n==="transform"?ny:gd;return this.attrTween(e,typeof t=="function"?(n.local?Sy:by)(n,o,gl(this,"attr."+e,t)):t==null?(n.local?yy:my)(n):(n.local?wy:_y)(n,o,t))}function xy(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Ay(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Oy(e,t){var n,o;function i(){var r=t.apply(this,arguments);return r!==o&&(n=(o=r)&&Ay(e,r)),n}return i._value=t,i}function Cy(e,t){var n,o;function i(){var r=t.apply(this,arguments);return r!==o&&(n=(o=r)&&xy(e,r)),n}return i._value=t,i}function Ny(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var o=tr(e);return this.tween(n,(o.local?Oy:Cy)(o,t))}function Ty(e,t){return function(){hl(this,e).delay=+t.apply(this,arguments)}}function My(e,t){return t=+t,function(){hl(this,e).delay=t}}function Iy(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Ty:My)(t,e)):Ot(this.node(),t).delay}function Py(e,t){return function(){Gt(this,e).duration=+t.apply(this,arguments)}}function Ry(e,t){return t=+t,function(){Gt(this,e).duration=t}}function Dy(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Py:Ry)(t,e)):Ot(this.node(),t).duration}function ky(e,t){if(typeof t!="function")throw new Error;return function(){Gt(this,e).ease=t}}function $y(e){var t=this._id;return arguments.length?this.each(ky(t,e)):Ot(this.node(),t).ease}function Fy(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Gt(this,e).ease=n}}function Ly(e){if(typeof e!="function")throw new Error;return this.each(Fy(this._id,e))}function Hy(e){typeof e!="function"&&(e=Pc(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r=t[i],s=r.length,l=o[i]=[],a,u=0;u<s;++u)(a=r[u])&&e.call(a,a.__data__,u,r)&&l.push(a);return new nn(o,this._parents,this._name,this._id)}function Wy(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),s=new Array(o),l=0;l<r;++l)for(var a=t[l],u=n[l],c=a.length,d=s[l]=new Array(c),f,p=0;p<c;++p)(f=a[p]||u[p])&&(d[p]=f);for(;l<o;++l)s[l]=t[l];return new nn(s,this._parents,this._name,this._id)}function zy(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function By(e,t,n){var o,i,r=zy(t)?hl:Gt;return function(){var s=r(this,e),l=s.on;l!==o&&(i=(o=l).copy()).on(t,n),s.on=i}}function Vy(e,t){var n=this._id;return arguments.length<2?Ot(this.node(),n).on.on(e):this.each(By(n,e,t))}function Gy(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Ky(){return this.on("end.remove",Gy(this._id))}function Yy(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Js(e));for(var o=this._groups,i=o.length,r=new Array(i),s=0;s<i;++s)for(var l=o[s],a=l.length,u=r[s]=new Array(a),c,d,f=0;f<a;++f)(c=l[f])&&(d=e.call(c,c.__data__,f,l))&&("__data__"in c&&(d.__data__=c.__data__),u[f]=d,mr(u[f],t,n,f,u,Ot(c,n)));return new nn(r,this._parents,t,n)}function Uy(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Ic(e));for(var o=this._groups,i=o.length,r=[],s=[],l=0;l<i;++l)for(var a=o[l],u=a.length,c,d=0;d<u;++d)if(c=a[d]){for(var f=e.call(c,c.__data__,d,a),p,x=Ot(c,n),b=0,_=f.length;b<_;++b)(p=f[b])&&mr(p,t,n,b,f,x);r.push(f),s.push(c)}return new nn(r,s,t,n)}var Xy=Go.prototype.constructor;function qy(){return new Xy(this._groups,this._parents)}function Zy(e,t){var n,o,i;return function(){var r=lo(this,e),s=(this.style.removeProperty(e),lo(this,e));return r===s?null:r===n&&s===o?i:i=t(n=r,o=s)}}function pd(e){return function(){this.style.removeProperty(e)}}function jy(e,t,n){var o,i=n+"",r;return function(){var s=lo(this,e);return s===i?null:s===o?r:r=t(o=s,n)}}function Jy(e,t,n){var o,i,r;return function(){var s=lo(this,e),l=n(this),a=l+"";return l==null&&(a=l=(this.style.removeProperty(e),lo(this,e))),s===a?null:s===o&&a===i?r:(i=a,r=t(o=s,l))}}function Qy(e,t){var n,o,i,r="style."+t,s="end."+r,l;return function(){var a=Gt(this,e),u=a.on,c=a.value[r]==null?l||(l=pd(t)):void 0;(u!==n||i!==c)&&(o=(n=u).copy()).on(s,i=c),a.on=o}}function e_(e,t,n){var o=(e+="")=="transform"?ty:gd;return t==null?this.styleTween(e,Zy(e,o)).on("end.style."+e,pd(e)):typeof t=="function"?this.styleTween(e,Jy(e,o,gl(this,"style."+e,t))).each(Qy(this._id,e)):this.styleTween(e,jy(e,o,t),n).on("end.style."+e,null)}function t_(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function n_(e,t,n){var o,i;function r(){var s=t.apply(this,arguments);return s!==i&&(o=(i=s)&&t_(e,s,n)),o}return r._value=t,r}function o_(e,t,n){var o="style."+(e+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(t==null)return this.tween(o,null);if(typeof t!="function")throw new Error;return this.tween(o,n_(e,t,n??""))}function i_(e){return function(){this.textContent=e}}function r_(e){return function(){var t=e(this);this.textContent=t??""}}function s_(e){return this.tween("text",typeof e=="function"?r_(gl(this,"text",e)):i_(e==null?"":e+""))}function l_(e){return function(t){this.textContent=e.call(this,t)}}function a_(e){var t,n;function o(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&l_(i)),t}return o._value=e,o}function u_(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,a_(e))}function c_(){for(var e=this._name,t=this._id,n=vd(),o=this._groups,i=o.length,r=0;r<i;++r)for(var s=o[r],l=s.length,a,u=0;u<l;++u)if(a=s[u]){var c=Ot(a,t);mr(a,e,n,u,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new nn(o,this._parents,e,n)}function d_(){var e,t,n=this,o=n._id,i=n.size();return new Promise(function(r,s){var l={value:s},a={value:function(){--i===0&&r()}};n.each(function(){var u=Gt(this,o),c=u.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(a)),u.on=t}),i===0&&r()})}var f_=0;function nn(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function vd(){return++f_}var on=Go.prototype;nn.prototype={constructor:nn,select:Yy,selectAll:Uy,selectChild:on.selectChild,selectChildren:on.selectChildren,filter:Hy,merge:Wy,selection:qy,transition:c_,call:on.call,nodes:on.nodes,node:on.node,size:on.size,empty:on.empty,each:on.each,on:Vy,attr:Ey,attrTween:Ny,style:e_,styleTween:o_,text:s_,textTween:u_,remove:Ky,tween:vy,delay:Iy,duration:Dy,ease:$y,easeVarying:Ly,end:d_,[Symbol.iterator]:on[Symbol.iterator]};function h_(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var g_={time:null,delay:0,duration:250,ease:h_};function p_(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error("transition "+t+" not found");return n}function v_(e){var t,n;e instanceof nn?(t=e._id,e=e._name):(t=vd(),(n=g_).time=ul(),e=e==null?null:e+"");for(var o=this._groups,i=o.length,r=0;r<i;++r)for(var s=o[r],l=s.length,a,u=0;u<l;++u)(a=s[u])&&mr(a,e,t,u,s,n||p_(a,t));return new nn(o,this._parents,e,t)}Go.prototype.interrupt=hy,Go.prototype.transition=v_;const _r=e=>()=>e;function m_(e,t){let n=t.sourceEvent,o=t.target,i=t.transform,r=t.dispatch;Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:r}})}function rn(e,t,n){this.k=e,this.x=t,this.y=n}rn.prototype={constructor:rn,scale:function(t){return t===1?this:new rn(this.k*t,this.x,this.y)},translate:function(t,n){return t===0&n===0?this:new rn(this.k,this.x+this.k*t,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var fo=new rn(1,0,0);rn.prototype;function pl(e){e.stopImmediatePropagation()}function ei(e){e.preventDefault(),e.stopImmediatePropagation()}function y_(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function __(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.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 md(){return this.__zoom||fo}function w_(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function b_(){return navigator.maxTouchPoints||"ontouchstart"in this}function S_(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],s=e.invertY(t[1][1])-n[1][1];return e.translate(i>o?(o+i)/2:Math.min(0,o)||Math.max(0,i),s>r?(r+s)/2:Math.min(0,r)||Math.max(0,s))}function E_(){var e=y_,t=__,n=S_,o=w_,i=b_,r=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,a=cr,u=Qi("start","zoom","end"),c,d,f,p=500,x=150,b=0,_=10;function A(g){g.property("__zoom",md).on("wheel.zoom",G,{passive:!1}).on("mousedown.zoom",K).on("dblclick.zoom",Q).filter(i).on("touchstart.zoom",re).on("touchmove.zoom",ee).on("touchend.zoom touchcancel.zoom",oe).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}A.transform=function(g,O,R,$){var N=g.selection?g.selection():g;N.property("__zoom",md),g!==N?F(g,O,R,$):N.interrupt().each(function(){z(this,arguments).event($).start().zoom(null,typeof O=="function"?O.apply(this,arguments):O).end()})},A.scaleBy=function(g,O,R,$){A.scaleTo(g,function(){var N=this.__zoom.k,L=typeof O=="function"?O.apply(this,arguments):O;return N*L},R,$)},A.scaleTo=function(g,O,R,$){A.transform(g,function(){var N=t.apply(this,arguments),L=this.__zoom,H=R==null?m(N):typeof R=="function"?R.apply(this,arguments):R,W=L.invert(H),D=typeof O=="function"?O.apply(this,arguments):O;return n(I(P(L,D),H,W),N,s)},R,$)},A.translateBy=function(g,O,R,$){A.transform(g,function(){return n(this.__zoom.translate(typeof O=="function"?O.apply(this,arguments):O,typeof R=="function"?R.apply(this,arguments):R),t.apply(this,arguments),s)},null,$)},A.translateTo=function(g,O,R,$,N){A.transform(g,function(){var L=t.apply(this,arguments),H=this.__zoom,W=$==null?m(L):typeof $=="function"?$.apply(this,arguments):$;return n(fo.translate(W[0],W[1]).scale(H.k).translate(typeof O=="function"?-O.apply(this,arguments):-O,typeof R=="function"?-R.apply(this,arguments):-R),L,s)},$,N)};function P(g,O){return O=Math.max(r[0],Math.min(r[1],O)),O===g.k?g:new rn(O,g.x,g.y)}function I(g,O,R){var $=O[0]-R[0]*g.k,N=O[1]-R[1]*g.k;return $===g.x&&N===g.y?g:new rn(g.k,$,N)}function m(g){return[(+g[0][0]+ +g[1][0])/2,(+g[0][1]+ +g[1][1])/2]}function F(g,O,R,$){g.on("start.zoom",function(){z(this,arguments).event($).start()}).on("interrupt.zoom end.zoom",function(){z(this,arguments).event($).end()}).tween("zoom",function(){var N=this,L=arguments,H=z(N,L).event($),W=t.apply(N,L),D=R==null?m(W):typeof R=="function"?R.apply(N,L):R,Z=Math.max(W[1][0]-W[0][0],W[1][1]-W[0][1]),le=N.__zoom,ce=typeof O=="function"?O.apply(N,L):O,Y=a(le.invert(D).concat(Z/le.k),ce.invert(D).concat(Z/ce.k));return function(j){if(j===1)j=ce;else{var ne=Y(j),pe=Z/ne[2];j=new rn(pe,D[0]-ne[0]*pe,D[1]-ne[1]*pe)}H.zoom(null,j)}})}function z(g,O,R){return!R&&g.__zooming||new q(g,O)}function q(g,O){this.that=g,this.args=O,this.active=0,this.sourceEvent=null,this.extent=t.apply(g,O),this.taps=0}q.prototype={event:function(O){return O&&(this.sourceEvent=O),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(O,R){return this.mouse&&O!=="mouse"&&(this.mouse[1]=R.invert(this.mouse[0])),this.touch0&&O!=="touch"&&(this.touch0[1]=R.invert(this.touch0[0])),this.touch1&&O!=="touch"&&(this.touch1[1]=R.invert(this.touch1[0])),this.that.__zoom=R,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(O){var R=xt(this.that).datum();u.call(O,this.that,new m_(O,{sourceEvent:this.sourceEvent,target:A,transform:this.that.__zoom,dispatch:u}),R)}};function G(g){for(var O=arguments.length,R=new Array(O>1?O-1:0),$=1;$<O;$++)R[$-1]=arguments[$];if(!e.apply(this,arguments))return;var N=z(this,R).event(g),L=this.__zoom,H=Math.max(r[0],Math.min(r[1],L.k*Math.pow(2,o.apply(this,arguments)))),W=zt(g);if(N.wheel)(N.mouse[0][0]!==W[0]||N.mouse[0][1]!==W[1])&&(N.mouse[1]=L.invert(N.mouse[0]=W)),clearTimeout(N.wheel);else{if(L.k===H)return;N.mouse=[W,L.invert(W)],yr(this),N.start()}ei(g),N.wheel=setTimeout(D,x),N.zoom("mouse",n(I(P(L,H),N.mouse[0],N.mouse[1]),N.extent,s));function D(){N.wheel=null,N.end()}}function K(g){for(var O=arguments.length,R=new Array(O>1?O-1:0),$=1;$<O;$++)R[$-1]=arguments[$];if(f||!e.apply(this,arguments))return;var N=g.currentTarget,L=z(this,R,!0).event(g),H=xt(g.view).on("mousemove.zoom",le,!0).on("mouseup.zoom",ce,!0),W=zt(g,N),D=g.clientX,Z=g.clientY;Bc(g.view),pl(g),L.mouse=[W,this.__zoom.invert(W)],yr(this),L.start();function le(Y){if(ei(Y),!L.moved){var j=Y.clientX-D,ne=Y.clientY-Z;L.moved=j*j+ne*ne>b}L.event(Y).zoom("mouse",n(I(L.that.__zoom,L.mouse[0]=zt(Y,N),L.mouse[1]),L.extent,s))}function ce(Y){H.on("mousemove.zoom mouseup.zoom",null),Vc(Y.view,L.moved),ei(Y),L.event(Y).end()}}function Q(g){for(var O=arguments.length,R=new Array(O>1?O-1:0),$=1;$<O;$++)R[$-1]=arguments[$];if(e.apply(this,arguments)){var N=this.__zoom,L=zt(g.changedTouches?g.changedTouches[0]:g,this),H=N.invert(L),W=N.k*(g.shiftKey?.5:2),D=n(I(P(N,W),L,H),t.apply(this,R),s);ei(g),l>0?xt(this).transition().duration(l).call(F,D,L,g):xt(this).call(A.transform,D,L,g)}}function re(g){for(var O=arguments.length,R=new Array(O>1?O-1:0),$=1;$<O;$++)R[$-1]=arguments[$];if(e.apply(this,arguments)){var N=g.touches,L=N.length,H=z(this,R,g.changedTouches.length===L).event(g),W,D,Z,le;for(pl(g),D=0;D<L;++D)Z=N[D],le=zt(Z,this),le=[le,this.__zoom.invert(le),Z.identifier],H.touch0?!H.touch1&&H.touch0[2]!==le[2]&&(H.touch1=le,H.taps=0):(H.touch0=le,W=!0,H.taps=1+!!c);c&&(c=clearTimeout(c)),W&&(H.taps<2&&(d=le[0],c=setTimeout(function(){c=null},p)),yr(this),H.start())}}function ee(g){if(this.__zooming){for(var O=arguments.length,R=new Array(O>1?O-1:0),$=1;$<O;$++)R[$-1]=arguments[$];var N=z(this,R).event(g),L=g.changedTouches,H=L.length,W,D,Z,le;for(ei(g),W=0;W<H;++W)D=L[W],Z=zt(D,this),N.touch0&&N.touch0[2]===D.identifier?N.touch0[0]=Z:N.touch1&&N.touch1[2]===D.identifier&&(N.touch1[0]=Z);if(D=N.that.__zoom,N.touch1){var ce=N.touch0[0],Y=N.touch0[1],j=N.touch1[0],ne=N.touch1[1],pe=(pe=j[0]-ce[0])*pe+(pe=j[1]-ce[1])*pe,me=(me=ne[0]-Y[0])*me+(me=ne[1]-Y[1])*me;D=P(D,Math.sqrt(pe/me)),Z=[(ce[0]+j[0])/2,(ce[1]+j[1])/2],le=[(Y[0]+ne[0])/2,(Y[1]+ne[1])/2]}else if(N.touch0)Z=N.touch0[0],le=N.touch0[1];else return;N.zoom("touch",n(I(D,Z,le),N.extent,s))}}function oe(g){for(var O=arguments.length,R=new Array(O>1?O-1:0),$=1;$<O;$++)R[$-1]=arguments[$];if(this.__zooming){var N=z(this,R).event(g),L=g.changedTouches,H=L.length,W,D;for(pl(g),f&&clearTimeout(f),f=setTimeout(function(){f=null},p),W=0;W<H;++W)D=L[W],N.touch0&&N.touch0[2]===D.identifier?delete N.touch0:N.touch1&&N.touch1[2]===D.identifier&&delete N.touch1;if(N.touch1&&!N.touch0&&(N.touch0=N.touch1,delete N.touch1),N.touch0)N.touch0[1]=this.__zoom.invert(N.touch0[0]);else if(N.end(),N.taps===2&&(D=zt(D,this),Math.hypot(d[0]-D[0],d[1]-D[1])<_)){var Z=xt(this).on("dblclick.zoom");Z&&Z.apply(this,arguments)}}}return A.wheelDelta=function(g){return arguments.length?(o=typeof g=="function"?g:_r(+g),A):o},A.filter=function(g){return arguments.length?(e=typeof g=="function"?g:_r(!!g),A):e},A.touchable=function(g){return arguments.length?(i=typeof g=="function"?g:_r(!!g),A):i},A.extent=function(g){return arguments.length?(t=typeof g=="function"?g:_r([[+g[0][0],+g[0][1]],[+g[1][0],+g[1][1]]]),A):t},A.scaleExtent=function(g){return arguments.length?(r[0]=+g[0],r[1]=+g[1],A):[r[0],r[1]]},A.translateExtent=function(g){return arguments.length?(s[0][0]=+g[0][0],s[1][0]=+g[1][0],s[0][1]=+g[0][1],s[1][1]=+g[1][1],A):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},A.constrain=function(g){return arguments.length?(n=g,A):n},A.duration=function(g){return arguments.length?(l=+g,A):l},A.interpolate=function(g){return arguments.length?(a=g,A):a},A.on=function(){var g=u.on.apply(u,arguments);return g===u?A:g},A.clickDistance=function(g){return arguments.length?(b=(g=+g)*g,A):Math.sqrt(b)},A.tapDistance=function(g){return arguments.length?(_=+g,A):_},A}var he=(e=>(e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom",e))(he||{}),vl=(e=>(e.Partial="partial",e.Full="full",e))(vl||{}),Fn=(e=>(e.Bezier="default",e.SimpleBezier="simple-bezier",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e))(Fn||{}),yn=(e=>(e.Strict="strict",e.Loose="loose",e))(yn||{}),ml=(e=>(e.Arrow="arrow",e.ArrowClosed="arrowclosed",e))(ml||{}),ti=(e=>(e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal",e))(ti||{});const x_=["INPUT","SELECT","TEXTAREA"],A_=typeof document<"u"?document:null;function yl(e){var t,n;const o=((n=(t=e.composedPath)==null?void 0:t.call(e))==null?void 0:n[0])||e.target,i=typeof o?.hasAttribute=="function"?o.hasAttribute("contenteditable"):!1,r=typeof o?.closest=="function"?o.closest(".nokey"):null;return x_.includes(o?.nodeName)||i||!!r}function O_(e){return e.ctrlKey||e.metaKey||e.shiftKey||e.altKey}function yd(e,t,n,o){const i=t.replace("+",`
`).replace(`

`,`
+`).split(`
`).map(s=>s.trim().toLowerCase());if(i.length===1)return e.toLowerCase()===t.toLowerCase();o||n.add(e.toLowerCase());const r=i.every((s,l)=>n.has(s)&&Array.from(n.values())[l]===i[l]);return o&&n.delete(e.toLowerCase()),r}function C_(e,t){return n=>{if(!n.code&&!n.key)return!1;const o=N_(n.code,e);return Array.isArray(e)?e.some(i=>yd(n[o],i,t,n.type==="keyup")):yd(n[o],e,t,n.type==="keyup")}}function N_(e,t){return t.includes(e)?"code":"key"}function ni(e,t){const n=fe(()=>{var u;return(u=xe(t?.target))!=null?u:A_}),o=fn(xe(e)===!0);let i=!1;const r=new Set;let s=a(xe(e));Ae(()=>xe(e),(u,c)=>{typeof c=="boolean"&&typeof u!="boolean"&&l(),s=a(u)},{immediate:!0}),Oc(["blur","contextmenu"],l),Cc(function(){return s(...arguments)},u=>{var c,d,f,p;const x=(c=xe(t?.actInsideInputWithModifier))!=null?c:!0,b=(d=xe(t?.preventDefault))!=null?d:!1;if(i=O_(u),(!i||i&&!x)&&yl(u))return;const A=((p=(f=u.composedPath)==null?void 0:f.call(u))==null?void 0:p[0])||u.target,P=A?.nodeName==="BUTTON"||A?.nodeName==="A";!b&&(i||!P)&&u.preventDefault(),o.value=!0},{eventName:"keydown",target:n}),Cc(function(){return s(...arguments)},u=>{var c;const d=(c=xe(t?.actInsideInputWithModifier))!=null?c:!0;if(o.value){if((!i||i&&!d)&&yl(u))return;i=!1,o.value=!1}},{eventName:"keyup",target:n});function l(){i=!1,r.clear(),o.value=xe(e)===!0}function a(u){return u===null?(l(),()=>!1):typeof u=="boolean"?(l(),o.value=u,()=>!1):Array.isArray(u)||typeof u=="string"?C_(u,r):u}return o}const _d="vue-flow__node-desc",wd="vue-flow__edge-desc",T_="vue-flow__aria-live",bd=["Enter"," ","Escape"],ho={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function wr(e){return ie({},e.computedPosition||{x:0,y:0},{width:e.dimensions.width||0,height:e.dimensions.height||0})}function br(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 Sr(e){return{width:e.offsetWidth,height:e.offsetHeight}}function Ln(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),Math.min(Math.max(e,t),n)}function Sd(e,t){return{x:Ln(e.x,t[0][0],t[1][0]),y:Ln(e.y,t[0][1],t[1][1])}}function Ed(e){const t=e.getRootNode();return"elementFromPoint"in t?t:window.document}function _n(e){return e&&typeof e=="object"&&"id"in e&&"source"in e&&"target"in e}function Hn(e){return e&&typeof e=="object"&&"id"in e&&"position"in e&&!_n(e)}function oi(e){return Hn(e)&&"computedPosition"in e}function Er(e){return!Number.isNaN(e)&&Number.isFinite(e)}function M_(e){return Er(e.width)&&Er(e.height)&&Er(e.x)&&Er(e.y)}function I_(e,t,n){var o;const i={id:e.id.toString(),type:(o=e.type)!=null?o:"default",dimensions:To({width:0,height:0}),computedPosition:To(ie({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:Ye(e.data)?e.data:{},events:To(Ye(e.events)?e.events:{})};return Object.assign(t??i,e,{id:e.id.toString(),parentNode:n})}function xd(e,t,n){var o,i,r,s,l,a,u,c,d;const f=ie({id:e.id.toString(),type:(o=(i=e.type)!=null?i:t?.type)!=null?o:"default",source:e.source.toString(),target:e.target.toString(),sourceHandle:(c=e.sourceHandle)==null?void 0:c.toString(),targetHandle:(d=e.targetHandle)==null?void 0:d.toString(),updatable:(r=e.updatable)!=null?r:n?.updatable,selectable:(s=e.selectable)!=null?s:n?.selectable,focusable:(l=e.focusable)!=null?l:n?.focusable,data:Ye(e.data)?e.data:{},events:To(Ye(e.events)?e.events:{}),label:(a=e.label)!=null?a:"",interactionWidth:(u=e.interactionWidth)!=null?u:n?.interactionWidth},n??{});return Object.assign(t??f,e,{id:e.id.toString()})}function Ad(e,t,n,o){const i=typeof e=="string"?e:e.id,r=new Set,s=o==="source"?"target":"source";for(const l of n)l[s]===i&&r.add(l[o]);return t.filter(l=>r.has(l.id))}function P_(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length===3){const l=t[0],a=t[1],u=t[2];return Ad(l,a,u,"target")}const o=t[0],i=t[1],r=typeof o=="string"?o:o.id;return i.filter(l=>_n(l)&&l.source===r).map(l=>i.find(a=>Hn(a)&&a.id===l.target))}function R_(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length===3){const l=t[0],a=t[1],u=t[2];return Ad(l,a,u,"source")}const o=t[0],i=t[1],r=typeof o=="string"?o:o.id;return i.filter(l=>_n(l)&&l.target===r).map(l=>i.find(a=>Hn(a)&&a.id===l.source))}function Od(e){let t=e.source,n=e.sourceHandle,o=e.target,i=e.targetHandle;return"vueflow__edge-"+t+(n??"")+"-"+o+(i??"")}function D_(e,t){return t.some(n=>_n(n)&&n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle))}function ii(e,t){let n=e.x,o=e.y,i=t.x,r=t.y,s=t.zoom;return{x:n*s+i,y:o*s+r}}function ri(e,t,n,o){let i=e.x,r=e.y,s=t.x,l=t.y,a=t.zoom;n===void 0&&(n=!1),o===void 0&&(o=[1,1]);const u={x:(i-s)/a,y:(r-l)/a};return n?Ar(u,o):u}function Cd(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 xr(e){let t=e.x,n=e.y,o=e.width,i=e.height;return{x:t,y:n,x2:t+o,y2:n+i}}function Nd(e){let t=e.x,n=e.y,o=e.x2,i=e.y2;return{x:t,y:n,width:o-t,height:i-n}}function k_(e,t){return Nd(Cd(xr(e),xr(t)))}function _l(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=Cd(t,xr(ie({},o.computedPosition,o.dimensions)))}return Nd(t)}function Td(e,t,n,o,i){n===void 0&&(n={x:0,y:0,zoom:1}),o===void 0&&(o=!1),i===void 0&&(i=!1);const r=ie({},ri(t,n),{width:t.width/n.zoom,height:t.height/n.zoom}),s=[];for(const d of e){var l,a,u,c;const f=d.dimensions,p=d.selectable,x=p===void 0?!0:p,b=d.hidden,_=b===void 0?!1:b,A=(l=(a=f.width)!=null?a:d.width)!=null?l:null,P=(u=(c=f.height)!=null?c:d.height)!=null?u:null;if(i&&!x||_)continue;const I=br(r,wr(d)),m=A===null||P===null,F=o&&I>0,z=(A??0)*(P??0);(m||F||I>=z||d.dragging)&&s.push(d)}return s}function Wn(e,t){const n=new Set;if(typeof e=="string")n.add(e);else if(e.length>=1)for(const o of e)n.add(o.id);return t.filter(o=>n.has(o.source)||n.has(o.target))}function go(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=Number.parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=Number.parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return ai('The padding value "'+e+'" is invalid. Please provide a number or a string with a valid unit (px or %).'),0}function $_(e,t,n){if(typeof e=="string"||typeof e=="number"){const d=go(e,n),f=go(e,t);return{top:d,right:f,bottom:d,left:f,x:f*2,y:d*2}}if(typeof e=="object"){var o,i,r,s,l,a,u,c;const d=go((o=(i=e.top)!=null?i:e.y)!=null?o:0,n),f=go((r=(s=e.bottom)!=null?s:e.y)!=null?r:0,n),p=go((l=(a=e.left)!=null?a:e.x)!=null?l:0,t),x=go((u=(c=e.right)!=null?c:e.x)!=null?u:0,t);return{top:d,right:x,bottom:f,left:p,x:p+x,y:d+f}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function F_(e,t,n,o,i,r){const s=ii(e,{x:t,y:n,zoom:o}),l=s.x,a=s.y,u=ii({x:e.x+e.width,y:e.y+e.height},{x:t,y:n,zoom:o}),c=u.x,d=u.y,f=i-c,p=r-d;return{left:Math.floor(l),top:Math.floor(a),right:Math.floor(f),bottom:Math.floor(p)}}function Md(e,t,n,o,i,r){r===void 0&&(r=.1);const s=$_(r,t,n),l=(t-s.x)/e.width,a=(n-s.y)/e.height,u=Math.min(l,a),c=Ln(u,o,i),d=e.x+e.width/2,f=e.y+e.height/2,p=t/2-d*c,x=n/2-f*c,b=F_(e,p,x,c,t,n),_={left:Math.min(b.left-s.left,0),top:Math.min(b.top-s.top,0),right:Math.min(b.right-s.right,0),bottom:Math.min(b.bottom-s.bottom,0)};return{x:p-_.left+_.right,y:x-_.top+_.bottom,zoom:c}}function L_(e,t){return{x:t.x+e.x,y:t.y+e.y,z:(e.z>t.z?e.z:t.z)+1}}function Id(e,t){if(!e.parentNode)return!1;const n=t.get(e.parentNode);return n?n.selected?!0:Id(n,t):!1}function si(e,t){return typeof e>"u"?"":typeof e=="string"?e:""+(t?t+"__":"")+Object.keys(e).sort().map(o=>o+"="+e[o]).join("&")}function wl(e){const t=e.ctrlKey&&li()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t}function Pd(e,t,n){return e<t?Ln(Math.abs(e-t),1,t)/t:e>n?-Ln(Math.abs(e-n),1,t)/t:0}function Rd(e,t,n,o){n===void 0&&(n=15),o===void 0&&(o=40);const i=Pd(e.x,o,t.width-o)*n,r=Pd(e.y,o,t.height-o)*n;return[i,r]}function bl(e,t){if(t){const i=e.position.x+e.dimensions.width-t.dimensions.width,r=e.position.y+e.dimensions.height-t.dimensions.height;if(i>0||r>0||e.position.x<0||e.position.y<0){var n,o;let s={};if(typeof t.style=="function"?s=ie({},t.style(t)):t.style&&(s=ie({},t.style)),s.width=(n=s.width)!=null?n:t.dimensions.width+"px",s.height=(o=s.height)!=null?o:t.dimensions.height+"px",i>0)if(typeof s.width=="string"){const l=Number(s.width.replace("px",""));s.width=l+i+"px"}else s.width+=i;if(r>0)if(typeof s.height=="string"){const l=Number(s.height.replace("px",""));s.height=l+r+"px"}else s.height+=r;if(e.position.x<0){const l=Math.abs(e.position.x);if(t.position.x=t.position.x-l,typeof s.width=="string"){const a=Number(s.width.replace("px",""));s.width=a+l+"px"}else s.width+=l;e.position.x=0}if(e.position.y<0){const l=Math.abs(e.position.y);if(t.position.y=t.position.y-l,typeof s.height=="string"){const a=Number(s.height.replace("px",""));s.height=a+l+"px"}else s.height+=l;e.position.y=0}t.dimensions.width=Number(s.width.toString().replace("px","")),t.dimensions.height=Number(s.height.toString().replace("px","")),typeof t.style=="function"?t.style=l=>{const a=t.style;return ie({},a(l),s)}:t.style=ie({},t.style,s)}}}function Dd(e,t){var n,o;const i=e.filter(s=>s.type==="add"||s.type==="remove");for(const s of i)if(s.type==="add")t.findIndex(a=>a.id===s.item.id)===-1&&t.push(s.item);else if(s.type==="remove"){const l=t.findIndex(a=>a.id===s.id);l!==-1&&t.splice(l,1)}const r=t.map(s=>s.id);for(const s of t)for(const l of e)if(l.id===s.id)switch(l.type){case"select":s.selected=l.selected;break;case"position":if(oi(s)&&(typeof l.position<"u"&&(s.position=l.position),typeof l.dragging<"u"&&(s.dragging=l.dragging),s.expandParent&&s.parentNode)){const a=t[r.indexOf(s.parentNode)];a&&oi(a)&&bl(s,a)}break;case"dimensions":if(oi(s)&&(typeof l.dimensions<"u"&&(s.dimensions=l.dimensions),typeof l.updateStyle<"u"&&l.updateStyle&&(s.style=ie({},s.style||{},{width:((n=l.dimensions)==null?void 0:n.width)+"px",height:((o=l.dimensions)==null?void 0:o.height)+"px"})),typeof l.resizing<"u"&&(s.resizing=l.resizing),s.expandParent&&s.parentNode)){const a=t[r.indexOf(s.parentNode)];a&&oi(a)&&(!!a.dimensions.width&&!!a.dimensions.height?bl(s,a):$t(()=>{bl(s,a)}))}break}return t}function wn(e,t){return{id:e,type:"select",selected:t}}function kd(e){return{item:e,type:"add"}}function $d(e){return{id:e,type:"remove"}}function Fd(e,t,n,o,i){return{id:e,source:t,target:n,sourceHandle:o||null,targetHandle:i||null,type:"remove"}}function bn(e,t,n){t===void 0&&(t=new Set),n===void 0&&(n=!1);const o=[];for(const i of e){const r=i[0],s=i[1],l=t.has(r);!(s.selected===void 0&&!l)&&s.selected!==l&&(n&&(s.selected=l),o.push(wn(s.id,l)))}return o}const Ld=()=>{};function ae(e){const t=new Set;let n=Ld,o=()=>!1;const i=()=>t.size>0||o(),r=f=>{n=f},s=()=>{n=Ld},l=f=>{o=f},a=()=>{o=()=>!1},u=f=>{t.delete(f)};return{on:f=>{t.add(f);const p=()=>u(f);return Vo(p),{off:p}},off:u,trigger:f=>{const p=[n];return i()?p.push(...t):e&&p.push(e),Promise.allSettled(p.map(x=>x(f)))},hasListeners:i,listeners:t,setEmitter:r,removeEmitter:s,setHasEmitListeners:l,removeHasEmitListeners:a}}function Hd(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 H_(e,t,n,o){var i,r;const s=new Map;for(const l of e){const a=l[0],u=l[1];(u.selected||u.id===o)&&(!u.parentNode||!Id(u,e))&&(u.draggable||t&&typeof u.draggable>"u")&&e.get(a)&&s.set(a,{id:u.id,position:u.position||{x:0,y:0},distance:{x:n.x-((i=u.computedPosition)==null?void 0:i.x)||0,y:n.y-((r=u.computedPosition)==null?void 0:r.y)||0},from:{x:u.computedPosition.x,y:u.computedPosition.y},extent:u.extent,parentNode:u.parentNode,dimensions:ie({},u.dimensions),expandParent:u.expandParent})}return Array.from(s.values())}function Sl(e){let t=e.id,n=e.dragItems,o=e.findNode;const i=[];for(const r of n){const s=o(r.id);s&&i.push(s)}return[t?i.find(r=>r.id===t):i[0],i]}function Wd(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 W_(e,t,n){const o=typeof e!="string"?Wd(e.padding):[0,0,0,0],i=o[0],r=o[1],s=o[2],l=o[3];return n&&typeof n.computedPosition.x<"u"&&typeof n.computedPosition.y<"u"&&typeof n.dimensions.width<"u"&&typeof n.dimensions.height<"u"?[[n.computedPosition.x+l,n.computedPosition.y+i],[n.computedPosition.x+n.dimensions.width-r,n.computedPosition.y+n.dimensions.height-s]]:!1}function z_(e,t,n,o){let i=e.extent||n;if((i==="parent"||!Array.isArray(i)&&i?.range==="parent")&&!e.expandParent)if(e.parentNode&&o&&e.dimensions.width&&e.dimensions.height){const r=W_(i,e,o);r&&(i=r)}else t(new Ze(Ke.NODE_EXTENT_INVALID,e.id)),i=n;else if(Array.isArray(i)){const r=o?.computedPosition.x||0,s=o?.computedPosition.y||0;i=[[i[0][0]+r,i[0][1]+s],[i[1][0]+r,i[1][1]+s]]}else if(i!=="parent"&&i?.range&&Array.isArray(i.range)){const r=Wd(i.padding),s=r[0],l=r[1],a=r[2],u=r[3],c=o?.computedPosition.x||0,d=o?.computedPosition.y||0;i=[[i.range[0][0]+c+u,i.range[0][1]+d+s],[i.range[1][0]+c-l,i.range[1][1]+d-a]]}return i==="parent"?[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]]:i}function B_(e,t){let n=e.width,o=e.height;return[t[0],[t[1][0]-(n||0),t[1][1]-(o||0)]]}function El(e,t,n,o,i){const r=B_(e.dimensions,z_(e,n,o,i)),s=Sd(t,r);return{position:{x:s.x-(i?.computedPosition.x||0),y:s.y-(i?.computedPosition.y||0)},computedPosition:s}}function po(e,t,n,o){var i,r,s;n===void 0&&(n=he.Left),o===void 0&&(o=!1);const l=((i=t?.x)!=null?i:0)+e.computedPosition.x,a=((r=t?.y)!=null?r:0)+e.computedPosition.y,u=t??Y_(e),c=u.width,d=u.height;if(o)return{x:l+c/2,y:a+d/2};switch((s=t?.position)!=null?s:n){case he.Top:return{x:l+c/2,y:a};case he.Right:return{x:l+c,y:a+d/2};case he.Bottom:return{x:l+c/2,y:a+d};case he.Left:return{x:l,y:a+d/2}}}function zd(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function V_(e){let t=e.sourcePos,n=e.targetPos,o=e.sourceWidth,i=e.sourceHeight,r=e.targetWidth,s=e.targetHeight,l=e.width,a=e.height,u=e.viewport;const c={x:Math.min(t.x,n.x),y:Math.min(t.y,n.y),x2:Math.max(t.x+o,n.x+r),y2:Math.max(t.y+i,n.y+s)};c.x===c.x2&&(c.x2+=1),c.y===c.y2&&(c.y2+=1);const d=xr({x:(0-u.x)/u.zoom,y:(0-u.y)/u.zoom,width:l/u.zoom,height:a/u.zoom}),f=Math.max(0,Math.min(d.x2,c.x2)-Math.max(d.x,c.x)),p=Math.max(0,Math.min(d.y2,c.y2)-Math.max(d.y,c.y));return Math.ceil(f*p)>0}function G_(e,t,n){n===void 0&&(n=!1);const o=typeof e.zIndex=="number";let i=o?e.zIndex:0;const r=t(e.source),s=t(e.target);return!r||!s?0:(n&&(i=o?e.zIndex:Math.max(r.computedPosition.z||0,s.computedPosition.z||0)),i)}var Ke=(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))(Ke||{});const Bd={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
Node: `+e,NODE_NOT_FOUND:e=>`Node not found
Node: `+e,NODE_MISSING_PARENT:(e,t)=>`Node is missing a parent
Node: `+e+`
Parent: `+t,NODE_TYPE_MISSING:e=>`Node type is missing
Type: `+e,NODE_EXTENT_INVALID:e=>`Only child nodes can use a parent extent
Node: `+e,EDGE_INVALID:e=>`An edge needs a source and a target
Edge: `+e,EDGE_SOURCE_MISSING:(e,t)=>`Edge source is missing
Edge: `+e+` 
Source: `+t,EDGE_TARGET_MISSING:(e,t)=>`Edge target is missing
Edge: `+e+` 
Target: `+t,EDGE_TYPE_MISSING:e=>`Edge type is missing
Type: `+e,EDGE_SOURCE_TARGET_SAME:(e,t,n)=>`Edge source and target are the same
Edge: `+e+` 
Source: `+t+` 
Target: `+n,EDGE_SOURCE_TARGET_MISSING:(e,t,n)=>`Edge source or target is missing
Edge: `+e+` 
Source: `+t+` 
Target: `+n,EDGE_ORPHANED:e=>`Edge was orphaned (suddenly missing source or target) and has been removed
Edge: `+e,EDGE_NOT_FOUND:e=>`Edge not found
Edge: `+e,USEVUEFLOW_OPTIONS:()=>"The options parameter is deprecated and will be removed in the next major version. Please use the id parameter instead"};class Ze extends Error{constructor(t){for(var n,o=arguments.length,i=new Array(o>1?o-1:0),r=1;r<o;r++)i[r-1]=arguments[r];super((n=Bd[t])==null?void 0:n.call(Bd,...i)),this.name="VueFlowError",this.code=t,this.args=i}}function xl(e){return"clientX"in e}function K_(e){return"sourceEvent"in e}function Kt(e,t){var n,o;const i=xl(e);let r,s;return i?(r=e.clientX,s=e.clientY):"touches"in e&&e.touches.length>0?(r=e.touches[0].clientX,s=e.touches[0].clientY):"changedTouches"in e&&e.changedTouches.length>0?(r=e.changedTouches[0].clientX,s=e.changedTouches[0].clientY):(r=0,s=0),{x:r-((n=t?.left)!=null?n:0),y:s-((o=t?.top)!=null?o:0)}}const li=()=>{var e;return typeof navigator<"u"&&((e=navigator?.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Y_(e){var t,n,o,i,r,s;return{width:(t=(n=(r=e.dimensions)==null?void 0:r.width)!=null?n:e.width)!=null?t:0,height:(o=(i=(s=e.dimensions)==null?void 0:s.height)!=null?i:e.height)!=null?o:0}}function Ar(e,t){return t===void 0&&(t=[1,1]),{x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}}const U_=()=>!0;function Al(e){e?.classList.remove("valid","connecting","vue-flow__handle-valid","vue-flow__handle-connecting")}function X_(e,t,n){const o=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const r of t.values())br(i,wr(r))>0&&o.push(r);return o}const q_=250;function Z_(e,t,n,o){var i,r;let s=[],l=Number.POSITIVE_INFINITY;const a=X_(e,n,t+q_);for(const f of a){var u,c;const p=[...(u=(i=f.handleBounds)==null?void 0:i.source)!=null?u:[],...(c=(r=f.handleBounds)==null?void 0:r.target)!=null?c:[]];for(const x of p){if(o.nodeId===x.nodeId&&o.type===x.type&&o.id===x.id)continue;const b=po(f,x,x.position,!0),_=b.x,A=b.y,P=Math.sqrt((_-e.x)**2+(A-e.y)**2);P>t||(P<l?(s=[ie({},x,{x:_,y:A})],l=P):P===l&&s.push(ie({},x,{x:_,y:A})))}}if(!s.length)return null;if(s.length>1){var d;const f=o.type==="source"?"target":"source";return(d=s.find(p=>p.type===f))!=null?d:s[0]}return s[0]}function Vd(e,t,n,o,i,r){let s=t.handle,l=t.connectionMode,a=t.fromNodeId,u=t.fromHandleId,c=t.fromType,d=t.doc,f=t.lib,p=t.flowId,x=t.isValidConnection,b=x===void 0?U_:x;const _=c==="target",A=s?d.querySelector("."+f+'-flow__handle[data-id="'+p+"-"+s?.nodeId+"-"+s?.id+"-"+s?.type+'"]'):null,P=Kt(e),I=P.x,m=P.y,F=d.elementFromPoint(I,m),z=F?.classList.contains(f+"-flow__handle")?F:A,q={handleDomNode:z,isValid:!1,connection:null,toHandle:null};if(z){const G=Gd(void 0,z),K=z.getAttribute("data-nodeid"),Q=z.getAttribute("data-handleid"),re=z.classList.contains("connectable"),ee=z.classList.contains("connectableend");if(!K||!G)return q;const oe={source:_?K:a,sourceHandle:_?Q:u,target:_?a:K,targetHandle:_?u:Q};q.connection=oe;const O=re&&ee&&(l===yn.Strict?_&&G==="source"||!_&&G==="target":K!==a||Q!==u);q.isValid=O&&b(oe,{nodes:o,edges:n,sourceNode:i(oe.source),targetNode:i(oe.target)}),q.toHandle=Kd(K,G,Q,r,l,!0)}return q}function Gd(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function j_(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}function J_(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}function Kd(e,t,n,o,i,r){var s,l,a;r===void 0&&(r=!1);var u,c,d;const f=o.get(e);if(!f)return null;const p=i===yn.Strict?(u=f.handleBounds)==null?void 0:u[t]:[...(s=(c=f.handleBounds)==null?void 0:c.source)!=null?s:[],...(l=(d=f.handleBounds)==null?void 0:d.target)!=null?l:[]],x=(a=n?p?.find(b=>b.id===n):p?.[0])!=null?a:null;return x&&r?ie({},x,po(f,x,x.position,!0)):x}const Ol={[he.Left]:he.Right,[he.Right]:he.Left,[he.Top]:he.Bottom,[he.Bottom]:he.Top},Q_=["production","prod"];function ai(e){if(Yd()){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];console.warn("[Vue Flow]: "+e,...n)}}function Yd(){return!Q_.includes("production")}function Ud(e,t,n,o,i){const r=t.querySelectorAll(".vue-flow__handle."+e);return r?.length?Array.from(r).map(s=>{const l=s.getBoundingClientRect();return ie({id:s.getAttribute("data-handleid"),type:e,nodeId:i,position:s.getAttribute("data-handlepos"),x:(l.left-n.left)/o,y:(l.top-n.top)/o},Sr(s))}):null}function Cl(e,t,n,o,i,r,s){r===void 0&&(r=!1),i.value=!1,e.selected?(r||e.selected&&t)&&(o([e]),$t(()=>{s.blur()})):n([e])}function Ye(e){return typeof de(e)<"u"}function e1(e,t,n,o){if(!e||!e.source||!e.target){var i;return n(new Ze(Ke.EDGE_INVALID,(i=e?.id)!=null?i:"[ID UNKNOWN]")),!1}let r;return _n(e)?r=e:r=ie({},e,{id:Od(e)}),r=xd(r,void 0,o),D_(r,t)?!1:r}function t1(e,t,n,o,i){if(!t.source||!t.target)return i(new Ze(Ke.EDGE_INVALID,e.id)),!1;if(!n)return i(new Ze(Ke.EDGE_NOT_FOUND,e.id)),!1;const r=e.id,s=Bo(e,Nv);return ie({},s,{id:o?Od(t):r,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle})}function Xd(e,t,n){const o={},i=[];for(let r=0;r<e.length;++r){const s=e[r];if(!Hn(s)){n(new Ze(Ke.NODE_INVALID,s?.id)||"[ID UNKNOWN|INDEX "+r+"]");continue}const l=I_(s,t(s.id),s.parentNode);s.parentNode&&(o[s.parentNode]=!0),i[r]=l}for(const r of i){const s=t(r.parentNode)||i.find(l=>l.id===r.parentNode);r.parentNode&&!s&&n(new Ze(Ke.NODE_MISSING_PARENT,r.id,r.parentNode)),(r.parentNode||o[r.id])&&(o[r.id]&&(r.isParent=!0),s&&(s.isParent=!0))}return i}function qd(e,t,n,o,i,r){let s=i;const l=o.get(s)||new Map;o.set(s,l.set(n,t)),s=i+"-"+e;const a=o.get(s)||new Map;if(o.set(s,a.set(n,t)),r){s=i+"-"+e+"-"+r;const u=o.get(s)||new Map;o.set(s,u.set(n,t))}}function Nl(e,t,n){e.clear();for(const o of n){const i=o.source,r=o.target,s=o.sourceHandle,l=s===void 0?null:s,a=o.targetHandle,u=a===void 0?null:a,c={edgeId:o.id,source:i,target:r,sourceHandle:l,targetHandle:u},d=i+"-"+l+"--"+r+"-"+u,f=r+"-"+u+"--"+i+"-"+l;qd("source",c,f,e,i,l),qd("target",c,d,e,r,u)}}function Zd(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function Tl(e,t,n,o,i,r,s,l){const a=[];for(const u of e){const c=_n(u)?u:e1(u,l,i,r);if(!c)continue;const d=n(c.source),f=n(c.target);if(!d||!f){i(new Ze(Ke.EDGE_SOURCE_TARGET_MISSING,c.id,c.source,c.target));continue}if(!d){i(new Ze(Ke.EDGE_SOURCE_MISSING,c.id,c.source));continue}if(!f){i(new Ze(Ke.EDGE_TARGET_MISSING,c.id,c.target));continue}if(t&&!t(c,{edges:l,nodes:s,sourceNode:d,targetNode:f})){i(new Ze(Ke.EDGE_INVALID,c.id));continue}const p=o(c.id);a.push(ie({},xd(c,p,r),{sourceNode:d,targetNode:f}))}return a}const jd=Symbol("vueFlow"),Jd=Symbol("nodeId"),Qd=Symbol("nodeRef"),n1=Symbol("edgeId"),o1=Symbol("edgeRef"),Or=Symbol("slots");function ef(e){const t=ke(),n=t.vueFlowRef,o=t.snapToGrid,i=t.snapGrid,r=t.noDragClassName,s=t.nodeLookup,l=t.nodeExtent,a=t.nodeDragThreshold,u=t.viewport,c=t.autoPanOnNodeDrag,d=t.autoPanSpeed,f=t.nodesDraggable,p=t.panBy,x=t.findNode,b=t.multiSelectionActive,_=t.nodesSelectionActive,A=t.selectNodesOnDrag,P=t.removeSelectedElements,I=t.addSelectedNodes,m=t.updateNodePositions,F=t.emits,z=e.onStart,q=e.onDrag,G=e.onStop,K=e.onClick,Q=e.el,re=e.disabled,ee=e.id,oe=e.selectable,g=e.dragHandle,O=fn(!1);let R=[],$,N=null,L={x:void 0,y:void 0},H={x:0,y:0},W=null,D=!1,Z=!1,le=0,ce=!1;const Y=s1(),j=y=>{let h=y.x,v=y.y;L={x:h,y:v};let E=!1;if(R=R.map(S=>{const C={x:h-S.distance.x,y:v-S.distance.y},w=El(S,o.value?Ar(C,i.value):C,F.error,l.value,S.parentNode?x(S.parentNode):void 0),M=w.computedPosition;return E=E||S.position.x!==M.x||S.position.y!==M.y,S.position=M,S}),Z=Z||E,!!E&&(m(R,!0,!0),O.value=!0,W)){const S=Sl({id:ee,dragItems:R,findNode:x}),C=S[0],w=S[1];q({event:W,node:C,nodes:w})}},ne=()=>{if(!N)return;const y=Rd(H,N,d.value),h=y[0],v=y[1];if(h!==0||v!==0){var E,S;const C={x:((E=L.x)!=null?E:0)-h/u.value.zoom,y:((S=L.y)!=null?S:0)-v/u.value.zoom};p({x:h,y:v})&&j(C)}le=requestAnimationFrame(ne)},pe=(y,h)=>{D=!0;const v=x(ee);!A.value&&!b.value&&v&&(v.selected||P()),v&&xe(oe)&&A.value&&Cl(v,b.value,I,P,_,!1,h);const E=Y(y.sourceEvent);if(L=E,R=H_(s.value,f.value,E,ee),R.length){const S=Sl({id:ee,dragItems:R,findNode:x}),C=S[0],w=S[1];z({event:y.sourceEvent,node:C,nodes:w})}},me=(y,h)=>{var v;y.sourceEvent.type==="touchmove"&&y.sourceEvent.touches.length>1||(Z=!1,a.value===0&&pe(y,h),L=Y(y.sourceEvent),N=((v=n.value)==null?void 0:v.getBoundingClientRect())||null,H=Kt(y.sourceEvent,N))},_e=(y,h)=>{const v=Y(y.sourceEvent);if(!ce&&D&&c.value&&(ce=!0,ne()),!D){var E,S;const C=v.xSnapped-((E=L.x)!=null?E:0),w=v.ySnapped-((S=L.y)!=null?S:0);Math.sqrt(C*C+w*w)>a.value&&pe(y,h)}(L.x!==v.xSnapped||L.y!==v.ySnapped)&&R.length&&D&&(W=y.sourceEvent,H=Kt(y.sourceEvent,N),j(v))},U=y=>{let h=!1;if(!D&&!O.value&&!b.value){var v,E;const S=y.sourceEvent,C=Y(S),w=C.xSnapped-((v=L.x)!=null?v:0),M=C.ySnapped-((E=L.y)!=null?E:0),k=Math.sqrt(w*w+M*M);k!==0&&k<=a.value&&(K?.(S),h=!0)}if(R.length&&!h){Z&&(m(R,!1,!1),Z=!1);const S=Sl({id:ee,dragItems:R,findNode:x}),C=S[0],w=S[1];G({event:y.sourceEvent,node:C,nodes:w})}R=[],O.value=!1,ce=!1,D=!1,L={x:void 0,y:void 0},cancelAnimationFrame(le)};return Ae([()=>xe(re),Q],(y,h,v)=>{let E=y[0],S=y[1];if(S){const C=xt(S);E||($=M0().on("start",w=>me(w,S)).on("drag",w=>_e(w,S)).on("end",w=>U(w)).filter(w=>{const M=w.target,k=xe(g);return!w.button&&(!r.value||!Hd(M,"."+r.value,S)&&(!k||Hd(M,k,S)))}),C.call($)),v(()=>{C.on(".drag",null),$&&($.on("start",null),$.on("drag",null),$.on("end",null))})}}),O}function i1(){return{doubleClick:ae(),click:ae(),mouseEnter:ae(),mouseMove:ae(),mouseLeave:ae(),contextMenu:ae(),updateStart:ae(),update:ae(),updateEnd:ae()}}function r1(e,t){const n=i1();return n.doubleClick.on(o=>{var i,r;t.edgeDoubleClick(o),(r=(i=e.events)==null?void 0:i.doubleClick)==null||r.call(i,o)}),n.click.on(o=>{var i,r;t.edgeClick(o),(r=(i=e.events)==null?void 0:i.click)==null||r.call(i,o)}),n.mouseEnter.on(o=>{var i,r;t.edgeMouseEnter(o),(r=(i=e.events)==null?void 0:i.mouseEnter)==null||r.call(i,o)}),n.mouseMove.on(o=>{var i,r;t.edgeMouseMove(o),(r=(i=e.events)==null?void 0:i.mouseMove)==null||r.call(i,o)}),n.mouseLeave.on(o=>{var i,r;t.edgeMouseLeave(o),(r=(i=e.events)==null?void 0:i.mouseLeave)==null||r.call(i,o)}),n.contextMenu.on(o=>{var i,r;t.edgeContextMenu(o),(r=(i=e.events)==null?void 0:i.contextMenu)==null||r.call(i,o)}),n.updateStart.on(o=>{var i,r;t.edgeUpdateStart(o),(r=(i=e.events)==null?void 0:i.updateStart)==null||r.call(i,o)}),n.update.on(o=>{var i,r;t.edgeUpdate(o),(r=(i=e.events)==null?void 0:i.update)==null||r.call(i,o)}),n.updateEnd.on(o=>{var i,r;t.edgeUpdateEnd(o),(r=(i=e.events)==null?void 0:i.updateEnd)==null||r.call(i,o)}),Object.entries(n).reduce((o,i)=>{let r=i[0],s=i[1];return o.emit[r]=s.trigger,o.on[r]=s.on,o},{emit:{},on:{}})}function s1(){const e=ke(),t=e.viewport,n=e.snapGrid,o=e.snapToGrid,i=e.vueFlowRef;return r=>{var s,l;const a=(s=(l=i.value)==null?void 0:l.getBoundingClientRect())!=null?s:{left:0,top:0},u=K_(r)?r.sourceEvent:r,c=Kt(u,a),d=c.x,f=c.y,p=ri({x:d,y:f},t.value),x=o.value?Ar(p,n.value):p,b=x.x,_=x.y;return ie({xSnapped:b,ySnapped:_},p)}}function Cr(){return!0}function tf(e){let t=e.handleId,n=e.nodeId,o=e.type,i=e.isValidConnection,r=e.edgeUpdaterType,s=e.onEdgeUpdate,l=e.onEdgeUpdateEnd;const a=ke(),u=a.id,c=a.vueFlowRef,d=a.connectionMode,f=a.connectionRadius,p=a.connectOnClick,x=a.connectionClickStartHandle,b=a.nodesConnectable,_=a.autoPanOnConnect,A=a.autoPanSpeed,P=a.findNode,I=a.panBy,m=a.startConnection,F=a.updateConnection,z=a.endConnection,q=a.emits,G=a.viewport,K=a.edges,Q=a.nodes,re=a.isValidConnection,ee=a.nodeLookup;let oe=null,g=!1,O=null;function R(N){var L;const H=xe(o)==="target",W=xl(N),D=Ed(N.target),Z=N.currentTarget;if(Z&&(W&&N.button===0||!W)){let le=function(J){S=Kt(J,h),ne=Z_(ri(S,G.value,!1,[1,1]),f.value,ee.value,M),C||(w(),C=!0);const ue=Vd(J,{handle:ne,connectionMode:d.value,fromNodeId:xe(n),fromHandleId:xe(t),fromType:H?"target":"source",isValidConnection:j,doc:D,lib:"vue",flowId:u,nodeLookup:ee.value},K.value,Q.value,P,ee.value);O=ue.handleDomNode,oe=ue.connection,g=J_(!!ne,ue.isValid);const be=ie({},V,{isValid:g,to:ue.toHandle&&g?ii({x:ue.toHandle.x,y:ue.toHandle.y},G.value):S,toHandle:ue.toHandle,toPosition:g&&ue.toHandle?ue.toHandle.position:Ol[M.position],toNode:ue.toHandle?ee.value.get(ue.toHandle.nodeId):null});if(g&&ne&&V?.toHandle&&be.toHandle&&V.toHandle.type===be.toHandle.type&&V.toHandle.nodeId===be.toHandle.nodeId&&V.toHandle.id===be.toHandle.id&&V.to.x===be.to.x&&V.to.y===be.to.y)return;const Se=ne??ue.toHandle;if(F(Se&&g?ii({x:Se.x,y:Se.y},G.value):S,Se,j_(!!Se,g)),V=be,!ne&&!g&&!O)return Al(E);oe&&oe.source!==oe.target&&O&&(Al(E),E=O,O.classList.add("connecting","vue-flow__handle-connecting"),O.classList.toggle("valid",!!g),O.classList.toggle("vue-flow__handle-valid",!!g))},ce=function(J){"touches"in J&&J.touches.length>0||((ne||O)&&oe&&g&&(s?s(J,oe):q.connect(oe)),q.connectEnd(J),r&&l?.(J),Al(E),cancelAnimationFrame(pe),z(J),C=!1,g=!1,oe=null,O=null,D.removeEventListener("mousemove",le),D.removeEventListener("mouseup",ce),D.removeEventListener("touchmove",le),D.removeEventListener("touchend",ce))};const Y=P(xe(n));let j=xe(i)||re.value||Cr;!j&&Y&&(j=(H?Y.isValidSourcePos:Y.isValidTargetPos)||Cr);let ne,pe=0;const me=Kt(N),_e=me.x,U=me.y,y=Gd(xe(r),Z),h=(L=c.value)==null?void 0:L.getBoundingClientRect();if(!h||!y)return;const v=Kd(xe(n),y,xe(t),ee.value,d.value);if(!v)return;let E,S=Kt(N,h),C=!1;const w=()=>{if(!_.value)return;const X=Rd(S,h,A.value),J=X[0],ue=X[1];I({x:J,y:ue}),pe=requestAnimationFrame(w)},M=ie({},v,{nodeId:xe(n),type:y,position:v.position}),k=ee.value.get(xe(n)),B={inProgress:!0,isValid:null,from:po(k,M,he.Left,!0),fromHandle:M,fromPosition:M.position,fromNode:k,to:S,toHandle:null,toPosition:Ol[M.position],toNode:null};m(ie({nodeId:xe(n),id:xe(t),type:y,position:Z?.getAttribute("data-handlepos")||he.Top},S),{x:_e-h.left,y:U-h.top}),q.connectStart({event:N,nodeId:xe(n),handleId:xe(t),handleType:y});let V=B;D.addEventListener("mousemove",le),D.addEventListener("mouseup",ce),D.addEventListener("touchmove",le),D.addEventListener("touchend",ce)}}function $(N){var L,H,W;if(!p.value)return;const D=xe(o)==="target";if(!x.value){q.clickConnectStart({event:N,nodeId:xe(n),handleId:xe(t)}),m(ie({nodeId:xe(n),type:xe(o),id:xe(t),position:he.Top},Kt(N)),void 0,!0);return}let Z=xe(i)||re.value||Cr;const le=P(xe(n));if(!Z&&le&&(Z=(D?le.isValidSourcePos:le.isValidTargetPos)||Cr),le&&(typeof le.connectable>"u"?b.value:le.connectable)===!1)return;const ce=Ed(N.target),Y=Vd(N,{handle:ie({nodeId:xe(n),id:xe(t),type:xe(o),position:he.Top},Kt(N)),connectionMode:d.value,fromNodeId:x.value.nodeId,fromHandleId:(L=x.value.id)!=null?L:null,fromType:x.value.type,isValidConnection:Z,doc:ce,lib:"vue",flowId:u,nodeLookup:ee.value},K.value,Q.value,P,ee.value),j=((H=Y.connection)==null?void 0:H.source)===((W=Y.connection)==null?void 0:W.target);Y.isValid&&Y.connection&&!j&&q.connect(Y.connection),q.clickConnectEnd(N),z(N,!0)}return{handlePointerDown:R,handleClick:$}}function l1(){return vt(Jd,"")}function nf(e){var t;const n=(t=e??l1())!=null?t:"",o=vt(Qd,Ce(null)),i=ke(),r=i.findNode,s=i.edges,l=i.emits,a=r(n);return a||l.error(new Ze(Ke.NODE_NOT_FOUND,n)),{id:n,nodeEl:o,node:a,parentNode:fe(()=>r(a.parentNode)),connectedEdges:fe(()=>Wn([a],s.value))}}function a1(){return{doubleClick:ae(),click:ae(),mouseEnter:ae(),mouseMove:ae(),mouseLeave:ae(),contextMenu:ae(),dragStart:ae(),drag:ae(),dragStop:ae()}}function u1(e,t){const n=a1();return n.doubleClick.on(o=>{var i,r;t.nodeDoubleClick(o),(r=(i=e.events)==null?void 0:i.doubleClick)==null||r.call(i,o)}),n.click.on(o=>{var i,r;t.nodeClick(o),(r=(i=e.events)==null?void 0:i.click)==null||r.call(i,o)}),n.mouseEnter.on(o=>{var i,r;t.nodeMouseEnter(o),(r=(i=e.events)==null?void 0:i.mouseEnter)==null||r.call(i,o)}),n.mouseMove.on(o=>{var i,r;t.nodeMouseMove(o),(r=(i=e.events)==null?void 0:i.mouseMove)==null||r.call(i,o)}),n.mouseLeave.on(o=>{var i,r;t.nodeMouseLeave(o),(r=(i=e.events)==null?void 0:i.mouseLeave)==null||r.call(i,o)}),n.contextMenu.on(o=>{var i,r;t.nodeContextMenu(o),(r=(i=e.events)==null?void 0:i.contextMenu)==null||r.call(i,o)}),n.dragStart.on(o=>{var i,r;t.nodeDragStart(o),(r=(i=e.events)==null?void 0:i.dragStart)==null||r.call(i,o)}),n.drag.on(o=>{var i,r;t.nodeDrag(o),(r=(i=e.events)==null?void 0:i.drag)==null||r.call(i,o)}),n.dragStop.on(o=>{var i,r;t.nodeDragStop(o),(r=(i=e.events)==null?void 0:i.dragStop)==null||r.call(i,o)}),Object.entries(n).reduce((o,i)=>{let r=i[0],s=i[1];return o.emit[r]=s.trigger,o.on[r]=s.on,o},{emit:{},on:{}})}function of(){const e=ke(),t=e.getSelectedNodes,n=e.nodeExtent,o=e.updateNodePositions,i=e.findNode,r=e.snapGrid,s=e.snapToGrid,l=e.nodesDraggable,a=e.emits;return function(u,c){c===void 0&&(c=!1);const d=s.value?r.value[0]:5,f=s.value?r.value[1]:5,p=c?4:1,x=u.x*d*p,b=u.y*f*p,_=[];for(const A of t.value)if(A.draggable||l&&typeof A.draggable>"u"){const P={x:A.computedPosition.x+x,y:A.computedPosition.y+b},I=El(A,P,a.error,n.value,A.parentNode?i(A.parentNode):void 0),m=I.position;_.push({id:A.id,position:m,from:A.position,distance:{x:u.x,y:u.y},dimensions:A.dimensions})}o(_,!0,!1)}}const Nr=.1,c1=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2;function Sn(){return ai("Viewport not initialized yet."),Promise.resolve(!1)}const d1={zoomIn:Sn,zoomOut:Sn,zoomTo:Sn,fitView:Sn,setCenter:Sn,fitBounds:Sn,project:e=>e,screenToFlowCoordinate:e=>e,flowToScreenCoordinate:e=>e,setViewport:Sn,setTransform:Sn,getViewport:()=>({x:0,y:0,zoom:1}),getTransform:()=>({x:0,y:0,zoom:1}),viewportInitialized:!1};function f1(e){function t(o,i){return new Promise(r=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.interpolate(i?.interpolate==="linear"?qo:cr).scaleBy(Ml(e.d3Selection,i?.duration,i?.ease,()=>{r(!0)}),o):r(!1)})}function n(o,i,r,s){return new Promise(l=>{var a;const u=Sd({x:-o,y:-i},e.translateExtent),c=u.x,d=u.y,f=fo.translate(-c,-d).scale(r);e.d3Selection&&e.d3Zoom?(a=e.d3Zoom)==null||a.interpolate(s?.interpolate==="linear"?qo:cr).transform(Ml(e.d3Selection,s?.duration,s?.ease,()=>{l(!0)}),f):l(!1)})}return fe(()=>e.d3Zoom&&e.d3Selection&&e.dimensions.width&&e.dimensions.height?{viewportInitialized:!0,zoomIn:i=>t(1.2,i),zoomOut:i=>t(1/1.2,i),zoomTo:(i,r)=>new Promise(s=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.interpolate(r?.interpolate==="linear"?qo:cr).scaleTo(Ml(e.d3Selection,r?.duration,r?.ease,()=>{s(!0)}),i):s(!1)}),setViewport:(i,r)=>n(i.x,i.y,i.zoom,r),setTransform:(i,r)=>n(i.x,i.y,i.zoom,r),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:function(r){var s,l,a;r===void 0&&(r={padding:Nr,includeHiddenNodes:!1,duration:0});var u,c;const d=[];for(const A of e.nodes)A.dimensions.width&&A.dimensions.height&&(r?.includeHiddenNodes||!A.hidden)&&(!((u=r.nodes)!=null&&u.length)||(c=r.nodes)!=null&&c.length&&r.nodes.includes(A.id))&&d.push(A);if(!d.length)return Promise.resolve(!1);const f=_l(d),p=Md(f,e.dimensions.width,e.dimensions.height,(s=r.minZoom)!=null?s:e.minZoom,(l=r.maxZoom)!=null?l:e.maxZoom,(a=r.padding)!=null?a:Nr),x=p.x,b=p.y,_=p.zoom;return n(x,b,_,r)},setCenter:(i,r,s)=>{const l=typeof s?.zoom<"u"?s.zoom:e.maxZoom,a=e.dimensions.width/2-i*l,u=e.dimensions.height/2-r*l;return n(a,u,l,s)},fitBounds:function(r,s){var l;s===void 0&&(s={padding:Nr});const a=Md(r,e.dimensions.width,e.dimensions.height,e.minZoom,e.maxZoom,(l=s.padding)!=null?l:Nr),u=a.x,c=a.y,d=a.zoom;return n(u,c,d,s)},project:i=>ri(i,e.viewport,e.snapToGrid,e.snapGrid),screenToFlowCoordinate:i=>{if(e.vueFlowRef){const r=e.vueFlowRef.getBoundingClientRect(),s=r.x,l=r.y,a={x:i.x-s,y:i.y-l};return ri(a,e.viewport,e.snapToGrid,e.snapGrid)}return{x:0,y:0}},flowToScreenCoordinate:i=>{if(e.vueFlowRef){const r=e.vueFlowRef.getBoundingClientRect(),s=r.x,l=r.y,a={x:i.x+s,y:i.y+l};return ii(a,e.viewport)}return{x:0,y:0}}}:d1)}function Ml(e,t,n,o){t===void 0&&(t=0),n===void 0&&(n=c1),o===void 0&&(o=()=>{});const i=typeof t=="number"&&t>0;return i||o(),i?e.transition().duration(t).ease(n).on("end",o):e}function h1(e,t,n){const o=ss(!0);return o.run(()=>{const i=()=>{o.run(()=>{let b,_,A=!!(n.nodes.value.length||n.edges.value.length);b=so([e.modelValue,()=>{var P,I;return(I=(P=e.modelValue)==null?void 0:P.value)==null?void 0:I.length}],P=>{let I=P[0];I&&Array.isArray(I)&&(_?.pause(),n.setElements(I),!_&&!A&&I.length?A=!0:_?.resume())}),_=so([n.nodes,n.edges,()=>n.edges.value.length,()=>n.nodes.value.length],P=>{let I=P[0],m=P[1];var F;(F=e.modelValue)!=null&&F.value&&Array.isArray(e.modelValue.value)&&(b?.pause(),e.modelValue.value=[...I,...m],$t(()=>{b?.resume()}))},{immediate:A}),xi(()=>{b?.stop(),_?.stop()})})},r=()=>{o.run(()=>{let b,_,A=!!n.nodes.value.length;b=so([e.nodes,()=>{var P,I;return(I=(P=e.nodes)==null?void 0:P.value)==null?void 0:I.length}],P=>{let I=P[0];I&&Array.isArray(I)&&(_?.pause(),n.setNodes(I),!_&&!A&&I.length?A=!0:_?.resume())}),_=so([n.nodes,()=>n.nodes.value.length],P=>{let I=P[0];var m;(m=e.nodes)!=null&&m.value&&Array.isArray(e.nodes.value)&&(b?.pause(),e.nodes.value=[...I],$t(()=>{b?.resume()}))},{immediate:A}),xi(()=>{b?.stop(),_?.stop()})})},s=()=>{o.run(()=>{let b,_,A=!!n.edges.value.length;b=so([e.edges,()=>{var P,I;return(I=(P=e.edges)==null?void 0:P.value)==null?void 0:I.length}],P=>{let I=P[0];I&&Array.isArray(I)&&(_?.pause(),n.setEdges(I),!_&&!A&&I.length?A=!0:_?.resume())}),_=so([n.edges,()=>n.edges.value.length],P=>{let I=P[0];var m;(m=e.edges)!=null&&m.value&&Array.isArray(e.edges.value)&&(b?.pause(),e.edges.value=[...I],$t(()=>{b?.resume()}))},{immediate:A}),xi(()=>{b?.stop(),_?.stop()})})},l=()=>{o.run(()=>{Ae(()=>t.maxZoom,()=>{t.maxZoom&&Ye(t.maxZoom)&&n.setMaxZoom(t.maxZoom)},{immediate:!0})})},a=()=>{o.run(()=>{Ae(()=>t.minZoom,()=>{t.minZoom&&Ye(t.minZoom)&&n.setMinZoom(t.minZoom)},{immediate:!0})})},u=()=>{o.run(()=>{Ae(()=>t.translateExtent,()=>{t.translateExtent&&Ye(t.translateExtent)&&n.setTranslateExtent(t.translateExtent)},{immediate:!0})})},c=()=>{o.run(()=>{Ae(()=>t.nodeExtent,()=>{t.nodeExtent&&Ye(t.nodeExtent)&&n.setNodeExtent(t.nodeExtent)},{immediate:!0})})},d=()=>{o.run(()=>{Ae(()=>t.applyDefault,()=>{Ye(t.applyDefault)&&(n.applyDefault.value=t.applyDefault)},{immediate:!0})})},f=()=>{o.run(()=>{const b=async _=>{let A=_;typeof t.autoConnect=="function"&&(A=await t.autoConnect(_)),A!==!1&&n.addEdges([A])};Ae(()=>t.autoConnect,()=>{Ye(t.autoConnect)&&(n.autoConnect.value=t.autoConnect)},{immediate:!0}),Ae(n.autoConnect,(_,A,P)=>{_?n.onConnect(b):n.hooks.value.connect.off(b),P(()=>{n.hooks.value.connect.off(b)})},{immediate:!0})})},p=()=>{const b=["id","modelValue","translateExtent","nodeExtent","edges","nodes","maxZoom","minZoom","applyDefault","autoConnect"];for(const _ of Object.keys(t)){const A=_;if(!b.includes(A)){const P=De(()=>t[A]),I=n[A];Ve(I)&&o.run(()=>{Ae(P,m=>{Ye(m)&&(I.value=m)},{immediate:!0})})}}};i(),r(),s(),a(),l(),u(),c(),d(),f(),p()}),()=>o.stop()}function g1(){return{edgesChange:ae(),nodesChange:ae(),nodeDoubleClick:ae(),nodeClick:ae(),nodeMouseEnter:ae(),nodeMouseMove:ae(),nodeMouseLeave:ae(),nodeContextMenu:ae(),nodeDragStart:ae(),nodeDrag:ae(),nodeDragStop:ae(),nodesInitialized:ae(),miniMapNodeClick:ae(),miniMapNodeDoubleClick:ae(),miniMapNodeMouseEnter:ae(),miniMapNodeMouseMove:ae(),miniMapNodeMouseLeave:ae(),connect:ae(),connectStart:ae(),connectEnd:ae(),clickConnectStart:ae(),clickConnectEnd:ae(),paneReady:ae(),init:ae(),move:ae(),moveStart:ae(),moveEnd:ae(),selectionDragStart:ae(),selectionDrag:ae(),selectionDragStop:ae(),selectionContextMenu:ae(),selectionStart:ae(),selectionEnd:ae(),viewportChangeStart:ae(),viewportChange:ae(),viewportChangeEnd:ae(),paneScroll:ae(),paneClick:ae(),paneContextMenu:ae(),paneMouseEnter:ae(),paneMouseMove:ae(),paneMouseLeave:ae(),edgeContextMenu:ae(),edgeMouseEnter:ae(),edgeMouseMove:ae(),edgeMouseLeave:ae(),edgeDoubleClick:ae(),edgeClick:ae(),edgeUpdateStart:ae(),edgeUpdate:ae(),edgeUpdateEnd:ae(),updateNodeInternals:ae(),error:ae(e=>ai(e.message))}}function p1(e,t){const n=mn();lu(()=>{for(const i of Object.entries(t.value)){const r=i[0],s=i[1],l=a=>{e(r,a)};s.setEmitter(l),Vo(s.removeEmitter),s.setHasEmitListeners(()=>o(r)),Vo(s.removeHasEmitListeners)}});function o(i){var r;const s=v1(i);return!!((r=n?.vnode.props)==null?void 0:r[s])}}function v1(e){const t=e.split(":"),n=t[0],o=Av(t).slice(1);return"on"+n.replace(/(?:^|-)(\w)/g,(r,s)=>s.toUpperCase())+(o.length?":"+o.join(":"):"")}function rf(){return{vueFlowRef:null,viewportRef:null,nodes:[],edges:[],connectionLookup: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:vl.Full,paneDragging:!1,preventScrolling:!0,zoomOnScroll:!0,zoomOnPinch:!0,zoomOnDoubleClick:!0,panOnScroll:!1,panOnScrollSpeed:.5,panOnScrollMode:ti.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:Fn.Bezier,style:{}},connectionMode:yn.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:li()?"Meta":"Control",zoomActivationKeyCode:li()?"Meta":"Control",deleteKeyCode:"Backspace",panActivationKeyCode:"Space",hooks:g1(),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 m1=["id","vueFlowRef","viewportRef","initialized","modelValue","nodes","edges","maxZoom","minZoom","translateExtent","hooks","defaultEdgeOptions"];function y1(e,t,n){const o=f1(e),i=h=>{const v=h??[];e.hooks.updateNodeInternals.trigger(v)},r=h=>R_(h,e.nodes,e.edges),s=h=>P_(h,e.nodes,e.edges),l=h=>Wn(h,e.edges),a=h=>{var v;let E=h.id,S=h.type,C=h.nodeId;var w;const M=E?"-"+S+"-"+E:"-"+S;return Array.from((v=(w=e.connectionLookup.get(""+C+M))==null?void 0:w.values())!=null?v:[])},u=h=>{if(h)return t.value.get(h)},c=h=>{if(h)return n.value.get(h)},d=(h,v,E)=>{var S,C;const w=[];for(const T of h){const B={id:T.id,type:"position",dragging:E,from:T.from};if(v&&(B.position=T.position,T.parentNode)){var M,k;const V=u(T.parentNode);B.position={x:B.position.x-((M=(S=V?.computedPosition)==null?void 0:S.x)!=null?M:0),y:B.position.y-((k=(C=V?.computedPosition)==null?void 0:C.y)!=null?k:0)}}w.push(B)}w?.length&&e.hooks.nodesChange.trigger(w)},f=h=>{if(!e.vueFlowRef)return;const v=e.vueFlowRef.querySelector(".vue-flow__transformationpane");if(!v)return;const E=window.getComputedStyle(v),S=new window.DOMMatrixReadOnly(E.transform),C=S.m22,w=[];for(const M of h){const k=M,T=u(k.id);if(T){const B=Sr(k.nodeElement);if(!!(B.width&&B.height&&(T.dimensions.width!==B.width||T.dimensions.height!==B.height||k.forceUpdate))){const X=k.nodeElement.getBoundingClientRect();T.dimensions=B,T.handleBounds.source=Ud("source",k.nodeElement,X,C,T.id),T.handleBounds.target=Ud("target",k.nodeElement,X,C,T.id),w.push({id:T.id,type:"dimensions",dimensions:B})}}}!e.fitViewOnInitDone&&e.fitViewOnInit&&o.value.fitView().then(()=>{e.fitViewOnInitDone=!0}),w.length&&e.hooks.nodesChange.trigger(w)},p=(h,v)=>{const E=new Set,S=new Set;for(const M of h)Hn(M)?E.add(M.id):_n(M)&&S.add(M.id);const C=bn(t.value,E,!0),w=bn(n.value,S);if(e.multiSelectionActive){for(const M of E)C.push(wn(M,v));for(const M of S)w.push(wn(M,v))}C.length&&e.hooks.nodesChange.trigger(C),w.length&&e.hooks.edgesChange.trigger(w)},x=h=>{if(e.multiSelectionActive){const v=h.map(E=>wn(E.id,!0));e.hooks.nodesChange.trigger(v);return}e.hooks.nodesChange.trigger(bn(t.value,new Set(h.map(v=>v.id)),!0)),e.hooks.edgesChange.trigger(bn(n.value))},b=h=>{if(e.multiSelectionActive){const v=h.map(E=>wn(E.id,!0));e.hooks.edgesChange.trigger(v);return}e.hooks.edgesChange.trigger(bn(n.value,new Set(h.map(v=>v.id)))),e.hooks.nodesChange.trigger(bn(t.value,new Set,!0))},_=h=>{p(h,!0)},A=h=>{const E=(h||e.nodes).map(S=>(S.selected=!1,wn(S.id,!1)));e.hooks.nodesChange.trigger(E)},P=h=>{const E=(h||e.edges).map(S=>(S.selected=!1,wn(S.id,!1)));e.hooks.edgesChange.trigger(E)},I=h=>{if(!h||!h.length)return p([],!1);const v=h.reduce((E,S)=>{const C=wn(S.id,!1);return Hn(S)?E.nodes.push(C):E.edges.push(C),E},{nodes:[],edges:[]});v.nodes.length&&e.hooks.nodesChange.trigger(v.nodes),v.edges.length&&e.hooks.edgesChange.trigger(v.edges)},m=h=>{var v;(v=e.d3Zoom)==null||v.scaleExtent([h,e.maxZoom]),e.minZoom=h},F=h=>{var v;(v=e.d3Zoom)==null||v.scaleExtent([e.minZoom,h]),e.maxZoom=h},z=h=>{var v;(v=e.d3Zoom)==null||v.translateExtent(h),e.translateExtent=h},q=h=>{e.nodeExtent=h,i()},G=h=>{var v;(v=e.d3Zoom)==null||v.clickDistance(h)},K=h=>{e.nodesDraggable=h,e.nodesConnectable=h,e.elementsSelectable=h},Q=h=>{const v=h instanceof Function?h(e.nodes):h;!e.initialized&&!v.length||(e.nodes=Xd(v,u,e.hooks.error.trigger))},re=h=>{const v=h instanceof Function?h(e.edges):h;if(!e.initialized&&!v.length)return;const E=Tl(v,e.isValidConnection,u,c,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges);Nl(e.connectionLookup,n.value,E),e.edges=E},ee=h=>{const v=h instanceof Function?h([...e.nodes,...e.edges]):h;!e.initialized&&!v.length||(Q(v.filter(Hn)),re(v.filter(_n)))},oe=h=>{let v=h instanceof Function?h(e.nodes):h;v=Array.isArray(v)?v:[v];const E=Xd(v,u,e.hooks.error.trigger),S=[];for(const C of E)S.push(kd(C));S.length&&e.hooks.nodesChange.trigger(S)},g=h=>{let v=h instanceof Function?h(e.edges):h;v=Array.isArray(v)?v:[v];const E=Tl(v,e.isValidConnection,u,c,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges),S=[];for(const C of E)S.push(kd(C));S.length&&e.hooks.edgesChange.trigger(S)},O=function(v,E,S){E===void 0&&(E=!0),S===void 0&&(S=!1);const C=v instanceof Function?v(e.nodes):v,w=Array.isArray(C)?C:[C],M=[],k=[];function T(V){const X=l(V);for(const J of X)(!Ye(J.deletable)||J.deletable)&&k.push(Fd(J.id,J.source,J.target,J.sourceHandle,J.targetHandle))}function B(V){const X=[];for(const J of e.nodes)J.parentNode===V&&X.push(J);if(X.length){for(const J of X)M.push($d(J.id));E&&T(X);for(const J of X)B(J.id)}}for(const V of w){const X=typeof V=="string"?u(V):V;X&&(Ye(X.deletable)&&!X.deletable||(M.push($d(X.id)),E&&T([X]),S&&B(X.id)))}k.length&&e.hooks.edgesChange.trigger(k),M.length&&e.hooks.nodesChange.trigger(M)},R=h=>{const v=h instanceof Function?h(e.edges):h,E=Array.isArray(v)?v:[v],S=[];for(const C of E){const w=typeof C=="string"?c(C):C;w&&(Ye(w.deletable)&&!w.deletable||S.push(Fd(typeof C=="string"?C:C.id,w.source,w.target,w.sourceHandle,w.targetHandle)))}e.hooks.edgesChange.trigger(S)},$=function(v,E,S){S===void 0&&(S=!0);const C=c(v.id);if(!C)return!1;const w=e.edges.indexOf(C),M=t1(v,E,C,S,e.hooks.error.trigger);if(M){const k=Tl([M],e.isValidConnection,u,c,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges),T=k[0];return e.edges=e.edges.map((B,V)=>V===w?T:B),Nl(e.connectionLookup,n.value,[T]),T}return!1},N=function(v,E,S){S===void 0&&(S={replace:!1});const C=c(v);if(!C)return;const w=typeof E=="function"?E(C):E;C.data=S.replace?w:ie({},C.data,w)},L=h=>Dd(h,e.nodes),H=h=>{const v=Dd(h,e.edges);return Nl(e.connectionLookup,n.value,v),v},W=function(v,E,S){S===void 0&&(S={replace:!1});const C=u(v);if(!C)return;const w=typeof E=="function"?E(C):E;S.replace?e.nodes.splice(e.nodes.indexOf(C),1,w):Object.assign(C,w)},D=function(v,E,S){S===void 0&&(S={replace:!1});const C=u(v);if(!C)return;const w=typeof E=="function"?E(C):E;C.data=S.replace?w:ie({},C.data,w)},Z=function(v,E,S){S===void 0&&(S=!1),S?e.connectionClickStartHandle=v:e.connectionStartHandle=v,e.connectionEndHandle=null,e.connectionStatus=null,E&&(e.connectionPosition=E)},le=function(v,E,S){E===void 0&&(E=null),S===void 0&&(S=null),e.connectionStartHandle&&(e.connectionPosition=v,e.connectionEndHandle=E,e.connectionStatus=S)},ce=(h,v)=>{e.connectionPosition={x:Number.NaN,y:Number.NaN},e.connectionEndHandle=null,e.connectionStatus=null,v?e.connectionClickStartHandle=null:e.connectionStartHandle=null},Y=h=>{const v=M_(h),E=v?null:oi(h)?h:u(h.id);return!v&&!E?[null,null,v]:[v?h:wr(E),E,v]},j=function(v,E,S){E===void 0&&(E=!0),S===void 0&&(S=e.nodes);const C=Y(v),w=C[0],M=C[1],k=C[2];if(!w)return[];const T=[];for(const B of S||e.nodes){if(!k&&(B.id===M.id||!B.computedPosition))continue;const V=wr(B),X=br(V,w);(E&&X>0||X>=V.width*V.height||X>=Number(w.width)*Number(w.height))&&T.push(B)}return T},ne=function(v,E,S){S===void 0&&(S=!0);const C=Y(v),w=C[0];if(!w)return!1;const M=br(w,E);return S&&M>0||M>=Number(w.width)*Number(w.height)},pe=h=>{const v=e.viewport,E=e.dimensions,S=e.d3Zoom,C=e.d3Selection,w=e.translateExtent;if(!S||!C||!h.x&&!h.y)return!1;const M=fo.translate(v.x+h.x,v.y+h.y).scale(v.zoom),k=[[0,0],[E.width,E.height]],T=S.constrain()(M,k,w),B=e.viewport.x!==T.x||e.viewport.y!==T.y||e.viewport.zoom!==T.k;return S.transform(C,T),B},me=h=>{const v=h instanceof Function?h(e):h,E=["d3Zoom","d3Selection","d3ZoomHandler","viewportRef","vueFlowRef","dimensions","hooks"];Ye(v.defaultEdgeOptions)&&(e.defaultEdgeOptions=v.defaultEdgeOptions);const S=v.modelValue||v.nodes||v.edges?[]:void 0;S&&(v.modelValue&&S.push(...v.modelValue),v.nodes&&S.push(...v.nodes),v.edges&&S.push(...v.edges),ee(S));const C=()=>{Ye(v.maxZoom)&&F(v.maxZoom),Ye(v.minZoom)&&m(v.minZoom),Ye(v.translateExtent)&&z(v.translateExtent)};for(const w of Object.keys(v)){const M=w,k=v[M];![...m1,...E].includes(M)&&Ye(k)&&(e[M]=k)}qs(()=>e.d3Zoom).not.toBeNull().then(C),e.initialized||(e.initialized=!0)};return{updateNodePositions:d,updateNodeDimensions:f,setElements:ee,setNodes:Q,setEdges:re,addNodes:oe,addEdges:g,removeNodes:O,removeEdges:R,findNode:u,findEdge:c,updateEdge:$,updateEdgeData:N,updateNode:W,updateNodeData:D,applyEdgeChanges:H,applyNodeChanges:L,addSelectedElements:_,addSelectedNodes:x,addSelectedEdges:b,setMinZoom:m,setMaxZoom:F,setTranslateExtent:z,setNodeExtent:q,setPaneClickDistance:G,removeSelectedElements:I,removeSelectedNodes:A,removeSelectedEdges:P,startConnection:Z,updateConnection:le,endConnection:ce,setInteractive:K,setState:me,getIntersectingNodes:j,getIncomers:r,getOutgoers:s,getConnectedEdges:l,getHandleConnections:a,isNodeIntersecting:ne,panBy:pe,fitView:h=>o.value.fitView(h),zoomIn:h=>o.value.zoomIn(h),zoomOut:h=>o.value.zoomOut(h),zoomTo:(h,v)=>o.value.zoomTo(h,v),setViewport:(h,v)=>o.value.setViewport(h,v),setTransform:(h,v)=>o.value.setTransform(h,v),getViewport:()=>o.value.getViewport(),getTransform:()=>o.value.getTransform(),setCenter:(h,v,E)=>o.value.setCenter(h,v,E),fitBounds:(h,v)=>o.value.fitBounds(h,v),project:h=>o.value.project(h),screenToFlowCoordinate:h=>o.value.screenToFlowCoordinate(h),flowToScreenCoordinate:h=>o.value.flowToScreenCoordinate(h),toObject:()=>{const h=[],v=[];for(const E of e.nodes){E.computedPosition,E.handleBounds,E.selected,E.dimensions,E.isParent,E.resizing,E.dragging,E.events;const S=Bo(E,Tv);h.push(S)}for(const E of e.edges){E.selected,E.sourceNode,E.targetNode,E.events;const S=Bo(E,Mv);v.push(S)}return JSON.parse(JSON.stringify({nodes:h,edges:v,position:[e.viewport.x,e.viewport.y],zoom:e.viewport.zoom,viewport:e.viewport}))},fromObject:h=>new Promise(v=>{const E=h.nodes,S=h.edges,C=h.position,w=h.zoom,M=h.viewport;E&&Q(E),S&&re(S);const k=M?.x&&M?.y?[M.x,M.y]:C??[null,null],T=k[0],B=k[1];if(T&&B){const V=M?.zoom||w||e.viewport.zoom;return qs(()=>o.value.viewportInitialized).toBe(!0).then(()=>{o.value.setViewport({x:T,y:B,zoom:V}).then(()=>{v(!0)})})}else v(!0)}),updateNodeInternals:i,viewportHelper:o,$reset:()=>{const h=rf();if(e.edges=[],e.nodes=[],e.d3Zoom&&e.d3Selection){var v,E,S;const C=fo.translate((v=h.defaultViewport.x)!=null?v:0,(E=h.defaultViewport.y)!=null?E:0).scale(Ln((S=h.defaultViewport.zoom)!=null?S:1,h.minZoom,h.maxZoom)),w=e.viewportRef.getBoundingClientRect(),M=[[0,0],[w.width,w.height]],k=e.d3Zoom.constrain()(C,M,h.translateExtent);e.d3Zoom.transform(e.d3Selection,k)}me(h)},$destroy:()=>{}}}const _1=["data-id","data-handleid","data-nodeid","data-handlepos"],w1={name:"Handle",compatConfig:{MODE:3}},ui=$e(ie({},w1,{props:{id:{default:null},type:{},position:{default:()=>he.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,t){let n=t.expose;const o=Ag(e,["position","connectable","connectableStart","connectableEnd","id"]),i=De(()=>{var O;return(O=o.type)!=null?O:"source"}),r=De(()=>{var O;return(O=o.isValidConnection)!=null?O:null}),s=ke(),l=s.id,a=s.connectionStartHandle,u=s.connectionClickStartHandle,c=s.connectionEndHandle,d=s.vueFlowRef,f=s.nodesConnectable,p=s.noDragClassName,x=s.noPanClassName,b=nf(),_=b.id,A=b.node,P=b.nodeEl,I=b.connectedEdges,m=Ce(),F=De(()=>typeof e.connectableStart<"u"?e.connectableStart:!0),z=De(()=>typeof e.connectableEnd<"u"?e.connectableEnd:!0),q=De(()=>{var O,R,$,N,L,H;return((O=a.value)==null?void 0:O.nodeId)===_&&((R=a.value)==null?void 0:R.id)===e.id&&(($=a.value)==null?void 0:$.type)===i.value||((N=c.value)==null?void 0:N.nodeId)===_&&((L=c.value)==null?void 0:L.id)===e.id&&((H=c.value)==null?void 0:H.type)===i.value}),G=De(()=>{var O,R,$;return((O=u.value)==null?void 0:O.nodeId)===_&&((R=u.value)==null?void 0:R.id)===e.id&&(($=u.value)==null?void 0:$.type)===i.value}),K=tf({nodeId:_,handleId:e.id,isValidConnection:r,type:i}),Q=K.handlePointerDown,re=K.handleClick,ee=fe(()=>typeof e.connectable=="string"&&e.connectable==="single"?!I.value.some(O=>{const R=O[i.value+"Handle"];return O[i.value]!==_?!1:R?R===e.id:!0}):typeof e.connectable=="number"?I.value.filter(O=>{const R=O[i.value+"Handle"];return O[i.value]!==_?!1:R?R===e.id:!0}).length<e.connectable:typeof e.connectable=="function"?e.connectable(A,I.value):Ye(e.connectable)?e.connectable:f.value);St(()=>{var O,R;if(!A.dimensions.width||!A.dimensions.height)return;const $=(R=A.handleBounds[i.value])==null?void 0:R.find(ce=>ce.id===e.id);if(!d.value||$)return;const N=d.value.querySelector(".vue-flow__transformationpane");if(!P.value||!m.value||!N||!e.id)return;const L=P.value.getBoundingClientRect(),H=m.value.getBoundingClientRect(),W=window.getComputedStyle(N),D=new window.DOMMatrixReadOnly(W.transform),Z=D.m22,le=ie({id:e.id,position:e.position,x:(H.left-L.left)/Z,y:(H.top-L.top)/Z,type:i.value,nodeId:_},Sr(m.value));A.handleBounds[i.value]=[...(O=A.handleBounds[i.value])!=null?O:[],le]});function oe(O){const R=xl(O);ee.value&&F.value&&(R&&O.button===0||!R)&&Q(O)}function g(O){!_||!u.value&&!F.value||ee.value&&re(O)}return n({handleClick:re,handlePointerDown:Q,onClick:g,onPointerDown:oe}),(O,R)=>(se(),ge("div",{ref_key:"handle",ref:m,"data-id":de(l)+"-"+de(_)+"-"+e.id+"-"+i.value,"data-handleid":e.id,"data-nodeid":de(_),"data-handlepos":O.position,class:Be(["vue-flow__handle",["vue-flow__handle-"+O.position,"vue-flow__handle-"+e.id,de(p),de(x),i.value,{connectable:ee.value,connecting:G.value,connectablestart:F.value,connectableend:z.value,connectionindicator:ee.value&&(F.value&&!q.value||z.value&&q.value)}]]),onMousedown:oe,onTouchstartPassive:oe,onClick:g},[mt(O.$slots,"default",{id:O.id})],42,_1))}})),Tr=function(t){var n;let o=t.sourcePosition,i=o===void 0?he.Bottom:o,r=t.targetPosition,s=r===void 0?he.Top:r,l=t.label,a=t.connectable,u=a===void 0?!0:a,c=t.isValidTargetPos,d=t.isValidSourcePos;const p=(n=t.data.label)!=null?n:l;return[Ie(ui,{type:"target",position:s,connectable:u,isValidConnection:c}),typeof p!="string"&&p?Ie(p):Ie(He,[p]),Ie(ui,{type:"source",position:i,connectable:u,isValidConnection:d})]};Tr.props=["sourcePosition","targetPosition","label","isValidTargetPos","isValidSourcePos","connectable","data"],Tr.inheritAttrs=!1,Tr.compatConfig={MODE:3};const b1=Tr,Mr=function(t){var n;let o=t.targetPosition,i=o===void 0?he.Top:o,r=t.label,s=t.connectable,l=s===void 0?!0:s,a=t.isValidTargetPos;const c=(n=t.data.label)!=null?n:r;return[Ie(ui,{type:"target",position:i,connectable:l,isValidConnection:a}),typeof c!="string"&&c?Ie(c):Ie(He,[c])]};Mr.props=["targetPosition","label","isValidTargetPos","connectable","data"],Mr.inheritAttrs=!1,Mr.compatConfig={MODE:3};const S1=Mr,Ir=function(t){var n;let o=t.sourcePosition,i=o===void 0?he.Bottom:o,r=t.label,s=t.connectable,l=s===void 0?!0:s,a=t.isValidSourcePos;const c=(n=t.data.label)!=null?n:r;return[typeof c!="string"&&c?Ie(c):Ie(He,[c]),Ie(ui,{type:"source",position:i,connectable:l,isValidConnection:a})]};Ir.props=["sourcePosition","label","isValidSourcePos","connectable","data"],Ir.inheritAttrs=!1,Ir.compatConfig={MODE:3};const E1=Ir,x1=["transform"],A1=["width","height","x","y","rx","ry"],O1=["y"],C1={name:"EdgeText",compatConfig:{MODE:3}},N1=$e(ie({},C1,{props:{x:{},y:{},label:{},labelStyle:{default:()=>({})},labelShowBg:{type:Boolean,default:!0},labelBgStyle:{default:()=>({})},labelBgPadding:{default:()=>[2,4]},labelBgBorderRadius:{default:2}},setup(e){const t=Ce({x:0,y:0,width:0,height:0}),n=Ce(null),o=fe(()=>"translate("+(e.x-t.value.width/2)+" "+(e.y-t.value.height/2)+")");St(i),Ae([()=>e.x,()=>e.y,n,()=>e.label],i);function i(){if(!n.value)return;const r=n.value.getBBox();(r.width!==t.value.width||r.height!==t.value.height)&&(t.value=r)}return(r,s)=>(se(),ge("g",{transform:o.value,class:"vue-flow__edge-textwrapper"},[r.labelShowBg?(se(),ge("rect",{key:0,class:"vue-flow__edge-textbg",width:t.value.width+2*r.labelBgPadding[0]+"px",height:t.value.height+2*r.labelBgPadding[1]+"px",x:-r.labelBgPadding[0],y:-r.labelBgPadding[1],style:Xe(r.labelBgStyle),rx:r.labelBgBorderRadius,ry:r.labelBgBorderRadius},null,12,A1)):Ee("",!0),te("text",Ho(r.$attrs,{ref_key:"el",ref:n,class:"vue-flow__edge-text",y:t.value.height/2,dy:"0.3em",style:r.labelStyle}),[mt(r.$slots,"default",{},()=>[typeof r.label!="string"?(se(),qe(cu(r.label),{key:0})):(se(),ge(He,{key:1},[Lt(ve(r.label),1)],64))])],16,O1)],8,x1))}})),T1=["id","d","marker-end","marker-start"],M1=["d","stroke-width"],I1={name:"BaseEdge",inheritAttrs:!1,compatConfig:{MODE:3}},Pr=$e(ie({},I1,{props:{id:{},labelX:{},labelY:{},path:{},label:{},markerStart:{},markerEnd:{},interactionWidth:{default:20},labelStyle:{},labelShowBg:{type:Boolean},labelBgStyle:{},labelBgPadding:{},labelBgBorderRadius:{}},setup(e,t){let n=t.expose;const o=Ce(null),i=Ce(null),r=Ce(null),s=Os();return n({pathEl:o,interactionEl:i,labelEl:r}),(l,a)=>(se(),ge(He,null,[te("path",Ho(de(s),{id:l.id,ref_key:"pathEl",ref:o,d:l.path,class:"vue-flow__edge-path","marker-end":l.markerEnd,"marker-start":l.markerStart}),null,16,T1),l.interactionWidth?(se(),ge("path",{key:0,ref_key:"interactionEl",ref:i,fill:"none",d:l.path,"stroke-width":l.interactionWidth,"stroke-opacity":0,class:"vue-flow__edge-interaction"},null,8,M1)):Ee("",!0),l.label&&l.labelX&&l.labelY?(se(),qe(N1,{key:1,ref_key:"labelEl",ref:r,x:l.labelX,y:l.labelY,label:l.label,"label-show-bg":l.labelShowBg,"label-bg-style":l.labelBgStyle,"label-bg-padding":l.labelBgPadding,"label-bg-border-radius":l.labelBgBorderRadius,"label-style":l.labelStyle},null,8,["x","y","label","label-show-bg","label-bg-style","label-bg-padding","label-bg-border-radius","label-style"])):Ee("",!0)],64))}}));function sf(e){let t=e.sourceX,n=e.sourceY,o=e.targetX,i=e.targetY;const r=Math.abs(o-t)/2,s=o<t?o+r:o-r,l=Math.abs(i-n)/2,a=i<n?i+l:i-l;return[s,a,r,l]}function lf(e){let t=e.sourceX,n=e.sourceY,o=e.targetX,i=e.targetY,r=e.sourceControlX,s=e.sourceControlY,l=e.targetControlX,a=e.targetControlY;const u=t*.125+r*.375+l*.375+o*.125,c=n*.125+s*.375+a*.375+i*.125,d=Math.abs(u-t),f=Math.abs(c-n);return[u,c,d,f]}function Rr(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function af(e){let t=e.pos,n=e.x1,o=e.y1,i=e.x2,r=e.y2,s=e.c,l,a;switch(t){case he.Left:l=n-Rr(n-i,s),a=o;break;case he.Right:l=n+Rr(i-n,s),a=o;break;case he.Top:l=n,a=o-Rr(o-r,s);break;case he.Bottom:l=n,a=o+Rr(r-o,s);break}return[l,a]}function uf(e){const t=e.sourceX,n=e.sourceY,o=e.sourcePosition,i=o===void 0?he.Bottom:o,r=e.targetX,s=e.targetY,l=e.targetPosition,a=l===void 0?he.Top:l,u=e.curvature,c=u===void 0?.25:u,d=af({pos:i,x1:t,y1:n,x2:r,y2:s,c}),f=d[0],p=d[1],x=af({pos:a,x1:r,y1:s,x2:t,y2:n,c}),b=x[0],_=x[1],A=lf({sourceX:t,sourceY:n,targetX:r,targetY:s,sourceControlX:f,sourceControlY:p,targetControlX:b,targetControlY:_}),P=A[0],I=A[1],m=A[2],F=A[3];return["M"+t+","+n+" C"+f+","+p+" "+b+","+_+" "+r+","+s,P,I,m,F]}function cf(e){let t=e.pos,n=e.x1,o=e.y1,i=e.x2,r=e.y2,s,l;switch(t){case he.Left:case he.Right:s=.5*(n+i),l=o;break;case he.Top:case he.Bottom:s=n,l=.5*(o+r);break}return[s,l]}function df(e){const t=e.sourceX,n=e.sourceY,o=e.sourcePosition,i=o===void 0?he.Bottom:o,r=e.targetX,s=e.targetY,l=e.targetPosition,a=l===void 0?he.Top:l,u=cf({pos:i,x1:t,y1:n,x2:r,y2:s}),c=u[0],d=u[1],f=cf({pos:a,x1:r,y1:s,x2:t,y2:n}),p=f[0],x=f[1],b=lf({sourceX:t,sourceY:n,targetX:r,targetY:s,sourceControlX:c,sourceControlY:d,targetControlX:p,targetControlY:x}),_=b[0],A=b[1],P=b[2],I=b[3];return["M"+t+","+n+" C"+c+","+d+" "+p+","+x+" "+r+","+s,_,A,P,I]}const ff={[he.Left]:{x:-1,y:0},[he.Right]:{x:1,y:0},[he.Top]:{x:0,y:-1},[he.Bottom]:{x:0,y:1}};function P1(e){let t=e.source,n=e.sourcePosition,o=n===void 0?he.Bottom:n,i=e.target;return o===he.Left||o===he.Right?t.x<i.x?{x:1,y:0}:{x:-1,y:0}:t.y<i.y?{x:0,y:1}:{x:0,y:-1}}function hf(e,t){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)}function R1(e){let t=e.source,n=e.sourcePosition,o=n===void 0?he.Bottom:n,i=e.target,r=e.targetPosition,s=r===void 0?he.Top:r,l=e.center,a=e.offset;const u=ff[o],c=ff[s],d={x:t.x+u.x*a,y:t.y+u.y*a},f={x:i.x+c.x*a,y:i.y+c.y*a},p=P1({source:d,sourcePosition:o,target:f}),x=p.x!==0?"x":"y",b=p[x];let _,A,P;const I={x:0,y:0},m={x:0,y:0},F=sf({sourceX:t.x,sourceY:t.y,targetX:i.x,targetY:i.y}),z=F[0],q=F[1],G=F[2],K=F[3];if(u[x]*c[x]===-1){var Q,re;A=(Q=l.x)!=null?Q:z,P=(re=l.y)!=null?re:q;const oe=[{x:A,y:d.y},{x:A,y:f.y}],g=[{x:d.x,y:P},{x:f.x,y:P}];u[x]===b?_=x==="x"?oe:g:_=x==="x"?g:oe}else{const oe=[{x:d.x,y:f.y}],g=[{x:f.x,y:d.y}];if(x==="x"?_=u.x===b?g:oe:_=u.y===b?oe:g,o===s){const L=Math.abs(t[x]-i[x]);if(L<=a){const H=Math.min(a-1,a-L);u[x]===b?I[x]=(d[x]>t[x]?-1:1)*H:m[x]=(f[x]>i[x]?-1:1)*H}}if(o!==s){const L=x==="x"?"y":"x",H=u[x]===c[L],W=d[L]>f[L],D=d[L]<f[L];(u[x]===1&&(!H&&W||H&&D)||u[x]!==1&&(!H&&D||H&&W))&&(_=x==="x"?oe:g)}const O={x:d.x+I.x,y:d.y+I.y},R={x:f.x+m.x,y:f.y+m.y},$=Math.max(Math.abs(O.x-_[0].x),Math.abs(R.x-_[0].x)),N=Math.max(Math.abs(O.y-_[0].y),Math.abs(R.y-_[0].y));$>=N?(A=(O.x+R.x)/2,P=_[0].y):(A=_[0].x,P=(O.y+R.y)/2)}return[[t,{x:d.x+I.x,y:d.y+I.y},..._,{x:f.x+m.x,y:f.y+m.y},i],A,P,G,K]}function D1(e,t,n,o){const i=Math.min(hf(e,t)/2,hf(t,n)/2,o),r=t.x,s=t.y;if(e.x===r&&r===n.x||e.y===s&&s===n.y)return"L"+r+" "+s;if(e.y===s){const u=e.x<n.x?-1:1,c=e.y<n.y?1:-1;return"L "+(r+i*u)+","+s+"Q "+r+","+s+" "+r+","+(s+i*c)}const l=e.x<n.x?1:-1,a=e.y<n.y?-1:1;return"L "+r+","+(s+i*a)+"Q "+r+","+s+" "+(r+i*l)+","+s}function Dr(e){const t=e.sourceX,n=e.sourceY,o=e.sourcePosition,i=o===void 0?he.Bottom:o,r=e.targetX,s=e.targetY,l=e.targetPosition,a=l===void 0?he.Top:l,u=e.borderRadius,c=u===void 0?5:u,d=e.centerX,f=e.centerY,p=e.offset,b=R1({source:{x:t,y:n},sourcePosition:i,target:{x:r,y:s},targetPosition:a,center:{x:d,y:f},offset:p===void 0?20:p}),_=b[0],A=b[1],P=b[2],I=b[3],m=b[4];return[_.reduce((z,q,G)=>{let K;return G>0&&G<_.length-1?K=D1(_[G-1],q,_[G+1],c):K=(G===0?"M":"L")+q.x+" "+q.y,z+=K,z},""),A,P,I,m]}function k1(e){const t=e.sourceX,n=e.sourceY,o=e.targetX,i=e.targetY,r=sf({sourceX:t,sourceY:n,targetX:o,targetY:i}),s=r[0],l=r[1],a=r[2],u=r[3];return["M "+t+","+n+"L "+o+","+i,s,l,a,u]}const $1=$e({name:"StraightEdge",props:["label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,t){let n=t.attrs;return()=>{const o=k1(e),i=o[0],r=o[1],s=o[2];return Ie(Pr,ie({path:i,labelX:r,labelY:s},n,e))}}}),F1=$1,L1=$e({name:"SmoothStepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","borderRadius","markerEnd","markerStart","interactionWidth","offset"],compatConfig:{MODE:3},setup(e,t){let n=t.attrs;return()=>{var o,i;const r=Dr(ie({},e,{sourcePosition:(o=e.sourcePosition)!=null?o:he.Bottom,targetPosition:(i=e.targetPosition)!=null?i:he.Top})),s=r[0],l=r[1],a=r[2];return Ie(Pr,ie({path:s,labelX:l,labelY:a},n,e))}}}),gf=L1,H1=$e({name:"StepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],setup(e,t){let n=t.attrs;return()=>Ie(gf,ie({},e,n,{borderRadius:0}))}}),W1=H1,z1=$e({name:"BezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","curvature","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,t){let n=t.attrs;return()=>{var o,i;const r=uf(ie({},e,{sourcePosition:(o=e.sourcePosition)!=null?o:he.Bottom,targetPosition:(i=e.targetPosition)!=null?i:he.Top})),s=r[0],l=r[1],a=r[2];return Ie(Pr,ie({path:s,labelX:l,labelY:a},n,e))}}}),B1=z1,V1=$e({name:"SimpleBezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,t){let n=t.attrs;return()=>{var o,i;const r=df(ie({},e,{sourcePosition:(o=e.sourcePosition)!=null?o:he.Bottom,targetPosition:(i=e.targetPosition)!=null?i:he.Top})),s=r[0],l=r[1],a=r[2];return Ie(Pr,ie({path:s,labelX:l,labelY:a},n,e))}}}),G1=V1,K1={input:E1,default:b1,output:S1},Y1={default:B1,straight:F1,step:W1,smoothstep:gf,simplebezier:G1};function U1(e,t,n){const o=fe(()=>b=>t.value.get(b)),i=fe(()=>b=>n.value.get(b)),r=fe(()=>{const b=ie({},Y1,e.edgeTypes),_=Object.keys(b);for(const A of e.edges)A.type&&!_.includes(A.type)&&(b[A.type]=A.type);return b}),s=fe(()=>{const b=ie({},K1,e.nodeTypes),_=Object.keys(b);for(const A of e.nodes)A.type&&!_.includes(A.type)&&(b[A.type]=A.type);return b}),l=fe(()=>e.onlyRenderVisibleElements?Td(e.nodes,{x:0,y:0,width:e.dimensions.width,height:e.dimensions.height},e.viewport,!0):e.nodes),a=fe(()=>{if(e.onlyRenderVisibleElements){const b=[];for(const _ of e.edges){const A=t.value.get(_.source),P=t.value.get(_.target);V_({sourcePos:A.computedPosition||{x:0,y:0},targetPos:P.computedPosition||{x:0,y:0},sourceWidth:A.dimensions.width,sourceHeight:A.dimensions.height,targetWidth:P.dimensions.width,targetHeight:P.dimensions.height,width:e.dimensions.width,height:e.dimensions.height,viewport:e.viewport})&&b.push(_)}return b}return e.edges}),u=fe(()=>[...l.value,...a.value]),c=fe(()=>{const b=[];for(const _ of e.nodes)_.selected&&b.push(_);return b}),d=fe(()=>{const b=[];for(const _ of e.edges)_.selected&&b.push(_);return b}),f=fe(()=>[...c.value,...d.value]),p=fe(()=>{const b=[];for(const _ of e.nodes)_.dimensions.width&&_.dimensions.height&&_.handleBounds!==void 0&&b.push(_);return b}),x=fe(()=>l.value.length>0&&p.value.length===l.value.length);return{getNode:o,getEdge:i,getElements:u,getEdgeTypes:r,getNodeTypes:s,getEdges:a,getNodes:l,getSelectedElements:f,getSelectedNodes:c,getSelectedEdges:d,getNodesInitialized:p,areNodesInitialized:x}}class Gn{constructor(){this.currentId=0,this.flows=new Map}static getInstance(){var t,n;const o=(n=mn())==null?void 0:n.appContext.app,i=(t=o?.config.globalProperties.$vueFlowStorage)!=null?t:Gn.instance;return Gn.instance=i??new Gn,o&&(o.config.globalProperties.$vueFlowStorage=Gn.instance),Gn.instance}set(t,n){return this.flows.set(t,n)}get(t){return this.flows.get(t)}remove(t){return this.flows.delete(t)}create(t,n){const o=rf(),i=No(o),r={};for(const f of Object.entries(i.hooks)){const p=f[0],x=f[1],b="on"+(p.charAt(0).toUpperCase()+p.slice(1));r[b]=x.on}const s={};for(const f of Object.entries(i.hooks)){const p=f[0],x=f[1];s[p]=x.trigger}const l=fe(()=>{const f=new Map;for(const p of i.nodes)f.set(p.id,p);return f}),a=fe(()=>{const f=new Map;for(const p of i.edges)f.set(p.id,p);return f}),u=U1(i,l,a),c=y1(i,l,a);c.setState(ie({},i,n));const d=ie({},r,u,c,Hv(i),{nodeLookup:l,edgeLookup:a,emits:s,id:t,vueFlowVersion:"1.48.2",$destroy:()=>{this.remove(t)}});return this.set(t,d),d}getId(){return"vue-flow-"+this.currentId++}}function ke(e){const t=Gn.getInstance(),n=ls(),o=typeof e=="object",i=o?e:{id:e},r=i.id,s=r??n?.vueFlowId;let l;if(n){const a=vt(jd,null);typeof a<"u"&&a!==null&&(!s||a.id===s)&&(l=a)}if(l||s&&(l=t.get(s)),!l||s&&l.id!==s){const a=r??t.getId(),u=t.create(a,i);l=u,(n??ss(!0)).run(()=>{Ae(u.applyDefault,(d,f,p)=>{const x=_=>{u.applyNodeChanges(_)},b=_=>{u.applyEdgeChanges(_)};d?(u.onNodesChange(x),u.onEdgesChange(b)):(u.hooks.value.nodesChange.off(x),u.hooks.value.edgesChange.off(b)),p(()=>{u.hooks.value.nodesChange.off(x),u.hooks.value.edgesChange.off(b)})},{immediate:!0}),Vo(()=>{if(l){const d=t.get(l.id);d?d.$destroy():ai("No store instance found for id "+l.id+" in storage.")}})})}else o&&l.setState(i);if(n&&(vn(jd,l),n.vueFlowId=l.id),o){const a=mn();a?.type.name!=="VueFlow"&&l.emits.error(new Ze(Ke.USEVUEFLOW_OPTIONS))}return l}function X1(e){const t=ke(),n=t.emits,o=t.dimensions;let i;St(()=>{const r=()=>{var s,l,a;if(!e.value||!((s=(a=(l=e.value).checkVisibility)==null?void 0:a.call(l))==null||s))return;const u=Sr(e.value);(u.width===0||u.height===0)&&n.error(new Ze(Ke.MISSING_VIEWPORT_DIMENSIONS)),o.value={width:u.width||500,height:u.height||500}};r(),window.addEventListener("resize",r),e.value&&(i=new ResizeObserver(()=>r()),i.observe(e.value)),Es(()=>{window.removeEventListener("resize",r),i&&e.value&&i.unobserve(e.value)})})}const q1={name:"UserSelection",compatConfig:{MODE:3}},Z1=$e(ie({},q1,{props:{userSelectionRect:{}},setup(e){return(t,n)=>(se(),ge("div",{class:"vue-flow__selection vue-flow__container",style:Xe({width:t.userSelectionRect.width+"px",height:t.userSelectionRect.height+"px",transform:"translate("+t.userSelectionRect.x+"px, "+t.userSelectionRect.y+"px)"})},null,4))}})),j1=["tabIndex"],J1={name:"NodesSelection",compatConfig:{MODE:3}},Q1=$e(ie({},J1,{setup(e){const t=ke(),n=t.emits,o=t.viewport,i=t.getSelectedNodes,r=t.noPanClassName,s=t.disableKeyboardA11y,l=t.userSelectionActive,a=of(),u=Ce(null),c=ef({el:u,onStart(b){n.selectionDragStart(b),n.nodeDragStart(b)},onDrag(b){n.selectionDrag(b),n.nodeDrag(b)},onStop(b){n.selectionDragStop(b),n.nodeDragStop(b)}});St(()=>{var b;s.value||(b=u.value)==null||b.focus({preventScroll:!0})});const d=fe(()=>_l(i.value)),f=fe(()=>({width:d.value.width+"px",height:d.value.height+"px",top:d.value.y+"px",left:d.value.x+"px"}));function p(b){n.selectionContextMenu({event:b,nodes:i.value})}function x(b){s.value||ho[b.key]&&(b.preventDefault(),a({x:ho[b.key].x,y:ho[b.key].y},b.shiftKey))}return(b,_)=>!de(l)&&d.value.width&&d.value.height?(se(),ge("div",{key:0,class:Be(["vue-flow__nodesselection vue-flow__container",de(r)]),style:Xe({transform:"translate("+de(o).x+"px,"+de(o).y+"px) scale("+de(o).zoom+")"})},[te("div",{ref_key:"el",ref:u,class:Be([{dragging:de(c)},"vue-flow__nodesselection-rect"]),style:Xe(f.value),tabIndex:de(s)?void 0:-1,onContextmenu:p,onKeydown:x},null,46,j1)],6)):Ee("",!0)}}));function ew(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}const tw={name:"Pane",compatConfig:{MODE:3}},nw=$e(ie({},tw,{props:{isSelecting:{type:Boolean},selectionKeyPressed:{type:Boolean}},setup(e){const t=ke(),n=t.vueFlowRef,o=t.nodes,i=t.viewport,r=t.emits,s=t.userSelectionActive,l=t.removeSelectedElements,a=t.userSelectionRect,u=t.elementsSelectable,c=t.nodesSelectionActive,d=t.getSelectedEdges,f=t.getSelectedNodes,p=t.removeNodes,x=t.removeEdges,b=t.selectionMode,_=t.deleteKeyCode,A=t.multiSelectionKeyCode,P=t.multiSelectionActive,I=t.edgeLookup,m=t.nodeLookup,F=t.connectionLookup,z=t.defaultEdgeOptions,q=t.connectionStartHandle,G=t.panOnDrag,K=fn(null),Q=fn(new Set),re=fn(new Set),ee=fn(null),oe=De(()=>u.value&&(e.isSelecting||s.value)),g=De(()=>q.value!==null);let O=!1,R=!1;const $=ni(_,{actInsideInputWithModifier:!1}),N=ni(A);Ae($,Y=>{Y&&(p(f.value),x(d.value),c.value=!1)}),Ae(N,Y=>{P.value=Y});function L(Y,j){return ne=>{ne.target===j&&Y?.(ne)}}function H(Y){if(O||g.value){O=!1;return}r.paneClick(Y),l(),c.value=!1}function W(Y){var j;if(Array.isArray(G.value)&&((j=G.value)!=null&&j.includes(2))){Y.preventDefault();return}r.paneContextMenu(Y)}function D(Y){r.paneScroll(Y)}function Z(Y){var j,ne,pe,me;if(ee.value=(j=(ne=n.value)==null?void 0:ne.getBoundingClientRect())!=null?j:null,!u.value||!e.isSelecting||Y.button!==0||Y.target!==K.value||!ee.value)return;(me=(pe=Y.target)==null?void 0:pe.setPointerCapture)==null||me.call(pe,Y.pointerId);const _e=ew(Y,ee.value),U=_e.x,y=_e.y;R=!0,O=!1,l(),a.value={width:0,height:0,startX:U,startY:y,x:U,y},r.selectionStart(Y)}function le(Y){var j,ne;if(!ee.value||!a.value)return;O=!0;const pe=Kt(Y,ee.value),me=pe.x,_e=pe.y,U=a.value,y=U.startX,h=y===void 0?0:y,v=U.startY,E=v===void 0?0:v,S={startX:h,startY:E,x:me<h?me:h,y:_e<E?_e:E,width:Math.abs(me-h),height:Math.abs(_e-E)},C=Q.value,w=re.value;Q.value=new Set(Td(o.value,S,i.value,b.value===vl.Partial,!0).map(T=>T.id)),re.value=new Set;const M=(j=(ne=z.value)==null?void 0:ne.selectable)!=null?j:!0;for(const T of Q.value){const B=F.value.get(T);if(B)for(const V of B.values()){var k;const X=V.edgeId,J=I.value.get(X);J&&((k=J.selectable)!=null?k:M)&&re.value.add(X)}}if(!Zd(C,Q.value)){const T=bn(m.value,Q.value,!0);r.nodesChange(T)}if(!Zd(w,re.value)){const T=bn(I.value,re.value);r.edgesChange(T)}a.value=S,s.value=!0,c.value=!1}function ce(Y){var j;Y.button!==0||!R||((j=Y.target)==null||j.releasePointerCapture(Y.pointerId),!s.value&&a.value&&Y.target===K.value&&H(Y),s.value=!1,a.value=null,c.value=Q.value.size>0,r.selectionEnd(Y),e.selectionKeyPressed&&(O=!1),R=!1)}return(Y,j)=>(se(),ge("div",{ref_key:"container",ref:K,class:Be(["vue-flow__pane vue-flow__container",{selection:Y.isSelecting}]),onClick:j[0]||(j[0]=ne=>oe.value?void 0:L(H,K.value)(ne)),onContextmenu:j[1]||(j[1]=ne=>L(W,K.value)(ne)),onWheelPassive:j[2]||(j[2]=ne=>L(D,K.value)(ne)),onPointerenter:j[3]||(j[3]=ne=>oe.value?void 0:de(r).paneMouseEnter(ne)),onPointerdown:j[4]||(j[4]=ne=>oe.value?Z(ne):de(r).paneMouseMove(ne)),onPointermove:j[5]||(j[5]=ne=>oe.value?le(ne):de(r).paneMouseMove(ne)),onPointerup:j[6]||(j[6]=ne=>oe.value?ce(ne):void 0),onPointerleave:j[7]||(j[7]=ne=>de(r).paneMouseLeave(ne))},[mt(Y.$slots,"default"),de(s)&&de(a)?(se(),qe(Z1,{key:0,"user-selection-rect":de(a)},null,8,["user-selection-rect"])):Ee("",!0),de(c)&&de(f).length?(se(),qe(Q1,{key:1})):Ee("",!0)],34))}})),ow={name:"Transform",compatConfig:{MODE:3}},iw=$e(ie({},ow,{setup(e){const t=ke(),n=t.viewport,o=t.fitViewOnInit,i=t.fitViewOnInitDone,r=fe(()=>o.value?!i.value:!1),s=fe(()=>"translate("+n.value.x+"px,"+n.value.y+"px) scale("+n.value.zoom+")");return(l,a)=>(se(),ge("div",{class:"vue-flow__transformationpane vue-flow__container",style:Xe({transform:s.value,opacity:r.value?0:void 0})},[mt(l.$slots,"default")],4))}})),rw={name:"Viewport",compatConfig:{MODE:3}},sw=$e(ie({},rw,{setup(e){const t=ke(),n=t.minZoom,o=t.maxZoom,i=t.defaultViewport,r=t.translateExtent,s=t.zoomActivationKeyCode,l=t.selectionKeyCode,a=t.panActivationKeyCode,u=t.panOnScroll,c=t.panOnScrollMode,d=t.panOnScrollSpeed,f=t.panOnDrag,p=t.zoomOnDoubleClick,x=t.zoomOnPinch,b=t.zoomOnScroll,_=t.preventScrolling,A=t.noWheelClassName,P=t.noPanClassName,I=t.emits,m=t.connectionStartHandle,F=t.userSelectionActive,z=t.paneDragging,q=t.d3Zoom,G=t.d3Selection,K=t.d3ZoomHandler,Q=t.viewport,re=t.viewportRef,ee=t.paneClickDistance;X1(re);const oe=fn(!1),g=fn(!1);let O=null,R=!1,$=0,N={x:0,y:0,zoom:0};const L=ni(a),H=ni(l),W=ni(s),D=De(()=>(!H.value||H.value&&l.value===!0)&&(L.value||f.value)),Z=De(()=>L.value||u.value),le=De(()=>l.value===!0&&D.value!==!0),ce=De(()=>H.value&&l.value!==!0||F.value||le.value),Y=De(()=>m.value!==null);St(()=>{var _e,U,y;if(!re.value){ai("Viewport element is missing");return}const h=re.value,v=h.getBoundingClientRect(),E=E_().clickDistance(ee.value).scaleExtent([n.value,o.value]).translateExtent(r.value),S=xt(h).call(E),C=S.on("wheel.zoom"),w=fo.translate((_e=i.value.x)!=null?_e:0,(U=i.value.y)!=null?U:0).scale(Ln((y=i.value.zoom)!=null?y:1,n.value,o.value)),M=[[0,0],[v.width,v.height]],k=E.constrain()(w,M,r.value);E.transform(S,k),E.wheelDelta(wl),q.value=E,G.value=S,K.value=C,Q.value={x:k.x,y:k.y,zoom:k.k},E.on("start",T=>{var B;if(!T.sourceEvent)return null;$=T.sourceEvent.button,oe.value=!0;const V=pe(T.transform);((B=T.sourceEvent)==null?void 0:B.type)==="mousedown"&&(z.value=!0),N=V,I.viewportChangeStart(V),I.moveStart({event:T,flowTransform:V})}),E.on("end",T=>{if(!T.sourceEvent)return null;if(oe.value=!1,z.value=!1,j(D.value,$??0)&&!R&&I.paneContextMenu(T.sourceEvent),R=!1,ne(N,T.transform)){const B=pe(T.transform);N=B,I.viewportChangeEnd(B),I.moveEnd({event:T,flowTransform:B})}}),E.filter(T=>{var B;const V=W.value||b.value,X=x.value&&T.ctrlKey,J=T.button,ue=T.type==="wheel";if(J===1&&T.type==="mousedown"&&(me(T,"vue-flow__node")||me(T,"vue-flow__edge")))return!0;if(!D.value&&!V&&!Z.value&&!p.value&&!x.value||F.value||Y.value&&!ue||!p.value&&T.type==="dblclick"||me(T,A.value)&&ue||me(T,P.value)&&(!ue||Z.value&&ue&&!W.value)||!x.value&&T.ctrlKey&&ue||!V&&!Z.value&&!X&&ue)return!1;if(!x&&T.type==="touchstart"&&((B=T.touches)==null?void 0:B.length)>1)return T.preventDefault(),!1;if(!D.value&&(T.type==="mousedown"||T.type==="touchstart")||le.value&&Array.isArray(f.value)&&f.value.includes(0)&&J===0||Array.isArray(f.value)&&!f.value.includes(J)&&(T.type==="mousedown"||T.type==="touchstart"))return!1;const be=Array.isArray(f.value)&&f.value.includes(J)||l.value===!0&&Array.isArray(f.value)&&!f.value.includes(0)||!J||J<=1;return(!T.ctrlKey||L.value||ue)&&be}),Ae([F,D],()=>{F.value&&!oe.value?E.on("zoom",null):F.value||E.on("zoom",T=>{Q.value={x:T.transform.x,y:T.transform.y,zoom:T.transform.k};const B=pe(T.transform);R=j(D.value,$??0),I.viewportChange(B),I.move({event:T,flowTransform:B})})},{immediate:!0}),Ae([F,Z,c,W,x,_,A],()=>{Z.value&&!W.value&&!F.value?S.on("wheel.zoom",T=>{if(me(T,A.value))return!1;const B=W.value||b.value,V=x.value&&T.ctrlKey;if(!(!_.value||Z.value||B||V))return!1;T.preventDefault(),T.stopImmediatePropagation();const J=S.property("__zoom").k||1,ue=li();if(!L.value&&T.ctrlKey&&x.value&&ue){const je=zt(T),Je=wl(T),On=J*2**Je;E.scaleTo(S,On,je,T);return}const be=T.deltaMode===1?20:1;let Se=c.value===ti.Vertical?0:T.deltaX*be,Re=c.value===ti.Horizontal?0:T.deltaY*be;!ue&&T.shiftKey&&c.value!==ti.Vertical&&!Se&&Re&&(Se=Re,Re=0),E.translateBy(S,-(Se/J)*d.value,-(Re/J)*d.value);const We=pe(S.property("__zoom"));O&&clearTimeout(O),g.value?(I.move({event:T,flowTransform:We}),I.viewportChange(We),O=setTimeout(()=>{I.moveEnd({event:T,flowTransform:We}),I.viewportChangeEnd(We),g.value=!1},150)):(g.value=!0,I.moveStart({event:T,flowTransform:We}),I.viewportChangeStart(We))},{passive:!1}):typeof C<"u"&&S.on("wheel.zoom",function(T,B){const V=!_.value&&T.type==="wheel"&&!T.ctrlKey,X=W.value||b.value,J=x.value&&T.ctrlKey;if(!X&&!u.value&&!J&&T.type==="wheel"||V||me(T,A.value))return null;T.preventDefault(),C.call(this,T,B)},{passive:!1})},{immediate:!0})});function j(_e,U){return U===2&&Array.isArray(_e)&&_e.includes(2)}function ne(_e,U){return _e.x!==U.x&&!Number.isNaN(U.x)||_e.y!==U.y&&!Number.isNaN(U.y)||_e.zoom!==U.k&&!Number.isNaN(U.k)}function pe(_e){return{x:_e.x,y:_e.y,zoom:_e.k}}function me(_e,U){return _e.target.closest("."+U)}return(_e,U)=>(se(),ge("div",{ref_key:"viewportRef",ref:re,class:"vue-flow__viewport vue-flow__container"},[Ne(nw,{"is-selecting":ce.value,"selection-key-pressed":de(H),class:Be({connecting:Y.value,dragging:de(z),draggable:de(f)===!0||Array.isArray(de(f))&&de(f).includes(0)})},{default:pn(()=>[Ne(iw,null,{default:pn(()=>[mt(_e.$slots,"default")]),_:3})]),_:3},8,["is-selecting","selection-key-pressed","class"])],512))}})),lw=["id"],aw=["id"],uw=["id"],cw={name:"A11yDescriptions",compatConfig:{MODE:3}},dw=$e(ie({},cw,{setup(e){const t=ke(),n=t.id,o=t.disableKeyboardA11y,i=t.ariaLiveMessage;return(r,s)=>(se(),ge(He,null,[te("div",{id:de(_d)+"-"+de(n),style:{display:"none"}}," Press enter or space to select a node. "+ve(de(o)?"":"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,lw),te("div",{id:de(wd)+"-"+de(n),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,aw),de(o)?Ee("",!0):(se(),ge("div",{key:0,id:de(T_)+"-"+de(n),"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%)"}},ve(de(i)),9,uw))],64))}}));function fw(){const e=ke();Ae(()=>e.viewportHelper.value.viewportInitialized,t=>{t&&setTimeout(()=>{e.emits.init(e),e.emits.paneReady(e)},1)})}function hw(e,t,n){return n===he.Left?e-t:n===he.Right?e+t:e}function gw(e,t,n){return n===he.Top?e-t:n===he.Bottom?e+t:e}const Il=function(t){let n=t.radius,o=n===void 0?10:n,i=t.centerX,r=i===void 0?0:i,s=t.centerY,l=s===void 0?0:s,a=t.position,u=a===void 0?he.Top:a,c=t.type;return Ie("circle",{class:"vue-flow__edgeupdater vue-flow__edgeupdater-"+c,cx:hw(r,o,u),cy:gw(l,o,u),r:o,stroke:"transparent",fill:"transparent"})};Il.props=["radius","centerX","centerY","position","type"],Il.compatConfig={MODE:3};const pf=Il,pw=$e({name:"Edge",compatConfig:{MODE:3},props:["id"],setup(e){const t=ke(),n=t.id,o=t.addSelectedEdges,i=t.connectionMode,r=t.edgeUpdaterRadius,s=t.emits,l=t.nodesSelectionActive,a=t.noPanClassName,u=t.getEdgeTypes,c=t.removeSelectedEdges,d=t.findEdge,f=t.findNode,p=t.isValidConnection,x=t.multiSelectionActive,b=t.disableKeyboardA11y,_=t.elementsSelectable,A=t.edgesUpdatable,P=t.edgesFocusable,I=t.hooks,m=fe(()=>d(e.id)),F=r1(m.value,s),z=F.emit,q=F.on,G=vt(Or),K=mn(),Q=Ce(!1),re=Ce(!1),ee=Ce(""),oe=Ce(null),g=Ce("source"),O=Ce(null),R=De(()=>typeof m.value.selectable>"u"?_.value:m.value.selectable),$=De(()=>typeof m.value.updatable>"u"?A.value:m.value.updatable),N=De(()=>typeof m.value.focusable>"u"?P.value:m.value.focusable);vn(n1,e.id),vn(o1,O);const L=fe(()=>m.value.class instanceof Function?m.value.class(m.value):m.value.class),H=fe(()=>m.value.style instanceof Function?m.value.style(m.value):m.value.style),W=fe(()=>{var C;const w=m.value.type||"default",M=G?.["edge-"+w];if(M)return M;let k=(C=m.value.template)!=null?C:u.value[w];if(typeof k=="string"&&K){const T=Object.keys(K.appContext.components);T&&T.includes(w)&&(k=Ft(w,!1))}return k&&typeof k!="string"?k:(s.error(new Ze(Ke.EDGE_TYPE_MISSING,k)),!1)}),D=tf({nodeId:ee,handleId:oe,type:g,isValidConnection:p,edgeUpdaterType:g,onEdgeUpdate:Y,onEdgeUpdateEnd:j}),Z=D.handlePointerDown;return()=>{var C;const w=f(m.value.source),M=f(m.value.target),k="pathOptions"in m.value?m.value.pathOptions:{};if(!w&&!M)return s.error(new Ze(Ke.EDGE_SOURCE_TARGET_MISSING,m.value.id,m.value.source,m.value.target)),null;if(!w)return s.error(new Ze(Ke.EDGE_SOURCE_MISSING,m.value.id,m.value.source)),null;if(!M)return s.error(new Ze(Ke.EDGE_TARGET_MISSING,m.value.id,m.value.target)),null;if(!m.value||m.value.hidden||w.hidden||M.hidden)return null;let T;i.value===yn.Strict?T=w.handleBounds.source:T=[...w.handleBounds.source||[],...w.handleBounds.target||[]];const B=zd(T,m.value.sourceHandle);let V;i.value===yn.Strict?V=M.handleBounds.target:V=[...M.handleBounds.target||[],...M.handleBounds.source||[]];const X=zd(V,m.value.targetHandle),J=B?.position||he.Bottom,ue=X?.position||he.Top,be=po(w,B,J),Se=be.x,Re=be.y,We=po(M,X,ue),je=We.x,Je=We.y;return m.value.sourceX=Se,m.value.sourceY=Re,m.value.targetX=je,m.value.targetY=Je,Ie("g",ie({ref:O,key:e.id,"data-id":e.id,class:["vue-flow__edge","vue-flow__edge-"+(W.value===!1?"default":m.value.type||"default"),a.value,L.value,{updating:Q.value,selected:m.value.selected,animated:m.value.animated,inactive:!R.value&&!I.value.edgeClick.hasListeners()}],tabIndex:N.value?0:void 0,"aria-label":m.value.ariaLabel===null?void 0:(C=m.value.ariaLabel)!=null?C:"Edge from "+m.value.source+" to "+m.value.target,"aria-describedby":N.value?wd+"-"+n:void 0,"aria-roledescription":"edge",role:N.value?"group":"img"},m.value.domAttributes,{onClick:pe,onContextmenu:me,onDblclick:_e,onMouseenter:U,onMousemove:y,onMouseleave:h,onKeyDown:N.value?S:void 0}),[re.value?null:Ie(W.value===!1?u.value.default:W.value,ie({id:e.id,sourceNode:w,targetNode:M,source:m.value.source,target:m.value.target,type:m.value.type,updatable:$.value,selected:m.value.selected,animated:m.value.animated,label:m.value.label,labelStyle:m.value.labelStyle,labelShowBg:m.value.labelShowBg,labelBgStyle:m.value.labelBgStyle,labelBgPadding:m.value.labelBgPadding,labelBgBorderRadius:m.value.labelBgBorderRadius,data:m.value.data,events:ie({},m.value.events,q),style:H.value,markerStart:"url('#"+si(m.value.markerStart,n)+"')",markerEnd:"url('#"+si(m.value.markerEnd,n)+"')",sourcePosition:J,targetPosition:ue,sourceX:Se,sourceY:Re,targetX:je,targetY:Je,sourceHandleId:m.value.sourceHandle,targetHandleId:m.value.targetHandle,interactionWidth:m.value.interactionWidth},k)),[$.value==="source"||$.value===!0?[Ie("g",{onMousedown:v,onMouseenter:le,onMouseout:ce},Ie(pf,{position:J,centerX:Se,centerY:Re,radius:r.value,type:"source","data-type":"source"}))]:null,$.value==="target"||$.value===!0?[Ie("g",{onMousedown:E,onMouseenter:le,onMouseout:ce},Ie(pf,{position:ue,centerX:je,centerY:Je,radius:r.value,type:"target","data-type":"target"}))]:null]])};function le(){Q.value=!0}function ce(){Q.value=!1}function Y(C,w){z.update({event:C,edge:m.value,connection:w})}function j(C){z.updateEnd({event:C,edge:m.value}),re.value=!1}function ne(C,w){var M;C.button===0&&(re.value=!0,ee.value=w?m.value.target:m.value.source,oe.value=(M=w?m.value.targetHandle:m.value.sourceHandle)!=null?M:null,g.value=w?"target":"source",z.updateStart({event:C,edge:m.value}),Z(C))}function pe(C){var w;const M={event:C,edge:m.value};R.value&&(l.value=!1,m.value.selected&&x.value?(c([m.value]),(w=O.value)==null||w.blur()):o([m.value])),z.click(M)}function me(C){z.contextMenu({event:C,edge:m.value})}function _e(C){z.doubleClick({event:C,edge:m.value})}function U(C){z.mouseEnter({event:C,edge:m.value})}function y(C){z.mouseMove({event:C,edge:m.value})}function h(C){z.mouseLeave({event:C,edge:m.value})}function v(C){ne(C,!0)}function E(C){ne(C,!1)}function S(C){var w;!b.value&&bd.includes(C.key)&&R.value&&(C.key==="Escape"?((w=O.value)==null||w.blur(),c([d(e.id)])):o([d(e.id)]))}}}),vw=pw,mw=$e({name:"ConnectionLine",compatConfig:{MODE:3},setup(){var e;const t=ke(),n=t.id,o=t.connectionMode,i=t.connectionStartHandle,r=t.connectionEndHandle,s=t.connectionPosition,l=t.connectionLineType,a=t.connectionLineStyle,u=t.connectionLineOptions,c=t.connectionStatus,d=t.viewport,f=t.findNode,p=(e=vt(Or))==null?void 0:e["connection-line"],x=fe(()=>{var I;return f((I=i.value)==null?void 0:I.nodeId)}),b=fe(()=>{var I,m;return(I=f((m=r.value)==null?void 0:m.nodeId))!=null?I:null}),_=fe(()=>({x:(s.value.x-d.value.x)/d.value.zoom,y:(s.value.y-d.value.y)/d.value.zoom})),A=fe(()=>u.value.markerStart?"url(#"+si(u.value.markerStart,n)+")":""),P=fe(()=>u.value.markerEnd?"url(#"+si(u.value.markerEnd,n)+")":"");return()=>{var I,m,F,z,q,G,K,Q,re;if(!x.value||!i.value)return null;const ee=i.value.id,oe=i.value.type,g=x.value.handleBounds;let O=(I=g?.[oe])!=null?I:[];if(o.value===yn.Loose){var R;const y=(R=g?.[oe==="source"?"target":"source"])!=null?R:[];O=[...O,...y]}if(!O)return null;const $=(m=ee?O.find(y=>y.id===ee):O[0])!=null?m:null,N=(F=$?.position)!=null?F:he.Top,L=po(x.value,$,N),H=L.x,W=L.y;let D=null;if(b.value)if(o.value===yn.Strict)D=((K=b.value.handleBounds[oe==="source"?"target":"source"])==null?void 0:K.find(y=>{var h;return y.id===((h=r.value)==null?void 0:h.id)}))||null;else{var Z,le;D=((Q=[...(Z=b.value.handleBounds.source)!=null?Z:[],...(le=b.value.handleBounds.target)!=null?le:[]])==null?void 0:Q.find(y=>{var h;return y.id===((h=r.value)==null?void 0:h.id)}))||null}const ce=(z=(re=r.value)==null?void 0:re.position)!=null?z:N?Ol[N]:null;if(!N||!ce)return null;const Y=(q=(G=l.value)!=null?G:u.value.type)!=null?q:Fn.Bezier;let j="";const ne={sourceX:H,sourceY:W,sourcePosition:N,targetX:_.value.x,targetY:_.value.y,targetPosition:ce};if(Y===Fn.Bezier){var pe=uf(ne);j=pe[0]}else if(Y===Fn.Step){var me=Dr(ie({},ne,{borderRadius:0}));j=me[0]}else if(Y===Fn.SmoothStep){var _e=Dr(ne);j=_e[0]}else if(Y===Fn.SimpleBezier){var U=df(ne);j=U[0]}else j="M"+H+","+W+" "+_.value.x+","+_.value.y;return Ie("svg",{class:"vue-flow__edges vue-flow__connectionline vue-flow__container"},Ie("g",{class:"vue-flow__connection"},p?Ie(p,{sourceX:H,sourceY:W,sourcePosition:N,targetX:_.value.x,targetY:_.value.y,targetPosition:ce,sourceNode:x.value,sourceHandle:$,targetNode:b.value,targetHandle:D,markerEnd:P.value,markerStart:A.value,connectionStatus:c.value}):Ie("path",{d:j,class:[u.value.class,c.value,"vue-flow__connection-path"],style:ie({},a.value,u.value.style),"marker-end":P.value,"marker-start":A.value})))}}}),yw=mw,_w=["id","markerWidth","markerHeight","markerUnits","orient"],ww={name:"MarkerType",compatConfig:{MODE:3}},bw=$e(ie({},ww,{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){return(t,n)=>(se(),ge("marker",{id:t.id,class:"vue-flow__arrowhead",viewBox:"-10 -10 20 20",refX:"0",refY:"0",markerWidth:""+t.width,markerHeight:""+t.height,markerUnits:t.markerUnits,orient:t.orient},[t.type===de(ml).ArrowClosed?(se(),ge("polyline",{key:0,style:Xe({stroke:t.color,fill:t.color,strokeWidth:t.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",points:"-5,-4 0,0 -5,4 -5,-4"},null,4)):Ee("",!0),t.type===de(ml).Arrow?(se(),ge("polyline",{key:1,style:Xe({stroke:t.color,strokeWidth:t.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",fill:"none",points:"-5,-4 0,0 -5,4"},null,4)):Ee("",!0)],8,_w))}})),Sw={class:"vue-flow__marker vue-flow__container","aria-hidden":"true"},Ew={name:"MarkerDefinitions",compatConfig:{MODE:3}},xw=$e(ie({},Ew,{setup(e){const t=ke(),n=t.id,o=t.edges,i=t.connectionLineOptions,r=t.defaultMarkerColor,s=fe(()=>{const l=new Set,a=[],u=c=>{if(c){const d=si(c,n);l.has(d)||(typeof c=="object"?a.push(ie({},c,{id:d,color:c.color||r.value})):a.push({id:d,color:r.value,type:c}),l.add(d))}};for(const c of[i.value.markerEnd,i.value.markerStart])u(c);for(const c of o.value)for(const d of[c.markerStart,c.markerEnd])u(d);return a.sort((c,d)=>c.id.localeCompare(d.id))});return(l,a)=>(se(),ge("svg",Sw,[te("defs",null,[(se(!0),ge(He,null,Qn(s.value,u=>(se(),qe(bw,{id:u.id,key:u.id,type:u.type,color:u.color,width:u.width,height:u.height,markerUnits:u.markerUnits,"stroke-width":u.strokeWidth,orient:u.orient},null,8,["id","type","color","width","height","markerUnits","stroke-width","orient"]))),128))])]))}})),Aw={name:"Edges",compatConfig:{MODE:3}},Ow=$e(ie({},Aw,{setup(e){const t=ke(),n=t.findNode,o=t.getEdges,i=t.elevateEdgesOnSelect;return(r,s)=>(se(),ge(He,null,[Ne(xw),(se(!0),ge(He,null,Qn(de(o),l=>(se(),ge("svg",{key:l.id,class:"vue-flow__edges vue-flow__container",style:Xe({zIndex:de(G_)(l,de(n),de(i))})},[Ne(de(vw),{id:l.id},null,8,["id"])],4))),128)),Ne(de(yw))],64))}})),Cw=$e({name:"Node",compatConfig:{MODE:3},props:["id","resizeObserver"],setup(e){const t=ke(),n=t.id,o=t.noPanClassName,i=t.selectNodesOnDrag,r=t.nodesSelectionActive,s=t.multiSelectionActive,l=t.emits,a=t.removeSelectedNodes,u=t.addSelectedNodes,c=t.updateNodeDimensions,d=t.onUpdateNodeInternals,f=t.getNodeTypes,p=t.nodeExtent,x=t.elevateNodesOnSelect,b=t.disableKeyboardA11y,_=t.ariaLiveMessage,A=t.snapToGrid,P=t.snapGrid,I=t.nodeDragThreshold,m=t.nodesDraggable,F=t.elementsSelectable,z=t.nodesConnectable,q=t.nodesFocusable,G=t.hooks,K=Ce(null);vn(Qd,K),vn(Jd,e.id);const Q=vt(Or),re=mn(),ee=of(),oe=nf(e.id),g=oe.node,O=oe.parentNode,R=u1(g,l),$=R.emit,N=R.on,L=De(()=>typeof g.draggable>"u"?m.value:g.draggable),H=De(()=>typeof g.selectable>"u"?F.value:g.selectable),W=De(()=>typeof g.connectable>"u"?z.value:g.connectable),D=De(()=>typeof g.focusable>"u"?q.value:g.focusable),Z=fe(()=>H.value||L.value||G.value.nodeClick.hasListeners()||G.value.nodeDoubleClick.hasListeners()||G.value.nodeMouseEnter.hasListeners()||G.value.nodeMouseMove.hasListeners()||G.value.nodeMouseLeave.hasListeners()),le=De(()=>!!g.dimensions.width&&!!g.dimensions.height),ce=fe(()=>{const w=g.type||"default",M=Q?.["node-"+w];if(M)return M;let k=g.template||f.value[w];if(typeof k=="string"&&re){const T=Object.keys(re.appContext.components);T&&T.includes(w)&&(k=Ft(w,!1))}return k&&typeof k!="string"?k:(l.error(new Ze(Ke.NODE_TYPE_MISSING,k)),!1)}),Y=ef({id:e.id,el:K,disabled:()=>!L.value,selectable:H,dragHandle:()=>g.dragHandle,onStart(w){$.dragStart(w)},onDrag(w){$.drag(w)},onStop(w){$.dragStop(w)},onClick(w){S(w)}}),j=fe(()=>g.class instanceof Function?g.class(g):g.class),ne=fe(()=>{const w=(g.style instanceof Function?g.style(g):g.style)||{},M=g.width instanceof Function?g.width(g):g.width,k=g.height instanceof Function?g.height(g):g.height;return!w.width&&M&&(w.width=typeof M=="string"?M:M+"px"),!w.height&&k&&(w.height=typeof k=="string"?k:k+"px"),w}),pe=De(()=>{var w,M;return Number((w=(M=g.zIndex)!=null?M:ne.value.zIndex)!=null?w:0)});return d(w=>{(w.includes(e.id)||!w.length)&&_e()}),St(()=>{Ae(()=>g.hidden,function(w,M,k){w===void 0&&(w=!1),!w&&K.value&&(e.resizeObserver.observe(K.value),k(()=>{K.value&&e.resizeObserver.unobserve(K.value)}))},{immediate:!0,flush:"post"})}),Ae([()=>g.type,()=>g.sourcePosition,()=>g.targetPosition],()=>{$t(()=>{c([{id:e.id,nodeElement:K.value,forceUpdate:!0}])})}),Ae([()=>g.position.x,()=>g.position.y,()=>{var w;return(w=O.value)==null?void 0:w.computedPosition.x},()=>{var w;return(w=O.value)==null?void 0:w.computedPosition.y},()=>{var w;return(w=O.value)==null?void 0:w.computedPosition.z},pe,()=>g.selected,()=>g.dimensions.height,()=>g.dimensions.width,()=>{var w;return(w=O.value)==null?void 0:w.dimensions.height},()=>{var w;return(w=O.value)==null?void 0:w.dimensions.width}],w=>{let M=w[0],k=w[1],T=w[2],B=w[3],V=w[4],X=w[5];const J={x:M,y:k,z:X+(x.value&&g.selected?1e3:0)};typeof T<"u"&&typeof B<"u"?g.computedPosition=L_({x:T,y:B,z:V},J):g.computedPosition=J},{flush:"post",immediate:!0}),Ae([()=>g.extent,p],(w,M)=>{let k=w[0],T=w[1],B=M[0],V=M[1];(k!==B||T!==V)&&me()}),g.extent==="parent"||typeof g.extent=="object"&&"range"in g.extent&&g.extent.range==="parent"?qs(()=>le).toBe(!0).then(me):me(),()=>{var w,M;return g.hidden?null:Ie("div",ie({ref:K,"data-id":g.id,class:["vue-flow__node","vue-flow__node-"+(ce.value===!1?"default":g.type||"default"),{[o.value]:L.value,dragging:Y?.value,draggable:L.value,selected:g.selected,selectable:H.value,parent:g.isParent},j.value],style:ie({visibility:le.value?"visible":"hidden",zIndex:(w=g.computedPosition.z)!=null?w:pe.value,transform:"translate("+g.computedPosition.x+"px,"+g.computedPosition.y+"px)",pointerEvents:Z.value?"all":"none"},ne.value),tabIndex:D.value?0:void 0,role:D.value?"group":void 0,"aria-describedby":b.value?void 0:_d+"-"+n,"aria-label":g.ariaLabel,"aria-roledescription":"node"},g.domAttributes,{onMouseenter:U,onMousemove:y,onMouseleave:h,onContextmenu:v,onClick:S,onDblclick:E,onKeydown:C}),[Ie(ce.value===!1?f.value.default:ce.value,{id:g.id,type:g.type,data:g.data,events:ie({},g.events,N),selected:g.selected,resizing:g.resizing,dragging:Y.value,connectable:W.value,position:g.computedPosition,dimensions:g.dimensions,isValidTargetPos:g.isValidTargetPos,isValidSourcePos:g.isValidSourcePos,parent:g.parentNode,parentNodeId:g.parentNode,zIndex:(M=g.computedPosition.z)!=null?M:pe.value,targetPosition:g.targetPosition,sourcePosition:g.sourcePosition,label:g.label,dragHandle:g.dragHandle,onUpdateNodeInternals:_e})])};function me(){const w=g.computedPosition,M=El(g,A.value?Ar(w,P.value):w,l.error,p.value,O.value),k=M.computedPosition,T=M.position;(g.computedPosition.x!==k.x||g.computedPosition.y!==k.y)&&(g.computedPosition=ie({},g.computedPosition,k)),(g.position.x!==T.x||g.position.y!==T.y)&&(g.position=T)}function _e(){K.value&&c([{id:e.id,nodeElement:K.value,forceUpdate:!0}])}function U(w){Y?.value||$.mouseEnter({event:w,node:g})}function y(w){Y?.value||$.mouseMove({event:w,node:g})}function h(w){Y?.value||$.mouseLeave({event:w,node:g})}function v(w){return $.contextMenu({event:w,node:g})}function E(w){return $.doubleClick({event:w,node:g})}function S(w){H.value&&(!i.value||!L.value||I.value>0)&&Cl(g,s.value,u,a,r,!1,K.value),$.click({event:w,node:g})}function C(w){if(!(yl(w)||b.value))if(bd.includes(w.key)&&H.value){const M=w.key==="Escape";Cl(g,s.value,u,a,r,M,K.value)}else L.value&&g.selected&&ho[w.key]&&(w.preventDefault(),_.value="Moved selected node "+w.key.replace("Arrow","").toLowerCase()+". New position, x: "+~~g.position.x+", y: "+~~g.position.y,ee({x:ho[w.key].x,y:ho[w.key].y},w.shiftKey))}}}),Nw=Cw,Tw={height:"0",width:"0"},Mw={name:"EdgeLabelRenderer",compatConfig:{MODE:3}},Iw=$e(ie({},Mw,{setup(e){const t=ke(),n=t.viewportRef,o=De(()=>{var i;return(i=n.value)==null?void 0:i.getElementsByClassName("vue-flow__edge-labels")[0]});return(i,r)=>(se(),ge("svg",null,[(se(),ge("foreignObject",Tw,[(se(),qe(hg,{to:o.value,disabled:!o.value},[mt(i.$slots,"default")],8,["to","disabled"]))]))]))}}));function Pw(e){e===void 0&&(e={includeHiddenNodes:!1});const t=ke(),n=t.nodes;return fe(()=>{if(n.value.length===0)return!1;for(const o of n.value)if((e.includeHiddenNodes||!o.hidden)&&(o?.handleBounds===void 0||o.dimensions.width===0||o.dimensions.height===0))return!1;return!0})}const Rw={class:"vue-flow__nodes vue-flow__container"},Dw={name:"Nodes",compatConfig:{MODE:3}},kw=$e(ie({},Dw,{setup(e){const t=ke(),n=t.getNodes,o=t.updateNodeDimensions,i=t.emits,r=Pw(),s=Ce();return Ae(r,l=>{l&&$t(()=>{i.nodesInitialized(n.value)})},{immediate:!0}),St(()=>{s.value=new ResizeObserver(l=>{const a=l.map(u=>({id:u.target.getAttribute("data-id"),nodeElement:u.target,forceUpdate:!0}));$t(()=>o(a))})}),Es(()=>{var l;return(l=s.value)==null?void 0:l.disconnect()}),(l,a)=>(se(),ge("div",Rw,[s.value?(se(!0),ge(He,{key:0},Qn(de(n),(u,c,d,f)=>{const p=[u.id];if(f&&f.key===u.id&&cp(f,p))return f;const x=(se(),qe(de(Nw),{id:u.id,key:u.id,"resize-observer":s.value},null,8,["id","resize-observer"]));return x.memo=p,x},a,0),128)):Ee("",!0)]))}}));function $w(){const e=ke(),t=e.emits;St(()=>{if(Yd()){const n=document.querySelector(".vue-flow__pane");n&&window.getComputedStyle(n).zIndex!=="1"&&t.error(new Ze(Ke.MISSING_STYLES))}})}const Fw=te("div",{class:"vue-flow__edge-labels"},null,-1),Lw={name:"VueFlow",compatConfig:{MODE:3}},Hw=$e(ie({},Lw,{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,t){let n=t.expose,o=t.emit;const i=e,r=gu(),s=Zs(i,"modelValue",o),l=Zs(i,"nodes",o),a=Zs(i,"edges",o),u=ke(i),c=h1({modelValue:s,nodes:l,edges:a},i,u);return p1(o,u.hooks),fw(),$w(),vn(Or,r),Vi(c),n(u),(d,f)=>(se(),ge("div",{ref:de(u).vueFlowRef,class:"vue-flow"},[Ne(sw,null,{default:pn(()=>[Ne(Ow),Fw,Ne(kw),mt(d.$slots,"zoom-pane")]),_:3}),mt(d.$slots,"default"),Ne(dw)],512))}})),Ww={name:"Panel",compatConfig:{MODE:3}},vf=$e(ie({},Ww,{props:{position:{}},setup(e){const t=e,n=ke(),o=n.userSelectionActive,i=fe(()=>(""+t.position).split("-"));return(r,s)=>(se(),ge("div",{class:Be(["vue-flow__panel",i.value]),style:Xe({pointerEvents:de(o)?"none":"all"})},[mt(r.$slots,"default")],6))}}));var sn=(e=>(e.Lines="lines",e.Dots="dots",e))(sn||{});const mf=function(t){let n=t.dimensions,o=t.size,i=t.color;return Ie("path",{stroke:i,"stroke-width":o,d:"M"+n[0]/2+" 0 V"+n[1]+" M0 "+n[1]/2+" H"+n[0]})},yf=function(t){let n=t.radius,o=t.color;return Ie("circle",{cx:n,cy:n,r:n,fill:o})};sn.Lines+"",sn.Dots+"";const zw={[sn.Dots]:"#81818a",[sn.Lines]:"#eee"},Bw=["id","x","y","width","height","patternTransform"],Vw={key:2,height:"100",width:"100"},Gw=["fill"],Kw=["x","y","fill"],Yw={name:"Background",compatConfig:{MODE:3}},Uw=$e(ie({},Yw,{props:{id:{},variant:{default:()=>sn.Dots},gap:{default:20},size:{default:1},lineWidth:{default:1},patternColor:{},color:{},bgColor:{},height:{default:100},width:{default:100},x:{default:0},y:{default:0},offset:{default:0}},setup(e){const t=ke(),n=t.id,o=t.viewport,i=fe(()=>{const l=o.value.zoom,a=Array.isArray(e.gap)?e.gap:[e.gap,e.gap],u=a[0],c=a[1],d=[u*l||1,c*l||1],f=e.size*l,p=Array.isArray(e.offset)?e.offset:[e.offset,e.offset],x=p[0],b=p[1],_=[x*l||1+d[0]/2,b*l||1+d[1]/2];return{scaledGap:d,offset:_,size:f}}),r=De(()=>"pattern-"+n+(e.id?"-"+e.id:"")),s=De(()=>e.color||e.patternColor||zw[e.variant||sn.Dots]);return(l,a)=>(se(),ge("svg",{class:"vue-flow__background vue-flow__container",style:Xe({height:(l.height>100?100:l.height)+"%",width:(l.width>100?100:l.width)+"%"})},[mt(l.$slots,"pattern-container",{id:r.value},()=>[te("pattern",{id:r.value,x:de(o).x%i.value.scaledGap[0],y:de(o).y%i.value.scaledGap[1],width:i.value.scaledGap[0],height:i.value.scaledGap[1],patternTransform:"translate(-"+i.value.offset[0]+",-"+i.value.offset[1]+")",patternUnits:"userSpaceOnUse"},[mt(l.$slots,"pattern",{},()=>[l.variant===de(sn).Lines?(se(),qe(de(mf),{key:0,size:l.lineWidth,color:s.value,dimensions:i.value.scaledGap},null,8,["size","color","dimensions"])):l.variant===de(sn).Dots?(se(),qe(de(yf),{key:1,color:s.value,radius:i.value.size/2},null,8,["color","radius"])):Ee("",!0),l.bgColor?(se(),ge("svg",Vw,[te("rect",{width:"100%",height:"100%",fill:l.bgColor},null,8,Gw)])):Ee("",!0)])],8,Bw)]),te("rect",{x:l.x,y:l.y,width:"100%",height:"100%",fill:"url(#"+r.value+")"},null,8,Kw),mt(l.$slots,"default",{id:r.value})],4))}}));var Xw={value:()=>{}};function Pl(){for(var e=0,t=arguments.length,n={},o;e<t;++e){if(!(o=arguments[e]+"")||o in n||/[\s.]/.test(o))throw new Error("illegal type: "+o);n[o]=[]}return new kr(n)}function kr(e){this._=e}function qw(e,t){return e.trim().split(/^|\s+/).map(function(n){var o="",i=n.indexOf(".");if(i>=0&&(o=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}kr.prototype=Pl.prototype={constructor:kr,on:function(t,n){var o=this._,i=qw(t+"",o),r,s=-1,l=i.length;if(arguments.length<2){for(;++s<l;)if((r=(t=i[s]).type)&&(r=Zw(o[r],t.name)))return r;return}if(n!=null&&typeof n!="function")throw new Error("invalid callback: "+n);for(;++s<l;)if(r=(t=i[s]).type)o[r]=_f(o[r],t.name,n);else if(n==null)for(r in o)o[r]=_f(o[r],t.name,null);return this},copy:function(){var t={},n=this._;for(var o in n)t[o]=n[o].slice();return new kr(t)},call:function(t,n){if((r=arguments.length-2)>0)for(var o=new Array(r),i=0,r,s;i<r;++i)o[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(s=this._[t],i=0,r=s.length;i<r;++i)s[i].value.apply(n,o)},apply:function(t,n,o){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],r=0,s=i.length;r<s;++r)i[r].value.apply(n,o)}};function Zw(e,t){for(var n=0,o=e.length,i;n<o;++n)if((i=e[n]).name===t)return i.value}function _f(e,t,n){for(var o=0,i=e.length;o<i;++o)if(e[o].name===t){e[o]=Xw,e=e.slice(0,o).concat(e.slice(o+1));break}return n!=null&&e.push({name:t,value:n}),e}var Rl="http://www.w3.org/1999/xhtml";const wf={svg:"http://www.w3.org/2000/svg",xhtml:Rl,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function $r(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),wf.hasOwnProperty(t)?{space:wf[t],local:e}:e}function jw(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Rl&&t.documentElement.namespaceURI===Rl?t.createElement(e):t.createElementNS(n,e)}}function Jw(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function bf(e){var t=$r(e);return(t.local?Jw:jw)(t)}function Qw(){}function Dl(e){return e==null?Qw:function(){return this.querySelector(e)}}function eb(e){typeof e!="function"&&(e=Dl(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r=t[i],s=r.length,l=o[i]=new Array(s),a,u,c=0;c<s;++c)(a=r[c])&&(u=e.call(a,a.__data__,c,r))&&("__data__"in a&&(u.__data__=a.__data__),l[c]=u);return new pt(o,this._parents)}function tb(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function nb(){return[]}function Sf(e){return e==null?nb:function(){return this.querySelectorAll(e)}}function ob(e){return function(){return tb(e.apply(this,arguments))}}function ib(e){typeof e=="function"?e=ob(e):e=Sf(e);for(var t=this._groups,n=t.length,o=[],i=[],r=0;r<n;++r)for(var s=t[r],l=s.length,a,u=0;u<l;++u)(a=s[u])&&(o.push(e.call(a,a.__data__,u,s)),i.push(a));return new pt(o,i)}function Ef(e){return function(){return this.matches(e)}}function xf(e){return function(t){return t.matches(e)}}var rb=Array.prototype.find;function sb(e){return function(){return rb.call(this.children,e)}}function lb(){return this.firstElementChild}function ab(e){return this.select(e==null?lb:sb(typeof e=="function"?e:xf(e)))}var ub=Array.prototype.filter;function cb(){return Array.from(this.children)}function db(e){return function(){return ub.call(this.children,e)}}function fb(e){return this.selectAll(e==null?cb:db(typeof e=="function"?e:xf(e)))}function hb(e){typeof e!="function"&&(e=Ef(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r=t[i],s=r.length,l=o[i]=[],a,u=0;u<s;++u)(a=r[u])&&e.call(a,a.__data__,u,r)&&l.push(a);return new pt(o,this._parents)}function Af(e){return new Array(e.length)}function gb(){return new pt(this._enter||this._groups.map(Af),this._parents)}function Fr(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Fr.prototype={constructor:Fr,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function pb(e){return function(){return e}}function vb(e,t,n,o,i,r){for(var s=0,l,a=t.length,u=r.length;s<u;++s)(l=t[s])?(l.__data__=r[s],o[s]=l):n[s]=new Fr(e,r[s]);for(;s<a;++s)(l=t[s])&&(i[s]=l)}function mb(e,t,n,o,i,r,s){var l,a,u=new Map,c=t.length,d=r.length,f=new Array(c),p;for(l=0;l<c;++l)(a=t[l])&&(f[l]=p=s.call(a,a.__data__,l,t)+"",u.has(p)?i[l]=a:u.set(p,a));for(l=0;l<d;++l)p=s.call(e,r[l],l,r)+"",(a=u.get(p))?(o[l]=a,a.__data__=r[l],u.delete(p)):n[l]=new Fr(e,r[l]);for(l=0;l<c;++l)(a=t[l])&&u.get(f[l])===a&&(i[l]=a)}function yb(e){return e.__data__}function _b(e,t){if(!arguments.length)return Array.from(this,yb);var n=t?mb:vb,o=this._parents,i=this._groups;typeof e!="function"&&(e=pb(e));for(var r=i.length,s=new Array(r),l=new Array(r),a=new Array(r),u=0;u<r;++u){var c=o[u],d=i[u],f=d.length,p=wb(e.call(c,c&&c.__data__,u,o)),x=p.length,b=l[u]=new Array(x),_=s[u]=new Array(x),A=a[u]=new Array(f);n(c,d,b,_,A,p,t);for(var P=0,I=0,m,F;P<x;++P)if(m=b[P]){for(P>=I&&(I=P+1);!(F=_[I])&&++I<x;);m._next=F||null}}return s=new pt(s,o),s._enter=l,s._exit=a,s}function wb(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function bb(){return new pt(this._exit||this._groups.map(Af),this._parents)}function Sb(e,t,n){var o=this.enter(),i=this,r=this.exit();return typeof e=="function"?(o=e(o),o&&(o=o.selection())):o=o.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?r.remove():n(r),o&&i?o.merge(i).order():i}function Eb(e){for(var t=e.selection?e.selection():e,n=this._groups,o=t._groups,i=n.length,r=o.length,s=Math.min(i,r),l=new Array(i),a=0;a<s;++a)for(var u=n[a],c=o[a],d=u.length,f=l[a]=new Array(d),p,x=0;x<d;++x)(p=u[x]||c[x])&&(f[x]=p);for(;a<i;++a)l[a]=n[a];return new pt(l,this._parents)}function xb(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var o=e[t],i=o.length-1,r=o[i],s;--i>=0;)(s=o[i])&&(r&&s.compareDocumentPosition(r)^4&&r.parentNode.insertBefore(s,r),r=s);return this}function Ab(e){e||(e=Ob);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var n=this._groups,o=n.length,i=new Array(o),r=0;r<o;++r){for(var s=n[r],l=s.length,a=i[r]=new Array(l),u,c=0;c<l;++c)(u=s[c])&&(a[c]=u);a.sort(t)}return new pt(i,this._parents).order()}function Ob(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Cb(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Nb(){return Array.from(this)}function Tb(){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 s=o[i];if(s)return s}return null}function Mb(){let e=0;for(const t of this)++e;return e}function Ib(){return!this.node()}function Pb(e){for(var t=this._groups,n=0,o=t.length;n<o;++n)for(var i=t[n],r=0,s=i.length,l;r<s;++r)(l=i[r])&&e.call(l,l.__data__,r,i);return this}function Rb(e){return function(){this.removeAttribute(e)}}function Db(e){return function(){this.removeAttributeNS(e.space,e.local)}}function kb(e,t){return function(){this.setAttribute(e,t)}}function $b(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Fb(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Lb(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Hb(e,t){var n=$r(e);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((t==null?n.local?Db:Rb:typeof t=="function"?n.local?Lb:Fb:n.local?$b:kb)(n,t))}function Of(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Wb(e){return function(){this.style.removeProperty(e)}}function zb(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Bb(e,t,n){return function(){var o=t.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function Vb(e,t,n){return arguments.length>1?this.each((t==null?Wb:typeof t=="function"?Bb:zb)(e,t,n??"")):vo(this.node(),e)}function vo(e,t){return e.style.getPropertyValue(t)||Of(e).getComputedStyle(e,null).getPropertyValue(t)}function Gb(e){return function(){delete this[e]}}function Kb(e,t){return function(){this[e]=t}}function Yb(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Ub(e,t){return arguments.length>1?this.each((t==null?Gb:typeof t=="function"?Yb:Kb)(e,t)):this.node()[e]}function Cf(e){return e.trim().split(/^|\s+/)}function kl(e){return e.classList||new Nf(e)}function Nf(e){this._node=e,this._names=Cf(e.getAttribute("class")||"")}Nf.prototype={add:function(t){var n=this._names.indexOf(t);n<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Tf(e,t){for(var n=kl(e),o=-1,i=t.length;++o<i;)n.add(t[o])}function Mf(e,t){for(var n=kl(e),o=-1,i=t.length;++o<i;)n.remove(t[o])}function Xb(e){return function(){Tf(this,e)}}function qb(e){return function(){Mf(this,e)}}function Zb(e,t){return function(){(t.apply(this,arguments)?Tf:Mf)(this,e)}}function jb(e,t){var n=Cf(e+"");if(arguments.length<2){for(var o=kl(this.node()),i=-1,r=n.length;++i<r;)if(!o.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?Zb:t?Xb:qb)(n,t))}function Jb(){this.textContent=""}function Qb(e){return function(){this.textContent=e}}function eS(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function tS(e){return arguments.length?this.each(e==null?Jb:(typeof e=="function"?eS:Qb)(e)):this.node().textContent}function nS(){this.innerHTML=""}function oS(e){return function(){this.innerHTML=e}}function iS(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function rS(e){return arguments.length?this.each(e==null?nS:(typeof e=="function"?iS:oS)(e)):this.node().innerHTML}function sS(){this.nextSibling&&this.parentNode.appendChild(this)}function lS(){return this.each(sS)}function aS(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function uS(){return this.each(aS)}function cS(e){var t=typeof e=="function"?e:bf(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function dS(){return null}function fS(e,t){var n=typeof e=="function"?e:bf(e),o=t==null?dS:typeof t=="function"?t:Dl(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function hS(){var e=this.parentNode;e&&e.removeChild(this)}function gS(){return this.each(hS)}function pS(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function vS(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function mS(e){return this.select(e?vS:pS)}function yS(e){return arguments.length?this.property("__data__",e):this.node().__data__}function _S(e){return function(t){e.call(this,t,this.__data__)}}function wS(e){return e.trim().split(/^|\s+/).map(function(t){var n="",o=t.indexOf(".");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{type:t,name:n}})}function bS(e){return function(){var t=this.__on;if(t){for(var n=0,o=-1,i=t.length,r;n<i;++n)r=t[n],(!e.type||r.type===e.type)&&r.name===e.name?this.removeEventListener(r.type,r.listener,r.options):t[++o]=r;++o?t.length=o:delete this.__on}}}function SS(e,t,n){return function(){var o=this.__on,i,r=_S(t);if(o){for(var s=0,l=o.length;s<l;++s)if((i=o[s]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=r,i.options=n),i.value=t;return}}this.addEventListener(e.type,r,n),i={type:e.type,name:e.name,value:t,listener:r,options:n},o?o.push(i):this.__on=[i]}}function ES(e,t,n){var o=wS(e+""),i,r=o.length,s;if(arguments.length<2){var l=this.node().__on;if(l){for(var a=0,u=l.length,c;a<u;++a)for(i=0,c=l[a];i<r;++i)if((s=o[i]).type===c.type&&s.name===c.name)return c.value}return}for(l=t?SS:bS,i=0;i<r;++i)this.each(l(o[i],t,n));return this}function If(e,t,n){var o=Of(e),i=o.CustomEvent;typeof i=="function"?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 xS(e,t){return function(){return If(this,e,t)}}function AS(e,t){return function(){return If(this,e,t.apply(this,arguments))}}function OS(e,t){return this.each((typeof t=="function"?AS:xS)(e,t))}function*CS(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],i=0,r=o.length,s;i<r;++i)(s=o[i])&&(yield s)}var Pf=[null];function pt(e,t){this._groups=e,this._parents=t}function ci(){return new pt([[document.documentElement]],Pf)}function NS(){return this}pt.prototype=ci.prototype={constructor:pt,select:eb,selectAll:ib,selectChild:ab,selectChildren:fb,filter:hb,data:_b,enter:gb,exit:bb,join:Sb,merge:Eb,selection:NS,order:xb,sort:Ab,call:Cb,nodes:Nb,node:Tb,size:Mb,empty:Ib,each:Pb,attr:Hb,style:Vb,property:Ub,classed:jb,text:tS,html:rS,raise:lS,lower:uS,append:cS,insert:fS,remove:gS,clone:mS,datum:yS,on:ES,dispatch:OS,[Symbol.iterator]:CS};function En(e){return typeof e=="string"?new pt([[document.querySelector(e)]],[document.documentElement]):new pt([[e]],Pf)}function TS(e){let t;for(;t=e.sourceEvent;)e=t;return e}function xn(e,t){if(e=TS(e),t===void 0&&(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()),[o.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]}const $l={capture:!0,passive:!1};function Fl(e){e.preventDefault(),e.stopImmediatePropagation()}function MS(e){var t=e.document.documentElement,n=En(e).on("dragstart.drag",Fl,$l);"onselectstart"in t?n.on("selectstart.drag",Fl,$l):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function IS(e,t){var n=e.document.documentElement,o=En(e).on("dragstart.drag",null);t&&(o.on("click.drag",Fl,$l),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in n?o.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function Ll(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Rf(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function di(){}var fi=.7,Lr=1/fi,mo="\\s*([+-]?\\d+)\\s*",hi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Yt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",PS=/^#([0-9a-f]{3,8})$/,RS=new RegExp("^rgb\\("+mo+","+mo+","+mo+"\\)$"),DS=new RegExp("^rgb\\("+Yt+","+Yt+","+Yt+"\\)$"),kS=new RegExp("^rgba\\("+mo+","+mo+","+mo+","+hi+"\\)$"),$S=new RegExp("^rgba\\("+Yt+","+Yt+","+Yt+","+hi+"\\)$"),FS=new RegExp("^hsl\\("+hi+","+Yt+","+Yt+"\\)$"),LS=new RegExp("^hsla\\("+hi+","+Yt+","+Yt+","+hi+"\\)$"),Df={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};Ll(di,gi,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:kf,formatHex:kf,formatHex8:HS,formatHsl:WS,formatRgb:$f,toString:$f});function kf(){return this.rgb().formatHex()}function HS(){return this.rgb().formatHex8()}function WS(){return zf(this).formatHsl()}function $f(){return this.rgb().formatRgb()}function gi(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=PS.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Ff(t):n===3?new ct(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Hr(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Hr(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=RS.exec(e))?new ct(t[1],t[2],t[3],1):(t=DS.exec(e))?new ct(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=kS.exec(e))?Hr(t[1],t[2],t[3],t[4]):(t=$S.exec(e))?Hr(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=FS.exec(e))?Wf(t[1],t[2]/100,t[3]/100,1):(t=LS.exec(e))?Wf(t[1],t[2]/100,t[3]/100,t[4]):Df.hasOwnProperty(e)?Ff(Df[e]):e==="transparent"?new ct(NaN,NaN,NaN,0):null}function Ff(e){return new ct(e>>16&255,e>>8&255,e&255,1)}function Hr(e,t,n,o){return o<=0&&(e=t=n=NaN),new ct(e,t,n,o)}function zS(e){return e instanceof di||(e=gi(e)),e?(e=e.rgb(),new ct(e.r,e.g,e.b,e.opacity)):new ct}function Hl(e,t,n,o){return arguments.length===1?zS(e):new ct(e,t,n,o??1)}function ct(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}Ll(ct,Hl,Rf(di,{brighter(e){return e=e==null?Lr:Math.pow(Lr,e),new ct(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?fi:Math.pow(fi,e),new ct(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ct(zn(this.r),zn(this.g),zn(this.b),Wr(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:Lf,formatHex:Lf,formatHex8:BS,formatRgb:Hf,toString:Hf}));function Lf(){return"#"+Bn(this.r)+Bn(this.g)+Bn(this.b)}function BS(){return"#"+Bn(this.r)+Bn(this.g)+Bn(this.b)+Bn((isNaN(this.opacity)?1:this.opacity)*255)}function Hf(){const e=Wr(this.opacity);return(e===1?"rgb(":"rgba(")+zn(this.r)+", "+zn(this.g)+", "+zn(this.b)+(e===1?")":", "+e+")")}function Wr(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function zn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Bn(e){return e=zn(e),(e<16?"0":"")+e.toString(16)}function Wf(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ct(e,t,n,o)}function zf(e){if(e instanceof Ct)return new Ct(e.h,e.s,e.l,e.opacity);if(e instanceof di||(e=gi(e)),!e)return new Ct;if(e instanceof Ct)return e;e=e.rgb();var t=e.r/255,n=e.g/255,o=e.b/255,i=Math.min(t,n,o),r=Math.max(t,n,o),s=NaN,l=r-i,a=(r+i)/2;return l?(t===r?s=(n-o)/l+(n<o)*6:n===r?s=(o-t)/l+2:s=(t-n)/l+4,l/=a<.5?r+i:2-r-i,s*=60):l=a>0&&a<1?0:s,new Ct(s,l,a,e.opacity)}function VS(e,t,n,o){return arguments.length===1?zf(e):new Ct(e,t,n,o??1)}function Ct(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}Ll(Ct,VS,Rf(di,{brighter(e){return e=e==null?Lr:Math.pow(Lr,e),new Ct(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?fi:Math.pow(fi,e),new Ct(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,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 ct(Wl(e>=240?e-240:e+120,i,o),Wl(e,i,o),Wl(e<120?e+240:e-120,i,o),this.opacity)},clamp(){return new Ct(Bf(this.h),zr(this.s),zr(this.l),Wr(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=Wr(this.opacity);return(e===1?"hsl(":"hsla(")+Bf(this.h)+", "+zr(this.s)*100+"%, "+zr(this.l)*100+"%"+(e===1?")":", "+e+")")}}));function Bf(e){return e=(e||0)%360,e<0?e+360:e}function zr(e){return Math.max(0,Math.min(1,e||0))}function Wl(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Vf=e=>()=>e;function GS(e,t){return function(n){return e+n*t}}function KS(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)}}function YS(e){return(e=+e)==1?Gf:function(t,n){return n-t?KS(t,n,e):Vf(isNaN(t)?n:t)}}function Gf(e,t){var n=t-e;return n?GS(e,n):Vf(isNaN(e)?t:e)}const Kf=(function e(t){var n=YS(t);function o(i,r){var s=n((i=Hl(i)).r,(r=Hl(r)).r),l=n(i.g,r.g),a=n(i.b,r.b),u=Gf(i.opacity,r.opacity);return function(c){return i.r=s(c),i.g=l(c),i.b=a(c),i.opacity=u(c),i+""}}return o.gamma=e,o})(1);function An(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var zl=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Bl=new RegExp(zl.source,"g");function US(e){return function(){return e}}function XS(e){return function(t){return e(t)+""}}function qS(e,t){var n=zl.lastIndex=Bl.lastIndex=0,o,i,r,s=-1,l=[],a=[];for(e=e+"",t=t+"";(o=zl.exec(e))&&(i=Bl.exec(t));)(r=i.index)>n&&(r=t.slice(n,r),l[s]?l[s]+=r:l[++s]=r),(o=o[0])===(i=i[0])?l[s]?l[s]+=i:l[++s]=i:(l[++s]=null,a.push({i:s,x:An(o,i)})),n=Bl.lastIndex;return n<t.length&&(r=t.slice(n),l[s]?l[s]+=r:l[++s]=r),l.length<2?a[0]?XS(a[0].x):US(t):(t=a.length,function(u){for(var c=0,d;c<t;++c)l[(d=a[c]).i]=d.x(u);return l.join("")})}var Yf=180/Math.PI,Vl={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Uf(e,t,n,o,i,r){var s,l,a;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(a=e*n+t*o)&&(n-=e*a,o-=t*a),(l=Math.sqrt(n*n+o*o))&&(n/=l,o/=l,a/=l),e*o<t*n&&(e=-e,t=-t,a=-a,s=-s),{translateX:i,translateY:r,rotate:Math.atan2(t,e)*Yf,skewX:Math.atan(a)*Yf,scaleX:s,scaleY:l}}var Br;function ZS(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Vl:Uf(t.a,t.b,t.c,t.d,t.e,t.f)}function jS(e){return e==null||(Br||(Br=document.createElementNS("http://www.w3.org/2000/svg","g")),Br.setAttribute("transform",e),!(e=Br.transform.baseVal.consolidate()))?Vl:(e=e.matrix,Uf(e.a,e.b,e.c,e.d,e.e,e.f))}function Xf(e,t,n,o){function i(u){return u.length?u.pop()+" ":""}function r(u,c,d,f,p,x){if(u!==d||c!==f){var b=p.push("translate(",null,t,null,n);x.push({i:b-4,x:An(u,d)},{i:b-2,x:An(c,f)})}else(d||f)&&p.push("translate("+d+t+f+n)}function s(u,c,d,f){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),f.push({i:d.push(i(d)+"rotate(",null,o)-2,x:An(u,c)})):c&&d.push(i(d)+"rotate("+c+o)}function l(u,c,d,f){u!==c?f.push({i:d.push(i(d)+"skewX(",null,o)-2,x:An(u,c)}):c&&d.push(i(d)+"skewX("+c+o)}function a(u,c,d,f,p,x){if(u!==d||c!==f){var b=p.push(i(p)+"scale(",null,",",null,")");x.push({i:b-4,x:An(u,d)},{i:b-2,x:An(c,f)})}else(d!==1||f!==1)&&p.push(i(p)+"scale("+d+","+f+")")}return function(u,c){var d=[],f=[];return u=e(u),c=e(c),r(u.translateX,u.translateY,c.translateX,c.translateY,d,f),s(u.rotate,c.rotate,d,f),l(u.skewX,c.skewX,d,f),a(u.scaleX,u.scaleY,c.scaleX,c.scaleY,d,f),u=c=null,function(p){for(var x=-1,b=f.length,_;++x<b;)d[(_=f[x]).i]=_.x(p);return d.join("")}}}var JS=Xf(ZS,"px, ","px)","deg)"),QS=Xf(jS,", ",")",")"),eE=1e-12;function qf(e){return((e=Math.exp(e))+1/e)/2}function tE(e){return((e=Math.exp(e))-1/e)/2}function nE(e){return((e=Math.exp(2*e))-1)/(e+1)}const oE=(function e(t,n,o){function i(r,s){var l=r[0],a=r[1],u=r[2],c=s[0],d=s[1],f=s[2],p=c-l,x=d-a,b=p*p+x*x,_,A;if(b<eE)A=Math.log(f/u)/t,_=function(G){return[l+G*p,a+G*x,u*Math.exp(t*G*A)]};else{var P=Math.sqrt(b),I=(f*f-u*u+o*b)/(2*u*n*P),m=(f*f-u*u-o*b)/(2*f*n*P),F=Math.log(Math.sqrt(I*I+1)-I),z=Math.log(Math.sqrt(m*m+1)-m);A=(z-F)/t,_=function(G){var K=G*A,Q=qf(F),re=u/(n*P)*(Q*nE(t*K+F)-tE(F));return[l+re*p,a+re*x,u*Q/qf(t*K+F)]}}return _.duration=A*1e3*t/Math.SQRT2,_}return i.rho=function(r){var s=Math.max(.001,+r),l=s*s,a=l*l;return e(s,l,a)},i})(Math.SQRT2,2,4);var yo=0,pi=0,vi=0,Zf=1e3,Vr,mi,Gr=0,Vn=0,Kr=0,yi=typeof performance=="object"&&performance.now?performance:Date,jf=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Gl(){return Vn||(jf(iE),Vn=yi.now()+Kr)}function iE(){Vn=0}function Yr(){this._call=this._time=this._next=null}Yr.prototype=Jf.prototype={constructor:Yr,restart:function(t,n,o){if(typeof t!="function")throw new TypeError("callback is not a function");o=(o==null?Gl():+o)+(n==null?0:+n),!this._next&&mi!==this&&(mi?mi._next=this:Vr=this,mi=this),this._call=t,this._time=o,Kl()},stop:function(){this._call&&(this._call=null,this._time=1/0,Kl())}};function Jf(e,t,n){var o=new Yr;return o.restart(e,t,n),o}function rE(){Gl(),++yo;for(var e=Vr,t;e;)(t=Vn-e._time)>=0&&e._call.call(void 0,t),e=e._next;--yo}function Qf(){Vn=(Gr=yi.now())+Kr,yo=pi=0;try{rE()}finally{yo=0,lE(),Vn=0}}function sE(){var e=yi.now(),t=e-Gr;t>Zf&&(Kr-=t,Gr=e)}function lE(){for(var e,t=Vr,n,o=1/0;t;)t._call?(o>t._time&&(o=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Vr=n);mi=e,Kl(o)}function Kl(e){if(!yo){pi&&(pi=clearTimeout(pi));var t=e-Vn;t>24?(e<1/0&&(pi=setTimeout(Qf,e-yi.now()-Kr)),vi&&(vi=clearInterval(vi))):(vi||(Gr=yi.now(),vi=setInterval(sE,Zf)),yo=1,jf(Qf))}}function eh(e,t,n){var o=new Yr;return t=t==null?0:+t,o.restart(i=>{o.stop(),e(i+t)},t,n),o}var aE=Pl("start","end","cancel","interrupt"),uE=[],th=0,nh=1,Yl=2,Ur=3,oh=4,Ul=5,Xr=6;function qr(e,t,n,o,i,r){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;cE(e,n,{name:t,index:o,group:i,on:aE,tween:uE,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:th})}function Xl(e,t){var n=Nt(e,t);if(n.state>th)throw new Error("too late; already scheduled");return n}function Ut(e,t){var n=Nt(e,t);if(n.state>Ur)throw new Error("too late; already running");return n}function Nt(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function cE(e,t,n){var o=e.__transition,i;o[t]=n,n.timer=Jf(r,0,n.time);function r(u){n.state=nh,n.timer.restart(s,n.delay,n.time),n.delay<=u&&s(u-n.delay)}function s(u){var c,d,f,p;if(n.state!==nh)return a();for(c in o)if(p=o[c],p.name===n.name){if(p.state===Ur)return eh(s);p.state===oh?(p.state=Xr,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete o[c]):+c<t&&(p.state=Xr,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete o[c])}if(eh(function(){n.state===Ur&&(n.state=oh,n.timer.restart(l,n.delay,n.time),l(u))}),n.state=Yl,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Yl){for(n.state=Ur,i=new Array(f=n.tween.length),c=0,d=-1;c<f;++c)(p=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(i[++d]=p);i.length=d+1}}function l(u){for(var c=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(a),n.state=Ul,1),d=-1,f=i.length;++d<f;)i[d].call(e,c);n.state===Ul&&(n.on.call("end",e,e.__data__,n.index,n.group),a())}function a(){n.state=Xr,n.timer.stop(),delete o[t];for(var u in o)return;delete e.__transition}}function Zr(e,t){var n=e.__transition,o,i,r=!0,s;if(n){t=t==null?null:t+"";for(s in n){if((o=n[s]).name!==t){r=!1;continue}i=o.state>Yl&&o.state<Ul,o.state=Xr,o.timer.stop(),o.on.call(i?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete n[s]}r&&delete e.__transition}}function dE(e){return this.each(function(){Zr(this,e)})}function fE(e,t){var n,o;return function(){var i=Ut(this,e),r=i.tween;if(r!==n){o=n=r;for(var s=0,l=o.length;s<l;++s)if(o[s].name===t){o=o.slice(),o.splice(s,1);break}}i.tween=o}}function hE(e,t,n){var o,i;if(typeof n!="function")throw new Error;return function(){var r=Ut(this,e),s=r.tween;if(s!==o){i=(o=s).slice();for(var l={name:t,value:n},a=0,u=i.length;a<u;++a)if(i[a].name===t){i[a]=l;break}a===u&&i.push(l)}r.tween=i}}function gE(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o=Nt(this.node(),n).tween,i=0,r=o.length,s;i<r;++i)if((s=o[i]).name===e)return s.value;return null}return this.each((t==null?fE:hE)(n,e,t))}function ql(e,t,n){var o=e._id;return e.each(function(){var i=Ut(this,o);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Nt(i,o).value[t]}}function ih(e,t){var n;return(typeof t=="number"?An:t instanceof gi?Kf:(n=gi(t))?(t=n,Kf):qS)(e,t)}function pE(e){return function(){this.removeAttribute(e)}}function vE(e){return function(){this.removeAttributeNS(e.space,e.local)}}function mE(e,t,n){var o,i=n+"",r;return function(){var s=this.getAttribute(e);return s===i?null:s===o?r:r=t(o=s,n)}}function yE(e,t,n){var o,i=n+"",r;return function(){var s=this.getAttributeNS(e.space,e.local);return s===i?null:s===o?r:r=t(o=s,n)}}function _E(e,t,n){var o,i,r;return function(){var s,l=n(this),a;return l==null?void this.removeAttribute(e):(s=this.getAttribute(e),a=l+"",s===a?null:s===o&&a===i?r:(i=a,r=t(o=s,l)))}}function wE(e,t,n){var o,i,r;return function(){var s,l=n(this),a;return l==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),a=l+"",s===a?null:s===o&&a===i?r:(i=a,r=t(o=s,l)))}}function bE(e,t){var n=$r(e),o=n==="transform"?QS:ih;return this.attrTween(e,typeof t=="function"?(n.local?wE:_E)(n,o,ql(this,"attr."+e,t)):t==null?(n.local?vE:pE)(n):(n.local?yE:mE)(n,o,t))}function SE(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function EE(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function xE(e,t){var n,o;function i(){var r=t.apply(this,arguments);return r!==o&&(n=(o=r)&&EE(e,r)),n}return i._value=t,i}function AE(e,t){var n,o;function i(){var r=t.apply(this,arguments);return r!==o&&(n=(o=r)&&SE(e,r)),n}return i._value=t,i}function OE(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var o=$r(e);return this.tween(n,(o.local?xE:AE)(o,t))}function CE(e,t){return function(){Xl(this,e).delay=+t.apply(this,arguments)}}function NE(e,t){return t=+t,function(){Xl(this,e).delay=t}}function TE(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?CE:NE)(t,e)):Nt(this.node(),t).delay}function ME(e,t){return function(){Ut(this,e).duration=+t.apply(this,arguments)}}function IE(e,t){return t=+t,function(){Ut(this,e).duration=t}}function PE(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?ME:IE)(t,e)):Nt(this.node(),t).duration}function RE(e,t){if(typeof t!="function")throw new Error;return function(){Ut(this,e).ease=t}}function DE(e){var t=this._id;return arguments.length?this.each(RE(t,e)):Nt(this.node(),t).ease}function kE(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Ut(this,e).ease=n}}function $E(e){if(typeof e!="function")throw new Error;return this.each(kE(this._id,e))}function FE(e){typeof e!="function"&&(e=Ef(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r=t[i],s=r.length,l=o[i]=[],a,u=0;u<s;++u)(a=r[u])&&e.call(a,a.__data__,u,r)&&l.push(a);return new ln(o,this._parents,this._name,this._id)}function LE(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),s=new Array(o),l=0;l<r;++l)for(var a=t[l],u=n[l],c=a.length,d=s[l]=new Array(c),f,p=0;p<c;++p)(f=a[p]||u[p])&&(d[p]=f);for(;l<o;++l)s[l]=t[l];return new ln(s,this._parents,this._name,this._id)}function HE(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function WE(e,t,n){var o,i,r=HE(t)?Xl:Ut;return function(){var s=r(this,e),l=s.on;l!==o&&(i=(o=l).copy()).on(t,n),s.on=i}}function zE(e,t){var n=this._id;return arguments.length<2?Nt(this.node(),n).on.on(e):this.each(WE(n,e,t))}function BE(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function VE(){return this.on("end.remove",BE(this._id))}function GE(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Dl(e));for(var o=this._groups,i=o.length,r=new Array(i),s=0;s<i;++s)for(var l=o[s],a=l.length,u=r[s]=new Array(a),c,d,f=0;f<a;++f)(c=l[f])&&(d=e.call(c,c.__data__,f,l))&&("__data__"in c&&(d.__data__=c.__data__),u[f]=d,qr(u[f],t,n,f,u,Nt(c,n)));return new ln(r,this._parents,t,n)}function KE(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Sf(e));for(var o=this._groups,i=o.length,r=[],s=[],l=0;l<i;++l)for(var a=o[l],u=a.length,c,d=0;d<u;++d)if(c=a[d]){for(var f=e.call(c,c.__data__,d,a),p,x=Nt(c,n),b=0,_=f.length;b<_;++b)(p=f[b])&&qr(p,t,n,b,f,x);r.push(f),s.push(c)}return new ln(r,s,t,n)}var YE=ci.prototype.constructor;function UE(){return new YE(this._groups,this._parents)}function XE(e,t){var n,o,i;return function(){var r=vo(this,e),s=(this.style.removeProperty(e),vo(this,e));return r===s?null:r===n&&s===o?i:i=t(n=r,o=s)}}function rh(e){return function(){this.style.removeProperty(e)}}function qE(e,t,n){var o,i=n+"",r;return function(){var s=vo(this,e);return s===i?null:s===o?r:r=t(o=s,n)}}function ZE(e,t,n){var o,i,r;return function(){var s=vo(this,e),l=n(this),a=l+"";return l==null&&(a=l=(this.style.removeProperty(e),vo(this,e))),s===a?null:s===o&&a===i?r:(i=a,r=t(o=s,l))}}function jE(e,t){var n,o,i,r="style."+t,s="end."+r,l;return function(){var a=Ut(this,e),u=a.on,c=a.value[r]==null?l||(l=rh(t)):void 0;(u!==n||i!==c)&&(o=(n=u).copy()).on(s,i=c),a.on=o}}function JE(e,t,n){var o=(e+="")=="transform"?JS:ih;return t==null?this.styleTween(e,XE(e,o)).on("end.style."+e,rh(e)):typeof t=="function"?this.styleTween(e,ZE(e,o,ql(this,"style."+e,t))).each(jE(this._id,e)):this.styleTween(e,qE(e,o,t),n).on("end.style."+e,null)}function QE(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function ex(e,t,n){var o,i;function r(){var s=t.apply(this,arguments);return s!==i&&(o=(i=s)&&QE(e,s,n)),o}return r._value=t,r}function tx(e,t,n){var o="style."+(e+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(t==null)return this.tween(o,null);if(typeof t!="function")throw new Error;return this.tween(o,ex(e,t,n??""))}function nx(e){return function(){this.textContent=e}}function ox(e){return function(){var t=e(this);this.textContent=t??""}}function ix(e){return this.tween("text",typeof e=="function"?ox(ql(this,"text",e)):nx(e==null?"":e+""))}function rx(e){return function(t){this.textContent=e.call(this,t)}}function sx(e){var t,n;function o(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&rx(i)),t}return o._value=e,o}function lx(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,sx(e))}function ax(){for(var e=this._name,t=this._id,n=sh(),o=this._groups,i=o.length,r=0;r<i;++r)for(var s=o[r],l=s.length,a,u=0;u<l;++u)if(a=s[u]){var c=Nt(a,t);qr(a,e,n,u,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new ln(o,this._parents,e,n)}function ux(){var e,t,n=this,o=n._id,i=n.size();return new Promise(function(r,s){var l={value:s},a={value:function(){--i===0&&r()}};n.each(function(){var u=Ut(this,o),c=u.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(a)),u.on=t}),i===0&&r()})}var cx=0;function ln(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function sh(){return++cx}var an=ci.prototype;ln.prototype={constructor:ln,select:GE,selectAll:KE,selectChild:an.selectChild,selectChildren:an.selectChildren,filter:FE,merge:LE,selection:UE,transition:ax,call:an.call,nodes:an.nodes,node:an.node,size:an.size,empty:an.empty,each:an.each,on:zE,attr:bE,attrTween:OE,style:JE,styleTween:tx,text:ix,textTween:lx,remove:VE,tween:gE,delay:TE,duration:PE,ease:DE,easeVarying:$E,end:ux,[Symbol.iterator]:an[Symbol.iterator]};function dx(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var fx={time:null,delay:0,duration:250,ease:dx};function hx(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error("transition "+t+" not found");return n}function gx(e){var t,n;e instanceof ln?(t=e._id,e=e._name):(t=sh(),(n=fx).time=Gl(),e=e==null?null:e+"");for(var o=this._groups,i=o.length,r=0;r<i;++r)for(var s=o[r],l=s.length,a,u=0;u<l;++u)(a=s[u])&&qr(a,e,t,u,s,n||hx(a,t));return new ln(o,this._parents,e,t)}ci.prototype.interrupt=dE,ci.prototype.transition=gx;const jr=e=>()=>e;function px(e,t){let n=t.sourceEvent,o=t.target,i=t.transform,r=t.dispatch;Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:r}})}function un(e,t,n){this.k=e,this.x=t,this.y=n}un.prototype={constructor:un,scale:function(t){return t===1?this:new un(this.k*t,this.x,this.y)},translate:function(t,n){return t===0&n===0?this:new un(this.k,this.x+this.k*t,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Zl=new un(1,0,0);un.prototype;function jl(e){e.stopImmediatePropagation()}function _i(e){e.preventDefault(),e.stopImmediatePropagation()}function vx(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function mx(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.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 lh(){return this.__zoom||Zl}function yx(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function _x(){return navigator.maxTouchPoints||"ontouchstart"in this}function wx(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],s=e.invertY(t[1][1])-n[1][1];return e.translate(i>o?(o+i)/2:Math.min(0,o)||Math.max(0,i),s>r?(r+s)/2:Math.min(0,r)||Math.max(0,s))}function bx(){var e=vx,t=mx,n=wx,o=yx,i=_x,r=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,a=oE,u=Pl("start","zoom","end"),c,d,f,p=500,x=150,b=0,_=10;function A(g){g.property("__zoom",lh).on("wheel.zoom",G,{passive:!1}).on("mousedown.zoom",K).on("dblclick.zoom",Q).filter(i).on("touchstart.zoom",re).on("touchmove.zoom",ee).on("touchend.zoom touchcancel.zoom",oe).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}A.transform=function(g,O,R,$){var N=g.selection?g.selection():g;N.property("__zoom",lh),g!==N?F(g,O,R,$):N.interrupt().each(function(){z(this,arguments).event($).start().zoom(null,typeof O=="function"?O.apply(this,arguments):O).end()})},A.scaleBy=function(g,O,R,$){A.scaleTo(g,function(){var N=this.__zoom.k,L=typeof O=="function"?O.apply(this,arguments):O;return N*L},R,$)},A.scaleTo=function(g,O,R,$){A.transform(g,function(){var N=t.apply(this,arguments),L=this.__zoom,H=R==null?m(N):typeof R=="function"?R.apply(this,arguments):R,W=L.invert(H),D=typeof O=="function"?O.apply(this,arguments):O;return n(I(P(L,D),H,W),N,s)},R,$)},A.translateBy=function(g,O,R,$){A.transform(g,function(){return n(this.__zoom.translate(typeof O=="function"?O.apply(this,arguments):O,typeof R=="function"?R.apply(this,arguments):R),t.apply(this,arguments),s)},null,$)},A.translateTo=function(g,O,R,$,N){A.transform(g,function(){var L=t.apply(this,arguments),H=this.__zoom,W=$==null?m(L):typeof $=="function"?$.apply(this,arguments):$;return n(Zl.translate(W[0],W[1]).scale(H.k).translate(typeof O=="function"?-O.apply(this,arguments):-O,typeof R=="function"?-R.apply(this,arguments):-R),L,s)},$,N)};function P(g,O){return O=Math.max(r[0],Math.min(r[1],O)),O===g.k?g:new un(O,g.x,g.y)}function I(g,O,R){var $=O[0]-R[0]*g.k,N=O[1]-R[1]*g.k;return $===g.x&&N===g.y?g:new un(g.k,$,N)}function m(g){return[(+g[0][0]+ +g[1][0])/2,(+g[0][1]+ +g[1][1])/2]}function F(g,O,R,$){g.on("start.zoom",function(){z(this,arguments).event($).start()}).on("interrupt.zoom end.zoom",function(){z(this,arguments).event($).end()}).tween("zoom",function(){var N=this,L=arguments,H=z(N,L).event($),W=t.apply(N,L),D=R==null?m(W):typeof R=="function"?R.apply(N,L):R,Z=Math.max(W[1][0]-W[0][0],W[1][1]-W[0][1]),le=N.__zoom,ce=typeof O=="function"?O.apply(N,L):O,Y=a(le.invert(D).concat(Z/le.k),ce.invert(D).concat(Z/ce.k));return function(j){if(j===1)j=ce;else{var ne=Y(j),pe=Z/ne[2];j=new un(pe,D[0]-ne[0]*pe,D[1]-ne[1]*pe)}H.zoom(null,j)}})}function z(g,O,R){return!R&&g.__zooming||new q(g,O)}function q(g,O){this.that=g,this.args=O,this.active=0,this.sourceEvent=null,this.extent=t.apply(g,O),this.taps=0}q.prototype={event:function(O){return O&&(this.sourceEvent=O),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(O,R){return this.mouse&&O!=="mouse"&&(this.mouse[1]=R.invert(this.mouse[0])),this.touch0&&O!=="touch"&&(this.touch0[1]=R.invert(this.touch0[0])),this.touch1&&O!=="touch"&&(this.touch1[1]=R.invert(this.touch1[0])),this.that.__zoom=R,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(O){var R=En(this.that).datum();u.call(O,this.that,new px(O,{sourceEvent:this.sourceEvent,target:A,transform:this.that.__zoom,dispatch:u}),R)}};function G(g){for(var O=arguments.length,R=new Array(O>1?O-1:0),$=1;$<O;$++)R[$-1]=arguments[$];if(!e.apply(this,arguments))return;var N=z(this,R).event(g),L=this.__zoom,H=Math.max(r[0],Math.min(r[1],L.k*Math.pow(2,o.apply(this,arguments)))),W=xn(g);if(N.wheel)(N.mouse[0][0]!==W[0]||N.mouse[0][1]!==W[1])&&(N.mouse[1]=L.invert(N.mouse[0]=W)),clearTimeout(N.wheel);else{if(L.k===H)return;N.mouse=[W,L.invert(W)],Zr(this),N.start()}_i(g),N.wheel=setTimeout(D,x),N.zoom("mouse",n(I(P(L,H),N.mouse[0],N.mouse[1]),N.extent,s));function D(){N.wheel=null,N.end()}}function K(g){for(var O=arguments.length,R=new Array(O>1?O-1:0),$=1;$<O;$++)R[$-1]=arguments[$];if(f||!e.apply(this,arguments))return;var N=g.currentTarget,L=z(this,R,!0).event(g),H=En(g.view).on("mousemove.zoom",le,!0).on("mouseup.zoom",ce,!0),W=xn(g,N),D=g.clientX,Z=g.clientY;MS(g.view),jl(g),L.mouse=[W,this.__zoom.invert(W)],Zr(this),L.start();function le(Y){if(_i(Y),!L.moved){var j=Y.clientX-D,ne=Y.clientY-Z;L.moved=j*j+ne*ne>b}L.event(Y).zoom("mouse",n(I(L.that.__zoom,L.mouse[0]=xn(Y,N),L.mouse[1]),L.extent,s))}function ce(Y){H.on("mousemove.zoom mouseup.zoom",null),IS(Y.view,L.moved),_i(Y),L.event(Y).end()}}function Q(g){for(var O=arguments.length,R=new Array(O>1?O-1:0),$=1;$<O;$++)R[$-1]=arguments[$];if(e.apply(this,arguments)){var N=this.__zoom,L=xn(g.changedTouches?g.changedTouches[0]:g,this),H=N.invert(L),W=N.k*(g.shiftKey?.5:2),D=n(I(P(N,W),L,H),t.apply(this,R),s);_i(g),l>0?En(this).transition().duration(l).call(F,D,L,g):En(this).call(A.transform,D,L,g)}}function re(g){for(var O=arguments.length,R=new Array(O>1?O-1:0),$=1;$<O;$++)R[$-1]=arguments[$];if(e.apply(this,arguments)){var N=g.touches,L=N.length,H=z(this,R,g.changedTouches.length===L).event(g),W,D,Z,le;for(jl(g),D=0;D<L;++D)Z=N[D],le=xn(Z,this),le=[le,this.__zoom.invert(le),Z.identifier],H.touch0?!H.touch1&&H.touch0[2]!==le[2]&&(H.touch1=le,H.taps=0):(H.touch0=le,W=!0,H.taps=1+!!c);c&&(c=clearTimeout(c)),W&&(H.taps<2&&(d=le[0],c=setTimeout(function(){c=null},p)),Zr(this),H.start())}}function ee(g){if(this.__zooming){for(var O=arguments.length,R=new Array(O>1?O-1:0),$=1;$<O;$++)R[$-1]=arguments[$];var N=z(this,R).event(g),L=g.changedTouches,H=L.length,W,D,Z,le;for(_i(g),W=0;W<H;++W)D=L[W],Z=xn(D,this),N.touch0&&N.touch0[2]===D.identifier?N.touch0[0]=Z:N.touch1&&N.touch1[2]===D.identifier&&(N.touch1[0]=Z);if(D=N.that.__zoom,N.touch1){var ce=N.touch0[0],Y=N.touch0[1],j=N.touch1[0],ne=N.touch1[1],pe=(pe=j[0]-ce[0])*pe+(pe=j[1]-ce[1])*pe,me=(me=ne[0]-Y[0])*me+(me=ne[1]-Y[1])*me;D=P(D,Math.sqrt(pe/me)),Z=[(ce[0]+j[0])/2,(ce[1]+j[1])/2],le=[(Y[0]+ne[0])/2,(Y[1]+ne[1])/2]}else if(N.touch0)Z=N.touch0[0],le=N.touch0[1];else return;N.zoom("touch",n(I(D,Z,le),N.extent,s))}}function oe(g){for(var O=arguments.length,R=new Array(O>1?O-1:0),$=1;$<O;$++)R[$-1]=arguments[$];if(this.__zooming){var N=z(this,R).event(g),L=g.changedTouches,H=L.length,W,D;for(jl(g),f&&clearTimeout(f),f=setTimeout(function(){f=null},p),W=0;W<H;++W)D=L[W],N.touch0&&N.touch0[2]===D.identifier?delete N.touch0:N.touch1&&N.touch1[2]===D.identifier&&delete N.touch1;if(N.touch1&&!N.touch0&&(N.touch0=N.touch1,delete N.touch1),N.touch0)N.touch0[1]=this.__zoom.invert(N.touch0[0]);else if(N.end(),N.taps===2&&(D=xn(D,this),Math.hypot(d[0]-D[0],d[1]-D[1])<_)){var Z=En(this).on("dblclick.zoom");Z&&Z.apply(this,arguments)}}}return A.wheelDelta=function(g){return arguments.length?(o=typeof g=="function"?g:jr(+g),A):o},A.filter=function(g){return arguments.length?(e=typeof g=="function"?g:jr(!!g),A):e},A.touchable=function(g){return arguments.length?(i=typeof g=="function"?g:jr(!!g),A):i},A.extent=function(g){return arguments.length?(t=typeof g=="function"?g:jr([[+g[0][0],+g[0][1]],[+g[1][0],+g[1][1]]]),A):t},A.scaleExtent=function(g){return arguments.length?(r[0]=+g[0],r[1]=+g[1],A):[r[0],r[1]]},A.translateExtent=function(g){return arguments.length?(s[0][0]=+g[0][0],s[1][0]=+g[1][0],s[0][1]=+g[0][1],s[1][1]=+g[1][1],A):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},A.constrain=function(g){return arguments.length?(n=g,A):n},A.duration=function(g){return arguments.length?(l=+g,A):l},A.interpolate=function(g){return arguments.length?(a=g,A):a},A.on=function(){var g=u.on.apply(u,arguments);return g===u?A:g},A.clickDistance=function(g){return arguments.length?(b=(g=+g)*g,A):Math.sqrt(b)},A.tapDistance=function(g){return arguments.length?(_=+g,A):_},A}const ah=Symbol("MiniMapSlots"),Sx=["id","x","y","rx","ry","width","height","fill","stroke","stroke-width","shape-rendering"],Ex={name:"MiniMapNode",compatConfig:{MODE:3},inheritAttrs:!1},xx=$e(ie({},Ex,{props:{id:{},type:{},selected:{type:Boolean},dragging:{type:Boolean},position:{},dimensions:{},borderRadius:{},color:{},shapeRendering:{},strokeColor:{},strokeWidth:{},hidden:{type:Boolean}},emits:["click","dblclick","mouseenter","mousemove","mouseleave"],setup(e,t){let n=t.emit;const o=e,i=vt(ah),r=Os(),s=De(()=>{var f;return(f=r.style)!=null?f:{}});function l(f){n("click",f)}function a(f){n("dblclick",f)}function u(f){n("mouseenter",f)}function c(f){n("mousemove",f)}function d(f){n("mouseleave",f)}return(f,p)=>!f.hidden&&f.dimensions.width!==0&&f.dimensions.height!==0?(se(),ge(He,{key:0},[de(i)["node-"+o.type]?(se(),qe(cu(de(i)["node-"+o.type]),_h(Ho({key:0},ie({},o,f.$attrs))),null,16)):(se(),ge("rect",Ho({key:1,id:f.id},f.$attrs,{class:["vue-flow__minimap-node",{selected:f.selected,dragging:f.dragging}],x:f.position.x,y:f.position.y,rx:f.borderRadius,ry:f.borderRadius,width:f.dimensions.width,height:f.dimensions.height,fill:f.color||s.value.background||s.value.backgroundColor,stroke:f.strokeColor,"stroke-width":f.strokeWidth,"shape-rendering":f.shapeRendering,onClick:l,onDblclick:a,onMouseenter:u,onMousemove:c,onMouseleave:d}),null,16,Sx))],64)):Ee("",!0)}})),Ax=["width","height","viewBox","aria-labelledby"],Ox=["id"],Cx=["d","fill","stroke","stroke-width"],Nx={name:"MiniMap",compatConfig:{MODE:3}},Tx=$e(ie({},Nx,{props:{nodeColor:{type:[String,Function],default:"#e2e2e2"},nodeStrokeColor:{type:[String,Function],default:"transparent"},nodeClassName:{type:[String,Function]},nodeBorderRadius:{default:5},nodeStrokeWidth:{default:2},maskColor:{default:"rgb(240, 240, 240, 0.6)"},maskStrokeColor:{default:"none"},maskStrokeWidth:{default:1},position:{default:"bottom-right"},pannable:{type:Boolean,default:!1},zoomable:{type:Boolean,default:!1},width:{},height:{},ariaLabel:{default:"Vue Flow mini map"},inversePan:{type:Boolean,default:!1},zoomStep:{default:1},offsetScale:{default:5},maskBorderRadius:{default:0}},emits:["click","nodeClick","nodeDblclick","nodeMouseenter","nodeMousemove","nodeMouseleave"],setup(e,t){let n=t.emit;const o=gu(),i=Os(),r=200,s=150,l=ke(),a=l.id,u=l.edges,c=l.viewport,d=l.translateExtent,f=l.dimensions,p=l.emits,x=l.d3Selection,b=l.d3Zoom,_=l.getNodesInitialized,A=Ce();vn(ah,o);const P=De(()=>{var H,W,D;return(H=(W=e.width)!=null?W:(D=i.style)==null?void 0:D.width)!=null?H:r}),I=De(()=>{var H,W,D;return(H=(W=e.height)!=null?W:(D=i.style)==null?void 0:D.height)!=null?H:s}),m=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision",F=fe(()=>typeof e.nodeColor=="string"?()=>e.nodeColor:e.nodeColor),z=fe(()=>typeof e.nodeStrokeColor=="string"?()=>e.nodeStrokeColor:e.nodeStrokeColor),q=fe(()=>typeof e.nodeClassName=="string"?()=>e.nodeClassName:typeof e.nodeClassName=="function"?e.nodeClassName:()=>""),G=fe(()=>_l(_.value.filter(H=>!H.hidden))),K=fe(()=>({x:-c.value.x/c.value.zoom,y:-c.value.y/c.value.zoom,width:f.value.width/c.value.zoom,height:f.value.height/c.value.zoom})),Q=fe(()=>_.value&&_.value.length?k_(G.value,K.value):K.value),re=fe(()=>{const H=Q.value.width/P.value,W=Q.value.height/I.value;return Math.max(H,W)}),ee=fe(()=>{const H=re.value*P.value,W=re.value*I.value,D=e.offsetScale*re.value;return{offset:D,x:Q.value.x-(H-Q.value.width)/2-D,y:Q.value.y-(W-Q.value.height)/2-D,width:H+D*2,height:W+D*2}}),oe=fe(()=>!ee.value.x||!ee.value.y?"":`
    M`+(ee.value.x-ee.value.offset)+","+(ee.value.y-ee.value.offset)+`
    h`+(ee.value.width+ee.value.offset*2)+`
    v`+(ee.value.height+ee.value.offset*2)+`
    h`+(-ee.value.width-ee.value.offset*2)+`z
    M`+(K.value.x+e.maskBorderRadius)+","+K.value.y+`
    h`+(K.value.width-2*e.maskBorderRadius)+`
    a`+e.maskBorderRadius+","+e.maskBorderRadius+" 0 0 1 "+e.maskBorderRadius+","+e.maskBorderRadius+`
    v`+(K.value.height-2*e.maskBorderRadius)+`
    a`+e.maskBorderRadius+","+e.maskBorderRadius+" 0 0 1 -"+e.maskBorderRadius+","+e.maskBorderRadius+`
    h`+-(K.value.width-2*e.maskBorderRadius)+`
    a`+e.maskBorderRadius+","+e.maskBorderRadius+" 0 0 1 -"+e.maskBorderRadius+",-"+e.maskBorderRadius+`
    v`+-(K.value.height-2*e.maskBorderRadius)+`
    a`+e.maskBorderRadius+","+e.maskBorderRadius+" 0 0 1 "+e.maskBorderRadius+",-"+e.maskBorderRadius+"z");ug(H=>{if(A.value){const W=En(A.value),D=ce=>{if(ce.sourceEvent.type!=="wheel"||!x.value||!b.value)return;const Y=ce.sourceEvent.ctrlKey&&li()?10:1,j=-ce.sourceEvent.deltaY*(ce.sourceEvent.deltaMode===1?.05:ce.sourceEvent.deltaMode?1:.002)*e.zoomStep,ne=c.value.zoom*2**(j*Y);b.value.scaleTo(x.value,ne)},Z=ce=>{if(ce.sourceEvent.type!=="mousemove"||!x.value||!b.value)return;const Y=re.value*Math.max(1,c.value.zoom)*(e.inversePan?-1:1),j={x:c.value.x-ce.sourceEvent.movementX*Y,y:c.value.y-ce.sourceEvent.movementY*Y},ne=[[0,0],[f.value.width,f.value.height]],pe=Zl.translate(j.x,j.y).scale(c.value.zoom),me=b.value.constrain()(pe,ne,d.value);b.value.transform(x.value,me)},le=bx().wheelDelta(ce=>wl(ce)*(e.zoomStep/10)).on("zoom",e.pannable?Z:()=>{}).on("zoom.wheel",e.zoomable?D:()=>{});W.call(le),H(()=>{W.on("zoom",null)})}},{flush:"post"});function g(H){const W=xn(H),D=W[0],Z=W[1];n("click",{event:H,position:{x:D,y:Z}})}function O(H,W){const D={event:H,node:W,connectedEdges:Wn([W],u.value)};p.miniMapNodeClick(D),n("nodeClick",D)}function R(H,W){const D={event:H,node:W,connectedEdges:Wn([W],u.value)};p.miniMapNodeDoubleClick(D),n("nodeDblclick",D)}function $(H,W){const D={event:H,node:W,connectedEdges:Wn([W],u.value)};p.miniMapNodeMouseEnter(D),n("nodeMouseenter",D)}function N(H,W){const D={event:H,node:W,connectedEdges:Wn([W],u.value)};p.miniMapNodeMouseMove(D),n("nodeMousemove",D)}function L(H,W){const D={event:H,node:W,connectedEdges:Wn([W],u.value)};p.miniMapNodeMouseLeave(D),n("nodeMouseleave",D)}return(H,W)=>(se(),qe(de(vf),{position:H.position,class:Be(["vue-flow__minimap",{pannable:H.pannable,zoomable:H.zoomable}])},{default:pn(()=>[(se(),ge("svg",{ref_key:"el",ref:A,width:P.value,height:I.value,viewBox:[ee.value.x,ee.value.y,ee.value.width,ee.value.height].join(" "),role:"img","aria-labelledby":"vue-flow__minimap-"+de(a),onClick:g},[H.ariaLabel?(se(),ge("title",{key:0,id:"vue-flow__minimap-"+de(a)},ve(H.ariaLabel),9,Ox)):Ee("",!0),(se(!0),ge(He,null,Qn(de(_),D=>(se(),qe(xx,{id:D.id,key:D.id,f:"",position:D.computedPosition,dimensions:D.dimensions,selected:D.selected,dragging:D.dragging,style:Xe(D.style),class:Be(q.value(D)),color:F.value(D),"border-radius":H.nodeBorderRadius,"stroke-color":z.value(D),"stroke-width":H.nodeStrokeWidth,"shape-rendering":de(m),type:D.type,hidden:D.hidden,onClick:Z=>O(Z,D),onDblclick:Z=>R(Z,D),onMouseenter:Z=>$(Z,D),onMousemove:Z=>N(Z,D),onMouseleave:Z=>L(Z,D)},null,8,["id","position","dimensions","selected","dragging","style","class","color","border-radius","stroke-color","stroke-width","shape-rendering","type","hidden","onClick","onDblclick","onMouseenter","onMousemove","onMouseleave"]))),128)),te("path",{class:"vue-flow__minimap-mask",d:oe.value,fill:H.maskColor,stroke:H.maskStrokeColor,"stroke-width":H.maskStrokeWidth,"fill-rule":"evenodd"},null,8,Cx)],8,Ax))]),_:1},8,["position","class"]))}}));var Jl={name:"StageNode",setup(){const{connectionStartHandle:e}=ke();return{connectionStartHandle:e}},components:{Handle:ui},props:{data:{type:Object,required:!0}},data(){return{showActions:!1,isHoveredOrFocused:!1,hoverTimeout:null,blurTimeout:null}},computed:{isConnecting(){return!!this.connectionStartHandle},Position(){return he},stage(){return this.data.stage},isSelected(){return this.data.isSelected},stageStyle(){return{borderColor:"var(--code-color) !important",borderWidth:this.isSelected?"3px !important":"0 !important",background:this.data.isSpecial?"purple !important":"rgb(var(--primary-rgb)) !important",padding:this.isSelected?"4px !important":"6px !important"}},onSelected(){return this.data.onSelect?.()},onEscape(){return this.data.onEscape?.()}},methods:{toggleActions(){this.showActions?this.closeActions():this.openActions()},openActions(){this.data.onSelect?.(),this.showActions=!0,this.$nextTick(()=>{const e=this.$refs.editButton||this.$refs.deleteButton;e&&e.focus()}),document.addEventListener("click",this.closeActions)},closeActions(){this.showActions&&document.removeEventListener("click",this.closeActions),this.data.onEscape?.(),clearTimeout(this.hoverTimeout),clearTimeout(this.blurTimeout),this.showActions=!1,this.$nextTick(()=>{this.$refs.menuButton&&this.$refs.menuButton.focus()})},handleEdit(){this.closeActions(),this.data?.onEdit?.()},handleDelete(){this.closeActions(),this.data?.onDelete?.()},onNodeEnter(){clearTimeout(this.hoverTimeout),this.isHoveredOrFocused=!0},onNodeLeave(){this.hoverTimeout=setTimeout(()=>{this.showActions||(this.isHoveredOrFocused=!1)},100)},onDropdownEnter(){clearTimeout(this.blurTimeout)}}};const Mx=["data-stage-id","aria-describedby"],Ix={key:0,class:"position-absolute top-25-px end-20-px h-100 rounded bg-secondary bg-opacity-75 z-2 pe-none","aria-hidden":"true"},Px=["id","aria-labelledby"],Rx={class:"visually-hidden"},Dx=["title"],kx=["title"],$x={key:2,class:"stage-handles","aria-hidden":"true"},Fx={class:"card-header d-flex justify-content-between align-items-start p-1 pe-0 z-1 position-relative"},Lx={class:"flex-fill w-75 me-3"},Hx=["title"],Wx=["id","title"],zx={key:0,class:"stage-card-actions align-items-center d-flex position-relative"},Bx=["id","title","aria-expanded","aria-controls"],Vx={class:"visually-hidden"},Gx={class:"card-body px-1 py-0 z-1 position-relative"},Kx={class:"d-flex justify-content-between align-items-center"},Yx={key:0,class:"badge bg-warning bg-opacity-10 rounded-pill p-1"};function Ux(e,t,n,o,i,r){const s=Ft("Handle");return se(),ge("div",{class:"stage-node card border shadow-sm position-relative",tabindex:"0",role:"button",style:Xe(r.stageStyle),"data-stage-id":r.stage?.id,"aria-describedby":`stage-${r.stage?.id}-description`,onMouseenter:t[10]||(t[10]=(...l)=>r.onNodeEnter&&r.onNodeEnter(...l)),onMouseleave:t[11]||(t[11]=(...l)=>r.onNodeLeave&&r.onNodeLeave(...l)),onClick:t[12]||(t[12]=(...l)=>r.onSelected&&r.onSelected(...l)),onKeydown:[t[13]||(t[13]=Pe(Ge((...l)=>r.openActions&&r.openActions(...l),["stop","prevent"]),["enter"])),t[14]||(t[14]=Pe(Ge((...l)=>r.openActions&&r.openActions(...l),["prevent","stop"]),["space"])),t[15]||(t[15]=Pe((...l)=>r.closeActions&&r.closeActions(...l),["esc"])),t[16]||(t[16]=Pe((...l)=>r.closeActions&&r.closeActions(...l),["tab"]))]},[Ee(" Dropdown Overlay "),i.showActions?(se(),ge("div",Ix)):Ee("v-if",!0),Ee(" Actions Dropdown "),i.showActions?(se(),ge("nav",{key:1,id:`stage-actions-menu-${r.stage?.id}`,ref:"actionsMenu",class:"workflow-browser-actions-list position-absolute top-25-px end-20-px opacity-100 d-flex flex-column border rounded shadow-sm z-3 p-1","aria-orientation":"vertical","aria-labelledby":`stage-${r.stage?.id}-menu-button`,onMouseenter:t[6]||(t[6]=(...l)=>r.onDropdownEnter&&r.onDropdownEnter(...l))},[te("span",Rx,ve(e.sprintf("COM_WORKFLOW_GRAPH_STAGE_ACTIONS",r.stage?.title)),1),r.stage?.permissions?.edit?(se(),ge("button",{key:0,ref:"editButton",class:"btn btn-sm btn-secondary text-start text-white fw-semibold text-truncate",role:"menuitem",tabindex:"0",title:e.translate("COM_WORKFLOW_GRAPH_EDIT_STAGE"),onClick:t[0]||(t[0]=(...l)=>r.handleEdit&&r.handleEdit(...l)),onKeydown:[t[1]||(t[1]=Pe((...l)=>r.handleEdit&&r.handleEdit(...l),["enter"])),t[2]||(t[2]=Pe((...l)=>r.handleEdit&&r.handleEdit(...l),["space"]))]},[t[17]||(t[17]=te("span",{class:"icon icon-pencil-alt me-1","aria-hidden":"true"},null,-1)),Lt(" "+ve(e.translate("COM_WORKFLOW_GRAPH_EDIT_STAGE")),1)],40,Dx)):Ee("v-if",!0),r.stage?.permissions?.delete&&!r.stage.default?(se(),ge("button",{key:1,ref:"deleteButton",class:"btn btn-sm btn-danger mt-1 text-start text-white fw-semibold text-truncate",role:"menuitem",tabindex:"0",title:e.translate("COM_WORKFLOW_GRAPH_TRASH_STAGE"),onClick:t[3]||(t[3]=(...l)=>r.handleDelete&&r.handleDelete(...l)),onKeydown:[t[4]||(t[4]=Pe((...l)=>r.handleDelete&&r.handleDelete(...l),["enter"])),t[5]||(t[5]=Pe(Ge((...l)=>r.handleDelete&&r.handleDelete(...l),["prevent","stop"]),["space"]))]},[t[18]||(t[18]=te("span",{class:"icon icon-trash me-1","aria-hidden":"true"},null,-1)),Lt(" "+ve(e.translate("COM_WORKFLOW_GRAPH_TRASH_STAGE")),1)],40,kx)):Ee("v-if",!0)],40,Px)):Ee("v-if",!0),Ee(" Connection Handles "),r.stage.published?(se(),ge("div",$x,[Ne(s,{type:"target",class:Be(["edge-handler bg-success position-absolute top-0 start-50 translate-middle-x rounded-circle",{invisible:!i.isHoveredOrFocused||i.showActions||!r.isConnecting}]),position:r.Position.Top,"aria-hidden":"true"},null,8,["class","position"]),Ne(s,{type:"source",class:Be(["edge-handler bg-success position-absolute bottom-0 start-50 translate-middle-x rounded-circle",{invisible:!i.isHoveredOrFocused||i.showActions}]),position:r.Position.Bottom,"aria-hidden":"true"},null,8,["class","position"]),Ne(s,{type:"target",class:Be(["edge-handler bg-success position-absolute top-50 start-0 translate-middle-y rounded-circle",{invisible:!i.isHoveredOrFocused||i.showActions||!r.isConnecting}]),position:r.Position.Left,"aria-hidden":"true"},null,8,["class","position"]),Ne(s,{type:"source",class:Be(["edge-handler bg-success position-absolute top-50 end-0 translate-middle-y rounded-circle",{invisible:!i.isHoveredOrFocused||i.showActions}]),position:r.Position.Right,"aria-hidden":"true"},null,8,["position","class"])])):Ee("v-if",!0),te("div",Fx,[te("div",Lx,[te("span",{class:"h3 d-block card-title mb-1 text-white fw-semibold text-truncate",title:e.translate(r.stage?.title)},ve(e.translate(r.stage.title)),9,Hx),te("span",{id:`stage-${r.stage?.id}-description`,class:"card-text text-white-50 mb-0 text-truncate d-block",title:e.translate(r.stage?.description?r.stage.description:"")},ve(e.translate(r.stage.description?r.stage.description:"")),9,Wx)]),Ee(" Actions Button "),n.data?.isSpecial?Ee("v-if",!0):(se(),ge("div",zx,[te("button",{id:`stage-${r.stage?.id}-menu-button`,ref:"menuButton",class:Be(["btn btn-sm btn-light px-1 py-0",{invisible:!i.isHoveredOrFocused&&!i.showActions}]),style:{transition:"opacity 0.2s ease"},title:i.showActions?e.sprintf("COM_WORKFLOW_GRAPH_CLOSE_ACTIONS_MENU",r.stage?.title):e.sprintf("COM_WORKFLOW_GRAPH_OPEN_ACTIONS_MENU",r.stage?.title),"aria-haspopup":"true","aria-expanded":i.showActions,"aria-controls":`stage-actions-menu-${r.stage?.id}`,onClick:t[7]||(t[7]=Ge((...l)=>r.toggleActions&&r.toggleActions(...l),["stop"])),onKeydown:[t[8]||(t[8]=Pe(Ge((...l)=>r.toggleActions&&r.toggleActions(...l),["stop"]),["enter"])),t[9]||(t[9]=Pe(Ge((...l)=>r.toggleActions&&r.toggleActions(...l),["prevent","stop"]),["space"]))]},[te("span",{class:Be(i.showActions?"icon icon-times":"icon icon-ellipsis-h"),"aria-hidden":"true"},null,2),te("span",Vx,ve(i.showActions?e.sprintf("COM_WORKFLOW_GRAPH_CLOSE_ACTIONS_MENU",r.stage?.title):e.sprintf("COM_WORKFLOW_GRAPH_OPEN_ACTIONS_MENU",r.stage?.title)),1)],42,Bx)]))]),Ee(" Body "),te("div",Gx,[te("div",Kx,[te("span",{class:Be([r.stage.published?"bg-success":"bg-danger","badge rounded-pill p-1"])},ve(r.stage.published?e.translate("COM_WORKFLOW_GRAPH_ENABLED"):e.translate("COM_WORKFLOW_GRAPH_DISABLED")),3),r.stage.default?(se(),ge("span",Yx,ve(e.translate("COM_WORKFLOW_GRAPH_DEFAULT")),1)):Ee("v-if",!0)])])],44,Mx)}Jl.render=Ux,Jl.__file="administrator/components/com_workflow/resources/scripts/components/nodes/StageNode.vue";var Ql={name:"CustomEdge",components:{EdgeLabelRenderer:Iw},props:{id:{type:String,default:""},sourceX:{type:Number,default:0},sourceY:{type:Number,default:0},targetX:{type:Number,default:0},targetY:{type:Number,default:0},sourcePosition:{type:String,default:""},targetPosition:{type:String,default:""},style:{type:Object,default:()=>({})},markerEnd:{type:Object,default:()=>({})},data:{type:Object,default:()=>({})}},data(){return{showActions:!1,isHovered:!1,maxWidth:100,blurTimeout:null,hoverTimeout:null}},computed:{edgeData(){const e=this.data?.offsetIndex||0,t=this.targetX-this.sourceX,n=this.targetY-this.sourceY,o=Math.sqrt(t*t+n*n)||1,i=-n/o,r=t/o,s=40*e,l=(this.sourceX+this.targetX)/2+i*s,a=(this.sourceY+this.targetY)/2+r*s;return Dr({sourceX:this.sourceX,sourceY:this.sourceY,targetX:this.targetX,targetY:this.targetY,sourcePosition:this.sourcePosition,targetPosition:this.targetPosition,centerX:l,centerY:a,borderRadius:10,offset:10})},edgePath(){return this.edgeData[0]},labelX(){return this.edgeData[1]+((this.data?.isBiDirectional&&this.sourceY<this.targetY&&this.data?.offsetIndex?this.data?.offsetIndex:0)||0)*this.maxWidth},labelY(){return this.edgeData[2]+((this.data?.isBiDirectional&&this.sourceY>this.targetY&&this.data?.offsetIndex?this.data?.offsetIndex:0)||0)*75},sourceStageTitle(){return this.data?.from_stage_title||`JSTAGE ${this.data?.from_stage_id||"Unknown"}`},targetStageTitle(){return this.data?.to_stage_title||`JSTAGE ${this.data?.to_stage_id||"Unknown"}`},menuItems(){const e=[];return this.data?.permissions?.edit&&this.$refs.editButton&&e.push(this.$refs.editButton),this.data?.permissions?.delete&&this.$refs.deleteButton&&e.push(this.$refs.deleteButton),e}},watch:{"data.title":{handler:"updateLabelWidth",immediate:!0}},mounted(){this.updateLabelWidth()},beforeUnmount(){this.blurTimeout&&clearTimeout(this.blurTimeout),this.hoverTimeout&&clearTimeout(this.hoverTimeout)},methods:{toggleActions(){this.showActions?this.closeActions():this.openActions()},openActions(){this.data?.onSelect?.(),this.showActions=!0,this.$nextTick(()=>{const e=this.$refs.editButton||this.$refs.deleteButton;e&&e.focus()}),document.addEventListener("click",this.closeActions)},closeActions(){this.showActions&&document.removeEventListener("click",this.closeActions),this.data.onEscape?.(),clearTimeout(this.hoverTimeout),clearTimeout(this.blurTimeout),this.showActions=!1,this.$nextTick(()=>{this.$refs.menuButton&&this.$refs.menuButton.focus()})},handleEdit(){this.closeActions(),this.data?.onEdit?.()},handleDelete(){this.closeActions(),this.data?.onDelete?.()},onNodeEnter(){clearTimeout(this.hoverTimeout),this.isHovered=!0},onNodeLeave(){this.hoverTimeout=setTimeout(()=>{this.showActions||(this.isHovered=!1)},100)},onDropdownEnter(){clearTimeout(this.blurTimeout)},onSelected(){return this.data?.onSelect?.()},updateLabelWidth(){this.$nextTick(()=>{if(this.$refs.textMeasurer){const e=this.$refs.textMeasurer.offsetWidth;this.maxWidth=Math.min(e+50,300)}})}}};const Xx=["aria-label"],qx=["d","aria-label","stroke","stroke-width","stroke-dasharray","marker-end"],Zx=["data-edge-id","aria-pressed"],jx={key:0,class:"position-absolute top-25-px end-20-px h-100 rounded bg-secondary bg-opacity-75 pe-none","aria-hidden":"true"},Jx={class:"custom-edge d-flex flex-column border rounded shadow-sm position-absolute"},Qx=["id","aria-labelledby"],eA={class:"visually-hidden"},tA=["title"],nA=["title"],oA={class:"d-flex justify-content-around align-items-center p-1 pe-1 z-1 position-relative"},iA=["title"],rA={class:"align-items-center d-flex position-relative"},sA=["id","title","aria-expanded","aria-controls"],lA={class:"visually-hidden"};function aA(e,t,n,o,i,r){const s=Ft("EdgeLabelRenderer");return se(),ge("g",{role:"group","aria-label":e.sprintf("COM_WORKFLOW_GRAPH_TRANSITION",n.data?.title,r.sourceStageTitle,r.targetStageTitle)},[te("path",{d:r.edgePath,fill:"none",role:"img","aria-label":e.sprintf("COM_WORKFLOW_GRAPH_TRANSITION_PATH",n.data?.title),stroke:n.style?.stroke||"#333","stroke-width":n.style?.strokeWidth||2,"stroke-dasharray":n.style?.strokeDasharray,"marker-end":n.markerEnd},null,8,qx),Ne(s,null,{default:pn(()=>[te("div",{ref:"edgeLabel",class:"edge-label position-absolute cursor-pointer",tabindex:"0",role:"button","data-edge-id":n.data?.id,"aria-pressed":n.data?.isSelected?"true":"false",style:Xe({width:i.maxWidth+10+"px",height:"30px",transform:"translate(-50%, -50%)",left:r.labelX+"px",top:r.labelY+"px",pointerEvents:"all",zIndex:i.showActions?20:10}),onMouseenter:t[10]||(t[10]=(...l)=>r.onNodeEnter&&r.onNodeEnter(...l)),onMouseleave:t[11]||(t[11]=(...l)=>r.onNodeLeave&&r.onNodeLeave(...l)),onClick:t[12]||(t[12]=(...l)=>r.onSelected&&r.onSelected(...l)),onKeydown:[t[13]||(t[13]=Pe(Ge((...l)=>r.openActions&&r.openActions(...l),["stop","prevent"]),["enter"])),t[14]||(t[14]=Pe(Ge((...l)=>r.openActions&&r.openActions(...l),["prevent","stop"]),["space"])),t[15]||(t[15]=Pe((...l)=>r.closeActions&&r.closeActions(...l),["esc"])),t[16]||(t[16]=Pe((...l)=>r.closeActions&&r.closeActions(...l),["tab"]))]},[i.showActions?(se(),ge("div",jx)):Ee("v-if",!0),te("div",Jx,[i.showActions?(se(),ge("nav",{key:0,id:`edge-actions-menu-${n.data?.id}`,ref:"actionsMenu",class:"workflow-browser-actions-list position-absolute top-25-px end-20-px opacity-100 d-flex flex-column border rounded shadow-sm p-1",role:"menu","aria-orientation":"vertical","aria-labelledby":`transition-${n.data?.id}-menu-button`,onMouseenter:t[6]||(t[6]=(...l)=>r.onDropdownEnter&&r.onDropdownEnter(...l))},[te("span",eA,ve(e.sprintf("COM_WORKFLOW_GRAPH_TRANSITION_ACTIONS",n.data?.title)),1),n.data?.permissions?.edit?(se(),ge("button",{key:0,ref:"editButton",class:"btn btn-sm btn-secondary text-start text-white fw-semibold text-truncate",role:"menuitem",tabindex:"0",title:e.translate("COM_WORKFLOW_GRAPH_EDIT_TRANSITION"),onClick:t[0]||(t[0]=(...l)=>r.handleEdit&&r.handleEdit(...l)),onKeydown:[t[1]||(t[1]=Pe(Ge((...l)=>r.handleEdit&&r.handleEdit(...l),["stop","prevent"]),["enter"])),t[2]||(t[2]=Pe(Ge((...l)=>r.handleEdit&&r.handleEdit(...l),["prevent","stop"]),["space"]))]},[t[17]||(t[17]=te("span",{class:"icon icon-pencil-alt me-1","aria-hidden":"true"},null,-1)),Lt(" "+ve(e.translate("COM_WORKFLOW_GRAPH_EDIT_TRANSITION")),1)],40,tA)):Ee("v-if",!0),n.data?.permissions?.delete?(se(),ge("button",{key:1,ref:"deleteButton",class:"btn btn-sm btn-danger text-start mt-1 text-white fw-semibold text-truncate",role:"menuitem",tabindex:"0",title:e.translate("COM_WORKFLOW_GRAPH_TRASH_TRANSITION"),onClick:t[3]||(t[3]=(...l)=>r.handleDelete&&r.handleDelete(...l)),onKeydown:[t[4]||(t[4]=Pe(Ge((...l)=>r.handleDelete&&r.handleDelete(...l),["stop","prevent"]),["enter"])),t[5]||(t[5]=Pe(Ge((...l)=>r.handleDelete&&r.handleDelete(...l),["prevent","stop"]),["space"]))]},[t[18]||(t[18]=te("span",{class:"icon icon-trash me-1","aria-hidden":"true"},null,-1)),Lt(" "+ve(e.translate("COM_WORKFLOW_GRAPH_TRASH_TRANSITION")),1)],40,nA)):Ee("v-if",!0)],40,Qx)):Ee("v-if",!0),te("div",oA,[te("span",{class:"h4 d-block card-title text-white fw-semibold text-truncate ms-4",title:e.translate(n.data?.title)},ve(e.translate(n.data?.title)),9,iA),te("div",rA,[te("button",{id:`transition-${n.data?.id}-menu-button`,ref:"menuButton",class:Be(["btn btn-sm btn-secondary ms-1 px-1 py-0",{invisible:!i.isHovered&&!i.showActions}]),style:Xe({transition:"opacity 0.2s ease",zIndex:i.showActions?30:11,position:"relative"}),title:i.showActions?e.sprintf("COM_WORKFLOW_GRAPH_CLOSE_ACTIONS_MENU",n.data?.title):e.sprintf("COM_WORKFLOW_GRAPH_OPEN_ACTIONS_MENU",n.data?.title),"aria-haspopup":"true","aria-expanded":i.showActions,"aria-controls":`edge-actions-menu-${n.data?.id}`,onClick:t[7]||(t[7]=Ge((...l)=>r.toggleActions&&r.toggleActions(...l),["stop"])),onKeydown:[t[8]||(t[8]=Pe(Ge((...l)=>r.toggleActions&&r.toggleActions(...l),["stop"]),["enter"])),t[9]||(t[9]=Pe(Ge((...l)=>r.toggleActions&&r.toggleActions(...l),["prevent","stop"]),["space"]))]},[te("span",{class:Be(i.showActions?"icon icon-times":"icon icon-ellipsis-h"),"aria-hidden":"true"},null,2),te("span",lA,ve(i.showActions?e.sprintf("COM_WORKFLOW_GRAPH_CLOSE_ACTIONS_MENU",n.data?.title):e.sprintf("COM_WORKFLOW_GRAPH_OPEN_ACTIONS_MENU",n.data?.title)),1)],46,sA)])])]),Ee(" Hidden measurer "),te("span",{ref:"textMeasurer",class:"fw-semibold invisible position-absolute",style:{"white-space":"nowrap","font-size":"1rem","font-family":"inherit"},"aria-hidden":"true"},ve(e.translate(n.data?.title)),513)],44,Zx)]),_:1})],8,Xx)}Ql.render=aA,Ql.__file="administrator/components/com_workflow/resources/scripts/components/edges/CustomEdge.vue";var ea={name:"CustomControls",setup(){const{zoomIn:e,zoomOut:t,fitView:n}=ke();function o(){n({padding:.5,duration:300})}return{zoomIn:e,zoomOut:t,controlsContainer:Ce(null),customFitView:o}}};const uA={ref:"controlsContainer",class:"custom-controls position-absolute z-10 p-1",role:"list","aria-labelledby":"canvas-controls-title"},cA={id:"canvas-controls-title",class:"visually-hidden"},dA={class:"d-flex flex-column gap-1 list-unstyled mb-0 px-0"},fA=["title"],hA={class:"visually-hidden"},gA=["title"],pA={class:"visually-hidden"},vA=["title"],mA={class:"visually-hidden"};function yA(e,t,n,o,i,r){return se(),ge("div",uA,[te("span",cA,ve(e.translate("COM_WORKFLOW_GRAPH_CANVAS_VIEW_CONTROLS")),1),te("ul",dA,[te("li",null,[te("button",{class:"toolbar-button custom-controls-button",title:e.translate("COM_WORKFLOW_GRAPH_ZOOM_IN"),onClick:t[0]||(t[0]=(...s)=>o.zoomIn&&o.zoomIn(...s)),onKeydown:[t[1]||(t[1]=Pe((...s)=>o.zoomIn&&o.zoomIn(...s),["enter"])),t[2]||(t[2]=Pe(Ge((...s)=>o.zoomIn&&o.zoomIn(...s),["prevent"]),["space"]))]},[t[9]||(t[9]=te("span",{class:"icon icon-plus","aria-hidden":"true"},null,-1)),te("span",hA,ve(e.translate("COM_WORKFLOW_GRAPH_ZOOM_IN")),1)],40,fA)]),te("li",null,[te("button",{class:"toolbar-button custom-controls-button",title:e.translate("COM_WORKFLOW_GRAPH_ZOOM_OUT"),onClick:t[3]||(t[3]=(...s)=>o.zoomOut&&o.zoomOut(...s)),onKeydown:[t[4]||(t[4]=Pe((...s)=>o.zoomOut&&o.zoomOut(...s),["enter"])),t[5]||(t[5]=Pe(Ge((...s)=>o.zoomOut&&o.zoomOut(...s),["prevent"]),["space"]))]},[t[10]||(t[10]=te("span",{class:"icon icon-minus","aria-hidden":"true"},null,-1)),te("span",pA,ve(e.translate("COM_WORKFLOW_GRAPH_ZOOM_OUT")),1)],40,gA)]),te("li",null,[te("button",{class:"toolbar-button custom-controls-button",title:e.translate("COM_WORKFLOW_GRAPH_FIT_VIEW"),onClick:t[6]||(t[6]=(...s)=>o.customFitView&&o.customFitView(...s)),onKeydown:[t[7]||(t[7]=Pe((...s)=>o.customFitView&&o.customFitView(...s),["enter"])),t[8]||(t[8]=Pe(Ge((...s)=>o.customFitView&&o.customFitView(...s),["prevent"]),["space"]))]},[t[11]||(t[11]=te("span",{class:"icon icon-expand","aria-hidden":"true"},null,-1)),te("span",mA,ve(e.translate("COM_WORKFLOW_GRAPH_FIT_VIEW")),1)],40,vA)])])],512)}ea.render=yA,ea.__file="administrator/components/com_workflow/resources/scripts/components/canvas/CustomControls.vue";function _A(e){return e?.color||"rgb(var(--primary-rgb))"}function wA(e){return"hsl("+parseInt(e?.id,10)*199%360+", 70%, 60%)"}function bA(e,t){return t?wA(e):e!=null&&e.published?"#3B82F6":e.from_stage_id===-1||e.to_stage_id===-1?"#F97316":"#10B981"}function SA(e,t){let n;return function(){for(var i=arguments.length,r=new Array(i),s=0;s<i;s++)r[s]=arguments[s];clearTimeout(n),n=setTimeout(()=>e.apply(this,r),t)}}function EA(){return document.dir==="rtl"}var ta={name:"ControlsPanel",components:{Panel:vf},emits:["add-stage","add-transition"],computed:{panelPosition(){return EA()?"top-right":"top-left"}}};const xA={id:"controls-panel-title",class:"visually-hidden"},AA=["aria-label","title"],OA=["aria-label","title"];function CA(e,t,n,o,i,r){const s=Ft("Panel");return se(),qe(s,{position:r.panelPosition,role:"list","aria-labelledby":"controls-panel-title",class:"d-flex gap-2 p-2"},{default:pn(()=>[te("span",xA,ve(e.translate("COM_WORKFLOW_GRAPH_CONTROLS")),1),te("button",{class:"toolbar-button btn btn-primary d-flex align-items-center gap-1","aria-label":e.translate("COM_WORKFLOW_GRAPH_ADD_STAGE"),title:`${e.translate("COM_WORKFLOW_GRAPH_ADD_STAGE")} (Alt+N)`,onClick:t[0]||(t[0]=l=>e.$emit("add-stage")),onKeydown:[t[1]||(t[1]=Pe(Ge(l=>e.$emit("add-stage"),["prevent"]),["enter"])),t[2]||(t[2]=Pe(Ge(l=>e.$emit("add-stage"),["prevent"]),["space"]))]},[t[6]||(t[6]=te("span",{class:"icon icon-plus","aria-hidden":"true"},null,-1)),Lt(" "+ve(e.translate("COM_WORKFLOW_GRAPH_ADD_STAGE")),1)],40,AA),te("button",{class:"toolbar-button btn btn-info d-flex align-items-center gap-1","aria-label":e.translate("COM_WORKFLOW_GRAPH_ADD_TRANSITION"),title:`${e.translate("COM_WORKFLOW_GRAPH_ADD_TRANSITION")} (Alt+M)`,onClick:t[3]||(t[3]=l=>e.$emit("add-transition")),onKeydown:[t[4]||(t[4]=Pe(Ge(l=>e.$emit("add-transition"),["prevent"]),["enter"])),t[5]||(t[5]=Pe(Ge(l=>e.$emit("add-transition"),["prevent"]),["space"]))]},[t[7]||(t[7]=te("span",{class:"icon icon-plus","aria-hidden":"true"},null,-1)),Lt(" "+ve(e.translate("COM_WORKFLOW_GRAPH_ADD_TRANSITION")),1)],40,OA)]),_:1},8,["position"])}ta.render=CA,ta.__file="administrator/components/com_workflow/resources/scripts/components/canvas/ControlsPanel.vue";function cn(e,t){!e||!t||(e.textContent="",setTimeout(()=>{e.textContent=t},10))}function na(e,t){t===void 0&&(t=!1);const n=Array.from(document.querySelectorAll(e));if(!n.length)return;const o=n.indexOf(document.activeElement);let i;t?i=o<=0?n.length-1:o-1:i=o>=n.length-1?0:o+1,n[i].focus()}function NA(e,t,n){const i=(e.indexOf(t.value)+1)%e.length;t.value=e[i]}function TA(e){try{e.focus();const t=e.contentDocument||e.contentWindow.document;if(t){const n=t.querySelector('input:not([type="hidden"]), select, textarea');n?n.focus():t.body.focus(),t.addEventListener("keydown",o=>{if(o.code==="Escape"){o.preventDefault();const i=document.querySelector("joomla-dialog dialog[open]");i&&i.close&&i.close()}})}}catch{e.focus()}}function MA(e,t){e.value&&(e.value.focus(),e.value=null),t.dispatch("loadWorkflow",t.getters.workflowId)}function IA(e){if(e.code==="Escape"){e.preventDefault();const t=e.currentTarget;t&&t.close&&t.close()}}function PA(e,t){setTimeout(()=>{const n=document.querySelector("joomla-dialog dialog[open]");if(n){n.focus();const o=n.querySelector("iframe");o&&o.addEventListener("load",()=>{TA(o)}),n.addEventListener("close",()=>{MA(e,t)}),n.addEventListener("keydown",IA)}},100)}function RA(e,t){t===void 0&&(t={});const n=t,o=n.gapX,i=o===void 0?400:o,r=n.gapY,s=r===void 0?300:r,l=n.paddingX,a=l===void 0?100:l,u=n.paddingY,c=u===void 0?100:u,d=Math.min(4,Math.ceil(Math.sqrt(e?.length||0))+1);return e.map((f,p)=>{const x=p%d,b=Math.floor(p/d),_=f?.position||{x:x*i+a,y:b*s+c};return{id:String(f.id),type:"stage",position:_,data:{stage:ie({},f,{color:_A(f)}),isSelected:!1,onSelect:()=>{},onEdit:()=>{},onDelete:()=>{}},draggable:!0}})}function DA(e,t,n,o,i,r){return i===void 0&&(i=()=>{}),{id:e,type:"stage",position:t,data:{stage:{id:e,title:o,published:!0,color:n},isSpecial:!0,onSelect:i},draggable:r}}function kA(e,t){t===void 0&&(t={});const n=t,o=n.selectedId,i=o===void 0?null:o,r={};e.forEach(l=>{const a=l.from_stage_id===-1?"from_any":String(l.from_stage_id),u=String(l.to_stage_id),c=a+"__"+u;r[c]||(r[c]=[]),r[c].push(l)});const s=new Map;return Object.entries(r).forEach(l=>{l[0];let a=l[1];a.forEach((u,c)=>{s.set(u.id,c-(a.length-1)/2)})}),e.map(l=>{const a=l.from_stage_id===-1?"from_any":String(l.from_stage_id),u=String(l.to_stage_id),c=l.id===i,d=e.some(b=>b.from_stage_id===l.to_stage_id&&b.to_stage_id===l.from_stage_id);let f=s.get(l.id)||0;d&&(f+=l.from_stage_id>l.to_stage_id?1:-1);const p=bA(l,c),x=c?5:3;return{id:String(l.id),source:a,target:u,type:"custom",animated:c,style:{stroke:p,strokeWidth:x,strokeDasharray:l.published?void 0:"5,5",zIndex:c?1e3:1},markerEnd:{type:"arrow",width:10,height:10,color:p},data:ie({},l,{isSelected:c,isBiDirectional:d,offsetIndex:f,onEdit:()=>{},onDelete:()=>{}})}})}function $A(e){let t=e.addStage,n=e.addTransition,o=e.editItem,i=e.deleteItem,r=e.setSaveStatus,s=e.updateSaveMessage,l=e.saveNodePosition,a=e.clearSelection,u=e.zoomIn,c=e.zoomOut,d=e.fitView,f=e.viewport,p=e.state,x=e.store;function b(_){const A=document.querySelector("joomla-dialog dialog[open]");if(A){if(_.code==="Escape"){_.preventDefault(),A.close();return}return}const P={buttons:'button, button:not([tabindex="-1"])',stages:".stage-node",transitions:".edge-label",toolbar:".toolbar-button",actions:".action-button",links:'a[href], a[href]:not([tabindex="-1"])'};function I(m,F,z){if(!document.querySelector(".stage-node[data-stage-id='"+m+"']")||!x)return;const G=20,K=x.getters.stages.findIndex(oe=>oe.id===parseInt(m,10));if(K===-1)return;const Q=x.getters.stages[K].position||{x:0,y:0};if(!Q)return;let re=Q.x,ee=Q.y;switch(F){case"ArrowUp":ee-=G;break;case"ArrowDown":ee+=G;break;case"ArrowLeft":re-=G;break;case"ArrowRight":re+=G;break;default:return}x.dispatch("updateStagePosition",{id:m,x:re,y:ee}),r("unsaved"),s(),l()}switch(!0){case(_.altKey&&_.code==="KeyN"):_.preventDefault(),t(),cn(p.liveRegion,"Add stage");break;case(_.altKey&&_.code==="KeyM"):_.preventDefault(),n(),cn(p.liveRegion,"Add transition");break;case _.code==="KeyE":_.preventDefault(),o();break;case(_.code==="Delete"||_.code==="Backspace"):_.preventDefault(),i();break;case _.code==="Escape":_.preventDefault(),a();break;case _.code==="Equal":_.preventDefault(),u();break;case _.code==="Minus":_.preventDefault(),c();break;case _.code==="KeyF":_.preventDefault(),d({padding:.5,duration:300});break;case _.code==="Tab":{_.preventDefault(),NA(["buttons","stages","transitions","toolbar","actions","links"],p.currentFocusMode,p.liveRegion);const m=P[p.currentFocusMode.value];if(m){const F=document.querySelector(m);F&&F.focus()}break}case["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(_.code):if(_.preventDefault(),p.selectedStage.value)if(_.shiftKey)I(p.selectedStage.value.toString(),_.code);else{const m=".stage-node[data-stage-id='"+p.selectedStage.value+`'] button[tabindex="0"]`;m&&na(m,0)}else if(p.selectedTransition.value){const m=".edge-label[data-edge-id='"+p.selectedTransition.value+`'] button[tabindex="0"]`;m&&na(m,0)}else if(_.shiftKey)switch(_.code){case"ArrowUp":f.value.y+=20;break;case"ArrowDown":f.value.y-=20;break;case"ArrowLeft":f.value.x+=20;break;case"ArrowRight":f.value.x-=20;break}else{const m=["ArrowLeft","ArrowUp"].includes(_.code),F=P[p.currentFocusMode.value];F&&na(F,m)}break}}return document.addEventListener("keydown",b),()=>{document.removeEventListener("keydown",b)}}class oa{constructor(){this.observer=null,this.processedElements=new WeakSet}init(){this.fixVueFlowAccessibility(),this.setupMutationObserver(),this.setupVueFlowObserver()}fixVueFlowAccessibility(){this.fixSVGElements(),this.fixTabbableGroups(),this.fixGraphicsDocuments(),this.fixButtonAccessibleNames(),this.fixDuplicateSVGIds()}fixSVGElements(){[".vue-flow svg",'.vue-flow [role="graphics-document"]',".vue-flow__background svg",".vue-flow__minimap svg",".vue-flow__edge svg",".vue-flow__nodes svg",".vue-flow__edges svg",'svg[role="graphics-document"]','g[role="group"] svg','g[role="group"] [role="graphics-document"]'].forEach(n=>{document.querySelectorAll(n).forEach(i=>{this.processedElements.has(i)||(this.hideSVGFromScreenReaders(i),this.processedElements.add(i))})})}hideSVGFromScreenReaders(t){this.isInvalidForAriaHidden(t)||t.setAttribute("aria-hidden","true"),this.isInvalidForPresentationRole(t)||t.setAttribute("role","presentation"),this.isInvalidForAriaAttributes(t)||(t.removeAttribute("aria-label"),t.removeAttribute("aria-labelledby"),t.removeAttribute("aria-describedby")),t.querySelectorAll("*").forEach(o=>{this.isInvalidForAriaHidden(o)||o.setAttribute("aria-hidden","true"),this.isInvalidForPresentationRole(o)||o.setAttribute("role","presentation"),this.isInvalidForAriaAttributes(o)||(o.removeAttribute("aria-label"),o.removeAttribute("aria-labelledby"),o.removeAttribute("aria-describedby"))})}isInvalidForPresentationRole(t){var n;return["title","desc","metadata"].includes((n=t.tagName)==null?void 0:n.toLowerCase())}isInvalidForAriaHidden(t){var n;const o=(n=t.tagName)==null?void 0:n.toLowerCase();return o==="title"&&t.getAttribute("role")==="none"?!0:["title","desc","metadata"].includes(o)}isInvalidForAriaAttributes(t){var n;const o=(n=t.tagName)==null?void 0:n.toLowerCase();return["title","desc","metadata"].includes(o)}fixTabbableGroups(){document.querySelectorAll('.vue-flow [role="group"][tabindex], [role="group"][tabindex]').forEach(n=>{this.processedElements.has(n)||(n.querySelector('button, [role="button"], [role="menuitem"], input, select, textarea, a[href]')?(n.removeAttribute("tabindex"),n.style.userSelect="none",n.style.webkitUserSelect="none",n.style.mozUserSelect="none"):(n.removeAttribute("tabindex"),n.style.pointerEvents="none"),this.processedElements.add(n))})}fixGraphicsDocuments(){document.querySelectorAll('[role="graphics-document"]').forEach(n=>{this.processedElements.has(n)||(this.hideSVGFromScreenReaders(n),this.processedElements.add(n))})}fixButtonAccessibleNames(){document.querySelectorAll('.stage-node[role="button"], .edge-label[role="button"]').forEach(n=>{if(!this.processedElements.has(n)){const o=n.getAttribute("aria-label"),i=this.getVisibleText(n);o&&i&&!i.includes(o)&&!o.includes(i)&&n.removeAttribute("aria-label"),this.processedElements.add(n)}})}fixDuplicateSVGIds(){const t=new Set;document.querySelectorAll("svg [id], .vue-flow [id]").forEach(o=>{const i=o.id;if(i&&t.has(i)){const r=this.generateUniqueId(i,t);o.id=r,t.add(r)}else i&&t.add(i)})}generateUniqueId(t,n){let o=1,i=t+"-"+o;for(;n.has(i);)o++,i=t+"-"+o;return i}getVisibleText(t){const n=t.querySelector(".card-title");if(n)return n.textContent.trim();const o=t.querySelector("header .card-title");return o?o.textContent.trim():t.textContent.trim().split(`
`)[0].trim()}setupMutationObserver(){this.observer=new MutationObserver(t=>{let n=!1;t.forEach(o=>{o.type==="childList"&&o.addedNodes.length>0&&o.addedNodes.forEach(i=>{i.nodeType===Node.ELEMENT_NODE&&i.matches&&(i.matches(".vue-flow *")||i.matches("svg")||i.matches('[role="graphics-document"]')||i.matches('[role="group"]')||i.querySelector('.vue-flow *, svg, [role="graphics-document"], [role="group"]'))&&(n=!0)})}),n&&(clearTimeout(this.processTimeout),this.processTimeout=setTimeout(()=>{this.fixVueFlowAccessibility()},100))}),this.observer.observe(document.body,{childList:!0,subtree:!0})}setupVueFlowObserver(){const t=document.querySelector(".vue-flow");t&&new MutationObserver(()=>{clearTimeout(this.vueFlowTimeout),this.vueFlowTimeout=setTimeout(()=>{this.fixVueFlowAccessibility()},200)}).observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["role","tabindex","aria-label","aria-hidden"]})}destroy(){this.observer&&this.observer.disconnect(),clearTimeout(this.processTimeout),clearTimeout(this.vueFlowTimeout)}}if(document.readyState==="loading")document.addEventListener("DOMContentLoaded",()=>{const e=new oa;e.init(),window.workflowAccessibilityFixer=e});else{const e=new oa;e.init(),window.workflowAccessibilityFixer=e}function ia(e,t){let n;t.type==="message"&&(n=3e3),Joomla.renderMessages({[t.type]:[Joomla.Text._(e)]},void 0,!0,n)}const dt={success:(e,t)=>{ia(e,ie({type:"message",dismiss:!0},t))},error:(e,t)=>{ia(e,ie({type:"error",dismiss:!0},t))},notify:(e,t)=>{ia(e,ie({type:"message",dismiss:!0},t))},ask:e=>window.confirm(e)};var ra={name:"WorkflowCanvas",components:{VueFlow:Hw,Background:Uw,MiniMap:Tx,CustomControls:ea,ControlsPanel:ta},props:{nodeTypes:{type:Object,default:()=>({stage:Jl})},edgeTypes:{type:Object,default:()=>({custom:Ql})},saveStatus:{type:Object,required:!0},setSaveStatus:{type:Function,required:!0}},setup(e,{emit:t}){const n=dc(),{fitView:o,zoomIn:i,zoomOut:r,viewport:s,setViewport:l,onViewportChange:a}=ke(),u=Ce(!1),c=Ce(null),d=Ce(null),f=Ce(null),p=Ce("upToDate"),x=Ce("links"),b=Ce(null),_=Ce(null),A=Ce(!0),P=fe(()=>n.getters.workflow||{}),I=fe(()=>n.getters.stages||[]),m=fe(()=>n.getters.transitions||[]),F=fe(()=>n.getters.loading),z=fe(()=>n.getters.error),q=fe(()=>n.getters.workflowId);function G(U){return Joomla.Text._(U)}function K(U,...y){const h=Joomla.Text._(U);let v=0;return h.replace(/%((%)|s|d)/g,E=>{let S=y[v];return E==="%d"&&(S=parseFloat(S),Number.isNaN(S)&&(S=0)),v+=1,S})}function Q(U,y=null,h={}){b.value=document.activeElement;const v=Joomla.getOptions("com_workflow",{})?.extension||"",E=`index.php?option=com_workflow&view=${U}&workflow_id=${q.value}&extension=${v}&layout=modal&tmpl=component`,S=y?`${E}&id=${y}`:E,C=Object.entries(h).map(([B,V])=>`${encodeURIComponent(B)}=${encodeURIComponent(V)}`).join("&"),w=C?`${S}&${C}`:S,M=G(y?`COM_WORKFLOW_GRAPH_EDIT_${U.toUpperCase()}`:`COM_WORKFLOW_GRAPH_ADD_${U.toUpperCase()}`),k=new ua({popupType:"iframe",textHeader:M,src:w}),T=B=>{try{B.source===(k.getBodyContent().contentWindow||window)&&(B.data&&B.data.messageType)==="joomla:content-select"&&k.close()}catch{}};window.addEventListener("message",T),k.addEventListener("joomla-dialog:close",()=>{window.removeEventListener("message",T),k.destroy()}),k.show(),PA(b,n)}function re(U,y="stage"){return y==="stage"?I.value.find(v=>v.id===parseInt(U,10))?.permissions?.edit:y==="transition"?m.value.find(v=>v.id===parseInt(U,10))?.permissions?.edit:!1}function ee(U,y="stage"){return y==="stage"?I.value.find(v=>v.id===parseInt(U,10))?.permissions?.delete:y==="transition"?m.value.find(v=>v.id===parseInt(U,10))?.permissions?.delete:!1}function oe(U){u.value=!1,c.value=parseInt(U,10),d.value=null,cn(f.value,K("COM_WORKFLOW_GRAPH_STAGE_SELECTED",I?.value?.find(y=>y.id===parseInt(U,10))?.title||U))}function g(U){u.value=!0,d.value=parseInt(U,10),c.value=null,cn(f.value,K("COM_WORKFLOW_GRAPH_TRANSITION_SELECTED",m?.value?.find(y=>y.id===parseInt(U,10))?.title||U))}function O(U){re(U,"stage")&&Q("stage",U)}function R(U){re(U,"transition")&&Q("transition",U)}function $(){c.value=null,d.value=null,u.value=!1,cn(f.value,G("COM_WORKFLOW_GRAPH_SELECTION_CLEARED"))}function N(U){ee(U,"stage")&&(n.dispatch("deleteStage",{id:U,workflowId:q.value}),c.value=null)}function L(U){ee(U,"transition")&&(n.dispatch("deleteTransition",{id:U,workflowId:q.value}),d.value=null)}function H(U,y){U==="stage"?N(y.toString()):L(y.toString())}function W(U,y){if(!ee(y,"stage")&&U==="stage"||!ee(y,"transition")&&U==="transition")return;const h=G(U==="stage"?"COM_WORKFLOW_GRAPH_TRASH_STAGE":"COM_WORKFLOW_GRAPH_TRASH_TRANSITION"),v=G(U==="stage"?K("COM_WORKFLOW_GRAPH_TRASH_STAGE_CONFIRM",I?.value?.find(E=>E.id===parseInt(y,10))?.title||y):K("COM_WORKFLOW_GRAPH_TRASH_TRANSITION_CONFIRM",m?.value?.find(E=>E.id===parseInt(y,10))?.title||y));ua.confirm(v,h).then(E=>{E&&H(U,y)})}function D(){P?.value?.canCreate&&(Q("stage"),cn(f.value,G("COM_WORKFLOW_GRAPH_ADD_STAGE_DIALOG_OPENED")))}function Z(){P?.value?.canCreate&&(Q("transition"),cn(f.value,G("COM_WORKFLOW_GRAPH_ADD_TRANSITION_DIALOG_OPENED")))}function le({source:U,target:y}){P?.value?.canCreate&&U&&y&&(Q("transition",null,{from_stage_id:U,to_stage_id:y}),cn(f.value,K("COM_WORKFLOW_GRAPH_CREATING_TRANSITION",I?.value?.find(h=>h.id===parseInt(U,10))?.title||U,I?.value?.find(h=>h.id===parseInt(y,10))?.title||y)))}function ce({edge:U}){g(U?.id)}function Y(){const U=document.getElementById("save-status");U&&(p.value==="unsaved"?(U.classList.add("text-warning"),U.textContent=G("COM_WORKFLOW_GRAPH_UNSAVED_CHANGES")):(U.classList.remove("text-warning"),U.textContent=G("COM_WORKFLOW_GRAPH_UP_TO_DATE")))}const j=SA(async()=>{await n.dispatch("updateStagePositionAjax")?(p.value="upToDate",Y(),cn(f.value,G("COM_WORKFLOW_GRAPH_STAGE_POSITIONS_UPDATED"))):dt.error(G("COM_WORKFLOW_GRAPH_ERROR_FAILED_TO_UPDATE_STAGE_POSITIONS"))},3e3);async function ne({node:U}){if(!U||!U.id||U.id==="from_any")return;const y=n.getters.stages.find(S=>S.id===parseInt(U.id,10))?.position,h=U.computedPosition||y||{x:0,y:0},{x:v,y:E}=h;p.value="unsaved",Y(),await n.dispatch("updateStagePosition",{id:U.id,x:v,y:E}),j()}const pe=fe(()=>{const U=RA(I.value),y=DA("from_any",{x:600,y:-200},"purple",G("COM_WORKFLOW_GRAPH_FROM_ANY"),oe,!1);return[...U.map(h=>({...h,data:{...h.data,isSelected:c.value===parseInt(h.id,10),onSelect:()=>oe(h.id),onEscape:()=>$(),onEdit:()=>O(h.id),onDelete:()=>W("stage",h.id)}})),y]}),me=fe(()=>kA(m.value,{selectedId:d.value}).map(U=>({...U,data:{...U.data,onSelect:()=>g(U.id),onEscape:()=>$(),onDelete:()=>W("transition",U.id),onEdit:()=>R(U.id)}})));St(()=>{_.value=new oa,_.value.init();const U=$A({addStage:D,addTransition:Z,editItem:()=>{c.value?O(c.value):d.value&&R(d.value)},deleteItem:()=>{c.value?W("stage",c.value):d.value&&W("transition",d.value)},clearSelection:$,zoomIn:i,zoomOut:r,fitView:o,viewport:s,state:{selectedStage:c,selectedTransition:d,isTransitionMode:u,currentFocusMode:x,liveRegion:f.value},setSaveStatus:y=>{p.value=y},updateSaveMessage:Y,saveNodePosition:j,store:n});Vi(()=>{U(),_.value&&_.value.destroy()})});let _e=!1;return Ae([F,z],()=>{setTimeout(()=>{if(F.value||z.value)return;const{panX:U,panY:y,zoom:h}=n.getters.canvas??{};typeof U=="number"&&!Number.isNaN(U)&&typeof y=="number"&&!Number.isNaN(y)&&typeof h=="number"&&!Number.isNaN(h)?(_e=!0,Promise.resolve().then(()=>l({x:U,y,zoom:h})).finally(()=>{_e=!1})):o({padding:.4,duration:300})},0)},{immediate:!0}),a(({x:U,y,zoom:h})=>{_e||[U,y,h].some(v=>typeof v!="number"||Number.isNaN(v))||n.dispatch("updateCanvasViewport",{panX:U,panY:y,zoom:h})}),{loading:F,error:z,showMiniMap:A,workflow:P,stages:I,positionedNodes:pe,styledEdges:me,liveRegion:f,handleConnect:le,selectEdge:ce,handleDeleteConfirm:H,addStage:D,addTransition:Z,clearSelection:$,handleNodeDragStop:ne}}};const FA={class:"w-100 h-100 position-relative",role:"application","aria-label":"Workflow Graph"},LA={id:"workflow-controls","aria-label":"Canvas Controls",class:"workflow-controls-section"},HA={class:"visually-hidden"},WA=["title","aria-pressed"],zA={key:0,class:"fa fa-close","aria-hidden":"true"},BA={key:1,class:"icon icon-expand-2","aria-hidden":"true"},VA={class:"visually-hidden"},GA={id:"workflow-stages",class:"visually-hidden"},KA=["id"],YA={key:0},UA={id:"workflow-transitions",class:"visually-hidden"},XA=["id"],qA={key:1,class:"d-flex justify-content-center align-items-center h-100",role:"status","aria-live":"polite"},ZA={class:"spinner-border",role:"status"},jA={class:"visually-hidden"},JA={class:"ms-2"},QA={ref:"liveRegion","aria-live":"polite",role:"status",class:"visually-hidden","aria-atomic":"true"};function eO(e,t,n,o,i,r){const s=Ft("Background"),l=Ft("MiniMap"),a=Ft("CustomControls"),u=Ft("ControlsPanel"),c=Ft("VueFlow");return se(),ge("div",FA,[!o.loading&&!o.error?(se(),qe(c,{key:0,class:"workflow-canvas","max-zoom":"2.5","min-zoom":".3",edges:o.styledEdges,nodes:o.positionedNodes,"node-types":n.nodeTypes,"edge-types":n.edgeTypes,"nodes-connectable":o.workflow?.canCreate,"elements-selectable":!0,"snap-to-grid":!0,"snap-grid":[40,40],"disable-keyboard-a11y":!0,role:"application","aria-label":e.translate("COM_WORKFLOW_GRAPH_CANVAS_LABEL"),onConnect:o.handleConnect,onPaneClick:o.clearSelection,onEdgeClick:o.selectEdge,onNodeDragStop:o.handleNodeDragStop},{default:pn(()=>[Ne(s,{"pattern-color":"var(--body-color)",gap:16,"aria-label":e.translate("COM_WORKFLOW_GRAPH_BACKGROUND"),title:e.translate("COM_WORKFLOW_GRAPH_BACKGROUND")},null,8,["aria-label","title"]),Ee(" Controls Section "),te("section",LA,[te("span",HA,ve(e.translate("COM_WORKFLOW_GRAPH_CONTROLS")),1),Ee(" Minimap Toggle "),te("button",{id:"toggle-minimap",class:"toolbar-button custom-controls-button position-absolute z-20 ps-2 pe-2",tabindex:"0",style:Xe(o.showMiniMap?"bottom: 130px; left: 175px;":"bottom: 10px; left: 10px;"),title:o.showMiniMap?e.translate("COM_WORKFLOW_GRAPH_MINIMAP_HIDE"):e.translate("COM_WORKFLOW_GRAPH_MINIMAP_SHOW"),"aria-pressed":o.showMiniMap?"true":"false",onClick:t[0]||(t[0]=d=>o.showMiniMap=!o.showMiniMap)},[o.showMiniMap?(se(),ge("span",zA)):(se(),ge("span",BA)),te("span",VA,ve(o.showMiniMap?e.translate("COM_WORKFLOW_GRAPH_MINIMAP_HIDE"):e.translate("COM_WORKFLOW_GRAPH_MINIMAP_SHOW")),1)],12,WA),o.showMiniMap?(se(),qe(l,{key:0,class:"z-10",position:"bottom-left",pannable:"",zoomable:"","aria-label":e.translate("COM_WORKFLOW_GRAPH_MINIMAP_LABEL"),"node-color":d=>d.data?.stage?.color||"#0d6efd","mask-color":"rgba(255, 255, 255, .6)"},null,8,["aria-label","node-color"])):Ee("v-if",!0),Ne(a,{"aria-label":e.translate("COM_WORKFLOW_GRAPH_CONTROLS")},null,8,["aria-label"]),o.workflow?.canCreate?(se(),qe(u,{key:1,class:"canvas-controls-panel",onAddStage:o.addStage,onAddTransition:o.addTransition},null,8,["onAddStage","onAddTransition"])):Ee("v-if",!0)]),Ee(" Workflow Content Sections "),te("section",GA,[te("span",null,"("+ve(o.positionedNodes.length)+" "+ve(o.positionedNodes.length===1?e.translate("COM_WORKFLOW_GRAPH_STAGE"):e.translate("COM_WORKFLOW_GRAPH_STAGES"))+")",1),te("ul",null,[(se(!0),ge(He,null,Qn(o.positionedNodes,d=>(se(),ge("li",{key:`stage-${d.id}`,id:`stage-list-${d.id}`},[Lt(ve(e.sprintf("COM_WORKFLOW_GRAPH_STAGE_REF",d.data.stage?.title))+" - "+ve(d.data.stage.published?e.sprintf("COM_WORKFLOW_GRAPH_STAGE_STATUS_ENABLED",d.data.stage?.title):e.sprintf("COM_WORKFLOW_GRAPH_STAGE_STATUS_DISABLED",d.data.stage?.title))+". ",1),d.data.stage.default?(se(),ge("span",YA,"("+ve(e.translate("COM_WORKFLOW_GRAPH_STAGE_DEFAULT"))+")",1)):Ee("v-if",!0),Lt(" "+ve(d.data.stage?.description?e.sprintf("COM_WORKFLOW_GRAPH_STAGE_DESCRIPTION",d.data.stage?.description):""),1)],8,KA))),128))])]),te("section",UA,[te("span",null,"("+ve(o.styledEdges.length)+" "+ve(o.styledEdges.length===1?e.translate("COM_WORKFLOW_GRAPH_TRANSITION"):e.translate("COM_WORKFLOW_GRAPH_TRANSITIONS"))+")",1),te("ul",null,[(se(!0),ge(He,null,Qn(o.styledEdges,d=>(se(),ge("li",{key:`transition-${d.id}`,id:`transition-list-${d.id}`},ve(e.sprintf("COM_WORKFLOW_GRAPH_TRANSITION_REF",d.data.title,o.stages.find(f=>f.id===parseInt(d.source,10))?.title||e.translate("COM_WORKFLOW_GRAPH_FROM_ANY"),o.stages.find(f=>f.id===parseInt(d.target,10))?.title))+" "+ve(d.data.published?e.sprintf("COM_WORKFLOW_GRAPH_TRANSITION_STATUS_ENABLED",d.data.title):e.sprintf("COM_WORKFLOW_GRAPH_TRANSITION_STATUS_DISABLED",d.data.title)),9,XA))),128))])])]),_:1},8,["edges","nodes","node-types","edge-types","nodes-connectable","aria-label","onConnect","onPaneClick","onEdgeClick","onNodeDragStop"])):Ee("v-if",!0),Ee(" Loading State "),o.loading?(se(),ge("div",qA,[te("div",ZA,[te("span",jA,ve(e.translate("COM_WORKFLOW_GRAPH_LOADING")),1)]),te("span",JA,ve(e.translate("COM_WORKFLOW_GRAPH_LOADING")),1)])):Ee("v-if",!0),Ee(" Accessibility Live Region "),te("div",QA,null,512)])}ra.render=eO,ra.__file="administrator/components/com_workflow/resources/scripts/components/canvas/WorkflowCanvas.vue";const tO={id:"workflow-app",class:"d-flex flex-column flex-grow-1 min-vh-80","aria-labelledby":"workflow-main-title"},nO={id:"workflow-header",class:"d-flex flex-column flex-shrink-0"},oO={class:"d-flex flex-grow-1 overflow-hidden"},iO={id:"main-canvas",class:"flex-grow-1 position-relative","aria-describedby":"canvas-description"},rO={id:"canvas-description",class:"visually-hidden"},sO={name:"WorkflowGraphApp"};var uh=Object.assign(sO,{setup(e){const t=dc(),n=Ce("upToDate");function o(s){n.value=s}const i=Ce(null);function r(){i.value?.focus()}return St(()=>{const{workflowId:s=null}=Joomla.getOptions("com_workflow",{}),l=parseInt(new URL(window.location.href).searchParams.get("id"),10),a=s||l;if(a!==null&&!Number.isNaN(a))t.dispatch("loadWorkflow",a);else throw new Error("COM_WORKFLOW_GRAPH_ERROR_INVALID_ID")}),(s,l)=>(se(),ge("main",tO,[te("header",nO,[Ne(Us,{"save-status":n.value},null,8,["save-status"])]),te("div",oO,[te("section",iO,[te("div",rO,ve(s.translate("COM_WORKFLOW_GRAPH_CANVAS_DESCRIPTION")),1),Ne(ra,{ref_key:"canvas",ref:i,"save-status":n.value,"set-save-status":o,onFocusRequest:r},null,8,["save-status"])])])]))}});uh.__file="administrator/components/com_workflow/resources/scripts/components/App.vue";var lO=new class{constructor(){this.events={}}fire(t,n){n===void 0&&(n=null),(this.events[t]||[]).forEach(o=>o(n))}listen(t,n){this.events[t]||(this.events[t]=[]),this.events[t].push(n)}off(t,n){this.events[t]&&(this.events[t]=this.events[t].filter(o=>o!==n))}},aO={workflowId:null,workflow:null,stages:[],transitions:[],loading:!1,error:null,canvas:{zoom:null,panX:null,panY:null}},uO={SET_WORKFLOW_ID(e,t){e.workflowId=t},SET_WORKFLOW(e,t){e.workflow=t},SET_STAGES(e,t){e.stages=t.map((n,o)=>{var i,r;return ie({},n,{position:{x:typeof(n==null||(i=n.position)==null?void 0:i.x)=="number"&&!Number.isNaN(n.position.x)?n.position.x:100+o%4*400,y:typeof(n==null||(r=n.position)==null?void 0:r.y)=="number"&&!Number.isNaN(n.position.y)?n.position.y:100+Math.floor(o/4)*300}})})},SET_TRANSITIONS(e,t){e.transitions=t},SET_LOADING(e,t){e.loading=t},SET_ERROR(e,t){e.error=t},UPDATE_STAGE_POSITION(e,t){let n=t.id,o=t.x,i=t.y;e.stages=e.stages.map(r=>r.id.toString()===n?ie({},r,{position:{x:o,y:i}}):r)},SET_CANVAS_VIEWPORT(e,t){let n=t.zoom,o=t.panX,i=t.panY;e.canvas.zoom=n,e.canvas.panX=o,e.canvas.panY=i}};class cO{constructor(){const t=Joomla.getOptions("com_workflow",{}),n=t.apiBaseUrl,o=t.extension;if(!n||!o)throw new TypeError(Joomla.Text._("COM_WORKFLOW_GRAPH_API_NOT_SET"));if(this.baseUrl=n,this.extension=o,this.csrfToken=Joomla.getOptions("csrf.token",null),!this.csrfToken)throw new TypeError(Joomla.Text._("COM_WORKFLOW_GRAPH_ERROR_CSRF_TOKEN_NOT_SET"))}async makeRequest(t,n){n===void 0&&(n={});const o=n.headers||{};return o["X-Requested-With"]="XMLHttpRequest",n.headers=o,n[this.csrfToken]=1,new Promise((i,r)=>{Joomla.request(ie({url:""+this.baseUrl+t+"&extension="+this.extension},n,{onSuccess:s=>{const l=JSON.parse(s);i(l)},onError:s=>{let l="COM_WORKFLOW_GRAPH_ERROR_UNKNOWN";try{const a=JSON.parse(s.responseText);l=a.data||a.message||l}catch{l=s.statusText||l}dt.error(l),r(new Error(Joomla.Text._(l)))}}))})}async getWorkflow(t){return this.makeRequest("&task=graph.getWorkflow&workflow_id="+t+"&format=json")}async getStages(t){return this.makeRequest("&task=graph.getStages&workflow_id="+t+"&format=json")}async getTransitions(t){return this.makeRequest("&task=graph.getTransitions&workflow_id="+t+"&format=json")}async deleteStage(t,n,o){o===void 0&&(o=!1);try{const r=new FormData;r.append("cid[]",t),r.append("workflow_id",n),r.append("type","stage"),r.append(this.csrfToken,"1");const s=await this.makeRequest("&task="+(o?"graph.delete":"graph.trash")+"&workflow_id="+n+"&format=json",{method:"POST",data:r});if(s&&s.success){var i;dt.success((s==null||(i=s.data)==null?void 0:i.message)||s?.message)}}catch(r){throw dt.error(r.message),r}}async deleteTransition(t,n,o){o===void 0&&(o=!1);try{const r=new FormData;r.append("cid[]",t),r.append("workflow_id",n),r.append("type","transition"),r.append(this.csrfToken,"1");const s=await this.makeRequest("&task="+(o?"graph.delete":"graph.trash")+"&workflow_id="+n+"&format=json",{method:"POST",data:r});if(s&&s.success){var i;dt.success((s==null||(i=s.data)==null?void 0:i.message)||s?.message)}}catch(r){throw dt.error(r.message),r}}async updateStagePosition(t,n){try{const o=new FormData;if(o.append("workflow_id",t),o.append(this.csrfToken,"1"),n===null||Object.keys(n).length===0)return!0;Object.entries(n).forEach(r=>{let s=r[0],l=r[1];o.append("positions["+s+"][x]",l.x),o.append("positions["+s+"][y]",l.y)});const i=await this.makeRequest("&task=stages.updateStagesPosition&format=json",{method:"POST",data:o});return!!(i&&i.success)}catch(o){throw dt.error(o.message),o}}}var _o=new cO,dO={async loadWorkflow(e,t){let n=e.commit;n("SET_LOADING",!0),n("SET_ERROR",null);try{const i=await Promise.all([await _o.getWorkflow(t),await _o.getStages(t),await _o.getTransitions(t)]),r=i[0],s=i[1],l=i[2];n("SET_WORKFLOW_ID",t),n("SET_WORKFLOW",r?.data),n("SET_STAGES",s?.data),n("SET_TRANSITIONS",l?.data)}catch(i){var o;dt.error((i==null||(o=i.response)==null||(o=o.data)==null?void 0:o.message)||i?.message||"COM_WORKFLOW_GRAPH_ERROR_UNKNOWN")}finally{n("SET_LOADING",!1)}},async deleteStage(e,t){let n=e.commit,o=e.dispatch,i=e.state,r=t.id,s=t.workflowId;n("SET_LOADING",!0),n("SET_ERROR",null);try{const a=i.transitions.filter(c=>c.from_stage_id.toString()===r||c.to_stage_id.toString()===r);if(i.stages.length<=1||i.stages.find(c=>c.id.toString()===r).default){dt.error("COM_WORKFLOW_GRAPH_ERROR_STAGE_DEFAULT_CANT_DELETED");return}if(a.length>0){dt.error("COM_WORKFLOW_GRAPH_ERROR_STAGE_HAS_TRANSITIONS");return}const u=i.stages.find(c=>c.id.toString()===r).published===-1;await _o.deleteStage(r,s,u)}catch(a){var l;dt.error((a==null||(l=a.response)==null||(l=l.data)==null?void 0:l.message)||a?.message||"COM_WORKFLOW_GRAPH_TRASH_STAGE_FAILED")}finally{n("SET_LOADING",!1),await o("loadWorkflow",s)}},async deleteTransition(e,t){let n=e.commit,o=e.dispatch,i=e.state,r=t.id,s=t.workflowId;n("SET_LOADING",!0),n("SET_ERROR",null);try{const a=i.transitions.find(u=>u.id.toString()===r).published===-1;await _o.deleteTransition(r,s,a)}catch(a){var l;dt.error((a==null||(l=a.response)==null||(l=l.data)==null?void 0:l.message)||a?.message||"COM_WORKFLOW_GRAPH_TRASH_TRANSITION_FAILED")}finally{n("SET_LOADING",!1),await o("loadWorkflow",s)}},updateStagePosition(e,t){let n=e.commit,o=t.id,i=t.x,r=t.y;n("UPDATE_STAGE_POSITION",{id:o,x:i,y:r})},async updateStagePositionAjax(e){let t=e.commit,n=e.state;return await _o.updateStagePosition(n.workflowId,n.stages.reduce((i,r)=>(r.position&&(i[r.id]={x:r.position.x,y:r.position.y}),i),{}))?(t("SET_ERROR",null),!0):(dt.error("COM_WORKFLOW_GRAPH_UPDATE_STAGE_POSITION_FAILED"),!1)},updateCanvasViewport(e,t){let n=e.commit,o=t.zoom,i=t.panX,r=t.panY;n("SET_CANVAS_VIEWPORT",{zoom:o,panX:i,panY:r})}},fO={workflowId:e=>e.workflowId,workflow:e=>e.workflow,stages:e=>e.stages,transitions:e=>e.transitions,loading:e=>e.loading,error:e=>e.error,canvas:e=>e.canvas};function hO(e){let t=e===void 0?{}:e,n=t.key,o=n===void 0?"vuex":n,i=t.paths,r=i===void 0?[]:i;return s=>{try{const l=localStorage.getItem(o);if(l){const a=JSON.parse(l);r.forEach(u=>{a[u]!==void 0&&(s.state[u]=a[u])})}s.subscribe((a,u)=>{const c={};r.forEach(d=>{c[d]=u[d]}),localStorage.setItem(o,JSON.stringify(c))})}catch(l){window.Joomla&&window.Joomla.renderMessages&&window.Joomla.renderMessages({error:[l]})}}}var gO=dv({state:aO,mutations:uO,actions:dO,getters:fO,plugins:[hO({key:"workflow-graph-state",paths:["workflowId","stages","transitions"]})]});const Jr={translate:e=>Joomla.Text._(e,e),sprintf:function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];const r=Jr.translate(t);let s=0;return r.replace(/%((%)|s|d)/g,l=>{let a=o[s];return l==="%d"&&(a=parseFloat(a),Number.isNaN(a)&&(a=0)),s+=1,a})},install:e=>e.mixin({methods:{translate(t){return Jr.translate(t)},sprintf(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return Jr.sprintf(t,...o)}}})};window.WorkflowGraph=window.WorkflowGraph||{},window.WorkflowGraph.Event=lO,document.addEventListener("DOMContentLoaded",()=>{const e=document.getElementById("workflow-graph-root");if(e){const t=Lp(uh);t.use(gO),t.use(Jr),t.mount(e)}else dt.error("COM_WORKFLOW_GRAPH_API_NOT_SET")});

The same content is in 9 releases, Joomla 6.1.2-rc1 to 6.1.4. See them all, or every version of this file.