- md5
- 8543f4da849eaf35dadb78e4973223c9
- sha1
- 6fff7be104316eb549bf5ecd5df17213b6aae6ea
- sha256
- f00272979c3ad72084942bb12729a42744a37a4f433ee9ded1d058d204129edd
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
import ma from"joomla.dialog";/**
* @vue/shared v3.5.44
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function as(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Le={},Pn=[],kt=()=>{},ya=()=>!1,xi=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Ai=e=>e.startsWith("onUpdate:"),je=Object.assign,us=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},yh=Object.prototype.hasOwnProperty,Te=(e,t)=>yh.call(e,t),ye=Array.isArray,hn=e=>Eo(e)==="[object Map]",Oi=e=>Eo(e)==="[object Set]",_a=e=>Eo(e)==="[object Date]",we=e=>typeof e=="function",He=e=>typeof e=="string",ft=e=>typeof e=="symbol",Me=e=>e!==null&&typeof e=="object",wa=e=>(Me(e)||we(e))&&we(e.then)&&we(e.catch),ba=Object.prototype.toString,Eo=e=>ba.call(e),_h=e=>Eo(e).slice(8,-1),Sa=e=>Eo(e)==="[object Object]",Ci=e=>He(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,xo=as(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ni=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},wh=/-\w/g,tt=Ni(e=>e.replace(wh,t=>t.slice(1).toUpperCase())),bh=/\B([A-Z])/g,gn=Ni(e=>e.replace(bh,"-$1").toLowerCase()),Ti=Ni(e=>e.charAt(0).toUpperCase()+e.slice(1)),cs=Ni(e=>e?"on"+Ti(e):""),bt=(e,t)=>!Object.is(e,t),ds=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)},Ea=function(t,n,o,i){i===void 0&&(i=!1),Object.defineProperty(t,n,{configurable:!0,enumerable:!1,writable:i,value:o})},Sh=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let xa;const Ao=()=>xa||(xa=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ue(e){if(ye(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],i=He(o)?Oh(o):Ue(o);if(i)for(const r in i)t[r]=i[r]}return t}else if(He(e)||Me(e))return e}const Eh=/;(?![^(]*\))/g,xh=/:([^]+)/,Ah=/"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;function Oh(e){const t={};return e.replace(Ah,n=>n.startsWith("/*")?"":n).split(Eh).forEach(n=>{if(n){const o=n.split(xh);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function Be(e){let t="";if(He(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 Ch(e){if(!e)return null;let t=e.class,n=e.style;return t&&!He(t)&&(e.class=Be(t)),n&&(e.style=Ue(n)),e}const Nh="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly",Th=as(Nh);function Aa(e){return!!e||e===""}function Mh(e,t,n){if(e.length!==t.length)return!1;let o=!0;for(let i=0;o&&i<e.length;i++)o=Mi(e[i],t[i],n);return o}function Oa(e,t,n){if(e.size!==t.size)return!1;const o=Array.from(t),i=new Uint8Array(o.length);for(const r of e){let s=-1;for(let l=0;l<o.length;l++)if(!i[l]&&Mi(r,o[l],n)){s=l;break}if(s<0)return!1;i[s]=1}return!0}function Ih(e,t,n){let o=hn(e),i=hn(t);if(o||i||(o=Oi(e),i=Oi(t),o||i))return o&&i?Oa(e,t,n):!1;const r=Object.keys(e).length,s=Object.keys(t).length;if(r!==s)return!1;for(const l in e){const a=e.hasOwnProperty(l),u=t.hasOwnProperty(l);if(a&&!u||!a&&u||!Mi(e[l],t[l],n))return!1}return String(e)===String(t)}function Ca(e,t,n,o){n||(n=[new Map,new Map]);const i=n,r=i[0],s=i[1];if(r.has(e)||s.has(t))return r.get(e)===t&&s.get(t)===e;r.set(e,t),s.set(t,e);const l=o(e,t,n);return r.delete(e),s.delete(t),l}function Mi(e,t,n){if(e===t)return!0;let o=_a(e),i=_a(t);return o||i?o&&i?e.getTime()===t.getTime():!1:(o=ft(e),i=ft(t),o||i?e===t:(o=ye(e),i=ye(t),o||i?o&&i?Ca(e,t,n,Mh):!1:(o=Me(e),i=Me(t),o||i?!o||!i?!1:Ca(e,t,n,Ih):String(e)===String(t))))}const Na=e=>!!(e&&e.__v_isRef===!0),me=e=>He(e)?e:e==null?"":ye(e)||Me(e)&&(e.toString===ba||!we(e.toString))?Na(e)?me(e.value):JSON.stringify(e,Ta,2):String(e),Ta=(e,t)=>Na(t)?Ta(e,t.value):hn(t)?{["Map("+t.size+")"]:[...t.entries()].reduce((n,o,i)=>{let r=o[0],s=o[1];return n[fs(r,i)+" =>"]=s,n},{})}:Oi(t)?{["Set("+t.size+")"]:[...t.values()].map(n=>fs(n))}:ft(t)?fs(t):Me(t)&&!ye(t)&&!Sa(t)?String(t):t,fs=function(t,n){n===void 0&&(n="");var o;return ft(t)?"Symbol("+((o=t.description)!=null?o:n)+")":t};/**
* @vue/reactivity v3.5.44
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let Xe;class Ma{constructor(t){t===void 0&&(t=!1),this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Xe&&(Xe.active?(this.parent=Xe,this.index=(Xe.scopes||(Xe.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes){const o=this.scopes.slice();for(t=0,n=o.length;t<n;t++)o[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){const i=this.scopes.slice();for(t=0,n=i.length;t<n;t++)i[t].resume()}const o=this.effects.slice();for(t=0,n=o.length;t<n;t++)o[t].resume()}}run(t){if(this._active){const n=Xe;try{return Xe=this,t()}finally{Xe=n}}}on(){++this._on===1&&(this.prevScope=Xe,Xe=this)}off(){if(this._on>0&&--this._on===0){if(Xe===this)Xe=this.prevScope;else{let t=Xe;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.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){const i=this.scopes.slice();for(n=0,o=i.length;n<o;n++)i[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 hs(e){return new Ma(e)}function gs(){return Xe}function Ii(e,t){Xe&&Xe.cleanups.push(e)}let We;const ps=new WeakSet;class Ia{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,Xe&&(Xe.active?Xe.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,ps.has(this)&&(ps.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Ra(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,La(this),Da(this);const t=We,n=St;We=this,St=!0;try{return this.fn()}finally{ka(this),We=t,St=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)_s(t);this.deps=this.depsTail=void 0,La(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?ps.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){ys(this)&&this.run()}get dirty(){return ys(this)}}let Pa=0,Oo,Co;function Ra(e,t){if(t===void 0&&(t=!1),e.flags|=8,t){e.next=Co,Co=e;return}e.next=Oo,Oo=e}function vs(){Pa++}function ms(){if(--Pa>0)return;if(Co){let t=Co;for(Co=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Oo;){let t=Oo;for(Oo=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 Da(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function ka(e){let t,n=e.depsTail,o=n;for(;o;){const i=o.prevDep;o.version===-1?(o===n&&(n=i),_s(o),Ph(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=i}e.deps=t,e.depsTail=n}function ys(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&($a(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function $a(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===No)||(e.globalVersion=No,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!ys(e))))return;e.flags|=2;const t=e.dep,n=We,o=St;We=e,St=!0;try{Da(e);const i=e.fn(e._value);(t.version===0||bt(i,e._value))&&(e.flags|=128,e._value=i,t.version++)}catch(i){throw t.version++,i}finally{We=n,St=o,ka(e),e.flags&=-3}}function _s(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)_s(r,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Ph(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 St=!0;const Fa=[];function Et(){Fa.push(St),St=!1}function xt(){const e=Fa.pop();St=e===void 0?!0:e}function La(e){const t=e.cleanup;if(e.cleanup=void 0,t){const n=We;We=void 0;try{t()}finally{We=n}}}let No=0;class Rh{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 Pi{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(!We||!St||We===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==We)n=this.activeLink=new Rh(We,this),We.deps?(n.prevDep=We.depsTail,We.depsTail.nextDep=n,We.depsTail=n):We.deps=We.depsTail=n,Ha(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=We.depsTail,n.nextDep=void 0,We.depsTail.nextDep=n,We.depsTail=n,We.deps===n&&(We.deps=o)}return n}trigger(t){this.version++,No++,this.notify(t)}notify(t){vs();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{ms()}}}function Ha(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)Ha(o)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Ri=new WeakMap,Rn=Symbol(""),ws=Symbol(""),To=Symbol("");function Qe(e,t,n){if(St&&We){let o=Ri.get(e);o||Ri.set(e,o=new Map);let i=o.get(n);i||(o.set(n,i=new Pi),i.map=o,i.key=n),i.track()}}function jt(e,t,n,o,i,r){const s=Ri.get(e);if(!s){No++;return}const l=a=>{a&&a.trigger()};if(vs(),t==="clear")s.forEach(l);else{const a=ye(e),u=a&&Ci(n);if(a&&n==="length"){const c=Number(o);s.forEach((d,f)=>{(f==="length"||f===To||!ft(f)&&f>=c)&&l(d)})}else switch((n!==void 0||s.has(void 0))&&l(s.get(n)),u&&l(s.get(To)),t){case"add":a?u&&l(s.get("length")):(l(s.get(Rn)),hn(e)&&l(s.get(ws)));break;case"delete":a||(l(s.get(Rn)),hn(e)&&l(s.get(ws)));break;case"set":hn(e)&&l(s.get(Rn));break}}ms()}function Dh(e,t){const n=Ri.get(e);return n&&n.get(t)}function jn(e){const t=Oe(e);return t===e||(Qe(t,"iterate",To),ht(e))?t:Ft(e)?pn(e)?t.map(n=>vn(vt(n))):t.map(vn):t.map(vt)}function Di(e){return Qe(e=Oe(e),"iterate",To),e}function $t(e,t){return Ft(e)?vn(pn(e)?vt(t):t):vt(t)}const kh={__proto__:null,[Symbol.iterator](){return bs(this,Symbol.iterator,e=>$t(this,e))},concat(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return jn(this).concat(...t.map(o=>ye(o)?jn(o):o))},entries(){return bs(this,"entries",e=>(e[1]=$t(this,e[1]),e))},every(e,t){return Jt(this,"every",e,t,void 0,arguments)},filter(e,t){return Jt(this,"filter",e,t,n=>n.map(o=>$t(this,o)),arguments)},find(e,t){return Jt(this,"find",e,t,n=>$t(this,n),arguments)},findIndex(e,t){return Jt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Jt(this,"findLast",e,t,n=>$t(this,n),arguments)},findLastIndex(e,t){return Jt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Jt(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 Ss(this,"includes",t)},indexOf(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Ss(this,"indexOf",t)},join(e){return jn(this).join(e)},lastIndexOf(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Ss(this,"lastIndexOf",t)},map(e,t){return Jt(this,"map",e,t,void 0,arguments)},pop(){return Mo(this,"pop")},push(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Mo(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 Ba(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 Ba(this,"reduceRight",e,n)},shift(){return Mo(this,"shift")},some(e,t){return Jt(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 Mo(this,"splice",t)},toReversed(){return jn(this).toReversed()},toSorted(e){return jn(this).toSorted(e)},toSpliced(){return jn(this).toSpliced(...arguments)},unshift(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Mo(this,"unshift",t)},values(){return bs(this,"values",e=>$t(this,e))}};function bs(e,t,n){const o=Di(e),i=o[t],r=i.call(o);if(o!==e&&!ht(e)){if(r[Symbol.toStringTag]==="Array Iterator"){const s=Object.create(Object.getPrototypeOf(r));return s.next=()=>Wa(r.next(),n),i!==za[t]&&Object.defineProperties(s,{return:{get(){const l=r.return;return typeof l=="function"?l.bind(r):l}},throw:{get(){const l=r.throw;return typeof l=="function"?l.bind(r):l}}}),s}r._next=r.next,r.next=()=>Wa(r._next(),n)}return r}function Wa(e,t){return e.done||(e.value=t(e.value)),e}const za=Array.prototype;function Jt(e,t,n,o,i,r){const s=Di(e),l=s!==e&&!ht(e),a=s[t];if(a!==za[t]){const d=a.apply(e,r);return l?vt(d):d}let u=n;s!==e&&(l?u=function(f,g){return n.call(this,$t(e,f),g,e)}:n.length>2&&(u=function(f,g){return n.call(this,f,g,e)}));const c=a.call(s,u,o);return l&&i?i(c):c}function Ba(e,t,n,o){const i=Di(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=$t(e,c)),n.call(this,c,$t(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?$t(e,a):a}function Ss(e,t,n){const o=Oe(e);Qe(o,"iterate",To);const i=o[t](...n);return(i===-1||i===!1)&&Wi(n[0])?(n[0]=Oe(n[0]),o[t](...n)):i}function Mo(e,t,n){n===void 0&&(n=[]),Et(),vs();const o=Oe(e)[t].apply(e,n);return ms(),xt(),o}const $h=as("__proto__,__v_isRef,__isVue"),Va=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ft));function Fh(e){ft(e)||(e=String(e));const t=Oe(this);return Qe(t,"has",e),t.hasOwnProperty(e)}class Ga{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?Za:qa:r?Xa:Ua).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const s=ye(t);if(!i){let a;if(s&&(a=kh[n]))return a;if(n==="hasOwnProperty")return Fh}const l=Reflect.get(t,n,Ve(t)?t:o);if((ft(n)?Va.has(n):$h(n))||(i||Qe(t,"get",n),r))return l;if(Ve(l)){const a=s&&Ci(n)?l:l.value;return i&&Me(a)?Li(a):a}return Me(l)?i?Li(l):Io(l):l}}class Ka extends Ga{constructor(t){t===void 0&&(t=!1),super(!1,t)}set(t,n,o,i){let r=t[n];const s=ye(t)&&Ci(n);if(!this._isShallow){const u=Ft(r);if(!ht(o)&&!Ft(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)&&a&&(l?bt(o,r)&&jt(t,"set",n,o):jt(t,"add",n,o)),a}deleteProperty(t,n){const o=Te(t,n);t[n];const i=Reflect.deleteProperty(t,n);return i&&o&&jt(t,"delete",n,void 0),i}has(t,n){const o=Reflect.has(t,n);return(!ft(n)||!Va.has(n))&&Qe(t,"has",n),o}ownKeys(t){return Qe(t,"iterate",ye(t)?"length":Rn),Reflect.ownKeys(t)}}class Ya extends Ga{constructor(t){t===void 0&&(t=!1),super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const Lh=new Ka,Hh=new Ya,Wh=new Ka(!0),zh=new Ya(!0),Es=e=>e,ki=e=>Reflect.getPrototypeOf(e);function Bh(e,t,n){return function(){const o=this.__v_raw,i=Oe(o),r=hn(i),s=e==="entries"||e===Symbol.iterator&&r,l=e==="keys"&&r,a=o[e](...arguments),u=n?Es:t?vn:vt;return!t&&Qe(i,"iterate",l?ws:Rn),je(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 $i(e){return function(){return e==="delete"?!1:e==="clear"?void 0:this}}function Vh(e,t){const n={get(i){const r=this.__v_raw,s=Oe(r),l=Oe(i);e||(bt(i,l)&&Qe(s,"get",i),Qe(s,"get",l));const a=ki(s),u=a.has,c=t?Es:e?vn:vt;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&&Qe(Oe(i),"iterate",Rn),i.size},has(i){const r=this.__v_raw,s=Oe(r),l=Oe(i);return e||(bt(i,l)&&Qe(s,"has",i),Qe(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?Es:e?vn:vt;return!e&&Qe(a,"iterate",Rn),l.forEach((c,d)=>i.call(r,u(c),u(d),s))}};return je(n,e?{add:$i("add"),set:$i("set"),delete:$i("delete"),clear:$i("clear")}:{add(i){const r=Oe(this),s=ki(r),l=Oe(i),a=!t&&!ht(i)&&!Ft(i)?l:i;return s.has.call(r,a)||bt(i,a)&&s.has.call(r,i)||bt(l,a)&&s.has.call(r,l)||(r.add(a),jt(r,"add",a,a)),this},set(i,r){!t&&!ht(r)&&!Ft(r)&&(r=Oe(r));const s=Oe(this),l=ki(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?bt(r,d)&&jt(s,"set",i,r):jt(s,"add",i,r),this},delete(i){const r=Oe(this),s=ki(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&&jt(r,"delete",i,void 0),c},clear(){const i=Oe(this),r=i.size!==0,s=i.clear();return r&&jt(i,"clear",void 0,void 0),s}}),["keys","values","entries",Symbol.iterator].forEach(i=>{n[i]=Bh(i,e,t)}),n}function Fi(e,t){const n=Vh(e,t);return(o,i,r)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_isShallow"?t:i==="__v_raw"?o:Reflect.get(Te(n,i)&&i in o?n:o,i,r)}const Gh={get:Fi(!1,!1)},Kh={get:Fi(!1,!0)},Yh={get:Fi(!0,!1)},Uh={get:Fi(!0,!0)},Ua=new WeakMap,Xa=new WeakMap,qa=new WeakMap,Za=new WeakMap;function Xh(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Io(e){return Ft(e)?e:Hi(e,!1,Lh,Gh,Ua)}function qh(e){return Hi(e,!1,Wh,Kh,Xa)}function Li(e){return Hi(e,!0,Hh,Yh,qa)}function OO(e){return Hi(e,!0,zh,Uh,Za)}function Hi(e,t,n,o,i){if(!Me(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const r=i.get(e);if(r)return r;const s=Xh(_h(e));if(s===0)return e;const l=new Proxy(e,s===2?o:n);return i.set(e,l),l}function pn(e){return Ft(e)?pn(e.__v_raw):!!(e&&e.__v_isReactive)}function Ft(e){return!!(e&&e.__v_isReadonly)}function ht(e){return!!(e&&e.__v_isShallow)}function Wi(e){return e?!!e.__v_raw:!1}function Oe(e){const t=e&&e.__v_raw;return t?Oe(t):e}function Po(e){return!Te(e,"__v_skip")&&Object.isExtensible(e)&&Ea(e,"__v_skip",!0),e}const vt=e=>Me(e)?Io(e):e,vn=e=>Me(e)?Li(e):e;function Ve(e){return e?e.__v_isRef===!0:!1}function Ce(e){return ja(e,!1)}function mn(e){return ja(e,!0)}function ja(e,t){return Ve(e)?e:new Zh(e,t)}class Zh{constructor(t,n){this.dep=new Pi,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Oe(t),this._value=n?t:vt(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)||Ft(t);t=o?t:Oe(t),bt(t,n)&&(this._rawValue=t,this._value=o?t:vt(t),this.dep.trigger())}}function ce(e){return Ve(e)?e.value:e}function Ee(e){return we(e)?e():ce(e)}const jh={get:(e,t,n)=>t==="__v_raw"?e:ce(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 Ja(e){return pn(e)?e:new Proxy(e,jh)}class Jh{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new Pi,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 Qh(e){return new Jh(e)}function eg(e){const t=ye(e)?new Array(e.length):{};for(const n in e)t[n]=Qa(e,n);return t}class tg{constructor(t,n,o){this._object=t,this._defaultValue=o,this.__v_isRef=!0,this._value=void 0,this._key=ft(n)?n:String(n),this._raw=Oe(t);let i=!0,r=t;if(!ye(t)||ft(this._key)||!Ci(this._key))do i=!Wi(r)||ht(r);while(i&&(r=r.__v_raw));this._shallow=i}get value(){let t=this._object[this._key];return this._shallow&&(t=ce(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 Dh(this._raw,this._key)}}class ng{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 ng(e):Me(e)&&arguments.length>1?Qa(e,t,n):Ce(e)}function Qa(e,t,n){return new tg(e,t,n)}class og{constructor(t,n,o){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Pi(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=No-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=o}notify(){if(this.flags|=16,!(this.flags&8)&&We!==this)return Ra(this,!0),!0}get value(){const t=this.dep.track();return $a(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function ig(e,t,n){n===void 0&&(n=!1);let o,i;return we(e)?o=e:(o=e.get,i=e.set),new og(o,i,n)}const zi={},Bi=new WeakMap;let Dn;function rg(e,t,n){if(n===void 0&&(n=Dn),n){let o=Bi.get(n);o||Bi.set(n,o=[]),o.push(e)}}function sg(e,t,n){n===void 0&&(n=Le);const o=n,i=o.immediate,r=o.deep,s=o.once,l=o.scheduler,a=o.augmentJob,u=o.call,c=L=>r?L:ht(L)||r===!1||r===0?yn(L,1):yn(L);let d,f,g,x,E=!1,w=!1;if(Ve(e)?(f=()=>e.value,E=ht(e)):pn(e)?(f=()=>c(e),E=!0):ye(e)?(w=!0,E=e.some(L=>pn(L)||ht(L)),f=()=>e.map(L=>{if(Ve(L))return L.value;if(pn(L))return c(L);if(we(L))return u?u(L,2):L()})):we(e)?t?f=u?()=>u(e,2):e:f=()=>{if(g){Et();try{g()}finally{xt()}}const L=Dn;Dn=d;try{return u?u(e,3,[x]):e(x)}finally{Dn=L}}:f=kt,t&&r){const L=f,K=r===!0?1/0:r;f=()=>yn(L(),K)}const O=gs(),R=()=>{d.stop(),O&&O.active&&us(O.effects,d)};if(s&&t){const L=t;t=function(){try{return L(...arguments)}finally{R()}}}let D=w?new Array(e.length).fill(zi):zi;const _=L=>{if(!(!(d.flags&1)||!d.dirty&&!L))if(t){const K=d.run();if(L||r||E||(w?K.some((Y,V)=>bt(Y,D[V])):bt(K,D))){const Y=Dn;Et();try{g&&g(),Dn=d;const V=[K,D===zi?void 0:w&&D[0]===zi?[]:D,x];D=K,u?u(t,3,V):t(...V)}finally{Dn=Y,xt()}}}else d.run()};return a&&a(_),d=new Ia(f),d.scheduler=l?()=>l(_,!1):_,x=L=>rg(L,!1,d),g=d.onStop=()=>{const L=Bi.get(d);if(L){if(u)u(L,4);else for(const K of L)K();Bi.delete(d)}},t?i?_(!0):D=d.run():l?l(_.bind(null,!0),!0):d.run(),R.pause=d.pause.bind(d),R.resume=d.resume.bind(d),R.stop=R,R}function yn(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))yn(e.value,t,n);else if(ye(e))for(let o=0;o<e.length;o++)yn(e[o],t,n);else if(Oi(e)||hn(e))e.forEach(o=>{yn(o,t,n)});else if(Sa(e)){for(const o in e)yn(e[o],t,n);for(const o of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,o)&&yn(e[o],t,n)}return e}/**
* @vue/runtime-core v3.5.44
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/const Ro=[];let xs=!1;function CO(e){if(xs)return;xs=!0,Et();const t=Ro.length?Ro[Ro.length-1].component:null,n=t&&t.appContext.config.warnHandler,o=lg();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)Jn(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 <"+rc(t,a.type)+">"}).join(`
`),o]);else{const l=["[Vue warn]: "+e,...r];o.length&&l.push(`
`,...ag(o)),console.warn(...l)}xt(),xs=!1}function lg(){let e=Ro[Ro.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 ag(e){const t=[];return e.forEach((n,o)=>{t.push(...o===0?[]:[`
`],...ug(n))}),t}function ug(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 <"+rc(t.component,t.type,i),s=">"+o;return t.props?[r,...cg(t.props),s]:[r+s]}function cg(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(o=>{t.push(...eu(o,e[o]))}),n.length>3&&t.push(" ..."),t}function eu(e,t,n){return He(t)?(t=JSON.stringify(t),n?t:[e+"="+t]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[e+"="+t]:Ve(t)?(t=eu(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 Jn(e,t,n,o){try{return o?e(...o):e()}catch(i){Vi(i,t,n)}}function At(e,t,n,o){if(we(e)){const i=Jn(e,t,n,o);return i&&wa(i)&&i.catch(r=>{Vi(r,t,n)}),i}if(ye(e)){const i=[];for(let r=0;r<e.length;r++)i.push(At(e[r],t,n,o));return i}}function Vi(e,t,n,o){o===void 0&&(o=!0);const i=t?t.vnode:null,r=t&&t.appContext.config||Le,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){Et(),Jn(s,null,10,[e,u,c]),xt();return}}dg(e,n,i,o,l)}function dg(e,t,n,o,i){if(i===void 0&&(i=!1),i)throw e;console.error(e)}const nt=[];let Ot=-1;const Lt=[];let _n=null,Qn=0;const tu=Promise.resolve();let Gi=null;function Ht(e){const t=Gi||tu;return e?t.then(this?e.bind(this):e):t}function fg(e){let t=Ot+1,n=nt.length;for(;t<n;){const o=t+n>>>1,i=nt[o],r=Do(i);r<e||r===e&&i.flags&2?t=o+1:n=o}return t}function As(e){if(!(e.flags&1)){const t=Do(e),n=nt[nt.length-1];!n||!(e.flags&2)&&t>=Do(n)?nt.push(e):nt.splice(fg(t),0,e),e.flags|=1,nu()}}function nu(){Gi||(Gi=tu.then(ru))}function hg(e){if(!ye(e))_n&&e.id===-1?_n.splice(Qn+1,0,e):e.flags&1||(Lt.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)Lt.push(e[t]);nu()}function ou(e,t,n,o){for(o===void 0&&(o=Ot+1);o<nt.length;o++){const i=nt[o];if(i&&i.flags&2){if(e&&i.id!==e.uid||t!==void 0&&!(i.id>=t))continue;nt.splice(o,1),o=e?o-1:Ot,i.flags&4&&(i.flags&=-2),i(),i.flags&4||(i.flags&=-2)}}}function iu(e,t,n){if(n===void 0&&(n=0),Lt.length){let o=Lt,i=0;if(t){o=[];for(let s=0;s<Lt.length;s++){const l=Lt[s];(l.i!==void 0?!l.i||l.i.uid<n:t.has(l))?Lt[i++]=l:o.push(l)}}const r=[...new Set(o)].sort((s,l)=>Do(s)-Do(l));if(Lt.length=i,_n){for(let s=0;s<r.length;s++)_n.push(r[s]);return}for(_n=r,Qn=0;Qn<_n.length;Qn++){const s=_n[Qn];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}_n=null,Qn=0}}let Os=!1;function gg(e,t){if(Os){e();return}const n=t===void 0?void 0:new Set(Lt);e(),Os=!0;try{ou(void 0,t),iu(void 0,n,t)}finally{Os=!1}}const Do=e=>e.id==null?e.flags&2?-1:1/0:e.id;function ru(e){const t=kt;try{for(Ot=0;Ot<nt.length;Ot++){const n=nt[Ot];n&&!(n.flags&8)&&(n.flags&4&&(n.flags&=-2),Jn(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2))}}finally{for(;Ot<nt.length;Ot++){const n=nt[Ot];n&&(n.flags&=-2)}Ot=-1,nt.length=0,iu(),Gi=null,(nt.length||Lt.length)&&ru()}}let ot=null,su=null;function Ki(e){const t=ot;return ot=e,su=e&&e.type.__scopeId||null,t}function wn(e,t,n){if(t===void 0&&(t=ot),!t||e._n)return e;const o=function(){o._d&&tr(-1);const r=Ki(t),s=en.length;let l;try{l=e(...arguments)}finally{for(let a=en.length;a>s;a--)Ks();Ki(r),o._d&&tr(1)}return l};return o._n=!0,o._c=!0,o._d=!0,o}function kn(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&&(Et(),At(a,n,8,[e.el,l,e,t]),xt())}}function bn(e,t){if(et){let n=et.provides;const o=et.parent&&et.parent.provides;o===n&&(n=et.provides=Object.create(o)),n[e]=t}}function mt(e,t,n){n===void 0&&(n=!1);const o=En();if(o||no){let i=no?no._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 pg=Symbol.for("v-scx"),vg=()=>mt(pg);function mg(e,t){return Cs(e,null,t)}function xe(e,t,n){return Cs(e,t,n)}function Cs(e,t,n){n===void 0&&(n=Le);const o=n,i=o.immediate;o.deep;const r=o.flush;o.once;const s=je({},n),l=t&&i||!t&&r!=="post";let a;if(Vo){if(r==="sync"){const f=vg();a=f.__watcherHandles||(f.__watcherHandles=[])}else if(!l){const f=()=>{};return f.stop=kt,f.resume=kt,f.pause=kt,f}}const u=et;s.call=(f,g,x)=>At(f,u,g,x);let c=!1;r==="post"?s.scheduler=f=>{f.i=u,rt(f,u&&u.suspense)}:r!=="sync"&&(c=!0,s.scheduler=(f,g)=>{g?f():As(f)}),s.augmentJob=f=>{t&&(f.flags|=4),c&&(f.flags|=2,u&&(f.id=u.uid,f.i=u))};const d=sg(e,t,s);return Vo&&(a?a.push(d):l&&d()),d}function yg(e,t,n){const o=this.proxy,i=He(e)?e.includes(".")?lu(o,e):()=>o[e]:e.bind(o,o);let r;we(t)?r=t:(r=t.handler,n=t);const s=Bo(this),l=Cs(i,r.bind(o),n);return s(),l}function lu(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 Sn=new WeakMap,au=Symbol("_vte"),Yi=e=>e.__isTeleport,$n=e=>e&&(e.disabled||e.disabled===""),_g=e=>e&&(e.defer||e.defer===""),uu=e=>typeof SVGElement<"u"&&e instanceof SVGElement,cu=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Ns=(e,t)=>{const n=e&&e.to;return He(n)?t?t(n):null:n},wg={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,g=u.o,x=g.insert,E=g.querySelector,w=g.createText;g.createComment;const O=g.parentNode,R=$n(t.props);let D=t.dynamicChildren;const _=(Y,V,U)=>{Y.shapeFlag&16&&c(Y.children,V,U,i,r,s,l,a)},L=function(V){V===void 0&&(V=t);const U=$n(V.props),j=V.target=Ns(V.props,E),ie=Ts(j,V,w,x);j&&(s!=="svg"&&uu(j)?s="svg":s!=="mathml"&&cu(j)&&(s="mathml"),i&&i.isCE&&(i.ce._teleportTargets||(i.ce._teleportTargets=new Set)).add(j),U||(_(V,j,ie),ko(V,!1)))},K=Y=>{const V=()=>{if(Sn.get(Y)===V){if(Sn.delete(Y),$n(Y.props)){const U=O(Y.el)||n;_(Y,U,Y.anchor),ko(Y,!0)}L(Y)}};Sn.set(Y,V),rt(V,r)};if(e==null){const Y=t.el=w(""),V=t.anchor=w("");if(x(Y,n,o),x(V,n,o),_g(t.props)||r&&r.pendingBranch){K(t);return}R&&(_(t,n,V),ko(t,!0)),L()}else{t.el=e.el;const Y=t.anchor=e.anchor,V=Sn.get(e);if(V){V.flags|=8,Sn.delete(e),K(t);return}t.targetStart=e.targetStart;const U=t.target=e.target,j=t.targetAnchor=e.targetAnchor,ie=$n(e.props),J=ie?n:U,ne=ie?Y:j;if(s==="svg"||uu(U)?s="svg":(s==="mathml"||cu(U))&&(s="mathml"),D?(f(e.dynamicChildren,D,J,i,r,s,l),Yu(e,t)):a||d(e,t,J,ne,i,r,s,l,!1),R)ie?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Ui(t,n,Y,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const h=Ns(t.props,E);h&&(t.target=h,Ui(t,h,null,u,0))}else ie&&Ui(t,U,j,u,1);ko(t,R)}},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,g=e.props,x=$n(g),E=i||!x,w=Sn.get(e);if(w&&(w.flags|=8,Sn.delete(e)),f&&(s(c),s(d)),i&&s(u),!w&&(x||f)&&l&16)for(let O=0;O<a.length;O++){const R=a[O];r(R,t,n,E,!!R.dynamicChildren)}},move:Ui,hydrate:bg};function Ui(e,t,n,o,i){let r=o.o.insert,s=o.m;i===void 0&&(i=2),i===0&&(e.targetStart&&r(e.targetStart,t,n),r(e.targetAnchor,t,n),n=e.targetAnchor);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),!Sn.has(e)&&(!f||$n(d))&&u&16)for(let g=0;g<c.length;g++)s(c[g],t,n,2);f&&r(a,t,n)}function bg(e,t,n,o,i,r,s,l){let a=s.o,u=a.nextSibling,c=a.parentNode,d=a.querySelector,f=a.insert,g=a.createText;function x(R,D){let _=D;for(;_;){if(_&&_.nodeType===8){if(_.data==="teleport start anchor")t.targetStart=_;else if(_.data==="teleport anchor"){t.targetAnchor=_,R._lpa=t.targetAnchor&&u(t.targetAnchor);break}}_=u(_)}}function E(R,D){D.anchor=l(u(R),D,c(R),n,o,i,r)}const w=t.target=Ns(t.props,d),O=$n(t.props);if(w){const R=w._lpa||w.firstChild;t.shapeFlag&16&&(O?(E(e,t),x(w,R),t.targetAnchor||Ts(w,t,g,f,c(e)===w?e:null)):(t.anchor=u(e),x(w,R),t.targetAnchor||Ts(w,t,g,f),l(R&&u(R),t,w,n,o,i,r))),ko(t,O)}else O&&t.shapeFlag&16&&(E(e,t),t.targetStart=e,t.targetAnchor=u(e));return t.anchor&&u(t.anchor)}const Sg=wg;function ko(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 Ts(e,t,n,o,i){i===void 0&&(i=null);const r=t.targetStart=n(""),s=t.targetAnchor=n("");return r[au]=s,e&&(o(r,e,i),o(s,e,i)),s}const Ms=Symbol("_leaveCb");function Eg(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==_t){t=n;break}}return t}function du(e){if(!Ps(e))return Yi(e.type)&&e.children?Eg(e.children):e;if(e.component)return e.component.subTree;const t=e.shapeFlag,n=e.children;if(n){if(t&16)return n[0];if(t&32&&we(n.default))return n.default()}}function Xi(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;Xi(Yi(n.type)&&du(n)||n,t)}else if(e.shapeFlag&128)e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback);else if(e.transition=t,e.type===$e&&ye(e.children)){const n=Du(e.children);n&&Xi(n,t)}}function Is(e){if(e.component)return Is(e.component.subTree);if(e.type===$e){const t=ye(e.children)&&Du(e.children);return t?Is(t):void 0}if(e.type!==_t)return e}function Fe(e,t){return we(e)?je({name:e.name},t,{setup:e}):e}function fu(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function hu(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const qi=new WeakMap;function $o(e,t,n,o,i){if(i===void 0&&(i=!1),ye(e)){e.forEach((E,w)=>$o(E,t&&(ye(t)?t[w]:t),n,o,i));return}if(eo(o)&&!i){o.shapeFlag&512&&o.type.__asyncResolved&&o.component.subTree.component&&$o(e,t,n,o.component.subTree);return}const r=o.shapeFlag&4?Ys(o.component):o.el,s=i?null:r,l=e.i,a=e.r,u=t&&t.r,c=l.refs===Le?l.refs={}:l.refs,d=l.setupState,f=Oe(d),g=d===Le?ya:E=>hu(c,E)?!1:Te(f,E),x=(E,w)=>!(w&&hu(c,w));if(u!=null&&u!==a){if(gu(t),He(u))c[u]=null,g(u)&&(d[u]=null);else if(Ve(u)){const E=t;x(u,E.k)&&(u.value=null),E.k&&(c[E.k]=null)}}if(we(a))Jn(a,l,12,[s,c]);else{const E=He(a),w=Ve(a);if(E||w){const O=()=>{if(e.f){const R=E?g(a)?d[a]:c[a]:x()||!e.k?a.value:c[e.k];if(i)ye(R)&&us(R,r);else if(ye(R))R.includes(r)||R.push(r);else if(E)c[a]=[r],g(a)&&(d[a]=c[a]);else{const D=[r];x(a,e.k)&&(a.value=D),e.k&&(c[e.k]=D)}}else E?(c[a]=s,g(a)&&(d[a]=s)):w&&(x(a,e.k)&&(a.value=s),e.k&&(c[e.k]=s))};if(s){const R=()=>{O(),qi.delete(e)};R.id=-1,qi.set(e,R),rt(R,n)}else gu(e),O()}}}function gu(e){const t=qi.get(e);t&&(t.flags|=8,qi.delete(e))}Ao().requestIdleCallback,Ao().cancelIdleCallback;const eo=e=>!!e.type.__asyncLoader,Ps=e=>e.type.__isKeepAlive;function xg(e,t){pu(e,"a",t)}function Ag(e,t){pu(e,"da",t)}function pu(e,t,n){n===void 0&&(n=et);const o=e.__wdc||(e.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(Zi(t,o,n),n){let i=n.parent;for(;i&&i.parent;)Ps(i.parent.vnode)&&Og(o,t,n,i),i=i.parent}}function Og(e,t,n,o){const i=Zi(t,e,o,!0);ji(()=>{us(o[t],i)},n)}function Zi(e,t,n,o){if(n===void 0&&(n=et),o===void 0&&(o=!1),n){const i=n[e]||(n[e]=[]),r=t.__weh||(t.__weh=function(){Et();const s=Bo(n);for(var l=arguments.length,a=new Array(l),u=0;u<l;u++)a[u]=arguments[u];const c=At(t,n,e,a);return s(),xt(),c});return o?i.unshift(r):i.push(r),r}}const Qt=e=>function(t,n){n===void 0&&(n=et),(!Vo||e==="sp")&&Zi(e,function(){return t(...arguments)},n)},vu=Qt("bm"),Ct=Qt("m"),Cg=Qt("bu"),Ng=Qt("u"),Rs=Qt("bum"),ji=Qt("um"),Tg=Qt("sp"),Mg=Qt("rtg"),Ig=Qt("rtc");function Pg(e,t){t===void 0&&(t=et),Zi("ec",e,t)}const mu="components";function Wt(e,t){return wu(mu,e,!0,t)||e}const yu=Symbol.for("v-ndc");function _u(e){return He(e)?wu(mu,e)||e:e||yu}function wu(e,t,n,o){o===void 0&&(o=!1);const i=ot||et;if(i){const r=i.type;{const l=ic(r,!1);if(l&&(l===t||l===tt(t)||l===Ti(tt(t))))return r}const s=bu(i[e]||r[e],t)||bu(i.appContext[e],t);return!s&&o?r:s}}function bu(e,t){return e&&(e[t]||e[tt(t)]||e[Ti(tt(t))])}function to(e,t,n,o){let i;const r=n&&n[o],s=ye(e);if(s||He(e)){const l=s&&pn(e);let a=!1,u=!1;l&&(a=!ht(e),u=Ft(e),e=Di(e)),i=new Array(e.length);for(let c=0,d=e.length;c<d;c++)i[c]=t(a?u?vn(vt(e[c])):vt(e[c]):e[c],c,void 0,r&&r[c])}else if(typeof e=="number")if(!Number.isInteger(e)||e<0)i=[];else{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 yt(e,t,n,o,i,r){if(n==null&&(n={}),ot.ce||ot.parent&&eo(ot.parent)&&ot.parent.ce){const u=n,c=Object.keys(u).length>0;return t!=="default"&&(u.name=t),se(),qe($e,null,[Ne("slot",u,o&&o())],c?-2:64)}let s=e[t];s&&s._c&&(s._d=!1);const l=en.length;se();let a;try{const u=s&&Su(s(n)),c=n.key||r||u&&u.key;a=qe($e,{key:(c&&!ft(c)?c:"_"+t)+(!u&&o?"_fb":"")},u||(o?o():[]),u&&e._===1?64:-2)}catch(u){for(let c=en.length;c>l;c--)Ks();throw u}finally{s&&s._c&&(s._d=!0)}return a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),a}function Su(e){return e.some(t=>io(t)?!(t.type===_t||t.type===$e&&!Su(t.children)):!0)?e:null}const Ds=e=>e?ec(e)?Ys(e):Ds(e.parent):null,Fo=je(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=>Ds(e.parent),$root:e=>Ds(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Nu(e),$forceUpdate:e=>e.f||(e.f=()=>{As(e.update)}),$nextTick:e=>e.n||(e.n=Ht.bind(e.proxy)),$watch:e=>yg.bind(e)}),ks=(e,t)=>e!==Le&&!e.__isScriptSetup&&Te(e,t),Rg={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 g=l[t];if(g!==void 0)switch(g){case 1:return i[t];case 2:return r[t];case 4:return o[t];case 3:return s[t]}else{if(ks(i,t))return l[t]=1,i[t];if(r!==Le&&Te(r,t))return l[t]=2,r[t];if(Te(s,t))return l[t]=3,s[t];if(o!==Le&&Te(o,t))return l[t]=4,o[t];Fs&&(l[t]=0)}}const c=Fo[t];let d,f;if(c)return t==="$attrs"&&Qe(n.attrs,"get",""),c(n);if((d=a.__cssModules)&&(d=d[t]))return d;if(o!==Le&&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 ks(r,t)?(r[t]=n,!0):i!==Le&&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!==Le&&t[0]!=="$"&&Te(o,t)||ks(i,t)||Te(a,t)||Te(s,t)||Te(Fo,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 Eu(){return xu().slots}function $s(){return xu().attrs}function xu(e){const t=En();return t.setupContext||(t.setupContext=oc(t))}function Au(e){return ye(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function Dg(e,t){const n={};for(const o in e)t.includes(o)||Object.defineProperty(n,o,{enumerable:!0,get:()=>e[o]});return n}let Fs=!0;function kg(e){const t=Nu(e),n=e.proxy,o=e.ctx;Fs=!1,t.beforeCreate&&Ou(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,g=t.beforeUpdate,x=t.updated,E=t.activated,w=t.deactivated;t.beforeDestroy;const O=t.beforeUnmount;t.destroyed;const R=t.unmounted,D=t.render,_=t.renderTracked,L=t.renderTriggered,K=t.errorCaptured,Y=t.serverPrefetch,V=t.expose,U=t.inheritAttrs,j=t.components,ie=t.directives;if(t.filters,u&&$g(u,o),s)for(const ne in s){const h=s[ne];we(h)&&(o[ne]=h.bind(n))}if(i){const ne=i.call(n,n);Me(ne)&&(e.data=Io(ne))}if(Fs=!0,r)for(const ne in r){const h=r[ne],C=we(h)?h.bind(n,n):we(h.get)?h.get.bind(n,n):kt,k=!we(h)&&we(h.set)?h.set.bind(n):kt,F=de({get:C,set:k});Object.defineProperty(o,ne,{enumerable:!0,configurable:!0,get:()=>F.value,set:T=>F.value=T})}if(l)for(const ne in l)Cu(l[ne],o,n,ne);if(a){const ne=we(a)?a.call(n):a;Reflect.ownKeys(ne).forEach(h=>{bn(h,ne[h])})}c&&Ou(c,e,"c");function J(ne,h){ye(h)?h.forEach(C=>ne(C.bind(n))):h&&ne(h.bind(n))}if(J(vu,d),J(Ct,f),J(Cg,g),J(Ng,x),J(xg,E),J(Ag,w),J(Pg,K),J(Ig,_),J(Mg,L),J(Rs,O),J(ji,R),J(Tg,Y),ye(V))if(V.length){const ne=e.exposed||(e.exposed={});V.forEach(h=>{Object.defineProperty(ne,h,{get:()=>n[h],set:C=>n[h]=C,enumerable:!0})})}else e.exposed||(e.exposed={});D&&e.render===kt&&(e.render=D),U!=null&&(e.inheritAttrs=U),j&&(e.components=j),ie&&(e.directives=ie),Y&&fu(e)}function $g(e,t,n){ye(e)&&(e=Ls(e));for(const o in e){const i=e[o];let r;Me(i)?"default"in i?r=mt(i.from||o,i.default,!0):r=mt(i.from||o):r=mt(i),Ve(r)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>r.value,set:s=>r.value=s}):t[o]=r}}function Ou(e,t,n){At(ye(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function Cu(e,t,n,o){let i=o.includes(".")?lu(n,o):()=>n[o];if(He(e)){const r=t[e];we(r)&&xe(i,r)}else if(we(e))xe(i,e.bind(n));else if(Me(e))if(ye(e))e.forEach(r=>Cu(r,t,n,o));else{const r=we(e.handler)?e.handler.bind(n):t[e.handler];we(r)&&xe(i,r,e)}}function Nu(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=>Ji(u,c,l,!0)),Ji(u,t,l)),Me(t)&&s.set(t,u),u}function Ji(e,t,n,o){o===void 0&&(o=!1);const i=t.mixins,r=t.extends;r&&Ji(e,r,n,!0),i&&i.forEach(s=>Ji(e,s,n,!0));for(const s in t)if(!(o&&s==="expose")){const l=Fg[s]||n&&n[s];e[s]=l?l(e[s],t[s]):t[s]}return e}const Fg={data:Tu,props:Mu,emits:Mu,methods:Lo,computed:Lo,beforeCreate:it,created:it,beforeMount:it,mounted:it,beforeUpdate:it,updated:it,beforeDestroy:it,beforeUnmount:it,destroyed:it,unmounted:it,activated:it,deactivated:it,errorCaptured:it,serverPrefetch:it,components:Lo,directives:Lo,watch:Hg,provide:Tu,inject:Lg};function Tu(e,t){return t?e?function(){return je(we(e)?e.call(this,this):e,we(t)?t.call(this,this):t)}:t:e}function Lg(e,t){return Lo(Ls(e),Ls(t))}function Ls(e){if(ye(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function it(e,t){return e?[...new Set([].concat(e,t))]:t}function Lo(e,t){return e?je(Object.create(null),e,t):t}function Mu(e,t){return e?ye(e)&&ye(t)?[...new Set([...e,...t])]:je(Object.create(null),Au(e),Au(t??{})):t}function Hg(e,t){if(!e)return t;if(!t)return e;const n=je(Object.create(null),e);for(const o in t)n[o]=it(e[o],t[o]);return n}function Iu(){return{app:null,config:{isNativeTag:ya,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 Wg=0;function zg(e,t){return function(o,i){i===void 0&&(i=null),we(o)||(o=je({},o)),i!=null&&!Me(i)&&(i=null);const r=Iu(),s=new WeakSet,l=[];let a=!1;const u=r.app={_uid:Wg++,_component:o,_props:i,_container:null,_context:r,_instance:null,version:_p,get config(){return r.config},set config(c){},use(c){for(var d=arguments.length,f=new Array(d>1?d-1:0),g=1;g<d;g++)f[g-1]=arguments[g];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 g=u._ceVNode||Ne(o,i);return g.appContext=r,f===!0?f="svg":f===!1&&(f=void 0),e(g,c,f),a=!0,u._container=c,c.__vue_app__=u,Ys(g.component)}},onUnmount(c){l.push(c)},unmount(){a&&(At(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=no;no=u;try{return c()}finally{no=d}}};return u}}let no=null;const Bg=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[t+"Modifiers"]||e[tt(t)+"Modifiers"]||e[gn(t)+"Modifiers"];function Vg(e,t){if(e.isUnmounted)return;const n=e.vnode.props||Le;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&&Bg(n,t.slice(7));a&&(a.trim&&(s=i.map(f=>He(f)?f.trim():f)),a.number&&(s=s.map(Sh)));let u,c=n[u=cs(t)]||n[u=cs(tt(t))];!c&&l&&(c=n[u=cs(gn(t))]),c&&At(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,At(d,e,6,s)}}const Gg=new WeakMap;function Pu(e,t,n){n===void 0&&(n=!1);const o=n?Gg: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=Pu(u,t,!0);c&&(l=!0,je(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):je(s,r),Me(e)&&o.set(e,s),s)}function Qi(e,t){return!e||!xi(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),Te(e,t[0].toLowerCase()+t.slice(1))||Te(e,gn(t))||Te(e,t))}function NO(){}function Ru(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,g=e.data,x=e.setupState,E=e.ctx,w=e.inheritAttrs,O=Ki(e);let R,D;try{if(n.shapeFlag&4){const L=i||o,K=L;R=Bt(c.call(K,L,d,f,x,g,E)),D=a}else{const L=t;R=Bt(L.length>1?L(f,{attrs:a,slots:l,emit:u}):L(f,null)),D=t.props?a:Kg(a)}}catch(L){en.length=0,Vi(L,e,1),R=Ne(_t)}let _=R;if(D&&w!==!1){const L=Object.keys(D),K=_,Y=K.shapeFlag;L.length&&Y&7&&(s&&L.some(Ai)&&(D=Yg(D,s)),_=ro(_,D,!1,!0))}if(n.dirs&&(_=ro(_,null,!1,!0),_.dirs=_.dirs?_.dirs.concat(n.dirs):n.dirs),n.transition){const L=Yi(_.type)&&du(_)||_;Xi(L,n.transition)}return R=_,Ki(O),R}function Du(e,t){let n;for(let o=0;o<e.length;o++){const i=e[o];if(io(i)){if(i.type!==_t||i.children==="v-if"){if(n)return;n=i}}else return}return n}const Kg=e=>{let t;for(const n in e)(n==="class"||n==="style"||xi(n))&&((t||(t={}))[n]=e[n]);return t},Yg=(e,t)=>{const n={};for(const o in e)(!Ai(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function Ug(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?ku(o,s,u):!!s;if(a&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const f=c[d];if($u(s,o,f)&&!Qi(u,f))return!0}}}else return(i||l)&&(!l||!l.$stable)?!0:o===s?!1:o?s?ku(o,s,u):!0:!!s;return!1}function ku(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(!Te(e,r)||$u(t,e,r)&&!Qi(n,r))return!0}return!1}function $u(e,t,n){const o=e[n],i=t[n];return n==="style"&&Me(o)&&Me(i)?!Mi(o,i):o!==i}function Xg(e,t){let n=e.vnode,o=e.parent,i=e.suspense;for(;o;){const r=o.subTree;if(r.suspense&&r.suspense.activeBranch===n&&(r.suspense.vnode.el=r.el=t,n=r),r===n)(n=o.vnode).el=t,o=o.parent;else break}i&&i.activeBranch===n&&(i.vnode.el=t)}const Fu={},Lu=()=>Object.create(Fu),Hu=e=>Object.getPrototypeOf(e)===Fu;function qg(e,t,n,o){o===void 0&&(o=!1);const i={},r=Lu();e.propsDefaults=Object.create(null),Wu(e,t,i,r);for(const s in e.propsOptions[0])s in i||(i[s]=void 0);n?e.props=o?i:qh(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 g=d[f];if(Qi(e.emitsOptions,g))continue;const x=t[g];if(u)if(Te(r,g))x!==r[g]&&(r[g]=x,c=!0);else{const E=tt(g);i[E]=Hs(u,l,E,x,e,!1)}else x!==r[g]&&(r[g]=x,c=!0)}}}else{Wu(e,t,i,r)&&(c=!0);let d;for(const f in l)(!t||!Te(t,f)&&((d=gn(f))===f||!Te(t,d)))&&(u?n&&(n[f]!==void 0||n[d]!==void 0)&&(i[f]=Hs(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&&jt(e.attrs,"set","")}function Wu(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(xo(u))continue;const c=t[u];let d;r&&Te(r,d=tt(u))?!s||!s.includes(d)?n[d]=c:(a||(a={}))[d]=c:Qi(e.emitsOptions,u)||(!(u in o)||c!==o[u])&&(o[u]=c,l=!0)}if(s){const u=Oe(n),c=a||Le;for(let d=0;d<s.length;d++){const f=s[d];n[f]=Hs(r,u,f,c[f],e,!Te(c,f))}}return l}function Hs(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=Bo(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===gn(n))&&(o=!0))}return o}const jg=new WeakMap;function zu(e,t,n){n===void 0&&(n=!1);const o=n?jg: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=zu(d,t,!0),g=f[0],x=f[1];je(s,g),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,Pn),Pn;if(ye(r))for(let c=0;c<r.length;c++){const d=tt(r[c]);Bu(d)&&(s[d]=Le)}else if(r)for(const c in r){const d=tt(c);if(Bu(d)){const f=r[c],g=s[d]=ye(f)||we(f)?{type:f}:je({},f),x=g.type;let E=!1,w=!0;if(ye(x))for(let O=0;O<x.length;++O){const R=x[O],D=we(R)&&R.name;if(D==="Boolean"){E=!0;break}else D==="String"&&(w=!1)}else E=we(x)&&x.name==="Boolean";g[0]=E,g[1]=w,(E||Te(g,"default"))&&l.push(d)}}const u=[s,l];return Me(e)&&o.set(e,u),u}function Bu(e){return e[0]!=="$"&&!xo(e)}const Ws=e=>e==="_"||e==="_ctx"||e==="$stable",zs=e=>ye(e)?e.map(Bt):[Bt(e)],Jg=(e,t,n)=>{if(t._n)return t;const o=wn(function(){return zs(t(...arguments))},n);return o._c=!1,o},Vu=(e,t,n)=>{const o=e._ctx;for(const i in e){if(Ws(i))continue;const r=e[i];if(we(r))t[i]=Jg(i,r,o);else if(r!=null){const s=zs(r);t[i]=()=>s}}},Gu=(e,t)=>{const n=zs(t);e.slots.default=()=>n},Ku=(e,t,n)=>{for(const o in t)(n||!Ws(o))&&(e[o]=t[o])},Qg=(e,t,n)=>{const o=e.slots=Lu();if(e.vnode.shapeFlag&32){const i=t._;i?(Ku(o,t,n),n&&Ea(o,"_",i,!0)):Vu(t,o)}else t&&Gu(e,t)},ep=(e,t,n)=>{const o=e.vnode,i=e.slots;let r=!0,s=Le;if(o.shapeFlag&32){const l=t._;l?n&&l===1?r=!1:Ku(i,t,n):(r=!t.$stable,Vu(t,i)),s=t}else t&&(Gu(e,t),s={default:1});if(r)for(const l in i)!Ws(l)&&s[l]==null&&delete i[l]};function tp(){typeof __VUE_PROD_HYDRATION_MISMATCH_DETAILS__!="boolean"&&(Ao().__VUE_PROD_HYDRATION_MISMATCH_DETAILS__=!1)}const rt=sp;function np(e){return op(e)}function op(e,t){tp();const n=Ao();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,g=e.setScopeId,x=g===void 0?kt:g,E=e.insertStaticContent,w=function(v,p,m,S,A,N,b,M,P){if(S===void 0&&(S=null),A===void 0&&(A=null),N===void 0&&(N=null),b===void 0&&(b=void 0),M===void 0&&(M=null),P===void 0&&(P=!!p.dynamicChildren),v===p)return;v&&!Ho(v,p)&&(S=te(v),q(v,A,N,!0),v=null),p.patchFlag===-2&&(P=!1,p.dynamicChildren=null),p.dynamicChildren&&v&&v.dynamicChildren&&v.dynamicChildren.hasOnce&&(p.dynamicChildren===Pn&&(p.dynamicChildren=[]),p.dynamicChildren.hasOnce=!0);const I=p.type,B=p.ref,G=p.shapeFlag;switch(I){case er:O(v,p,m,S);break;case _t:R(v,p,m,S);break;case Gs:v==null&&D(p,m,S,b);break;case $e:ne(v,p,m,S,A,N,b,M,P);break;default:G&1?K(v,p,m,S,A,N,b,M,P):G&6?h(v,p,m,S,A,N,b,M,P):(G&64||G&128)&&I.process(v,p,m,S,A,N,b,M,P,ve)}B!=null&&A?$o(B,v&&v.ref,N,p||v,!p):B==null&&v&&v.ref!=null&&$o(v.ref,null,N,v,!0)},O=(y,v,p,m)=>{if(y==null)o(v.el=l(v.children),p,m);else{const S=v.el=y.el;v.children!==y.children&&u(S,v.children)}},R=(y,v,p,m)=>{y==null?o(v.el=a(v.children||""),p,m):v.el=y.el},D=(y,v,p,m)=>{var S=E(y.children,v,p,m,y.el,y.anchor);y.el=S[0],y.anchor=S[1]},_=(y,v,p)=>{let m=y.el,S=y.anchor,A;for(;m&&m!==S;)A=f(m),o(m,v,p),m=A;o(S,v,p)},L=y=>{let v=y.el,p=y.anchor,m;for(;v&&v!==p;)m=f(v),i(v),v=m;i(p)},K=(y,v,p,m,S,A,N,b,M)=>{if(v.type==="svg"?N="svg":v.type==="math"&&(N="mathml"),y==null)Y(v,p,m,S,A,N,b,M);else{const P=y.el&&y.el._isVueCE?y.el:null;try{P&&P._beginPatch(),j(y,v,S,A,N,b,M)}finally{P&&P._endPatch()}}},Y=(y,v,p,m,S,A,N,b)=>{let M,P;const I=y.props,B=y.shapeFlag,G=y.transition,oe=y.dirs;if(M=y.el=s(y.type,A,I&&I.is,I),B&8?c(M,y.children):B&16&&U(y.children,M,null,m,S,Bs(y,A),N,b),oe&&kn(y,null,m,"created"),V(M,y,y.scopeId,N,m),I){for(const ge in I)ge!=="value"&&!xo(ge)&&r(M,ge,null,I[ge],A,m);"value"in I&&r(M,"value",null,I.value,A),(P=I.onVnodeBeforeMount)&&Vt(P,m,y)}oe&&kn(y,null,m,"beforeMount");const Q=ip(S,G);Q&&G.beforeEnter(M),o(M,v,p),((P=I&&I.onVnodeMounted)||Q||oe)&&rt(()=>{P&&Vt(P,m,y),Q&&G.enter(M),oe&&kn(y,null,m,"mounted")},S)},V=(y,v,p,m,S)=>{if(p&&x(y,p),m)for(let A=0;A<m.length;A++)x(y,m[A]);if(S){let A=S.subTree;if(v===A||qu(A.type)&&(A.ssContent===v||A.ssFallback===v)){const N=S.vnode;V(y,N,N.scopeId,N.slotScopeIds,S.parent)}}},U=function(v,p,m,S,A,N,b,M,P){P===void 0&&(P=0);for(let I=P;I<v.length;I++){const B=v[I]=M?tn(v[I]):Bt(v[I]);w(null,B,p,m,S,A,N,b,M)}},j=(y,v,p,m,S,A,N)=>{const b=v.el=y.el;let M=v.patchFlag,P=v.dynamicChildren,I=v.dirs;M|=y.patchFlag&16;const B=y.props||Le,G=v.props||Le;let oe;if(p&&Fn(p,!1),(oe=G.onVnodeBeforeUpdate)&&Vt(oe,p,v,y),I&&kn(v,y,p,"beforeUpdate"),p&&Fn(p,!0),P&&(!y.dynamicChildren||y.dynamicChildren.length!==P.length)&&(M=0,N=!1,P=null),(B.innerHTML&&G.innerHTML==null||B.textContent&&G.textContent==null)&&c(b,""),P?ie(y.dynamicChildren,P,b,p,m,Bs(v,S),A):N||H(y,v,b,null,p,m,Bs(v,S),A,!1),M>0){if(M&16)J(b,B,G,p,S);else if(M&2&&B.class!==G.class&&r(b,"class",null,G.class,S),M&4&&r(b,"style",B.style,G.style,S),M&8){const Q=v.dynamicProps;for(let ge=0;ge<Q.length;ge++){const _e=Q[ge],Ae=B[_e],Re=G[_e];(Re!==Ae||_e==="value")&&r(b,_e,Ae,Re,S,p)}}M&1&&y.children!==v.children&&c(b,v.children)}else!N&&P==null&&J(b,B,G,p,S);((oe=G.onVnodeUpdated)||I)&&rt(()=>{oe&&Vt(oe,p,v,y),I&&kn(v,y,p,"updated")},m)},ie=(y,v,p,m,S,A,N)=>{for(let b=0;b<v.length;b++){const M=y[b],P=v[b],I=M.el||Vs(M),B=I&&(M.type===$e||!Ho(M,P)||M.shapeFlag&198)?d(I):p;w(M,P,B,null,m,S,A,N,!0)}},J=(y,v,p,m,S)=>{if(v!==p){if(v!==Le)for(const A in v)!xo(A)&&!(A in p)&&r(y,A,v[A],null,S,m);for(const A in p){if(xo(A))continue;const N=p[A],b=v[A];N!==b&&A!=="value"&&r(y,A,b,N,S,m)}"value"in p&&r(y,"value",v.value,p.value,S)}},ne=(y,v,p,m,S,A,N,b,M)=>{const P=v.el=y?y.el:l(""),I=v.anchor=y?y.anchor:l("");let B=v.patchFlag,G=v.dynamicChildren,oe=v.slotScopeIds;oe&&(b=b?b.concat(oe):oe),y==null?(o(P,p,m),o(I,p,m),U(v.children||[],p,I,S,A,N,b,M)):B>0&&B&64&&G&&y.dynamicChildren&&y.dynamicChildren.length===G.length?(ie(y.dynamicChildren,G,p,S,A,N,b),(v.key!=null||S&&v===S.subTree)&&Yu(y,v)):H(y,v,p,I,S,A,N,b,M)},h=(y,v,p,m,S,A,N,b,M)=>{v.slotScopeIds=b,y==null?v.shapeFlag&512?S.ctx.activate(v,p,m,N,M):C(v,p,m,S,A,N,M):k(y,v,M)},C=(y,v,p,m,S,A,N)=>{const b=y.component=dp(y,m,S);if(Ps(y)&&(b.ctx.renderer=ve),fp(b,!1,N),b.asyncDep){if(S&&S.registerDep(b,F,N,A),!y.el){const M=b.subTree=Ne(_t);R(null,M,v,p),y.placeholder=M.el}}else F(b,y,v,p,S,A,N)},k=(y,v,p)=>{const m=v.component=y.component;if(Ug(y,v,p))if(m.asyncDep&&!m.asyncResolved){v.el=y.el,v.placeholder=y.placeholder,T(m,v,p);return}else m.next=v,m.update();else v.el=y.el,v.placeholder=y.placeholder,m.vnode=v},F=(y,v,p,m,S,A,N)=>{const b=()=>{if(y.isMounted){let B=y.next,G=y.bu,oe=y.u,Q=y.parent,ge=y.vnode;{const Je=Uu(y);if(Je){B&&(B.el=ge.el,T(y,B,N)),Je.asyncDep.then(()=>{rt(()=>{y.isUnmounted||P()},S)});return}}let _e=B,Ae;Fn(y,!1),B?(B.el=ge.el,T(y,B,N)):B=ge,G&&ds(G),(Ae=B.props&&B.props.onVnodeBeforeUpdate)&&Vt(Ae,Q,B,ge),Fn(y,!0);const Re=Ru(y),ze=y.subTree;y.subTree=Re,w(ze,Re,d(ze.el),te(ze),y,S,A),B.el=Re.el,_e===null&&Xg(y,Re.el),oe&&rt(oe,S),(Ae=B.props&&B.props.onVnodeUpdated)&&rt(()=>Vt(Ae,Q,B,ge),S)}else{let B;const G=v;G.el;const oe=G.props,Q=y.bm,ge=y.m,_e=y.parent,Ae=y.root,Re=y.type,ze=eo(v);Fn(y,!1),Q&&ds(Q),!ze&&(B=oe&&oe.onVnodeBeforeMount)&&Vt(B,_e,v),Fn(y,!0);{Ae.ce&&Ae.ce._hasShadowRoot()&&Ae.ce._injectChildStyle(Re,y.parent?y.parent.type:void 0);const Je=y.subTree=Ru(y);w(null,Je,p,m,y,S,A),v.el=Je.el}if(ge&&rt(ge,S),!ze&&(B=oe&&oe.onVnodeMounted)){const Je=v;rt(()=>Vt(B,_e,Je),S)}(v.shapeFlag&256||_e&&eo(_e.vnode)&&_e.vnode.shapeFlag&256)&&y.a&&rt(y.a,S),y.isMounted=!0,v=p=m=null}};y.scope.on();const M=y.effect=new Ia(b);y.scope.off();const P=y.update=M.run.bind(M),I=y.job=M.runIfDirty.bind(M);I.i=y,I.id=y.uid,M.scheduler=()=>As(I),Fn(y,!0),P()},T=(y,v,p)=>{v.component=y;const m=y.vnode.props;y.vnode=v,y.next=null,Zg(y,v.props,m,p),ep(y,v.children,p),Et(),ou(y),xt()},H=function(v,p,m,S,A,N,b,M,P){P===void 0&&(P=!1);const I=v&&v.children,B=v?v.shapeFlag:0,G=p.children,oe=p.patchFlag,Q=p.shapeFlag;if(oe>0){if(oe&128){z(I,G,m,S,A,N,b,M,P);return}else if(oe&256){W(I,G,m,S,A,N,b,M,P);return}}Q&8?(B&16&&Z(I,A,N),G!==I&&c(m,G)):B&16?Q&16?z(I,G,m,S,A,N,b,M,P):Z(I,A,N,!0):(B&8&&c(m,""),Q&16&&U(G,m,S,A,N,b,M,P))},W=(y,v,p,m,S,A,N,b,M)=>{y=y||Pn,v=v||Pn;const P=y.length,I=v.length,B=Math.min(P,I);let G;for(G=0;G<B;G++){const oe=v[G]=M?tn(v[G]):Bt(v[G]);w(y[G],oe,p,null,S,A,N,b,M)}P>I?Z(y,S,A,!0,!1,B):U(v,p,m,S,A,N,b,M,B)},z=(y,v,p,m,S,A,N,b,M)=>{let P=0;const I=v.length;let B=y.length-1,G=I-1;for(;P<=B&&P<=G;){const oe=y[P],Q=v[P]=M?tn(v[P]):Bt(v[P]);if(Ho(oe,Q))w(oe,Q,p,null,S,A,N,b,M);else break;P++}for(;P<=B&&P<=G;){const oe=y[B],Q=v[G]=M?tn(v[G]):Bt(v[G]);if(Ho(oe,Q))w(oe,Q,p,null,S,A,N,b,M);else break;B--,G--}if(P>B){if(P<=G){const oe=G+1,Q=oe<I?v[oe].el:m;for(;P<=G;)w(null,v[P]=M?tn(v[P]):Bt(v[P]),p,Q,S,A,N,b,M),P++}}else if(P>G)for(;P<=B;)q(y[P],S,A,!0),P++;else{const oe=P,Q=P,ge=new Map;for(P=Q;P<=G;P++){const dt=v[P]=M?tn(v[P]):Bt(v[P]);dt.key!=null&&ge.set(dt.key,P)}let _e,Ae=0;const Re=G-Q+1;let ze=!1,Je=0;const wt=new Array(Re);for(P=0;P<Re;P++)wt[P]=0;for(P=oe;P<=B;P++){const dt=y[P];if(Ae>=Re){q(dt,S,A,!0);continue}let Dt;if(dt.key!=null)Dt=ge.get(dt.key);else for(_e=Q;_e<=G;_e++)if(wt[_e-Q]===0&&Ho(dt,v[_e])){Dt=_e;break}Dt===void 0?q(dt,S,A,!0):(wt[Dt-Q]=P+1,Dt>=Je?Je=Dt:ze=!0,w(dt,v[Dt],p,null,S,A,N,b,M),Ae++)}const Ei=ze?rp(wt):Pn;for(_e=Ei.length-1,P=Re-1;P>=0;P--){const dt=Q+P,Dt=v[dt],pa=v[dt+1],va=dt+1<I?pa.el||Vs(pa):m;wt[P]===0?w(null,Dt,p,va,S,A,N,b,M):ze&&(_e<0||P!==Ei[_e]?$(Dt,p,va,2):_e--)}}},$=function(v,p,m,S,A){A===void 0&&(A=null);const N=v.el,b=v.type,M=v.transition,P=v.children,I=v.shapeFlag;if(I&6){$(v.component.subTree,p,m,S);return}if(I&128){v.suspense.move(p,m,S);return}if(I&64){b.move(v,p,m,ve);return}if(b===$e){o(N,p,m);for(let G=0;G<P.length;G++)$(P[G],p,m,S);o(v.anchor,p,m);return}if(b===Gs){_(v,p,m);return}if(S!==2&&I&1&&M)if(S===0)M.persisted&&!N[Ms]?o(N,p,m):(M.beforeEnter(N),o(N,p,m),rt(()=>M.enter(N),A));else{const G=M.leave,oe=M.delayLeave,Q=M.afterLeave,ge=()=>{v.ctx.isUnmounted?i(N):o(N,p,m)},_e=()=>{const Ae=N._isLeaving||!!N[Ms];N._isLeaving&&N[Ms](!0),M.persisted&&!Ae?ge():G(N,()=>{ge(),Q&&Q()})};oe?oe(N,ge,_e):_e()}else o(N,p,m)},q=function(v,p,m,S,A){S===void 0&&(S=!1),A===void 0&&(A=!1);const N=v.type,b=v.props,M=v.ref,P=v.children,I=v.dynamicChildren,B=v.shapeFlag,G=v.patchFlag,oe=v.dirs,Q=v.cacheIndex,ge=v.memo;if((G===-2||I&&I.hasOnce)&&(A=!1),M!=null&&(Et(),$o(M,null,m,v,!0),xt()),Q!=null&&(!v.ctx||v.ctx===p)&&(p.renderCache[Q]=void 0),B&256){p.ctx.deactivate(v);return}const _e=B&1&&oe,Ae=!eo(v);let Re;if(Ae&&(Re=b&&b.onVnodeBeforeUnmount)&&Vt(Re,p,v),B&6)X(v.component,m,S);else{if(B&128){v.suspense.unmount(m,S);return}_e&&kn(v,null,p,"beforeUnmount"),B&64?v.type.remove(v,p,m,ve,S):I&&!I.hasOnce&&(N!==$e||G>0&&G&64)?Z(I,p,m,!1,!0):(N===$e&&G&384||!A&&B&16)&&Z(P,p,m),S&&le(v)}const ze=ge!=null&&Q==null;(Ae&&(Re=b&&b.onVnodeUnmounted)||_e||ze)&&rt(()=>{Re&&Vt(Re,p,v),_e&&kn(v,null,p,"unmounted"),ze&&(v.el=null)},m)},le=y=>{const v=y.type,p=y.el,m=y.anchor,S=y.transition,A=v===$e;if(A&&!S){ue(p,m);return}if(v===Gs){L(y),S&&!S.persisted&&S.afterLeave&&S.afterLeave();return}const N=A?Is(y):y,b=()=>{A?d(p)&&ue(p,m):i(p),S&&!S.persisted&&S.afterLeave&&S.afterLeave()};if(N&&N.shapeFlag&1&&S&&!S.persisted){const M=S.leave,P=S.delayLeave,I=N.el,B=()=>M(I,b);P?P(I,b,B):B()}else b()},ue=(y,v)=>{let p;for(;y!==v;)p=f(y),i(y),y=p;i(v)},X=(y,v,p)=>{const m=y.bum,S=y.scope,A=y.job,N=y.subTree,b=y.um,M=y.m,P=y.a;Xu(M),Xu(P),m&&ds(m),S.stop(),A?(A.flags|=8,q(N,y,v,p)):y.vnode.el&&N&&(N.transition=y.vnode.transition,q(N,y,v,p)),b&&rt(b,v),rt(()=>{y.isUnmounted=!0},v)},Z=function(v,p,m,S,A,N){S===void 0&&(S=!1),A===void 0&&(A=!1),N===void 0&&(N=0);for(let b=N;b<v.length;b++)q(v[b],p,m,S,A)},te=y=>{if(y.shapeFlag&6)return te(y.component.subTree);if(y.shapeFlag&128)return y.suspense.next();const v=f(y.anchor||y.el),p=v&&v[au];return p?f(p):v},pe=(y,v,p)=>{const m=y&&v._vnode?void 0:y&&y.component?y.component.uid:cp();gg(()=>{y==null?v._vnode&&q(v._vnode,null,null,!0):w(v._vnode||null,y,v,null,null,null,p),v._vnode=y},m)},ve={p:w,um:q,m:$,r:le,mt:C,mc:U,pc:H,pbc:ie,n:te,o:e};return{render:pe,hydrate:void 0,createApp:zg(pe)}}function Bs(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 Fn(e,t){let n=e.effect,o=e.job;t?(n.flags|=32,o.flags|=4):(n.flags&=-33,o.flags&=-5)}function ip(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Yu(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]=tn(i[r]),l.el=s.el),l.type===er&&(l.patchFlag===-1&&(l=i[r]=tn(l)),l.el=s.el),l.type===_t&&!l.el&&(l.el=s.el)}}function rp(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 Uu(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Uu(t)}function Xu(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Vs(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?Vs(t.subTree):null}const qu=e=>e.__isSuspense;function sp(e,t){t&&t.pendingBranch?ye(e)?t.effects.push(...e):t.effects.push(e):hg(e)}const $e=Symbol.for("v-fgt"),er=Symbol.for("v-txt"),_t=Symbol.for("v-cmt"),Gs=Symbol.for("v-stc"),en=[];let st=null;function se(e){e===void 0&&(e=!1),en.push(st=e?null:[])}function Ks(){en.pop(),st=en[en.length-1]||null}let oo=1;function tr(e,t){t===void 0&&(t=!1),oo+=e,e<0&&st&&t&&(st.hasOnce=!0)}function Zu(e){return e.dynamicChildren=oo>0?st||Pn:null,Ks(),oo>0&&st&&st.push(e),e}function he(e,t,n,o,i,r){return Zu(ee(e,t,n,o,i,r,!0))}function qe(e,t,n,o,i){return Zu(Ne(e,t,n,o,i,!0))}function io(e){return e?e.__v_isVNode===!0:!1}function Ho(e,t){return e.type===t.type&&e.key===t.key}const ju=e=>{let t=e.key;return t??null},nr=e=>{let t=e.ref,n=e.ref_key,o=e.ref_for;return typeof t=="number"&&(t=""+t),t!=null?He(t)||Ve(t)||we(t)?{i:ot,r:t,k:n,f:!!o}:t:null};function ee(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===$e?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&&ju(t),ref:t&&nr(t),scopeId:su,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:ot};return l?(or(a,n),r&128&&e.normalize(a)):n&&(a.shapeFlag|=He(n)?8:16),oo>0&&!s&&st&&(a.patchFlag>0||r&6)&&a.patchFlag!==32&&st.push(a),a}const Ne=lp;function lp(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===yu)&&(e=_t),io(e)){const l=ro(e,t,!0);return n&&or(l,n),oo>0&&!r&&st&&(l.shapeFlag&6?st[st.indexOf(e)]=l:st.push(l)),l.patchFlag=-2,l}if(mp(e)&&(e=e.__vccOpts),t){t=ap(t);let l=t,a=l.class,u=l.style;a&&!He(a)&&(t.class=Be(a)),Me(u)&&(Wi(u)&&!ye(u)&&(u=je({},u)),t.style=Ue(u))}const s=He(e)?1:qu(e)?128:Yi(e)?64:Me(e)?4:we(e)?2:0;return ee(e,t,n,o,i,s,r,!0)}function ap(e){return e?Wi(e)||Hu(e)?je({},e):e:null}function ro(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?Wo(i||{},t):i,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&ju(u),ref:t&&t.ref?n&&r?ye(r)?r.concat(nr(t)):[r,nr(t)]:nr(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!==$e?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&&ro(e.ssContent),ssFallback:e.ssFallback&&ro(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return a&&o&&Xi(c,a.clone(c)),c}function zt(e,t){return e===void 0&&(e=" "),t===void 0&&(t=0),Ne(er,null,e,t)}function Se(e,t){return e===void 0&&(e=""),t===void 0&&(t=!1),t?(se(),qe(_t,null,e)):Ne(_t,null,e)}function Bt(e){return e==null||typeof e=="boolean"?Ne(_t):ye(e)?Ne($e,null,e.slice()):io(e)?tn(e):Ne(er,null,String(e))}function tn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:ro(e)}function or(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),or(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!Hu(t)?t._ctx=ot:i===3&&ot&&(ot.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(we(t)){if(o&65){or(e,{default:t});return}t={default:t,_ctx:ot},n=32}else t=String(t),o&64?(n=16,t=[zt(t)]):n=8;e.children=t,e.shapeFlag|=n}function Wo(){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=Ue([e.style,n.style]);else if(xi(o)){const i=e[o],r=n[o];r&&i!==r&&!(ye(i)&&i.includes(r))?e[o]=i?[].concat(i,r):r:r==null&&i==null&&!Ai(o)&&(e[o]=r)}else o!==""&&(e[o]=n[o])}return e}function Vt(e,t,n,o){o===void 0&&(o=null),At(e,t,7,[n,o])}const up=Iu();let Ju=0;function cp(){return Ju}function dp(e,t,n){const o=e.type,i=(t?t.appContext:e.appContext)||up,r={uid:Ju++,vnode:e,type:o,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Ma(!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:zu(o,i),emitsOptions:Pu(o,i),emit:null,emitted:null,propsDefaults:Le,inheritAttrs:o.inheritAttrs,ctx:Le,data:Le,props:Le,attrs:Le,slots:Le,refs:Le,setupState:Le,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=Vg.bind(null,r),e.ce&&e.ce(r),r}let et=null;const En=()=>et||ot;let ir,zo;{const e=Ao(),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)}};ir=t("__VUE_INSTANCE_SETTERS__",n=>et=n),zo=t("__VUE_SSR_SETTERS__",n=>Vo=n)}const Bo=e=>{const t=et;return ir(e),e.scope.on(),()=>{e.scope.off(),ir(t)}},Qu=()=>{et&&et.scope.off(),ir(null)};function ec(e){return e.vnode.shapeFlag&4}let Vo=!1;function fp(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1),t&&zo(t);const o=e.vnode,i=o.props,r=o.children,s=ec(e);qg(e,i,s,t),Qg(e,r,n||t);const l=s?hp(e,t):void 0;return t&&zo(!1),l}function hp(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Rg);const o=n.setup;if(o){Et();const i=e.setupContext=o.length>1?oc(e):null,r=Bo(e),s=Jn(o,e,0,[e.props,i]),l=wa(s);if(xt(),r(),(l||e.sp)&&!eo(e)&&fu(e),l){if(s.then(Qu,Qu),t)return s.then(a=>{zo(!0);try{tc(e,a,t)}finally{zo(!1)}}).catch(a=>{Vi(a,e,0)});e.asyncDep=s}else tc(e,s)}else nc(e)}function tc(e,t,n){we(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Me(t)&&(e.setupState=Ja(t)),nc(e)}function nc(e,t,n){const o=e.type;e.render||(e.render=o.render||kt);{const i=Bo(e);Et();try{kg(e)}finally{xt(),i()}}}const gp={get(e,t){return Qe(e,"get",""),e[t]}};function oc(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,gp),slots:e.slots,emit:e.emit,expose:t}}function Ys(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Ja(Po(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Fo)return Fo[n](e)},has(t,n){return n in t||n in Fo}})):e.proxy}const pp=/(?:^|[-_])\w/g,vp=e=>e.replace(pp,t=>t.toUpperCase()).replace(/[-_]/g,"");function ic(e,t){return t===void 0&&(t=!0),we(e)?e.displayName||e.name:e.name||t&&e.__name}function rc(e,t,n){n===void 0&&(n=!1);let o=ic(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?vp(o):n?"App":"Anonymous"}function mp(e){return we(e)&&"__vccOpts"in e}const de=(e,t)=>ig(e,t,Vo);function Ie(e,t,n){try{tr(-1);const o=arguments.length;return o===2?Me(t)&&!ye(t)?io(t)?Ne(e,null,[t]):Ne(e,t):Ne(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&io(n)&&(n=[n]),Ne(e,t,n))}finally{tr(1)}}function yp(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let o=0;o<n.length;o++)if(bt(n[o],t[o]))return!1;return oo>0&&st&&st.push(e),!0}const _p="3.5.44";/**
* @vue/runtime-dom v3.5.44
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let Us;const sc=typeof window<"u"&&window.trustedTypes;if(sc)try{Us=sc.createPolicy("vue",{createHTML:e=>e})}catch{}const lc=Us?e=>Us.createHTML(e):e=>e,wp="http://www.w3.org/2000/svg",bp="http://www.w3.org/1998/Math/MathML",nn=typeof document<"u"?document:null,ac=nn&&nn.createElement("template"),Sp={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"?nn.createElementNS(wp,e):t==="mathml"?nn.createElementNS(bp,e):n?nn.createElement(e,{is:n}):nn.createElement(e);return e==="select"&&o&&o.multiple!=null&&i.setAttribute("multiple",o.multiple),i},createText:e=>nn.createTextNode(e),createComment:e=>nn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>nn.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{ac.innerHTML=lc(o==="svg"?"<svg>"+e+"</svg>":o==="mathml"?"<math>"+e+"</math>":e);const l=ac.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]}},Ep=Symbol("_vtc");function xp(e,t,n){const o=e[Ep];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const uc=Symbol("_vod"),Ap=Symbol("_vsh"),Op=Symbol(""),Cp=/(?:^|;)\s*display\s*:/;function Np(e,t,n){const o=e.style,i=He(n);let r=!1;if(n&&!i){if(t)if(He(t))for(const s of t.split(";")){const l=s.slice(0,s.indexOf(":")).trim();n[l]==null&&Go(o,l,"")}else for(const s in t)n[s]==null&&Go(o,s,"");for(const s in n){s==="display"&&(r=!0);const l=n[s];l!=null?Mp(e,s,!He(t)&&t?t[s]:void 0,l)||Go(o,s,l):Go(o,s,"")}}else if(i){if(t!==n){const s=o[Op];s&&(n+=";"+s),o.cssText=n,r=Cp.test(n)}}else t&&e.removeAttribute("style");uc in e&&((!i||t!==n)&&(e[uc]=r?o.display:""),e[Ap]&&(o.display="none"))}const rr=/\s*!important$/;function Go(e,t,n){if(ye(n))n.forEach(o=>Go(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))rr.test(n)?e.setProperty(t,n.replace(rr,""),"important"):e.setProperty(t,n);else{const o=Tp(e,t);rr.test(n)?e.setProperty(gn(o),n.replace(rr,""),"important"):e[o]=n}}const cc=["Webkit","Moz","ms"],Xs={};function Tp(e,t){const n=Xs[t];if(n)return n;let o=tt(t);if(o!=="filter"&&o in e)return Xs[t]=o;o=Ti(o);for(let i=0;i<cc.length;i++){const r=cc[i]+o;if(r in e)return Xs[t]=r}return t}function Mp(e,t,n,o){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&He(o)&&n===o}const dc="http://www.w3.org/1999/xlink";function fc(e,t,n,o,i,r){r===void 0&&(r=Th(t)),o&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(dc,t.slice(6,t.length)):e.setAttributeNS(dc,t,n):n==null||r&&!Aa(n)?e.removeAttribute(t):e.setAttribute(t,r?"":ft(n)?String(n):n)}function hc(e,t,n,o,i){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?lc(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=Aa(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 Ip(e,t,n,o){e.addEventListener(t,n,o)}function Pp(e,t,n,o){e.removeEventListener(t,n,o)}const gc=Symbol("_vei");function Rp(e,t,n,o,i){i===void 0&&(i=null);const r=e[gc]||(e[gc]={}),s=r[t];if(o&&s)s.value=o;else{const l=$p(t),a=l[0],u=l[1];if(o){const c=r[t]=Hp(o,i);Ip(e,a,c,u)}else s&&(Pp(e,a,s,u),r[t]=void 0)}}const Dp=/(Once|Passive|Capture)$/,kp=/^on:?(?:Once|Passive|Capture)$/;function $p(e){let t,n;for(;(n=e.match(Dp))&&!kp.test(e);)t||(t={}),e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):gn(e.slice(2)),t]}let qs=0;const Fp=Promise.resolve(),Lp=()=>qs||(Fp.then(()=>qs=0),qs=Date.now());function Hp(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;const i=n.value;if(ye(i)){const r=o.stopImmediatePropagation;o.stopImmediatePropagation=()=>{r.call(o),o._stopped=!0};const s=i.slice(),l=[o];for(let a=0;a<s.length&&!o._stopped;a++){const u=s[a];u&&At(u,t,5,l)}}else At(i,t,5,[o])};return n.value=e,n.attached=Lp(),n}const pc=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Wp=(e,t,n,o,i,r)=>{const s=i==="svg";t==="class"?xp(e,o,s):t==="style"?Np(e,n,o):xi(t)?Ai(t)||Rp(e,t,n,o,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):zp(e,t,o,s))?(hc(e,t,o),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&fc(e,t,o,s,r,t!=="value")):e._isVueCE&&(Bp(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!He(o)))?hc(e,tt(t),o,r,t):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),fc(e,t,o,s))};function zp(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&pc(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 pc(t)&&He(n)?!1:t in e}function Bp(e,t){const n=e._def.props;if(!n)return!1;const o=tt(t);return Array.isArray(n)?n.some(i=>tt(i)===o):Object.keys(n).some(i=>tt(i)===o)}const Vp=["ctrl","shift","alt","meta"],Gp={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)=>Vp.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=Gp[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=gn(i.key);if(t.some(s=>s===r||Kp[s]===r))return e(i)})},Yp=je({patchProp:Wp},Sp);let vc;function Up(){return vc||(vc=np(Yp))}const Xp=function(){const t=Up().createApp(...arguments),n=t.mount;return t.mount=o=>{const i=Zp(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,qp(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),s},t};function qp(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Zp(e){return He(e)?document.querySelector(e):e}function jp(){return mc().__VUE_DEVTOOLS_GLOBAL_HOOK__}function mc(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const Jp=typeof Proxy=="function",Qp="devtools-plugin:setup",ev="plugin:settings:set";let so,Zs;function tv(){var e;return so!==void 0||(typeof window<"u"&&window.performance?(so=!0,Zs=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?(so=!0,Zs=globalThis.perf_hooks.performance):so=!1),so}function nv(){return tv()?Zs.now():Date.now()}class ov{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 nv()}},n&&n.on(ev,(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 iv(e,t){const n=e,o=mc(),i=jp(),r=Jp&&n.enableEarlyProxy;if(i&&(o.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!r))i.emit(Qp,e,t);else{const s=r?new ov(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 yc="store";function _c(e){return e===void 0&&(e=null),mt(e!==null?e:yc)}function lo(e,t){Object.keys(e).forEach(function(n){return t(e[n],n)})}function rv(e){return e!==null&&typeof e=="object"}function sv(e){return e&&typeof e.then=="function"}function lv(e,t){return function(){return e(t)}}function wc(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 bc(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;sr(e,n,[],e._modules.root,!0),js(e,n,t)}function js(e,t,n){var o=e._state,i=e._scope;e.getters={},e._makeLocalGettersCache=Object.create(null);var r=e._wrappedGetters,s={},l={},a=hs(!0);a.run(function(){lo(r,function(u,c){s[c]=lv(u,e),l[c]=de(function(){return s[c]()}),Object.defineProperty(e.getters,c,{get:function(){return l[c].value},enumerable:!0})})}),e._state=Io({data:t}),e._scope=a,e.strict&&fv(e),o&&n&&e._withCommit(function(){o.data=null}),i&&i.stop()}function sr(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=Js(t,n.slice(0,-1)),a=n[n.length-1];e._withCommit(function(){l[a]=o.state})}var u=o.context=av(e,s,n);o.forEachMutation(function(c,d){var f=s+d;uv(e,f,c,u)}),o.forEachAction(function(c,d){var f=c.root?d:s+d,g=c.handler||c;cv(e,f,g,u)}),o.forEachGetter(function(c,d){var f=s+d;dv(e,f,c,u)}),o.forEachChild(function(c,d){sr(e,t,n.concat(d),c,i)})}function av(e,t,n){var o=t==="",i={dispatch:o?e.dispatch:function(r,s,l){var a=lr(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=lr(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 Sc(e,t)}},state:{get:function(){return Js(e.state,n)}}}),i}function Sc(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 uv(e,t,n,o){var i=e._mutations[t]||(e._mutations[t]=[]);i.push(function(s){n.call(e,o.state,s)})}function cv(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 sv(l)||(l=Promise.resolve(l)),e._devtoolHook?l.catch(function(a){throw e._devtoolHook.emit("vuex:error",a),a}):l})}function dv(e,t,n,o){e._wrappedGetters[t]||(e._wrappedGetters[t]=function(r){return n(o.state,o.getters,r.state,r.getters)})}function fv(e){xe(function(){return e._state.data},function(){},{deep:!0,flush:"sync"})}function Js(e,t){return t.reduce(function(n,o){return n[o]},e)}function lr(e,t,n){return rv(e)&&e.type&&(n=t,t=e,e=e.type),{type:e,payload:t,options:n}}var hv="vuex bindings",Ec="vuex:mutations",Qs="vuex:actions",ao="vuex",gv=0;function pv(e,t){iv({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:[hv]},function(n){n.addTimelineLayer({id:Ec,label:"Vuex Mutations",color:xc}),n.addTimelineLayer({id:Qs,label:"Vuex Actions",color:xc}),n.addInspector({id:ao,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),n.on.getInspectorTree(function(o){if(o.app===e&&o.inspectorId===ao)if(o.filter){var i=[];Nc(i,t._modules.root,o.filter,""),o.rootNodes=i}else o.rootNodes=[Cc(t._modules.root,"")]}),n.on.getInspectorState(function(o){if(o.app===e&&o.inspectorId===ao){var i=o.nodeId;Sc(t,i),o.state=yv(wv(t._modules,i),i==="root"?t.getters:t._makeLocalGettersCache,i)}}),n.on.editInspectorState(function(o){if(o.app===e&&o.inspectorId===ao){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(ao),n.sendInspectorState(ao),n.addTimelineEvent({layerId:Ec,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=gv++,i._time=Date.now(),s.state=r,n.addTimelineEvent({layerId:Qs,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:Qs,event:{time:Date.now(),title:i.type,groupId:i._id,subtitle:"end",data:s}})}})})}var xc=8702998,vv=6710886,mv=16777215,Ac={label:"namespaced",textColor:mv,backgroundColor:vv};function Oc(e){return e&&e!=="root"?e.split("/").slice(-2,-1)[0]:"Root"}function Cc(e,t){return{id:t||"root",label:Oc(t),tags:e.namespaced?[Ac]:[],children:Object.keys(e._children).map(function(n){return Cc(e._children[n],t+n+"/")})}}function Nc(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?[Ac]:[]}),Object.keys(t._children).forEach(function(i){Nc(e,t._children[i],n,o+i+"/")})}function yv(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=_v(t);i.getters=Object.keys(r).map(function(s){return{key:s.endsWith("/")?Oc(s):s,editable:!1,value:el(function(){return r[s]})}})}return i}function _v(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]=el(function(){return e[n]})}else t[n]=el(function(){return e[n]})}),t}function wv(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 el(e){try{return e()}catch(t){return t}}var Nt=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)||{}},Tc={namespaced:{configurable:!0}};Tc.namespaced.get=function(){return!!this._rawModule.namespaced},Nt.prototype.addChild=function(t,n){this._children[t]=n},Nt.prototype.removeChild=function(t){delete this._children[t]},Nt.prototype.getChild=function(t){return this._children[t]},Nt.prototype.hasChild=function(t){return t in this._children},Nt.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)},Nt.prototype.forEachChild=function(t){lo(this._children,t)},Nt.prototype.forEachGetter=function(t){this._rawModule.getters&&lo(this._rawModule.getters,t)},Nt.prototype.forEachAction=function(t){this._rawModule.actions&&lo(this._rawModule.actions,t)},Nt.prototype.forEachMutation=function(t){this._rawModule.mutations&&lo(this._rawModule.mutations,t)},Object.defineProperties(Nt.prototype,Tc);var Ln=function(t){this.register([],t,!1)};Ln.prototype.get=function(t){return t.reduce(function(n,o){return n.getChild(o)},this.root)},Ln.prototype.getNamespace=function(t){var n=this.root;return t.reduce(function(o,i){return n=n.getChild(i),o+(n.namespaced?i+"/":"")},"")},Ln.prototype.update=function(t){Mc([],this.root,t)},Ln.prototype.register=function(t,n,o){var i=this;o===void 0&&(o=!0);var r=new Nt(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&&lo(n.modules,function(l,a){i.register(t.concat(a),l,o)})},Ln.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)},Ln.prototype.isRegistered=function(t){var n=this.get(t.slice(0,-1)),o=t[t.length-1];return n?n.hasChild(o):!1};function Mc(e,t,n){if(t.update(n),n.modules)for(var o in n.modules){if(!t.getChild(o))return;Mc(e.concat(o),t.getChild(o),n.modules[o])}}function bv(e){return new lt(e)}var lt=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 Ln(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,g){return a.call(s,f,g)},this.commit=function(f,g,x){return u.call(s,f,g,x)},this.strict=i;var c=this._modules.root.state;sr(this,c,[],this._modules.root),js(this,c),o.forEach(function(d){return d(n)})},tl={state:{configurable:!0}};lt.prototype.install=function(t,n){t.provide(n||yc,this),t.config.globalProperties.$store=this;var o=this._devtools!==void 0?this._devtools:!1;o&&pv(t,this)},tl.state.get=function(){return this._state.data},tl.state.set=function(e){},lt.prototype.commit=function(t,n,o){var i=this,r=lr(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)}))},lt.prototype.dispatch=function(t,n){var o=this,i=lr(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(g){return g.after}).forEach(function(g){return g.after(l,o.state)})}catch{}c(f)},function(f){try{o._actionSubscribers.filter(function(g){return g.error}).forEach(function(g){return g.error(l,o.state,f)})}catch{}d(f)})})}},lt.prototype.subscribe=function(t,n){return wc(t,this._subscribers,n)},lt.prototype.subscribeAction=function(t,n){var o=typeof t=="function"?{before:t}:t;return wc(o,this._actionSubscribers,n)},lt.prototype.watch=function(t,n,o){var i=this;return xe(function(){return t(i.state,i.getters)},n,Object.assign({},o))},lt.prototype.replaceState=function(t){var n=this;this._withCommit(function(){n._state.data=t})},lt.prototype.registerModule=function(t,n,o){o===void 0&&(o={}),typeof t=="string"&&(t=[t]),this._modules.register(t,n),sr(this,this.state,t,this._modules.get(t),o.preserveState),js(this,this.state)},lt.prototype.unregisterModule=function(t){var n=this;typeof t=="string"&&(t=[t]),this._modules.unregister(t),this._withCommit(function(){var o=Js(n.state,t.slice(0,-1));delete o[t[t.length-1]]}),bc(this)},lt.prototype.hasModule=function(t){return typeof t=="string"&&(t=[t]),this._modules.isRegistered(t)},lt.prototype.hotUpdate=function(t){this._modules.update(t),bc(this,!0)},lt.prototype._withCommit=function(t){var n=this._committing;this._committing=!0,t(),this._committing=n},Object.defineProperties(lt.prototype,tl);var nl={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 Sv={class:"d-flex flex-wrap align-items-center justify-content-between","aria-labelledby":"workflow-main-title"},Ev={class:"col-md-6 d-flex flex-column"},xv={id:"workflow-main-title",class:"mb-2"},Av={class:"d-flex align-items-center flex-wrap mb-0","aria-label":"Workflow Details"},Ov={class:"visually-hidden"},Cv={class:"me-3 mb-1 d-flex mb-0"},Nv=["aria-label"],Tv={class:"visually-hidden"},Mv={class:"me-3 mb-1 d-flex mb-0"},Iv={class:"visually-hidden"},Pv={class:"me-3 mb-1 d-flex mb-0"},Rv=["aria-label"];function Dv(e,t,n,o,i,r){return se(),he("section",Sv,[ee("div",Ev,[ee("h1",xv,me(e.translate(r.workflow?.title)),1),ee("dl",Av,[ee("dt",Ov,me(e.translate("COM_WORKFLOW_GRAPH_STATUS")),1),ee("dd",Cv,[ee("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")}`},me(r.workflow.published?e.translate("COM_WORKFLOW_GRAPH_ENABLED"):e.translate("COM_WORKFLOW_GRAPH_DISABLED")),11,Nv)]),ee("dt",Tv,me(e.translate("COM_WORKFLOW_GRAPH_STAGE_COUNT")),1),ee("dd",Mv,[ee("span",null,me(r.stagesCount)+" "+me(r.stagesCount===1?e.translate("COM_WORKFLOW_GRAPH_STAGE"):e.translate("COM_WORKFLOW_GRAPH_STAGES")),1)]),ee("dt",Iv,me(e.translate("COM_WORKFLOW_GRAPH_TRANSITION_COUNT")),1),ee("dd",Pv,[ee("span",null,me(r.transitionsCount)+" "+me(r.transitionsCount===1?e.translate("COM_WORKFLOW_GRAPH_TRANSITION"):e.translate("COM_WORKFLOW_GRAPH_TRANSITIONS")),1)])])]),ee("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")},me(n.saveStatus.value==="unsaved"?e.translate("COM_WORKFLOW_GRAPH_UNSAVED_CHANGES"):e.translate("COM_WORKFLOW_GRAPH_UP_TO_DATE")),11,Rv)])}nl.render=Dv,nl.__file="media_source/com_workflow/src/components/Titlebar.vue";function kv(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 re(){return re=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},re.apply(null,arguments)}function Ko(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 $v=["eventFilter"],Fv=["eventFilter"],Lv=["id"],Hv=["computedPosition","handleBounds","selected","dimensions","isParent","resizing","dragging","events"],Wv=["selected","sourceNode","targetNode","events"];function Yo(e){return gs()?(Ii(e),!0):!1}function on(e){return typeof e=="function"?e():ce(e)}const zv=typeof window<"u"&&typeof document<"u",Bv=e=>typeof e<"u",Vv=Object.prototype.toString,Gv=e=>Vv.call(e)==="[object Object]",Kv=()=>{};function Yv(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 Ic=e=>e();function Uv(e){e===void 0&&(e=Ic);const t=Ce(!0);function n(){t.value=!1}function o(){t.value=!0}return{isActive:Li(t),pause:n,resume:o,eventFilter:function(){t.value&&e(...arguments)}}}function Pc(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 Xv(e,t,n){n===void 0&&(n={});const o=n,i=o.eventFilter,r=i===void 0?Ic:i,s=Ko(o,$v);return xe(e,Yv(r,t),s)}function uo(e,t,n){n===void 0&&(n={});const o=n,i=o.eventFilter,r=Ko(o,Fv),s=Uv(i),l=s.eventFilter,a=s.pause,u=s.resume,c=s.isActive;return{stop:Xv(e,t,re({},r,{eventFilter:l})),pause:a,resume:u,isActive:c}}function qv(e,t){if(t===void 0&&(t={}),!Ve(e))return eg(e);const n=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const o in e.value)n[o]=Qh(()=>({get(){return e.value[o]},set(i){var r;if((r=on(t.replaceRef))!=null?r:!0)if(Array.isArray(e.value)){const l=[...e.value];l[o]=i,e.value=l}else{const l=re({},e.value,{[o]:i});Object.setPrototypeOf(l,Object.getPrototypeOf(e.value)),e.value=l}else e.value[o]=i}}));return n}function ol(e,t){t===void 0&&(t=!1);function n(d,f){let g=f===void 0?{}:f,x=g.flush,E=x===void 0?"sync":x,w=g.deep,O=w===void 0?!1:w,R=g.timeout,D=g.throwOnTimeout,_=null;const K=[new Promise(Y=>{_=xe(e,V=>{d(V)!==t&&(_?.(),Y(V))},{flush:E,deep:O,immediate:!0})})];return R!=null&&K.push(Pc(R,D).then(()=>on(e)).finally(()=>_?.())),Promise.race(K)}function o(d,f){if(!Ve(d))return n(Y=>Y===d,f);const g=f??{},x=g.flush,E=x===void 0?"sync":x,w=g.deep,O=w===void 0?!1:w,R=g.timeout,D=g.throwOnTimeout;let _=null;const K=[new Promise(Y=>{_=xe([e,d],V=>{let U=V[0],j=V[1];t!==(U===j)&&(_?.(),Y(U))},{flush:E,deep:O,immediate:!0})})];return R!=null&&K.push(Pc(R,D).then(()=>on(e)).finally(()=>(_?.(),on(e)))),Promise.race(K)}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(g=>{const x=Array.from(g);return x.includes(d)||x.includes(on(d))},f)}function u(d){return c(1,d)}function c(d,f){d===void 0&&(d=1);let g=-1;return n(()=>(g+=1,g>=d),f)}return Array.isArray(on(e))?{toMatch:n,toContains:a,changed:u,changedTimes:c,get not(){return ol(e,!t)}}:{toMatch:n,toBe:o,toBeTruthy:i,toBeNull:r,toBeNaN:l,toBeUndefined:s,changed:u,changedTimes:c,get not(){return ol(e,!t)}}}function il(e){return ol(e)}function Zv(e){var t;const n=on(e);return(t=n?.$el)!=null?t:n}const Rc=zv?window:void 0;function Dc(){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=Rc):(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,g,x,E)=>(f.addEventListener(g,x,E),()=>f.removeEventListener(g,x,E)),c=xe(()=>[Zv(e),on(o)],f=>{let g=f[0],x=f[1];if(a(),!g)return;const E=Gv(x)?re({},x):x;l.push(...t.flatMap(w=>n.map(O=>u(g,w,O,E))))},{immediate:!0,flush:"post"}),d=()=>{c(),a()};return Yo(d),d}function jv(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function kc(){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?Rc: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=jv(e);return Dc(r,l,x=>{x.repeat&&on(d)||f(x)&&t(x)},u)}function Jv(e){return JSON.parse(JSON.stringify(e))}function rl(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,g=l.deep,x=g===void 0?!1:g,E=l.defaultValue,w=l.shouldEmit,O=En(),R=n||O?.emit||((i=O?.$emit)==null?void 0:i.bind(O))||((s=(r=O?.proxy)==null?void 0:r.$emit)==null?void 0:s.bind(O?.proxy));let D=f;t||(t="modelValue"),D=D||"update:"+t.toString();const _=Y=>u?typeof u=="function"?u(Y):Jv(Y):Y,L=()=>Bv(e[t])?_(e[t]):E,K=Y=>{w?w(Y)&&R(D,Y):R(D,Y)};if(d){const Y=L(),V=Ce(Y);let U=!1;return xe(()=>e[t],j=>{U||(U=!0,V.value=_(j),Ht(()=>U=!1))}),xe(V,j=>{!U&&(j!==e[t]||x)&&K(j)},{deep:x}),V}else return de({get(){return L()},set(Y){K(Y)}})}var Qv={value:()=>{}};function ar(){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 ur(n)}function ur(e){this._=e}function em(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}})}ur.prototype=ar.prototype={constructor:ur,on:function(t,n){var o=this._,i=em(t+"",o),r,s=-1,l=i.length;if(arguments.length<2){for(;++s<l;)if((r=(t=i[s]).type)&&(r=tm(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]=$c(o[r],t.name,n);else if(n==null)for(r in o)o[r]=$c(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 ur(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 tm(e,t){for(var n=0,o=e.length,i;n<o;++n)if((i=e[n]).name===t)return i.value}function $c(e,t,n){for(var o=0,i=e.length;o<i;++o)if(e[o].name===t){e[o]=Qv,e=e.slice(0,o).concat(e.slice(o+1));break}return n!=null&&e.push({name:t,value:n}),e}var sl="http://www.w3.org/1999/xhtml";const Fc={svg:"http://www.w3.org/2000/svg",xhtml:sl,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function cr(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Fc.hasOwnProperty(t)?{space:Fc[t],local:e}:e}function nm(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===sl&&t.documentElement.namespaceURI===sl?t.createElement(e):t.createElementNS(n,e)}}function om(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Lc(e){var t=cr(e);return(t.local?om:nm)(t)}function im(){}function ll(e){return e==null?im:function(){return this.querySelector(e)}}function rm(e){typeof e!="function"&&(e=ll(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 sm(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function lm(){return[]}function Hc(e){return e==null?lm:function(){return this.querySelectorAll(e)}}function am(e){return function(){return sm(e.apply(this,arguments))}}function um(e){typeof e=="function"?e=am(e):e=Hc(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 Wc(e){return function(){return this.matches(e)}}function zc(e){return function(t){return t.matches(e)}}var cm=Array.prototype.find;function dm(e){return function(){return cm.call(this.children,e)}}function fm(){return this.firstElementChild}function hm(e){return this.select(e==null?fm:dm(typeof e=="function"?e:zc(e)))}var gm=Array.prototype.filter;function pm(){return Array.from(this.children)}function vm(e){return function(){return gm.call(this.children,e)}}function mm(e){return this.selectAll(e==null?pm:vm(typeof e=="function"?e:zc(e)))}function ym(e){typeof e!="function"&&(e=Wc(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 Bc(e){return new Array(e.length)}function _m(){return new gt(this._enter||this._groups.map(Bc),this._parents)}function dr(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}dr.prototype={constructor:dr,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 wm(e){return function(){return e}}function bm(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 dr(e,r[s]);for(;s<a;++s)(l=t[s])&&(i[s]=l)}function Sm(e,t,n,o,i,r,s){var l,a,u=new Map,c=t.length,d=r.length,f=new Array(c),g;for(l=0;l<c;++l)(a=t[l])&&(f[l]=g=s.call(a,a.__data__,l,t)+"",u.has(g)?i[l]=a:u.set(g,a));for(l=0;l<d;++l)g=s.call(e,r[l],l,r)+"",(a=u.get(g))?(o[l]=a,a.__data__=r[l],u.delete(g)):n[l]=new dr(e,r[l]);for(l=0;l<c;++l)(a=t[l])&&u.get(f[l])===a&&(i[l]=a)}function Em(e){return e.__data__}function xm(e,t){if(!arguments.length)return Array.from(this,Em);var n=t?Sm:bm,o=this._parents,i=this._groups;typeof e!="function"&&(e=wm(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,g=Am(e.call(c,c&&c.__data__,u,o)),x=g.length,E=l[u]=new Array(x),w=s[u]=new Array(x),O=a[u]=new Array(f);n(c,d,E,w,O,g,t);for(var R=0,D=0,_,L;R<x;++R)if(_=E[R]){for(R>=D&&(D=R+1);!(L=w[D])&&++D<x;);_._next=L||null}}return s=new gt(s,o),s._enter=l,s._exit=a,s}function Am(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Om(){return new gt(this._exit||this._groups.map(Bc),this._parents)}function Cm(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 Nm(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),g,x=0;x<d;++x)(g=u[x]||c[x])&&(f[x]=g);for(;a<i;++a)l[a]=n[a];return new gt(l,this._parents)}function Tm(){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 Mm(e){e||(e=Im);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 Im(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Pm(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Rm(){return Array.from(this)}function Dm(){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 km(){let e=0;for(const t of this)++e;return e}function $m(){return!this.node()}function Fm(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 Lm(e){return function(){this.removeAttribute(e)}}function Hm(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Wm(e,t){return function(){this.setAttribute(e,t)}}function zm(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Bm(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Vm(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 Gm(e,t){var n=cr(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?Hm:Lm:typeof t=="function"?n.local?Vm:Bm:n.local?zm:Wm)(n,t))}function Vc(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Km(e){return function(){this.style.removeProperty(e)}}function Ym(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Um(e,t,n){return function(){var o=t.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function Xm(e,t,n){return arguments.length>1?this.each((t==null?Km:typeof t=="function"?Um:Ym)(e,t,n??"")):co(this.node(),e)}function co(e,t){return e.style.getPropertyValue(t)||Vc(e).getComputedStyle(e,null).getPropertyValue(t)}function qm(e){return function(){delete this[e]}}function Zm(e,t){return function(){this[e]=t}}function jm(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Jm(e,t){return arguments.length>1?this.each((t==null?qm:typeof t=="function"?jm:Zm)(e,t)):this.node()[e]}function Gc(e){return e.trim().split(/^|\s+/)}function al(e){return e.classList||new Kc(e)}function Kc(e){this._node=e,this._names=Gc(e.getAttribute("class")||"")}Kc.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 Yc(e,t){for(var n=al(e),o=-1,i=t.length;++o<i;)n.add(t[o])}function Uc(e,t){for(var n=al(e),o=-1,i=t.length;++o<i;)n.remove(t[o])}function Qm(e){return function(){Yc(this,e)}}function e0(e){return function(){Uc(this,e)}}function t0(e,t){return function(){(t.apply(this,arguments)?Yc:Uc)(this,e)}}function n0(e,t){var n=Gc(e+"");if(arguments.length<2){for(var o=al(this.node()),i=-1,r=n.length;++i<r;)if(!o.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?t0:t?Qm:e0)(n,t))}function o0(){this.textContent=""}function i0(e){return function(){this.textContent=e}}function r0(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function s0(e){return arguments.length?this.each(e==null?o0:(typeof e=="function"?r0:i0)(e)):this.node().textContent}function l0(){this.innerHTML=""}function a0(e){return function(){this.innerHTML=e}}function u0(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function c0(e){return arguments.length?this.each(e==null?l0:(typeof e=="function"?u0:a0)(e)):this.node().innerHTML}function d0(){this.nextSibling&&this.parentNode.appendChild(this)}function f0(){return this.each(d0)}function h0(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function g0(){return this.each(h0)}function p0(e){var t=typeof e=="function"?e:Lc(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function v0(){return null}function m0(e,t){var n=typeof e=="function"?e:Lc(e),o=t==null?v0:typeof t=="function"?t:ll(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function y0(){var e=this.parentNode;e&&e.removeChild(this)}function _0(){return this.each(y0)}function w0(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function b0(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function S0(e){return this.select(e?b0:w0)}function E0(e){return arguments.length?this.property("__data__",e):this.node().__data__}function x0(e){return function(t){e.call(this,t,this.__data__)}}function A0(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 O0(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 C0(e,t,n){return function(){var o=this.__on,i,r=x0(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 N0(e,t,n){var o=A0(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?C0:O0,i=0;i<r;++i)this.each(l(o[i],t,n));return this}function Xc(e,t,n){var o=Vc(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 T0(e,t){return function(){return Xc(this,e,t)}}function M0(e,t){return function(){return Xc(this,e,t.apply(this,arguments))}}function I0(e,t){return this.each((typeof t=="function"?M0:T0)(e,t))}function*P0(){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 qc=[null];function gt(e,t){this._groups=e,this._parents=t}function Uo(){return new gt([[document.documentElement]],qc)}function R0(){return this}gt.prototype=Uo.prototype={constructor:gt,select:rm,selectAll:um,selectChild:hm,selectChildren:mm,filter:ym,data:xm,enter:_m,exit:Om,join:Cm,merge:Nm,selection:R0,order:Tm,sort:Mm,call:Pm,nodes:Rm,node:Dm,size:km,empty:$m,each:Fm,attr:Gm,style:Xm,property:Jm,classed:n0,text:s0,html:c0,raise:f0,lower:g0,append:p0,insert:m0,remove:_0,clone:S0,datum:E0,on:N0,dispatch:I0,[Symbol.iterator]:P0};function Tt(e){return typeof e=="string"?new gt([[document.querySelector(e)]],[document.documentElement]):new gt([[e]],qc)}function D0(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Gt(e,t){if(e=D0(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 k0={passive:!1},Xo={capture:!0,passive:!1};function ul(e){e.stopImmediatePropagation()}function fo(e){e.preventDefault(),e.stopImmediatePropagation()}function Zc(e){var t=e.document.documentElement,n=Tt(e).on("dragstart.drag",fo,Xo);"onselectstart"in t?n.on("selectstart.drag",fo,Xo):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function jc(e,t){var n=e.document.documentElement,o=Tt(e).on("dragstart.drag",null);t&&(o.on("click.drag",fo,Xo),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 fr=e=>()=>e;function cl(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}})}cl.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function $0(e){return!e.ctrlKey&&!e.button}function F0(){return this.parentNode}function L0(e,t){return t??{x:e.x,y:e.y}}function H0(){return navigator.maxTouchPoints||"ontouchstart"in this}function W0(){var e=$0,t=F0,n=L0,o=H0,i={},r=ar("start","drag","end"),s=0,l,a,u,c,d=0;function f(_){_.on("mousedown.drag",g).filter(o).on("touchstart.drag",w).on("touchmove.drag",O,k0).on("touchend.drag touchcancel.drag",R).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(_,L){if(!(c||!e.call(this,_,L))){var K=D(this,t.call(this,_,L),_,L,"mouse");K&&(Tt(_.view).on("mousemove.drag",x,Xo).on("mouseup.drag",E,Xo),Zc(_.view),ul(_),u=!1,l=_.clientX,a=_.clientY,K("start",_))}}function x(_){if(fo(_),!u){var L=_.clientX-l,K=_.clientY-a;u=L*L+K*K>d}i.mouse("drag",_)}function E(_){Tt(_.view).on("mousemove.drag mouseup.drag",null),jc(_.view,u),fo(_),i.mouse("end",_)}function w(_,L){if(e.call(this,_,L)){var K=_.changedTouches,Y=t.call(this,_,L),V=K.length,U,j;for(U=0;U<V;++U)(j=D(this,Y,_,L,K[U].identifier,K[U]))&&(ul(_),j("start",_,K[U]))}}function O(_){var L=_.changedTouches,K=L.length,Y,V;for(Y=0;Y<K;++Y)(V=i[L[Y].identifier])&&(fo(_),V("drag",_,L[Y]))}function R(_){var L=_.changedTouches,K=L.length,Y,V;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),Y=0;Y<K;++Y)(V=i[L[Y].identifier])&&(ul(_),V("end",_,L[Y]))}function D(_,L,K,Y,V,U){var j=r.copy(),ie=Gt(U||K,L),J,ne,h;if((h=n.call(_,new cl("beforestart",{sourceEvent:K,target:f,identifier:V,active:s,x:ie[0],y:ie[1],dx:0,dy:0,dispatch:j}),Y))!=null)return J=h.x-ie[0]||0,ne=h.y-ie[1]||0,function C(k,F,T){var H=ie,W;switch(k){case"start":i[V]=C,W=s++;break;case"end":delete i[V],--s;case"drag":ie=Gt(T||F,L),W=s;break}j.call(k,_,new cl(k,{sourceEvent:F,subject:h,target:f,identifier:V,active:W,x:ie[0]+J,y:ie[1]+ne,dx:ie[0]-H[0],dy:ie[1]-H[1],dispatch:j}),Y)}}return f.filter=function(_){return arguments.length?(e=typeof _=="function"?_:fr(!!_),f):e},f.container=function(_){return arguments.length?(t=typeof _=="function"?_:fr(_),f):t},f.subject=function(_){return arguments.length?(n=typeof _=="function"?_:fr(_),f):n},f.touchable=function(_){return arguments.length?(o=typeof _=="function"?_:fr(!!_),f):o},f.on=function(){var _=r.on.apply(r,arguments);return _===r?f:_},f.clickDistance=function(_){return arguments.length?(d=(_=+_)*_,f):Math.sqrt(d)},f}function dl(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Jc(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function qo(){}var Zo=.7,hr=1/Zo,ho="\\s*([+-]?\\d+)\\s*",jo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Kt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",z0=/^#([0-9a-f]{3,8})$/,B0=new RegExp("^rgb\\("+ho+","+ho+","+ho+"\\)$"),V0=new RegExp("^rgb\\("+Kt+","+Kt+","+Kt+"\\)$"),G0=new RegExp("^rgba\\("+ho+","+ho+","+ho+","+jo+"\\)$"),K0=new RegExp("^rgba\\("+Kt+","+Kt+","+Kt+","+jo+"\\)$"),Y0=new RegExp("^hsl\\("+jo+","+Kt+","+Kt+"\\)$"),U0=new RegExp("^hsla\\("+jo+","+Kt+","+Kt+","+jo+"\\)$"),Qc={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};dl(qo,Hn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ed,formatHex:ed,formatHex8:X0,formatHsl:q0,formatRgb:td,toString:td});function ed(){return this.rgb().formatHex()}function X0(){return this.rgb().formatHex8()}function q0(){return sd(this).formatHsl()}function td(){return this.rgb().formatRgb()}function Hn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=z0.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?nd(t):n===3?new at(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?gr(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?gr(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=B0.exec(e))?new at(t[1],t[2],t[3],1):(t=V0.exec(e))?new at(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=G0.exec(e))?gr(t[1],t[2],t[3],t[4]):(t=K0.exec(e))?gr(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Y0.exec(e))?rd(t[1],t[2]/100,t[3]/100,1):(t=U0.exec(e))?rd(t[1],t[2]/100,t[3]/100,t[4]):Qc.hasOwnProperty(e)?nd(Qc[e]):e==="transparent"?new at(NaN,NaN,NaN,0):null}function nd(e){return new at(e>>16&255,e>>8&255,e&255,1)}function gr(e,t,n,o){return o<=0&&(e=t=n=NaN),new at(e,t,n,o)}function Z0(e){return e instanceof qo||(e=Hn(e)),e?(e=e.rgb(),new at(e.r,e.g,e.b,e.opacity)):new at}function fl(e,t,n,o){return arguments.length===1?Z0(e):new at(e,t,n,o??1)}function at(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}dl(at,fl,Jc(qo,{brighter(e){return e=e==null?hr:Math.pow(hr,e),new at(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Zo:Math.pow(Zo,e),new at(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new at(Wn(this.r),Wn(this.g),Wn(this.b),pr(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:od,formatHex:od,formatHex8:j0,formatRgb:id,toString:id}));function od(){return"#"+zn(this.r)+zn(this.g)+zn(this.b)}function j0(){return"#"+zn(this.r)+zn(this.g)+zn(this.b)+zn((isNaN(this.opacity)?1:this.opacity)*255)}function id(){const e=pr(this.opacity);return(e===1?"rgb(":"rgba(")+Wn(this.r)+", "+Wn(this.g)+", "+Wn(this.b)+(e===1?")":", "+e+")")}function pr(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Wn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function zn(e){return e=Wn(e),(e<16?"0":"")+e.toString(16)}function rd(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Mt(e,t,n,o)}function sd(e){if(e instanceof Mt)return new Mt(e.h,e.s,e.l,e.opacity);if(e instanceof qo||(e=Hn(e)),!e)return new Mt;if(e instanceof Mt)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 Mt(s,l,a,e.opacity)}function J0(e,t,n,o){return arguments.length===1?sd(e):new Mt(e,t,n,o??1)}function Mt(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}dl(Mt,J0,Jc(qo,{brighter(e){return e=e==null?hr:Math.pow(hr,e),new Mt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Zo:Math.pow(Zo,e),new Mt(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 at(hl(e>=240?e-240:e+120,i,o),hl(e,i,o),hl(e<120?e+240:e-120,i,o),this.opacity)},clamp(){return new Mt(ld(this.h),vr(this.s),vr(this.l),pr(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=pr(this.opacity);return(e===1?"hsl(":"hsla(")+ld(this.h)+", "+vr(this.s)*100+"%, "+vr(this.l)*100+"%"+(e===1?")":", "+e+")")}}));function ld(e){return e=(e||0)%360,e<0?e+360:e}function vr(e){return Math.max(0,Math.min(1,e||0))}function hl(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 gl=e=>()=>e;function Q0(e,t){return function(n){return e+n*t}}function ey(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 ty(e){return(e=+e)==1?ad:function(t,n){return n-t?ey(t,n,e):gl(isNaN(t)?n:t)}}function ad(e,t){var n=t-e;return n?Q0(e,n):gl(isNaN(e)?t:e)}const mr=(function e(t){var n=ty(t);function o(i,r){var s=n((i=fl(i)).r,(r=fl(r)).r),l=n(i.g,r.g),a=n(i.b,r.b),u=ad(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 ny(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 oy(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function iy(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]=Jo(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 ry(e,t){var n=new Date;return e=+e,t=+t,function(o){return n.setTime(e*(1-o)+t*o),n}}function Yt(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function sy(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]=Jo(e[i],t[i]):o[i]=t[i];return function(r){for(i in n)o[i]=n[i](r);return o}}var pl=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,vl=new RegExp(pl.source,"g");function ly(e){return function(){return e}}function ay(e){return function(t){return e(t)+""}}function ud(e,t){var n=pl.lastIndex=vl.lastIndex=0,o,i,r,s=-1,l=[],a=[];for(e=e+"",t=t+"";(o=pl.exec(e))&&(i=vl.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:Yt(o,i)})),n=vl.lastIndex;return n<t.length&&(r=t.slice(n),l[s]?l[s]+=r:l[++s]=r),l.length<2?a[0]?ay(a[0].x):ly(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 Jo(e,t){var n=typeof t,o;return t==null||n==="boolean"?gl(t):(n==="number"?Yt:n==="string"?(o=Hn(t))?(t=o,mr):ud:t instanceof Hn?mr:t instanceof Date?ry:oy(t)?ny:Array.isArray(t)?iy:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?sy:Yt)(e,t)}var cd=180/Math.PI,ml={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function dd(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)*cd,skewX:Math.atan(a)*cd,scaleX:s,scaleY:l}}var yr;function uy(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?ml:dd(t.a,t.b,t.c,t.d,t.e,t.f)}function cy(e){return e==null||(yr||(yr=document.createElementNS("http://www.w3.org/2000/svg","g")),yr.setAttribute("transform",e),!(e=yr.transform.baseVal.consolidate()))?ml:(e=e.matrix,dd(e.a,e.b,e.c,e.d,e.e,e.f))}function fd(e,t,n,o){function i(u){return u.length?u.pop()+" ":""}function r(u,c,d,f,g,x){if(u!==d||c!==f){var E=g.push("translate(",null,t,null,n);x.push({i:E-4,x:Yt(u,d)},{i:E-2,x:Yt(c,f)})}else(d||f)&&g.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:Yt(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:Yt(u,c)}):c&&d.push(i(d)+"skewX("+c+o)}function a(u,c,d,f,g,x){if(u!==d||c!==f){var E=g.push(i(g)+"scale(",null,",",null,")");x.push({i:E-4,x:Yt(u,d)},{i:E-2,x:Yt(c,f)})}else(d!==1||f!==1)&&g.push(i(g)+"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(g){for(var x=-1,E=f.length,w;++x<E;)d[(w=f[x]).i]=w.x(g);return d.join("")}}}var dy=fd(uy,"px, ","px)","deg)"),fy=fd(cy,", ",")",")"),hy=1e-12;function hd(e){return((e=Math.exp(e))+1/e)/2}function gy(e){return((e=Math.exp(e))-1/e)/2}function py(e){return((e=Math.exp(2*e))-1)/(e+1)}const _r=(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],g=c-l,x=d-a,E=g*g+x*x,w,O;if(E<hy)O=Math.log(f/u)/t,w=function(V){return[l+V*g,a+V*x,u*Math.exp(t*V*O)]};else{var R=Math.sqrt(E),D=(f*f-u*u+o*E)/(2*u*n*R),_=(f*f-u*u-o*E)/(2*f*n*R),L=Math.log(Math.sqrt(D*D+1)-D),K=Math.log(Math.sqrt(_*_+1)-_);O=(K-L)/t,w=function(V){var U=V*O,j=hd(L),ie=u/(n*R)*(j*py(t*U+L)-gy(L));return[l+ie*g,a+ie*x,u*j/hd(t*U+L)]}}return w.duration=O*1e3*t/Math.SQRT2,w}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 go=0,Qo=0,ei=0,gd=1e3,wr,ti,br=0,Bn=0,Sr=0,ni=typeof performance=="object"&&performance.now?performance:Date,pd=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function yl(){return Bn||(pd(vy),Bn=ni.now()+Sr)}function vy(){Bn=0}function Er(){this._call=this._time=this._next=null}Er.prototype=vd.prototype={constructor:Er,restart:function(t,n,o){if(typeof t!="function")throw new TypeError("callback is not a function");o=(o==null?yl():+o)+(n==null?0:+n),!this._next&&ti!==this&&(ti?ti._next=this:wr=this,ti=this),this._call=t,this._time=o,_l()},stop:function(){this._call&&(this._call=null,this._time=1/0,_l())}};function vd(e,t,n){var o=new Er;return o.restart(e,t,n),o}function my(){yl(),++go;for(var e=wr,t;e;)(t=Bn-e._time)>=0&&e._call.call(void 0,t),e=e._next;--go}function md(){Bn=(br=ni.now())+Sr,go=Qo=0;try{my()}finally{go=0,_y(),Bn=0}}function yy(){var e=ni.now(),t=e-br;t>gd&&(Sr-=t,br=e)}function _y(){for(var e,t=wr,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:wr=n);ti=e,_l(o)}function _l(e){if(!go){Qo&&(Qo=clearTimeout(Qo));var t=e-Bn;t>24?(e<1/0&&(Qo=setTimeout(md,e-ni.now()-Sr)),ei&&(ei=clearInterval(ei))):(ei||(br=ni.now(),ei=setInterval(yy,gd)),go=1,pd(md))}}function yd(e,t,n){var o=new Er;return t=t==null?0:+t,o.restart(i=>{o.stop(),e(i+t)},t,n),o}var wy=ar("start","end","cancel","interrupt"),by=[],_d=0,wd=1,wl=2,xr=3,bd=4,bl=5,Ar=6;function Or(e,t,n,o,i,r){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;Sy(e,n,{name:t,index:o,group:i,on:wy,tween:by,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:_d})}function Sl(e,t){var n=It(e,t);if(n.state>_d)throw new Error("too late; already scheduled");return n}function Ut(e,t){var n=It(e,t);if(n.state>xr)throw new Error("too late; already running");return n}function It(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Sy(e,t,n){var o=e.__transition,i;o[t]=n,n.timer=vd(r,0,n.time);function r(u){n.state=wd,n.timer.restart(s,n.delay,n.time),n.delay<=u&&s(u-n.delay)}function s(u){var c,d,f,g;if(n.state!==wd)return a();for(c in o)if(g=o[c],g.name===n.name){if(g.state===xr)return yd(s);g.state===bd?(g.state=Ar,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete o[c]):+c<t&&(g.state=Ar,g.timer.stop(),g.on.call("cancel",e,e.__data__,g.index,g.group),delete o[c])}if(yd(function(){n.state===xr&&(n.state=bd,n.timer.restart(l,n.delay,n.time),l(u))}),n.state=wl,n.on.call("start",e,e.__data__,n.index,n.group),n.state===wl){for(n.state=xr,i=new Array(f=n.tween.length),c=0,d=-1;c<f;++c)(g=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(i[++d]=g);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=bl,1),d=-1,f=i.length;++d<f;)i[d].call(e,c);n.state===bl&&(n.on.call("end",e,e.__data__,n.index,n.group),a())}function a(){n.state=Ar,n.timer.stop(),delete o[t];for(var u in o)return;delete e.__transition}}function Cr(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>wl&&o.state<bl,o.state=Ar,o.timer.stop(),o.on.call(i?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete n[s]}r&&delete e.__transition}}function Ey(e){return this.each(function(){Cr(this,e)})}function xy(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 Ay(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 Oy(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o=It(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?xy:Ay)(n,e,t))}function El(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 It(i,o).value[t]}}function Sd(e,t){var n;return(typeof t=="number"?Yt:t instanceof Hn?mr:(n=Hn(t))?(t=n,mr):ud)(e,t)}function Cy(e){return function(){this.removeAttribute(e)}}function Ny(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ty(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 My(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 Iy(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 Py(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 Ry(e,t){var n=cr(e),o=n==="transform"?fy:Sd;return this.attrTween(e,typeof t=="function"?(n.local?Py:Iy)(n,o,El(this,"attr."+e,t)):t==null?(n.local?Ny:Cy)(n):(n.local?My:Ty)(n,o,t))}function Dy(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function ky(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function $y(e,t){var n,o;function i(){var r=t.apply(this,arguments);return r!==o&&(n=(o=r)&&ky(e,r)),n}return i._value=t,i}function Fy(e,t){var n,o;function i(){var r=t.apply(this,arguments);return r!==o&&(n=(o=r)&&Dy(e,r)),n}return i._value=t,i}function Ly(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=cr(e);return this.tween(n,(o.local?$y:Fy)(o,t))}function Hy(e,t){return function(){Sl(this,e).delay=+t.apply(this,arguments)}}function Wy(e,t){return t=+t,function(){Sl(this,e).delay=t}}function zy(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Hy:Wy)(t,e)):It(this.node(),t).delay}function By(e,t){return function(){Ut(this,e).duration=+t.apply(this,arguments)}}function Vy(e,t){return t=+t,function(){Ut(this,e).duration=t}}function Gy(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?By:Vy)(t,e)):It(this.node(),t).duration}function Ky(e,t){if(typeof t!="function")throw new Error;return function(){Ut(this,e).ease=t}}function Yy(e){var t=this._id;return arguments.length?this.each(Ky(t,e)):It(this.node(),t).ease}function Uy(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Ut(this,e).ease=n}}function Xy(e){if(typeof e!="function")throw new Error;return this.each(Uy(this._id,e))}function qy(e){typeof e!="function"&&(e=Wc(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 rn(o,this._parents,this._name,this._id)}function Zy(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,g=0;g<c;++g)(f=a[g]||u[g])&&(d[g]=f);for(;l<o;++l)s[l]=t[l];return new rn(s,this._parents,this._name,this._id)}function jy(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 Jy(e,t,n){var o,i,r=jy(t)?Sl:Ut;return function(){var s=r(this,e),l=s.on;l!==o&&(i=(o=l).copy()).on(t,n),s.on=i}}function Qy(e,t){var n=this._id;return arguments.length<2?It(this.node(),n).on.on(e):this.each(Jy(n,e,t))}function e_(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function t_(){return this.on("end.remove",e_(this._id))}function n_(e){var t=this._name,n=this._id;typeof e!="function"&&(e=ll(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,Or(u[f],t,n,f,u,It(c,n)));return new rn(r,this._parents,t,n)}function o_(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Hc(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),g,x=It(c,n),E=0,w=f.length;E<w;++E)(g=f[E])&&Or(g,t,n,E,f,x);r.push(f),s.push(c)}return new rn(r,s,t,n)}var i_=Uo.prototype.constructor;function r_(){return new i_(this._groups,this._parents)}function s_(e,t){var n,o,i;return function(){var r=co(this,e),s=(this.style.removeProperty(e),co(this,e));return r===s?null:r===n&&s===o?i:i=t(n=r,o=s)}}function Ed(e){return function(){this.style.removeProperty(e)}}function l_(e,t,n){var o,i=n+"",r;return function(){var s=co(this,e);return s===i?null:s===o?r:r=t(o=s,n)}}function a_(e,t,n){var o,i,r;return function(){var s=co(this,e),l=n(this),a=l+"";return l==null&&(a=l=(this.style.removeProperty(e),co(this,e))),s===a?null:s===o&&a===i?r:(i=a,r=t(o=s,l))}}function u_(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=Ed(t)):void 0;(u!==n||i!==c)&&(o=(n=u).copy()).on(s,i=c),a.on=o}}function c_(e,t,n){var o=(e+="")=="transform"?dy:Sd;return t==null?this.styleTween(e,s_(e,o)).on("end.style."+e,Ed(e)):typeof t=="function"?this.styleTween(e,a_(e,o,El(this,"style."+e,t))).each(u_(this._id,e)):this.styleTween(e,l_(e,o,t),n).on("end.style."+e,null)}function d_(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function f_(e,t,n){var o,i;function r(){var s=t.apply(this,arguments);return s!==i&&(o=(i=s)&&d_(e,s,n)),o}return r._value=t,r}function h_(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,f_(e,t,n??""))}function g_(e){return function(){this.textContent=e}}function p_(e){return function(){var t=e(this);this.textContent=t??""}}function v_(e){return this.tween("text",typeof e=="function"?p_(El(this,"text",e)):g_(e==null?"":e+""))}function m_(e){return function(t){this.textContent=e.call(this,t)}}function y_(e){var t,n;function o(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&m_(i)),t}return o._value=e,o}function __(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,y_(e))}function w_(){for(var e=this._name,t=this._id,n=xd(),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=It(a,t);Or(a,e,n,u,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new rn(o,this._parents,e,n)}function b_(){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 S_=0;function rn(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function xd(){return++S_}var sn=Uo.prototype;rn.prototype={constructor:rn,select:n_,selectAll:o_,selectChild:sn.selectChild,selectChildren:sn.selectChildren,filter:qy,merge:Zy,selection:r_,transition:w_,call:sn.call,nodes:sn.nodes,node:sn.node,size:sn.size,empty:sn.empty,each:sn.each,on:Qy,attr:Ry,attrTween:Ly,style:c_,styleTween:h_,text:v_,textTween:__,remove:t_,tween:Oy,delay:zy,duration:Gy,ease:Yy,easeVarying:Xy,end:b_,[Symbol.iterator]:sn[Symbol.iterator]};function E_(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var x_={time:null,delay:0,duration:250,ease:E_};function A_(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 O_(e){var t,n;e instanceof rn?(t=e._id,e=e._name):(t=xd(),(n=x_).time=yl(),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])&&Or(a,e,t,u,s,n||A_(a,t));return new rn(o,this._parents,e,t)}Uo.prototype.interrupt=Ey,Uo.prototype.transition=O_;const Nr=e=>()=>e;function C_(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 ln(e,t,n){this.k=e,this.x=t,this.y=n}ln.prototype={constructor:ln,scale:function(t){return t===1?this:new ln(this.k*t,this.x,this.y)},translate:function(t,n){return t===0&n===0?this:new ln(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 po=new ln(1,0,0);ln.prototype;function xl(e){e.stopImmediatePropagation()}function oi(e){e.preventDefault(),e.stopImmediatePropagation()}function N_(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function T_(){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 Ad(){return this.__zoom||po}function M_(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function I_(){return navigator.maxTouchPoints||"ontouchstart"in this}function P_(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 R_(){var e=N_,t=T_,n=P_,o=M_,i=I_,r=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,a=_r,u=ar("start","zoom","end"),c,d,f,g=500,x=150,E=0,w=10;function O(h){h.property("__zoom",Ad).on("wheel.zoom",V,{passive:!1}).on("mousedown.zoom",U).on("dblclick.zoom",j).filter(i).on("touchstart.zoom",ie).on("touchmove.zoom",J).on("touchend.zoom touchcancel.zoom",ne).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}O.transform=function(h,C,k,F){var T=h.selection?h.selection():h;T.property("__zoom",Ad),h!==T?L(h,C,k,F):T.interrupt().each(function(){K(this,arguments).event(F).start().zoom(null,typeof C=="function"?C.apply(this,arguments):C).end()})},O.scaleBy=function(h,C,k,F){O.scaleTo(h,function(){var T=this.__zoom.k,H=typeof C=="function"?C.apply(this,arguments):C;return T*H},k,F)},O.scaleTo=function(h,C,k,F){O.transform(h,function(){var T=t.apply(this,arguments),H=this.__zoom,W=k==null?_(T):typeof k=="function"?k.apply(this,arguments):k,z=H.invert(W),$=typeof C=="function"?C.apply(this,arguments):C;return n(D(R(H,$),W,z),T,s)},k,F)},O.translateBy=function(h,C,k,F){O.transform(h,function(){return n(this.__zoom.translate(typeof C=="function"?C.apply(this,arguments):C,typeof k=="function"?k.apply(this,arguments):k),t.apply(this,arguments),s)},null,F)},O.translateTo=function(h,C,k,F,T){O.transform(h,function(){var H=t.apply(this,arguments),W=this.__zoom,z=F==null?_(H):typeof F=="function"?F.apply(this,arguments):F;return n(po.translate(z[0],z[1]).scale(W.k).translate(typeof C=="function"?-C.apply(this,arguments):-C,typeof k=="function"?-k.apply(this,arguments):-k),H,s)},F,T)};function R(h,C){return C=Math.max(r[0],Math.min(r[1],C)),C===h.k?h:new ln(C,h.x,h.y)}function D(h,C,k){var F=C[0]-k[0]*h.k,T=C[1]-k[1]*h.k;return F===h.x&&T===h.y?h:new ln(h.k,F,T)}function _(h){return[(+h[0][0]+ +h[1][0])/2,(+h[0][1]+ +h[1][1])/2]}function L(h,C,k,F){h.on("start.zoom",function(){K(this,arguments).event(F).start()}).on("interrupt.zoom end.zoom",function(){K(this,arguments).event(F).end()}).tween("zoom",function(){var T=this,H=arguments,W=K(T,H).event(F),z=t.apply(T,H),$=k==null?_(z):typeof k=="function"?k.apply(T,H):k,q=Math.max(z[1][0]-z[0][0],z[1][1]-z[0][1]),le=T.__zoom,ue=typeof C=="function"?C.apply(T,H):C,X=a(le.invert($).concat(q/le.k),ue.invert($).concat(q/ue.k));return function(Z){if(Z===1)Z=ue;else{var te=X(Z),pe=q/te[2];Z=new ln(pe,$[0]-te[0]*pe,$[1]-te[1]*pe)}W.zoom(null,Z)}})}function K(h,C,k){return!k&&h.__zooming||new Y(h,C)}function Y(h,C){this.that=h,this.args=C,this.active=0,this.sourceEvent=null,this.extent=t.apply(h,C),this.taps=0}Y.prototype={event:function(C){return C&&(this.sourceEvent=C),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(C,k){return this.mouse&&C!=="mouse"&&(this.mouse[1]=k.invert(this.mouse[0])),this.touch0&&C!=="touch"&&(this.touch0[1]=k.invert(this.touch0[0])),this.touch1&&C!=="touch"&&(this.touch1[1]=k.invert(this.touch1[0])),this.that.__zoom=k,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(C){var k=Tt(this.that).datum();u.call(C,this.that,new C_(C,{sourceEvent:this.sourceEvent,target:O,transform:this.that.__zoom,dispatch:u}),k)}};function V(h){for(var C=arguments.length,k=new Array(C>1?C-1:0),F=1;F<C;F++)k[F-1]=arguments[F];if(!e.apply(this,arguments))return;var T=K(this,k).event(h),H=this.__zoom,W=Math.max(r[0],Math.min(r[1],H.k*Math.pow(2,o.apply(this,arguments)))),z=Gt(h);if(T.wheel)(T.mouse[0][0]!==z[0]||T.mouse[0][1]!==z[1])&&(T.mouse[1]=H.invert(T.mouse[0]=z)),clearTimeout(T.wheel);else{if(H.k===W)return;T.mouse=[z,H.invert(z)],Cr(this),T.start()}oi(h),T.wheel=setTimeout($,x),T.zoom("mouse",n(D(R(H,W),T.mouse[0],T.mouse[1]),T.extent,s));function $(){T.wheel=null,T.end()}}function U(h){for(var C=arguments.length,k=new Array(C>1?C-1:0),F=1;F<C;F++)k[F-1]=arguments[F];if(f||!e.apply(this,arguments))return;var T=h.currentTarget,H=K(this,k,!0).event(h),W=Tt(h.view).on("mousemove.zoom",le,!0).on("mouseup.zoom",ue,!0),z=Gt(h,T),$=h.clientX,q=h.clientY;Zc(h.view),xl(h),H.mouse=[z,this.__zoom.invert(z)],Cr(this),H.start();function le(X){if(oi(X),!H.moved){var Z=X.clientX-$,te=X.clientY-q;H.moved=Z*Z+te*te>E}H.event(X).zoom("mouse",n(D(H.that.__zoom,H.mouse[0]=Gt(X,T),H.mouse[1]),H.extent,s))}function ue(X){W.on("mousemove.zoom mouseup.zoom",null),jc(X.view,H.moved),oi(X),H.event(X).end()}}function j(h){for(var C=arguments.length,k=new Array(C>1?C-1:0),F=1;F<C;F++)k[F-1]=arguments[F];if(e.apply(this,arguments)){var T=this.__zoom,H=Gt(h.changedTouches?h.changedTouches[0]:h,this),W=T.invert(H),z=T.k*(h.shiftKey?.5:2),$=n(D(R(T,z),H,W),t.apply(this,k),s);oi(h),l>0?Tt(this).transition().duration(l).call(L,$,H,h):Tt(this).call(O.transform,$,H,h)}}function ie(h){for(var C=arguments.length,k=new Array(C>1?C-1:0),F=1;F<C;F++)k[F-1]=arguments[F];if(e.apply(this,arguments)){var T=h.touches,H=T.length,W=K(this,k,h.changedTouches.length===H).event(h),z,$,q,le;for(xl(h),$=0;$<H;++$)q=T[$],le=Gt(q,this),le=[le,this.__zoom.invert(le),q.identifier],W.touch0?!W.touch1&&W.touch0[2]!==le[2]&&(W.touch1=le,W.taps=0):(W.touch0=le,z=!0,W.taps=1+!!c);c&&(c=clearTimeout(c)),z&&(W.taps<2&&(d=le[0],c=setTimeout(function(){c=null},g)),Cr(this),W.start())}}function J(h){if(this.__zooming){for(var C=arguments.length,k=new Array(C>1?C-1:0),F=1;F<C;F++)k[F-1]=arguments[F];var T=K(this,k).event(h),H=h.changedTouches,W=H.length,z,$,q,le;for(oi(h),z=0;z<W;++z)$=H[z],q=Gt($,this),T.touch0&&T.touch0[2]===$.identifier?T.touch0[0]=q:T.touch1&&T.touch1[2]===$.identifier&&(T.touch1[0]=q);if($=T.that.__zoom,T.touch1){var ue=T.touch0[0],X=T.touch0[1],Z=T.touch1[0],te=T.touch1[1],pe=(pe=Z[0]-ue[0])*pe+(pe=Z[1]-ue[1])*pe,ve=(ve=te[0]-X[0])*ve+(ve=te[1]-X[1])*ve;$=R($,Math.sqrt(pe/ve)),q=[(ue[0]+Z[0])/2,(ue[1]+Z[1])/2],le=[(X[0]+te[0])/2,(X[1]+te[1])/2]}else if(T.touch0)q=T.touch0[0],le=T.touch0[1];else return;T.zoom("touch",n(D($,q,le),T.extent,s))}}function ne(h){for(var C=arguments.length,k=new Array(C>1?C-1:0),F=1;F<C;F++)k[F-1]=arguments[F];if(this.__zooming){var T=K(this,k).event(h),H=h.changedTouches,W=H.length,z,$;for(xl(h),f&&clearTimeout(f),f=setTimeout(function(){f=null},g),z=0;z<W;++z)$=H[z],T.touch0&&T.touch0[2]===$.identifier?delete T.touch0:T.touch1&&T.touch1[2]===$.identifier&&delete T.touch1;if(T.touch1&&!T.touch0&&(T.touch0=T.touch1,delete T.touch1),T.touch0)T.touch0[1]=this.__zoom.invert(T.touch0[0]);else if(T.end(),T.taps===2&&($=Gt($,this),Math.hypot(d[0]-$[0],d[1]-$[1])<w)){var q=Tt(this).on("dblclick.zoom");q&&q.apply(this,arguments)}}}return O.wheelDelta=function(h){return arguments.length?(o=typeof h=="function"?h:Nr(+h),O):o},O.filter=function(h){return arguments.length?(e=typeof h=="function"?h:Nr(!!h),O):e},O.touchable=function(h){return arguments.length?(i=typeof h=="function"?h:Nr(!!h),O):i},O.extent=function(h){return arguments.length?(t=typeof h=="function"?h:Nr([[+h[0][0],+h[0][1]],[+h[1][0],+h[1][1]]]),O):t},O.scaleExtent=function(h){return arguments.length?(r[0]=+h[0],r[1]=+h[1],O):[r[0],r[1]]},O.translateExtent=function(h){return arguments.length?(s[0][0]=+h[0][0],s[1][0]=+h[1][0],s[0][1]=+h[0][1],s[1][1]=+h[1][1],O):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},O.constrain=function(h){return arguments.length?(n=h,O):n},O.duration=function(h){return arguments.length?(l=+h,O):l},O.interpolate=function(h){return arguments.length?(a=h,O):a},O.on=function(){var h=u.on.apply(u,arguments);return h===u?O:h},O.clickDistance=function(h){return arguments.length?(E=(h=+h)*h,O):Math.sqrt(E)},O.tapDistance=function(h){return arguments.length?(w=+h,O):w},O}var fe=(e=>(e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom",e))(fe||{}),Al=(e=>(e.Partial="partial",e.Full="full",e))(Al||{}),Vn=(e=>(e.Bezier="default",e.SimpleBezier="simple-bezier",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e))(Vn||{}),xn=(e=>(e.Strict="strict",e.Loose="loose",e))(xn||{}),Ol=(e=>(e.Arrow="arrow",e.ArrowClosed="arrowclosed",e))(Ol||{}),ii=(e=>(e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal",e))(ii||{});const D_=["INPUT","SELECT","TEXTAREA"],k_=typeof document<"u"?document:null;function Cl(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 D_.includes(o?.nodeName)||i||!!r}function $_(e){return e.ctrlKey||e.metaKey||e.shiftKey||e.altKey}function Od(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 F_(e,t){return n=>{if(!n.code&&!n.key)return!1;const o=L_(n.code,e);return Array.isArray(e)?e.some(i=>Od(n[o],i,t,n.type==="keyup")):Od(n[o],e,t,n.type==="keyup")}}function L_(e,t){return t.includes(e)?"code":"key"}function ri(e,t){const n=de(()=>{var u;return(u=Ee(t?.target))!=null?u:k_}),o=mn(Ee(e)===!0);let i=!1;const r=new Set;let s=a(Ee(e));xe(()=>Ee(e),(u,c)=>{typeof c=="boolean"&&typeof u!="boolean"&&l(),s=a(u)},{immediate:!0}),Dc(["blur","contextmenu"],l),kc(function(){return s(...arguments)},u=>{var c,d,f,g;const x=(c=Ee(t?.actInsideInputWithModifier))!=null?c:!0,E=(d=Ee(t?.preventDefault))!=null?d:!1;if(i=$_(u),(!i||i&&!x)&&Cl(u))return;const O=((g=(f=u.composedPath)==null?void 0:f.call(u))==null?void 0:g[0])||u.target,R=O?.nodeName==="BUTTON"||O?.nodeName==="A";!E&&(i||!R)&&u.preventDefault(),o.value=!0},{eventName:"keydown",target:n}),kc(function(){return s(...arguments)},u=>{var c;const d=(c=Ee(t?.actInsideInputWithModifier))!=null?c:!0;if(o.value){if((!i||i&&!d)&&Cl(u))return;i=!1,o.value=!1}},{eventName:"keyup",target:n});function l(){i=!1,r.clear(),o.value=Ee(e)===!0}function a(u){return u===null?(l(),()=>!1):typeof u=="boolean"?(l(),o.value=u,()=>!1):Array.isArray(u)||typeof u=="string"?F_(u,r):u}return o}const Cd="vue-flow__node-desc",Nd="vue-flow__edge-desc",H_="vue-flow__aria-live",Td=["Enter"," ","Escape"],vo={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function Tr(e){return re({},e.computedPosition||{x:0,y:0},{width:e.dimensions.width||0,height:e.dimensions.height||0})}function Mr(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 Ir(e){return{width:e.offsetWidth,height:e.offsetHeight}}function Gn(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),Math.min(Math.max(e,t),n)}function Md(e,t){return{x:Gn(e.x,t[0][0],t[1][0]),y:Gn(e.y,t[0][1],t[1][1])}}function Id(e){const t=e.getRootNode();return"elementFromPoint"in t?t:window.document}function An(e){return e&&typeof e=="object"&&"id"in e&&"source"in e&&"target"in e}function Kn(e){return e&&typeof e=="object"&&"id"in e&&"position"in e&&!An(e)}function si(e){return Kn(e)&&"computedPosition"in e}function Pr(e){return!Number.isNaN(e)&&Number.isFinite(e)}function W_(e){return Pr(e.width)&&Pr(e.height)&&Pr(e.x)&&Pr(e.y)}function z_(e,t,n){var o;const i={id:e.id.toString(),type:(o=e.type)!=null?o:"default",dimensions:Po({width:0,height:0}),computedPosition:Po(re({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:Po(Ye(e.events)?e.events:{})};return Object.assign(t??i,e,{id:e.id.toString(),parentNode:n})}function Pd(e,t,n){var o,i,r,s,l,a,u,c,d;const f=re({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:Po(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 Rd(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 B_(){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 Rd(l,a,u,"target")}const o=t[0],i=t[1],r=typeof o=="string"?o:o.id;return i.filter(l=>An(l)&&l.source===r).map(l=>i.find(a=>Kn(a)&&a.id===l.target))}function V_(){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 Rd(l,a,u,"source")}const o=t[0],i=t[1],r=typeof o=="string"?o:o.id;return i.filter(l=>An(l)&&l.target===r).map(l=>i.find(a=>Kn(a)&&a.id===l.source))}function Dd(e){let t=e.source,n=e.sourceHandle,o=e.target,i=e.targetHandle;return"vueflow__edge-"+t+(n??"")+"-"+o+(i??"")}function G_(e,t){return t.some(n=>An(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 li(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 ai(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?Dr(u,o):u}function kd(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 Rr(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 $d(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 $d(kd(Rr(e),Rr(t)))}function Nl(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=kd(t,Rr(re({},o.computedPosition,o.dimensions)))}return $d(t)}function Fd(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=re({},ai(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,g=d.selectable,x=g===void 0?!0:g,E=d.hidden,w=E===void 0?!1:E,O=(l=(a=f.width)!=null?a:d.width)!=null?l:null,R=(u=(c=f.height)!=null?c:d.height)!=null?u:null;if(i&&!x||w)continue;const D=Mr(r,Tr(d)),_=O===null||R===null,L=o&&D>0,K=(O??0)*(R??0);(_||L||D>=K||d.dragging)&&s.push(d)}return s}function Yn(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 mo(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 di('The padding value "'+e+'" is invalid. Please provide a number or a string with a valid unit (px or %).'),0}function Y_(e,t,n){if(typeof e=="string"||typeof e=="number"){const d=mo(e,n),f=mo(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=mo((o=(i=e.top)!=null?i:e.y)!=null?o:0,n),f=mo((r=(s=e.bottom)!=null?s:e.y)!=null?r:0,n),g=mo((l=(a=e.left)!=null?a:e.x)!=null?l:0,t),x=mo((u=(c=e.right)!=null?c:e.x)!=null?u:0,t);return{top:d,right:x,bottom:f,left:g,x:g+x,y:d+f}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function U_(e,t,n,o,i,r){const s=li(e,{x:t,y:n,zoom:o}),l=s.x,a=s.y,u=li({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,g=r-d;return{left:Math.floor(l),top:Math.floor(a),right:Math.floor(f),bottom:Math.floor(g)}}function Ld(e,t,n,o,i,r){r===void 0&&(r=.1);const s=Y_(r,t,n),l=(t-s.x)/e.width,a=(n-s.y)/e.height,u=Math.min(l,a),c=Gn(u,o,i),d=e.x+e.width/2,f=e.y+e.height/2,g=t/2-d*c,x=n/2-f*c,E=U_(e,g,x,c,t,n),w={left:Math.min(E.left-s.left,0),top:Math.min(E.top-s.top,0),right:Math.min(E.right-s.right,0),bottom:Math.min(E.bottom-s.bottom,0)};return{x:g-w.left+w.right,y:x-w.top+w.bottom,zoom:c}}function X_(e,t){return{x:t.x+e.x,y:t.y+e.y,z:(e.z>t.z?e.z:t.z)+1}}function Hd(e,t){if(!e.parentNode)return!1;const n=t.get(e.parentNode);return n?n.selected?!0:Hd(n,t):!1}function ui(e,t){return typeof e>"u"?"":typeof e=="string"?e:""+(t?t+"__":"")+Object.keys(e).sort().map(o=>o+"="+e[o]).join("&")}function Tl(e){const t=e.ctrlKey&&ci()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t}function Wd(e,t,n){return e<t?Gn(Math.abs(e-t),1,t)/t:e>n?-Gn(Math.abs(e-n),1,t)/t:0}function zd(e,t,n,o){n===void 0&&(n=15),o===void 0&&(o=40);const i=Wd(e.x,o,t.width-o)*n,r=Wd(e.y,o,t.height-o)*n;return[i,r]}function Ml(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=re({},t.style(t)):t.style&&(s=re({},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 re({},a(l),s)}:t.style=re({},t.style,s)}}}function Bd(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(si(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&&si(a)&&Ml(s,a)}break;case"dimensions":if(si(s)&&(typeof l.dimensions<"u"&&(s.dimensions=l.dimensions),typeof l.updateStyle<"u"&&l.updateStyle&&(s.style=re({},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&&si(a)&&(!!a.dimensions.width&&!!a.dimensions.height?Ml(s,a):Ht(()=>{Ml(s,a)}))}break}return t}function On(e,t){return{id:e,type:"select",selected:t}}function Vd(e){return{item:e,type:"add"}}function Gd(e){return{id:e,type:"remove"}}function Kd(e,t,n,o,i){return{id:e,source:t,target:n,sourceHandle:o||null,targetHandle:i||null,type:"remove"}}function Cn(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(On(s.id,l)))}return o}const Yd=()=>{};function ae(e){const t=new Set;let n=Yd,o=()=>!1;const i=()=>t.size>0||o(),r=f=>{n=f},s=()=>{n=Yd},l=f=>{o=f},a=()=>{o=()=>!1},u=f=>{t.delete(f)};return{on:f=>{t.add(f);const g=()=>u(f);return Yo(g),{off:g}},off:u,trigger:f=>{const g=[n];return i()?g.push(...t):e&&g.push(e),Promise.allSettled(g.map(x=>x(f)))},hasListeners:i,listeners:t,setEmitter:r,removeEmitter:s,setHasEmitListeners:l,removeHasEmitListeners:a}}function Ud(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 q_(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||!Hd(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:re({},u.dimensions),expandParent:u.expandParent})}return Array.from(s.values())}function Il(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 Xd(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 Z_(e,t,n){const o=typeof e!="string"?Xd(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 j_(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=Z_(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=Xd(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 J_(e,t){let n=e.width,o=e.height;return[t[0],[t[1][0]-(n||0),t[1][1]-(o||0)]]}function Pl(e,t,n,o,i){const r=J_(e.dimensions,j_(e,n,o,i)),s=Md(t,r);return{position:{x:s.x-(i?.computedPosition.x||0),y:s.y-(i?.computedPosition.y||0)},computedPosition:s}}function yo(e,t,n,o){var i,r,s;n===void 0&&(n=fe.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??n1(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 fe.Top:return{x:l+c/2,y:a};case fe.Right:return{x:l+c,y:a+d/2};case fe.Bottom:return{x:l+c/2,y:a+d};case fe.Left:return{x:l,y:a+d/2}}}function qd(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function Q_(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=Rr({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)),g=Math.max(0,Math.min(d.y2,c.y2)-Math.max(d.y,c.y));return Math.ceil(f*g)>0}function e1(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 Zd={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=Zd[t])==null?void 0:n.call(Zd,...i)),this.name="VueFlowError",this.code=t,this.args=i}}function Rl(e){return"clientX"in e}function t1(e){return"sourceEvent"in e}function Xt(e,t){var n,o;const i=Rl(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 ci=()=>{var e;return typeof navigator<"u"&&((e=navigator?.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function n1(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 Dr(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 o1=()=>!0;function Dl(e){e?.classList.remove("valid","connecting","vue-flow__handle-valid","vue-flow__handle-connecting")}function i1(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())Mr(i,Tr(r))>0&&o.push(r);return o}const r1=250;function s1(e,t,n,o){var i,r;let s=[],l=Number.POSITIVE_INFINITY;const a=i1(e,n,t+r1);for(const f of a){var u,c;const g=[...(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 g){if(o.nodeId===x.nodeId&&o.type===x.type&&o.id===x.id)continue;const E=yo(f,x,x.position,!0),w=E.x,O=E.y,R=Math.sqrt((w-e.x)**2+(O-e.y)**2);R>t||(R<l?(s=[re({},x,{x:w,y:O})],l=R):R===l&&s.push(re({},x,{x:w,y:O})))}}if(!s.length)return null;if(s.length>1){var d;const f=o.type==="source"?"target":"source";return(d=s.find(g=>g.type===f))!=null?d:s[0]}return s[0]}function jd(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,g=t.flowId,x=t.isValidConnection,E=x===void 0?o1:x;const w=c==="target",O=s?d.querySelector("."+f+'-flow__handle[data-id="'+g+"-"+s?.nodeId+"-"+s?.id+"-"+s?.type+'"]'):null,R=Xt(e),D=R.x,_=R.y,L=d.elementFromPoint(D,_),K=L?.classList.contains(f+"-flow__handle")?L:O,Y={handleDomNode:K,isValid:!1,connection:null,toHandle:null};if(K){const V=Jd(void 0,K),U=K.getAttribute("data-nodeid"),j=K.getAttribute("data-handleid"),ie=K.classList.contains("connectable"),J=K.classList.contains("connectableend");if(!U||!V)return Y;const ne={source:w?U:a,sourceHandle:w?j:u,target:w?a:U,targetHandle:w?u:j};Y.connection=ne;const C=ie&&J&&(l===xn.Strict?w&&V==="source"||!w&&V==="target":U!==a||j!==u);Y.isValid=C&&E(ne,{nodes:o,edges:n,sourceNode:i(ne.source),targetNode:i(ne.target)}),Y.toHandle=Qd(U,V,j,r,l,!0)}return Y}function Jd(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function l1(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}function a1(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}function Qd(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 g=i===xn.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?g?.find(E=>E.id===n):g?.[0])!=null?a:null;return x&&r?re({},x,yo(f,x,x.position,!0)):x}const kl={[fe.Left]:fe.Right,[fe.Right]:fe.Left,[fe.Top]:fe.Bottom,[fe.Bottom]:fe.Top},u1=["production","prod"];function di(e){if(ef()){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 ef(){return!u1.includes("production")}function tf(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 re({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},Ir(s))}):null}function $l(e,t,n,o,i,r,s){r===void 0&&(r=!1),i.value=!1,e.selected?(r||e.selected&&t)&&(o([e]),Ht(()=>{s.blur()})):n([e])}function Ye(e){return typeof ce(e)<"u"}function c1(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 An(e)?r=e:r=re({},e,{id:Dd(e)}),r=Pd(r,void 0,o),G_(r,t)?!1:r}function d1(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=Ko(e,Lv);return re({},s,{id:o?Dd(t):r,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle})}function nf(e,t,n){const o={},i=[];for(let r=0;r<e.length;++r){const s=e[r];if(!Kn(s)){n(new Ze(Ke.NODE_INVALID,s?.id)||"[ID UNKNOWN|INDEX "+r+"]");continue}const l=z_(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 of(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 Fl(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;of("source",c,f,e,i,l),of("target",c,d,e,r,u)}}function rf(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function Ll(e,t,n,o,i,r,s,l){const a=[];for(const u of e){const c=An(u)?u:c1(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 g=o(c.id);a.push(re({},Pd(c,g,r),{sourceNode:d,targetNode:f}))}return a}const sf=Symbol("vueFlow"),lf=Symbol("nodeId"),af=Symbol("nodeRef"),f1=Symbol("edgeId"),h1=Symbol("edgeRef"),kr=Symbol("slots");function uf(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,g=t.panBy,x=t.findNode,E=t.multiSelectionActive,w=t.nodesSelectionActive,O=t.selectNodesOnDrag,R=t.removeSelectedElements,D=t.addSelectedNodes,_=t.updateNodePositions,L=t.emits,K=e.onStart,Y=e.onDrag,V=e.onStop,U=e.onClick,j=e.el,ie=e.disabled,J=e.id,ne=e.selectable,h=e.dragHandle,C=mn(!1);let k=[],F,T=null,H={x:void 0,y:void 0},W={x:0,y:0},z=null,$=!1,q=!1,le=0,ue=!1;const X=v1(),Z=v=>{let p=v.x,m=v.y;H={x:p,y:m};let S=!1;if(k=k.map(A=>{const N={x:p-A.distance.x,y:m-A.distance.y},b=Pl(A,o.value?Dr(N,i.value):N,L.error,l.value,A.parentNode?x(A.parentNode):void 0),M=b.computedPosition;return S=S||A.position.x!==M.x||A.position.y!==M.y,A.position=M,A}),q=q||S,!!S&&(_(k,!0,!0),C.value=!0,z)){const A=Il({id:J,dragItems:k,findNode:x}),N=A[0],b=A[1];Y({event:z,node:N,nodes:b})}},te=()=>{if(!T)return;const v=zd(W,T,d.value),p=v[0],m=v[1];if(p!==0||m!==0){var S,A;const N={x:((S=H.x)!=null?S:0)-p/u.value.zoom,y:((A=H.y)!=null?A:0)-m/u.value.zoom};g({x:p,y:m})&&Z(N)}le=requestAnimationFrame(te)},pe=(v,p)=>{$=!0;const m=x(J);!O.value&&!E.value&&m&&(m.selected||R()),m&&Ee(ne)&&O.value&&$l(m,E.value,D,R,w,!1,p);const S=X(v.sourceEvent);if(H=S,k=q_(s.value,f.value,S,J),k.length){const A=Il({id:J,dragItems:k,findNode:x}),N=A[0],b=A[1];K({event:v.sourceEvent,node:N,nodes:b})}},ve=(v,p)=>{var m;v.sourceEvent.type==="touchmove"&&v.sourceEvent.touches.length>1||(q=!1,a.value===0&&pe(v,p),H=X(v.sourceEvent),T=((m=n.value)==null?void 0:m.getBoundingClientRect())||null,W=Xt(v.sourceEvent,T))},be=(v,p)=>{const m=X(v.sourceEvent);if(!ue&&$&&c.value&&(ue=!0,te()),!$){var S,A;const N=m.xSnapped-((S=H.x)!=null?S:0),b=m.ySnapped-((A=H.y)!=null?A:0);Math.sqrt(N*N+b*b)>a.value&&pe(v,p)}(H.x!==m.xSnapped||H.y!==m.ySnapped)&&k.length&&$&&(z=v.sourceEvent,W=Xt(v.sourceEvent,T),Z(m))},y=v=>{let p=!1;if(!$&&!C.value&&!E.value){var m,S;const A=v.sourceEvent,N=X(A),b=N.xSnapped-((m=H.x)!=null?m:0),M=N.ySnapped-((S=H.y)!=null?S:0),P=Math.sqrt(b*b+M*M);P!==0&&P<=a.value&&(U?.(A),p=!0)}if(k.length&&!p){q&&(_(k,!1,!1),q=!1);const A=Il({id:J,dragItems:k,findNode:x}),N=A[0],b=A[1];V({event:v.sourceEvent,node:N,nodes:b})}k=[],C.value=!1,ue=!1,$=!1,H={x:void 0,y:void 0},cancelAnimationFrame(le)};return xe([()=>Ee(ie),j],(v,p,m)=>{let S=v[0],A=v[1];if(A){const N=Tt(A);S||(F=W0().on("start",b=>ve(b,A)).on("drag",b=>be(b,A)).on("end",b=>y(b)).filter(b=>{const M=b.target,P=Ee(h);return!b.button&&(!r.value||!Ud(M,"."+r.value,A)&&(!P||Ud(M,P,A)))}),N.call(F)),m(()=>{N.on(".drag",null),F&&(F.on("start",null),F.on("drag",null),F.on("end",null))})}}),C}function g1(){return{doubleClick:ae(),click:ae(),mouseEnter:ae(),mouseMove:ae(),mouseLeave:ae(),contextMenu:ae(),updateStart:ae(),update:ae(),updateEnd:ae()}}function p1(e,t){const n=g1();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 v1(){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=t1(r)?r.sourceEvent:r,c=Xt(u,a),d=c.x,f=c.y,g=ai({x:d,y:f},t.value),x=o.value?Dr(g,n.value):g,E=x.x,w=x.y;return re({xSnapped:E,ySnapped:w},g)}}function $r(){return!0}function cf(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,g=a.connectOnClick,x=a.connectionClickStartHandle,E=a.nodesConnectable,w=a.autoPanOnConnect,O=a.autoPanSpeed,R=a.findNode,D=a.panBy,_=a.startConnection,L=a.updateConnection,K=a.endConnection,Y=a.emits,V=a.viewport,U=a.edges,j=a.nodes,ie=a.isValidConnection,J=a.nodeLookup;let ne=null,h=!1,C=null;function k(T){var H;const W=Ee(o)==="target",z=Rl(T),$=Id(T.target),q=T.currentTarget;if(q&&(z&&T.button===0||!z)){let le=function(Q){A=Xt(Q,p),te=s1(ai(A,V.value,!1,[1,1]),f.value,J.value,M),N||(b(),N=!0);const ge=jd(Q,{handle:te,connectionMode:d.value,fromNodeId:Ee(n),fromHandleId:Ee(t),fromType:W?"target":"source",isValidConnection:Z,doc:$,lib:"vue",flowId:u,nodeLookup:J.value},U.value,j.value,R,J.value);C=ge.handleDomNode,ne=ge.connection,h=a1(!!te,ge.isValid);const _e=re({},G,{isValid:h,to:ge.toHandle&&h?li({x:ge.toHandle.x,y:ge.toHandle.y},V.value):A,toHandle:ge.toHandle,toPosition:h&&ge.toHandle?ge.toHandle.position:kl[M.position],toNode:ge.toHandle?J.value.get(ge.toHandle.nodeId):null});if(h&&te&&G?.toHandle&&_e.toHandle&&G.toHandle.type===_e.toHandle.type&&G.toHandle.nodeId===_e.toHandle.nodeId&&G.toHandle.id===_e.toHandle.id&&G.to.x===_e.to.x&&G.to.y===_e.to.y)return;const Ae=te??ge.toHandle;if(L(Ae&&h?li({x:Ae.x,y:Ae.y},V.value):A,Ae,l1(!!Ae,h)),G=_e,!te&&!h&&!C)return Dl(S);ne&&ne.source!==ne.target&&C&&(Dl(S),S=C,C.classList.add("connecting","vue-flow__handle-connecting"),C.classList.toggle("valid",!!h),C.classList.toggle("vue-flow__handle-valid",!!h))},ue=function(Q){"touches"in Q&&Q.touches.length>0||((te||C)&&ne&&h&&(s?s(Q,ne):Y.connect(ne)),Y.connectEnd(Q),r&&l?.(Q),Dl(S),cancelAnimationFrame(pe),K(Q),N=!1,h=!1,ne=null,C=null,$.removeEventListener("mousemove",le),$.removeEventListener("mouseup",ue),$.removeEventListener("touchmove",le),$.removeEventListener("touchend",ue))};const X=R(Ee(n));let Z=Ee(i)||ie.value||$r;!Z&&X&&(Z=(W?X.isValidSourcePos:X.isValidTargetPos)||$r);let te,pe=0;const ve=Xt(T),be=ve.x,y=ve.y,v=Jd(Ee(r),q),p=(H=c.value)==null?void 0:H.getBoundingClientRect();if(!p||!v)return;const m=Qd(Ee(n),v,Ee(t),J.value,d.value);if(!m)return;let S,A=Xt(T,p),N=!1;const b=()=>{if(!w.value)return;const oe=zd(A,p,O.value),Q=oe[0],ge=oe[1];D({x:Q,y:ge}),pe=requestAnimationFrame(b)},M=re({},m,{nodeId:Ee(n),type:v,position:m.position}),P=J.value.get(Ee(n)),B={inProgress:!0,isValid:null,from:yo(P,M,fe.Left,!0),fromHandle:M,fromPosition:M.position,fromNode:P,to:A,toHandle:null,toPosition:kl[M.position],toNode:null};_(re({nodeId:Ee(n),id:Ee(t),type:v,position:q?.getAttribute("data-handlepos")||fe.Top},A),{x:be-p.left,y:y-p.top}),Y.connectStart({event:T,nodeId:Ee(n),handleId:Ee(t),handleType:v});let G=B;$.addEventListener("mousemove",le),$.addEventListener("mouseup",ue),$.addEventListener("touchmove",le),$.addEventListener("touchend",ue)}}function F(T){var H,W,z;if(!g.value)return;const $=Ee(o)==="target";if(!x.value){Y.clickConnectStart({event:T,nodeId:Ee(n),handleId:Ee(t)}),_(re({nodeId:Ee(n),type:Ee(o),id:Ee(t),position:fe.Top},Xt(T)),void 0,!0);return}let q=Ee(i)||ie.value||$r;const le=R(Ee(n));if(!q&&le&&(q=($?le.isValidSourcePos:le.isValidTargetPos)||$r),le&&(typeof le.connectable>"u"?E.value:le.connectable)===!1)return;const ue=Id(T.target),X=jd(T,{handle:re({nodeId:Ee(n),id:Ee(t),type:Ee(o),position:fe.Top},Xt(T)),connectionMode:d.value,fromNodeId:x.value.nodeId,fromHandleId:(H=x.value.id)!=null?H:null,fromType:x.value.type,isValidConnection:q,doc:ue,lib:"vue",flowId:u,nodeLookup:J.value},U.value,j.value,R,J.value),Z=((W=X.connection)==null?void 0:W.source)===((z=X.connection)==null?void 0:z.target);X.isValid&&X.connection&&!Z&&Y.connect(X.connection),Y.clickConnectEnd(T),K(T,!0)}return{handlePointerDown:k,handleClick:F}}function m1(){return mt(lf,"")}function df(e){var t;const n=(t=e??m1())!=null?t:"",o=mt(af,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:de(()=>r(a.parentNode)),connectedEdges:de(()=>Yn([a],s.value))}}function y1(){return{doubleClick:ae(),click:ae(),mouseEnter:ae(),mouseMove:ae(),mouseLeave:ae(),contextMenu:ae(),dragStart:ae(),drag:ae(),dragStop:ae()}}function _1(e,t){const n=y1();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 ff(){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,g=c?4:1,x=u.x*d*g,E=u.y*f*g,w=[];for(const O of t.value)if(O.draggable||l&&typeof O.draggable>"u"){const R={x:O.computedPosition.x+x,y:O.computedPosition.y+E},D=Pl(O,R,a.error,n.value,O.parentNode?i(O.parentNode):void 0),_=D.position;w.push({id:O.id,position:_,from:O.position,distance:{x:u.x,y:u.y},dimensions:O.dimensions})}o(w,!0,!1)}}const Fr=.1,w1=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2;function Nn(){return di("Viewport not initialized yet."),Promise.resolve(!1)}const b1={zoomIn:Nn,zoomOut:Nn,zoomTo:Nn,fitView:Nn,setCenter:Nn,fitBounds:Nn,project:e=>e,screenToFlowCoordinate:e=>e,flowToScreenCoordinate:e=>e,setViewport:Nn,setTransform:Nn,getViewport:()=>({x:0,y:0,zoom:1}),getTransform:()=>({x:0,y:0,zoom:1}),viewportInitialized:!1};function S1(e){function t(o,i){return new Promise(r=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.interpolate(i?.interpolate==="linear"?Jo:_r).scaleBy(Hl(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=Md({x:-o,y:-i},e.translateExtent),c=u.x,d=u.y,f=po.translate(-c,-d).scale(r);e.d3Selection&&e.d3Zoom?(a=e.d3Zoom)==null||a.interpolate(s?.interpolate==="linear"?Jo:_r).transform(Hl(e.d3Selection,s?.duration,s?.ease,()=>{l(!0)}),f):l(!1)})}return de(()=>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"?Jo:_r).scaleTo(Hl(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:Fr,includeHiddenNodes:!1,duration:0});var u,c;const d=[];for(const O of e.nodes)O.dimensions.width&&O.dimensions.height&&(r?.includeHiddenNodes||!O.hidden)&&(!((u=r.nodes)!=null&&u.length)||(c=r.nodes)!=null&&c.length&&r.nodes.includes(O.id))&&d.push(O);if(!d.length)return Promise.resolve(!1);const f=Nl(d),g=Ld(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:Fr),x=g.x,E=g.y,w=g.zoom;return n(x,E,w,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:Fr});const a=Ld(r,e.dimensions.width,e.dimensions.height,e.minZoom,e.maxZoom,(l=s.padding)!=null?l:Fr),u=a.x,c=a.y,d=a.zoom;return n(u,c,d,s)},project:i=>ai(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 ai(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 li(a,e.viewport)}return{x:0,y:0}}}:b1)}function Hl(e,t,n,o){t===void 0&&(t=0),n===void 0&&(n=w1),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 E1(e,t,n){const o=hs(!0);return o.run(()=>{const i=()=>{o.run(()=>{let E,w,O=!!(n.nodes.value.length||n.edges.value.length);E=uo([e.modelValue,()=>{var R,D;return(D=(R=e.modelValue)==null?void 0:R.value)==null?void 0:D.length}],R=>{let D=R[0];D&&Array.isArray(D)&&(w?.pause(),n.setElements(D),!w&&!O&&D.length?O=!0:w?.resume())}),w=uo([n.nodes,n.edges,()=>n.edges.value.length,()=>n.nodes.value.length],R=>{let D=R[0],_=R[1];var L;(L=e.modelValue)!=null&&L.value&&Array.isArray(e.modelValue.value)&&(E?.pause(),e.modelValue.value=[...D,..._],Ht(()=>{E?.resume()}))},{immediate:O}),Ii(()=>{E?.stop(),w?.stop()})})},r=()=>{o.run(()=>{let E,w,O=!!n.nodes.value.length;E=uo([e.nodes,()=>{var R,D;return(D=(R=e.nodes)==null?void 0:R.value)==null?void 0:D.length}],R=>{let D=R[0];D&&Array.isArray(D)&&(w?.pause(),n.setNodes(D),!w&&!O&&D.length?O=!0:w?.resume())}),w=uo([n.nodes,()=>n.nodes.value.length],R=>{let D=R[0];var _;(_=e.nodes)!=null&&_.value&&Array.isArray(e.nodes.value)&&(E?.pause(),e.nodes.value=[...D],Ht(()=>{E?.resume()}))},{immediate:O}),Ii(()=>{E?.stop(),w?.stop()})})},s=()=>{o.run(()=>{let E,w,O=!!n.edges.value.length;E=uo([e.edges,()=>{var R,D;return(D=(R=e.edges)==null?void 0:R.value)==null?void 0:D.length}],R=>{let D=R[0];D&&Array.isArray(D)&&(w?.pause(),n.setEdges(D),!w&&!O&&D.length?O=!0:w?.resume())}),w=uo([n.edges,()=>n.edges.value.length],R=>{let D=R[0];var _;(_=e.edges)!=null&&_.value&&Array.isArray(e.edges.value)&&(E?.pause(),e.edges.value=[...D],Ht(()=>{E?.resume()}))},{immediate:O}),Ii(()=>{E?.stop(),w?.stop()})})},l=()=>{o.run(()=>{xe(()=>t.maxZoom,()=>{t.maxZoom&&Ye(t.maxZoom)&&n.setMaxZoom(t.maxZoom)},{immediate:!0})})},a=()=>{o.run(()=>{xe(()=>t.minZoom,()=>{t.minZoom&&Ye(t.minZoom)&&n.setMinZoom(t.minZoom)},{immediate:!0})})},u=()=>{o.run(()=>{xe(()=>t.translateExtent,()=>{t.translateExtent&&Ye(t.translateExtent)&&n.setTranslateExtent(t.translateExtent)},{immediate:!0})})},c=()=>{o.run(()=>{xe(()=>t.nodeExtent,()=>{t.nodeExtent&&Ye(t.nodeExtent)&&n.setNodeExtent(t.nodeExtent)},{immediate:!0})})},d=()=>{o.run(()=>{xe(()=>t.applyDefault,()=>{Ye(t.applyDefault)&&(n.applyDefault.value=t.applyDefault)},{immediate:!0})})},f=()=>{o.run(()=>{const E=async w=>{let O=w;typeof t.autoConnect=="function"&&(O=await t.autoConnect(w)),O!==!1&&n.addEdges([O])};xe(()=>t.autoConnect,()=>{Ye(t.autoConnect)&&(n.autoConnect.value=t.autoConnect)},{immediate:!0}),xe(n.autoConnect,(w,O,R)=>{w?n.onConnect(E):n.hooks.value.connect.off(E),R(()=>{n.hooks.value.connect.off(E)})},{immediate:!0})})},g=()=>{const E=["id","modelValue","translateExtent","nodeExtent","edges","nodes","maxZoom","minZoom","applyDefault","autoConnect"];for(const w of Object.keys(t)){const O=w;if(!E.includes(O)){const R=De(()=>t[O]),D=n[O];Ve(D)&&o.run(()=>{xe(R,_=>{Ye(_)&&(D.value=_)},{immediate:!0})})}}};i(),r(),s(),a(),l(),u(),c(),d(),f(),g()}),()=>o.stop()}function x1(){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=>di(e.message))}}function A1(e,t){const n=En();vu(()=>{for(const i of Object.entries(t.value)){const r=i[0],s=i[1],l=a=>{e(r,a)};s.setEmitter(l),Yo(s.removeEmitter),s.setHasEmitListeners(()=>o(r)),Yo(s.removeHasEmitListeners)}});function o(i){var r;const s=O1(i);return!!((r=n?.vnode.props)==null?void 0:r[s])}}function O1(e){const t=e.split(":"),n=t[0],o=kv(t).slice(1);return"on"+n.replace(/(?:^|-)(\w)/g,(r,s)=>s.toUpperCase())+(o.length?":"+o.join(":"):"")}function hf(){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:Al.Full,paneDragging:!1,preventScrolling:!0,zoomOnScroll:!0,zoomOnPinch:!0,zoomOnDoubleClick:!0,panOnScroll:!1,panOnScrollSpeed:.5,panOnScrollMode:ii.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:Vn.Bezier,style:{}},connectionMode:xn.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:ci()?"Meta":"Control",zoomActivationKeyCode:ci()?"Meta":"Control",deleteKeyCode:"Backspace",panActivationKeyCode:"Space",hooks:x1(),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 C1=["id","vueFlowRef","viewportRef","initialized","modelValue","nodes","edges","maxZoom","minZoom","translateExtent","hooks","defaultEdgeOptions"];function N1(e,t,n){const o=S1(e),i=p=>{const m=p??[];e.hooks.updateNodeInternals.trigger(m)},r=p=>V_(p,e.nodes,e.edges),s=p=>B_(p,e.nodes,e.edges),l=p=>Yn(p,e.edges),a=p=>{var m;let S=p.id,A=p.type,N=p.nodeId;var b;const M=S?"-"+A+"-"+S:"-"+A;return Array.from((m=(b=e.connectionLookup.get(""+N+M))==null?void 0:b.values())!=null?m:[])},u=p=>{if(p)return t.value.get(p)},c=p=>{if(p)return n.value.get(p)},d=(p,m,S)=>{var A,N;const b=[];for(const I of p){const B={id:I.id,type:"position",dragging:S,from:I.from};if(m&&(B.position=I.position,I.parentNode)){var M,P;const G=u(I.parentNode);B.position={x:B.position.x-((M=(A=G?.computedPosition)==null?void 0:A.x)!=null?M:0),y:B.position.y-((P=(N=G?.computedPosition)==null?void 0:N.y)!=null?P:0)}}b.push(B)}b?.length&&e.hooks.nodesChange.trigger(b)},f=p=>{if(!e.vueFlowRef)return;const m=e.vueFlowRef.querySelector(".vue-flow__transformationpane");if(!m)return;const S=window.getComputedStyle(m),A=new window.DOMMatrixReadOnly(S.transform),N=A.m22,b=[];for(const M of p){const P=M,I=u(P.id);if(I){const B=Ir(P.nodeElement);if(!!(B.width&&B.height&&(I.dimensions.width!==B.width||I.dimensions.height!==B.height||P.forceUpdate))){const oe=P.nodeElement.getBoundingClientRect();I.dimensions=B,I.handleBounds.source=tf("source",P.nodeElement,oe,N,I.id),I.handleBounds.target=tf("target",P.nodeElement,oe,N,I.id),b.push({id:I.id,type:"dimensions",dimensions:B})}}}!e.fitViewOnInitDone&&e.fitViewOnInit&&o.value.fitView().then(()=>{e.fitViewOnInitDone=!0}),b.length&&e.hooks.nodesChange.trigger(b)},g=(p,m)=>{const S=new Set,A=new Set;for(const M of p)Kn(M)?S.add(M.id):An(M)&&A.add(M.id);const N=Cn(t.value,S,!0),b=Cn(n.value,A);if(e.multiSelectionActive){for(const M of S)N.push(On(M,m));for(const M of A)b.push(On(M,m))}N.length&&e.hooks.nodesChange.trigger(N),b.length&&e.hooks.edgesChange.trigger(b)},x=p=>{if(e.multiSelectionActive){const m=p.map(S=>On(S.id,!0));e.hooks.nodesChange.trigger(m);return}e.hooks.nodesChange.trigger(Cn(t.value,new Set(p.map(m=>m.id)),!0)),e.hooks.edgesChange.trigger(Cn(n.value))},E=p=>{if(e.multiSelectionActive){const m=p.map(S=>On(S.id,!0));e.hooks.edgesChange.trigger(m);return}e.hooks.edgesChange.trigger(Cn(n.value,new Set(p.map(m=>m.id)))),e.hooks.nodesChange.trigger(Cn(t.value,new Set,!0))},w=p=>{g(p,!0)},O=p=>{const S=(p||e.nodes).map(A=>(A.selected=!1,On(A.id,!1)));e.hooks.nodesChange.trigger(S)},R=p=>{const S=(p||e.edges).map(A=>(A.selected=!1,On(A.id,!1)));e.hooks.edgesChange.trigger(S)},D=p=>{if(!p||!p.length)return g([],!1);const m=p.reduce((S,A)=>{const N=On(A.id,!1);return Kn(A)?S.nodes.push(N):S.edges.push(N),S},{nodes:[],edges:[]});m.nodes.length&&e.hooks.nodesChange.trigger(m.nodes),m.edges.length&&e.hooks.edgesChange.trigger(m.edges)},_=p=>{var m;(m=e.d3Zoom)==null||m.scaleExtent([p,e.maxZoom]),e.minZoom=p},L=p=>{var m;(m=e.d3Zoom)==null||m.scaleExtent([e.minZoom,p]),e.maxZoom=p},K=p=>{var m;(m=e.d3Zoom)==null||m.translateExtent(p),e.translateExtent=p},Y=p=>{e.nodeExtent=p,i()},V=p=>{var m;(m=e.d3Zoom)==null||m.clickDistance(p)},U=p=>{e.nodesDraggable=p,e.nodesConnectable=p,e.elementsSelectable=p},j=p=>{const m=p instanceof Function?p(e.nodes):p;!e.initialized&&!m.length||(e.nodes=nf(m,u,e.hooks.error.trigger))},ie=p=>{const m=p instanceof Function?p(e.edges):p;if(!e.initialized&&!m.length)return;const S=Ll(m,e.isValidConnection,u,c,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges);Fl(e.connectionLookup,n.value,S),e.edges=S},J=p=>{const m=p instanceof Function?p([...e.nodes,...e.edges]):p;!e.initialized&&!m.length||(j(m.filter(Kn)),ie(m.filter(An)))},ne=p=>{let m=p instanceof Function?p(e.nodes):p;m=Array.isArray(m)?m:[m];const S=nf(m,u,e.hooks.error.trigger),A=[];for(const N of S)A.push(Vd(N));A.length&&e.hooks.nodesChange.trigger(A)},h=p=>{let m=p instanceof Function?p(e.edges):p;m=Array.isArray(m)?m:[m];const S=Ll(m,e.isValidConnection,u,c,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges),A=[];for(const N of S)A.push(Vd(N));A.length&&e.hooks.edgesChange.trigger(A)},C=function(m,S,A){S===void 0&&(S=!0),A===void 0&&(A=!1);const N=m instanceof Function?m(e.nodes):m,b=Array.isArray(N)?N:[N],M=[],P=[];function I(G){const oe=l(G);for(const Q of oe)(!Ye(Q.deletable)||Q.deletable)&&P.push(Kd(Q.id,Q.source,Q.target,Q.sourceHandle,Q.targetHandle))}function B(G){const oe=[];for(const Q of e.nodes)Q.parentNode===G&&oe.push(Q);if(oe.length){for(const Q of oe)M.push(Gd(Q.id));S&&I(oe);for(const Q of oe)B(Q.id)}}for(const G of b){const oe=typeof G=="string"?u(G):G;oe&&(Ye(oe.deletable)&&!oe.deletable||(M.push(Gd(oe.id)),S&&I([oe]),A&&B(oe.id)))}P.length&&e.hooks.edgesChange.trigger(P),M.length&&e.hooks.nodesChange.trigger(M)},k=p=>{const m=p instanceof Function?p(e.edges):p,S=Array.isArray(m)?m:[m],A=[];for(const N of S){const b=typeof N=="string"?c(N):N;b&&(Ye(b.deletable)&&!b.deletable||A.push(Kd(typeof N=="string"?N:N.id,b.source,b.target,b.sourceHandle,b.targetHandle)))}e.hooks.edgesChange.trigger(A)},F=function(m,S,A){A===void 0&&(A=!0);const N=c(m.id);if(!N)return!1;const b=e.edges.indexOf(N),M=d1(m,S,N,A,e.hooks.error.trigger);if(M){const P=Ll([M],e.isValidConnection,u,c,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges),I=P[0];return e.edges=e.edges.map((B,G)=>G===b?I:B),Fl(e.connectionLookup,n.value,[I]),I}return!1},T=function(m,S,A){A===void 0&&(A={replace:!1});const N=c(m);if(!N)return;const b=typeof S=="function"?S(N):S;N.data=A.replace?b:re({},N.data,b)},H=p=>Bd(p,e.nodes),W=p=>{const m=Bd(p,e.edges);return Fl(e.connectionLookup,n.value,m),m},z=function(m,S,A){A===void 0&&(A={replace:!1});const N=u(m);if(!N)return;const b=typeof S=="function"?S(N):S;A.replace?e.nodes.splice(e.nodes.indexOf(N),1,b):Object.assign(N,b)},$=function(m,S,A){A===void 0&&(A={replace:!1});const N=u(m);if(!N)return;const b=typeof S=="function"?S(N):S;N.data=A.replace?b:re({},N.data,b)},q=function(m,S,A){A===void 0&&(A=!1),A?e.connectionClickStartHandle=m:e.connectionStartHandle=m,e.connectionEndHandle=null,e.connectionStatus=null,S&&(e.connectionPosition=S)},le=function(m,S,A){S===void 0&&(S=null),A===void 0&&(A=null),e.connectionStartHandle&&(e.connectionPosition=m,e.connectionEndHandle=S,e.connectionStatus=A)},ue=(p,m)=>{e.connectionPosition={x:Number.NaN,y:Number.NaN},e.connectionEndHandle=null,e.connectionStatus=null,m?e.connectionClickStartHandle=null:e.connectionStartHandle=null},X=p=>{const m=W_(p),S=m?null:si(p)?p:u(p.id);return!m&&!S?[null,null,m]:[m?p:Tr(S),S,m]},Z=function(m,S,A){S===void 0&&(S=!0),A===void 0&&(A=e.nodes);const N=X(m),b=N[0],M=N[1],P=N[2];if(!b)return[];const I=[];for(const B of A||e.nodes){if(!P&&(B.id===M.id||!B.computedPosition))continue;const G=Tr(B),oe=Mr(G,b);(S&&oe>0||oe>=G.width*G.height||oe>=Number(b.width)*Number(b.height))&&I.push(B)}return I},te=function(m,S,A){A===void 0&&(A=!0);const N=X(m),b=N[0];if(!b)return!1;const M=Mr(b,S);return A&&M>0||M>=Number(b.width)*Number(b.height)},pe=p=>{const m=e.viewport,S=e.dimensions,A=e.d3Zoom,N=e.d3Selection,b=e.translateExtent;if(!A||!N||!p.x&&!p.y)return!1;const M=po.translate(m.x+p.x,m.y+p.y).scale(m.zoom),P=[[0,0],[S.width,S.height]],I=A.constrain()(M,P,b),B=e.viewport.x!==I.x||e.viewport.y!==I.y||e.viewport.zoom!==I.k;return A.transform(N,I),B},ve=p=>{const m=p instanceof Function?p(e):p,S=["d3Zoom","d3Selection","d3ZoomHandler","viewportRef","vueFlowRef","dimensions","hooks"];Ye(m.defaultEdgeOptions)&&(e.defaultEdgeOptions=m.defaultEdgeOptions);const A=m.modelValue||m.nodes||m.edges?[]:void 0;A&&(m.modelValue&&A.push(...m.modelValue),m.nodes&&A.push(...m.nodes),m.edges&&A.push(...m.edges),J(A));const N=()=>{Ye(m.maxZoom)&&L(m.maxZoom),Ye(m.minZoom)&&_(m.minZoom),Ye(m.translateExtent)&&K(m.translateExtent)};for(const b of Object.keys(m)){const M=b,P=m[M];![...C1,...S].includes(M)&&Ye(P)&&(e[M]=P)}il(()=>e.d3Zoom).not.toBeNull().then(N),e.initialized||(e.initialized=!0)};return{updateNodePositions:d,updateNodeDimensions:f,setElements:J,setNodes:j,setEdges:ie,addNodes:ne,addEdges:h,removeNodes:C,removeEdges:k,findNode:u,findEdge:c,updateEdge:F,updateEdgeData:T,updateNode:z,updateNodeData:$,applyEdgeChanges:W,applyNodeChanges:H,addSelectedElements:w,addSelectedNodes:x,addSelectedEdges:E,setMinZoom:_,setMaxZoom:L,setTranslateExtent:K,setNodeExtent:Y,setPaneClickDistance:V,removeSelectedElements:D,removeSelectedNodes:O,removeSelectedEdges:R,startConnection:q,updateConnection:le,endConnection:ue,setInteractive:U,setState:ve,getIntersectingNodes:Z,getIncomers:r,getOutgoers:s,getConnectedEdges:l,getHandleConnections:a,isNodeIntersecting:te,panBy:pe,fitView:p=>o.value.fitView(p),zoomIn:p=>o.value.zoomIn(p),zoomOut:p=>o.value.zoomOut(p),zoomTo:(p,m)=>o.value.zoomTo(p,m),setViewport:(p,m)=>o.value.setViewport(p,m),setTransform:(p,m)=>o.value.setTransform(p,m),getViewport:()=>o.value.getViewport(),getTransform:()=>o.value.getTransform(),setCenter:(p,m,S)=>o.value.setCenter(p,m,S),fitBounds:(p,m)=>o.value.fitBounds(p,m),project:p=>o.value.project(p),screenToFlowCoordinate:p=>o.value.screenToFlowCoordinate(p),flowToScreenCoordinate:p=>o.value.flowToScreenCoordinate(p),toObject:()=>{const p=[],m=[];for(const S of e.nodes){S.computedPosition,S.handleBounds,S.selected,S.dimensions,S.isParent,S.resizing,S.dragging,S.events;const A=Ko(S,Hv);p.push(A)}for(const S of e.edges){S.selected,S.sourceNode,S.targetNode,S.events;const A=Ko(S,Wv);m.push(A)}return JSON.parse(JSON.stringify({nodes:p,edges:m,position:[e.viewport.x,e.viewport.y],zoom:e.viewport.zoom,viewport:e.viewport}))},fromObject:p=>new Promise(m=>{const S=p.nodes,A=p.edges,N=p.position,b=p.zoom,M=p.viewport;S&&j(S),A&&ie(A);const P=M?.x&&M?.y?[M.x,M.y]:N??[null,null],I=P[0],B=P[1];if(I&&B){const G=M?.zoom||b||e.viewport.zoom;return il(()=>o.value.viewportInitialized).toBe(!0).then(()=>{o.value.setViewport({x:I,y:B,zoom:G}).then(()=>{m(!0)})})}else m(!0)}),updateNodeInternals:i,viewportHelper:o,$reset:()=>{const p=hf();if(e.edges=[],e.nodes=[],e.d3Zoom&&e.d3Selection){var m,S,A;const N=po.translate((m=p.defaultViewport.x)!=null?m:0,(S=p.defaultViewport.y)!=null?S:0).scale(Gn((A=p.defaultViewport.zoom)!=null?A:1,p.minZoom,p.maxZoom)),b=e.viewportRef.getBoundingClientRect(),M=[[0,0],[b.width,b.height]],P=e.d3Zoom.constrain()(N,M,p.translateExtent);e.d3Zoom.transform(e.d3Selection,P)}ve(p)},$destroy:()=>{}}}const T1=["data-id","data-handleid","data-nodeid","data-handlepos"],M1={name:"Handle",compatConfig:{MODE:3}},fi=Fe(re({},M1,{props:{id:{default:null},type:{},position:{default:()=>fe.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=Dg(e,["position","connectable","connectableStart","connectableEnd","id"]),i=De(()=>{var C;return(C=o.type)!=null?C:"source"}),r=De(()=>{var C;return(C=o.isValidConnection)!=null?C:null}),s=ke(),l=s.id,a=s.connectionStartHandle,u=s.connectionClickStartHandle,c=s.connectionEndHandle,d=s.vueFlowRef,f=s.nodesConnectable,g=s.noDragClassName,x=s.noPanClassName,E=df(),w=E.id,O=E.node,R=E.nodeEl,D=E.connectedEdges,_=Ce(),L=De(()=>typeof e.connectableStart<"u"?e.connectableStart:!0),K=De(()=>typeof e.connectableEnd<"u"?e.connectableEnd:!0),Y=De(()=>{var C,k,F,T,H,W;return((C=a.value)==null?void 0:C.nodeId)===w&&((k=a.value)==null?void 0:k.id)===e.id&&((F=a.value)==null?void 0:F.type)===i.value||((T=c.value)==null?void 0:T.nodeId)===w&&((H=c.value)==null?void 0:H.id)===e.id&&((W=c.value)==null?void 0:W.type)===i.value}),V=De(()=>{var C,k,F;return((C=u.value)==null?void 0:C.nodeId)===w&&((k=u.value)==null?void 0:k.id)===e.id&&((F=u.value)==null?void 0:F.type)===i.value}),U=cf({nodeId:w,handleId:e.id,isValidConnection:r,type:i}),j=U.handlePointerDown,ie=U.handleClick,J=de(()=>typeof e.connectable=="string"&&e.connectable==="single"?!D.value.some(C=>{const k=C[i.value+"Handle"];return C[i.value]!==w?!1:k?k===e.id:!0}):typeof e.connectable=="number"?D.value.filter(C=>{const k=C[i.value+"Handle"];return C[i.value]!==w?!1:k?k===e.id:!0}).length<e.connectable:typeof e.connectable=="function"?e.connectable(O,D.value):Ye(e.connectable)?e.connectable:f.value);Ct(()=>{var C,k;if(!O.dimensions.width||!O.dimensions.height)return;const F=(k=O.handleBounds[i.value])==null?void 0:k.find(ue=>ue.id===e.id);if(!d.value||F)return;const T=d.value.querySelector(".vue-flow__transformationpane");if(!R.value||!_.value||!T||!e.id)return;const H=R.value.getBoundingClientRect(),W=_.value.getBoundingClientRect(),z=window.getComputedStyle(T),$=new window.DOMMatrixReadOnly(z.transform),q=$.m22,le=re({id:e.id,position:e.position,x:(W.left-H.left)/q,y:(W.top-H.top)/q,type:i.value,nodeId:w},Ir(_.value));O.handleBounds[i.value]=[...(C=O.handleBounds[i.value])!=null?C:[],le]});function ne(C){const k=Rl(C);J.value&&L.value&&(k&&C.button===0||!k)&&j(C)}function h(C){!w||!u.value&&!L.value||J.value&&ie(C)}return n({handleClick:ie,handlePointerDown:j,onClick:h,onPointerDown:ne}),(C,k)=>(se(),he("div",{ref_key:"handle",ref:_,"data-id":ce(l)+"-"+ce(w)+"-"+e.id+"-"+i.value,"data-handleid":e.id,"data-nodeid":ce(w),"data-handlepos":C.position,class:Be(["vue-flow__handle",["vue-flow__handle-"+C.position,"vue-flow__handle-"+e.id,ce(g),ce(x),i.value,{connectable:J.value,connecting:V.value,connectablestart:L.value,connectableend:K.value,connectionindicator:J.value&&(L.value&&!Y.value||K.value&&Y.value)}]]),onMousedown:ne,onTouchstartPassive:ne,onClick:h},[yt(C.$slots,"default",{id:C.id})],42,T1))}})),Lr=function(t){var n;let o=t.sourcePosition,i=o===void 0?fe.Bottom:o,r=t.targetPosition,s=r===void 0?fe.Top:r,l=t.label,a=t.connectable,u=a===void 0?!0:a,c=t.isValidTargetPos,d=t.isValidSourcePos;const g=(n=t.data.label)!=null?n:l;return[Ie(fi,{type:"target",position:s,connectable:u,isValidConnection:c}),typeof g!="string"&&g?Ie(g):Ie($e,[g]),Ie(fi,{type:"source",position:i,connectable:u,isValidConnection:d})]};Lr.props=["sourcePosition","targetPosition","label","isValidTargetPos","isValidSourcePos","connectable","data"],Lr.inheritAttrs=!1,Lr.compatConfig={MODE:3};const I1=Lr,Hr=function(t){var n;let o=t.targetPosition,i=o===void 0?fe.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(fi,{type:"target",position:i,connectable:l,isValidConnection:a}),typeof c!="string"&&c?Ie(c):Ie($e,[c])]};Hr.props=["targetPosition","label","isValidTargetPos","connectable","data"],Hr.inheritAttrs=!1,Hr.compatConfig={MODE:3};const P1=Hr,Wr=function(t){var n;let o=t.sourcePosition,i=o===void 0?fe.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($e,[c]),Ie(fi,{type:"source",position:i,connectable:l,isValidConnection:a})]};Wr.props=["sourcePosition","label","isValidSourcePos","connectable","data"],Wr.inheritAttrs=!1,Wr.compatConfig={MODE:3};const R1=Wr,D1=["transform"],k1=["width","height","x","y","rx","ry"],$1=["y"],F1={name:"EdgeText",compatConfig:{MODE:3}},L1=Fe(re({},F1,{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=de(()=>"translate("+(e.x-t.value.width/2)+" "+(e.y-t.value.height/2)+")");Ct(i),xe([()=>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(),he("g",{transform:o.value,class:"vue-flow__edge-textwrapper"},[r.labelShowBg?(se(),he("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:Ue(r.labelBgStyle),rx:r.labelBgBorderRadius,ry:r.labelBgBorderRadius},null,12,k1)):Se("",!0),ee("text",Wo(r.$attrs,{ref_key:"el",ref:n,class:"vue-flow__edge-text",y:t.value.height/2,dy:"0.3em",style:r.labelStyle}),[yt(r.$slots,"default",{},()=>[typeof r.label!="string"?(se(),qe(_u(r.label),{key:0})):(se(),he($e,{key:1},[zt(me(r.label),1)],64))])],16,$1)],8,D1))}})),H1=["id","d","marker-end","marker-start"],W1=["d","stroke-width"],z1={name:"BaseEdge",inheritAttrs:!1,compatConfig:{MODE:3}},zr=Fe(re({},z1,{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=$s();return n({pathEl:o,interactionEl:i,labelEl:r}),(l,a)=>(se(),he($e,null,[ee("path",Wo(ce(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,H1),l.interactionWidth?(se(),he("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,W1)):Se("",!0),l.label&&l.labelX&&l.labelY?(se(),qe(L1,{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"])):Se("",!0)],64))}}));function gf(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 pf(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 Br(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function vf(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 fe.Left:l=n-Br(n-i,s),a=o;break;case fe.Right:l=n+Br(i-n,s),a=o;break;case fe.Top:l=n,a=o-Br(o-r,s);break;case fe.Bottom:l=n,a=o+Br(r-o,s);break}return[l,a]}function mf(e){const t=e.sourceX,n=e.sourceY,o=e.sourcePosition,i=o===void 0?fe.Bottom:o,r=e.targetX,s=e.targetY,l=e.targetPosition,a=l===void 0?fe.Top:l,u=e.curvature,c=u===void 0?.25:u,d=vf({pos:i,x1:t,y1:n,x2:r,y2:s,c}),f=d[0],g=d[1],x=vf({pos:a,x1:r,y1:s,x2:t,y2:n,c}),E=x[0],w=x[1],O=pf({sourceX:t,sourceY:n,targetX:r,targetY:s,sourceControlX:f,sourceControlY:g,targetControlX:E,targetControlY:w}),R=O[0],D=O[1],_=O[2],L=O[3];return["M"+t+","+n+" C"+f+","+g+" "+E+","+w+" "+r+","+s,R,D,_,L]}function yf(e){let t=e.pos,n=e.x1,o=e.y1,i=e.x2,r=e.y2,s,l;switch(t){case fe.Left:case fe.Right:s=.5*(n+i),l=o;break;case fe.Top:case fe.Bottom:s=n,l=.5*(o+r);break}return[s,l]}function _f(e){const t=e.sourceX,n=e.sourceY,o=e.sourcePosition,i=o===void 0?fe.Bottom:o,r=e.targetX,s=e.targetY,l=e.targetPosition,a=l===void 0?fe.Top:l,u=yf({pos:i,x1:t,y1:n,x2:r,y2:s}),c=u[0],d=u[1],f=yf({pos:a,x1:r,y1:s,x2:t,y2:n}),g=f[0],x=f[1],E=pf({sourceX:t,sourceY:n,targetX:r,targetY:s,sourceControlX:c,sourceControlY:d,targetControlX:g,targetControlY:x}),w=E[0],O=E[1],R=E[2],D=E[3];return["M"+t+","+n+" C"+c+","+d+" "+g+","+x+" "+r+","+s,w,O,R,D]}const wf={[fe.Left]:{x:-1,y:0},[fe.Right]:{x:1,y:0},[fe.Top]:{x:0,y:-1},[fe.Bottom]:{x:0,y:1}};function B1(e){let t=e.source,n=e.sourcePosition,o=n===void 0?fe.Bottom:n,i=e.target;return o===fe.Left||o===fe.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 bf(e,t){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)}function V1(e){let t=e.source,n=e.sourcePosition,o=n===void 0?fe.Bottom:n,i=e.target,r=e.targetPosition,s=r===void 0?fe.Top:r,l=e.center,a=e.offset;const u=wf[o],c=wf[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},g=B1({source:d,sourcePosition:o,target:f}),x=g.x!==0?"x":"y",E=g[x];let w,O,R;const D={x:0,y:0},_={x:0,y:0},L=gf({sourceX:t.x,sourceY:t.y,targetX:i.x,targetY:i.y}),K=L[0],Y=L[1],V=L[2],U=L[3];if(u[x]*c[x]===-1){var j,ie;O=(j=l.x)!=null?j:K,R=(ie=l.y)!=null?ie:Y;const ne=[{x:O,y:d.y},{x:O,y:f.y}],h=[{x:d.x,y:R},{x:f.x,y:R}];u[x]===E?w=x==="x"?ne:h:w=x==="x"?h:ne}else{const ne=[{x:d.x,y:f.y}],h=[{x:f.x,y:d.y}];if(x==="x"?w=u.x===E?h:ne:w=u.y===E?ne:h,o===s){const H=Math.abs(t[x]-i[x]);if(H<=a){const W=Math.min(a-1,a-H);u[x]===E?D[x]=(d[x]>t[x]?-1:1)*W:_[x]=(f[x]>i[x]?-1:1)*W}}if(o!==s){const H=x==="x"?"y":"x",W=u[x]===c[H],z=d[H]>f[H],$=d[H]<f[H];(u[x]===1&&(!W&&z||W&&$)||u[x]!==1&&(!W&&$||W&&z))&&(w=x==="x"?ne:h)}const C={x:d.x+D.x,y:d.y+D.y},k={x:f.x+_.x,y:f.y+_.y},F=Math.max(Math.abs(C.x-w[0].x),Math.abs(k.x-w[0].x)),T=Math.max(Math.abs(C.y-w[0].y),Math.abs(k.y-w[0].y));F>=T?(O=(C.x+k.x)/2,R=w[0].y):(O=w[0].x,R=(C.y+k.y)/2)}return[[t,{x:d.x+D.x,y:d.y+D.y},...w,{x:f.x+_.x,y:f.y+_.y},i],O,R,V,U]}function G1(e,t,n,o){const i=Math.min(bf(e,t)/2,bf(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 Vr(e){const t=e.sourceX,n=e.sourceY,o=e.sourcePosition,i=o===void 0?fe.Bottom:o,r=e.targetX,s=e.targetY,l=e.targetPosition,a=l===void 0?fe.Top:l,u=e.borderRadius,c=u===void 0?5:u,d=e.centerX,f=e.centerY,g=e.offset,E=V1({source:{x:t,y:n},sourcePosition:i,target:{x:r,y:s},targetPosition:a,center:{x:d,y:f},offset:g===void 0?20:g}),w=E[0],O=E[1],R=E[2],D=E[3],_=E[4];return[w.reduce((K,Y,V)=>{let U;return V>0&&V<w.length-1?U=G1(w[V-1],Y,w[V+1],c):U=(V===0?"M":"L")+Y.x+" "+Y.y,K+=U,K},""),O,R,D,_]}function K1(e){const t=e.sourceX,n=e.sourceY,o=e.targetX,i=e.targetY,r=gf({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 Y1=Fe({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(zr,re({path:i,labelX:r,labelY:s},n,e))}}}),U1=Y1,X1=Fe({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=Vr(re({},e,{sourcePosition:(o=e.sourcePosition)!=null?o:fe.Bottom,targetPosition:(i=e.targetPosition)!=null?i:fe.Top})),s=r[0],l=r[1],a=r[2];return Ie(zr,re({path:s,labelX:l,labelY:a},n,e))}}}),Sf=X1,q1=Fe({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(Sf,re({},e,n,{borderRadius:0}))}}),Z1=q1,j1=Fe({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=mf(re({},e,{sourcePosition:(o=e.sourcePosition)!=null?o:fe.Bottom,targetPosition:(i=e.targetPosition)!=null?i:fe.Top})),s=r[0],l=r[1],a=r[2];return Ie(zr,re({path:s,labelX:l,labelY:a},n,e))}}}),J1=j1,Q1=Fe({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=_f(re({},e,{sourcePosition:(o=e.sourcePosition)!=null?o:fe.Bottom,targetPosition:(i=e.targetPosition)!=null?i:fe.Top})),s=r[0],l=r[1],a=r[2];return Ie(zr,re({path:s,labelX:l,labelY:a},n,e))}}}),ew=Q1,tw={input:R1,default:I1,output:P1},nw={default:J1,straight:U1,step:Z1,smoothstep:Sf,simplebezier:ew};function ow(e,t,n){const o=de(()=>E=>t.value.get(E)),i=de(()=>E=>n.value.get(E)),r=de(()=>{const E=re({},nw,e.edgeTypes),w=Object.keys(E);for(const O of e.edges)O.type&&!w.includes(O.type)&&(E[O.type]=O.type);return E}),s=de(()=>{const E=re({},tw,e.nodeTypes),w=Object.keys(E);for(const O of e.nodes)O.type&&!w.includes(O.type)&&(E[O.type]=O.type);return E}),l=de(()=>e.onlyRenderVisibleElements?Fd(e.nodes,{x:0,y:0,width:e.dimensions.width,height:e.dimensions.height},e.viewport,!0):e.nodes),a=de(()=>{if(e.onlyRenderVisibleElements){const E=[];for(const w of e.edges){const O=t.value.get(w.source),R=t.value.get(w.target);Q_({sourcePos:O.computedPosition||{x:0,y:0},targetPos:R.computedPosition||{x:0,y:0},sourceWidth:O.dimensions.width,sourceHeight:O.dimensions.height,targetWidth:R.dimensions.width,targetHeight:R.dimensions.height,width:e.dimensions.width,height:e.dimensions.height,viewport:e.viewport})&&E.push(w)}return E}return e.edges}),u=de(()=>[...l.value,...a.value]),c=de(()=>{const E=[];for(const w of e.nodes)w.selected&&E.push(w);return E}),d=de(()=>{const E=[];for(const w of e.edges)w.selected&&E.push(w);return E}),f=de(()=>[...c.value,...d.value]),g=de(()=>{const E=[];for(const w of e.nodes)w.dimensions.width&&w.dimensions.height&&w.handleBounds!==void 0&&E.push(w);return E}),x=de(()=>l.value.length>0&&g.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:g,areNodesInitialized:x}}class Zn{constructor(){this.currentId=0,this.flows=new Map}static getInstance(){var t,n;const o=(n=En())==null?void 0:n.appContext.app,i=(t=o?.config.globalProperties.$vueFlowStorage)!=null?t:Zn.instance;return Zn.instance=i??new Zn,o&&(o.config.globalProperties.$vueFlowStorage=Zn.instance),Zn.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=hf(),i=Io(o),r={};for(const f of Object.entries(i.hooks)){const g=f[0],x=f[1],E="on"+(g.charAt(0).toUpperCase()+g.slice(1));r[E]=x.on}const s={};for(const f of Object.entries(i.hooks)){const g=f[0],x=f[1];s[g]=x.trigger}const l=de(()=>{const f=new Map;for(const g of i.nodes)f.set(g.id,g);return f}),a=de(()=>{const f=new Map;for(const g of i.edges)f.set(g.id,g);return f}),u=ow(i,l,a),c=N1(i,l,a);c.setState(re({},i,n));const d=re({},r,u,c,qv(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=Zn.getInstance(),n=gs(),o=typeof e=="object",i=o?e:{id:e},r=i.id,s=r??n?.vueFlowId;let l;if(n){const a=mt(sf,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??hs(!0)).run(()=>{xe(u.applyDefault,(d,f,g)=>{const x=w=>{u.applyNodeChanges(w)},E=w=>{u.applyEdgeChanges(w)};d?(u.onNodesChange(x),u.onEdgesChange(E)):(u.hooks.value.nodesChange.off(x),u.hooks.value.edgesChange.off(E)),g(()=>{u.hooks.value.nodesChange.off(x),u.hooks.value.edgesChange.off(E)})},{immediate:!0}),Yo(()=>{if(l){const d=t.get(l.id);d?d.$destroy():di("No store instance found for id "+l.id+" in storage.")}})})}else o&&l.setState(i);if(n&&(bn(sf,l),n.vueFlowId=l.id),o){const a=En();a?.type.name!=="VueFlow"&&l.emits.error(new Ze(Ke.USEVUEFLOW_OPTIONS))}return l}function iw(e){const t=ke(),n=t.emits,o=t.dimensions;let i;Ct(()=>{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=Ir(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)),Rs(()=>{window.removeEventListener("resize",r),i&&e.value&&i.unobserve(e.value)})})}const rw={name:"UserSelection",compatConfig:{MODE:3}},sw=Fe(re({},rw,{props:{userSelectionRect:{}},setup(e){return(t,n)=>(se(),he("div",{class:"vue-flow__selection vue-flow__container",style:Ue({width:t.userSelectionRect.width+"px",height:t.userSelectionRect.height+"px",transform:"translate("+t.userSelectionRect.x+"px, "+t.userSelectionRect.y+"px)"})},null,4))}})),lw=["tabIndex"],aw={name:"NodesSelection",compatConfig:{MODE:3}},uw=Fe(re({},aw,{setup(e){const t=ke(),n=t.emits,o=t.viewport,i=t.getSelectedNodes,r=t.noPanClassName,s=t.disableKeyboardA11y,l=t.userSelectionActive,a=ff(),u=Ce(null),c=uf({el:u,onStart(E){n.selectionDragStart(E),n.nodeDragStart(E)},onDrag(E){n.selectionDrag(E),n.nodeDrag(E)},onStop(E){n.selectionDragStop(E),n.nodeDragStop(E)}});Ct(()=>{var E;s.value||(E=u.value)==null||E.focus({preventScroll:!0})});const d=de(()=>Nl(i.value)),f=de(()=>({width:d.value.width+"px",height:d.value.height+"px",top:d.value.y+"px",left:d.value.x+"px"}));function g(E){n.selectionContextMenu({event:E,nodes:i.value})}function x(E){s.value||vo[E.key]&&(E.preventDefault(),a({x:vo[E.key].x,y:vo[E.key].y},E.shiftKey))}return(E,w)=>!ce(l)&&d.value.width&&d.value.height?(se(),he("div",{key:0,class:Be(["vue-flow__nodesselection vue-flow__container",ce(r)]),style:Ue({transform:"translate("+ce(o).x+"px,"+ce(o).y+"px) scale("+ce(o).zoom+")"})},[ee("div",{ref_key:"el",ref:u,class:Be([{dragging:ce(c)},"vue-flow__nodesselection-rect"]),style:Ue(f.value),tabIndex:ce(s)?void 0:-1,onContextmenu:g,onKeydown:x},null,46,lw)],6)):Se("",!0)}}));function cw(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}const dw={name:"Pane",compatConfig:{MODE:3}},fw=Fe(re({},dw,{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,g=t.removeNodes,x=t.removeEdges,E=t.selectionMode,w=t.deleteKeyCode,O=t.multiSelectionKeyCode,R=t.multiSelectionActive,D=t.edgeLookup,_=t.nodeLookup,L=t.connectionLookup,K=t.defaultEdgeOptions,Y=t.connectionStartHandle,V=t.panOnDrag,U=mn(null),j=mn(new Set),ie=mn(new Set),J=mn(null),ne=De(()=>u.value&&(e.isSelecting||s.value)),h=De(()=>Y.value!==null);let C=!1,k=!1;const F=ri(w,{actInsideInputWithModifier:!1}),T=ri(O);xe(F,X=>{X&&(g(f.value),x(d.value),c.value=!1)}),xe(T,X=>{R.value=X});function H(X,Z){return te=>{te.target===Z&&X?.(te)}}function W(X){if(C||h.value){C=!1;return}r.paneClick(X),l(),c.value=!1}function z(X){var Z;if(Array.isArray(V.value)&&((Z=V.value)!=null&&Z.includes(2))){X.preventDefault();return}r.paneContextMenu(X)}function $(X){r.paneScroll(X)}function q(X){var Z,te,pe,ve;if(J.value=(Z=(te=n.value)==null?void 0:te.getBoundingClientRect())!=null?Z:null,!u.value||!e.isSelecting||X.button!==0||X.target!==U.value||!J.value)return;(ve=(pe=X.target)==null?void 0:pe.setPointerCapture)==null||ve.call(pe,X.pointerId);const be=cw(X,J.value),y=be.x,v=be.y;k=!0,C=!1,l(),a.value={width:0,height:0,startX:y,startY:v,x:y,y:v},r.selectionStart(X)}function le(X){var Z,te;if(!J.value||!a.value)return;C=!0;const pe=Xt(X,J.value),ve=pe.x,be=pe.y,y=a.value,v=y.startX,p=v===void 0?0:v,m=y.startY,S=m===void 0?0:m,A={startX:p,startY:S,x:ve<p?ve:p,y:be<S?be:S,width:Math.abs(ve-p),height:Math.abs(be-S)},N=j.value,b=ie.value;j.value=new Set(Fd(o.value,A,i.value,E.value===Al.Partial,!0).map(I=>I.id)),ie.value=new Set;const M=(Z=(te=K.value)==null?void 0:te.selectable)!=null?Z:!0;for(const I of j.value){const B=L.value.get(I);if(B)for(const G of B.values()){var P;const oe=G.edgeId,Q=D.value.get(oe);Q&&((P=Q.selectable)!=null?P:M)&&ie.value.add(oe)}}if(!rf(N,j.value)){const I=Cn(_.value,j.value,!0);r.nodesChange(I)}if(!rf(b,ie.value)){const I=Cn(D.value,ie.value);r.edgesChange(I)}a.value=A,s.value=!0,c.value=!1}function ue(X){var Z;X.button!==0||!k||((Z=X.target)==null||Z.releasePointerCapture(X.pointerId),!s.value&&a.value&&X.target===U.value&&W(X),s.value=!1,a.value=null,c.value=j.value.size>0,r.selectionEnd(X),e.selectionKeyPressed&&(C=!1),k=!1)}return(X,Z)=>(se(),he("div",{ref_key:"container",ref:U,class:Be(["vue-flow__pane vue-flow__container",{selection:X.isSelecting}]),onClick:Z[0]||(Z[0]=te=>ne.value?void 0:H(W,U.value)(te)),onContextmenu:Z[1]||(Z[1]=te=>H(z,U.value)(te)),onWheelPassive:Z[2]||(Z[2]=te=>H($,U.value)(te)),onPointerenter:Z[3]||(Z[3]=te=>ne.value?void 0:ce(r).paneMouseEnter(te)),onPointerdown:Z[4]||(Z[4]=te=>ne.value?q(te):ce(r).paneMouseMove(te)),onPointermove:Z[5]||(Z[5]=te=>ne.value?le(te):ce(r).paneMouseMove(te)),onPointerup:Z[6]||(Z[6]=te=>ne.value?ue(te):void 0),onPointerleave:Z[7]||(Z[7]=te=>ce(r).paneMouseLeave(te))},[yt(X.$slots,"default"),ce(s)&&ce(a)?(se(),qe(sw,{key:0,"user-selection-rect":ce(a)},null,8,["user-selection-rect"])):Se("",!0),ce(c)&&ce(f).length?(se(),qe(uw,{key:1})):Se("",!0)],34))}})),hw={name:"Transform",compatConfig:{MODE:3}},gw=Fe(re({},hw,{setup(e){const t=ke(),n=t.viewport,o=t.fitViewOnInit,i=t.fitViewOnInitDone,r=de(()=>o.value?!i.value:!1),s=de(()=>"translate("+n.value.x+"px,"+n.value.y+"px) scale("+n.value.zoom+")");return(l,a)=>(se(),he("div",{class:"vue-flow__transformationpane vue-flow__container",style:Ue({transform:s.value,opacity:r.value?0:void 0})},[yt(l.$slots,"default")],4))}})),pw={name:"Viewport",compatConfig:{MODE:3}},vw=Fe(re({},pw,{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,g=t.zoomOnDoubleClick,x=t.zoomOnPinch,E=t.zoomOnScroll,w=t.preventScrolling,O=t.noWheelClassName,R=t.noPanClassName,D=t.emits,_=t.connectionStartHandle,L=t.userSelectionActive,K=t.paneDragging,Y=t.d3Zoom,V=t.d3Selection,U=t.d3ZoomHandler,j=t.viewport,ie=t.viewportRef,J=t.paneClickDistance;iw(ie);const ne=mn(!1),h=mn(!1);let C=null,k=!1,F=0,T={x:0,y:0,zoom:0};const H=ri(a),W=ri(l),z=ri(s),$=De(()=>(!W.value||W.value&&l.value===!0)&&(H.value||f.value)),q=De(()=>H.value||u.value),le=De(()=>l.value===!0&&$.value!==!0),ue=De(()=>W.value&&l.value!==!0||L.value||le.value),X=De(()=>_.value!==null);Ct(()=>{var be,y,v;if(!ie.value){di("Viewport element is missing");return}const p=ie.value,m=p.getBoundingClientRect(),S=R_().clickDistance(J.value).scaleExtent([n.value,o.value]).translateExtent(r.value),A=Tt(p).call(S),N=A.on("wheel.zoom"),b=po.translate((be=i.value.x)!=null?be:0,(y=i.value.y)!=null?y:0).scale(Gn((v=i.value.zoom)!=null?v:1,n.value,o.value)),M=[[0,0],[m.width,m.height]],P=S.constrain()(b,M,r.value);S.transform(A,P),S.wheelDelta(Tl),Y.value=S,V.value=A,U.value=N,j.value={x:P.x,y:P.y,zoom:P.k},S.on("start",I=>{var B;if(!I.sourceEvent)return null;F=I.sourceEvent.button,ne.value=!0;const G=pe(I.transform);((B=I.sourceEvent)==null?void 0:B.type)==="mousedown"&&(K.value=!0),T=G,D.viewportChangeStart(G),D.moveStart({event:I,flowTransform:G})}),S.on("end",I=>{if(!I.sourceEvent)return null;if(ne.value=!1,K.value=!1,Z($.value,F??0)&&!k&&D.paneContextMenu(I.sourceEvent),k=!1,te(T,I.transform)){const B=pe(I.transform);T=B,D.viewportChangeEnd(B),D.moveEnd({event:I,flowTransform:B})}}),S.filter(I=>{var B;const G=z.value||E.value,oe=x.value&&I.ctrlKey,Q=I.button,ge=I.type==="wheel";if(Q===1&&I.type==="mousedown"&&(ve(I,"vue-flow__node")||ve(I,"vue-flow__edge")))return!0;if(!$.value&&!G&&!q.value&&!g.value&&!x.value||L.value||X.value&&!ge||!g.value&&I.type==="dblclick"||ve(I,O.value)&&ge||ve(I,R.value)&&(!ge||q.value&&ge&&!z.value)||!x.value&&I.ctrlKey&&ge||!G&&!q.value&&!oe&&ge)return!1;if(!x&&I.type==="touchstart"&&((B=I.touches)==null?void 0:B.length)>1)return I.preventDefault(),!1;if(!$.value&&(I.type==="mousedown"||I.type==="touchstart")||le.value&&Array.isArray(f.value)&&f.value.includes(0)&&Q===0||Array.isArray(f.value)&&!f.value.includes(Q)&&(I.type==="mousedown"||I.type==="touchstart"))return!1;const _e=Array.isArray(f.value)&&f.value.includes(Q)||l.value===!0&&Array.isArray(f.value)&&!f.value.includes(0)||!Q||Q<=1;return(!I.ctrlKey||H.value||ge)&&_e}),xe([L,$],()=>{L.value&&!ne.value?S.on("zoom",null):L.value||S.on("zoom",I=>{j.value={x:I.transform.x,y:I.transform.y,zoom:I.transform.k};const B=pe(I.transform);k=Z($.value,F??0),D.viewportChange(B),D.move({event:I,flowTransform:B})})},{immediate:!0}),xe([L,q,c,z,x,w,O],()=>{q.value&&!z.value&&!L.value?A.on("wheel.zoom",I=>{if(ve(I,O.value))return!1;const B=z.value||E.value,G=x.value&&I.ctrlKey;if(!(!w.value||q.value||B||G))return!1;I.preventDefault(),I.stopImmediatePropagation();const Q=A.property("__zoom").k||1,ge=ci();if(!H.value&&I.ctrlKey&&x.value&&ge){const Je=Gt(I),wt=Tl(I),Ei=Q*2**wt;S.scaleTo(A,Ei,Je,I);return}const _e=I.deltaMode===1?20:1;let Ae=c.value===ii.Vertical?0:I.deltaX*_e,Re=c.value===ii.Horizontal?0:I.deltaY*_e;!ge&&I.shiftKey&&c.value!==ii.Vertical&&!Ae&&Re&&(Ae=Re,Re=0),S.translateBy(A,-(Ae/Q)*d.value,-(Re/Q)*d.value);const ze=pe(A.property("__zoom"));C&&clearTimeout(C),h.value?(D.move({event:I,flowTransform:ze}),D.viewportChange(ze),C=setTimeout(()=>{D.moveEnd({event:I,flowTransform:ze}),D.viewportChangeEnd(ze),h.value=!1},150)):(h.value=!0,D.moveStart({event:I,flowTransform:ze}),D.viewportChangeStart(ze))},{passive:!1}):typeof N<"u"&&A.on("wheel.zoom",function(I,B){const G=!w.value&&I.type==="wheel"&&!I.ctrlKey,oe=z.value||E.value,Q=x.value&&I.ctrlKey;if(!oe&&!u.value&&!Q&&I.type==="wheel"||G||ve(I,O.value))return null;I.preventDefault(),N.call(this,I,B)},{passive:!1})},{immediate:!0})});function Z(be,y){return y===2&&Array.isArray(be)&&be.includes(2)}function te(be,y){return be.x!==y.x&&!Number.isNaN(y.x)||be.y!==y.y&&!Number.isNaN(y.y)||be.zoom!==y.k&&!Number.isNaN(y.k)}function pe(be){return{x:be.x,y:be.y,zoom:be.k}}function ve(be,y){return be.target.closest("."+y)}return(be,y)=>(se(),he("div",{ref_key:"viewportRef",ref:ie,class:"vue-flow__viewport vue-flow__container"},[Ne(fw,{"is-selecting":ue.value,"selection-key-pressed":ce(W),class:Be({connecting:X.value,dragging:ce(K),draggable:ce(f)===!0||Array.isArray(ce(f))&&ce(f).includes(0)})},{default:wn(()=>[Ne(gw,null,{default:wn(()=>[yt(be.$slots,"default")]),_:3})]),_:3},8,["is-selecting","selection-key-pressed","class"])],512))}})),mw=["id"],yw=["id"],_w=["id"],ww={name:"A11yDescriptions",compatConfig:{MODE:3}},bw=Fe(re({},ww,{setup(e){const t=ke(),n=t.id,o=t.disableKeyboardA11y,i=t.ariaLiveMessage;return(r,s)=>(se(),he($e,null,[ee("div",{id:ce(Cd)+"-"+ce(n),style:{display:"none"}}," Press enter or space to select a node. "+me(ce(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,mw),ee("div",{id:ce(Nd)+"-"+ce(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,yw),ce(o)?Se("",!0):(se(),he("div",{key:0,id:ce(H_)+"-"+ce(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%)"}},me(ce(i)),9,_w))],64))}}));function Sw(){const e=ke();xe(()=>e.viewportHelper.value.viewportInitialized,t=>{t&&setTimeout(()=>{e.emits.init(e),e.emits.paneReady(e)},1)})}function Ew(e,t,n){return n===fe.Left?e-t:n===fe.Right?e+t:e}function xw(e,t,n){return n===fe.Top?e-t:n===fe.Bottom?e+t:e}const Wl=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?fe.Top:a,c=t.type;return Ie("circle",{class:"vue-flow__edgeupdater vue-flow__edgeupdater-"+c,cx:Ew(r,o,u),cy:xw(l,o,u),r:o,stroke:"transparent",fill:"transparent"})};Wl.props=["radius","centerX","centerY","position","type"],Wl.compatConfig={MODE:3};const Ef=Wl,Aw=Fe({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,g=t.isValidConnection,x=t.multiSelectionActive,E=t.disableKeyboardA11y,w=t.elementsSelectable,O=t.edgesUpdatable,R=t.edgesFocusable,D=t.hooks,_=de(()=>d(e.id)),L=p1(_.value,s),K=L.emit,Y=L.on,V=mt(kr),U=En(),j=Ce(!1),ie=Ce(!1),J=Ce(""),ne=Ce(null),h=Ce("source"),C=Ce(null),k=De(()=>typeof _.value.selectable>"u"?w.value:_.value.selectable),F=De(()=>typeof _.value.updatable>"u"?O.value:_.value.updatable),T=De(()=>typeof _.value.focusable>"u"?R.value:_.value.focusable);bn(f1,e.id),bn(h1,C);const H=de(()=>_.value.class instanceof Function?_.value.class(_.value):_.value.class),W=de(()=>_.value.style instanceof Function?_.value.style(_.value):_.value.style),z=de(()=>{var N;const b=_.value.type||"default",M=V?.["edge-"+b];if(M)return M;let P=(N=_.value.template)!=null?N:u.value[b];if(typeof P=="string"&&U){const I=Object.keys(U.appContext.components);I&&I.includes(b)&&(P=Wt(b,!1))}return P&&typeof P!="string"?P:(s.error(new Ze(Ke.EDGE_TYPE_MISSING,P)),!1)}),$=cf({nodeId:J,handleId:ne,type:h,isValidConnection:g,edgeUpdaterType:h,onEdgeUpdate:X,onEdgeUpdateEnd:Z}),q=$.handlePointerDown;return()=>{var N;const b=f(_.value.source),M=f(_.value.target),P="pathOptions"in _.value?_.value.pathOptions:{};if(!b&&!M)return s.error(new Ze(Ke.EDGE_SOURCE_TARGET_MISSING,_.value.id,_.value.source,_.value.target)),null;if(!b)return s.error(new Ze(Ke.EDGE_SOURCE_MISSING,_.value.id,_.value.source)),null;if(!M)return s.error(new Ze(Ke.EDGE_TARGET_MISSING,_.value.id,_.value.target)),null;if(!_.value||_.value.hidden||b.hidden||M.hidden)return null;let I;i.value===xn.Strict?I=b.handleBounds.source:I=[...b.handleBounds.source||[],...b.handleBounds.target||[]];const B=qd(I,_.value.sourceHandle);let G;i.value===xn.Strict?G=M.handleBounds.target:G=[...M.handleBounds.target||[],...M.handleBounds.source||[]];const oe=qd(G,_.value.targetHandle),Q=B?.position||fe.Bottom,ge=oe?.position||fe.Top,_e=yo(b,B,Q),Ae=_e.x,Re=_e.y,ze=yo(M,oe,ge),Je=ze.x,wt=ze.y;return _.value.sourceX=Ae,_.value.sourceY=Re,_.value.targetX=Je,_.value.targetY=wt,Ie("g",re({ref:C,key:e.id,"data-id":e.id,class:["vue-flow__edge","vue-flow__edge-"+(z.value===!1?"default":_.value.type||"default"),a.value,H.value,{updating:j.value,selected:_.value.selected,animated:_.value.animated,inactive:!k.value&&!D.value.edgeClick.hasListeners()}],tabIndex:T.value?0:void 0,"aria-label":_.value.ariaLabel===null?void 0:(N=_.value.ariaLabel)!=null?N:"Edge from "+_.value.source+" to "+_.value.target,"aria-describedby":T.value?Nd+"-"+n:void 0,"aria-roledescription":"edge",role:T.value?"group":"img"},_.value.domAttributes,{onClick:pe,onContextmenu:ve,onDblclick:be,onMouseenter:y,onMousemove:v,onMouseleave:p,onKeyDown:T.value?A:void 0}),[ie.value?null:Ie(z.value===!1?u.value.default:z.value,re({id:e.id,sourceNode:b,targetNode:M,source:_.value.source,target:_.value.target,type:_.value.type,updatable:F.value,selected:_.value.selected,animated:_.value.animated,label:_.value.label,labelStyle:_.value.labelStyle,labelShowBg:_.value.labelShowBg,labelBgStyle:_.value.labelBgStyle,labelBgPadding:_.value.labelBgPadding,labelBgBorderRadius:_.value.labelBgBorderRadius,data:_.value.data,events:re({},_.value.events,Y),style:W.value,markerStart:"url('#"+ui(_.value.markerStart,n)+"')",markerEnd:"url('#"+ui(_.value.markerEnd,n)+"')",sourcePosition:Q,targetPosition:ge,sourceX:Ae,sourceY:Re,targetX:Je,targetY:wt,sourceHandleId:_.value.sourceHandle,targetHandleId:_.value.targetHandle,interactionWidth:_.value.interactionWidth},P)),[F.value==="source"||F.value===!0?[Ie("g",{onMousedown:m,onMouseenter:le,onMouseout:ue},Ie(Ef,{position:Q,centerX:Ae,centerY:Re,radius:r.value,type:"source","data-type":"source"}))]:null,F.value==="target"||F.value===!0?[Ie("g",{onMousedown:S,onMouseenter:le,onMouseout:ue},Ie(Ef,{position:ge,centerX:Je,centerY:wt,radius:r.value,type:"target","data-type":"target"}))]:null]])};function le(){j.value=!0}function ue(){j.value=!1}function X(N,b){K.update({event:N,edge:_.value,connection:b})}function Z(N){K.updateEnd({event:N,edge:_.value}),ie.value=!1}function te(N,b){var M;N.button===0&&(ie.value=!0,J.value=b?_.value.target:_.value.source,ne.value=(M=b?_.value.targetHandle:_.value.sourceHandle)!=null?M:null,h.value=b?"target":"source",K.updateStart({event:N,edge:_.value}),q(N))}function pe(N){var b;const M={event:N,edge:_.value};k.value&&(l.value=!1,_.value.selected&&x.value?(c([_.value]),(b=C.value)==null||b.blur()):o([_.value])),K.click(M)}function ve(N){K.contextMenu({event:N,edge:_.value})}function be(N){K.doubleClick({event:N,edge:_.value})}function y(N){K.mouseEnter({event:N,edge:_.value})}function v(N){K.mouseMove({event:N,edge:_.value})}function p(N){K.mouseLeave({event:N,edge:_.value})}function m(N){te(N,!0)}function S(N){te(N,!1)}function A(N){var b;!E.value&&Td.includes(N.key)&&k.value&&(N.key==="Escape"?((b=C.value)==null||b.blur(),c([d(e.id)])):o([d(e.id)]))}}}),Ow=Aw,Cw=Fe({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,g=(e=mt(kr))==null?void 0:e["connection-line"],x=de(()=>{var D;return f((D=i.value)==null?void 0:D.nodeId)}),E=de(()=>{var D,_;return(D=f((_=r.value)==null?void 0:_.nodeId))!=null?D:null}),w=de(()=>({x:(s.value.x-d.value.x)/d.value.zoom,y:(s.value.y-d.value.y)/d.value.zoom})),O=de(()=>u.value.markerStart?"url(#"+ui(u.value.markerStart,n)+")":""),R=de(()=>u.value.markerEnd?"url(#"+ui(u.value.markerEnd,n)+")":"");return()=>{var D,_,L,K,Y,V,U,j,ie;if(!x.value||!i.value)return null;const J=i.value.id,ne=i.value.type,h=x.value.handleBounds;let C=(D=h?.[ne])!=null?D:[];if(o.value===xn.Loose){var k;const v=(k=h?.[ne==="source"?"target":"source"])!=null?k:[];C=[...C,...v]}if(!C)return null;const F=(_=J?C.find(v=>v.id===J):C[0])!=null?_:null,T=(L=F?.position)!=null?L:fe.Top,H=yo(x.value,F,T),W=H.x,z=H.y;let $=null;if(E.value)if(o.value===xn.Strict)$=((U=E.value.handleBounds[ne==="source"?"target":"source"])==null?void 0:U.find(v=>{var p;return v.id===((p=r.value)==null?void 0:p.id)}))||null;else{var q,le;$=((j=[...(q=E.value.handleBounds.source)!=null?q:[],...(le=E.value.handleBounds.target)!=null?le:[]])==null?void 0:j.find(v=>{var p;return v.id===((p=r.value)==null?void 0:p.id)}))||null}const ue=(K=(ie=r.value)==null?void 0:ie.position)!=null?K:T?kl[T]:null;if(!T||!ue)return null;const X=(Y=(V=l.value)!=null?V:u.value.type)!=null?Y:Vn.Bezier;let Z="";const te={sourceX:W,sourceY:z,sourcePosition:T,targetX:w.value.x,targetY:w.value.y,targetPosition:ue};if(X===Vn.Bezier){var pe=mf(te);Z=pe[0]}else if(X===Vn.Step){var ve=Vr(re({},te,{borderRadius:0}));Z=ve[0]}else if(X===Vn.SmoothStep){var be=Vr(te);Z=be[0]}else if(X===Vn.SimpleBezier){var y=_f(te);Z=y[0]}else Z="M"+W+","+z+" "+w.value.x+","+w.value.y;return Ie("svg",{class:"vue-flow__edges vue-flow__connectionline vue-flow__container"},Ie("g",{class:"vue-flow__connection"},g?Ie(g,{sourceX:W,sourceY:z,sourcePosition:T,targetX:w.value.x,targetY:w.value.y,targetPosition:ue,sourceNode:x.value,sourceHandle:F,targetNode:E.value,targetHandle:$,markerEnd:R.value,markerStart:O.value,connectionStatus:c.value}):Ie("path",{d:Z,class:[u.value.class,c.value,"vue-flow__connection-path"],style:re({},a.value,u.value.style),"marker-end":R.value,"marker-start":O.value})))}}}),Nw=Cw,Tw=["id","markerWidth","markerHeight","markerUnits","orient"],Mw={name:"MarkerType",compatConfig:{MODE:3}},Iw=Fe(re({},Mw,{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(),he("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===ce(Ol).ArrowClosed?(se(),he("polyline",{key:0,style:Ue({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)):Se("",!0),t.type===ce(Ol).Arrow?(se(),he("polyline",{key:1,style:Ue({stroke:t.color,strokeWidth:t.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",fill:"none",points:"-5,-4 0,0 -5,4"},null,4)):Se("",!0)],8,Tw))}})),Pw={class:"vue-flow__marker vue-flow__container","aria-hidden":"true"},Rw={name:"MarkerDefinitions",compatConfig:{MODE:3}},Dw=Fe(re({},Rw,{setup(e){const t=ke(),n=t.id,o=t.edges,i=t.connectionLineOptions,r=t.defaultMarkerColor,s=de(()=>{const l=new Set,a=[],u=c=>{if(c){const d=ui(c,n);l.has(d)||(typeof c=="object"?a.push(re({},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(),he("svg",Pw,[ee("defs",null,[(se(!0),he($e,null,to(s.value,u=>(se(),qe(Iw,{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))])]))}})),kw={name:"Edges",compatConfig:{MODE:3}},$w=Fe(re({},kw,{setup(e){const t=ke(),n=t.findNode,o=t.getEdges,i=t.elevateEdgesOnSelect;return(r,s)=>(se(),he($e,null,[Ne(Dw),(se(!0),he($e,null,to(ce(o),l=>(se(),he("svg",{key:l.id,class:"vue-flow__edges vue-flow__container",style:Ue({zIndex:ce(e1)(l,ce(n),ce(i))})},[Ne(ce(Ow),{id:l.id},null,8,["id"])],4))),128)),Ne(ce(Nw))],64))}})),Fw=Fe({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,g=t.nodeExtent,x=t.elevateNodesOnSelect,E=t.disableKeyboardA11y,w=t.ariaLiveMessage,O=t.snapToGrid,R=t.snapGrid,D=t.nodeDragThreshold,_=t.nodesDraggable,L=t.elementsSelectable,K=t.nodesConnectable,Y=t.nodesFocusable,V=t.hooks,U=Ce(null);bn(af,U),bn(lf,e.id);const j=mt(kr),ie=En(),J=ff(),ne=df(e.id),h=ne.node,C=ne.parentNode,k=_1(h,l),F=k.emit,T=k.on,H=De(()=>typeof h.draggable>"u"?_.value:h.draggable),W=De(()=>typeof h.selectable>"u"?L.value:h.selectable),z=De(()=>typeof h.connectable>"u"?K.value:h.connectable),$=De(()=>typeof h.focusable>"u"?Y.value:h.focusable),q=de(()=>W.value||H.value||V.value.nodeClick.hasListeners()||V.value.nodeDoubleClick.hasListeners()||V.value.nodeMouseEnter.hasListeners()||V.value.nodeMouseMove.hasListeners()||V.value.nodeMouseLeave.hasListeners()),le=De(()=>!!h.dimensions.width&&!!h.dimensions.height),ue=de(()=>{const b=h.type||"default",M=j?.["node-"+b];if(M)return M;let P=h.template||f.value[b];if(typeof P=="string"&&ie){const I=Object.keys(ie.appContext.components);I&&I.includes(b)&&(P=Wt(b,!1))}return P&&typeof P!="string"?P:(l.error(new Ze(Ke.NODE_TYPE_MISSING,P)),!1)}),X=uf({id:e.id,el:U,disabled:()=>!H.value,selectable:W,dragHandle:()=>h.dragHandle,onStart(b){F.dragStart(b)},onDrag(b){F.drag(b)},onStop(b){F.dragStop(b)},onClick(b){A(b)}}),Z=de(()=>h.class instanceof Function?h.class(h):h.class),te=de(()=>{const b=(h.style instanceof Function?h.style(h):h.style)||{},M=h.width instanceof Function?h.width(h):h.width,P=h.height instanceof Function?h.height(h):h.height;return!b.width&&M&&(b.width=typeof M=="string"?M:M+"px"),!b.height&&P&&(b.height=typeof P=="string"?P:P+"px"),b}),pe=De(()=>{var b,M;return Number((b=(M=h.zIndex)!=null?M:te.value.zIndex)!=null?b:0)});return d(b=>{(b.includes(e.id)||!b.length)&&be()}),Ct(()=>{xe(()=>h.hidden,function(b,M,P){b===void 0&&(b=!1),!b&&U.value&&(e.resizeObserver.observe(U.value),P(()=>{U.value&&e.resizeObserver.unobserve(U.value)}))},{immediate:!0,flush:"post"})}),xe([()=>h.type,()=>h.sourcePosition,()=>h.targetPosition],()=>{Ht(()=>{c([{id:e.id,nodeElement:U.value,forceUpdate:!0}])})}),xe([()=>h.position.x,()=>h.position.y,()=>{var b;return(b=C.value)==null?void 0:b.computedPosition.x},()=>{var b;return(b=C.value)==null?void 0:b.computedPosition.y},()=>{var b;return(b=C.value)==null?void 0:b.computedPosition.z},pe,()=>h.selected,()=>h.dimensions.height,()=>h.dimensions.width,()=>{var b;return(b=C.value)==null?void 0:b.dimensions.height},()=>{var b;return(b=C.value)==null?void 0:b.dimensions.width}],b=>{let M=b[0],P=b[1],I=b[2],B=b[3],G=b[4],oe=b[5];const Q={x:M,y:P,z:oe+(x.value&&h.selected?1e3:0)};typeof I<"u"&&typeof B<"u"?h.computedPosition=X_({x:I,y:B,z:G},Q):h.computedPosition=Q},{flush:"post",immediate:!0}),xe([()=>h.extent,g],(b,M)=>{let P=b[0],I=b[1],B=M[0],G=M[1];(P!==B||I!==G)&&ve()}),h.extent==="parent"||typeof h.extent=="object"&&"range"in h.extent&&h.extent.range==="parent"?il(()=>le).toBe(!0).then(ve):ve(),()=>{var b,M;return h.hidden?null:Ie("div",re({ref:U,"data-id":h.id,class:["vue-flow__node","vue-flow__node-"+(ue.value===!1?"default":h.type||"default"),{[o.value]:H.value,dragging:X?.value,draggable:H.value,selected:h.selected,selectable:W.value,parent:h.isParent},Z.value],style:re({visibility:le.value?"visible":"hidden",zIndex:(b=h.computedPosition.z)!=null?b:pe.value,transform:"translate("+h.computedPosition.x+"px,"+h.computedPosition.y+"px)",pointerEvents:q.value?"all":"none"},te.value),tabIndex:$.value?0:void 0,role:$.value?"group":void 0,"aria-describedby":E.value?void 0:Cd+"-"+n,"aria-label":h.ariaLabel,"aria-roledescription":"node"},h.domAttributes,{onMouseenter:y,onMousemove:v,onMouseleave:p,onContextmenu:m,onClick:A,onDblclick:S,onKeydown:N}),[Ie(ue.value===!1?f.value.default:ue.value,{id:h.id,type:h.type,data:h.data,events:re({},h.events,T),selected:h.selected,resizing:h.resizing,dragging:X.value,connectable:z.value,position:h.computedPosition,dimensions:h.dimensions,isValidTargetPos:h.isValidTargetPos,isValidSourcePos:h.isValidSourcePos,parent:h.parentNode,parentNodeId:h.parentNode,zIndex:(M=h.computedPosition.z)!=null?M:pe.value,targetPosition:h.targetPosition,sourcePosition:h.sourcePosition,label:h.label,dragHandle:h.dragHandle,onUpdateNodeInternals:be})])};function ve(){const b=h.computedPosition,M=Pl(h,O.value?Dr(b,R.value):b,l.error,g.value,C.value),P=M.computedPosition,I=M.position;(h.computedPosition.x!==P.x||h.computedPosition.y!==P.y)&&(h.computedPosition=re({},h.computedPosition,P)),(h.position.x!==I.x||h.position.y!==I.y)&&(h.position=I)}function be(){U.value&&c([{id:e.id,nodeElement:U.value,forceUpdate:!0}])}function y(b){X?.value||F.mouseEnter({event:b,node:h})}function v(b){X?.value||F.mouseMove({event:b,node:h})}function p(b){X?.value||F.mouseLeave({event:b,node:h})}function m(b){return F.contextMenu({event:b,node:h})}function S(b){return F.doubleClick({event:b,node:h})}function A(b){W.value&&(!i.value||!H.value||D.value>0)&&$l(h,s.value,u,a,r,!1,U.value),F.click({event:b,node:h})}function N(b){if(!(Cl(b)||E.value))if(Td.includes(b.key)&&W.value){const M=b.key==="Escape";$l(h,s.value,u,a,r,M,U.value)}else H.value&&h.selected&&vo[b.key]&&(b.preventDefault(),w.value="Moved selected node "+b.key.replace("Arrow","").toLowerCase()+". New position, x: "+~~h.position.x+", y: "+~~h.position.y,J({x:vo[b.key].x,y:vo[b.key].y},b.shiftKey))}}}),Lw=Fw,Hw={height:"0",width:"0"},Ww={name:"EdgeLabelRenderer",compatConfig:{MODE:3}},zw=Fe(re({},Ww,{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(),he("svg",null,[(se(),he("foreignObject",Hw,[(se(),qe(Sg,{to:o.value,disabled:!o.value},[yt(i.$slots,"default")],8,["to","disabled"]))]))]))}}));function Bw(e){e===void 0&&(e={includeHiddenNodes:!1});const t=ke(),n=t.nodes;return de(()=>{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 Vw={class:"vue-flow__nodes vue-flow__container"},Gw={name:"Nodes",compatConfig:{MODE:3}},Kw=Fe(re({},Gw,{setup(e){const t=ke(),n=t.getNodes,o=t.updateNodeDimensions,i=t.emits,r=Bw(),s=Ce();return xe(r,l=>{l&&Ht(()=>{i.nodesInitialized(n.value)})},{immediate:!0}),Ct(()=>{s.value=new ResizeObserver(l=>{const a=l.map(u=>({id:u.target.getAttribute("data-id"),nodeElement:u.target,forceUpdate:!0}));Ht(()=>o(a))})}),Rs(()=>{var l;return(l=s.value)==null?void 0:l.disconnect()}),(l,a)=>(se(),he("div",Vw,[s.value?(se(!0),he($e,{key:0},to(ce(n),(u,c,d,f)=>{const g=[u.id];if(f&&f.key===u.id&&yp(f,g))return f;const x=(se(),qe(ce(Lw),{id:u.id,key:u.id,"resize-observer":s.value},null,8,["id","resize-observer"]));return x.memo=g,x},a,0),128)):Se("",!0)]))}}));function Yw(){const e=ke(),t=e.emits;Ct(()=>{if(ef()){const n=document.querySelector(".vue-flow__pane");n&&window.getComputedStyle(n).zIndex!=="1"&&t.error(new Ze(Ke.MISSING_STYLES))}})}const Uw=ee("div",{class:"vue-flow__edge-labels"},null,-1),Xw={name:"VueFlow",compatConfig:{MODE:3}},qw=Fe(re({},Xw,{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=Eu(),s=rl(i,"modelValue",o),l=rl(i,"nodes",o),a=rl(i,"edges",o),u=ke(i),c=E1({modelValue:s,nodes:l,edges:a},i,u);return A1(o,u.hooks),Sw(),Yw(),bn(kr,r),ji(c),n(u),(d,f)=>(se(),he("div",{ref:ce(u).vueFlowRef,class:"vue-flow"},[Ne(vw,null,{default:wn(()=>[Ne($w),Uw,Ne(Kw),yt(d.$slots,"zoom-pane")]),_:3}),yt(d.$slots,"default"),Ne(bw)],512))}})),Zw={name:"Panel",compatConfig:{MODE:3}},xf=Fe(re({},Zw,{props:{position:{}},setup(e){const t=e,n=ke(),o=n.userSelectionActive,i=de(()=>(""+t.position).split("-"));return(r,s)=>(se(),he("div",{class:Be(["vue-flow__panel",i.value]),style:Ue({pointerEvents:ce(o)?"none":"all"})},[yt(r.$slots,"default")],6))}}));var an=(e=>(e.Lines="lines",e.Dots="dots",e))(an||{});const Af=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]})},Of=function(t){let n=t.radius,o=t.color;return Ie("circle",{cx:n,cy:n,r:n,fill:o})};an.Lines+"",an.Dots+"";const jw={[an.Dots]:"#81818a",[an.Lines]:"#eee"},Jw=["id","x","y","width","height","patternTransform"],Qw={key:2,height:"100",width:"100"},eb=["fill"],tb=["x","y","fill"],nb={name:"Background",compatConfig:{MODE:3}},ob=Fe(re({},nb,{props:{id:{},variant:{default:()=>an.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=de(()=>{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,g=Array.isArray(e.offset)?e.offset:[e.offset,e.offset],x=g[0],E=g[1],w=[x*l||1+d[0]/2,E*l||1+d[1]/2];return{scaledGap:d,offset:w,size:f}}),r=De(()=>"pattern-"+n+(e.id?"-"+e.id:"")),s=De(()=>e.color||e.patternColor||jw[e.variant||an.Dots]);return(l,a)=>(se(),he("svg",{class:"vue-flow__background vue-flow__container",style:Ue({height:(l.height>100?100:l.height)+"%",width:(l.width>100?100:l.width)+"%"})},[yt(l.$slots,"pattern-container",{id:r.value},()=>[ee("pattern",{id:r.value,x:ce(o).x%i.value.scaledGap[0],y:ce(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"},[yt(l.$slots,"pattern",{},()=>[l.variant===ce(an).Lines?(se(),qe(ce(Af),{key:0,size:l.lineWidth,color:s.value,dimensions:i.value.scaledGap},null,8,["size","color","dimensions"])):l.variant===ce(an).Dots?(se(),qe(ce(Of),{key:1,color:s.value,radius:i.value.size/2},null,8,["color","radius"])):Se("",!0),l.bgColor?(se(),he("svg",Qw,[ee("rect",{width:"100%",height:"100%",fill:l.bgColor},null,8,eb)])):Se("",!0)])],8,Jw)]),ee("rect",{x:l.x,y:l.y,width:"100%",height:"100%",fill:"url(#"+r.value+")"},null,8,tb),yt(l.$slots,"default",{id:r.value})],4))}}));var ib={value:()=>{}};function zl(){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 Gr(n)}function Gr(e){this._=e}function rb(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}})}Gr.prototype=zl.prototype={constructor:Gr,on:function(t,n){var o=this._,i=rb(t+"",o),r,s=-1,l=i.length;if(arguments.length<2){for(;++s<l;)if((r=(t=i[s]).type)&&(r=sb(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]=Cf(o[r],t.name,n);else if(n==null)for(r in o)o[r]=Cf(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 Gr(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 sb(e,t){for(var n=0,o=e.length,i;n<o;++n)if((i=e[n]).name===t)return i.value}function Cf(e,t,n){for(var o=0,i=e.length;o<i;++o)if(e[o].name===t){e[o]=ib,e=e.slice(0,o).concat(e.slice(o+1));break}return n!=null&&e.push({name:t,value:n}),e}var Bl="http://www.w3.org/1999/xhtml";const Nf={svg:"http://www.w3.org/2000/svg",xhtml:Bl,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Kr(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Nf.hasOwnProperty(t)?{space:Nf[t],local:e}:e}function lb(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Bl&&t.documentElement.namespaceURI===Bl?t.createElement(e):t.createElementNS(n,e)}}function ab(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Tf(e){var t=Kr(e);return(t.local?ab:lb)(t)}function ub(){}function Vl(e){return e==null?ub:function(){return this.querySelector(e)}}function cb(e){typeof e!="function"&&(e=Vl(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 db(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function fb(){return[]}function Mf(e){return e==null?fb:function(){return this.querySelectorAll(e)}}function hb(e){return function(){return db(e.apply(this,arguments))}}function gb(e){typeof e=="function"?e=hb(e):e=Mf(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 If(e){return function(){return this.matches(e)}}function Pf(e){return function(t){return t.matches(e)}}var pb=Array.prototype.find;function vb(e){return function(){return pb.call(this.children,e)}}function mb(){return this.firstElementChild}function yb(e){return this.select(e==null?mb:vb(typeof e=="function"?e:Pf(e)))}var _b=Array.prototype.filter;function wb(){return Array.from(this.children)}function bb(e){return function(){return _b.call(this.children,e)}}function Sb(e){return this.selectAll(e==null?wb:bb(typeof e=="function"?e:Pf(e)))}function Eb(e){typeof e!="function"&&(e=If(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 Rf(e){return new Array(e.length)}function xb(){return new pt(this._enter||this._groups.map(Rf),this._parents)}function Yr(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Yr.prototype={constructor:Yr,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 Ab(e){return function(){return e}}function Ob(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 Yr(e,r[s]);for(;s<a;++s)(l=t[s])&&(i[s]=l)}function Cb(e,t,n,o,i,r,s){var l,a,u=new Map,c=t.length,d=r.length,f=new Array(c),g;for(l=0;l<c;++l)(a=t[l])&&(f[l]=g=s.call(a,a.__data__,l,t)+"",u.has(g)?i[l]=a:u.set(g,a));for(l=0;l<d;++l)g=s.call(e,r[l],l,r)+"",(a=u.get(g))?(o[l]=a,a.__data__=r[l],u.delete(g)):n[l]=new Yr(e,r[l]);for(l=0;l<c;++l)(a=t[l])&&u.get(f[l])===a&&(i[l]=a)}function Nb(e){return e.__data__}function Tb(e,t){if(!arguments.length)return Array.from(this,Nb);var n=t?Cb:Ob,o=this._parents,i=this._groups;typeof e!="function"&&(e=Ab(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,g=Mb(e.call(c,c&&c.__data__,u,o)),x=g.length,E=l[u]=new Array(x),w=s[u]=new Array(x),O=a[u]=new Array(f);n(c,d,E,w,O,g,t);for(var R=0,D=0,_,L;R<x;++R)if(_=E[R]){for(R>=D&&(D=R+1);!(L=w[D])&&++D<x;);_._next=L||null}}return s=new pt(s,o),s._enter=l,s._exit=a,s}function Mb(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Ib(){return new pt(this._exit||this._groups.map(Rf),this._parents)}function Pb(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 Rb(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),g,x=0;x<d;++x)(g=u[x]||c[x])&&(f[x]=g);for(;a<i;++a)l[a]=n[a];return new pt(l,this._parents)}function Db(){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 kb(e){e||(e=$b);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 $b(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Fb(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Lb(){return Array.from(this)}function Hb(){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 Wb(){let e=0;for(const t of this)++e;return e}function zb(){return!this.node()}function Bb(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 Vb(e){return function(){this.removeAttribute(e)}}function Gb(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Kb(e,t){return function(){this.setAttribute(e,t)}}function Yb(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Ub(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Xb(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 qb(e,t){var n=Kr(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?Gb:Vb:typeof t=="function"?n.local?Xb:Ub:n.local?Yb:Kb)(n,t))}function Df(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Zb(e){return function(){this.style.removeProperty(e)}}function jb(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Jb(e,t,n){return function(){var o=t.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function Qb(e,t,n){return arguments.length>1?this.each((t==null?Zb:typeof t=="function"?Jb:jb)(e,t,n??"")):_o(this.node(),e)}function _o(e,t){return e.style.getPropertyValue(t)||Df(e).getComputedStyle(e,null).getPropertyValue(t)}function eS(e){return function(){delete this[e]}}function tS(e,t){return function(){this[e]=t}}function nS(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function oS(e,t){return arguments.length>1?this.each((t==null?eS:typeof t=="function"?nS:tS)(e,t)):this.node()[e]}function kf(e){return e.trim().split(/^|\s+/)}function Gl(e){return e.classList||new $f(e)}function $f(e){this._node=e,this._names=kf(e.getAttribute("class")||"")}$f.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 Ff(e,t){for(var n=Gl(e),o=-1,i=t.length;++o<i;)n.add(t[o])}function Lf(e,t){for(var n=Gl(e),o=-1,i=t.length;++o<i;)n.remove(t[o])}function iS(e){return function(){Ff(this,e)}}function rS(e){return function(){Lf(this,e)}}function sS(e,t){return function(){(t.apply(this,arguments)?Ff:Lf)(this,e)}}function lS(e,t){var n=kf(e+"");if(arguments.length<2){for(var o=Gl(this.node()),i=-1,r=n.length;++i<r;)if(!o.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?sS:t?iS:rS)(n,t))}function aS(){this.textContent=""}function uS(e){return function(){this.textContent=e}}function cS(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function dS(e){return arguments.length?this.each(e==null?aS:(typeof e=="function"?cS:uS)(e)):this.node().textContent}function fS(){this.innerHTML=""}function hS(e){return function(){this.innerHTML=e}}function gS(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function pS(e){return arguments.length?this.each(e==null?fS:(typeof e=="function"?gS:hS)(e)):this.node().innerHTML}function vS(){this.nextSibling&&this.parentNode.appendChild(this)}function mS(){return this.each(vS)}function yS(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function _S(){return this.each(yS)}function wS(e){var t=typeof e=="function"?e:Tf(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function bS(){return null}function SS(e,t){var n=typeof e=="function"?e:Tf(e),o=t==null?bS:typeof t=="function"?t:Vl(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function ES(){var e=this.parentNode;e&&e.removeChild(this)}function xS(){return this.each(ES)}function AS(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function OS(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function CS(e){return this.select(e?OS:AS)}function NS(e){return arguments.length?this.property("__data__",e):this.node().__data__}function TS(e){return function(t){e.call(this,t,this.__data__)}}function MS(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 IS(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 PS(e,t,n){return function(){var o=this.__on,i,r=TS(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 RS(e,t,n){var o=MS(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?PS:IS,i=0;i<r;++i)this.each(l(o[i],t,n));return this}function Hf(e,t,n){var o=Df(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 DS(e,t){return function(){return Hf(this,e,t)}}function kS(e,t){return function(){return Hf(this,e,t.apply(this,arguments))}}function $S(e,t){return this.each((typeof t=="function"?kS:DS)(e,t))}function*FS(){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 Wf=[null];function pt(e,t){this._groups=e,this._parents=t}function hi(){return new pt([[document.documentElement]],Wf)}function LS(){return this}pt.prototype=hi.prototype={constructor:pt,select:cb,selectAll:gb,selectChild:yb,selectChildren:Sb,filter:Eb,data:Tb,enter:xb,exit:Ib,join:Pb,merge:Rb,selection:LS,order:Db,sort:kb,call:Fb,nodes:Lb,node:Hb,size:Wb,empty:zb,each:Bb,attr:qb,style:Qb,property:oS,classed:lS,text:dS,html:pS,raise:mS,lower:_S,append:wS,insert:SS,remove:xS,clone:CS,datum:NS,on:RS,dispatch:$S,[Symbol.iterator]:FS};function Tn(e){return typeof e=="string"?new pt([[document.querySelector(e)]],[document.documentElement]):new pt([[e]],Wf)}function HS(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Mn(e,t){if(e=HS(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 Kl={capture:!0,passive:!1};function Yl(e){e.preventDefault(),e.stopImmediatePropagation()}function WS(e){var t=e.document.documentElement,n=Tn(e).on("dragstart.drag",Yl,Kl);"onselectstart"in t?n.on("selectstart.drag",Yl,Kl):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function zS(e,t){var n=e.document.documentElement,o=Tn(e).on("dragstart.drag",null);t&&(o.on("click.drag",Yl,Kl),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 Ul(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function zf(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function gi(){}var pi=.7,Ur=1/pi,wo="\\s*([+-]?\\d+)\\s*",vi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",qt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",BS=/^#([0-9a-f]{3,8})$/,VS=new RegExp("^rgb\\("+wo+","+wo+","+wo+"\\)$"),GS=new RegExp("^rgb\\("+qt+","+qt+","+qt+"\\)$"),KS=new RegExp("^rgba\\("+wo+","+wo+","+wo+","+vi+"\\)$"),YS=new RegExp("^rgba\\("+qt+","+qt+","+qt+","+vi+"\\)$"),US=new RegExp("^hsl\\("+vi+","+qt+","+qt+"\\)$"),XS=new RegExp("^hsla\\("+vi+","+qt+","+qt+","+vi+"\\)$"),Bf={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};Ul(gi,mi,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Vf,formatHex:Vf,formatHex8:qS,formatHsl:ZS,formatRgb:Gf,toString:Gf});function Vf(){return this.rgb().formatHex()}function qS(){return this.rgb().formatHex8()}function ZS(){return qf(this).formatHsl()}function Gf(){return this.rgb().formatRgb()}function mi(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=BS.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Kf(t):n===3?new ut(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Xr(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Xr(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=VS.exec(e))?new ut(t[1],t[2],t[3],1):(t=GS.exec(e))?new ut(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=KS.exec(e))?Xr(t[1],t[2],t[3],t[4]):(t=YS.exec(e))?Xr(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=US.exec(e))?Xf(t[1],t[2]/100,t[3]/100,1):(t=XS.exec(e))?Xf(t[1],t[2]/100,t[3]/100,t[4]):Bf.hasOwnProperty(e)?Kf(Bf[e]):e==="transparent"?new ut(NaN,NaN,NaN,0):null}function Kf(e){return new ut(e>>16&255,e>>8&255,e&255,1)}function Xr(e,t,n,o){return o<=0&&(e=t=n=NaN),new ut(e,t,n,o)}function jS(e){return e instanceof gi||(e=mi(e)),e?(e=e.rgb(),new ut(e.r,e.g,e.b,e.opacity)):new ut}function Xl(e,t,n,o){return arguments.length===1?jS(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}Ul(ut,Xl,zf(gi,{brighter(e){return e=e==null?Ur:Math.pow(Ur,e),new ut(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?pi:Math.pow(pi,e),new ut(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ut(Un(this.r),Un(this.g),Un(this.b),qr(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:Yf,formatHex:Yf,formatHex8:JS,formatRgb:Uf,toString:Uf}));function Yf(){return"#"+Xn(this.r)+Xn(this.g)+Xn(this.b)}function JS(){return"#"+Xn(this.r)+Xn(this.g)+Xn(this.b)+Xn((isNaN(this.opacity)?1:this.opacity)*255)}function Uf(){const e=qr(this.opacity);return(e===1?"rgb(":"rgba(")+Un(this.r)+", "+Un(this.g)+", "+Un(this.b)+(e===1?")":", "+e+")")}function qr(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Un(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Xn(e){return e=Un(e),(e<16?"0":"")+e.toString(16)}function Xf(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Pt(e,t,n,o)}function qf(e){if(e instanceof Pt)return new Pt(e.h,e.s,e.l,e.opacity);if(e instanceof gi||(e=mi(e)),!e)return new Pt;if(e instanceof Pt)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 Pt(s,l,a,e.opacity)}function QS(e,t,n,o){return arguments.length===1?qf(e):new Pt(e,t,n,o??1)}function Pt(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}Ul(Pt,QS,zf(gi,{brighter(e){return e=e==null?Ur:Math.pow(Ur,e),new Pt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?pi:Math.pow(pi,e),new Pt(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(ql(e>=240?e-240:e+120,i,o),ql(e,i,o),ql(e<120?e+240:e-120,i,o),this.opacity)},clamp(){return new Pt(Zf(this.h),Zr(this.s),Zr(this.l),qr(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=qr(this.opacity);return(e===1?"hsl(":"hsla(")+Zf(this.h)+", "+Zr(this.s)*100+"%, "+Zr(this.l)*100+"%"+(e===1?")":", "+e+")")}}));function Zf(e){return e=(e||0)%360,e<0?e+360:e}function Zr(e){return Math.max(0,Math.min(1,e||0))}function ql(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 jf=e=>()=>e;function eE(e,t){return function(n){return e+n*t}}function tE(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 nE(e){return(e=+e)==1?Jf:function(t,n){return n-t?tE(t,n,e):jf(isNaN(t)?n:t)}}function Jf(e,t){var n=t-e;return n?eE(e,n):jf(isNaN(e)?t:e)}const Qf=(function e(t){var n=nE(t);function o(i,r){var s=n((i=Xl(i)).r,(r=Xl(r)).r),l=n(i.g,r.g),a=n(i.b,r.b),u=Jf(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 In(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var Zl=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,jl=new RegExp(Zl.source,"g");function oE(e){return function(){return e}}function iE(e){return function(t){return e(t)+""}}function rE(e,t){var n=Zl.lastIndex=jl.lastIndex=0,o,i,r,s=-1,l=[],a=[];for(e=e+"",t=t+"";(o=Zl.exec(e))&&(i=jl.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:In(o,i)})),n=jl.lastIndex;return n<t.length&&(r=t.slice(n),l[s]?l[s]+=r:l[++s]=r),l.length<2?a[0]?iE(a[0].x):oE(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 eh=180/Math.PI,Jl={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function th(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)*eh,skewX:Math.atan(a)*eh,scaleX:s,scaleY:l}}var jr;function sE(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Jl:th(t.a,t.b,t.c,t.d,t.e,t.f)}function lE(e){return e==null||(jr||(jr=document.createElementNS("http://www.w3.org/2000/svg","g")),jr.setAttribute("transform",e),!(e=jr.transform.baseVal.consolidate()))?Jl:(e=e.matrix,th(e.a,e.b,e.c,e.d,e.e,e.f))}function nh(e,t,n,o){function i(u){return u.length?u.pop()+" ":""}function r(u,c,d,f,g,x){if(u!==d||c!==f){var E=g.push("translate(",null,t,null,n);x.push({i:E-4,x:In(u,d)},{i:E-2,x:In(c,f)})}else(d||f)&&g.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:In(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:In(u,c)}):c&&d.push(i(d)+"skewX("+c+o)}function a(u,c,d,f,g,x){if(u!==d||c!==f){var E=g.push(i(g)+"scale(",null,",",null,")");x.push({i:E-4,x:In(u,d)},{i:E-2,x:In(c,f)})}else(d!==1||f!==1)&&g.push(i(g)+"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(g){for(var x=-1,E=f.length,w;++x<E;)d[(w=f[x]).i]=w.x(g);return d.join("")}}}var aE=nh(sE,"px, ","px)","deg)"),uE=nh(lE,", ",")",")"),cE=1e-12;function oh(e){return((e=Math.exp(e))+1/e)/2}function dE(e){return((e=Math.exp(e))-1/e)/2}function fE(e){return((e=Math.exp(2*e))-1)/(e+1)}const hE=(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],g=c-l,x=d-a,E=g*g+x*x,w,O;if(E<cE)O=Math.log(f/u)/t,w=function(V){return[l+V*g,a+V*x,u*Math.exp(t*V*O)]};else{var R=Math.sqrt(E),D=(f*f-u*u+o*E)/(2*u*n*R),_=(f*f-u*u-o*E)/(2*f*n*R),L=Math.log(Math.sqrt(D*D+1)-D),K=Math.log(Math.sqrt(_*_+1)-_);O=(K-L)/t,w=function(V){var U=V*O,j=oh(L),ie=u/(n*R)*(j*fE(t*U+L)-dE(L));return[l+ie*g,a+ie*x,u*j/oh(t*U+L)]}}return w.duration=O*1e3*t/Math.SQRT2,w}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 bo=0,yi=0,_i=0,ih=1e3,Jr,wi,Qr=0,qn=0,es=0,bi=typeof performance=="object"&&performance.now?performance:Date,rh=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Ql(){return qn||(rh(gE),qn=bi.now()+es)}function gE(){qn=0}function ts(){this._call=this._time=this._next=null}ts.prototype=sh.prototype={constructor:ts,restart:function(t,n,o){if(typeof t!="function")throw new TypeError("callback is not a function");o=(o==null?Ql():+o)+(n==null?0:+n),!this._next&&wi!==this&&(wi?wi._next=this:Jr=this,wi=this),this._call=t,this._time=o,ea()},stop:function(){this._call&&(this._call=null,this._time=1/0,ea())}};function sh(e,t,n){var o=new ts;return o.restart(e,t,n),o}function pE(){Ql(),++bo;for(var e=Jr,t;e;)(t=qn-e._time)>=0&&e._call.call(void 0,t),e=e._next;--bo}function lh(){qn=(Qr=bi.now())+es,bo=yi=0;try{pE()}finally{bo=0,mE(),qn=0}}function vE(){var e=bi.now(),t=e-Qr;t>ih&&(es-=t,Qr=e)}function mE(){for(var e,t=Jr,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:Jr=n);wi=e,ea(o)}function ea(e){if(!bo){yi&&(yi=clearTimeout(yi));var t=e-qn;t>24?(e<1/0&&(yi=setTimeout(lh,e-bi.now()-es)),_i&&(_i=clearInterval(_i))):(_i||(Qr=bi.now(),_i=setInterval(vE,ih)),bo=1,rh(lh))}}function ah(e,t,n){var o=new ts;return t=t==null?0:+t,o.restart(i=>{o.stop(),e(i+t)},t,n),o}var yE=zl("start","end","cancel","interrupt"),_E=[],uh=0,ch=1,ta=2,ns=3,dh=4,na=5,os=6;function is(e,t,n,o,i,r){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;wE(e,n,{name:t,index:o,group:i,on:yE,tween:_E,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:uh})}function oa(e,t){var n=Rt(e,t);if(n.state>uh)throw new Error("too late; already scheduled");return n}function Zt(e,t){var n=Rt(e,t);if(n.state>ns)throw new Error("too late; already running");return n}function Rt(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function wE(e,t,n){var o=e.__transition,i;o[t]=n,n.timer=sh(r,0,n.time);function r(u){n.state=ch,n.timer.restart(s,n.delay,n.time),n.delay<=u&&s(u-n.delay)}function s(u){var c,d,f,g;if(n.state!==ch)return a();for(c in o)if(g=o[c],g.name===n.name){if(g.state===ns)return ah(s);g.state===dh?(g.state=os,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete o[c]):+c<t&&(g.state=os,g.timer.stop(),g.on.call("cancel",e,e.__data__,g.index,g.group),delete o[c])}if(ah(function(){n.state===ns&&(n.state=dh,n.timer.restart(l,n.delay,n.time),l(u))}),n.state=ta,n.on.call("start",e,e.__data__,n.index,n.group),n.state===ta){for(n.state=ns,i=new Array(f=n.tween.length),c=0,d=-1;c<f;++c)(g=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(i[++d]=g);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=na,1),d=-1,f=i.length;++d<f;)i[d].call(e,c);n.state===na&&(n.on.call("end",e,e.__data__,n.index,n.group),a())}function a(){n.state=os,n.timer.stop(),delete o[t];for(var u in o)return;delete e.__transition}}function rs(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>ta&&o.state<na,o.state=os,o.timer.stop(),o.on.call(i?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete n[s]}r&&delete e.__transition}}function bE(e){return this.each(function(){rs(this,e)})}function SE(e,t){var n,o;return function(){var i=Zt(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 EE(e,t,n){var o,i;if(typeof n!="function")throw new Error;return function(){var r=Zt(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 xE(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o=Rt(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?SE:EE)(n,e,t))}function ia(e,t,n){var o=e._id;return e.each(function(){var i=Zt(this,o);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Rt(i,o).value[t]}}function fh(e,t){var n;return(typeof t=="number"?In:t instanceof mi?Qf:(n=mi(t))?(t=n,Qf):rE)(e,t)}function AE(e){return function(){this.removeAttribute(e)}}function OE(e){return function(){this.removeAttributeNS(e.space,e.local)}}function CE(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 NE(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 TE(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 ME(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 IE(e,t){var n=Kr(e),o=n==="transform"?uE:fh;return this.attrTween(e,typeof t=="function"?(n.local?ME:TE)(n,o,ia(this,"attr."+e,t)):t==null?(n.local?OE:AE)(n):(n.local?NE:CE)(n,o,t))}function PE(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function RE(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function DE(e,t){var n,o;function i(){var r=t.apply(this,arguments);return r!==o&&(n=(o=r)&&RE(e,r)),n}return i._value=t,i}function kE(e,t){var n,o;function i(){var r=t.apply(this,arguments);return r!==o&&(n=(o=r)&&PE(e,r)),n}return i._value=t,i}function $E(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=Kr(e);return this.tween(n,(o.local?DE:kE)(o,t))}function FE(e,t){return function(){oa(this,e).delay=+t.apply(this,arguments)}}function LE(e,t){return t=+t,function(){oa(this,e).delay=t}}function HE(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?FE:LE)(t,e)):Rt(this.node(),t).delay}function WE(e,t){return function(){Zt(this,e).duration=+t.apply(this,arguments)}}function zE(e,t){return t=+t,function(){Zt(this,e).duration=t}}function BE(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?WE:zE)(t,e)):Rt(this.node(),t).duration}function VE(e,t){if(typeof t!="function")throw new Error;return function(){Zt(this,e).ease=t}}function GE(e){var t=this._id;return arguments.length?this.each(VE(t,e)):Rt(this.node(),t).ease}function KE(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Zt(this,e).ease=n}}function YE(e){if(typeof e!="function")throw new Error;return this.each(KE(this._id,e))}function UE(e){typeof e!="function"&&(e=If(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 un(o,this._parents,this._name,this._id)}function XE(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,g=0;g<c;++g)(f=a[g]||u[g])&&(d[g]=f);for(;l<o;++l)s[l]=t[l];return new un(s,this._parents,this._name,this._id)}function qE(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 ZE(e,t,n){var o,i,r=qE(t)?oa:Zt;return function(){var s=r(this,e),l=s.on;l!==o&&(i=(o=l).copy()).on(t,n),s.on=i}}function jE(e,t){var n=this._id;return arguments.length<2?Rt(this.node(),n).on.on(e):this.each(ZE(n,e,t))}function JE(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function QE(){return this.on("end.remove",JE(this._id))}function ex(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Vl(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,is(u[f],t,n,f,u,Rt(c,n)));return new un(r,this._parents,t,n)}function tx(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Mf(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),g,x=Rt(c,n),E=0,w=f.length;E<w;++E)(g=f[E])&&is(g,t,n,E,f,x);r.push(f),s.push(c)}return new un(r,s,t,n)}var nx=hi.prototype.constructor;function ox(){return new nx(this._groups,this._parents)}function ix(e,t){var n,o,i;return function(){var r=_o(this,e),s=(this.style.removeProperty(e),_o(this,e));return r===s?null:r===n&&s===o?i:i=t(n=r,o=s)}}function hh(e){return function(){this.style.removeProperty(e)}}function rx(e,t,n){var o,i=n+"",r;return function(){var s=_o(this,e);return s===i?null:s===o?r:r=t(o=s,n)}}function sx(e,t,n){var o,i,r;return function(){var s=_o(this,e),l=n(this),a=l+"";return l==null&&(a=l=(this.style.removeProperty(e),_o(this,e))),s===a?null:s===o&&a===i?r:(i=a,r=t(o=s,l))}}function lx(e,t){var n,o,i,r="style."+t,s="end."+r,l;return function(){var a=Zt(this,e),u=a.on,c=a.value[r]==null?l||(l=hh(t)):void 0;(u!==n||i!==c)&&(o=(n=u).copy()).on(s,i=c),a.on=o}}function ax(e,t,n){var o=(e+="")=="transform"?aE:fh;return t==null?this.styleTween(e,ix(e,o)).on("end.style."+e,hh(e)):typeof t=="function"?this.styleTween(e,sx(e,o,ia(this,"style."+e,t))).each(lx(this._id,e)):this.styleTween(e,rx(e,o,t),n).on("end.style."+e,null)}function ux(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function cx(e,t,n){var o,i;function r(){var s=t.apply(this,arguments);return s!==i&&(o=(i=s)&&ux(e,s,n)),o}return r._value=t,r}function dx(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,cx(e,t,n??""))}function fx(e){return function(){this.textContent=e}}function hx(e){return function(){var t=e(this);this.textContent=t??""}}function gx(e){return this.tween("text",typeof e=="function"?hx(ia(this,"text",e)):fx(e==null?"":e+""))}function px(e){return function(t){this.textContent=e.call(this,t)}}function vx(e){var t,n;function o(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&px(i)),t}return o._value=e,o}function mx(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,vx(e))}function yx(){for(var e=this._name,t=this._id,n=gh(),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=Rt(a,t);is(a,e,n,u,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new un(o,this._parents,e,n)}function _x(){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=Zt(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 wx=0;function un(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function gh(){return++wx}var cn=hi.prototype;un.prototype={constructor:un,select:ex,selectAll:tx,selectChild:cn.selectChild,selectChildren:cn.selectChildren,filter:UE,merge:XE,selection:ox,transition:yx,call:cn.call,nodes:cn.nodes,node:cn.node,size:cn.size,empty:cn.empty,each:cn.each,on:jE,attr:IE,attrTween:$E,style:ax,styleTween:dx,text:gx,textTween:mx,remove:QE,tween:xE,delay:HE,duration:BE,ease:GE,easeVarying:YE,end:_x,[Symbol.iterator]:cn[Symbol.iterator]};function bx(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Sx={time:null,delay:0,duration:250,ease:bx};function Ex(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 xx(e){var t,n;e instanceof un?(t=e._id,e=e._name):(t=gh(),(n=Sx).time=Ql(),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])&&is(a,e,t,u,s,n||Ex(a,t));return new un(o,this._parents,e,t)}hi.prototype.interrupt=bE,hi.prototype.transition=xx;const ss=e=>()=>e;function Ax(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 dn(e,t,n){this.k=e,this.x=t,this.y=n}dn.prototype={constructor:dn,scale:function(t){return t===1?this:new dn(this.k*t,this.x,this.y)},translate:function(t,n){return t===0&n===0?this:new dn(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 ra=new dn(1,0,0);dn.prototype;function sa(e){e.stopImmediatePropagation()}function Si(e){e.preventDefault(),e.stopImmediatePropagation()}function Ox(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Cx(){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 ph(){return this.__zoom||ra}function Nx(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Tx(){return navigator.maxTouchPoints||"ontouchstart"in this}function Mx(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 Ix(){var e=Ox,t=Cx,n=Mx,o=Nx,i=Tx,r=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,a=hE,u=zl("start","zoom","end"),c,d,f,g=500,x=150,E=0,w=10;function O(h){h.property("__zoom",ph).on("wheel.zoom",V,{passive:!1}).on("mousedown.zoom",U).on("dblclick.zoom",j).filter(i).on("touchstart.zoom",ie).on("touchmove.zoom",J).on("touchend.zoom touchcancel.zoom",ne).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}O.transform=function(h,C,k,F){var T=h.selection?h.selection():h;T.property("__zoom",ph),h!==T?L(h,C,k,F):T.interrupt().each(function(){K(this,arguments).event(F).start().zoom(null,typeof C=="function"?C.apply(this,arguments):C).end()})},O.scaleBy=function(h,C,k,F){O.scaleTo(h,function(){var T=this.__zoom.k,H=typeof C=="function"?C.apply(this,arguments):C;return T*H},k,F)},O.scaleTo=function(h,C,k,F){O.transform(h,function(){var T=t.apply(this,arguments),H=this.__zoom,W=k==null?_(T):typeof k=="function"?k.apply(this,arguments):k,z=H.invert(W),$=typeof C=="function"?C.apply(this,arguments):C;return n(D(R(H,$),W,z),T,s)},k,F)},O.translateBy=function(h,C,k,F){O.transform(h,function(){return n(this.__zoom.translate(typeof C=="function"?C.apply(this,arguments):C,typeof k=="function"?k.apply(this,arguments):k),t.apply(this,arguments),s)},null,F)},O.translateTo=function(h,C,k,F,T){O.transform(h,function(){var H=t.apply(this,arguments),W=this.__zoom,z=F==null?_(H):typeof F=="function"?F.apply(this,arguments):F;return n(ra.translate(z[0],z[1]).scale(W.k).translate(typeof C=="function"?-C.apply(this,arguments):-C,typeof k=="function"?-k.apply(this,arguments):-k),H,s)},F,T)};function R(h,C){return C=Math.max(r[0],Math.min(r[1],C)),C===h.k?h:new dn(C,h.x,h.y)}function D(h,C,k){var F=C[0]-k[0]*h.k,T=C[1]-k[1]*h.k;return F===h.x&&T===h.y?h:new dn(h.k,F,T)}function _(h){return[(+h[0][0]+ +h[1][0])/2,(+h[0][1]+ +h[1][1])/2]}function L(h,C,k,F){h.on("start.zoom",function(){K(this,arguments).event(F).start()}).on("interrupt.zoom end.zoom",function(){K(this,arguments).event(F).end()}).tween("zoom",function(){var T=this,H=arguments,W=K(T,H).event(F),z=t.apply(T,H),$=k==null?_(z):typeof k=="function"?k.apply(T,H):k,q=Math.max(z[1][0]-z[0][0],z[1][1]-z[0][1]),le=T.__zoom,ue=typeof C=="function"?C.apply(T,H):C,X=a(le.invert($).concat(q/le.k),ue.invert($).concat(q/ue.k));return function(Z){if(Z===1)Z=ue;else{var te=X(Z),pe=q/te[2];Z=new dn(pe,$[0]-te[0]*pe,$[1]-te[1]*pe)}W.zoom(null,Z)}})}function K(h,C,k){return!k&&h.__zooming||new Y(h,C)}function Y(h,C){this.that=h,this.args=C,this.active=0,this.sourceEvent=null,this.extent=t.apply(h,C),this.taps=0}Y.prototype={event:function(C){return C&&(this.sourceEvent=C),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(C,k){return this.mouse&&C!=="mouse"&&(this.mouse[1]=k.invert(this.mouse[0])),this.touch0&&C!=="touch"&&(this.touch0[1]=k.invert(this.touch0[0])),this.touch1&&C!=="touch"&&(this.touch1[1]=k.invert(this.touch1[0])),this.that.__zoom=k,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(C){var k=Tn(this.that).datum();u.call(C,this.that,new Ax(C,{sourceEvent:this.sourceEvent,target:O,transform:this.that.__zoom,dispatch:u}),k)}};function V(h){for(var C=arguments.length,k=new Array(C>1?C-1:0),F=1;F<C;F++)k[F-1]=arguments[F];if(!e.apply(this,arguments))return;var T=K(this,k).event(h),H=this.__zoom,W=Math.max(r[0],Math.min(r[1],H.k*Math.pow(2,o.apply(this,arguments)))),z=Mn(h);if(T.wheel)(T.mouse[0][0]!==z[0]||T.mouse[0][1]!==z[1])&&(T.mouse[1]=H.invert(T.mouse[0]=z)),clearTimeout(T.wheel);else{if(H.k===W)return;T.mouse=[z,H.invert(z)],rs(this),T.start()}Si(h),T.wheel=setTimeout($,x),T.zoom("mouse",n(D(R(H,W),T.mouse[0],T.mouse[1]),T.extent,s));function $(){T.wheel=null,T.end()}}function U(h){for(var C=arguments.length,k=new Array(C>1?C-1:0),F=1;F<C;F++)k[F-1]=arguments[F];if(f||!e.apply(this,arguments))return;var T=h.currentTarget,H=K(this,k,!0).event(h),W=Tn(h.view).on("mousemove.zoom",le,!0).on("mouseup.zoom",ue,!0),z=Mn(h,T),$=h.clientX,q=h.clientY;WS(h.view),sa(h),H.mouse=[z,this.__zoom.invert(z)],rs(this),H.start();function le(X){if(Si(X),!H.moved){var Z=X.clientX-$,te=X.clientY-q;H.moved=Z*Z+te*te>E}H.event(X).zoom("mouse",n(D(H.that.__zoom,H.mouse[0]=Mn(X,T),H.mouse[1]),H.extent,s))}function ue(X){W.on("mousemove.zoom mouseup.zoom",null),zS(X.view,H.moved),Si(X),H.event(X).end()}}function j(h){for(var C=arguments.length,k=new Array(C>1?C-1:0),F=1;F<C;F++)k[F-1]=arguments[F];if(e.apply(this,arguments)){var T=this.__zoom,H=Mn(h.changedTouches?h.changedTouches[0]:h,this),W=T.invert(H),z=T.k*(h.shiftKey?.5:2),$=n(D(R(T,z),H,W),t.apply(this,k),s);Si(h),l>0?Tn(this).transition().duration(l).call(L,$,H,h):Tn(this).call(O.transform,$,H,h)}}function ie(h){for(var C=arguments.length,k=new Array(C>1?C-1:0),F=1;F<C;F++)k[F-1]=arguments[F];if(e.apply(this,arguments)){var T=h.touches,H=T.length,W=K(this,k,h.changedTouches.length===H).event(h),z,$,q,le;for(sa(h),$=0;$<H;++$)q=T[$],le=Mn(q,this),le=[le,this.__zoom.invert(le),q.identifier],W.touch0?!W.touch1&&W.touch0[2]!==le[2]&&(W.touch1=le,W.taps=0):(W.touch0=le,z=!0,W.taps=1+!!c);c&&(c=clearTimeout(c)),z&&(W.taps<2&&(d=le[0],c=setTimeout(function(){c=null},g)),rs(this),W.start())}}function J(h){if(this.__zooming){for(var C=arguments.length,k=new Array(C>1?C-1:0),F=1;F<C;F++)k[F-1]=arguments[F];var T=K(this,k).event(h),H=h.changedTouches,W=H.length,z,$,q,le;for(Si(h),z=0;z<W;++z)$=H[z],q=Mn($,this),T.touch0&&T.touch0[2]===$.identifier?T.touch0[0]=q:T.touch1&&T.touch1[2]===$.identifier&&(T.touch1[0]=q);if($=T.that.__zoom,T.touch1){var ue=T.touch0[0],X=T.touch0[1],Z=T.touch1[0],te=T.touch1[1],pe=(pe=Z[0]-ue[0])*pe+(pe=Z[1]-ue[1])*pe,ve=(ve=te[0]-X[0])*ve+(ve=te[1]-X[1])*ve;$=R($,Math.sqrt(pe/ve)),q=[(ue[0]+Z[0])/2,(ue[1]+Z[1])/2],le=[(X[0]+te[0])/2,(X[1]+te[1])/2]}else if(T.touch0)q=T.touch0[0],le=T.touch0[1];else return;T.zoom("touch",n(D($,q,le),T.extent,s))}}function ne(h){for(var C=arguments.length,k=new Array(C>1?C-1:0),F=1;F<C;F++)k[F-1]=arguments[F];if(this.__zooming){var T=K(this,k).event(h),H=h.changedTouches,W=H.length,z,$;for(sa(h),f&&clearTimeout(f),f=setTimeout(function(){f=null},g),z=0;z<W;++z)$=H[z],T.touch0&&T.touch0[2]===$.identifier?delete T.touch0:T.touch1&&T.touch1[2]===$.identifier&&delete T.touch1;if(T.touch1&&!T.touch0&&(T.touch0=T.touch1,delete T.touch1),T.touch0)T.touch0[1]=this.__zoom.invert(T.touch0[0]);else if(T.end(),T.taps===2&&($=Mn($,this),Math.hypot(d[0]-$[0],d[1]-$[1])<w)){var q=Tn(this).on("dblclick.zoom");q&&q.apply(this,arguments)}}}return O.wheelDelta=function(h){return arguments.length?(o=typeof h=="function"?h:ss(+h),O):o},O.filter=function(h){return arguments.length?(e=typeof h=="function"?h:ss(!!h),O):e},O.touchable=function(h){return arguments.length?(i=typeof h=="function"?h:ss(!!h),O):i},O.extent=function(h){return arguments.length?(t=typeof h=="function"?h:ss([[+h[0][0],+h[0][1]],[+h[1][0],+h[1][1]]]),O):t},O.scaleExtent=function(h){return arguments.length?(r[0]=+h[0],r[1]=+h[1],O):[r[0],r[1]]},O.translateExtent=function(h){return arguments.length?(s[0][0]=+h[0][0],s[1][0]=+h[1][0],s[0][1]=+h[0][1],s[1][1]=+h[1][1],O):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},O.constrain=function(h){return arguments.length?(n=h,O):n},O.duration=function(h){return arguments.length?(l=+h,O):l},O.interpolate=function(h){return arguments.length?(a=h,O):a},O.on=function(){var h=u.on.apply(u,arguments);return h===u?O:h},O.clickDistance=function(h){return arguments.length?(E=(h=+h)*h,O):Math.sqrt(E)},O.tapDistance=function(h){return arguments.length?(w=+h,O):w},O}const vh=Symbol("MiniMapSlots"),Px=["id","x","y","rx","ry","width","height","fill","stroke","stroke-width","shape-rendering"],Rx={name:"MiniMapNode",compatConfig:{MODE:3},inheritAttrs:!1},Dx=Fe(re({},Rx,{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=mt(vh),r=$s(),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,g)=>!f.hidden&&f.dimensions.width!==0&&f.dimensions.height!==0?(se(),he($e,{key:0},[ce(i)["node-"+o.type]?(se(),qe(_u(ce(i)["node-"+o.type]),Ch(Wo({key:0},re({},o,f.$attrs))),null,16)):(se(),he("rect",Wo({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,Px))],64)):Se("",!0)}})),kx=["width","height","viewBox","aria-labelledby"],$x=["id"],Fx=["d","fill","stroke","stroke-width"],Lx={name:"MiniMap",compatConfig:{MODE:3}},Hx=Fe(re({},Lx,{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=Eu(),i=$s(),r=200,s=150,l=ke(),a=l.id,u=l.edges,c=l.viewport,d=l.translateExtent,f=l.dimensions,g=l.emits,x=l.d3Selection,E=l.d3Zoom,w=l.getNodesInitialized,O=Ce();bn(vh,o);const R=De(()=>{var W,z,$;return(W=(z=e.width)!=null?z:($=i.style)==null?void 0:$.width)!=null?W:r}),D=De(()=>{var W,z,$;return(W=(z=e.height)!=null?z:($=i.style)==null?void 0:$.height)!=null?W:s}),_=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision",L=de(()=>typeof e.nodeColor=="string"?()=>e.nodeColor:e.nodeColor),K=de(()=>typeof e.nodeStrokeColor=="string"?()=>e.nodeStrokeColor:e.nodeStrokeColor),Y=de(()=>typeof e.nodeClassName=="string"?()=>e.nodeClassName:typeof e.nodeClassName=="function"?e.nodeClassName:()=>""),V=de(()=>Nl(w.value.filter(W=>!W.hidden))),U=de(()=>({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})),j=de(()=>w.value&&w.value.length?K_(V.value,U.value):U.value),ie=de(()=>{const W=j.value.width/R.value,z=j.value.height/D.value;return Math.max(W,z)}),J=de(()=>{const W=ie.value*R.value,z=ie.value*D.value,$=e.offsetScale*ie.value;return{offset:$,x:j.value.x-(W-j.value.width)/2-$,y:j.value.y-(z-j.value.height)/2-$,width:W+$*2,height:z+$*2}}),ne=de(()=>!J.value.x||!J.value.y?"":`
M`+(J.value.x-J.value.offset)+","+(J.value.y-J.value.offset)+`
h`+(J.value.width+J.value.offset*2)+`
v`+(J.value.height+J.value.offset*2)+`
h`+(-J.value.width-J.value.offset*2)+`z
M`+(U.value.x+e.maskBorderRadius)+","+U.value.y+`
h`+(U.value.width-2*e.maskBorderRadius)+`
a`+e.maskBorderRadius+","+e.maskBorderRadius+" 0 0 1 "+e.maskBorderRadius+","+e.maskBorderRadius+`
v`+(U.value.height-2*e.maskBorderRadius)+`
a`+e.maskBorderRadius+","+e.maskBorderRadius+" 0 0 1 -"+e.maskBorderRadius+","+e.maskBorderRadius+`
h`+-(U.value.width-2*e.maskBorderRadius)+`
a`+e.maskBorderRadius+","+e.maskBorderRadius+" 0 0 1 -"+e.maskBorderRadius+",-"+e.maskBorderRadius+`
v`+-(U.value.height-2*e.maskBorderRadius)+`
a`+e.maskBorderRadius+","+e.maskBorderRadius+" 0 0 1 "+e.maskBorderRadius+",-"+e.maskBorderRadius+"z");mg(W=>{if(O.value){const z=Tn(O.value),$=ue=>{if(ue.sourceEvent.type!=="wheel"||!x.value||!E.value)return;const X=ue.sourceEvent.ctrlKey&&ci()?10:1,Z=-ue.sourceEvent.deltaY*(ue.sourceEvent.deltaMode===1?.05:ue.sourceEvent.deltaMode?1:.002)*e.zoomStep,te=c.value.zoom*2**(Z*X);E.value.scaleTo(x.value,te)},q=ue=>{if(ue.sourceEvent.type!=="mousemove"||!x.value||!E.value)return;const X=ie.value*Math.max(1,c.value.zoom)*(e.inversePan?-1:1),Z={x:c.value.x-ue.sourceEvent.movementX*X,y:c.value.y-ue.sourceEvent.movementY*X},te=[[0,0],[f.value.width,f.value.height]],pe=ra.translate(Z.x,Z.y).scale(c.value.zoom),ve=E.value.constrain()(pe,te,d.value);E.value.transform(x.value,ve)},le=Ix().wheelDelta(ue=>Tl(ue)*(e.zoomStep/10)).on("zoom",e.pannable?q:()=>{}).on("zoom.wheel",e.zoomable?$:()=>{});z.call(le),W(()=>{z.on("zoom",null)})}},{flush:"post"});function h(W){const z=Mn(W),$=z[0],q=z[1];n("click",{event:W,position:{x:$,y:q}})}function C(W,z){const $={event:W,node:z,connectedEdges:Yn([z],u.value)};g.miniMapNodeClick($),n("nodeClick",$)}function k(W,z){const $={event:W,node:z,connectedEdges:Yn([z],u.value)};g.miniMapNodeDoubleClick($),n("nodeDblclick",$)}function F(W,z){const $={event:W,node:z,connectedEdges:Yn([z],u.value)};g.miniMapNodeMouseEnter($),n("nodeMouseenter",$)}function T(W,z){const $={event:W,node:z,connectedEdges:Yn([z],u.value)};g.miniMapNodeMouseMove($),n("nodeMousemove",$)}function H(W,z){const $={event:W,node:z,connectedEdges:Yn([z],u.value)};g.miniMapNodeMouseLeave($),n("nodeMouseleave",$)}return(W,z)=>(se(),qe(ce(xf),{position:W.position,class:Be(["vue-flow__minimap",{pannable:W.pannable,zoomable:W.zoomable}])},{default:wn(()=>[(se(),he("svg",{ref_key:"el",ref:O,width:R.value,height:D.value,viewBox:[J.value.x,J.value.y,J.value.width,J.value.height].join(" "),role:"img","aria-labelledby":"vue-flow__minimap-"+ce(a),onClick:h},[W.ariaLabel?(se(),he("title",{key:0,id:"vue-flow__minimap-"+ce(a)},me(W.ariaLabel),9,$x)):Se("",!0),(se(!0),he($e,null,to(ce(w),$=>(se(),qe(Dx,{id:$.id,key:$.id,f:"",position:$.computedPosition,dimensions:$.dimensions,selected:$.selected,dragging:$.dragging,style:Ue($.style),class:Be(Y.value($)),color:L.value($),"border-radius":W.nodeBorderRadius,"stroke-color":K.value($),"stroke-width":W.nodeStrokeWidth,"shape-rendering":ce(_),type:$.type,hidden:$.hidden,onClick:q=>C(q,$),onDblclick:q=>k(q,$),onMouseenter:q=>F(q,$),onMousemove:q=>T(q,$),onMouseleave:q=>H(q,$)},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)),ee("path",{class:"vue-flow__minimap-mask",d:ne.value,fill:W.maskColor,stroke:W.maskStrokeColor,"stroke-width":W.maskStrokeWidth,"fill-rule":"evenodd"},null,8,Fx)],8,kx))]),_:1},8,["position","class"]))}}));var la={name:"StageNode",components:{Handle:fi},props:{data:{type:Object,required:!0}},setup(){const{connectionStartHandle:e}=ke();return{connectionStartHandle:e}},data(){return{showActions:!1,isHoveredOrFocused:!1,hoverTimeout:null,blurTimeout:null}},computed:{isConnecting(){return!!this.connectionStartHandle},Position(){return fe},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 Wx=["data-stage-id","aria-describedby"],zx={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"},Bx=["id","aria-labelledby"],Vx={class:"visually-hidden"},Gx=["title"],Kx=["title"],Yx={key:2,class:"stage-handles","aria-hidden":"true"},Ux={class:"card-header d-flex justify-content-between align-items-start p-1 pe-0 z-1 position-relative"},Xx={class:"flex-fill w-75 me-3"},qx=["title"],Zx=["id","title"],jx={key:0,class:"stage-card-actions align-items-center d-flex position-relative"},Jx=["id","title","aria-expanded","aria-controls"],Qx={class:"visually-hidden"},eA={class:"card-body px-1 py-0 z-1 position-relative"},tA={class:"d-flex justify-content-between align-items-center"},nA={key:0,class:"badge bg-warning bg-opacity-10 rounded-pill p-1"};function oA(e,t,n,o,i,r){const s=Wt("Handle");return se(),he("div",{class:"stage-node card border shadow-sm position-relative",tabindex:"0",role:"button",style:Ue(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"]))]},[Se(" Dropdown Overlay "),i.showActions?(se(),he("div",zx)):Se("v-if",!0),Se(" Actions Dropdown "),i.showActions?(se(),he("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))},[ee("span",Vx,me(e.sprintf("COM_WORKFLOW_GRAPH_STAGE_ACTIONS",r.stage?.title)),1),r.stage?.permissions?.edit?(se(),he("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]=ee("span",{class:"icon icon-pencil-alt me-1","aria-hidden":"true"},null,-1)),zt(" "+me(e.translate("COM_WORKFLOW_GRAPH_EDIT_STAGE")),1)],40,Gx)):Se("v-if",!0),r.stage?.permissions?.delete&&!r.stage.default?(se(),he("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]=ee("span",{class:"icon icon-trash me-1","aria-hidden":"true"},null,-1)),zt(" "+me(e.translate("COM_WORKFLOW_GRAPH_TRASH_STAGE")),1)],40,Kx)):Se("v-if",!0)],40,Bx)):Se("v-if",!0),Se(" Connection Handles "),r.stage.published?(se(),he("div",Yx,[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"])])):Se("v-if",!0),ee("div",Ux,[ee("div",Xx,[ee("span",{class:"h3 d-block card-title mb-1 text-white fw-semibold text-truncate",title:e.translate(r.stage?.title)},me(e.translate(r.stage.title)),9,qx),ee("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:"")},me(e.translate(r.stage.description?r.stage.description:"")),9,Zx)]),Se(" Actions Button "),n.data?.isSpecial?Se("v-if",!0):(se(),he("div",jx,[ee("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"]))]},[ee("span",{class:Be(i.showActions?"icon icon-times":"icon icon-ellipsis-h"),"aria-hidden":"true"},null,2),ee("span",Qx,me(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,Jx)]))]),Se(" Body "),ee("div",eA,[ee("div",tA,[ee("span",{class:Be([r.stage.published?"bg-success":"bg-danger","badge rounded-pill p-1"])},me(r.stage.published?e.translate("COM_WORKFLOW_GRAPH_ENABLED"):e.translate("COM_WORKFLOW_GRAPH_DISABLED")),3),r.stage.default?(se(),he("span",nA,me(e.translate("COM_WORKFLOW_GRAPH_DEFAULT")),1)):Se("v-if",!0)])])],44,Wx)}la.render=oA,la.__file="media_source/com_workflow/src/components/nodes/StageNode.vue";var aa={name:"CustomEdge",components:{EdgeLabelRenderer:zw},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 Vr({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 iA=["aria-label"],rA=["d","aria-label","stroke","stroke-width","stroke-dasharray","marker-end"],sA=["data-edge-id","aria-pressed"],lA={key:0,class:"position-absolute top-25-px end-20-px h-100 rounded bg-secondary bg-opacity-75 pe-none","aria-hidden":"true"},aA={class:"custom-edge d-flex flex-column border rounded shadow-sm position-absolute"},uA=["id","aria-labelledby"],cA={class:"visually-hidden"},dA=["title"],fA=["title"],hA={class:"d-flex justify-content-around align-items-center p-1 pe-1 z-1 position-relative"},gA=["title"],pA={class:"align-items-center d-flex position-relative"},vA=["id","title","aria-expanded","aria-controls"],mA={class:"visually-hidden"};function yA(e,t,n,o,i,r){const s=Wt("EdgeLabelRenderer");return se(),he("g",{role:"group","aria-label":e.sprintf("COM_WORKFLOW_GRAPH_TRANSITION",n.data?.title,r.sourceStageTitle,r.targetStageTitle)},[ee("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,rA),Ne(s,null,{default:wn(()=>[ee("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:Ue({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(),he("div",lA)):Se("v-if",!0),ee("div",aA,[i.showActions?(se(),he("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))},[ee("span",cA,me(e.sprintf("COM_WORKFLOW_GRAPH_TRANSITION_ACTIONS",n.data?.title)),1),n.data?.permissions?.edit?(se(),he("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]=ee("span",{class:"icon icon-pencil-alt me-1","aria-hidden":"true"},null,-1)),zt(" "+me(e.translate("COM_WORKFLOW_GRAPH_EDIT_TRANSITION")),1)],40,dA)):Se("v-if",!0),n.data?.permissions?.delete?(se(),he("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]=ee("span",{class:"icon icon-trash me-1","aria-hidden":"true"},null,-1)),zt(" "+me(e.translate("COM_WORKFLOW_GRAPH_TRASH_TRANSITION")),1)],40,fA)):Se("v-if",!0)],40,uA)):Se("v-if",!0),ee("div",hA,[ee("span",{class:"h4 d-block card-title text-white fw-semibold text-truncate ms-4",title:e.translate(n.data?.title)},me(e.translate(n.data?.title)),9,gA),ee("div",pA,[ee("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:Ue({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"]))]},[ee("span",{class:Be(i.showActions?"icon icon-times":"icon icon-ellipsis-h"),"aria-hidden":"true"},null,2),ee("span",mA,me(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,vA)])])]),Se(" Hidden measurer "),ee("span",{ref:"textMeasurer",class:"fw-semibold invisible position-absolute",style:{"white-space":"nowrap","font-size":"1rem","font-family":"inherit"},"aria-hidden":"true"},me(e.translate(n.data?.title)),513)],44,sA)]),_:1})],8,iA)}aa.render=yA,aa.__file="media_source/com_workflow/src/components/edges/CustomEdge.vue";var ua={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 _A={ref:"controlsContainer",class:"custom-controls position-absolute z-10 p-1",role:"list","aria-labelledby":"canvas-controls-title"},wA={id:"canvas-controls-title",class:"visually-hidden"},bA={class:"d-flex flex-column gap-1 list-unstyled mb-0 px-0"},SA=["title"],EA={class:"visually-hidden"},xA=["title"],AA={class:"visually-hidden"},OA=["title"],CA={class:"visually-hidden"};function NA(e,t,n,o,i,r){return se(),he("div",_A,[ee("span",wA,me(e.translate("COM_WORKFLOW_GRAPH_CANVAS_VIEW_CONTROLS")),1),ee("ul",bA,[ee("li",null,[ee("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]=ee("span",{class:"icon icon-plus","aria-hidden":"true"},null,-1)),ee("span",EA,me(e.translate("COM_WORKFLOW_GRAPH_ZOOM_IN")),1)],40,SA)]),ee("li",null,[ee("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]=ee("span",{class:"icon icon-minus","aria-hidden":"true"},null,-1)),ee("span",AA,me(e.translate("COM_WORKFLOW_GRAPH_ZOOM_OUT")),1)],40,xA)]),ee("li",null,[ee("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]=ee("span",{class:"icon icon-expand","aria-hidden":"true"},null,-1)),ee("span",CA,me(e.translate("COM_WORKFLOW_GRAPH_FIT_VIEW")),1)],40,OA)])])],512)}ua.render=NA,ua.__file="media_source/com_workflow/src/components/canvas/CustomControls.vue";function TA(e){return e?.color||"rgb(var(--primary-rgb))"}function MA(e){return"hsl("+parseInt(e?.id,10)*199%360+", 70%, 60%)"}function IA(e,t){return t?MA(e):e!=null&&e.published?"#3B82F6":e.from_stage_id===-1||e.to_stage_id===-1?"#F97316":"#10B981"}function PA(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 RA(){return document.dir==="rtl"}var ca={name:"ControlsPanel",components:{Panel:xf},emits:["add-stage","add-transition"],computed:{panelPosition(){return RA()?"top-right":"top-left"}}};const DA={id:"controls-panel-title",class:"visually-hidden"},kA=["aria-label","title"],$A=["aria-label","title"];function FA(e,t,n,o,i,r){const s=Wt("Panel");return se(),qe(s,{position:r.panelPosition,role:"list","aria-labelledby":"controls-panel-title",class:"d-flex gap-2 p-2"},{default:wn(()=>[ee("span",DA,me(e.translate("COM_WORKFLOW_GRAPH_CONTROLS")),1),ee("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]=ee("span",{class:"icon icon-plus","aria-hidden":"true"},null,-1)),zt(" "+me(e.translate("COM_WORKFLOW_GRAPH_ADD_STAGE")),1)],40,kA),ee("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]=ee("span",{class:"icon icon-plus","aria-hidden":"true"},null,-1)),zt(" "+me(e.translate("COM_WORKFLOW_GRAPH_ADD_TRANSITION")),1)],40,$A)]),_:1},8,["position"])}ca.render=FA,ca.__file="media_source/com_workflow/src/components/canvas/ControlsPanel.vue";function fn(e,t){!e||!t||(e.textContent="",setTimeout(()=>{e.textContent=t},10))}function da(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 LA(e,t,n){const i=(e.indexOf(t.value)+1)%e.length;t.value=e[i]}function HA(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 WA(e,t){e.value&&(e.value.focus(),e.value=null),t.dispatch("loadWorkflow",t.getters.workflowId)}function zA(e){if(e.code==="Escape"){e.preventDefault();const t=e.currentTarget;t&&t.close&&t.close()}}function BA(e,t){setTimeout(()=>{const n=document.querySelector("joomla-dialog dialog[open]");if(n){n.focus();const o=n.querySelector("iframe");o&&o.addEventListener("load",()=>{HA(o)}),n.addEventListener("close",()=>{WA(e,t)}),n.addEventListener("keydown",zA)}},100)}function VA(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,g)=>{const x=g%d,E=Math.floor(g/d),w=f?.position||{x:x*i+a,y:E*s+c};return{id:String(f.id),type:"stage",position:w,data:{stage:re({},f,{color:TA(f)}),isSelected:!1,onSelect:()=>{},onEdit:()=>{},onDelete:()=>{}},draggable:!0}})}function GA(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(E=>E.from_stage_id===l.to_stage_id&&E.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 g=IA(l,c),x=c?5:3;return{id:String(l.id),source:a,target:u,type:"custom",animated:c,style:{stroke:g,strokeWidth:x,strokeDasharray:l.published?void 0:"5,5",zIndex:c?1e3:1},markerEnd:{type:"arrow",width:10,height:10,color:g},data:re({},l,{isSelected:c,isBiDirectional:d,offsetIndex:f,onEdit:()=>{},onDelete:()=>{}})}})}function YA(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,g=e.state,x=e.store;function E(w){const O=document.querySelector("joomla-dialog dialog[open]");if(O){if(w.code==="Escape"){w.preventDefault(),O.close();return}return}const R={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 D(_,L,K){if(!document.querySelector(".stage-node[data-stage-id='"+_+"']")||!x)return;const V=20,U=x.getters.stages.findIndex(ne=>ne.id===parseInt(_,10));if(U===-1)return;const j=x.getters.stages[U].position||{x:0,y:0};if(!j)return;let ie=j.x,J=j.y;switch(L){case"ArrowUp":J-=V;break;case"ArrowDown":J+=V;break;case"ArrowLeft":ie-=V;break;case"ArrowRight":ie+=V;break;default:return}x.dispatch("updateStagePosition",{id:_,x:ie,y:J}),r("unsaved"),s(),l()}switch(!0){case(w.altKey&&w.code==="KeyN"):w.preventDefault(),t(),fn(g.liveRegion,"Add stage");break;case(w.altKey&&w.code==="KeyM"):w.preventDefault(),n(),fn(g.liveRegion,"Add transition");break;case w.code==="KeyE":w.preventDefault(),o();break;case(w.code==="Delete"||w.code==="Backspace"):w.preventDefault(),i();break;case w.code==="Escape":w.preventDefault(),a();break;case w.code==="Equal":w.preventDefault(),u();break;case w.code==="Minus":w.preventDefault(),c();break;case w.code==="KeyF":w.preventDefault(),d({padding:.5,duration:300});break;case w.code==="Tab":{w.preventDefault(),LA(["buttons","stages","transitions","toolbar","actions","links"],g.currentFocusMode,g.liveRegion);const _=R[g.currentFocusMode.value];if(_){const L=document.querySelector(_);L&&L.focus()}break}case["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(w.code):if(w.preventDefault(),g.selectedStage.value)if(w.shiftKey)D(g.selectedStage.value.toString(),w.code);else{const _=".stage-node[data-stage-id='"+g.selectedStage.value+`'] button[tabindex="0"]`;_&&da(_,0)}else if(g.selectedTransition.value){const _=".edge-label[data-edge-id='"+g.selectedTransition.value+`'] button[tabindex="0"]`;_&&da(_,0)}else if(w.shiftKey)switch(w.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 _=["ArrowLeft","ArrowUp"].includes(w.code),L=R[g.currentFocusMode.value];L&&da(L,_)}break}}return document.addEventListener("keydown",E),()=>{document.removeEventListener("keydown",E)}}class fa{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 fa;e.init(),window.workflowAccessibilityFixer=e});else{const e=new fa;e.init(),window.workflowAccessibilityFixer=e}function ha(e,t){let n;t.type==="message"&&(n=3e3),Joomla.renderMessages({[t.type]:[Joomla.Text._(e)]},void 0,!0,n)}const ct={success:(e,t)=>{ha(e,re({type:"message",dismiss:!0},t))},error:(e,t)=>{ha(e,re({type:"error",dismiss:!0},t))},notify:(e,t)=>{ha(e,re({type:"message",dismiss:!0},t))},ask:e=>window.confirm(e)};var ga={name:"WorkflowCanvas",components:{VueFlow:qw,Background:ob,MiniMap:Hx,CustomControls:ua,ControlsPanel:ca},props:{nodeTypes:{type:Object,default:()=>({stage:la})},edgeTypes:{type:Object,default:()=>({custom:aa})},saveStatus:{type:Object,required:!0},setSaveStatus:{type:Function,required:!0}},setup(e,{emit:t}){const n=_c(),{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),g=Ce("upToDate"),x=Ce("links"),E=Ce(null),w=Ce(null),O=Ce(!0),R=de(()=>n.getters.workflow||{}),D=de(()=>n.getters.stages||[]),_=de(()=>n.getters.transitions||[]),L=de(()=>n.getters.loading),K=de(()=>n.getters.error),Y=de(()=>n.getters.workflowId);function V(y){return Joomla.Text._(y)}function U(y,...v){const p=Joomla.Text._(y);let m=0;return p.replace(/%((%)|s|d)/g,S=>{let A=v[m];return S==="%d"&&(A=parseFloat(A),Number.isNaN(A)&&(A=0)),m+=1,A})}function j(y,v=null,p={}){E.value=document.activeElement;const m=Joomla.getOptions("com_workflow",{})?.extension||"",S=`index.php?option=com_workflow&view=${y}&workflow_id=${Y.value}&extension=${m}&layout=modal&tmpl=component`,A=v?`${S}&id=${v}`:S,N=Object.entries(p).map(([B,G])=>`${encodeURIComponent(B)}=${encodeURIComponent(G)}`).join("&"),b=N?`${A}&${N}`:A,M=V(v?`COM_WORKFLOW_GRAPH_EDIT_${y.toUpperCase()}`:`COM_WORKFLOW_GRAPH_ADD_${y.toUpperCase()}`),P=new ma({popupType:"iframe",textHeader:M,src:b}),I=B=>{try{B.source===(P.getBodyContent().contentWindow||window)&&(B.data&&B.data.messageType)==="joomla:content-select"&&P.close()}catch{}};window.addEventListener("message",I),P.addEventListener("joomla-dialog:close",()=>{window.removeEventListener("message",I),P.destroy()}),P.show(),BA(E,n)}function ie(y,v="stage"){return v==="stage"?D.value.find(m=>m.id===parseInt(y,10))?.permissions?.edit:v==="transition"?_.value.find(m=>m.id===parseInt(y,10))?.permissions?.edit:!1}function J(y,v="stage"){return v==="stage"?D.value.find(m=>m.id===parseInt(y,10))?.permissions?.delete:v==="transition"?_.value.find(m=>m.id===parseInt(y,10))?.permissions?.delete:!1}function ne(y){u.value=!1,c.value=parseInt(y,10),d.value=null,fn(f.value,U("COM_WORKFLOW_GRAPH_STAGE_SELECTED",D?.value?.find(v=>v.id===parseInt(y,10))?.title||y))}function h(y){u.value=!0,d.value=parseInt(y,10),c.value=null,fn(f.value,U("COM_WORKFLOW_GRAPH_TRANSITION_SELECTED",_?.value?.find(v=>v.id===parseInt(y,10))?.title||y))}function C(y){ie(y,"stage")&&j("stage",y)}function k(y){ie(y,"transition")&&j("transition",y)}function F(){c.value=null,d.value=null,u.value=!1,fn(f.value,V("COM_WORKFLOW_GRAPH_SELECTION_CLEARED"))}function T(y){J(y,"stage")&&(n.dispatch("deleteStage",{id:y,workflowId:Y.value}),c.value=null)}function H(y){J(y,"transition")&&(n.dispatch("deleteTransition",{id:y,workflowId:Y.value}),d.value=null)}function W(y,v){y==="stage"?T(v.toString()):H(v.toString())}function z(y,v){if(!J(v,"stage")&&y==="stage"||!J(v,"transition")&&y==="transition")return;const p=V(y==="stage"?"COM_WORKFLOW_GRAPH_TRASH_STAGE":"COM_WORKFLOW_GRAPH_TRASH_TRANSITION"),m=V(y==="stage"?U("COM_WORKFLOW_GRAPH_TRASH_STAGE_CONFIRM",D?.value?.find(S=>S.id===parseInt(v,10))?.title||v):U("COM_WORKFLOW_GRAPH_TRASH_TRANSITION_CONFIRM",_?.value?.find(S=>S.id===parseInt(v,10))?.title||v));ma.confirm(m,p).then(S=>{S&&W(y,v)})}function $(){R?.value?.canCreate&&(j("stage"),fn(f.value,V("COM_WORKFLOW_GRAPH_ADD_STAGE_DIALOG_OPENED")))}function q(){R?.value?.canCreate&&(j("transition"),fn(f.value,V("COM_WORKFLOW_GRAPH_ADD_TRANSITION_DIALOG_OPENED")))}function le({source:y,target:v}){R?.value?.canCreate&&y&&v&&(j("transition",null,{from_stage_id:y,to_stage_id:v}),fn(f.value,U("COM_WORKFLOW_GRAPH_CREATING_TRANSITION",D?.value?.find(p=>p.id===parseInt(y,10))?.title||y,D?.value?.find(p=>p.id===parseInt(v,10))?.title||v)))}function ue({edge:y}){h(y?.id)}function X(){const y=document.getElementById("save-status");y&&(g.value==="unsaved"?(y.classList.add("text-warning"),y.textContent=V("COM_WORKFLOW_GRAPH_UNSAVED_CHANGES")):(y.classList.remove("text-warning"),y.textContent=V("COM_WORKFLOW_GRAPH_UP_TO_DATE")))}const Z=PA(async()=>{await n.dispatch("updateStagePositionAjax")?(g.value="upToDate",X(),fn(f.value,V("COM_WORKFLOW_GRAPH_STAGE_POSITIONS_UPDATED"))):ct.error(V("COM_WORKFLOW_GRAPH_ERROR_FAILED_TO_UPDATE_STAGE_POSITIONS"))},3e3);async function te({node:y}){if(!y||!y.id||y.id==="from_any")return;const v=n.getters.stages.find(A=>A.id===parseInt(y.id,10))?.position,p=y.computedPosition||v||{x:0,y:0},{x:m,y:S}=p;g.value="unsaved",X(),await n.dispatch("updateStagePosition",{id:y.id,x:m,y:S}),Z()}const pe=de(()=>{const y=VA(D.value),v=GA("from_any",{x:600,y:-200},"purple",V("COM_WORKFLOW_GRAPH_FROM_ANY"),ne,!1);return[...y.map(p=>({...p,data:{...p.data,isSelected:c.value===parseInt(p.id,10),onSelect:()=>ne(p.id),onEscape:()=>F(),onEdit:()=>C(p.id),onDelete:()=>z("stage",p.id)}})),v]}),ve=de(()=>KA(_.value,{selectedId:d.value}).map(y=>({...y,data:{...y.data,onSelect:()=>h(y.id),onEscape:()=>F(),onDelete:()=>z("transition",y.id),onEdit:()=>k(y.id)}})));Ct(()=>{w.value=new fa,w.value.init();const y=YA({addStage:$,addTransition:q,editItem:()=>{c.value?C(c.value):d.value&&k(d.value)},deleteItem:()=>{c.value?z("stage",c.value):d.value&&z("transition",d.value)},clearSelection:F,zoomIn:i,zoomOut:r,fitView:o,viewport:s,state:{selectedStage:c,selectedTransition:d,isTransitionMode:u,currentFocusMode:x,liveRegion:f.value},setSaveStatus:v=>{g.value=v},updateSaveMessage:X,saveNodePosition:Z,store:n});ji(()=>{y(),w.value&&w.value.destroy()})});let be=!1;return xe([L,K],()=>{setTimeout(()=>{if(L.value||K.value)return;const{panX:y,panY:v,zoom:p}=n.getters.canvas??{};typeof y=="number"&&!Number.isNaN(y)&&typeof v=="number"&&!Number.isNaN(v)&&typeof p=="number"&&!Number.isNaN(p)?(be=!0,Promise.resolve().then(()=>l({x:y,y:v,zoom:p})).finally(()=>{be=!1})):o({padding:.4,duration:300})},0)},{immediate:!0}),a(({x:y,y:v,zoom:p})=>{be||[y,v,p].some(m=>typeof m!="number"||Number.isNaN(m))||n.dispatch("updateCanvasViewport",{panX:y,panY:v,zoom:p})}),{loading:L,error:K,showMiniMap:O,workflow:R,stages:D,positionedNodes:pe,styledEdges:ve,liveRegion:f,handleConnect:le,selectEdge:ue,handleDeleteConfirm:W,addStage:$,addTransition:q,clearSelection:F,handleNodeDragStop:te}}};const UA={class:"w-100 h-100 position-relative",role:"application","aria-label":"Workflow Graph"},XA={id:"workflow-controls","aria-label":"Canvas Controls",class:"workflow-controls-section"},qA={class:"visually-hidden"},ZA=["title","aria-pressed"],jA={key:0,class:"fa fa-close","aria-hidden":"true"},JA={key:1,class:"icon icon-expand-2","aria-hidden":"true"},QA={class:"visually-hidden"},eO={id:"workflow-stages",class:"visually-hidden"},tO=["id"],nO={key:0},oO={id:"workflow-transitions",class:"visually-hidden"},iO=["id"],rO={key:1,class:"d-flex justify-content-center align-items-center h-100",role:"status","aria-live":"polite"},sO={class:"spinner-border",role:"status"},lO={class:"visually-hidden"},aO={class:"ms-2"},uO={ref:"liveRegion","aria-live":"polite",role:"status",class:"visually-hidden","aria-atomic":"true"};function cO(e,t,n,o,i,r){const s=Wt("Background"),l=Wt("MiniMap"),a=Wt("CustomControls"),u=Wt("ControlsPanel"),c=Wt("VueFlow");return se(),he("div",UA,[!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:wn(()=>[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"]),Se(" Controls Section "),ee("section",XA,[ee("span",qA,me(e.translate("COM_WORKFLOW_GRAPH_CONTROLS")),1),Se(" Minimap Toggle "),ee("button",{id:"toggle-minimap",class:"toolbar-button custom-controls-button position-absolute z-20 ps-2 pe-2",tabindex:"0",style:Ue(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(),he("span",jA)):(se(),he("span",JA)),ee("span",QA,me(o.showMiniMap?e.translate("COM_WORKFLOW_GRAPH_MINIMAP_HIDE"):e.translate("COM_WORKFLOW_GRAPH_MINIMAP_SHOW")),1)],12,ZA),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"])):Se("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"])):Se("v-if",!0)]),Se(" Workflow Content Sections "),ee("section",eO,[ee("span",null,"("+me(o.positionedNodes.length)+" "+me(o.positionedNodes.length===1?e.translate("COM_WORKFLOW_GRAPH_STAGE"):e.translate("COM_WORKFLOW_GRAPH_STAGES"))+")",1),ee("ul",null,[(se(!0),he($e,null,to(o.positionedNodes,d=>(se(),he("li",{id:`stage-list-${d.id}`,key:`stage-${d.id}`},[zt(me(e.sprintf("COM_WORKFLOW_GRAPH_STAGE_REF",d.data.stage?.title))+" - "+me(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(),he("span",nO,"("+me(e.translate("COM_WORKFLOW_GRAPH_STAGE_DEFAULT"))+")",1)):Se("v-if",!0),zt(" "+me(d.data.stage?.description?e.sprintf("COM_WORKFLOW_GRAPH_STAGE_DESCRIPTION",d.data.stage?.description):""),1)],8,tO))),128))])]),ee("section",oO,[ee("span",null,"("+me(o.styledEdges.length)+" "+me(o.styledEdges.length===1?e.translate("COM_WORKFLOW_GRAPH_TRANSITION"):e.translate("COM_WORKFLOW_GRAPH_TRANSITIONS"))+")",1),ee("ul",null,[(se(!0),he($e,null,to(o.styledEdges,d=>(se(),he("li",{id:`transition-list-${d.id}`,key:`transition-${d.id}`},me(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))+" "+me(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,iO))),128))])])]),_:1},8,["edges","nodes","node-types","edge-types","nodes-connectable","aria-label","onConnect","onPaneClick","onEdgeClick","onNodeDragStop"])):Se("v-if",!0),Se(" Loading State "),o.loading?(se(),he("div",rO,[ee("div",sO,[ee("span",lO,me(e.translate("COM_WORKFLOW_GRAPH_LOADING")),1)]),ee("span",aO,me(e.translate("COM_WORKFLOW_GRAPH_LOADING")),1)])):Se("v-if",!0),Se(" Accessibility Live Region "),ee("div",uO,null,512)])}ga.render=cO,ga.__file="media_source/com_workflow/src/components/canvas/WorkflowCanvas.vue";const dO={id:"workflow-app",class:"d-flex flex-column flex-grow-1 min-vh-80","aria-labelledby":"workflow-main-title"},fO={id:"workflow-header",class:"d-flex flex-column flex-shrink-0"},hO={class:"d-flex flex-grow-1 overflow-hidden"},gO={id:"main-canvas",class:"flex-grow-1 position-relative","aria-describedby":"canvas-description"},pO={id:"canvas-description",class:"visually-hidden"},vO={name:"WorkflowGraphApp"};var mh=Object.assign(vO,{setup(e){const t=_c(),n=Ce("upToDate");function o(s){n.value=s}const i=Ce(null);function r(){i.value?.focus()}return Ct(()=>{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(),he("main",dO,[ee("header",fO,[Ne(nl,{"save-status":n.value},null,8,["save-status"])]),ee("div",hO,[ee("section",gO,[ee("div",pO,me(s.translate("COM_WORKFLOW_GRAPH_CANVAS_DESCRIPTION")),1),Ne(ga,{ref_key:"canvas",ref:i,"save-status":n.value,"set-save-status":o,onFocusRequest:r},null,8,["save-status"])])])]))}});mh.__file="media_source/com_workflow/src/components/App.vue";var mO=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))}},yO={workflowId:null,workflow:null,stages:[],transitions:[],loading:!1,error:null,canvas:{zoom:null,panX:null,panY:null}},_O={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 re({},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?re({},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 wO{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(re({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}ct.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;ct.success((s==null||(i=s.data)==null?void 0:i.message)||s?.message)}}catch(r){throw ct.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;ct.success((s==null||(i=s.data)==null?void 0:i.message)||s?.message)}}catch(r){throw ct.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 ct.error(o.message),o}}}var So=new wO,bO={async loadWorkflow(e,t){let n=e.commit;n("SET_LOADING",!0),n("SET_ERROR",null);try{const i=await Promise.all([await So.getWorkflow(t),await So.getStages(t),await So.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;ct.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){ct.error("COM_WORKFLOW_GRAPH_ERROR_STAGE_DEFAULT_CANT_DELETED");return}if(a.length>0){ct.error("COM_WORKFLOW_GRAPH_ERROR_STAGE_HAS_TRANSITIONS");return}const u=i.stages.find(c=>c.id.toString()===r).published===-1;await So.deleteStage(r,s,u)}catch(a){var l;ct.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 So.deleteTransition(r,s,a)}catch(a){var l;ct.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 So.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):(ct.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})}},SO={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 EO(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 xO=bv({state:yO,mutations:_O,actions:bO,getters:SO,plugins:[EO({key:"workflow-graph-state",paths:["workflowId","stages","transitions"]})]});const ls={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=ls.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 ls.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 ls.sprintf(t,...o)}}})};window.WorkflowGraph=window.WorkflowGraph||{},window.WorkflowGraph.Event=mO,document.addEventListener("DOMContentLoaded",()=>{const e=document.getElementById("workflow-graph-root");if(e){const t=Xp(mh);t.use(xO),t.use(ls),t.mount(e)}else ct.error("COM_WORKFLOW_GRAPH_API_NOT_SET")});
The same content is in 3 releases, Joomla 6.2.1-rc1 to 6.3.0-alpha1. See them all, or every version of this file.