@prsm/devtools 1.3.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/index-D2noU0f6.js +178 -0
- package/dist/client/assets/index-DJ9dcVQM.css +1 -0
- package/dist/client/index.html +2 -2
- package/package.json +10 -9
- package/src/index.js +215 -1
- package/dist/client/assets/index-BEgM9Z3B.css +0 -1
- package/dist/client/assets/index-DYVuye_Q.js +0 -178
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
var yh=Object.defineProperty;var _h=Object.getPrototypeOf;var bh=Reflect.get;var Pa=e=>{throw TypeError(e)};var wh=(e,t,n)=>t in e?yh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var q=(e,t,n)=>wh(e,typeof t!="symbol"?t+"":t,n),hl=(e,t,n)=>t.has(e)||Pa("Cannot "+n);var ot=(e,t,n)=>(hl(e,t,"read from private field"),n?n.call(e):t.get(e)),An=(e,t,n)=>t.has(e)?Pa("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Gt=(e,t,n,s)=>(hl(e,t,"write to private field"),s?s.call(e,n):t.set(e,n),n),gl=(e,t,n)=>(hl(e,t,"access private method"),n);var Oa=(e,t,n)=>bh(_h(e),n,t);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&s(l)}).observe(document,{childList:!0,subtree:!0});function n(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(r){if(r.ep)return;r.ep=!0;const o=n(r);fetch(r.href,o)}})();/**
|
|
2
|
+
* @vue/shared v3.5.34
|
|
3
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
|
+
* @license MIT
|
|
5
|
+
**/function Bi(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const je={},bs=[],an=()=>{},Qu=()=>!1,Mo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Do=e=>e.startsWith("onUpdate:"),st=Object.assign,Gi=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Ch=Object.prototype.hasOwnProperty,Pe=(e,t)=>Ch.call(e,t),ye=Array.isArray,ws=e=>Tr(e)==="[object Map]",Fo=e=>Tr(e)==="[object Set]",La=e=>Tr(e)==="[object Date]",Se=e=>typeof e=="function",He=e=>typeof e=="string",Pt=e=>typeof e=="symbol",Oe=e=>e!==null&&typeof e=="object",Zu=e=>(Oe(e)||Se(e))&&Se(e.then)&&Se(e.catch),ed=Object.prototype.toString,Tr=e=>ed.call(e),Sh=e=>Tr(e).slice(8,-1),td=e=>Tr(e)==="[object Object]",jo=e=>He(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,lr=Bi(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Bo=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},kh=/-\w/g,$t=Bo(e=>e.replace(kh,t=>t.slice(1).toUpperCase())),xh=/\B([A-Z])/g,Vn=Bo(e=>e.replace(xh,"-$1").toLowerCase()),Go=Bo(e=>e.charAt(0).toUpperCase()+e.slice(1)),ml=Bo(e=>e?`on${Go(e)}`:""),ln=(e,t)=>!Object.is(e,t),to=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},nd=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},Vo=e=>{const t=parseFloat(e);return isNaN(t)?e:t},$h=e=>{const t=He(e)?Number(e):NaN;return isNaN(t)?e:t};let Ma;const Uo=()=>Ma||(Ma=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function nt(e){if(ye(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=He(s)?Rh(s):nt(s);if(r)for(const o in r)t[o]=r[o]}return t}else if(He(e)||Oe(e))return e}const Eh=/;(?![^(]*\))/g,Ah=/:([^]+)/,Ih=/\/\*[^]*?\*\//g;function Rh(e){const t={};return e.replace(Ih,"").split(Eh).forEach(n=>{if(n){const s=n.split(Ah);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function ge(e){let t="";if(He(e))t=e;else if(ye(e))for(let n=0;n<e.length;n++){const s=ge(e[n]);s&&(t+=s+" ")}else if(Oe(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function Th(e){if(!e)return null;let{class:t,style:n}=e;return t&&!He(t)&&(e.class=ge(t)),n&&(e.style=nt(n)),e}const Nh="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Ph=Bi(Nh);function sd(e){return!!e||e===""}function Oh(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=Nr(e[s],t[s]);return n}function Nr(e,t){if(e===t)return!0;let n=La(e),s=La(t);if(n||s)return n&&s?e.getTime()===t.getTime():!1;if(n=Pt(e),s=Pt(t),n||s)return e===t;if(n=ye(e),s=ye(t),n||s)return n&&s?Oh(e,t):!1;if(n=Oe(e),s=Oe(t),n||s){if(!n||!s)return!1;const r=Object.keys(e).length,o=Object.keys(t).length;if(r!==o)return!1;for(const l in e){const i=e.hasOwnProperty(l),a=t.hasOwnProperty(l);if(i&&!a||!i&&a||!Nr(e[l],t[l]))return!1}}return String(e)===String(t)}function Lh(e,t){return e.findIndex(n=>Nr(n,t))}const rd=e=>!!(e&&e.__v_isRef===!0),E=e=>He(e)?e:e==null?"":ye(e)||Oe(e)&&(e.toString===ed||!Se(e.toString))?rd(e)?E(e.value):JSON.stringify(e,od,2):String(e),od=(e,t)=>rd(t)?od(e,t.value):ws(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],o)=>(n[vl(s,o)+" =>"]=r,n),{})}:Fo(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>vl(n))}:Pt(t)?vl(t):Oe(t)&&!ye(t)&&!td(t)?String(t):t,vl=(e,t="")=>{var n;return Pt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
|
|
6
|
+
* @vue/reactivity v3.5.34
|
|
7
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
8
|
+
* @license MIT
|
|
9
|
+
**/let it;class Mh{constructor(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&&it&&(it.active?(this.parent=it,this.index=(it.scopes||(it.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)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=it;try{return it=this,t()}finally{it=n}}}on(){++this._on===1&&(this.prevScope=it,it=this)}off(){if(this._on>0&&--this._on===0){if(it===this)it=this.prevScope;else{let t=it;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,s;for(n=0,s=this.effects.length;n<s;n++)this.effects[n].stop();for(this.effects.length=0,n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,s=this.scopes.length;n<s;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0}}}function ld(){return it}function Dh(e,t=!1){it&&it.cleanups.push(e)}let Ue;const yl=new WeakSet;class id{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,it&&(it.active?it.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,yl.has(this)&&(yl.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||cd(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Da(this),ud(this);const t=Ue,n=Ut;Ue=this,Ut=!0;try{return this.fn()}finally{dd(this),Ue=t,Ut=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Hi(t);this.deps=this.depsTail=void 0,Da(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?yl.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Jl(this)&&this.run()}get dirty(){return Jl(this)}}let ad=0,ir,ar;function cd(e,t=!1){if(e.flags|=8,t){e.next=ar,ar=e;return}e.next=ir,ir=e}function Vi(){ad++}function Ui(){if(--ad>0)return;if(ar){let t=ar;for(ar=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;ir;){let t=ir;for(ir=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function ud(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function dd(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),Hi(s),Fh(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function Jl(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(fd(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function fd(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===gr)||(e.globalVersion=gr,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Jl(e))))return;e.flags|=2;const t=e.dep,n=Ue,s=Ut;Ue=e,Ut=!0;try{ud(e);const r=e.fn(e._value);(t.version===0||ln(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{Ue=n,Ut=s,dd(e),e.flags&=-3}}function Hi(e,t=!1){const{dep:n,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)Hi(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Fh(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Ut=!0;const pd=[];function Cn(){pd.push(Ut),Ut=!1}function Sn(){const e=pd.pop();Ut=e===void 0?!0:e}function Da(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Ue;Ue=void 0;try{t()}finally{Ue=n}}}let gr=0;class jh{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 qi{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(!Ue||!Ut||Ue===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Ue)n=this.activeLink=new jh(Ue,this),Ue.deps?(n.prevDep=Ue.depsTail,Ue.depsTail.nextDep=n,Ue.depsTail=n):Ue.deps=Ue.depsTail=n,hd(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=Ue.depsTail,n.nextDep=void 0,Ue.depsTail.nextDep=n,Ue.depsTail=n,Ue.deps===n&&(Ue.deps=s)}return n}trigger(t){this.version++,gr++,this.notify(t)}notify(t){Vi();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Ui()}}}function hd(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)hd(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const co=new WeakMap,rs=Symbol(""),Ql=Symbol(""),mr=Symbol("");function yt(e,t,n){if(Ut&&Ue){let s=co.get(e);s||co.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new qi),r.map=s,r.key=n),r.track()}}function vn(e,t,n,s,r,o){const l=co.get(e);if(!l){gr++;return}const i=a=>{a&&a.trigger()};if(Vi(),t==="clear")l.forEach(i);else{const a=ye(e),c=a&&jo(n);if(a&&n==="length"){const u=Number(s);l.forEach((d,f)=>{(f==="length"||f===mr||!Pt(f)&&f>=u)&&i(d)})}else switch((n!==void 0||l.has(void 0))&&i(l.get(n)),c&&i(l.get(mr)),t){case"add":a?c&&i(l.get("length")):(i(l.get(rs)),ws(e)&&i(l.get(Ql)));break;case"delete":a||(i(l.get(rs)),ws(e)&&i(l.get(Ql)));break;case"set":ws(e)&&i(l.get(rs));break}}Ui()}function Bh(e,t){const n=co.get(e);return n&&n.get(t)}function fs(e){const t=Ae(e);return t===e?t:(yt(t,"iterate",mr),Tt(e)?t:t.map(zt))}function Ho(e){return yt(e=Ae(e),"iterate",mr),e}function rn(e,t){return kn(e)?Rs(os(e)?zt(t):t):zt(t)}const Gh={__proto__:null,[Symbol.iterator](){return _l(this,Symbol.iterator,e=>rn(this,e))},concat(...e){return fs(this).concat(...e.map(t=>ye(t)?fs(t):t))},entries(){return _l(this,"entries",e=>(e[1]=rn(this,e[1]),e))},every(e,t){return un(this,"every",e,t,void 0,arguments)},filter(e,t){return un(this,"filter",e,t,n=>n.map(s=>rn(this,s)),arguments)},find(e,t){return un(this,"find",e,t,n=>rn(this,n),arguments)},findIndex(e,t){return un(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return un(this,"findLast",e,t,n=>rn(this,n),arguments)},findLastIndex(e,t){return un(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return un(this,"forEach",e,t,void 0,arguments)},includes(...e){return bl(this,"includes",e)},indexOf(...e){return bl(this,"indexOf",e)},join(e){return fs(this).join(e)},lastIndexOf(...e){return bl(this,"lastIndexOf",e)},map(e,t){return un(this,"map",e,t,void 0,arguments)},pop(){return zs(this,"pop")},push(...e){return zs(this,"push",e)},reduce(e,...t){return Fa(this,"reduce",e,t)},reduceRight(e,...t){return Fa(this,"reduceRight",e,t)},shift(){return zs(this,"shift")},some(e,t){return un(this,"some",e,t,void 0,arguments)},splice(...e){return zs(this,"splice",e)},toReversed(){return fs(this).toReversed()},toSorted(e){return fs(this).toSorted(e)},toSpliced(...e){return fs(this).toSpliced(...e)},unshift(...e){return zs(this,"unshift",e)},values(){return _l(this,"values",e=>rn(this,e))}};function _l(e,t,n){const s=Ho(e),r=s[t]();return s!==e&&!Tt(e)&&(r._next=r.next,r.next=()=>{const o=r._next();return o.done||(o.value=n(o.value)),o}),r}const Vh=Array.prototype;function un(e,t,n,s,r,o){const l=Ho(e),i=l!==e&&!Tt(e),a=l[t];if(a!==Vh[t]){const d=a.apply(e,o);return i?zt(d):d}let c=n;l!==e&&(i?c=function(d,f){return n.call(this,rn(e,d),f,e)}:n.length>2&&(c=function(d,f){return n.call(this,d,f,e)}));const u=a.call(l,c,s);return i&&r?r(u):u}function Fa(e,t,n,s){const r=Ho(e),o=r!==e&&!Tt(e);let l=n,i=!1;r!==e&&(o?(i=s.length===0,l=function(c,u,d){return i&&(i=!1,c=rn(e,c)),n.call(this,c,rn(e,u),d,e)}):n.length>3&&(l=function(c,u,d){return n.call(this,c,u,d,e)}));const a=r[t](l,...s);return i?rn(e,a):a}function bl(e,t,n){const s=Ae(e);yt(s,"iterate",mr);const r=s[t](...n);return(r===-1||r===!1)&&qo(n[0])?(n[0]=Ae(n[0]),s[t](...n)):r}function zs(e,t,n=[]){Cn(),Vi();const s=Ae(e)[t].apply(e,n);return Ui(),Sn(),s}const Uh=Bi("__proto__,__v_isRef,__isVue"),gd=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Pt));function Hh(e){Pt(e)||(e=String(e));const t=Ae(this);return yt(t,"has",e),t.hasOwnProperty(e)}class md{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return o;if(n==="__v_raw")return s===(r?o?eg:bd:o?_d:yd).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const l=ye(t);if(!r){let a;if(l&&(a=Gh[n]))return a;if(n==="hasOwnProperty")return Hh}const i=Reflect.get(t,n,pt(t)?t:s);if((Pt(n)?gd.has(n):Uh(n))||(r||yt(t,"get",n),o))return i;if(pt(i)){const a=l&&jo(n)?i:i.value;return r&&Oe(a)?ei(a):a}return Oe(i)?r?ei(i):cs(i):i}}class vd extends md{constructor(t=!1){super(!1,t)}set(t,n,s,r){let o=t[n];const l=ye(t)&&jo(n);if(!this._isShallow){const c=kn(o);if(!Tt(s)&&!kn(s)&&(o=Ae(o),s=Ae(s)),!l&&pt(o)&&!pt(s))return c||(o.value=s),!0}const i=l?Number(n)<t.length:Pe(t,n),a=Reflect.set(t,n,s,pt(t)?t:r);return t===Ae(r)&&(i?ln(s,o)&&vn(t,"set",n,s):vn(t,"add",n,s)),a}deleteProperty(t,n){const s=Pe(t,n);t[n];const r=Reflect.deleteProperty(t,n);return r&&s&&vn(t,"delete",n,void 0),r}has(t,n){const s=Reflect.has(t,n);return(!Pt(n)||!gd.has(n))&&yt(t,"has",n),s}ownKeys(t){return yt(t,"iterate",ye(t)?"length":rs),Reflect.ownKeys(t)}}class qh extends md{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const zh=new vd,Wh=new qh,Kh=new vd(!0);const Zl=e=>e,Gr=e=>Reflect.getPrototypeOf(e);function Xh(e,t,n){return function(...s){const r=this.__v_raw,o=Ae(r),l=ws(o),i=e==="entries"||e===Symbol.iterator&&l,a=e==="keys"&&l,c=r[e](...s),u=n?Zl:t?Rs:zt;return!t&&yt(o,"iterate",a?Ql:rs),st(Object.create(c),{next(){const{value:d,done:f}=c.next();return f?{value:d,done:f}:{value:i?[u(d[0]),u(d[1])]:u(d),done:f}}})}}function Vr(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Yh(e,t){const n={get(r){const o=this.__v_raw,l=Ae(o),i=Ae(r);e||(ln(r,i)&&yt(l,"get",r),yt(l,"get",i));const{has:a}=Gr(l),c=t?Zl:e?Rs:zt;if(a.call(l,r))return c(o.get(r));if(a.call(l,i))return c(o.get(i));o!==l&&o.get(r)},get size(){const r=this.__v_raw;return!e&&yt(Ae(r),"iterate",rs),r.size},has(r){const o=this.__v_raw,l=Ae(o),i=Ae(r);return e||(ln(r,i)&&yt(l,"has",r),yt(l,"has",i)),r===i?o.has(r):o.has(r)||o.has(i)},forEach(r,o){const l=this,i=l.__v_raw,a=Ae(i),c=t?Zl:e?Rs:zt;return!e&&yt(a,"iterate",rs),i.forEach((u,d)=>r.call(o,c(u),c(d),l))}};return st(n,e?{add:Vr("add"),set:Vr("set"),delete:Vr("delete"),clear:Vr("clear")}:{add(r){const o=Ae(this),l=Gr(o),i=Ae(r),a=!t&&!Tt(r)&&!kn(r)?i:r;return l.has.call(o,a)||ln(r,a)&&l.has.call(o,r)||ln(i,a)&&l.has.call(o,i)||(o.add(a),vn(o,"add",a,a)),this},set(r,o){!t&&!Tt(o)&&!kn(o)&&(o=Ae(o));const l=Ae(this),{has:i,get:a}=Gr(l);let c=i.call(l,r);c||(r=Ae(r),c=i.call(l,r));const u=a.call(l,r);return l.set(r,o),c?ln(o,u)&&vn(l,"set",r,o):vn(l,"add",r,o),this},delete(r){const o=Ae(this),{has:l,get:i}=Gr(o);let a=l.call(o,r);a||(r=Ae(r),a=l.call(o,r)),i&&i.call(o,r);const c=o.delete(r);return a&&vn(o,"delete",r,void 0),c},clear(){const r=Ae(this),o=r.size!==0,l=r.clear();return o&&vn(r,"clear",void 0,void 0),l}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=Xh(r,e,t)}),n}function zi(e,t){const n=Yh(e,t);return(s,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(Pe(n,r)&&r in s?n:s,r,o)}const Jh={get:zi(!1,!1)},Qh={get:zi(!1,!0)},Zh={get:zi(!0,!1)};const yd=new WeakMap,_d=new WeakMap,bd=new WeakMap,eg=new WeakMap;function tg(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ng(e){return e.__v_skip||!Object.isExtensible(e)?0:tg(Sh(e))}function cs(e){return kn(e)?e:Wi(e,!1,zh,Jh,yd)}function wd(e){return Wi(e,!1,Kh,Qh,_d)}function ei(e){return Wi(e,!0,Wh,Zh,bd)}function Wi(e,t,n,s,r){if(!Oe(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=ng(e);if(o===0)return e;const l=r.get(e);if(l)return l;const i=new Proxy(e,o===2?s:n);return r.set(e,i),i}function os(e){return kn(e)?os(e.__v_raw):!!(e&&e.__v_isReactive)}function kn(e){return!!(e&&e.__v_isReadonly)}function Tt(e){return!!(e&&e.__v_isShallow)}function qo(e){return e?!!e.__v_raw:!1}function Ae(e){const t=e&&e.__v_raw;return t?Ae(t):e}function Cd(e){return!Pe(e,"__v_skip")&&Object.isExtensible(e)&&nd(e,"__v_skip",!0),e}const zt=e=>Oe(e)?cs(e):e,Rs=e=>Oe(e)?ei(e):e;function pt(e){return e?e.__v_isRef===!0:!1}function z(e){return Sd(e,!1)}function Ki(e){return Sd(e,!0)}function Sd(e,t){return pt(e)?e:new sg(e,t)}class sg{constructor(t,n){this.dep=new qi,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Ae(t),this._value=n?t:zt(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||Tt(t)||kn(t);t=s?t:Ae(t),ln(t,n)&&(this._rawValue=t,this._value=s?t:zt(t),this.dep.trigger())}}function rg(e){e.dep&&e.dep.trigger()}function G(e){return pt(e)?e.value:e}function vr(e){return Se(e)?e():G(e)}const og={get:(e,t,n)=>t==="__v_raw"?e:G(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return pt(r)&&!pt(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function kd(e){return os(e)?e:new Proxy(e,og)}function js(e){const t=ye(e)?new Array(e.length):{};for(const n in e)t[n]=ig(e,n);return t}class lg{constructor(t,n,s){this._object=t,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0,this._key=Pt(n)?n:String(n),this._raw=Ae(t);let r=!0,o=t;if(!ye(t)||Pt(this._key)||!jo(this._key))do r=!qo(o)||Tt(o);while(r&&(o=o.__v_raw));this._shallow=r}get value(){let t=this._object[this._key];return this._shallow&&(t=G(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&pt(this._raw[this._key])){const n=this._object[this._key];if(pt(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return Bh(this._raw,this._key)}}function ig(e,t,n){return new lg(e,t,n)}class ag{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new qi(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=gr-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&Ue!==this)return cd(this,!0),!0}get value(){const t=this.dep.track();return fd(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function cg(e,t,n=!1){let s,r;return Se(e)?s=e:(s=e.get,r=e.set),new ag(s,r,n)}const Ur={},uo=new WeakMap;let Wn;function ug(e,t=!1,n=Wn){if(n){let s=uo.get(n);s||uo.set(n,s=[]),s.push(e)}}function dg(e,t,n=je){const{immediate:s,deep:r,once:o,scheduler:l,augmentJob:i,call:a}=n,c=R=>r?R:Tt(R)||r===!1||r===0?yn(R,1):yn(R);let u,d,f,p,h=!1,v=!1;if(pt(e)?(d=()=>e.value,h=Tt(e)):os(e)?(d=()=>c(e),h=!0):ye(e)?(v=!0,h=e.some(R=>os(R)||Tt(R)),d=()=>e.map(R=>{if(pt(R))return R.value;if(os(R))return c(R);if(Se(R))return a?a(R,2):R()})):Se(e)?t?d=a?()=>a(e,2):e:d=()=>{if(f){Cn();try{f()}finally{Sn()}}const R=Wn;Wn=u;try{return a?a(e,3,[p]):e(p)}finally{Wn=R}}:d=an,t&&r){const R=d,j=r===!0?1/0:r;d=()=>yn(R(),j)}const _=ld(),y=()=>{u.stop(),_&&_.active&&Gi(_.effects,u)};if(o&&t){const R=t;t=(...j)=>{R(...j),y()}}let k=v?new Array(e.length).fill(Ur):Ur;const C=R=>{if(!(!(u.flags&1)||!u.dirty&&!R))if(t){const j=u.run();if(r||h||(v?j.some((O,L)=>ln(O,k[L])):ln(j,k))){f&&f();const O=Wn;Wn=u;try{const L=[j,k===Ur?void 0:v&&k[0]===Ur?[]:k,p];k=j,a?a(t,3,L):t(...L)}finally{Wn=O}}}else u.run()};return i&&i(C),u=new id(d),u.scheduler=l?()=>l(C,!1):C,p=R=>ug(R,!1,u),f=u.onStop=()=>{const R=uo.get(u);if(R){if(a)a(R,4);else for(const j of R)j();uo.delete(u)}},t?s?C(!0):k=u.run():l?l(C.bind(null,!0),!0):u.run(),y.pause=u.pause.bind(u),y.resume=u.resume.bind(u),y.stop=y,y}function yn(e,t=1/0,n){if(t<=0||!Oe(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,pt(e))yn(e.value,t,n);else if(ye(e))for(let s=0;s<e.length;s++)yn(e[s],t,n);else if(Fo(e)||ws(e))e.forEach(s=>{yn(s,t,n)});else if(td(e)){for(const s in e)yn(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&yn(e[s],t,n)}return e}/**
|
|
10
|
+
* @vue/runtime-core v3.5.34
|
|
11
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
12
|
+
* @license MIT
|
|
13
|
+
**/function Pr(e,t,n,s){try{return s?e(...s):e()}catch(r){zo(r,t,n)}}function Wt(e,t,n,s){if(Se(e)){const r=Pr(e,t,n,s);return r&&Zu(r)&&r.catch(o=>{zo(o,t,n)}),r}if(ye(e)){const r=[];for(let o=0;o<e.length;o++)r.push(Wt(e[o],t,n,s));return r}}function zo(e,t,n,s=!0){const r=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:l}=t&&t.appContext.config||je;if(t){let i=t.parent;const a=t.proxy,c=`https://vuejs.org/error-reference/#runtime-${n}`;for(;i;){const u=i.ec;if(u){for(let d=0;d<u.length;d++)if(u[d](e,a,c)===!1)return}i=i.parent}if(o){Cn(),Pr(o,null,10,[e,a,c]),Sn();return}}fg(e,n,r,s,l)}function fg(e,t,n,s=!0,r=!1){if(r)throw e;console.error(e)}const xt=[];let nn=-1;const Cs=[];let Ln=null,gs=0;const xd=Promise.resolve();let fo=null;function cn(e){const t=fo||xd;return e?t.then(this?e.bind(this):e):t}function pg(e){let t=nn+1,n=xt.length;for(;t<n;){const s=t+n>>>1,r=xt[s],o=yr(r);o<e||o===e&&r.flags&2?t=s+1:n=s}return t}function Xi(e){if(!(e.flags&1)){const t=yr(e),n=xt[xt.length-1];!n||!(e.flags&2)&&t>=yr(n)?xt.push(e):xt.splice(pg(t),0,e),e.flags|=1,$d()}}function $d(){fo||(fo=xd.then(Ad))}function hg(e){ye(e)?Cs.push(...e):Ln&&e.id===-1?Ln.splice(gs+1,0,e):e.flags&1||(Cs.push(e),e.flags|=1),$d()}function ja(e,t,n=nn+1){for(;n<xt.length;n++){const s=xt[n];if(s&&s.flags&2){if(e&&s.id!==e.uid)continue;xt.splice(n,1),n--,s.flags&4&&(s.flags&=-2),s(),s.flags&4||(s.flags&=-2)}}}function Ed(e){if(Cs.length){const t=[...new Set(Cs)].sort((n,s)=>yr(n)-yr(s));if(Cs.length=0,Ln){Ln.push(...t);return}for(Ln=t,gs=0;gs<Ln.length;gs++){const n=Ln[gs];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Ln=null,gs=0}}const yr=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Ad(e){try{for(nn=0;nn<xt.length;nn++){const t=xt[nn];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Pr(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;nn<xt.length;nn++){const t=xt[nn];t&&(t.flags&=-2)}nn=-1,xt.length=0,Ed(),fo=null,(xt.length||Cs.length)&&Ad()}}let mt=null,Id=null;function po(e){const t=mt;return mt=e,Id=e&&e.type.__scopeId||null,t}function I(e,t=mt,n){if(!t||e._n)return e;const s=(...r)=>{s._d&&mo(-1);const o=po(t);let l;try{l=e(...r)}finally{po(o),s._d&&mo(1)}return l};return s._n=!0,s._c=!0,s._d=!0,s}function Hr(e,t){if(mt===null)return e;const n=Jo(mt),s=e.dirs||(e.dirs=[]);for(let r=0;r<t.length;r++){let[o,l,i,a=je]=t[r];o&&(Se(o)&&(o={mounted:o,updated:o}),o.deep&&yn(l),s.push({dir:o,instance:n,value:l,oldValue:void 0,arg:i,modifiers:a}))}return e}function Un(e,t,n,s){const r=e.dirs,o=t&&t.dirs;for(let l=0;l<r.length;l++){const i=r[l];o&&(i.oldValue=o[l].value);let a=i.dir[s];a&&(Cn(),Wt(a,n,8,[e.el,i,e,t]),Sn())}}function Ss(e,t){if(_t){let n=_t.provides;const s=_t.parent&&_t.parent.provides;s===n&&(n=_t.provides=Object.create(s)),n[e]=t}}function Nt(e,t,n=!1){const s=En();if(s||$s){let r=$s?$s._context.provides:s?s.parent==null||s.ce?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return n&&Se(t)?t.call(s&&s.proxy):t}}const gg=Symbol.for("v-scx"),mg=()=>Nt(gg);function ks(e,t){return Yi(e,null,t)}function Re(e,t,n){return Yi(e,t,n)}function Yi(e,t,n=je){const{immediate:s,deep:r,flush:o,once:l}=n,i=st({},n),a=t&&s||!t&&o!=="post";let c;if(Cr){if(o==="sync"){const p=mg();c=p.__watcherHandles||(p.__watcherHandles=[])}else if(!a){const p=()=>{};return p.stop=an,p.resume=an,p.pause=an,p}}const u=_t;i.call=(p,h,v)=>Wt(p,u,h,v);let d=!1;o==="post"?i.scheduler=p=>{St(p,u&&u.suspense)}:o!=="sync"&&(d=!0,i.scheduler=(p,h)=>{h?p():Xi(p)}),i.augmentJob=p=>{t&&(p.flags|=4),d&&(p.flags|=2,u&&(p.id=u.uid,p.i=u))};const f=dg(e,t,i);return Cr&&(c?c.push(f):a&&f()),f}function vg(e,t,n){const s=this.proxy,r=He(e)?e.includes(".")?Rd(s,e):()=>s[e]:e.bind(s,s);let o;Se(t)?o=t:(o=t.handler,n=t);const l=Lr(this),i=Yi(r,o.bind(s),n);return l(),i}function Rd(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;r<n.length&&s;r++)s=s[n[r]];return s}}const Tn=new WeakMap,Td=Symbol("_vte"),Nd=e=>e.__isTeleport,Kn=e=>e&&(e.disabled||e.disabled===""),yg=e=>e&&(e.defer||e.defer===""),Ba=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Ga=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,ti=(e,t)=>{const n=e&&e.to;return He(n)?t?t(n):null:n},_g={name:"Teleport",__isTeleport:!0,process(e,t,n,s,r,o,l,i,a,c){const{mc:u,pc:d,pbc:f,o:{insert:p,querySelector:h,createText:v,createComment:_,parentNode:y}}=c,k=Kn(t.props);let{dynamicChildren:C}=t;const R=(L,U,P)=>{L.shapeFlag&16&&u(L.children,U,P,r,o,l,i,a)},j=(L=t)=>{const U=Kn(L.props),P=L.target=ti(L.props,h),D=ni(P,L,v,p);P&&(l!=="svg"&&Ba(P)?l="svg":l!=="mathml"&&Ga(P)&&(l="mathml"),r&&r.isCE&&(r.ce._teleportTargets||(r.ce._teleportTargets=new Set)).add(P),U||(R(L,P,D),er(L,!1)))},O=L=>{const U=()=>{if(Tn.get(L)===U){if(Tn.delete(L),Kn(L.props)){const P=y(L.el)||n;R(L,P,L.anchor),er(L,!0)}j(L)}};Tn.set(L,U),St(U,o)};if(e==null){const L=t.el=v(""),U=t.anchor=v("");if(p(L,n,s),p(U,n,s),yg(t.props)||o&&o.pendingBranch){O(t);return}k&&(R(t,n,U),er(t,!0)),j()}else{t.el=e.el;const L=t.anchor=e.anchor,U=Tn.get(e);if(U){U.flags|=8,Tn.delete(e),O(t);return}t.targetStart=e.targetStart;const P=t.target=e.target,D=t.targetAnchor=e.targetAnchor,Y=Kn(e.props),x=Y?n:P,M=Y?L:D;if(l==="svg"||Ba(P)?l="svg":(l==="mathml"||Ga(P))&&(l="mathml"),C?(f(e.dynamicChildren,C,x,r,o,l,i),ta(e,t,!0)):a||d(e,t,x,M,r,o,l,i,!1),k)Y?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):qr(t,n,L,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const V=t.target=ti(t.props,h);V&&qr(t,V,null,c,0)}else Y&&qr(t,P,D,c,1);er(t,k)}},remove(e,t,n,{um:s,o:{remove:r}},o){const{shapeFlag:l,children:i,anchor:a,targetStart:c,targetAnchor:u,target:d,props:f}=e;let p=o||!Kn(f);const h=Tn.get(e);if(h&&(h.flags|=8,Tn.delete(e),p=!1),d&&(r(c),r(u)),o&&r(a),l&16)for(let v=0;v<i.length;v++){const _=i[v];s(_,t,n,p,!!_.dynamicChildren)}},move:qr,hydrate:bg};function qr(e,t,n,{o:{insert:s},m:r},o=2){o===0&&s(e.targetAnchor,t,n);const{el:l,anchor:i,shapeFlag:a,children:c,props:u}=e,d=o===2;if(d&&s(l,t,n),!Tn.has(e)&&(!d||Kn(u))&&a&16)for(let f=0;f<c.length;f++)r(c[f],t,n,2);d&&s(i,t,n)}function bg(e,t,n,s,r,o,{o:{nextSibling:l,parentNode:i,querySelector:a,insert:c,createText:u}},d){function f(_,y){let k=y;for(;k;){if(k&&k.nodeType===8){if(k.data==="teleport start anchor")t.targetStart=k;else if(k.data==="teleport anchor"){t.targetAnchor=k,_._lpa=t.targetAnchor&&l(t.targetAnchor);break}}k=l(k)}}function p(_,y){y.anchor=d(l(_),y,i(_),n,s,r,o)}const h=t.target=ti(t.props,a),v=Kn(t.props);if(h){const _=h._lpa||h.firstChild;t.shapeFlag&16&&(v?(p(e,t),f(h,_),t.targetAnchor||ni(h,t,u,c,i(e)===h?e:null)):(t.anchor=l(e),f(h,_),t.targetAnchor||ni(h,t,u,c),d(_&&l(_),t,h,n,s,r,o))),er(t,v)}else v&&t.shapeFlag&16&&(p(e,t),t.targetStart=e,t.targetAnchor=l(e));return t.anchor&&l(t.anchor)}const Pd=_g;function er(e,t){const n=e.ctx;if(n&&n.ut){let s,r;for(t?(s=e.el,r=e.anchor):(s=e.targetStart,r=e.targetAnchor);s&&s!==r;)s.nodeType===1&&s.setAttribute("data-v-owner",n.uid),s=s.nextSibling;n.ut()}}function ni(e,t,n,s,r=null){const o=t.targetStart=n(""),l=t.targetAnchor=n("");return o[Td]=l,e&&(s(o,e,r),s(l,e,r)),l}const sn=Symbol("_leaveCb"),Ws=Symbol("_enterCb");function Od(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return De(()=>{e.isMounted=!0}),us(()=>{e.isUnmounting=!0}),e}const Mt=[Function,Array],Ld={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Mt,onEnter:Mt,onAfterEnter:Mt,onEnterCancelled:Mt,onBeforeLeave:Mt,onLeave:Mt,onAfterLeave:Mt,onLeaveCancelled:Mt,onBeforeAppear:Mt,onAppear:Mt,onAfterAppear:Mt,onAppearCancelled:Mt},Md=e=>{const t=e.subTree;return t.component?Md(t.component):t},wg={name:"BaseTransition",props:Ld,setup(e,{slots:t}){const n=En(),s=Od();return()=>{const r=t.default&&Ji(t.default(),!0),o=r&&r.length?Dd(r):n.subTree?K():void 0;if(!o)return;const l=Ae(e),{mode:i}=l;if(s.isLeaving)return wl(o);const a=Va(o);if(!a)return wl(o);let c=_r(a,l,s,n,d=>c=d);a.type!==gt&&ls(a,c);let u=n.subTree&&Va(n.subTree);if(u&&u.type!==gt&&!Xn(u,a)&&Md(n).type!==gt){let d=_r(u,l,s,n);if(ls(u,d),i==="out-in"&&a.type!==gt)return s.isLeaving=!0,d.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,u=void 0},wl(o);i==="in-out"&&a.type!==gt?d.delayLeave=(f,p,h)=>{const v=Fd(s,u);v[String(u.key)]=u,f[sn]=()=>{p(),f[sn]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{h(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return o}}};function Dd(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==gt){t=n;break}}return t}const Cg=wg;function Fd(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function _r(e,t,n,s,r){const{appear:o,mode:l,persisted:i=!1,onBeforeEnter:a,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:f,onLeave:p,onAfterLeave:h,onLeaveCancelled:v,onBeforeAppear:_,onAppear:y,onAfterAppear:k,onAppearCancelled:C}=t,R=String(e.key),j=Fd(n,e),O=(P,D)=>{P&&Wt(P,s,9,D)},L=(P,D)=>{const Y=D[1];O(P,D),ye(P)?P.every(x=>x.length<=1)&&Y():P.length<=1&&Y()},U={mode:l,persisted:i,beforeEnter(P){let D=a;if(!n.isMounted)if(o)D=_||a;else return;P[sn]&&P[sn](!0);const Y=j[R];Y&&Xn(e,Y)&&Y.el[sn]&&Y.el[sn](),O(D,[P])},enter(P){if(j[R]===e)return;let D=c,Y=u,x=d;if(!n.isMounted)if(o)D=y||c,Y=k||u,x=C||d;else return;let M=!1;P[Ws]=fe=>{M||(M=!0,fe?O(x,[P]):O(Y,[P]),U.delayedLeave&&U.delayedLeave(),P[Ws]=void 0)};const V=P[Ws].bind(null,!1);D?L(D,[P,V]):V()},leave(P,D){const Y=String(e.key);if(P[Ws]&&P[Ws](!0),n.isUnmounting)return D();O(f,[P]);let x=!1;P[sn]=V=>{x||(x=!0,D(),V?O(v,[P]):O(h,[P]),P[sn]=void 0,j[Y]===e&&delete j[Y])};const M=P[sn].bind(null,!1);j[Y]=e,p?L(p,[P,M]):M()},clone(P){const D=_r(P,t,n,s,r);return r&&r(D),D}};return U}function wl(e){if(Wo(e))return e=xn(e),e.children=null,e}function Va(e){if(!Wo(e))return Nd(e.type)&&e.children?Dd(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&Se(n.default))return n.default()}}function ls(e,t){e.shapeFlag&6&&e.component?(e.transition=t,ls(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Ji(e,t=!1,n){let s=[],r=0;for(let o=0;o<e.length;o++){let l=e[o];const i=n==null?l.key:String(n)+String(l.key!=null?l.key:o);l.type===te?(l.patchFlag&128&&r++,s=s.concat(Ji(l.children,t,i))):(t||l.type!==gt)&&s.push(i!=null?xn(l,{key:i}):l)}if(r>1)for(let o=0;o<s.length;o++)s[o].patchFlag=-2;return s}function Le(e,t){return Se(e)?st({name:e.name},t,{setup:e}):e}function Cl(){const e=En();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function jd(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Ua(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const ho=new WeakMap;function cr(e,t,n,s,r=!1){if(ye(e)){e.forEach((v,_)=>cr(v,t&&(ye(t)?t[_]:t),n,s,r));return}if(xs(s)&&!r){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&cr(e,t,n,s.component.subTree);return}const o=s.shapeFlag&4?Jo(s.component):s.el,l=r?null:o,{i,r:a}=e,c=t&&t.r,u=i.refs===je?i.refs={}:i.refs,d=i.setupState,f=Ae(d),p=d===je?Qu:v=>Ua(u,v)?!1:Pe(f,v),h=(v,_)=>!(_&&Ua(u,_));if(c!=null&&c!==a){if(Ha(t),He(c))u[c]=null,p(c)&&(d[c]=null);else if(pt(c)){const v=t;h(c,v.k)&&(c.value=null),v.k&&(u[v.k]=null)}}if(Se(a))Pr(a,i,12,[l,u]);else{const v=He(a),_=pt(a);if(v||_){const y=()=>{if(e.f){const k=v?p(a)?d[a]:u[a]:h()||!e.k?a.value:u[e.k];if(r)ye(k)&&Gi(k,o);else if(ye(k))k.includes(o)||k.push(o);else if(v)u[a]=[o],p(a)&&(d[a]=u[a]);else{const C=[o];h(a,e.k)&&(a.value=C),e.k&&(u[e.k]=C)}}else v?(u[a]=l,p(a)&&(d[a]=l)):_&&(h(a,e.k)&&(a.value=l),e.k&&(u[e.k]=l))};if(l){const k=()=>{y(),ho.delete(e)};k.id=-1,ho.set(e,k),St(k,n)}else Ha(e),y()}}}function Ha(e){const t=ho.get(e);t&&(t.flags|=8,ho.delete(e))}Uo().requestIdleCallback;Uo().cancelIdleCallback;const xs=e=>!!e.type.__asyncLoader,Wo=e=>e.type.__isKeepAlive;function Sg(e,t){Bd(e,"a",t)}function kg(e,t){Bd(e,"da",t)}function Bd(e,t,n=_t){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(Ko(t,s,n),n){let r=n.parent;for(;r&&r.parent;)Wo(r.parent.vnode)&&xg(s,t,n,r),r=r.parent}}function xg(e,t,n,s){const r=Ko(t,e,s,!0);ct(()=>{Gi(s[t],r)},n)}function Ko(e,t,n=_t,s=!1){if(n){const r=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...l)=>{Cn();const i=Lr(n),a=Wt(t,n,e,l);return i(),Sn(),a});return s?r.unshift(o):r.push(o),o}}const $n=e=>(t,n=_t)=>{(!Cr||e==="sp")&&Ko(e,(...s)=>t(...s),n)},$g=$n("bm"),De=$n("m"),Eg=$n("bu"),Qi=$n("u"),us=$n("bum"),ct=$n("um"),Ag=$n("sp"),Ig=$n("rtg"),Rg=$n("rtc");function Tg(e,t=_t){Ko("ec",e,t)}const Gd="components";function Vd(e,t){return Hd(Gd,e,!0,t)||e}const Ud=Symbol.for("v-ndc");function Or(e){return He(e)?Hd(Gd,e,!1)||e:e||Ud}function Hd(e,t,n=!0,s=!1){const r=mt||_t;if(r){const o=r.type;{const i=hm(o,!1);if(i&&(i===t||i===$t(t)||i===Go($t(t))))return o}const l=qa(r[e]||o[e],t)||qa(r.appContext[e],t);return!l&&s?o:l}}function qa(e,t){return e&&(e[t]||e[$t(t)]||e[Go($t(t))])}function pe(e,t,n,s){let r;const o=n,l=ye(e);if(l||He(e)){const i=l&&os(e);let a=!1,c=!1;i&&(a=!Tt(e),c=kn(e),e=Ho(e)),r=new Array(e.length);for(let u=0,d=e.length;u<d;u++)r[u]=t(a?c?Rs(zt(e[u])):zt(e[u]):e[u],u,void 0,o)}else if(typeof e=="number"){r=new Array(e);for(let i=0;i<e;i++)r[i]=t(i+1,i,void 0,o)}else if(Oe(e))if(e[Symbol.iterator])r=Array.from(e,(i,a)=>t(i,a,void 0,o));else{const i=Object.keys(e);r=new Array(i.length);for(let a=0,c=i.length;a<c;a++){const u=i[a];r[a]=t(e[u],u,a,o)}}else r=[];return r}function ue(e,t,n={},s,r){if(mt.ce||mt.parent&&xs(mt.parent)&&mt.parent.ce){const c=Object.keys(n).length>0;return t!=="default"&&(n.name=t),m(),J(te,null,[N("slot",n,s&&s())],c?-2:64)}let o=e[t];o&&o._c&&(o._d=!1),m();const l=o&&qd(o(n)),i=n.key||l&&l.key,a=J(te,{key:(i&&!Pt(i)?i:`_${t}`)+(!l&&s?"_fb":"")},l||(s?s():[]),l&&e._===1?64:-2);return!r&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),o&&o._c&&(o._d=!0),a}function qd(e){return e.some(t=>wr(t)?!(t.type===gt||t.type===te&&!qd(t.children)):!0)?e:null}const si=e=>e?ff(e)?Jo(e):si(e.parent):null,ur=st(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=>si(e.parent),$root:e=>si(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Wd(e),$forceUpdate:e=>e.f||(e.f=()=>{Xi(e.update)}),$nextTick:e=>e.n||(e.n=cn.bind(e.proxy)),$watch:e=>vg.bind(e)}),Sl=(e,t)=>e!==je&&!e.__isScriptSetup&&Pe(e,t),Ng={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:o,accessCache:l,type:i,appContext:a}=e;if(t[0]!=="$"){const f=l[t];if(f!==void 0)switch(f){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return o[t]}else{if(Sl(s,t))return l[t]=1,s[t];if(r!==je&&Pe(r,t))return l[t]=2,r[t];if(Pe(o,t))return l[t]=3,o[t];if(n!==je&&Pe(n,t))return l[t]=4,n[t];ri&&(l[t]=0)}}const c=ur[t];let u,d;if(c)return t==="$attrs"&&yt(e.attrs,"get",""),c(e);if((u=i.__cssModules)&&(u=u[t]))return u;if(n!==je&&Pe(n,t))return l[t]=4,n[t];if(d=a.config.globalProperties,Pe(d,t))return d[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:o}=e;return Sl(r,t)?(r[t]=n,!0):s!==je&&Pe(s,t)?(s[t]=n,!0):Pe(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,props:o,type:l}},i){let a;return!!(n[i]||e!==je&&i[0]!=="$"&&Pe(e,i)||Sl(t,i)||Pe(o,i)||Pe(s,i)||Pe(ur,i)||Pe(r.config.globalProperties,i)||(a=l.__cssModules)&&a[i])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Pe(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Pg(){return Og().slots}function Og(e){const t=En();return t.setupContext||(t.setupContext=hf(t))}function za(e){return ye(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let ri=!0;function Lg(e){const t=Wd(e),n=e.proxy,s=e.ctx;ri=!1,t.beforeCreate&&Wa(t.beforeCreate,e,"bc");const{data:r,computed:o,methods:l,watch:i,provide:a,inject:c,created:u,beforeMount:d,mounted:f,beforeUpdate:p,updated:h,activated:v,deactivated:_,beforeDestroy:y,beforeUnmount:k,destroyed:C,unmounted:R,render:j,renderTracked:O,renderTriggered:L,errorCaptured:U,serverPrefetch:P,expose:D,inheritAttrs:Y,components:x,directives:M,filters:V}=t;if(c&&Mg(c,s,null),l)for(const _e in l){const de=l[_e];Se(de)&&(s[_e]=de.bind(n))}if(r){const _e=r.call(n,n);Oe(_e)&&(e.data=cs(_e))}if(ri=!0,o)for(const _e in o){const de=o[_e],Te=Se(de)?de.bind(n,n):Se(de.get)?de.get.bind(n,n):an,Be=!Se(de)&&Se(de.set)?de.set.bind(n):an,Ze=W({get:Te,set:Be});Object.defineProperty(s,_e,{enumerable:!0,configurable:!0,get:()=>Ze.value,set:qe=>Ze.value=qe})}if(i)for(const _e in i)zd(i[_e],s,n,_e);if(a){const _e=Se(a)?a.call(n):a;Reflect.ownKeys(_e).forEach(de=>{Ss(de,_e[de])})}u&&Wa(u,e,"c");function me(_e,de){ye(de)?de.forEach(Te=>_e(Te.bind(n))):de&&_e(de.bind(n))}if(me($g,d),me(De,f),me(Eg,p),me(Qi,h),me(Sg,v),me(kg,_),me(Tg,U),me(Rg,O),me(Ig,L),me(us,k),me(ct,R),me(Ag,P),ye(D))if(D.length){const _e=e.exposed||(e.exposed={});D.forEach(de=>{Object.defineProperty(_e,de,{get:()=>n[de],set:Te=>n[de]=Te,enumerable:!0})})}else e.exposed||(e.exposed={});j&&e.render===an&&(e.render=j),Y!=null&&(e.inheritAttrs=Y),x&&(e.components=x),M&&(e.directives=M),P&&jd(e)}function Mg(e,t,n=an){ye(e)&&(e=oi(e));for(const s in e){const r=e[s];let o;Oe(r)?"default"in r?o=Nt(r.from||s,r.default,!0):o=Nt(r.from||s):o=Nt(r),pt(o)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>o.value,set:l=>o.value=l}):t[s]=o}}function Wa(e,t,n){Wt(ye(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function zd(e,t,n,s){let r=s.includes(".")?Rd(n,s):()=>n[s];if(He(e)){const o=t[e];Se(o)&&Re(r,o)}else if(Se(e))Re(r,e.bind(n));else if(Oe(e))if(ye(e))e.forEach(o=>zd(o,t,n,s));else{const o=Se(e.handler)?e.handler.bind(n):t[e.handler];Se(o)&&Re(r,o,e)}}function Wd(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:o,config:{optionMergeStrategies:l}}=e.appContext,i=o.get(t);let a;return i?a=i:!r.length&&!n&&!s?a=t:(a={},r.length&&r.forEach(c=>go(a,c,l,!0)),go(a,t,l)),Oe(t)&&o.set(t,a),a}function go(e,t,n,s=!1){const{mixins:r,extends:o}=t;o&&go(e,o,n,!0),r&&r.forEach(l=>go(e,l,n,!0));for(const l in t)if(!(s&&l==="expose")){const i=Dg[l]||n&&n[l];e[l]=i?i(e[l],t[l]):t[l]}return e}const Dg={data:Ka,props:Xa,emits:Xa,methods:tr,computed:tr,beforeCreate:Ct,created:Ct,beforeMount:Ct,mounted:Ct,beforeUpdate:Ct,updated:Ct,beforeDestroy:Ct,beforeUnmount:Ct,destroyed:Ct,unmounted:Ct,activated:Ct,deactivated:Ct,errorCaptured:Ct,serverPrefetch:Ct,components:tr,directives:tr,watch:jg,provide:Ka,inject:Fg};function Ka(e,t){return t?e?function(){return st(Se(e)?e.call(this,this):e,Se(t)?t.call(this,this):t)}:t:e}function Fg(e,t){return tr(oi(e),oi(t))}function oi(e){if(ye(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Ct(e,t){return e?[...new Set([].concat(e,t))]:t}function tr(e,t){return e?st(Object.create(null),e,t):t}function Xa(e,t){return e?ye(e)&&ye(t)?[...new Set([...e,...t])]:st(Object.create(null),za(e),za(t??{})):t}function jg(e,t){if(!e)return t;if(!t)return e;const n=st(Object.create(null),e);for(const s in t)n[s]=Ct(e[s],t[s]);return n}function Kd(){return{app:null,config:{isNativeTag:Qu,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 Bg=0;function Gg(e,t){return function(s,r=null){Se(s)||(s=st({},s)),r!=null&&!Oe(r)&&(r=null);const o=Kd(),l=new WeakSet,i=[];let a=!1;const c=o.app={_uid:Bg++,_component:s,_props:r,_container:null,_context:o,_instance:null,version:mm,get config(){return o.config},set config(u){},use(u,...d){return l.has(u)||(u&&Se(u.install)?(l.add(u),u.install(c,...d)):Se(u)&&(l.add(u),u(c,...d))),c},mixin(u){return o.mixins.includes(u)||o.mixins.push(u),c},component(u,d){return d?(o.components[u]=d,c):o.components[u]},directive(u,d){return d?(o.directives[u]=d,c):o.directives[u]},mount(u,d,f){if(!a){const p=c._ceVNode||N(s,r);return p.appContext=o,f===!0?f="svg":f===!1&&(f=void 0),e(p,u,f),a=!0,c._container=u,u.__vue_app__=c,Jo(p.component)}},onUnmount(u){i.push(u)},unmount(){a&&(Wt(i,c._instance,16),e(null,c._container),delete c._container.__vue_app__)},provide(u,d){return o.provides[u]=d,c},runWithContext(u){const d=$s;$s=c;try{return u()}finally{$s=d}}};return c}}let $s=null;const Vg=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${$t(t)}Modifiers`]||e[`${Vn(t)}Modifiers`];function Ug(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||je;let r=n;const o=t.startsWith("update:"),l=o&&Vg(s,t.slice(7));l&&(l.trim&&(r=n.map(u=>He(u)?u.trim():u)),l.number&&(r=n.map(Vo)));let i,a=s[i=ml(t)]||s[i=ml($t(t))];!a&&o&&(a=s[i=ml(Vn(t))]),a&&Wt(a,e,6,r);const c=s[i+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[i])return;e.emitted[i]=!0,Wt(c,e,6,r)}}const Hg=new WeakMap;function Xd(e,t,n=!1){const s=n?Hg:t.emitsCache,r=s.get(e);if(r!==void 0)return r;const o=e.emits;let l={},i=!1;if(!Se(e)){const a=c=>{const u=Xd(c,t,!0);u&&(i=!0,st(l,u))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!o&&!i?(Oe(e)&&s.set(e,null),null):(ye(o)?o.forEach(a=>l[a]=null):st(l,o),Oe(e)&&s.set(e,l),l)}function Xo(e,t){return!e||!Mo(t)?!1:(t=t.slice(2).replace(/Once$/,""),Pe(e,t[0].toLowerCase()+t.slice(1))||Pe(e,Vn(t))||Pe(e,t))}function Ya(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[o],slots:l,attrs:i,emit:a,render:c,renderCache:u,props:d,data:f,setupState:p,ctx:h,inheritAttrs:v}=e,_=po(e);let y,k;try{if(n.shapeFlag&4){const R=r||s,j=R;y=on(c.call(j,R,u,d,p,f,h)),k=i}else{const R=t;y=on(R.length>1?R(d,{attrs:i,slots:l,emit:a}):R(d,null)),k=t.props?i:qg(i)}}catch(R){dr.length=0,zo(R,e,1),y=N(gt)}let C=y;if(k&&v!==!1){const R=Object.keys(k),{shapeFlag:j}=C;R.length&&j&7&&(o&&R.some(Do)&&(k=zg(k,o)),C=xn(C,k,!1,!0))}return n.dirs&&(C=xn(C,null,!1,!0),C.dirs=C.dirs?C.dirs.concat(n.dirs):n.dirs),n.transition&&ls(C,n.transition),y=C,po(_),y}const qg=e=>{let t;for(const n in e)(n==="class"||n==="style"||Mo(n))&&((t||(t={}))[n]=e[n]);return t},zg=(e,t)=>{const n={};for(const s in e)(!Do(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Wg(e,t,n){const{props:s,children:r,component:o}=e,{props:l,children:i,patchFlag:a}=t,c=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return s?Ja(s,l,c):!!l;if(a&8){const u=t.dynamicProps;for(let d=0;d<u.length;d++){const f=u[d];if(Yd(l,s,f)&&!Xo(c,f))return!0}}}else return(r||i)&&(!i||!i.$stable)?!0:s===l?!1:s?l?Ja(s,l,c):!0:!!l;return!1}function Ja(e,t,n){const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!0;for(let r=0;r<s.length;r++){const o=s[r];if(Yd(t,e,o)&&!Xo(n,o))return!0}return!1}function Yd(e,t,n){const s=e[n],r=t[n];return n==="style"&&Oe(s)&&Oe(r)?!Nr(s,r):s!==r}function Kg({vnode:e,parent:t,suspense:n},s){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.suspense.vnode.el=r.el=s,e=r),r===e)(e=t.vnode).el=s,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=s)}const Jd={},Qd=()=>Object.create(Jd),Zd=e=>Object.getPrototypeOf(e)===Jd;function Xg(e,t,n,s=!1){const r={},o=Qd();e.propsDefaults=Object.create(null),ef(e,t,r,o);for(const l in e.propsOptions[0])l in r||(r[l]=void 0);n?e.props=s?r:wd(r):e.type.props?e.props=r:e.props=o,e.attrs=o}function Yg(e,t,n,s){const{props:r,attrs:o,vnode:{patchFlag:l}}=e,i=Ae(r),[a]=e.propsOptions;let c=!1;if((s||l>0)&&!(l&16)){if(l&8){const u=e.vnode.dynamicProps;for(let d=0;d<u.length;d++){let f=u[d];if(Xo(e.emitsOptions,f))continue;const p=t[f];if(a)if(Pe(o,f))p!==o[f]&&(o[f]=p,c=!0);else{const h=$t(f);r[h]=li(a,i,h,p,e,!1)}else p!==o[f]&&(o[f]=p,c=!0)}}}else{ef(e,t,r,o)&&(c=!0);let u;for(const d in i)(!t||!Pe(t,d)&&((u=Vn(d))===d||!Pe(t,u)))&&(a?n&&(n[d]!==void 0||n[u]!==void 0)&&(r[d]=li(a,i,d,void 0,e,!0)):delete r[d]);if(o!==i)for(const d in o)(!t||!Pe(t,d))&&(delete o[d],c=!0)}c&&vn(e.attrs,"set","")}function ef(e,t,n,s){const[r,o]=e.propsOptions;let l=!1,i;if(t)for(let a in t){if(lr(a))continue;const c=t[a];let u;r&&Pe(r,u=$t(a))?!o||!o.includes(u)?n[u]=c:(i||(i={}))[u]=c:Xo(e.emitsOptions,a)||(!(a in s)||c!==s[a])&&(s[a]=c,l=!0)}if(o){const a=Ae(n),c=i||je;for(let u=0;u<o.length;u++){const d=o[u];n[d]=li(r,a,d,c[d],e,!Pe(c,d))}}return l}function li(e,t,n,s,r,o){const l=e[n];if(l!=null){const i=Pe(l,"default");if(i&&s===void 0){const a=l.default;if(l.type!==Function&&!l.skipFactory&&Se(a)){const{propsDefaults:c}=r;if(n in c)s=c[n];else{const u=Lr(r);s=c[n]=a.call(null,t),u()}}else s=a;r.ce&&r.ce._setProp(n,s)}l[0]&&(o&&!i?s=!1:l[1]&&(s===""||s===Vn(n))&&(s=!0))}return s}const Jg=new WeakMap;function tf(e,t,n=!1){const s=n?Jg:t.propsCache,r=s.get(e);if(r)return r;const o=e.props,l={},i=[];let a=!1;if(!Se(e)){const u=d=>{a=!0;const[f,p]=tf(d,t,!0);st(l,f),p&&i.push(...p)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!o&&!a)return Oe(e)&&s.set(e,bs),bs;if(ye(o))for(let u=0;u<o.length;u++){const d=$t(o[u]);Qa(d)&&(l[d]=je)}else if(o)for(const u in o){const d=$t(u);if(Qa(d)){const f=o[u],p=l[d]=ye(f)||Se(f)?{type:f}:st({},f),h=p.type;let v=!1,_=!0;if(ye(h))for(let y=0;y<h.length;++y){const k=h[y],C=Se(k)&&k.name;if(C==="Boolean"){v=!0;break}else C==="String"&&(_=!1)}else v=Se(h)&&h.name==="Boolean";p[0]=v,p[1]=_,(v||Pe(p,"default"))&&i.push(d)}}const c=[l,i];return Oe(e)&&s.set(e,c),c}function Qa(e){return e[0]!=="$"&&!lr(e)}const Zi=e=>e==="_"||e==="_ctx"||e==="$stable",ea=e=>ye(e)?e.map(on):[on(e)],Qg=(e,t,n)=>{if(t._n)return t;const s=I((...r)=>ea(t(...r)),n);return s._c=!1,s},nf=(e,t,n)=>{const s=e._ctx;for(const r in e){if(Zi(r))continue;const o=e[r];if(Se(o))t[r]=Qg(r,o,s);else if(o!=null){const l=ea(o);t[r]=()=>l}}},sf=(e,t)=>{const n=ea(t);e.slots.default=()=>n},rf=(e,t,n)=>{for(const s in t)(n||!Zi(s))&&(e[s]=t[s])},Zg=(e,t,n)=>{const s=e.slots=Qd();if(e.vnode.shapeFlag&32){const r=t._;r?(rf(s,t,n),n&&nd(s,"_",r,!0)):nf(t,s)}else t&&sf(e,t)},em=(e,t,n)=>{const{vnode:s,slots:r}=e;let o=!0,l=je;if(s.shapeFlag&32){const i=t._;i?n&&i===1?o=!1:rf(r,t,n):(o=!t.$stable,nf(t,r)),l=t}else t&&(sf(e,t),l={default:1});if(o)for(const i in r)!Zi(i)&&l[i]==null&&delete r[i]},St=om;function tm(e){return nm(e)}function nm(e,t){const n=Uo();n.__VUE__=!0;const{insert:s,remove:r,patchProp:o,createElement:l,createText:i,createComment:a,setText:c,setElementText:u,parentNode:d,nextSibling:f,setScopeId:p=an,insertStaticContent:h}=e,v=(S,$,b,A=null,T=null,F=null,oe=void 0,le=null,re=!!$.dynamicChildren)=>{if(S===$)return;S&&!Xn(S,$)&&(A=B(S),qe(S,T,F,!0),S=null),$.patchFlag===-2&&(re=!1,$.dynamicChildren=null);const{type:Z,ref:be,shapeFlag:ae}=$;switch(Z){case Yo:_(S,$,b,A);break;case gt:y(S,$,b,A);break;case xl:S==null&&k($,b,A,oe);break;case te:x(S,$,b,A,T,F,oe,le,re);break;default:ae&1?j(S,$,b,A,T,F,oe,le,re):ae&6?M(S,$,b,A,T,F,oe,le,re):(ae&64||ae&128)&&Z.process(S,$,b,A,T,F,oe,le,re,ie)}be!=null&&T?cr(be,S&&S.ref,F,$||S,!$):be==null&&S&&S.ref!=null&&cr(S.ref,null,F,S,!0)},_=(S,$,b,A)=>{if(S==null)s($.el=i($.children),b,A);else{const T=$.el=S.el;$.children!==S.children&&c(T,$.children)}},y=(S,$,b,A)=>{S==null?s($.el=a($.children||""),b,A):$.el=S.el},k=(S,$,b,A)=>{[S.el,S.anchor]=h(S.children,$,b,A,S.el,S.anchor)},C=({el:S,anchor:$},b,A)=>{let T;for(;S&&S!==$;)T=f(S),s(S,b,A),S=T;s($,b,A)},R=({el:S,anchor:$})=>{let b;for(;S&&S!==$;)b=f(S),r(S),S=b;r($)},j=(S,$,b,A,T,F,oe,le,re)=>{if($.type==="svg"?oe="svg":$.type==="math"&&(oe="mathml"),S==null)O($,b,A,T,F,oe,le,re);else{const Z=S.el&&S.el._isVueCE?S.el:null;try{Z&&Z._beginPatch(),P(S,$,T,F,oe,le,re)}finally{Z&&Z._endPatch()}}},O=(S,$,b,A,T,F,oe,le)=>{let re,Z;const{props:be,shapeFlag:ae,transition:ve,dirs:Ce}=S;if(re=S.el=l(S.type,F,be&&be.is,be),ae&8?u(re,S.children):ae&16&&U(S.children,re,null,A,T,kl(S,F),oe,le),Ce&&Un(S,null,A,"created"),L(re,S,S.scopeId,oe,A),be){for(const Fe in be)Fe!=="value"&&!lr(Fe)&&o(re,Fe,null,be[Fe],F,A);"value"in be&&o(re,"value",null,be.value,F),(Z=be.onVnodeBeforeMount)&&Zt(Z,A,S)}Ce&&Un(S,null,A,"beforeMount");const Ie=sm(T,ve);Ie&&ve.beforeEnter(re),s(re,$,b),((Z=be&&be.onVnodeMounted)||Ie||Ce)&&St(()=>{try{Z&&Zt(Z,A,S),Ie&&ve.enter(re),Ce&&Un(S,null,A,"mounted")}finally{}},T)},L=(S,$,b,A,T)=>{if(b&&p(S,b),A)for(let F=0;F<A.length;F++)p(S,A[F]);if(T){let F=T.subTree;if($===F||af(F.type)&&(F.ssContent===$||F.ssFallback===$)){const oe=T.vnode;L(S,oe,oe.scopeId,oe.slotScopeIds,T.parent)}}},U=(S,$,b,A,T,F,oe,le,re=0)=>{for(let Z=re;Z<S.length;Z++){const be=S[Z]=le?gn(S[Z]):on(S[Z]);v(null,be,$,b,A,T,F,oe,le)}},P=(S,$,b,A,T,F,oe)=>{const le=$.el=S.el;let{patchFlag:re,dynamicChildren:Z,dirs:be}=$;re|=S.patchFlag&16;const ae=S.props||je,ve=$.props||je;let Ce;if(b&&Hn(b,!1),(Ce=ve.onVnodeBeforeUpdate)&&Zt(Ce,b,$,S),be&&Un($,S,b,"beforeUpdate"),b&&Hn(b,!0),(ae.innerHTML&&ve.innerHTML==null||ae.textContent&&ve.textContent==null)&&u(le,""),Z?D(S.dynamicChildren,Z,le,b,A,kl($,T),F):oe||de(S,$,le,null,b,A,kl($,T),F,!1),re>0){if(re&16)Y(le,ae,ve,b,T);else if(re&2&&ae.class!==ve.class&&o(le,"class",null,ve.class,T),re&4&&o(le,"style",ae.style,ve.style,T),re&8){const Ie=$.dynamicProps;for(let Fe=0;Fe<Ie.length;Fe++){const Ge=Ie[Fe],et=ae[Ge],ht=ve[Ge];(ht!==et||Ge==="value")&&o(le,Ge,et,ht,T,b)}}re&1&&S.children!==$.children&&u(le,$.children)}else!oe&&Z==null&&Y(le,ae,ve,b,T);((Ce=ve.onVnodeUpdated)||be)&&St(()=>{Ce&&Zt(Ce,b,$,S),be&&Un($,S,b,"updated")},A)},D=(S,$,b,A,T,F,oe)=>{for(let le=0;le<$.length;le++){const re=S[le],Z=$[le],be=re.el&&(re.type===te||!Xn(re,Z)||re.shapeFlag&198)?d(re.el):b;v(re,Z,be,null,A,T,F,oe,!0)}},Y=(S,$,b,A,T)=>{if($!==b){if($!==je)for(const F in $)!lr(F)&&!(F in b)&&o(S,F,$[F],null,T,A);for(const F in b){if(lr(F))continue;const oe=b[F],le=$[F];oe!==le&&F!=="value"&&o(S,F,le,oe,T,A)}"value"in b&&o(S,"value",$.value,b.value,T)}},x=(S,$,b,A,T,F,oe,le,re)=>{const Z=$.el=S?S.el:i(""),be=$.anchor=S?S.anchor:i("");let{patchFlag:ae,dynamicChildren:ve,slotScopeIds:Ce}=$;Ce&&(le=le?le.concat(Ce):Ce),S==null?(s(Z,b,A),s(be,b,A),U($.children||[],b,be,T,F,oe,le,re)):ae>0&&ae&64&&ve&&S.dynamicChildren&&S.dynamicChildren.length===ve.length?(D(S.dynamicChildren,ve,b,T,F,oe,le),($.key!=null||T&&$===T.subTree)&&ta(S,$,!0)):de(S,$,b,be,T,F,oe,le,re)},M=(S,$,b,A,T,F,oe,le,re)=>{$.slotScopeIds=le,S==null?$.shapeFlag&512?T.ctx.activate($,b,A,oe,re):V($,b,A,T,F,oe,re):fe(S,$,re)},V=(S,$,b,A,T,F,oe)=>{const le=S.component=um(S,A,T);if(Wo(S)&&(le.ctx.renderer=ie),dm(le,!1,oe),le.asyncDep){if(T&&T.registerDep(le,me,oe),!S.el){const re=le.subTree=N(gt);y(null,re,$,b),S.placeholder=re.el}}else me(le,S,$,b,T,F,oe)},fe=(S,$,b)=>{const A=$.component=S.component;if(Wg(S,$,b))if(A.asyncDep&&!A.asyncResolved){_e(A,$,b);return}else A.next=$,A.update();else $.el=S.el,A.vnode=$},me=(S,$,b,A,T,F,oe)=>{const le=()=>{if(S.isMounted){let{next:ae,bu:ve,u:Ce,parent:Ie,vnode:Fe}=S;{const Jt=of(S);if(Jt){ae&&(ae.el=Fe.el,_e(S,ae,oe)),Jt.asyncDep.then(()=>{St(()=>{S.isUnmounted||Z()},T)});return}}let Ge=ae,et;Hn(S,!1),ae?(ae.el=Fe.el,_e(S,ae,oe)):ae=Fe,ve&&to(ve),(et=ae.props&&ae.props.onVnodeBeforeUpdate)&&Zt(et,Ie,ae,Fe),Hn(S,!0);const ht=Ya(S),Yt=S.subTree;S.subTree=ht,v(Yt,ht,d(Yt.el),B(Yt),S,T,F),ae.el=ht.el,Ge===null&&Kg(S,ht.el),Ce&&St(Ce,T),(et=ae.props&&ae.props.onVnodeUpdated)&&St(()=>Zt(et,Ie,ae,Fe),T)}else{let ae;const{el:ve,props:Ce}=$,{bm:Ie,m:Fe,parent:Ge,root:et,type:ht}=S,Yt=xs($);Hn(S,!1),Ie&&to(Ie),!Yt&&(ae=Ce&&Ce.onVnodeBeforeMount)&&Zt(ae,Ge,$),Hn(S,!0);{et.ce&&et.ce._hasShadowRoot()&&et.ce._injectChildStyle(ht,S.parent?S.parent.type:void 0);const Jt=S.subTree=Ya(S);v(null,Jt,b,A,S,T,F),$.el=Jt.el}if(Fe&&St(Fe,T),!Yt&&(ae=Ce&&Ce.onVnodeMounted)){const Jt=$;St(()=>Zt(ae,Ge,Jt),T)}($.shapeFlag&256||Ge&&xs(Ge.vnode)&&Ge.vnode.shapeFlag&256)&&S.a&&St(S.a,T),S.isMounted=!0,$=b=A=null}};S.scope.on();const re=S.effect=new id(le);S.scope.off();const Z=S.update=re.run.bind(re),be=S.job=re.runIfDirty.bind(re);be.i=S,be.id=S.uid,re.scheduler=()=>Xi(be),Hn(S,!0),Z()},_e=(S,$,b)=>{$.component=S;const A=S.vnode.props;S.vnode=$,S.next=null,Yg(S,$.props,A,b),em(S,$.children,b),Cn(),ja(S),Sn()},de=(S,$,b,A,T,F,oe,le,re=!1)=>{const Z=S&&S.children,be=S?S.shapeFlag:0,ae=$.children,{patchFlag:ve,shapeFlag:Ce}=$;if(ve>0){if(ve&128){Be(Z,ae,b,A,T,F,oe,le,re);return}else if(ve&256){Te(Z,ae,b,A,T,F,oe,le,re);return}}Ce&8?(be&16&&we(Z,T,F),ae!==Z&&u(b,ae)):be&16?Ce&16?Be(Z,ae,b,A,T,F,oe,le,re):we(Z,T,F,!0):(be&8&&u(b,""),Ce&16&&U(ae,b,A,T,F,oe,le,re))},Te=(S,$,b,A,T,F,oe,le,re)=>{S=S||bs,$=$||bs;const Z=S.length,be=$.length,ae=Math.min(Z,be);let ve;for(ve=0;ve<ae;ve++){const Ce=$[ve]=re?gn($[ve]):on($[ve]);v(S[ve],Ce,b,null,T,F,oe,le,re)}Z>be?we(S,T,F,!0,!1,ae):U($,b,A,T,F,oe,le,re,ae)},Be=(S,$,b,A,T,F,oe,le,re)=>{let Z=0;const be=$.length;let ae=S.length-1,ve=be-1;for(;Z<=ae&&Z<=ve;){const Ce=S[Z],Ie=$[Z]=re?gn($[Z]):on($[Z]);if(Xn(Ce,Ie))v(Ce,Ie,b,null,T,F,oe,le,re);else break;Z++}for(;Z<=ae&&Z<=ve;){const Ce=S[ae],Ie=$[ve]=re?gn($[ve]):on($[ve]);if(Xn(Ce,Ie))v(Ce,Ie,b,null,T,F,oe,le,re);else break;ae--,ve--}if(Z>ae){if(Z<=ve){const Ce=ve+1,Ie=Ce<be?$[Ce].el:A;for(;Z<=ve;)v(null,$[Z]=re?gn($[Z]):on($[Z]),b,Ie,T,F,oe,le,re),Z++}}else if(Z>ve)for(;Z<=ae;)qe(S[Z],T,F,!0),Z++;else{const Ce=Z,Ie=Z,Fe=new Map;for(Z=Ie;Z<=ve;Z++){const At=$[Z]=re?gn($[Z]):on($[Z]);At.key!=null&&Fe.set(At.key,Z)}let Ge,et=0;const ht=ve-Ie+1;let Yt=!1,Jt=0;const qs=new Array(ht);for(Z=0;Z<ht;Z++)qs[Z]=0;for(Z=Ce;Z<=ae;Z++){const At=S[Z];if(et>=ht){qe(At,T,F,!0);continue}let Qt;if(At.key!=null)Qt=Fe.get(At.key);else for(Ge=Ie;Ge<=ve;Ge++)if(qs[Ge-Ie]===0&&Xn(At,$[Ge])){Qt=Ge;break}Qt===void 0?qe(At,T,F,!0):(qs[Qt-Ie]=Z+1,Qt>=Jt?Jt=Qt:Yt=!0,v(At,$[Qt],b,null,T,F,oe,le,re),et++)}const Ra=Yt?rm(qs):bs;for(Ge=Ra.length-1,Z=ht-1;Z>=0;Z--){const At=Ie+Z,Qt=$[At],Ta=$[At+1],Na=At+1<be?Ta.el||lf(Ta):A;qs[Z]===0?v(null,Qt,b,Na,T,F,oe,le,re):Yt&&(Ge<0||Z!==Ra[Ge]?Ze(Qt,b,Na,2):Ge--)}}},Ze=(S,$,b,A,T=null)=>{const{el:F,type:oe,transition:le,children:re,shapeFlag:Z}=S;if(Z&6){Ze(S.component.subTree,$,b,A);return}if(Z&128){S.suspense.move($,b,A);return}if(Z&64){oe.move(S,$,b,ie);return}if(oe===te){s(F,$,b);for(let ae=0;ae<re.length;ae++)Ze(re[ae],$,b,A);s(S.anchor,$,b);return}if(oe===xl){C(S,$,b);return}if(A!==2&&Z&1&&le)if(A===0)le.beforeEnter(F),s(F,$,b),St(()=>le.enter(F),T);else{const{leave:ae,delayLeave:ve,afterLeave:Ce}=le,Ie=()=>{S.ctx.isUnmounted?r(F):s(F,$,b)},Fe=()=>{F._isLeaving&&F[sn](!0),ae(F,()=>{Ie(),Ce&&Ce()})};ve?ve(F,Ie,Fe):Fe()}else s(F,$,b)},qe=(S,$,b,A=!1,T=!1)=>{const{type:F,props:oe,ref:le,children:re,dynamicChildren:Z,shapeFlag:be,patchFlag:ae,dirs:ve,cacheIndex:Ce,memo:Ie}=S;if(ae===-2&&(T=!1),le!=null&&(Cn(),cr(le,null,b,S,!0),Sn()),Ce!=null&&($.renderCache[Ce]=void 0),be&256){$.ctx.deactivate(S);return}const Fe=be&1&&ve,Ge=!xs(S);let et;if(Ge&&(et=oe&&oe.onVnodeBeforeUnmount)&&Zt(et,$,S),be&6)se(S.component,b,A);else{if(be&128){S.suspense.unmount(b,A);return}Fe&&Un(S,null,$,"beforeUnmount"),be&64?S.type.remove(S,$,b,ie,A):Z&&!Z.hasOnce&&(F!==te||ae>0&&ae&64)?we(Z,$,b,!1,!0):(F===te&&ae&384||!T&&be&16)&&we(re,$,b),A&&X(S)}const ht=Ie!=null&&Ce==null;(Ge&&(et=oe&&oe.onVnodeUnmounted)||Fe||ht)&&St(()=>{et&&Zt(et,$,S),Fe&&Un(S,null,$,"unmounted"),ht&&(S.el=null)},b)},X=S=>{const{type:$,el:b,anchor:A,transition:T}=S;if($===te){ne(b,A);return}if($===xl){R(S);return}const F=()=>{r(b),T&&!T.persisted&&T.afterLeave&&T.afterLeave()};if(S.shapeFlag&1&&T&&!T.persisted){const{leave:oe,delayLeave:le}=T,re=()=>oe(b,F);le?le(S.el,F,re):re()}else F()},ne=(S,$)=>{let b;for(;S!==$;)b=f(S),r(S),S=b;r($)},se=(S,$,b)=>{const{bum:A,scope:T,job:F,subTree:oe,um:le,m:re,a:Z}=S;Za(re),Za(Z),A&&to(A),T.stop(),F&&(F.flags|=8,qe(oe,S,$,b)),le&&St(le,$),St(()=>{S.isUnmounted=!0},$)},we=(S,$,b,A=!1,T=!1,F=0)=>{for(let oe=F;oe<S.length;oe++)qe(S[oe],$,b,A,T)},B=S=>{if(S.shapeFlag&6)return B(S.component.subTree);if(S.shapeFlag&128)return S.suspense.next();const $=f(S.anchor||S.el),b=$&&$[Td];return b?f(b):$};let H=!1;const Q=(S,$,b)=>{let A;S==null?$._vnode&&(qe($._vnode,null,null,!0),A=$._vnode.component):v($._vnode||null,S,$,null,null,null,b),$._vnode=S,H||(H=!0,ja(A),Ed(),H=!1)},ie={p:v,um:qe,m:Ze,r:X,mt:V,mc:U,pc:de,pbc:D,n:B,o:e};return{render:Q,hydrate:void 0,createApp:Gg(Q)}}function kl({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Hn({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function sm(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ta(e,t,n=!1){const s=e.children,r=t.children;if(ye(s)&&ye(r))for(let o=0;o<s.length;o++){const l=s[o];let i=r[o];i.shapeFlag&1&&!i.dynamicChildren&&((i.patchFlag<=0||i.patchFlag===32)&&(i=r[o]=gn(r[o]),i.el=l.el),!n&&i.patchFlag!==-2&&ta(l,i)),i.type===Yo&&(i.patchFlag===-1&&(i=r[o]=gn(i)),i.el=l.el),i.type===gt&&!i.el&&(i.el=l.el)}}function rm(e){const t=e.slice(),n=[0];let s,r,o,l,i;const a=e.length;for(s=0;s<a;s++){const c=e[s];if(c!==0){if(r=n[n.length-1],e[r]<c){t[s]=r,n.push(s);continue}for(o=0,l=n.length-1;o<l;)i=o+l>>1,e[n[i]]<c?o=i+1:l=i;c<e[n[o]]&&(o>0&&(t[s]=n[o-1]),n[o]=s)}}for(o=n.length,l=n[o-1];o-- >0;)n[o]=l,l=t[l];return n}function of(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:of(t)}function Za(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function lf(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?lf(t.subTree):null}const af=e=>e.__isSuspense;function om(e,t){t&&t.pendingBranch?ye(e)?t.effects.push(...e):t.effects.push(e):hg(e)}const te=Symbol.for("v-fgt"),Yo=Symbol.for("v-txt"),gt=Symbol.for("v-cmt"),xl=Symbol.for("v-stc"),dr=[];let Rt=null;function m(e=!1){dr.push(Rt=e?null:[])}function lm(){dr.pop(),Rt=dr[dr.length-1]||null}let br=1;function mo(e,t=!1){br+=e,e<0&&Rt&&t&&(Rt.hasOnce=!0)}function cf(e){return e.dynamicChildren=br>0?Rt||bs:null,lm(),br>0&&Rt&&Rt.push(e),e}function w(e,t,n,s,r,o){return cf(g(e,t,n,s,r,o,!0))}function J(e,t,n,s,r){return cf(N(e,t,n,s,r,!0))}function wr(e){return e?e.__v_isVNode===!0:!1}function Xn(e,t){return e.type===t.type&&e.key===t.key}const uf=({key:e})=>e??null,no=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?He(e)||pt(e)||Se(e)?{i:mt,r:e,k:t,f:!!n}:e:null);function g(e,t=null,n=null,s=0,r=null,o=e===te?0:1,l=!1,i=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&uf(t),ref:t&&no(t),scopeId:Id,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:o,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:mt};return i?(na(a,n),o&128&&e.normalize(a)):n&&(a.shapeFlag|=He(n)?8:16),br>0&&!l&&Rt&&(a.patchFlag>0||o&6)&&a.patchFlag!==32&&Rt.push(a),a}const N=im;function im(e,t=null,n=null,s=0,r=null,o=!1){if((!e||e===Ud)&&(e=gt),wr(e)){const i=xn(e,t,!0);return n&&na(i,n),br>0&&!o&&Rt&&(i.shapeFlag&6?Rt[Rt.indexOf(e)]=i:Rt.push(i)),i.patchFlag=-2,i}if(gm(e)&&(e=e.__vccOpts),t){t=df(t);let{class:i,style:a}=t;i&&!He(i)&&(t.class=ge(i)),Oe(a)&&(qo(a)&&!ye(a)&&(a=st({},a)),t.style=nt(a))}const l=He(e)?1:af(e)?128:Nd(e)?64:Oe(e)?4:Se(e)?2:0;return g(e,t,n,s,r,l,o,!0)}function df(e){return e?qo(e)||Zd(e)?st({},e):e:null}function xn(e,t,n=!1,s=!1){const{props:r,ref:o,patchFlag:l,children:i,transition:a}=e,c=t?Qe(r||{},t):r,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&uf(c),ref:t&&t.ref?n&&o?ye(o)?o.concat(no(t)):[o,no(t)]:no(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==te?l===-1?16:l|16:l,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&xn(e.ssContent),ssFallback:e.ssFallback&&xn(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&s&&ls(u,a.clone(u)),u}function ce(e=" ",t=0){return N(Yo,null,e,t)}function K(e="",t=!1){return t?(m(),J(gt,null,e)):N(gt,null,e)}function on(e){return e==null||typeof e=="boolean"?N(gt):ye(e)?N(te,null,e.slice()):wr(e)?gn(e):N(Yo,null,String(e))}function gn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:xn(e)}function na(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(ye(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),na(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!Zd(t)?t._ctx=mt:r===3&&mt&&(mt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Se(t)?(t={default:t,_ctx:mt},n=32):(t=String(t),s&64?(n=16,t=[ce(t)]):n=8);e.children=t,e.shapeFlag|=n}function Qe(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const r in s)if(r==="class")t.class!==s.class&&(t.class=ge([t.class,s.class]));else if(r==="style")t.style=nt([t.style,s.style]);else if(Mo(r)){const o=t[r],l=s[r];l&&o!==l&&!(ye(o)&&o.includes(l))?t[r]=o?[].concat(o,l):l:l==null&&o==null&&!Do(r)&&(t[r]=l)}else r!==""&&(t[r]=s[r])}return t}function Zt(e,t,n,s=null){Wt(e,t,7,[n,s])}const am=Kd();let cm=0;function um(e,t,n){const s=e.type,r=(t?t.appContext:e.appContext)||am,o={uid:cm++,vnode:e,type:s,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Mh(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:tf(s,r),emitsOptions:Xd(s,r),emit:null,emitted:null,propsDefaults:je,inheritAttrs:s.inheritAttrs,ctx:je,data:je,props:je,attrs:je,slots:je,refs:je,setupState:je,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 o.ctx={_:o},o.root=t?t.root:o,o.emit=Ug.bind(null,o),e.ce&&e.ce(o),o}let _t=null;const En=()=>_t||mt;let vo,ii;{const e=Uo(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),o=>{r.length>1?r.forEach(l=>l(o)):r[0](o)}};vo=t("__VUE_INSTANCE_SETTERS__",n=>_t=n),ii=t("__VUE_SSR_SETTERS__",n=>Cr=n)}const Lr=e=>{const t=_t;return vo(e),e.scope.on(),()=>{e.scope.off(),vo(t)}},ec=()=>{_t&&_t.scope.off(),vo(null)};function ff(e){return e.vnode.shapeFlag&4}let Cr=!1;function dm(e,t=!1,n=!1){t&&ii(t);const{props:s,children:r}=e.vnode,o=ff(e);Xg(e,s,o,t),Zg(e,r,n||t);const l=o?fm(e,t):void 0;return t&&ii(!1),l}function fm(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Ng);const{setup:s}=n;if(s){Cn();const r=e.setupContext=s.length>1?hf(e):null,o=Lr(e),l=Pr(s,e,0,[e.props,r]),i=Zu(l);if(Sn(),o(),(i||e.sp)&&!xs(e)&&jd(e),i){if(l.then(ec,ec),t)return l.then(a=>{tc(e,a)}).catch(a=>{zo(a,e,0)});e.asyncDep=l}else tc(e,l)}else pf(e)}function tc(e,t,n){Se(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Oe(t)&&(e.setupState=kd(t)),pf(e)}function pf(e,t,n){const s=e.type;e.render||(e.render=s.render||an);{const r=Lr(e);Cn();try{Lg(e)}finally{Sn(),r()}}}const pm={get(e,t){return yt(e,"get",""),e[t]}};function hf(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,pm),slots:e.slots,emit:e.emit,expose:t}}function Jo(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(kd(Cd(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in ur)return ur[n](e)},has(t,n){return n in t||n in ur}})):e.proxy}function hm(e,t=!0){return Se(e)?e.displayName||e.name:e.name||t&&e.__name}function gm(e){return Se(e)&&"__vccOpts"in e}const W=(e,t)=>cg(e,t,Cr);function Ht(e,t,n){try{mo(-1);const s=arguments.length;return s===2?Oe(t)&&!ye(t)?wr(t)?N(e,null,[t]):N(e,t):N(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&wr(n)&&(n=[n]),N(e,t,n))}finally{mo(1)}}const mm="3.5.34";/**
|
|
14
|
+
* @vue/runtime-dom v3.5.34
|
|
15
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
16
|
+
* @license MIT
|
|
17
|
+
**/let ai;const nc=typeof window<"u"&&window.trustedTypes;if(nc)try{ai=nc.createPolicy("vue",{createHTML:e=>e})}catch{}const gf=ai?e=>ai.createHTML(e):e=>e,vm="http://www.w3.org/2000/svg",ym="http://www.w3.org/1998/Math/MathML",hn=typeof document<"u"?document:null,sc=hn&&hn.createElement("template"),_m={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?hn.createElementNS(vm,e):t==="mathml"?hn.createElementNS(ym,e):n?hn.createElement(e,{is:n}):hn.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>hn.createTextNode(e),createComment:e=>hn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>hn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,o){const l=n?n.previousSibling:t.lastChild;if(r&&(r===o||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===o||!(r=r.nextSibling)););else{sc.innerHTML=gf(s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e);const i=sc.content;if(s==="svg"||s==="mathml"){const a=i.firstChild;for(;a.firstChild;)i.appendChild(a.firstChild);i.removeChild(a)}t.insertBefore(i,n)}return[l?l.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},In="transition",Ks="animation",Ts=Symbol("_vtc"),mf={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},vf=st({},Ld,mf),bm=e=>(e.displayName="Transition",e.props=vf,e),wm=bm((e,{slots:t})=>Ht(Cg,yf(e),t)),qn=(e,t=[])=>{ye(e)?e.forEach(n=>n(...t)):e&&e(...t)},rc=e=>e?ye(e)?e.some(t=>t.length>1):e.length>1:!1;function yf(e){const t={};for(const x in e)x in mf||(t[x]=e[x]);if(e.css===!1)return t;const{name:n="v",type:s,duration:r,enterFromClass:o=`${n}-enter-from`,enterActiveClass:l=`${n}-enter-active`,enterToClass:i=`${n}-enter-to`,appearFromClass:a=o,appearActiveClass:c=l,appearToClass:u=i,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,h=Cm(r),v=h&&h[0],_=h&&h[1],{onBeforeEnter:y,onEnter:k,onEnterCancelled:C,onLeave:R,onLeaveCancelled:j,onBeforeAppear:O=y,onAppear:L=k,onAppearCancelled:U=C}=t,P=(x,M,V,fe)=>{x._enterCancelled=fe,Nn(x,M?u:i),Nn(x,M?c:l),V&&V()},D=(x,M)=>{x._isLeaving=!1,Nn(x,d),Nn(x,p),Nn(x,f),M&&M()},Y=x=>(M,V)=>{const fe=x?L:k,me=()=>P(M,x,V);qn(fe,[M,me]),oc(()=>{Nn(M,x?a:o),en(M,x?u:i),rc(fe)||lc(M,s,v,me)})};return st(t,{onBeforeEnter(x){qn(y,[x]),en(x,o),en(x,l)},onBeforeAppear(x){qn(O,[x]),en(x,a),en(x,c)},onEnter:Y(!1),onAppear:Y(!0),onLeave(x,M){x._isLeaving=!0;const V=()=>D(x,M);en(x,d),x._enterCancelled?(en(x,f),ci(x)):(ci(x),en(x,f)),oc(()=>{x._isLeaving&&(Nn(x,d),en(x,p),rc(R)||lc(x,s,_,V))}),qn(R,[x,V])},onEnterCancelled(x){P(x,!1,void 0,!0),qn(C,[x])},onAppearCancelled(x){P(x,!0,void 0,!0),qn(U,[x])},onLeaveCancelled(x){D(x),qn(j,[x])}})}function Cm(e){if(e==null)return null;if(Oe(e))return[$l(e.enter),$l(e.leave)];{const t=$l(e);return[t,t]}}function $l(e){return $h(e)}function en(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Ts]||(e[Ts]=new Set)).add(t)}function Nn(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[Ts];n&&(n.delete(t),n.size||(e[Ts]=void 0))}function oc(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Sm=0;function lc(e,t,n,s){const r=e._endId=++Sm,o=()=>{r===e._endId&&s()};if(n!=null)return setTimeout(o,n);const{type:l,timeout:i,propCount:a}=_f(e,t);if(!l)return s();const c=l+"end";let u=0;const d=()=>{e.removeEventListener(c,f),o()},f=p=>{p.target===e&&++u>=a&&d()};setTimeout(()=>{u<a&&d()},i+1),e.addEventListener(c,f)}function _f(e,t){const n=window.getComputedStyle(e),s=h=>(n[h]||"").split(", "),r=s(`${In}Delay`),o=s(`${In}Duration`),l=ic(r,o),i=s(`${Ks}Delay`),a=s(`${Ks}Duration`),c=ic(i,a);let u=null,d=0,f=0;t===In?l>0&&(u=In,d=l,f=o.length):t===Ks?c>0&&(u=Ks,d=c,f=a.length):(d=Math.max(l,c),u=d>0?l>c?In:Ks:null,f=u?u===In?o.length:a.length:0);const p=u===In&&/\b(?:transform|all)(?:,|$)/.test(s(`${In}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:p}}function ic(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,s)=>ac(n)+ac(e[s])))}function ac(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function ci(e){return(e?e.ownerDocument:document).body.offsetHeight}function km(e,t,n){const s=e[Ts];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const cc=Symbol("_vod"),xm=Symbol("_vsh"),$m=Symbol(""),Em=/(?:^|;)\s*display\s*:/;function Am(e,t,n){const s=e.style,r=He(n);let o=!1;if(n&&!r){if(t)if(He(t))for(const l of t.split(";")){const i=l.slice(0,l.indexOf(":")).trim();n[i]==null&&nr(s,i,"")}else for(const l in t)n[l]==null&&nr(s,l,"");for(const l in n){l==="display"&&(o=!0);const i=n[l];i!=null?Rm(e,l,!He(t)&&t?t[l]:void 0,i)||nr(s,l,i):nr(s,l,"")}}else if(r){if(t!==n){const l=s[$m];l&&(n+=";"+l),s.cssText=n,o=Em.test(n)}}else t&&e.removeAttribute("style");cc in e&&(e[cc]=o?s.display:"",e[xm]&&(s.display="none"))}const uc=/\s*!important$/;function nr(e,t,n){if(ye(n))n.forEach(s=>nr(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=Im(e,t);uc.test(n)?e.setProperty(Vn(s),n.replace(uc,""),"important"):e[s]=n}}const dc=["Webkit","Moz","ms"],El={};function Im(e,t){const n=El[t];if(n)return n;let s=$t(t);if(s!=="filter"&&s in e)return El[t]=s;s=Go(s);for(let r=0;r<dc.length;r++){const o=dc[r]+s;if(o in e)return El[t]=o}return t}function Rm(e,t,n,s){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&He(s)&&n===s}const fc="http://www.w3.org/1999/xlink";function pc(e,t,n,s,r,o=Ph(t)){s&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(fc,t.slice(6,t.length)):e.setAttributeNS(fc,t,n):n==null||o&&!sd(n)?e.removeAttribute(t):e.setAttribute(t,o?"":Pt(n)?String(n):n)}function hc(e,t,n,s,r){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?gf(n):n);return}const o=e.tagName;if(t==="value"&&o!=="PROGRESS"&&!o.includes("-")){const i=o==="OPTION"?e.getAttribute("value")||"":e.value,a=n==null?e.type==="checkbox"?"on":"":String(n);(i!==a||!("_value"in e))&&(e.value=a),n==null&&e.removeAttribute(t),e._value=n;return}let l=!1;if(n===""||n==null){const i=typeof e[t];i==="boolean"?n=sd(n):n==null&&i==="string"?(n="",l=!0):i==="number"&&(n=0,l=!0)}try{e[t]=n}catch{}l&&e.removeAttribute(r||t)}function Yn(e,t,n,s){e.addEventListener(t,n,s)}function Tm(e,t,n,s){e.removeEventListener(t,n,s)}const gc=Symbol("_vei");function Nm(e,t,n,s,r=null){const o=e[gc]||(e[gc]={}),l=o[t];if(s&&l)l.value=s;else{const[i,a]=Pm(t);if(s){const c=o[t]=Mm(s,r);Yn(e,i,c,a)}else l&&(Tm(e,i,l,a),o[t]=void 0)}}const mc=/(?:Once|Passive|Capture)$/;function Pm(e){let t;if(mc.test(e)){t={};let s;for(;s=e.match(mc);)e=e.slice(0,e.length-s[0].length),t[s[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Vn(e.slice(2)),t]}let Al=0;const Om=Promise.resolve(),Lm=()=>Al||(Om.then(()=>Al=0),Al=Date.now());function Mm(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;Wt(Dm(s,n.value),t,5,[s])};return n.value=e,n.attached=Lm(),n}function Dm(e,t){if(ye(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>r=>!r._stopped&&s&&s(r))}else return t}const vc=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Fm=(e,t,n,s,r,o)=>{const l=r==="svg";t==="class"?km(e,s,l):t==="style"?Am(e,n,s):Mo(t)?Do(t)||Nm(e,t,n,s,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):jm(e,t,s,l))?(hc(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&pc(e,t,s,l,o,t!=="value")):e._isVueCE&&(Bm(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!He(s)))?hc(e,$t(t),s,o,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),pc(e,t,s,l))};function jm(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&vc(t)&&Se(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 r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return vc(t)&&He(n)?!1:t in e}function Bm(e,t){const n=e._def.props;if(!n)return!1;const s=$t(t);return Array.isArray(n)?n.some(r=>$t(r)===s):Object.keys(n).some(r=>$t(r)===s)}const bf=new WeakMap,wf=new WeakMap,yo=Symbol("_moveCb"),yc=Symbol("_enterCb"),Gm=e=>(delete e.props.mode,e),Vm=Gm({name:"TransitionGroup",props:st({},vf,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=En(),s=Od();let r,o;return Qi(()=>{if(!r.length)return;const l=e.moveClass||`${e.name||"v"}-move`;if(!Wm(r[0].el,n.vnode.el,l)){r=[];return}r.forEach(Hm),r.forEach(qm);const i=r.filter(zm);ci(n.vnode.el),i.forEach(a=>{const c=a.el,u=c.style;en(c,l),u.transform=u.webkitTransform=u.transitionDuration="";const d=c[yo]=f=>{f&&f.target!==c||(!f||f.propertyName.endsWith("transform"))&&(c.removeEventListener("transitionend",d),c[yo]=null,Nn(c,l))};c.addEventListener("transitionend",d)}),r=[]}),()=>{const l=Ae(e),i=yf(l);let a=l.tag||te;if(r=[],o)for(let c=0;c<o.length;c++){const u=o[c];u.el&&u.el instanceof Element&&(r.push(u),ls(u,_r(u,i,s,n)),bf.set(u,Cf(u.el)))}o=t.default?Ji(t.default()):[];for(let c=0;c<o.length;c++){const u=o[c];u.key!=null&&ls(u,_r(u,i,s,n))}return N(a,null,o)}}}),Um=Vm;function Hm(e){const t=e.el;t[yo]&&t[yo](),t[yc]&&t[yc]()}function qm(e){wf.set(e,Cf(e.el))}function zm(e){const t=bf.get(e),n=wf.get(e),s=t.left-n.left,r=t.top-n.top;if(s||r){const o=e.el,l=o.style,i=o.getBoundingClientRect();let a=1,c=1;return o.offsetWidth&&(a=i.width/o.offsetWidth),o.offsetHeight&&(c=i.height/o.offsetHeight),(!Number.isFinite(a)||a===0)&&(a=1),(!Number.isFinite(c)||c===0)&&(c=1),Math.abs(a-1)<.01&&(a=1),Math.abs(c-1)<.01&&(c=1),l.transform=l.webkitTransform=`translate(${s/a}px,${r/c}px)`,l.transitionDuration="0s",e}}function Cf(e){const t=e.getBoundingClientRect();return{left:t.left,top:t.top}}function Wm(e,t,n){const s=e.cloneNode(),r=e[Ts];r&&r.forEach(i=>{i.split(/\s+/).forEach(a=>a&&s.classList.remove(a))}),n.split(/\s+/).forEach(i=>i&&s.classList.add(i)),s.style.display="none";const o=t.nodeType===1?t:t.parentNode;o.appendChild(s);const{hasTransform:l}=_f(s);return o.removeChild(s),l}const _o=e=>{const t=e.props["onUpdate:modelValue"]||!1;return ye(t)?n=>to(t,n):t};function Km(e){e.target.composing=!0}function _c(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Es=Symbol("_assign");function bc(e,t,n){return t&&(e=e.trim()),n&&(e=Vo(e)),e}const Xm={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e[Es]=_o(r);const o=s||r.props&&r.props.type==="number";Yn(e,t?"change":"input",l=>{l.target.composing||e[Es](bc(e.value,n,o))}),(n||o)&&Yn(e,"change",()=>{e.value=bc(e.value,n,o)}),t||(Yn(e,"compositionstart",Km),Yn(e,"compositionend",_c),Yn(e,"change",_c))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:o}},l){if(e[Es]=_o(l),e.composing)return;const i=(o||e.type==="number")&&!/^0\d/.test(e.value)?Vo(e.value):e.value,a=t??"";if(i===a)return;const c=e.getRootNode();(c instanceof Document||c instanceof ShadowRoot)&&c.activeElement===e&&e.type!=="range"&&(s&&t===n||r&&e.value.trim()===a)||(e.value=a)}},Il={deep:!0,created(e,{value:t,modifiers:{number:n}},s){const r=Fo(t);Yn(e,"change",()=>{const o=Array.prototype.filter.call(e.options,l=>l.selected).map(l=>n?Vo(bo(l)):bo(l));e[Es](e.multiple?r?new Set(o):o:o[0]),e._assigning=!0,cn(()=>{e._assigning=!1})}),e[Es]=_o(s)},mounted(e,{value:t}){wc(e,t)},beforeUpdate(e,t,n){e[Es]=_o(n)},updated(e,{value:t}){e._assigning||wc(e,t)}};function wc(e,t){const n=e.multiple,s=ye(t);if(!(n&&!s&&!Fo(t))){for(let r=0,o=e.options.length;r<o;r++){const l=e.options[r],i=bo(l);if(n)if(s){const a=typeof i;a==="string"||a==="number"?l.selected=t.some(c=>String(c)===String(i)):l.selected=Lh(t,i)>-1}else l.selected=t.has(i);else if(Nr(bo(l),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function bo(e){return"_value"in e?e._value:e.value}const Ym=["ctrl","shift","alt","meta"],Jm={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)=>Ym.some(n=>e[`${n}Key`]&&!t.includes(n))},Mn=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(r,...o)=>{for(let l=0;l<t.length;l++){const i=Jm[t[l]];if(i&&i(r,t))return}return e(r,...o)})},Qm={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Zm=(e,t)=>{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=r=>{if(!("key"in r))return;const o=Vn(r.key);if(t.some(l=>l===o||Qm[l]===o))return e(r)})},ev=st({patchProp:Fm},_m);let Cc;function tv(){return Cc||(Cc=tm(ev))}const nv=(...e)=>{const t=tv().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=rv(s);if(!r)return;const o=t._component;!Se(o)&&!o.render&&!o.template&&(o.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const l=n(r,!1,sv(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),l},t};function sv(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function rv(e){return He(e)?document.querySelector(e):e}/*!
|
|
18
|
+
* vue-router v4.6.4
|
|
19
|
+
* (c) 2025 Eduardo San Martin Morote
|
|
20
|
+
* @license MIT
|
|
21
|
+
*/const ms=typeof document<"u";function Sf(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function ov(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Sf(e.default)}const Ne=Object.assign;function Rl(e,t){const n={};for(const s in t){const r=t[s];n[s]=Kt(r)?r.map(e):e(r)}return n}const fr=()=>{},Kt=Array.isArray;function Sc(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}const kf=/#/g,lv=/&/g,iv=/\//g,av=/=/g,cv=/\?/g,xf=/\+/g,uv=/%5B/g,dv=/%5D/g,$f=/%5E/g,fv=/%60/g,Ef=/%7B/g,pv=/%7C/g,Af=/%7D/g,hv=/%20/g;function sa(e){return e==null?"":encodeURI(""+e).replace(pv,"|").replace(uv,"[").replace(dv,"]")}function gv(e){return sa(e).replace(Ef,"{").replace(Af,"}").replace($f,"^")}function ui(e){return sa(e).replace(xf,"%2B").replace(hv,"+").replace(kf,"%23").replace(lv,"%26").replace(fv,"`").replace(Ef,"{").replace(Af,"}").replace($f,"^")}function mv(e){return ui(e).replace(av,"%3D")}function vv(e){return sa(e).replace(kf,"%23").replace(cv,"%3F")}function yv(e){return vv(e).replace(iv,"%2F")}function Sr(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const _v=/\/$/,bv=e=>e.replace(_v,"");function Tl(e,t,n="/"){let s,r={},o="",l="";const i=t.indexOf("#");let a=t.indexOf("?");return a=i>=0&&a>i?-1:a,a>=0&&(s=t.slice(0,a),o=t.slice(a,i>0?i:t.length),r=e(o.slice(1))),i>=0&&(s=s||t.slice(0,i),l=t.slice(i,t.length)),s=kv(s??t,n),{fullPath:s+o+l,path:s,query:r,hash:Sr(l)}}function wv(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function kc(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Cv(e,t,n){const s=t.matched.length-1,r=n.matched.length-1;return s>-1&&s===r&&Ns(t.matched[s],n.matched[r])&&If(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Ns(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function If(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!Sv(e[n],t[n]))return!1;return!0}function Sv(e,t){return Kt(e)?xc(e,t):Kt(t)?xc(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function xc(e,t){return Kt(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function kv(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.split("/"),r=s[s.length-1];(r===".."||r===".")&&s.push("");let o=n.length-1,l,i;for(l=0;l<s.length;l++)if(i=s[l],i!==".")if(i==="..")o>1&&o--;else break;return n.slice(0,o).join("/")+"/"+s.slice(l).join("/")}const Rn={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let di=function(e){return e.pop="pop",e.push="push",e}({}),Nl=function(e){return e.back="back",e.forward="forward",e.unknown="",e}({});function xv(e){if(!e)if(ms){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),bv(e)}const $v=/^[^#]+#/;function Ev(e,t){return e.replace($v,"#")+t}function Av(e,t){const n=document.documentElement.getBoundingClientRect(),s=e.getBoundingClientRect();return{behavior:t.behavior,left:s.left-n.left-(t.left||0),top:s.top-n.top-(t.top||0)}}const Qo=()=>({left:window.scrollX,top:window.scrollY});function Iv(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=Av(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function $c(e,t){return(history.state?history.state.position-t:-1)+e}const fi=new Map;function Rv(e,t){fi.set(e,t)}function Tv(e){const t=fi.get(e);return fi.delete(e),t}function Nv(e){return typeof e=="string"||e&&typeof e=="object"}function Rf(e){return typeof e=="string"||typeof e=="symbol"}let We=function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e}({});const Tf=Symbol("");We.MATCHER_NOT_FOUND+"",We.NAVIGATION_GUARD_REDIRECT+"",We.NAVIGATION_ABORTED+"",We.NAVIGATION_CANCELLED+"",We.NAVIGATION_DUPLICATED+"";function Ps(e,t){return Ne(new Error,{type:e,[Tf]:!0},t)}function dn(e,t){return e instanceof Error&&Tf in e&&(t==null||!!(e.type&t))}const Pv=["params","query","hash"];function Ov(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of Pv)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function Lv(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;s<n.length;++s){const r=n[s].replace(xf," "),o=r.indexOf("="),l=Sr(o<0?r:r.slice(0,o)),i=o<0?null:Sr(r.slice(o+1));if(l in t){let a=t[l];Kt(a)||(a=t[l]=[a]),a.push(i)}else t[l]=i}return t}function Ec(e){let t="";for(let n in e){const s=e[n];if(n=mv(n),s==null){s!==void 0&&(t+=(t.length?"&":"")+n);continue}(Kt(s)?s.map(r=>r&&ui(r)):[s&&ui(s)]).forEach(r=>{r!==void 0&&(t+=(t.length?"&":"")+n,r!=null&&(t+="="+r))})}return t}function Mv(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=Kt(s)?s.map(r=>r==null?null:""+r):s==null?s:""+s)}return t}const Dv=Symbol(""),Ac=Symbol(""),Zo=Symbol(""),ra=Symbol(""),pi=Symbol("");function Xs(){let e=[];function t(s){return e.push(s),()=>{const r=e.indexOf(s);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Dn(e,t,n,s,r,o=l=>l()){const l=s&&(s.enterCallbacks[r]=s.enterCallbacks[r]||[]);return()=>new Promise((i,a)=>{const c=f=>{f===!1?a(Ps(We.NAVIGATION_ABORTED,{from:n,to:t})):f instanceof Error?a(f):Nv(f)?a(Ps(We.NAVIGATION_GUARD_REDIRECT,{from:t,to:f})):(l&&s.enterCallbacks[r]===l&&typeof f=="function"&&l.push(f),i())},u=o(()=>e.call(s&&s.instances[r],t,n,c));let d=Promise.resolve(u);e.length<3&&(d=d.then(c)),d.catch(f=>a(f))})}function Pl(e,t,n,s,r=o=>o()){const o=[];for(const l of e)for(const i in l.components){let a=l.components[i];if(!(t!=="beforeRouteEnter"&&!l.instances[i]))if(Sf(a)){const c=(a.__vccOpts||a)[t];c&&o.push(Dn(c,n,s,l,i,r))}else{let c=a();o.push(()=>c.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${i}" at "${l.path}"`);const d=ov(u)?u.default:u;l.mods[i]=u,l.components[i]=d;const f=(d.__vccOpts||d)[t];return f&&Dn(f,n,s,l,i,r)()}))}}return o}function Fv(e,t){const n=[],s=[],r=[],o=Math.max(t.matched.length,e.matched.length);for(let l=0;l<o;l++){const i=t.matched[l];i&&(e.matched.find(c=>Ns(c,i))?s.push(i):n.push(i));const a=e.matched[l];a&&(t.matched.find(c=>Ns(c,a))||r.push(a))}return[n,s,r]}/*!
|
|
22
|
+
* vue-router v4.6.4
|
|
23
|
+
* (c) 2025 Eduardo San Martin Morote
|
|
24
|
+
* @license MIT
|
|
25
|
+
*/let jv=()=>location.protocol+"//"+location.host;function Nf(e,t){const{pathname:n,search:s,hash:r}=t,o=e.indexOf("#");if(o>-1){let l=r.includes(e.slice(o))?e.slice(o).length:1,i=r.slice(l);return i[0]!=="/"&&(i="/"+i),kc(i,"")}return kc(n,e)+s+r}function Bv(e,t,n,s){let r=[],o=[],l=null;const i=({state:f})=>{const p=Nf(e,location),h=n.value,v=t.value;let _=0;if(f){if(n.value=p,t.value=f,l&&l===h){l=null;return}_=v?f.position-v.position:0}else s(p);r.forEach(y=>{y(n.value,h,{delta:_,type:di.pop,direction:_?_>0?Nl.forward:Nl.back:Nl.unknown})})};function a(){l=n.value}function c(f){r.push(f);const p=()=>{const h=r.indexOf(f);h>-1&&r.splice(h,1)};return o.push(p),p}function u(){if(document.visibilityState==="hidden"){const{history:f}=window;if(!f.state)return;f.replaceState(Ne({},f.state,{scroll:Qo()}),"")}}function d(){for(const f of o)f();o=[],window.removeEventListener("popstate",i),window.removeEventListener("pagehide",u),document.removeEventListener("visibilitychange",u)}return window.addEventListener("popstate",i),window.addEventListener("pagehide",u),document.addEventListener("visibilitychange",u),{pauseListeners:a,listen:c,destroy:d}}function Ic(e,t,n,s=!1,r=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:r?Qo():null}}function Gv(e){const{history:t,location:n}=window,s={value:Nf(e,n)},r={value:t.state};r.value||o(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(a,c,u){const d=e.indexOf("#"),f=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+a:jv()+e+a;try{t[u?"replaceState":"pushState"](c,"",f),r.value=c}catch(p){console.error(p),n[u?"replace":"assign"](f)}}function l(a,c){o(a,Ne({},t.state,Ic(r.value.back,a,r.value.forward,!0),c,{position:r.value.position}),!0),s.value=a}function i(a,c){const u=Ne({},r.value,t.state,{forward:a,scroll:Qo()});o(u.current,u,!0),o(a,Ne({},Ic(s.value,a,null),{position:u.position+1},c),!1),s.value=a}return{location:s,state:r,push:i,replace:l}}function Vv(e){e=xv(e);const t=Gv(e),n=Bv(e,t.state,t.location,t.replace);function s(o,l=!0){l||n.pauseListeners(),history.go(o)}const r=Ne({location:"",base:e,go:s,createHref:Ev.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}let Qn=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e}({});var lt=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e}(lt||{});const Uv={type:Qn.Static,value:""},Hv=/[a-zA-Z0-9_]/;function qv(e){if(!e)return[[]];if(e==="/")return[[Uv]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(p){throw new Error(`ERR (${n})/"${c}": ${p}`)}let n=lt.Static,s=n;const r=[];let o;function l(){o&&r.push(o),o=[]}let i=0,a,c="",u="";function d(){c&&(n===lt.Static?o.push({type:Qn.Static,value:c}):n===lt.Param||n===lt.ParamRegExp||n===lt.ParamRegExpEnd?(o.length>1&&(a==="*"||a==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),o.push({type:Qn.Param,value:c,regexp:u,repeatable:a==="*"||a==="+",optional:a==="*"||a==="?"})):t("Invalid state to consume buffer"),c="")}function f(){c+=a}for(;i<e.length;){if(a=e[i++],a==="\\"&&n!==lt.ParamRegExp){s=n,n=lt.EscapeNext;continue}switch(n){case lt.Static:a==="/"?(c&&d(),l()):a===":"?(d(),n=lt.Param):f();break;case lt.EscapeNext:f(),n=s;break;case lt.Param:a==="("?n=lt.ParamRegExp:Hv.test(a)?f():(d(),n=lt.Static,a!=="*"&&a!=="?"&&a!=="+"&&i--);break;case lt.ParamRegExp:a===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+a:n=lt.ParamRegExpEnd:u+=a;break;case lt.ParamRegExpEnd:d(),n=lt.Static,a!=="*"&&a!=="?"&&a!=="+"&&i--,u="";break;default:t("Unknown state");break}}return n===lt.ParamRegExp&&t(`Unfinished custom RegExp for param "${c}"`),d(),l(),r}const Rc="[^/]+?",zv={sensitive:!1,strict:!1,start:!0,end:!0};var kt=function(e){return e[e._multiplier=10]="_multiplier",e[e.Root=90]="Root",e[e.Segment=40]="Segment",e[e.SubSegment=30]="SubSegment",e[e.Static=40]="Static",e[e.Dynamic=20]="Dynamic",e[e.BonusCustomRegExp=10]="BonusCustomRegExp",e[e.BonusWildcard=-50]="BonusWildcard",e[e.BonusRepeatable=-20]="BonusRepeatable",e[e.BonusOptional=-8]="BonusOptional",e[e.BonusStrict=.7000000000000001]="BonusStrict",e[e.BonusCaseSensitive=.25]="BonusCaseSensitive",e}(kt||{});const Wv=/[.+*?^${}()[\]/\\]/g;function Kv(e,t){const n=Ne({},zv,t),s=[];let r=n.start?"^":"";const o=[];for(const c of e){const u=c.length?[]:[kt.Root];n.strict&&!c.length&&(r+="/");for(let d=0;d<c.length;d++){const f=c[d];let p=kt.Segment+(n.sensitive?kt.BonusCaseSensitive:0);if(f.type===Qn.Static)d||(r+="/"),r+=f.value.replace(Wv,"\\$&"),p+=kt.Static;else if(f.type===Qn.Param){const{value:h,repeatable:v,optional:_,regexp:y}=f;o.push({name:h,repeatable:v,optional:_});const k=y||Rc;if(k!==Rc){p+=kt.BonusCustomRegExp;try{`${k}`}catch(R){throw new Error(`Invalid custom RegExp for param "${h}" (${k}): `+R.message)}}let C=v?`((?:${k})(?:/(?:${k}))*)`:`(${k})`;d||(C=_&&c.length<2?`(?:/${C})`:"/"+C),_&&(C+="?"),r+=C,p+=kt.Dynamic,_&&(p+=kt.BonusOptional),v&&(p+=kt.BonusRepeatable),k===".*"&&(p+=kt.BonusWildcard)}u.push(p)}s.push(u)}if(n.strict&&n.end){const c=s.length-1;s[c][s[c].length-1]+=kt.BonusStrict}n.strict||(r+="/?"),n.end?r+="$":n.strict&&!r.endsWith("/")&&(r+="(?:/|$)");const l=new RegExp(r,n.sensitive?"":"i");function i(c){const u=c.match(l),d={};if(!u)return null;for(let f=1;f<u.length;f++){const p=u[f]||"",h=o[f-1];d[h.name]=p&&h.repeatable?p.split("/"):p}return d}function a(c){let u="",d=!1;for(const f of e){(!d||!u.endsWith("/"))&&(u+="/"),d=!1;for(const p of f)if(p.type===Qn.Static)u+=p.value;else if(p.type===Qn.Param){const{value:h,repeatable:v,optional:_}=p,y=h in c?c[h]:"";if(Kt(y)&&!v)throw new Error(`Provided param "${h}" is an array but it is not repeatable (* or + modifiers)`);const k=Kt(y)?y.join("/"):y;if(!k)if(_)f.length<2&&(u.endsWith("/")?u=u.slice(0,-1):d=!0);else throw new Error(`Missing required param "${h}"`);u+=k}}return u||"/"}return{re:l,score:s,keys:o,parse:i,stringify:a}}function Xv(e,t){let n=0;for(;n<e.length&&n<t.length;){const s=t[n]-e[n];if(s)return s;n++}return e.length<t.length?e.length===1&&e[0]===kt.Static+kt.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===kt.Static+kt.Segment?1:-1:0}function Pf(e,t){let n=0;const s=e.score,r=t.score;for(;n<s.length&&n<r.length;){const o=Xv(s[n],r[n]);if(o)return o;n++}if(Math.abs(r.length-s.length)===1){if(Tc(s))return 1;if(Tc(r))return-1}return r.length-s.length}function Tc(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const Yv={strict:!1,end:!0,sensitive:!1};function Jv(e,t,n){const s=Kv(qv(e.path),n),r=Ne(s,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function Qv(e,t){const n=[],s=new Map;t=Sc(Yv,t);function r(d){return s.get(d)}function o(d,f,p){const h=!p,v=Pc(d);v.aliasOf=p&&p.record;const _=Sc(t,d),y=[v];if("alias"in d){const R=typeof d.alias=="string"?[d.alias]:d.alias;for(const j of R)y.push(Pc(Ne({},v,{components:p?p.record.components:v.components,path:j,aliasOf:p?p.record:v})))}let k,C;for(const R of y){const{path:j}=R;if(f&&j[0]!=="/"){const O=f.record.path,L=O[O.length-1]==="/"?"":"/";R.path=f.record.path+(j&&L+j)}if(k=Jv(R,f,_),p?p.alias.push(k):(C=C||k,C!==k&&C.alias.push(k),h&&d.name&&!Oc(k)&&l(d.name)),Of(k)&&a(k),v.children){const O=v.children;for(let L=0;L<O.length;L++)o(O[L],k,p&&p.children[L])}p=p||k}return C?()=>{l(C)}:fr}function l(d){if(Rf(d)){const f=s.get(d);f&&(s.delete(d),n.splice(n.indexOf(f),1),f.children.forEach(l),f.alias.forEach(l))}else{const f=n.indexOf(d);f>-1&&(n.splice(f,1),d.record.name&&s.delete(d.record.name),d.children.forEach(l),d.alias.forEach(l))}}function i(){return n}function a(d){const f=ty(d,n);n.splice(f,0,d),d.record.name&&!Oc(d)&&s.set(d.record.name,d)}function c(d,f){let p,h={},v,_;if("name"in d&&d.name){if(p=s.get(d.name),!p)throw Ps(We.MATCHER_NOT_FOUND,{location:d});_=p.record.name,h=Ne(Nc(f.params,p.keys.filter(C=>!C.optional).concat(p.parent?p.parent.keys.filter(C=>C.optional):[]).map(C=>C.name)),d.params&&Nc(d.params,p.keys.map(C=>C.name))),v=p.stringify(h)}else if(d.path!=null)v=d.path,p=n.find(C=>C.re.test(v)),p&&(h=p.parse(v),_=p.record.name);else{if(p=f.name?s.get(f.name):n.find(C=>C.re.test(f.path)),!p)throw Ps(We.MATCHER_NOT_FOUND,{location:d,currentLocation:f});_=p.record.name,h=Ne({},f.params,d.params),v=p.stringify(h)}const y=[];let k=p;for(;k;)y.unshift(k.record),k=k.parent;return{name:_,path:v,params:h,matched:y,meta:ey(y)}}e.forEach(d=>o(d));function u(){n.length=0,s.clear()}return{addRoute:o,resolve:c,removeRoute:l,clearRoutes:u,getRoutes:i,getRecordMatcher:r}}function Nc(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function Pc(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Zv(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Zv(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="object"?n[s]:n;return t}function Oc(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function ey(e){return e.reduce((t,n)=>Ne(t,n.meta),{})}function ty(e,t){let n=0,s=t.length;for(;n!==s;){const o=n+s>>1;Pf(e,t[o])<0?s=o:n=o+1}const r=ny(e);return r&&(s=t.lastIndexOf(r,s-1)),s}function ny(e){let t=e;for(;t=t.parent;)if(Of(t)&&Pf(e,t)===0)return t}function Of({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Lc(e){const t=Nt(Zo),n=Nt(ra),s=W(()=>{const a=G(e.to);return t.resolve(a)}),r=W(()=>{const{matched:a}=s.value,{length:c}=a,u=a[c-1],d=n.matched;if(!u||!d.length)return-1;const f=d.findIndex(Ns.bind(null,u));if(f>-1)return f;const p=Mc(a[c-2]);return c>1&&Mc(u)===p&&d[d.length-1].path!==p?d.findIndex(Ns.bind(null,a[c-2])):f}),o=W(()=>r.value>-1&&iy(n.params,s.value.params)),l=W(()=>r.value>-1&&r.value===n.matched.length-1&&If(n.params,s.value.params));function i(a={}){if(ly(a)){const c=t[G(e.replace)?"replace":"push"](G(e.to)).catch(fr);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>c),c}return Promise.resolve()}return{route:s,href:W(()=>s.value.href),isActive:o,isExactActive:l,navigate:i}}function sy(e){return e.length===1?e[0]:e}const ry=Le({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Lc,setup(e,{slots:t}){const n=cs(Lc(e)),{options:s}=Nt(Zo),r=W(()=>({[Dc(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[Dc(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&sy(t.default(n));return e.custom?o:Ht("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},o)}}}),oy=ry;function ly(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function iy(e,t){for(const n in t){const s=t[n],r=e[n];if(typeof s=="string"){if(s!==r)return!1}else if(!Kt(r)||r.length!==s.length||s.some((o,l)=>o.valueOf()!==r[l].valueOf()))return!1}return!0}function Mc(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Dc=(e,t,n)=>e??t??n,ay=Le({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=Nt(pi),r=W(()=>e.route||s.value),o=Nt(Ac,0),l=W(()=>{let c=G(o);const{matched:u}=r.value;let d;for(;(d=u[c])&&!d.components;)c++;return c}),i=W(()=>r.value.matched[l.value]);Ss(Ac,W(()=>l.value+1)),Ss(Dv,i),Ss(pi,r);const a=z();return Re(()=>[a.value,i.value,e.name],([c,u,d],[f,p,h])=>{u&&(u.instances[d]=c,p&&p!==u&&c&&c===f&&(u.leaveGuards.size||(u.leaveGuards=p.leaveGuards),u.updateGuards.size||(u.updateGuards=p.updateGuards))),c&&u&&(!p||!Ns(u,p)||!f)&&(u.enterCallbacks[d]||[]).forEach(v=>v(c))},{flush:"post"}),()=>{const c=r.value,u=e.name,d=i.value,f=d&&d.components[u];if(!f)return Fc(n.default,{Component:f,route:c});const p=d.props[u],h=p?p===!0?c.params:typeof p=="function"?p(c):p:null,_=Ht(f,Ne({},h,t,{onVnodeUnmounted:y=>{y.component.isUnmounted&&(d.instances[u]=null)},ref:a}));return Fc(n.default,{Component:_,route:c})||_}}});function Fc(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const cy=ay;function uy(e){const t=Qv(e.routes,e),n=e.parseQuery||Lv,s=e.stringifyQuery||Ec,r=e.history,o=Xs(),l=Xs(),i=Xs(),a=Ki(Rn);let c=Rn;ms&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Rl.bind(null,B=>""+B),d=Rl.bind(null,yv),f=Rl.bind(null,Sr);function p(B,H){let Q,ie;return Rf(B)?(Q=t.getRecordMatcher(B),ie=H):ie=B,t.addRoute(ie,Q)}function h(B){const H=t.getRecordMatcher(B);H&&t.removeRoute(H)}function v(){return t.getRoutes().map(B=>B.record)}function _(B){return!!t.getRecordMatcher(B)}function y(B,H){if(H=Ne({},H||a.value),typeof B=="string"){const b=Tl(n,B,H.path),A=t.resolve({path:b.path},H),T=r.createHref(b.fullPath);return Ne(b,A,{params:f(A.params),hash:Sr(b.hash),redirectedFrom:void 0,href:T})}let Q;if(B.path!=null)Q=Ne({},B,{path:Tl(n,B.path,H.path).path});else{const b=Ne({},B.params);for(const A in b)b[A]==null&&delete b[A];Q=Ne({},B,{params:d(b)}),H.params=d(H.params)}const ie=t.resolve(Q,H),he=B.hash||"";ie.params=u(f(ie.params));const S=wv(s,Ne({},B,{hash:gv(he),path:ie.path})),$=r.createHref(S);return Ne({fullPath:S,hash:he,query:s===Ec?Mv(B.query):B.query||{}},ie,{redirectedFrom:void 0,href:$})}function k(B){return typeof B=="string"?Tl(n,B,a.value.path):Ne({},B)}function C(B,H){if(c!==B)return Ps(We.NAVIGATION_CANCELLED,{from:H,to:B})}function R(B){return L(B)}function j(B){return R(Ne(k(B),{replace:!0}))}function O(B,H){const Q=B.matched[B.matched.length-1];if(Q&&Q.redirect){const{redirect:ie}=Q;let he=typeof ie=="function"?ie(B,H):ie;return typeof he=="string"&&(he=he.includes("?")||he.includes("#")?he=k(he):{path:he},he.params={}),Ne({query:B.query,hash:B.hash,params:he.path!=null?{}:B.params},he)}}function L(B,H){const Q=c=y(B),ie=a.value,he=B.state,S=B.force,$=B.replace===!0,b=O(Q,ie);if(b)return L(Ne(k(b),{state:typeof b=="object"?Ne({},he,b.state):he,force:S,replace:$}),H||Q);const A=Q;A.redirectedFrom=H;let T;return!S&&Cv(s,ie,Q)&&(T=Ps(We.NAVIGATION_DUPLICATED,{to:A,from:ie}),Ze(ie,ie,!0,!1)),(T?Promise.resolve(T):D(A,ie)).catch(F=>dn(F)?dn(F,We.NAVIGATION_GUARD_REDIRECT)?F:Be(F):de(F,A,ie)).then(F=>{if(F){if(dn(F,We.NAVIGATION_GUARD_REDIRECT))return L(Ne({replace:$},k(F.to),{state:typeof F.to=="object"?Ne({},he,F.to.state):he,force:S}),H||A)}else F=x(A,ie,!0,$,he);return Y(A,ie,F),F})}function U(B,H){const Q=C(B,H);return Q?Promise.reject(Q):Promise.resolve()}function P(B){const H=ne.values().next().value;return H&&typeof H.runWithContext=="function"?H.runWithContext(B):B()}function D(B,H){let Q;const[ie,he,S]=Fv(B,H);Q=Pl(ie.reverse(),"beforeRouteLeave",B,H);for(const b of ie)b.leaveGuards.forEach(A=>{Q.push(Dn(A,B,H))});const $=U.bind(null,B,H);return Q.push($),we(Q).then(()=>{Q=[];for(const b of o.list())Q.push(Dn(b,B,H));return Q.push($),we(Q)}).then(()=>{Q=Pl(he,"beforeRouteUpdate",B,H);for(const b of he)b.updateGuards.forEach(A=>{Q.push(Dn(A,B,H))});return Q.push($),we(Q)}).then(()=>{Q=[];for(const b of S)if(b.beforeEnter)if(Kt(b.beforeEnter))for(const A of b.beforeEnter)Q.push(Dn(A,B,H));else Q.push(Dn(b.beforeEnter,B,H));return Q.push($),we(Q)}).then(()=>(B.matched.forEach(b=>b.enterCallbacks={}),Q=Pl(S,"beforeRouteEnter",B,H,P),Q.push($),we(Q))).then(()=>{Q=[];for(const b of l.list())Q.push(Dn(b,B,H));return Q.push($),we(Q)}).catch(b=>dn(b,We.NAVIGATION_CANCELLED)?b:Promise.reject(b))}function Y(B,H,Q){i.list().forEach(ie=>P(()=>ie(B,H,Q)))}function x(B,H,Q,ie,he){const S=C(B,H);if(S)return S;const $=H===Rn,b=ms?history.state:{};Q&&(ie||$?r.replace(B.fullPath,Ne({scroll:$&&b&&b.scroll},he)):r.push(B.fullPath,he)),a.value=B,Ze(B,H,Q,$),Be()}let M;function V(){M||(M=r.listen((B,H,Q)=>{if(!se.listening)return;const ie=y(B),he=O(ie,se.currentRoute.value);if(he){L(Ne(he,{replace:!0,force:!0}),ie).catch(fr);return}c=ie;const S=a.value;ms&&Rv($c(S.fullPath,Q.delta),Qo()),D(ie,S).catch($=>dn($,We.NAVIGATION_ABORTED|We.NAVIGATION_CANCELLED)?$:dn($,We.NAVIGATION_GUARD_REDIRECT)?(L(Ne(k($.to),{force:!0}),ie).then(b=>{dn(b,We.NAVIGATION_ABORTED|We.NAVIGATION_DUPLICATED)&&!Q.delta&&Q.type===di.pop&&r.go(-1,!1)}).catch(fr),Promise.reject()):(Q.delta&&r.go(-Q.delta,!1),de($,ie,S))).then($=>{$=$||x(ie,S,!1),$&&(Q.delta&&!dn($,We.NAVIGATION_CANCELLED)?r.go(-Q.delta,!1):Q.type===di.pop&&dn($,We.NAVIGATION_ABORTED|We.NAVIGATION_DUPLICATED)&&r.go(-1,!1)),Y(ie,S,$)}).catch(fr)}))}let fe=Xs(),me=Xs(),_e;function de(B,H,Q){Be(B);const ie=me.list();return ie.length?ie.forEach(he=>he(B,H,Q)):console.error(B),Promise.reject(B)}function Te(){return _e&&a.value!==Rn?Promise.resolve():new Promise((B,H)=>{fe.add([B,H])})}function Be(B){return _e||(_e=!B,V(),fe.list().forEach(([H,Q])=>B?Q(B):H()),fe.reset()),B}function Ze(B,H,Q,ie){const{scrollBehavior:he}=e;if(!ms||!he)return Promise.resolve();const S=!Q&&Tv($c(B.fullPath,0))||(ie||!Q)&&history.state&&history.state.scroll||null;return cn().then(()=>he(B,H,S)).then($=>$&&Iv($)).catch($=>de($,B,H))}const qe=B=>r.go(B);let X;const ne=new Set,se={currentRoute:a,listening:!0,addRoute:p,removeRoute:h,clearRoutes:t.clearRoutes,hasRoute:_,getRoutes:v,resolve:y,options:e,push:R,replace:j,go:qe,back:()=>qe(-1),forward:()=>qe(1),beforeEach:o.add,beforeResolve:l.add,afterEach:i.add,onError:me.add,isReady:Te,install(B){B.component("RouterLink",oy),B.component("RouterView",cy),B.config.globalProperties.$router=se,Object.defineProperty(B.config.globalProperties,"$route",{enumerable:!0,get:()=>G(a)}),ms&&!X&&a.value===Rn&&(X=!0,R(r.location).catch(ie=>{}));const H={};for(const ie in Rn)Object.defineProperty(H,ie,{get:()=>a.value[ie],enumerable:!0});B.provide(Zo,se),B.provide(ra,wd(H)),B.provide(pi,a);const Q=B.unmount;ne.add(B),B.unmount=function(){ne.delete(B),ne.size<1&&(c=Rn,M&&M(),M=null,a.value=Rn,X=!1,_e=!1),Q()}}};function we(B){return B.reduce((H,Q)=>H.then(()=>P(Q)),Promise.resolve())}return se}function el(){return Nt(Zo)}function tl(e){return Nt(ra)}const jc=document.querySelector("base"),Ol=jc?jc.getAttribute("href"):"/",Lf=Ol.endsWith("/")?Ol:Ol+"/",Mf=Lf.replace(/\/+$/,""),Df=/^[a-z0-9]+(-[a-z0-9]+)*$/,nl=(e,t,n,s="")=>{const r=e.split(":");if(e.slice(0,1)==="@"){if(r.length<2||r.length>3)return null;s=r.shift().slice(1)}if(r.length>3||!r.length)return null;if(r.length>1){const i=r.pop(),a=r.pop(),c={provider:r.length>0?r[0]:s,prefix:a,name:i};return t&&!so(c)?null:c}const o=r[0],l=o.split("-");if(l.length>1){const i={provider:s,prefix:l.shift(),name:l.join("-")};return t&&!so(i)?null:i}if(n&&s===""){const i={provider:s,prefix:"",name:o};return t&&!so(i,n)?null:i}return null},so=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function dy(e,t){const n=e.icons,s=e.aliases||Object.create(null),r=Object.create(null);function o(l){if(n[l])return r[l]=[];if(!(l in r)){r[l]=null;const i=s[l]&&s[l].parent,a=i&&o(i);a&&(r[l]=[i].concat(a))}return r[l]}return Object.keys(n).concat(Object.keys(s)).forEach(o),r}const Ff=Object.freeze({left:0,top:0,width:16,height:16}),wo=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),sl=Object.freeze({...Ff,...wo}),hi=Object.freeze({...sl,body:"",hidden:!1});function fy(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const s=((e.rotate||0)+(t.rotate||0))%4;return s&&(n.rotate=s),n}function Bc(e,t){const n=fy(e,t);for(const s in hi)s in wo?s in e&&!(s in n)&&(n[s]=wo[s]):s in t?n[s]=t[s]:s in e&&(n[s]=e[s]);return n}function py(e,t,n){const s=e.icons,r=e.aliases||Object.create(null);let o={};function l(i){o=Bc(s[i]||r[i],o)}return l(t),n.forEach(l),Bc(e,o)}function jf(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(r=>{t(r,null),n.push(r)});const s=dy(e);for(const r in s){const o=s[r];o&&(t(r,py(e,r,o)),n.push(r))}return n}const hy={provider:"",aliases:{},not_found:{},...Ff};function Ll(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function Bf(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!Ll(e,hy))return null;const n=t.icons;for(const r in n){const o=n[r];if(!r||typeof o.body!="string"||!Ll(o,hi))return null}const s=t.aliases||Object.create(null);for(const r in s){const o=s[r],l=o.parent;if(!r||typeof l!="string"||!n[l]&&!s[l]||!Ll(o,hi))return null}return t}const Gc=Object.create(null);function gy(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function Os(e,t){const n=Gc[e]||(Gc[e]=Object.create(null));return n[t]||(n[t]=gy(e,t))}function Gf(e,t){return Bf(t)?jf(t,(n,s)=>{s?e.icons[n]=s:e.missing.add(n)}):[]}function my(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}let kr=!1;function Vf(e){return typeof e=="boolean"&&(kr=e),kr}function vy(e){const t=typeof e=="string"?nl(e,!0,kr):e;if(t){const n=Os(t.provider,t.prefix),s=t.name;return n.icons[s]||(n.missing.has(s)?null:void 0)}}function yy(e,t){const n=nl(e,!0,kr);if(!n)return!1;const s=Os(n.provider,n.prefix);return t?my(s,n.name,t):(s.missing.add(n.name),!0)}function _y(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),kr&&!t&&!e.prefix){let s=!1;return Bf(e)&&(e.prefix="",jf(e,(r,o)=>{yy(r,o)&&(s=!0)})),s}const n=e.prefix;return so({prefix:n,name:"a"})?!!Gf(Os(t,n),e):!1}const Uf=Object.freeze({width:null,height:null}),Hf=Object.freeze({...Uf,...wo}),by=/(-?[0-9.]*[0-9]+[0-9.]*)/g,wy=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Vc(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const s=e.split(by);if(s===null||!s.length)return e;const r=[];let o=s.shift(),l=wy.test(o);for(;;){if(l){const i=parseFloat(o);isNaN(i)?r.push(o):r.push(Math.ceil(i*t*n)/n)}else r.push(o);if(o=s.shift(),o===void 0)return r.join("");l=!l}}function Cy(e,t="defs"){let n="";const s=e.indexOf("<"+t);for(;s>=0;){const r=e.indexOf(">",s),o=e.indexOf("</"+t);if(r===-1||o===-1)break;const l=e.indexOf(">",o);if(l===-1)break;n+=e.slice(r+1,o).trim(),e=e.slice(0,s).trim()+e.slice(l+1)}return{defs:n,content:e}}function Sy(e,t){return e?"<defs>"+e+"</defs>"+t:t}function ky(e,t,n){const s=Cy(e);return Sy(s.defs,t+s.content+n)}const xy=e=>e==="unset"||e==="undefined"||e==="none";function $y(e,t){const n={...sl,...e},s={...Hf,...t},r={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,s].forEach(v=>{const _=[],y=v.hFlip,k=v.vFlip;let C=v.rotate;y?k?C+=2:(_.push("translate("+(r.width+r.left).toString()+" "+(0-r.top).toString()+")"),_.push("scale(-1 1)"),r.top=r.left=0):k&&(_.push("translate("+(0-r.left).toString()+" "+(r.height+r.top).toString()+")"),_.push("scale(1 -1)"),r.top=r.left=0);let R;switch(C<0&&(C-=Math.floor(C/4)*4),C=C%4,C){case 1:R=r.height/2+r.top,_.unshift("rotate(90 "+R.toString()+" "+R.toString()+")");break;case 2:_.unshift("rotate(180 "+(r.width/2+r.left).toString()+" "+(r.height/2+r.top).toString()+")");break;case 3:R=r.width/2+r.left,_.unshift("rotate(-90 "+R.toString()+" "+R.toString()+")");break}C%2===1&&(r.left!==r.top&&(R=r.left,r.left=r.top,r.top=R),r.width!==r.height&&(R=r.width,r.width=r.height,r.height=R)),_.length&&(o=ky(o,'<g transform="'+_.join(" ")+'">',"</g>"))});const l=s.width,i=s.height,a=r.width,c=r.height;let u,d;l===null?(d=i===null?"1em":i==="auto"?c:i,u=Vc(d,a/c)):(u=l==="auto"?a:l,d=i===null?Vc(u,c/a):i==="auto"?c:i);const f={},p=(v,_)=>{xy(_)||(f[v]=_.toString())};p("width",u),p("height",d);const h=[r.left,r.top,a,c];return f.viewBox=h.join(" "),{attributes:f,viewBox:h,body:o}}const Ey=/\sid="(\S+)"/g,Uc=new Map;function Ay(e){e=e.replace(/[0-9]+$/,"")||"a";const t=Uc.get(e)||0;return Uc.set(e,t+1),t?`${e}${t}`:e}function Iy(e){const t=[];let n;for(;n=Ey.exec(e);)t.push(n[1]);if(!t.length)return e;const s="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(r=>{const o=Ay(r),l=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+l+')([")]|\\.[a-z])',"g"),"$1"+o+s+"$3")}),e=e.replace(new RegExp(s,"g"),""),e}const gi=Object.create(null);function Ry(e,t){gi[e]=t}function mi(e){return gi[e]||gi[""]}function oa(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const la=Object.create(null),Ys=["https://api.simplesvg.com","https://api.unisvg.com"],ro=[];for(;Ys.length>0;)Ys.length===1||Math.random()>.5?ro.push(Ys.shift()):ro.push(Ys.pop());la[""]=oa({resources:["https://api.iconify.design"].concat(ro)});function Ty(e,t){const n=oa(t);return n===null?!1:(la[e]=n,!0)}function ia(e){return la[e]}const Ny=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Hc=Ny();function Py(e,t){const n=ia(e);if(!n)return 0;let s;if(!n.maxURL)s=0;else{let r=0;n.resources.forEach(l=>{r=Math.max(r,l.length)});const o=t+".json?icons=";s=n.maxURL-r-n.path.length-o.length}return s}function Oy(e){return e===404}const Ly=(e,t,n)=>{const s=[],r=Py(e,t),o="icons";let l={type:o,provider:e,prefix:t,icons:[]},i=0;return n.forEach((a,c)=>{i+=a.length+1,i>=r&&c>0&&(s.push(l),l={type:o,provider:e,prefix:t,icons:[]},i=a.length),l.icons.push(a)}),s.push(l),s};function My(e){if(typeof e=="string"){const t=ia(e);if(t)return t.path}return"/"}const Dy=(e,t,n)=>{if(!Hc){n("abort",424);return}let s=My(t.provider);switch(t.type){case"icons":{const o=t.prefix,l=t.icons.join(","),i=new URLSearchParams({icons:l});s+=o+".json?"+i.toString();break}case"custom":{const o=t.uri;s+=o.slice(0,1)==="/"?o.slice(1):o;break}default:n("abort",400);return}let r=503;Hc(e+s).then(o=>{const l=o.status;if(l!==200){setTimeout(()=>{n(Oy(l)?"abort":"next",l)});return}return r=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{o===404?n("abort",o):n("next",r)});return}setTimeout(()=>{n("success",o)})}).catch(()=>{n("next",r)})},Fy={prepare:Ly,send:Dy};function qf(e,t){e.forEach(n=>{const s=n.loaderCallbacks;s&&(n.loaderCallbacks=s.filter(r=>r.id!==t))})}function jy(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const s=e.provider,r=e.prefix;t.forEach(o=>{const l=o.icons,i=l.pending.length;l.pending=l.pending.filter(a=>{if(a.prefix!==r)return!0;const c=a.name;if(e.icons[c])l.loaded.push({provider:s,prefix:r,name:c});else if(e.missing.has(c))l.missing.push({provider:s,prefix:r,name:c});else return n=!0,!0;return!1}),l.pending.length!==i&&(n||qf([e],o.id),o.callback(l.loaded.slice(0),l.missing.slice(0),l.pending.slice(0),o.abort))})}))}let By=0;function Gy(e,t,n){const s=By++,r=qf.bind(null,n,s);if(!t.pending.length)return r;const o={id:s,icons:t,callback:e,abort:r};return n.forEach(l=>{(l.loaderCallbacks||(l.loaderCallbacks=[])).push(o)}),r}function Vy(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((r,o)=>r.provider!==o.provider?r.provider.localeCompare(o.provider):r.prefix!==o.prefix?r.prefix.localeCompare(o.prefix):r.name.localeCompare(o.name));let s={provider:"",prefix:"",name:""};return e.forEach(r=>{if(s.name===r.name&&s.prefix===r.prefix&&s.provider===r.provider)return;s=r;const o=r.provider,l=r.prefix,i=r.name,a=n[o]||(n[o]=Object.create(null)),c=a[l]||(a[l]=Os(o,l));let u;i in c.icons?u=t.loaded:l===""||c.missing.has(i)?u=t.missing:u=t.pending;const d={provider:o,prefix:l,name:i};u.push(d)}),t}function Uy(e,t=!0,n=!1){const s=[];return e.forEach(r=>{const o=typeof r=="string"?nl(r,t,n):r;o&&s.push(o)}),s}const Hy={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function qy(e,t,n,s){const r=e.resources.length,o=e.random?Math.floor(Math.random()*r):e.index;let l;if(e.random){let O=e.resources.slice(0);for(l=[];O.length>1;){const L=Math.floor(Math.random()*O.length);l.push(O[L]),O=O.slice(0,L).concat(O.slice(L+1))}l=l.concat(O)}else l=e.resources.slice(o).concat(e.resources.slice(0,o));const i=Date.now();let a="pending",c=0,u,d=null,f=[],p=[];typeof s=="function"&&p.push(s);function h(){d&&(clearTimeout(d),d=null)}function v(){a==="pending"&&(a="aborted"),h(),f.forEach(O=>{O.status==="pending"&&(O.status="aborted")}),f=[]}function _(O,L){L&&(p=[]),typeof O=="function"&&p.push(O)}function y(){return{startTime:i,payload:t,status:a,queriesSent:c,queriesPending:f.length,subscribe:_,abort:v}}function k(){a="failed",p.forEach(O=>{O(void 0,u)})}function C(){f.forEach(O=>{O.status==="pending"&&(O.status="aborted")}),f=[]}function R(O,L,U){const P=L!=="success";switch(f=f.filter(D=>D!==O),a){case"pending":break;case"failed":if(P||!e.dataAfterTimeout)return;break;default:return}if(L==="abort"){u=U,k();return}if(P){u=U,f.length||(l.length?j():k());return}if(h(),C(),!e.random){const D=e.resources.indexOf(O.resource);D!==-1&&D!==e.index&&(e.index=D)}a="completed",p.forEach(D=>{D(U)})}function j(){if(a!=="pending")return;h();const O=l.shift();if(O===void 0){if(f.length){d=setTimeout(()=>{h(),a==="pending"&&(C(),k())},e.timeout);return}k();return}const L={status:"pending",resource:O,callback:(U,P)=>{R(L,U,P)}};f.push(L),c++,d=setTimeout(j,e.rotate),n(O,t,L.callback)}return setTimeout(j),y}function zf(e){const t={...Hy,...e};let n=[];function s(){n=n.filter(l=>l().status==="pending")}function r(l,i,a){const c=qy(t,l,i,(u,d)=>{s(),a&&a(u,d)});return n.push(c),c}function o(l){return n.find(i=>l(i))||null}return{query:r,find:o,setIndex:l=>{t.index=l},getIndex:()=>t.index,cleanup:s}}function qc(){}const Ml=Object.create(null);function zy(e){if(!Ml[e]){const t=ia(e);if(!t)return;Ml[e]={config:t,redundancy:zf(t)}}return Ml[e]}function Wy(e,t,n){let s,r;if(typeof e=="string"){const o=mi(e);if(!o)return n(void 0,424),qc;r=o.send;const l=zy(e);l&&(s=l.redundancy)}else{const o=oa(e);if(o){s=zf(o);const l=mi(e.resources?e.resources[0]:"");l&&(r=l.send)}}return!s||!r?(n(void 0,424),qc):s.query(t,r,n)().abort}function zc(){}function Ky(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,jy(e)}))}function Xy(e){const t=[],n=[];return e.forEach(s=>{(s.match(Df)?t:n).push(s)}),{valid:t,invalid:n}}function Js(e,t,n){function s(){const r=e.pendingIcons;t.forEach(o=>{r&&r.delete(o),e.icons[o]||e.missing.add(o)})}if(n&&typeof n=="object")try{if(!Gf(e,n).length){s();return}}catch(r){console.error(r)}s(),Ky(e)}function Wc(e,t){e instanceof Promise?e.then(n=>{t(n)}).catch(()=>{t(null)}):t(e)}function Yy(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:s}=e,r=e.iconsToLoad;if(delete e.iconsToLoad,!r||!r.length)return;const o=e.loadIcon;if(e.loadIcons&&(r.length>1||!o)){Wc(e.loadIcons(r,s,n),c=>{Js(e,r,c)});return}if(o){r.forEach(c=>{Wc(o(c,s,n),u=>{Js(e,[c],u?{prefix:s,icons:{[c]:u}}:null)})});return}const{valid:l,invalid:i}=Xy(r);if(i.length&&Js(e,i,null),!l.length)return;const a=s.match(Df)?mi(n):null;if(!a){Js(e,l,null);return}a.prepare(n,s,l).forEach(c=>{Wy(n,c,u=>{Js(e,c.icons,u)})})}))}const Jy=(e,t)=>{const n=Vy(Uy(e,!0,Vf()));if(!n.pending.length){let i=!0;return t&&setTimeout(()=>{i&&t(n.loaded,n.missing,n.pending,zc)}),()=>{i=!1}}const s=Object.create(null),r=[];let o,l;return n.pending.forEach(i=>{const{provider:a,prefix:c}=i;if(c===l&&a===o)return;o=a,l=c,r.push(Os(a,c));const u=s[a]||(s[a]=Object.create(null));u[c]||(u[c]=[])}),n.pending.forEach(i=>{const{provider:a,prefix:c,name:u}=i,d=Os(a,c),f=d.pendingIcons||(d.pendingIcons=new Set);f.has(u)||(f.add(u),s[a][c].push(u))}),r.forEach(i=>{const a=s[i.provider][i.prefix];a.length&&Yy(i,a)}),t?Gy(t,n,r):zc};function Qy(e,t){const n={...e};for(const s in t){const r=t[s],o=typeof r;s in Uf?(r===null||r&&(o==="string"||o==="number"))&&(n[s]=r):o===typeof n[s]&&(n[s]=s==="rotate"?r%4:r)}return n}const Zy=/[\s,]+/;function e_(e,t){t.split(Zy).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function t_(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function s(r){for(;r<0;)r+=4;return r%4}if(n===""){const r=parseInt(e);return isNaN(r)?0:s(r)}else if(n!==e){let r=0;switch(n){case"%":r=25;break;case"deg":r=90}if(r){let o=parseFloat(e.slice(0,e.length-n.length));return isNaN(o)?0:(o=o/r,o%1===0?s(o):0)}}return t}function n_(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const s in t)n+=" "+s+'="'+t[s]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function s_(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function r_(e){return"data:image/svg+xml,"+s_(e)}function o_(e){return'url("'+r_(e)+'")'}const Kc={...Hf,inline:!1},l_={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},i_={display:"inline-block"},vi={backgroundColor:"currentColor"},Wf={backgroundColor:"transparent"},Xc={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Yc={webkitMask:vi,mask:vi,background:Wf};for(const e in Yc){const t=Yc[e];for(const n in Xc)t[e+n]=Xc[n]}const oo={};["horizontal","vertical"].forEach(e=>{const t=e.slice(0,1)+"Flip";oo[e+"-flip"]=t,oo[e.slice(0,1)+"-flip"]=t,oo[e+"Flip"]=t});function Jc(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const Qc=(e,t)=>{const n=Qy(Kc,t),s={...l_},r=t.mode||"svg",o={},l=t.style,i=typeof l=="object"&&!(l instanceof Array)?l:{};for(let v in t){const _=t[v];if(_!==void 0)switch(v){case"icon":case"style":case"onLoad":case"mode":case"ssr":case"customise":break;case"inline":case"hFlip":case"vFlip":n[v]=_===!0||_==="true"||_===1;break;case"flip":typeof _=="string"&&e_(n,_);break;case"color":o.color=_;break;case"rotate":typeof _=="string"?n[v]=t_(_):typeof _=="number"&&(n[v]=_);break;case"ariaHidden":case"aria-hidden":_!==!0&&_!=="true"&&delete s["aria-hidden"];break;default:{const y=oo[v];y?(_===!0||_==="true"||_===1)&&(n[y]=!0):Kc[v]===void 0&&(s[v]=_)}}}const a=$y(e,n),c=a.attributes;if(n.inline&&(o.verticalAlign="-0.125em"),r==="svg")return s.style={...o,...i},Object.assign(s,c),s.innerHTML=Iy(a.body),Ht("svg",s);const{body:u,width:d,height:f}=e,p=r==="mask"||(r==="bg"?!1:u.indexOf("currentColor")!==-1),h=n_(u,{...c,width:d+"",height:f+""});return s.style={...o,"--svg":o_(h),width:Jc(c.width),height:Jc(c.height),...i_,...p?vi:Wf,...i},Ht("span",s)};Vf(!0);Ry("",Fy);if(typeof document<"u"&&typeof window<"u"){const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(s=>{try{(typeof s!="object"||s===null||s instanceof Array||typeof s.icons!="object"||typeof s.prefix!="string"||!_y(s))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const s="IconifyProviders["+n+"] is invalid.";try{const r=t[n];if(typeof r!="object"||!r||r.resources===void 0)continue;Ty(n,r)||console.error(s)}catch{console.error(s)}}}}const a_={...sl,body:""},yi=Le((e,{emit:t})=>{const n=z(null);function s(){var c,u;n.value&&((u=(c=n.value).abort)==null||u.call(c),n.value=null)}const r=z(!!e.ssr),o=z(""),l=Ki(null);function i(){const c=e.icon;if(typeof c=="object"&&c!==null&&typeof c.body=="string")return o.value="",{data:c};let u;if(typeof c!="string"||(u=nl(c,!1,!0))===null)return null;let d=vy(u);if(!d){const h=n.value;return(!h||h.name!==c)&&(d===null?n.value={name:c}:n.value={name:c,abort:Jy([u],a)}),null}s(),o.value!==c&&(o.value=c,cn(()=>{t("load",c)}));const f=e.customise;if(f){d=Object.assign({},d);const h=f(d.body,u.name,u.prefix,u.provider);typeof h=="string"&&(d.body=h)}const p=["iconify"];return u.prefix!==""&&p.push("iconify--"+u.prefix),u.provider!==""&&p.push("iconify--"+u.provider),{data:d,classes:p}}function a(){var u;const c=i();c?c.data!==((u=l.value)==null?void 0:u.data)&&(l.value=c):l.value=null}return r.value?a():De(()=>{r.value=!0,a()}),Re(()=>e.icon,a),ct(s),()=>{const c=l.value;if(!c)return Qc(a_,e);let u=e;return c.classes&&(u={...e,class:c.classes.join(" ")}),Qc({...sl,...c.data},u)}},{props:["icon","mode","ssr","width","height","style","color","inline","rotate","hFlip","horizontalFlip","vFlip","verticalFlip","flip","id","ariaHidden","customise","title"],emits:["load"]});function Me(e){return`${Mf}/api${e}`}const ke=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},c_={class:"pc-layout"},u_={class:"pc-layout__main"},d_={key:0,class:"pc-layout__header"},f_={class:"pc-layout__content pc-scroll"},p_={__name:"AppLayout",props:{navWidth:{type:String,default:"240px"}},setup(e){return(t,n)=>(m(),w("div",c_,[g("aside",{class:"pc-layout__nav",style:nt({width:e.navWidth})},[ue(t.$slots,"nav",{},void 0,!0)],4),g("div",u_,[t.$slots.header?(m(),w("header",d_,[ue(t.$slots,"header",{},void 0,!0)])):K("",!0),g("main",f_,[ue(t.$slots,"default",{},void 0,!0)])])]))}},h_=ke(p_,[["__scopeId","data-v-8f1178ce"]]);function Zc(e){return typeof e=="string"?`'${e}'`:new g_().serialize(e)}const g_=function(){var t;class e{constructor(){An(this,t,new Map)}compare(s,r){const o=typeof s,l=typeof r;return o==="string"&&l==="string"?s.localeCompare(r):o==="number"&&l==="number"?s-r:String.prototype.localeCompare.call(this.serialize(s,!0),this.serialize(r,!0))}serialize(s,r){if(s===null)return"null";switch(typeof s){case"string":return r?s:`'${s}'`;case"bigint":return`${s}n`;case"object":return this.$object(s);case"function":return this.$function(s)}return String(s)}serializeObject(s){const r=Object.prototype.toString.call(s);if(r!=="[object Object]")return this.serializeBuiltInType(r.length<10?`unknown:${r}`:r.slice(8,-1),s);const o=s.constructor,l=o===Object||o===void 0?"":o.name;if(l!==""&&globalThis[l]===o)return this.serializeBuiltInType(l,s);if(typeof s.toJSON=="function"){const i=s.toJSON();return l+(i!==null&&typeof i=="object"?this.$object(i):`(${this.serialize(i)})`)}return this.serializeObjectEntries(l,Object.entries(s))}serializeBuiltInType(s,r){const o=this["$"+s];if(o)return o.call(this,r);if(typeof(r==null?void 0:r.entries)=="function")return this.serializeObjectEntries(s,r.entries());throw new Error(`Cannot serialize ${s}`)}serializeObjectEntries(s,r){const o=Array.from(r).sort((i,a)=>this.compare(i[0],a[0]));let l=`${s}{`;for(let i=0;i<o.length;i++){const[a,c]=o[i];l+=`${this.serialize(a,!0)}:${this.serialize(c)}`,i<o.length-1&&(l+=",")}return l+"}"}$object(s){let r=ot(this,t).get(s);return r===void 0&&(ot(this,t).set(s,`#${ot(this,t).size}`),r=this.serializeObject(s),ot(this,t).set(s,r)),r}$function(s){const r=Function.prototype.toString.call(s);return r.slice(-15)==="[native code] }"?`${s.name||""}()[native]`:`${s.name}(${s.length})${r.replace(/\s*\n\s*/g,"")}`}$Array(s){let r="[";for(let o=0;o<s.length;o++)r+=this.serialize(s[o]),o<s.length-1&&(r+=",");return r+"]"}$Date(s){try{return`Date(${s.toISOString()})`}catch{return"Date(null)"}}$ArrayBuffer(s){return`ArrayBuffer[${new Uint8Array(s).join(",")}]`}$Set(s){return`Set${this.$Array(Array.from(s).sort((r,o)=>this.compare(r,o)))}`}$Map(s){return this.serializeObjectEntries("Map",s.entries())}}t=new WeakMap;for(const n of["Error","RegExp","URL"])e.prototype["$"+n]=function(s){return`${n}(${s})`};for(const n of["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"])e.prototype["$"+n]=function(s){return`${n}[${s.join(",")}]`};for(const n of["BigInt64Array","BigUint64Array"])e.prototype["$"+n]=function(s){return`${n}[${s.join("n,")}${s.length>0?"n":""}]`};return e}();function Co(e,t){return e===t||Zc(e)===Zc(t)}function m_(e,t=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY){return Math.min(n,Math.max(t,e))}function Bs(e,t){const n=typeof e=="string"&&!t?`${e}Context`:t,s=Symbol(n);return[l=>{const i=Nt(s,l);if(i||i===null)return i;throw new Error(`Injection \`${s.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(", ")}`:`\`${e}\``}`)},l=>(Ss(s,l),l)]}function eu(){let e=document.activeElement;if(e==null)return null;for(;e!=null&&e.shadowRoot!=null&&e.shadowRoot.activeElement!=null;)e=e.shadowRoot.activeElement;return e}function v_(e){return e==null}function Kf(e,t){return v_(e)?!1:Array.isArray(e)?e.some(n=>Co(n,t)):Co(e,t)}function y_(e,t){return ld()?(Dh(e,t),!0):!1}const Xf=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const __=e=>typeof e<"u",tu=()=>{};function b_(e,t){function n(...s){return new Promise((r,o)=>{Promise.resolve(e(()=>t.apply(this,s),{fn:t,thisArg:this,args:s})).then(r).catch(o)})}return n}function w_(e,t={}){let n,s,r=tu;const o=a=>{clearTimeout(a),r(),r=tu};let l;return a=>{const c=vr(e),u=vr(t.maxWait);return n&&o(n),c<=0||u!==void 0&&u<=0?(s&&(o(s),s=void 0),Promise.resolve(a())):new Promise((d,f)=>{r=t.rejectOnCancel?f:d,l=a,u&&!s&&(s=setTimeout(()=>{n&&o(n),s=void 0,d(l())},u)),n=setTimeout(()=>{s&&o(s),s=void 0,d(a())},c)})}}function aa(e,t=200,n={}){return b_(w_(t,n),e)}function C_(e,t,n){return Re(e,t,{...n,once:!0})}const Yf=Xf?window:void 0;function Ls(e){var t;const n=vr(e);return(t=n==null?void 0:n.$el)!==null&&t!==void 0?t:n}function S_(){const e=Ki(!1),t=En();return t&&De(()=>{e.value=!0},t),e}function k_(e){const t=S_();return W(()=>(t.value,!!e()))}function x_(e){return JSON.parse(JSON.stringify(e))}function Ms(e,t,n={}){const{window:s=Yf,...r}=n;let o;const l=k_(()=>s&&"ResizeObserver"in s),i=()=>{o&&(o.disconnect(),o=void 0)},a=Re(W(()=>{const u=vr(e);return Array.isArray(u)?u.map(d=>Ls(d)):[Ls(u)]}),u=>{if(i(),l.value&&s){o=new ResizeObserver(t);for(const d of u)d&&o.observe(d,r)}},{immediate:!0,flush:"post"}),c=()=>{i(),a()};return y_(c),{isSupported:l,stop:c}}function ca(e,t,n,s={}){var r,o;const{clone:l=!1,passive:i=!1,eventName:a,deep:c=!1,defaultValue:u,shouldEmit:d}=s,f=En(),p=n||(f==null?void 0:f.emit)||(f==null||(r=f.$emit)===null||r===void 0?void 0:r.bind(f))||(f==null||(o=f.proxy)===null||o===void 0||(o=o.$emit)===null||o===void 0?void 0:o.bind(f==null?void 0:f.proxy));let h=a;t||(t="modelValue"),h=h||`update:${t.toString()}`;const v=k=>l?typeof l=="function"?l(k):x_(k):k,_=()=>__(e[t])?v(e[t]):u,y=k=>{d?d(k)&&p(h,k):p(h,k)};if(i){const k=z(_());let C=!1;return Re(()=>e[t],R=>{C||(C=!0,k.value=v(R),cn(()=>C=!1))}),Re(k,R=>{!C&&(R!==e[t]||c)&&y(R)},{deep:c}),k}else return W({get(){return _()},set(k){y(k)}})}function ua(e){return e?e.flatMap(t=>t.type===te?ua(t.children):[t]):[]}const[Jf]=Bs("ConfigProvider");function da(e){const t=Jf({dir:z("ltr")});return W(()=>{var n;return(e==null?void 0:e.value)||((n=t.dir)==null?void 0:n.value)||"ltr"})}function Qf(e){return W(()=>{var t;return vr(e)?!!((t=Ls(e))!=null&&t.closest("form")):!0})}function wt(){const e=En(),t=z(),n=W(()=>s());Qi(()=>{n.value!==s()&&rg(t)});function s(){return t.value&&"$el"in t.value&&["#text","#comment"].includes(t.value.$el.nodeName)?t.value.$el.nextElementSibling:Ls(t)}const r=Object.assign({},e.exposed),o={};for(const i in e.props)Object.defineProperty(o,i,{enumerable:!0,configurable:!0,get:()=>e.props[i]});if(Object.keys(r).length>0)for(const i in r)Object.defineProperty(o,i,{enumerable:!0,configurable:!0,get:()=>r[i]});Object.defineProperty(o,"$el",{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=o;function l(i){if(t.value=i,!!i&&(Object.defineProperty(o,"$el",{enumerable:!0,configurable:!0,get:()=>i instanceof Element?i:i.$el}),!(i instanceof Element)&&!Object.hasOwn(i,"$el"))){const a=i.$.exposed,c=Object.assign({},o);for(const u in a)Object.defineProperty(c,u,{enumerable:!0,configurable:!0,get:()=>a[u]});e.exposed=c}}return{forwardRef:l,currentRef:t,currentElement:n}}function $_(e,t="reka"){let n;return n=Cl==null?void 0:Cl(),t?`${t}-${n}`:n}function fa(e,t){const n=z(e);function s(o){return t[n.value][o]??n.value}return{state:n,dispatch:o=>{n.value=s(o)}}}function E_(e,t){var _;const n=z({}),s=z("none"),r=z(e),o=e.value?"mounted":"unmounted";let l;const i=((_=t.value)==null?void 0:_.ownerDocument.defaultView)??Yf,{state:a,dispatch:c}=fa(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),u=y=>{var k;if(Xf){const C=new CustomEvent(y,{bubbles:!1,cancelable:!1});(k=t.value)==null||k.dispatchEvent(C)}};Re(e,async(y,k)=>{var R;const C=k!==y;if(await cn(),C){const j=s.value,O=zr(t.value);y?(c("MOUNT"),u("enter"),O==="none"&&u("after-enter")):O==="none"||O==="undefined"||((R=n.value)==null?void 0:R.display)==="none"?(c("UNMOUNT"),u("leave"),u("after-leave")):k&&j!==O?(c("ANIMATION_OUT"),u("leave")):(c("UNMOUNT"),u("after-leave"))}},{immediate:!0});const d=y=>{const k=zr(t.value),C=k.includes(CSS.escape(y.animationName)),R=a.value==="mounted"?"enter":"leave";if(y.target===t.value&&C&&(u(`after-${R}`),c("ANIMATION_END"),!r.value)){const j=t.value.style.animationFillMode;t.value.style.animationFillMode="forwards",l=i==null?void 0:i.setTimeout(()=>{var O;((O=t.value)==null?void 0:O.style.animationFillMode)==="forwards"&&(t.value.style.animationFillMode=j)})}y.target===t.value&&k==="none"&&c("ANIMATION_END")},f=y=>{y.target===t.value&&(s.value=zr(t.value))},p=Re(t,(y,k)=>{y?(n.value=getComputedStyle(y),y.addEventListener("animationstart",f),y.addEventListener("animationcancel",d),y.addEventListener("animationend",d)):(c("ANIMATION_END"),l!==void 0&&(i==null||i.clearTimeout(l)),k==null||k.removeEventListener("animationstart",f),k==null||k.removeEventListener("animationcancel",d),k==null||k.removeEventListener("animationend",d))},{immediate:!0}),h=Re(a,()=>{const y=zr(t.value);s.value=a.value==="mounted"?y:"none"});return ct(()=>{p(),h()}),{isPresent:W(()=>["mounted","unmountSuspended"].includes(a.value))}}function zr(e){return e&&getComputedStyle(e).animationName||"none"}var rl=Le({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:n}){var c;const{present:s,forceMount:r}=js(e),o=z(),{isPresent:l}=E_(s,o);n({present:l});let i=t.default({present:l.value});i=ua(i||[]);const a=En();if(i&&(i==null?void 0:i.length)>1){const u=(c=a==null?void 0:a.parent)!=null&&c.type.name?`<${a.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${u}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(d=>` - ${d}`).join(`
|
|
26
|
+
`)].join(`
|
|
27
|
+
`))}return()=>r.value||s.value||l.value?Ht(t.default({present:l.value})[0],{ref:u=>{const d=Ls(u);return typeof(d==null?void 0:d.hasAttribute)>"u"||(d!=null&&d.hasAttribute("data-reka-popper-content-wrapper")?o.value=d.firstElementChild:o.value=d),d}}):null}});const _i=Le({name:"PrimitiveSlot",inheritAttrs:!1,setup(e,{attrs:t,slots:n}){return()=>{var a;if(!n.default)return null;const s=ua(n.default()),r=s.findIndex(c=>c.type!==gt);if(r===-1)return s;const o=s[r];(a=o.props)==null||delete a.ref;const l=o.props?Qe(t,o.props):t,i=xn({...o,props:{}},l);return s.length===1?i:(s[r]=i,s)}}}),A_=["area","img","input"],Ot=Le({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(e,{attrs:t,slots:n}){const s=e.asChild?"template":e.as;return typeof s=="string"&&A_.includes(s)?()=>Ht(s,t):s!=="template"?()=>Ht(e.as,t,{default:n.default}):()=>Ht(_i,t,{default:n.default})}});function bi(){const e=z(),t=W(()=>{var n,s;return["#text","#comment"].includes((n=e.value)==null?void 0:n.$el.nodeName)?(s=e.value)==null?void 0:s.$el.nextElementSibling:Ls(e)});return{primitiveElement:e,currentElement:t}}function I_({type:e,defaultValue:t,modelValue:n}){const s=n||t;return n!==void 0||t!==void 0?Array.isArray(s)?"multiple":"single":e??"single"}function R_({type:e,defaultValue:t,modelValue:n}){return e||I_({type:e,defaultValue:t,modelValue:n})}function T_({type:e,defaultValue:t}){return t!==void 0?t:e==="single"?void 0:[]}function N_(e,t){const n=W(()=>R_(e)),s=ca(e,"modelValue",t,{defaultValue:T_(e),passive:e.modelValue===void 0,deep:!0});function r(l){if(n.value==="single")s.value=Co(l,s.value)?void 0:l;else{const i=Array.isArray(s.value)?[...s.value||[]]:[s.value].filter(Boolean);if(Kf(i,l)){const a=i.findIndex(c=>Co(c,l));i.splice(a,1)}else i.push(l);s.value=i}}const o=W(()=>n.value==="single");return{modelValue:s,changeModelValue:r,isSingle:o}}const nu="data-reka-collection-item";function Zf(e={}){const{key:t="",isProvider:n=!1}=e,s=`${t}CollectionProvider`;let r;n?(r={collectionRef:z(),itemMap:z(new Map)},Ss(s,r)):r=Nt(s);const o=(u=!1)=>{const d=r.collectionRef.value;if(!d)return[];const f=Array.from(d.querySelectorAll(`[${nu}]`)),h=Array.from(r.itemMap.value.values()).sort((v,_)=>f.indexOf(v.ref)-f.indexOf(_.ref));return u?h:h.filter(v=>v.ref.dataset.disabled!=="")},l=Le({name:"CollectionSlot",inheritAttrs:!1,setup(u,{slots:d,attrs:f}){const{primitiveElement:p,currentElement:h}=bi();return Re(h,()=>{r.collectionRef.value=h.value}),()=>Ht(_i,{ref:p,...f},d)}}),i=Le({name:"CollectionItem",inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(u,{slots:d,attrs:f}){const{primitiveElement:p,currentElement:h}=bi();return ks(v=>{if(h.value){const _=Cd(h.value);r.itemMap.value.set(_,{ref:h.value,value:u.value}),v(()=>r.itemMap.value.delete(_))}}),()=>Ht(_i,{...f,[nu]:"",ref:p},d)}}),a=W(()=>Array.from(r.itemMap.value.values())),c=W(()=>r.itemMap.value.size);return{getItems:o,reactiveItems:a,itemMapSize:c,CollectionSlot:l,CollectionItem:i}}var P_=Le({__name:"VisuallyHidden",props:{feature:{type:String,required:!1,default:"focusable"},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){return(t,n)=>(m(),J(G(Ot),{as:t.as,"as-child":t.asChild,"aria-hidden":t.feature==="focusable"?"true":void 0,"data-hidden":t.feature==="fully-hidden"?"":void 0,tabindex:t.feature==="fully-hidden"?"-1":void 0,style:{position:"absolute",border:0,width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",whiteSpace:"nowrap",wordWrap:"normal",top:"-1px",left:"-1px"}},{default:I(()=>[ue(t.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}}),O_=P_,L_=Le({inheritAttrs:!1,__name:"VisuallyHiddenInputBubble",props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:"fully-hidden"}},setup(e){const t=e,{primitiveElement:n,currentElement:s}=bi(),r=W(()=>t.checked??t.value);return Re(r,(o,l)=>{if(!s.value)return;const i=s.value,a=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(a,"value").set;if(u&&o!==l){const d=new Event("input",{bubbles:!0}),f=new Event("change",{bubbles:!0});u.call(i,o),i.dispatchEvent(d),i.dispatchEvent(f)}}),(o,l)=>(m(),J(O_,Qe({ref_key:"primitiveElement",ref:n},{...t,...o.$attrs},{as:"input"}),null,16))}}),su=L_,M_=Le({inheritAttrs:!1,__name:"VisuallyHiddenInput",props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:"fully-hidden"}},setup(e){const t=e,n=W(()=>typeof t.value=="object"&&Array.isArray(t.value)&&t.value.length===0&&t.required),s=W(()=>typeof t.value=="string"||typeof t.value=="number"||typeof t.value=="boolean"||t.value===null||t.value===void 0?[{name:t.name,value:t.value}]:typeof t.value=="object"&&Array.isArray(t.value)?t.value.flatMap((r,o)=>typeof r=="object"?Object.entries(r).map(([l,i])=>({name:`${t.name}[${o}][${l}]`,value:i})):{name:`${t.name}[${o}]`,value:r}):t.value!==null&&typeof t.value=="object"&&!Array.isArray(t.value)?Object.entries(t.value).map(([r,o])=>({name:`${t.name}[${r}]`,value:o})):[]);return(r,o)=>(m(),w(te,null,[K(" We render single input if it's required "),n.value?(m(),J(su,Qe({key:r.name},{...t,...r.$attrs},{name:r.name,value:r.value}),null,16,["name","value"])):(m(!0),w(te,{key:1},pe(s.value,l=>(m(),J(su,Qe({key:l.name},{ref_for:!0},{...t,...r.$attrs},{name:l.name,value:l.value}),null,16,["name","value"]))),128))],2112))}}),ep=M_;const D_="rovingFocusGroup.onEntryFocus",F_={bubbles:!1,cancelable:!0},j_={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function B_(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function G_(e,t,n){const s=B_(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(s))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(s)))return j_[s]}function tp(e,t=!1){const n=eu();for(const s of e)if(s===n||(s.focus({preventScroll:t}),eu()!==n))return}function V_(e,t){return e.map((n,s)=>e[(t+s)%e.length])}function U_(e){const t=Jf({nonce:z()});return W(()=>{var n;return(e==null?void 0:e.value)||((n=t.nonce)==null?void 0:n.value)})}const[H_,q_]=Bs("RovingFocusGroup");var z_=Le({__name:"RovingFocusGroup",props:{orientation:{type:String,required:!1,default:void 0},dir:{type:String,required:!1},loop:{type:Boolean,required:!1,default:!1},currentTabStopId:{type:[String,null],required:!1},defaultCurrentTabStopId:{type:String,required:!1},preventScrollOnEntryFocus:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["entryFocus","update:currentTabStopId"],setup(e,{expose:t,emit:n}){const s=e,r=n,{loop:o,orientation:l,dir:i}=js(s),a=da(i),c=ca(s,"currentTabStopId",r,{defaultValue:s.defaultCurrentTabStopId,passive:s.currentTabStopId===void 0}),u=z(!1),d=z(!1),f=z(0),{getItems:p,CollectionSlot:h}=Zf({isProvider:!0});function v(y){const k=!d.value;if(y.currentTarget&&y.target===y.currentTarget&&k&&!u.value){const C=new CustomEvent(D_,F_);if(y.currentTarget.dispatchEvent(C),r("entryFocus",C),!C.defaultPrevented){const R=p().map(P=>P.ref).filter(P=>P.dataset.disabled!==""),j=R.find(P=>P.getAttribute("data-active")===""),O=R.find(P=>P.getAttribute("data-highlighted")===""),L=R.find(P=>P.id===c.value),U=[j,O,L,...R].filter(Boolean);tp(U,s.preventScrollOnEntryFocus)}}d.value=!1}function _(){setTimeout(()=>{d.value=!1},1)}return t({getItems:p}),q_({loop:o,dir:a,orientation:l,currentTabStopId:c,onItemFocus:y=>{c.value=y},onItemShiftTab:()=>{u.value=!0},onFocusableItemAdd:()=>{f.value++},onFocusableItemRemove:()=>{f.value--}}),(y,k)=>(m(),J(G(h),null,{default:I(()=>[N(G(Ot),{tabindex:u.value||f.value===0?-1:0,"data-orientation":G(l),as:y.as,"as-child":y.asChild,dir:G(a),style:{outline:"none"},onMousedown:k[0]||(k[0]=C=>d.value=!0),onMouseup:_,onFocus:v,onBlur:k[1]||(k[1]=C=>u.value=!1)},{default:I(()=>[ue(y.$slots,"default")]),_:3},8,["tabindex","data-orientation","as","as-child","dir"])]),_:3}))}}),W_=z_,K_=Le({__name:"RovingFocusItem",props:{tabStopId:{type:String,required:!1},focusable:{type:Boolean,required:!1,default:!0},active:{type:Boolean,required:!1},allowShiftKey:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,n=H_(),s=$_(),r=W(()=>t.tabStopId||s),o=W(()=>n.currentTabStopId.value===r.value),{getItems:l,CollectionItem:i}=Zf();De(()=>{t.focusable&&n.onFocusableItemAdd()}),ct(()=>{t.focusable&&n.onFocusableItemRemove()});function a(c){if(c.key==="Tab"&&c.shiftKey){n.onItemShiftTab();return}if(c.target!==c.currentTarget)return;const u=G_(c,n.orientation.value,n.dir.value);if(u!==void 0){if(c.metaKey||c.ctrlKey||c.altKey||!t.allowShiftKey&&c.shiftKey)return;c.preventDefault();let d=[...l().map(f=>f.ref).filter(f=>f.dataset.disabled!=="")];if(u==="last")d.reverse();else if(u==="prev"||u==="next"){u==="prev"&&d.reverse();const f=d.indexOf(c.currentTarget);d=n.loop.value?V_(d,f+1):d.slice(f+1)}cn(()=>tp(d))}}return(c,u)=>(m(),J(G(i),null,{default:I(()=>[N(G(Ot),{tabindex:o.value?0:-1,"data-orientation":G(n).orientation.value,"data-active":c.active?"":void 0,"data-disabled":c.focusable?void 0:"",as:c.as,"as-child":c.asChild,onMousedown:u[0]||(u[0]=d=>{c.focusable?G(n).onItemFocus(r.value):d.preventDefault()}),onFocus:u[1]||(u[1]=d=>G(n).onItemFocus(r.value)),onKeydown:a},{default:I(()=>[ue(c.$slots,"default")]),_:3},8,["tabindex","data-orientation","data-active","data-disabled","as","as-child"])]),_:3}))}}),X_=K_;const[Lt,Y_]=Bs("ScrollAreaRoot");var J_=Le({__name:"ScrollAreaRoot",props:{type:{type:String,required:!1,default:"hover"},dir:{type:String,required:!1},scrollHideDelay:{type:Number,required:!1,default:600},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e,{expose:t}){const n=e,s=z(0),r=z(0),o=z(),l=z(),i=z(),a=z(),c=z(!1),u=z(!1),{type:d,dir:f,scrollHideDelay:p}=js(n),h=da(f);function v(){var C;(C=o.value)==null||C.scrollTo({top:0})}function _(){var C;(C=o.value)==null||C.scrollTo({top:0,left:0})}t({viewport:o,scrollTop:v,scrollTopLeft:_});const{forwardRef:y,currentElement:k}=wt();return Y_({type:d,dir:h,scrollHideDelay:p,scrollArea:k,viewport:o,onViewportChange:C=>{o.value=C||void 0},content:l,onContentChange:C=>{l.value=C},scrollbarX:i,scrollbarXEnabled:c,scrollbarY:a,scrollbarYEnabled:u,onScrollbarXChange:C=>{i.value=C||void 0},onScrollbarYChange:C=>{a.value=C||void 0},onScrollbarXEnabledChange:C=>{c.value=C},onScrollbarYEnabledChange:C=>{u.value=C},onCornerWidthChange:C=>{s.value=C},onCornerHeightChange:C=>{r.value=C}}),(C,R)=>(m(),J(G(Ot),{ref:G(y),"as-child":n.asChild,as:C.as,dir:G(h),style:nt({position:"relative","--reka-scroll-area-corner-width":`${s.value}px`,"--reka-scroll-area-corner-height":`${r.value}px`})},{default:I(()=>[ue(C.$slots,"default")]),_:3},8,["as-child","as","dir","style"]))}}),Q_=J_,Z_=Le({__name:"ScrollAreaCornerImpl",setup(e){const t=Lt(),n=z(0),s=z(0),r=W(()=>!!n.value&&!!s.value);function o(){var a;const i=((a=t.scrollbarX.value)==null?void 0:a.offsetHeight)||0;t.onCornerHeightChange(i),s.value=i}function l(){var a;const i=((a=t.scrollbarY.value)==null?void 0:a.offsetWidth)||0;t.onCornerWidthChange(i),n.value=i}return Ms(t.scrollbarX.value,o),Ms(t.scrollbarY.value,l),Re(()=>t.scrollbarX.value,o),Re(()=>t.scrollbarY.value,l),(i,a)=>{var c;return r.value?(m(),J(G(Ot),Qe({key:0,style:{width:`${n.value}px`,height:`${s.value}px`,position:"absolute",right:G(t).dir.value==="ltr"?0:void 0,left:G(t).dir.value==="rtl"?0:void 0,bottom:0}},(c=i.$parent)==null?void 0:c.$props),{default:I(()=>[ue(i.$slots,"default")]),_:3},16,["style"])):K("v-if",!0)}}}),eb=Z_,tb=Le({__name:"ScrollAreaCorner",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{forwardRef:n}=wt(),s=Lt(),r=W(()=>!!s.scrollbarX.value&&!!s.scrollbarY.value),o=W(()=>s.type.value!=="scroll"&&r.value);return(l,i)=>o.value?(m(),J(eb,Qe({key:0},t,{ref:G(n)}),{default:I(()=>[ue(l.$slots,"default")]),_:3},16)):K("v-if",!0)}}),nb=tb;function np(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const s=(t[1]-t[0])/(e[1]-e[0]);return t[0]+s*(n-e[0])}}function ol(e){const t=sp(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,s=(e.scrollbar.size-n)*t;return Math.max(s,18)}function sp(e,t){const n=e/t;return Number.isNaN(n)?0:n}function sb(e,t=()=>{}){let n={left:e.scrollLeft,top:e.scrollTop},s=0;return function r(){const o={left:e.scrollLeft,top:e.scrollTop},l=n.left!==o.left,i=n.top!==o.top;(l||i)&&t(),n=o,s=window.requestAnimationFrame(r)}(),()=>window.cancelAnimationFrame(s)}function ru(e,t,n="ltr"){const s=ol(t),r=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-r,l=t.content-t.viewport,i=o-s,a=n==="ltr"?[0,l]:[l*-1,0],c=m_(e,a[0],a[1]);return np([0,l],[0,i])(c)}function Wr(e){return e?Number.parseInt(e,10):0}function rb(e,t,n,s="ltr"){const r=ol(n),o=r/2,l=t||o,i=r-l,a=n.scrollbar.paddingStart+l,c=n.scrollbar.size-n.scrollbar.paddingEnd-i,u=n.content-n.viewport,d=s==="ltr"?[0,u]:[u*-1,0];return np([a,c],d)(e)}function ou(e,t){return e>0&&e<t}var ob=Le({__name:"ScrollAreaScrollbarX",setup(e){const t=Lt(),n=ll(),{forwardRef:s,currentElement:r}=wt();De(()=>{r.value&&t.onScrollbarXChange(r.value)});const o=W(()=>n.sizes.value);return(l,i)=>(m(),J(rp,{ref:G(s),"is-horizontal":!0,"data-orientation":"horizontal",style:nt({bottom:0,left:G(t).dir.value==="rtl"?"var(--reka-scroll-area-corner-width)":0,right:G(t).dir.value==="ltr"?"var(--reka-scroll-area-corner-width)":0,"--reka-scroll-area-thumb-width":o.value?`${G(ol)(o.value)}px`:void 0}),onOnDragScroll:i[0]||(i[0]=a=>G(n).onDragScroll(a.x))},{default:I(()=>[ue(l.$slots,"default")]),_:3},8,["style"]))}}),lb=ob,ib=Le({__name:"ScrollAreaScrollbarY",setup(e){const t=Lt(),n=ll(),{forwardRef:s,currentElement:r}=wt();De(()=>{r.value&&t.onScrollbarYChange(r.value)});const o=W(()=>n.sizes.value);return(l,i)=>(m(),J(rp,{ref:G(s),"is-horizontal":!1,"data-orientation":"vertical",style:nt({top:0,right:G(t).dir.value==="ltr"?0:void 0,left:G(t).dir.value==="rtl"?0:void 0,bottom:"var(--reka-scroll-area-corner-height)","--reka-scroll-area-thumb-height":o.value?`${G(ol)(o.value)}px`:void 0}),onOnDragScroll:i[0]||(i[0]=a=>G(n).onDragScroll(a.y))},{default:I(()=>[ue(l.$slots,"default")]),_:3},8,["style"]))}}),ab=ib,cb=Le({__name:"ScrollAreaScrollbarAuto",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=Lt(),n=Mr(),{forwardRef:s}=wt(),r=z(!1),o=aa(()=>{if(t.viewport.value){const l=t.viewport.value.offsetWidth<t.viewport.value.scrollWidth,i=t.viewport.value.offsetHeight<t.viewport.value.scrollHeight;r.value=n.isHorizontal.value?l:i}},10);return De(()=>o()),Ms(t.viewport,o),Ms(t.content,o),(l,i)=>(m(),J(G(rl),{present:l.forceMount||r.value},{default:I(()=>[N(ha,Qe(l.$attrs,{ref:G(s),"data-state":r.value?"visible":"hidden"}),{default:I(()=>[ue(l.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),pa=cb,ub=Le({inheritAttrs:!1,__name:"ScrollAreaScrollbarGlimpse",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=Lt(),n=Mr(),{forwardRef:s}=wt(),{state:r,dispatch:o}=fa("hidden",{hidden:{POINTER_ENTER:"glimpse",SCROLL:"scrolling"},glimpse:{HIDE:"hidden",POINTER_LEAVE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"glimpse"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}}),l=W(()=>r.value!=="hidden");function i(){o("POINTER_ENTER")}function a(){o("POINTER_LEAVE")}const c=aa(()=>o("SCROLL_END"),100);return ks(u=>{if(r.value==="glimpse"){const d=window.setTimeout(o,t.scrollHideDelay.value,"HIDE");u(()=>{window.clearTimeout(d)})}}),ks(u=>{if(r.value==="idle"){const d=window.setTimeout(o,t.scrollHideDelay.value,"HIDE");u(()=>{window.clearTimeout(d)})}}),ks(u=>{const d=t.viewport.value,f=n.isHorizontal.value?"scrollLeft":"scrollTop";if(d){let p=d[f];const h=()=>{const v=d[f];p!==v&&(o("SCROLL"),c()),p=v};d.addEventListener("scroll",h),u(()=>{d.removeEventListener("scroll",h)})}}),De(()=>{const u=t.scrollArea.value;u&&(u.addEventListener("pointerenter",i),u.addEventListener("pointerleave",a))}),ct(()=>{const u=t.scrollArea.value;u&&(u.removeEventListener("pointerenter",i),u.removeEventListener("pointerleave",a))}),(u,d)=>(m(),J(G(rl),{present:u.forceMount||l.value},{default:I(()=>[N(pa,Qe(u.$attrs,{ref:G(s),"data-state":l.value?"visible":"hidden"}),{default:I(()=>[ue(u.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),db=ub,fb=Le({inheritAttrs:!1,__name:"ScrollAreaScrollbarHover",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=Lt(),{forwardRef:n}=wt();let s;const r=z(!1);function o(){window.clearTimeout(s),r.value=!0}function l(){s=window.setTimeout(()=>{r.value=!1},t.scrollHideDelay.value)}return De(()=>{const i=t.scrollArea.value;i&&(i.addEventListener("pointerenter",o),i.addEventListener("pointerleave",l))}),ct(()=>{const i=t.scrollArea.value;i&&(window.clearTimeout(s),i.removeEventListener("pointerenter",o),i.removeEventListener("pointerleave",l))}),(i,a)=>(m(),J(G(rl),{present:i.forceMount||r.value},{default:I(()=>[N(pa,Qe(i.$attrs,{ref:G(n),"data-state":r.value?"visible":"hidden"}),{default:I(()=>[ue(i.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),pb=fb,hb=Le({__name:"ScrollAreaScrollbarScroll",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=Lt(),n=Mr(),{forwardRef:s}=wt(),{state:r,dispatch:o}=fa("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}}),l=W(()=>r.value!=="hidden");ks(a=>{if(r.value==="idle"){const c=window.setTimeout(o,t.scrollHideDelay.value,"HIDE");a(()=>{window.clearTimeout(c)})}});const i=aa(()=>o("SCROLL_END"),100);return ks(a=>{const c=t.viewport.value,u=n.isHorizontal.value?"scrollLeft":"scrollTop";if(c){let d=c[u];const f=()=>{const p=c[u];d!==p&&(o("SCROLL"),i()),d=p};c.addEventListener("scroll",f),a(()=>{c.removeEventListener("scroll",f)})}}),(a,c)=>(m(),J(G(rl),{present:a.forceMount||l.value},{default:I(()=>[N(ha,Qe(a.$attrs,{ref:G(s),"data-state":l.value?"visible":"hidden"}),{default:I(()=>[ue(a.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),gb=hb;const[Mr,mb]=Bs("ScrollAreaScrollbar");var vb=Le({inheritAttrs:!1,__name:"ScrollAreaScrollbar",props:{orientation:{type:String,required:!1,default:"vertical"},forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},setup(e){const t=e,{forwardRef:n}=wt(),s=Lt(),r=W(()=>t.orientation==="horizontal");Re(r,()=>{r.value?s.onScrollbarXEnabledChange(!0):s.onScrollbarYEnabledChange(!0)},{immediate:!0}),ct(()=>{s.onScrollbarXEnabledChange(!1),s.onScrollbarYEnabledChange(!1)});const{orientation:o,forceMount:l,asChild:i,as:a}=js(t);return mb({orientation:o,forceMount:l,isHorizontal:r,as:a,asChild:i}),(c,u)=>G(s).type.value==="hover"?(m(),J(pb,Qe({key:0},c.$attrs,{ref:G(n),"force-mount":G(l)}),{default:I(()=>[ue(c.$slots,"default")]),_:3},16,["force-mount"])):G(s).type.value==="scroll"?(m(),J(gb,Qe({key:1},c.$attrs,{ref:G(n),"force-mount":G(l)}),{default:I(()=>[ue(c.$slots,"default")]),_:3},16,["force-mount"])):G(s).type.value==="glimpse"?(m(),J(db,Qe({key:2},c.$attrs,{ref:G(n),"force-mount":G(l)}),{default:I(()=>[ue(c.$slots,"default")]),_:3},16,["force-mount"])):G(s).type.value==="auto"?(m(),J(pa,Qe({key:3},c.$attrs,{ref:G(n),"force-mount":G(l)}),{default:I(()=>[ue(c.$slots,"default")]),_:3},16,["force-mount"])):G(s).type.value==="always"?(m(),J(ha,Qe({key:4},c.$attrs,{ref:G(n),"data-state":"visible"}),{default:I(()=>[ue(c.$slots,"default")]),_:3},16)):K("v-if",!0)}}),lu=vb;const[ll,yb]=Bs("ScrollAreaScrollbarVisible");var _b=Le({__name:"ScrollAreaScrollbarVisible",setup(e){const t=Lt(),n=Mr(),{forwardRef:s}=wt(),r=z({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),o=W(()=>{const y=sp(r.value.viewport,r.value.content);return y>0&&y<1}),l=z(),i=z(0);function a(y,k){if(p.value){const C=t.viewport.value.scrollLeft+y.deltaY;t.viewport.value.scrollLeft=C,ou(C,k)&&y.preventDefault()}else{const C=t.viewport.value.scrollTop+y.deltaY;t.viewport.value.scrollTop=C,ou(C,k)&&y.preventDefault()}}function c(y,k){p.value?i.value=k.x:i.value=k.y}function u(y){i.value=0}function d(y){r.value=y}function f(y,k){return rb(y,i.value,r.value,k)}const p=W(()=>n.isHorizontal.value);function h(y){p.value?t.viewport.value.scrollLeft=f(y,t.dir.value):t.viewport.value.scrollTop=f(y)}function v(){if(p.value){if(t.viewport.value&&l.value){const y=t.viewport.value.scrollLeft,k=ru(y,r.value,t.dir.value);l.value.style.transform=`translate3d(${k}px, 0, 0)`}}else if(t.viewport.value&&l.value){const y=t.viewport.value.scrollTop,k=ru(y,r.value);l.value.style.transform=`translate3d(0, ${k}px, 0)`}}function _(y){l.value=y}return yb({sizes:r,hasThumb:o,handleWheelScroll:a,handleThumbDown:c,handleThumbUp:u,handleSizeChange:d,onThumbPositionChange:v,onThumbChange:_,onDragScroll:h}),(y,k)=>p.value?(m(),J(lb,Qe({key:0},y.$attrs,{ref:G(s)}),{default:I(()=>[ue(y.$slots,"default")]),_:3},16)):(m(),J(ab,Qe({key:1},y.$attrs,{ref:G(s)}),{default:I(()=>[ue(y.$slots,"default")]),_:3},16))}}),ha=_b,bb=Le({__name:"ScrollAreaScrollbarImpl",props:{isHorizontal:{type:Boolean,required:!0}},emits:["onDragScroll","onWheelScroll","onThumbPointerDown"],setup(e,{emit:t}){const n=e,s=t,r=Lt(),o=ll(),l=Mr(),{forwardRef:i,currentElement:a}=wt(),c=z(""),u=z();function d(y){var k,C;if(u.value){const R=y.clientX-((k=u.value)==null?void 0:k.left),j=y.clientY-((C=u.value)==null?void 0:C.top);s("onDragScroll",{x:R,y:j})}}function f(y){y.button===0&&(y.target.setPointerCapture(y.pointerId),u.value=a.value.getBoundingClientRect(),c.value=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",r.viewport&&(r.viewport.value.style.scrollBehavior="auto"),d(y))}function p(y){d(y)}function h(y){const k=y.target;k.hasPointerCapture(y.pointerId)&&k.releasePointerCapture(y.pointerId),document.body.style.webkitUserSelect=c.value,r.viewport&&(r.viewport.value.style.scrollBehavior=""),u.value=void 0}function v(y){var j;const k=y.target,C=(j=a.value)==null?void 0:j.contains(k),R=o.sizes.value.content-o.sizes.value.viewport;C&&o.handleWheelScroll(y,R)}De(()=>{document.addEventListener("wheel",v,{passive:!1})}),ct(()=>{document.removeEventListener("wheel",v)});function _(){var y,k,C,R,j;a.value&&(n.isHorizontal?o.handleSizeChange({content:((y=r.viewport.value)==null?void 0:y.scrollWidth)??0,viewport:((k=r.viewport.value)==null?void 0:k.offsetWidth)??0,scrollbar:{size:a.value.clientWidth??0,paddingStart:Wr(getComputedStyle(a.value).paddingLeft),paddingEnd:Wr(getComputedStyle(a.value).paddingRight)}}):o.handleSizeChange({content:((C=r.viewport.value)==null?void 0:C.scrollHeight)??0,viewport:((R=r.viewport.value)==null?void 0:R.offsetHeight)??0,scrollbar:{size:((j=a.value)==null?void 0:j.clientHeight)??0,paddingStart:Wr(getComputedStyle(a.value).paddingTop),paddingEnd:Wr(getComputedStyle(a.value).paddingBottom)}}),o.onThumbPositionChange())}return Ms(a,_),Ms(r.content,_),(y,k)=>(m(),J(G(Ot),{ref:G(i),style:{position:"absolute"},"data-scrollbarimpl":"",as:G(l).as.value,"as-child":G(l).asChild.value,onPointerdown:f,onPointermove:p,onPointerup:h},{default:I(()=>[ue(y.$slots,"default")]),_:3},8,["as","as-child"]))}}),rp=bb,wb=Le({__name:"ScrollAreaThumb",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,n=Lt(),s=ll();function r(f){const h=f.target.getBoundingClientRect(),v=f.clientX-h.left,_=f.clientY-h.top;s.handleThumbDown(f,{x:v,y:_})}function o(f){s.handleThumbUp(f)}const{forwardRef:l,currentElement:i}=wt(),a=z(),c=W(()=>n.viewport.value);function u(){if(!a.value){const f=sb(c.value,s.onThumbPositionChange);a.value=f,s.onThumbPositionChange()}}const d=W(()=>s.sizes.value);return C_(d,()=>{s.onThumbChange(i.value),c.value&&(s.onThumbPositionChange(),c.value.addEventListener("scroll",u))}),ct(()=>{var f;c.value.removeEventListener("scroll",u),(f=n.viewport.value)==null||f.removeEventListener("scroll",u)}),(f,p)=>(m(),J(G(Ot),{ref:G(l),"data-state":G(s).hasThumb?"visible":"hidden",style:{width:"var(--reka-scroll-area-thumb-width)",height:"var(--reka-scroll-area-thumb-height)"},"as-child":t.asChild,as:f.as,onPointerdown:r,onPointerup:o},{default:I(()=>[ue(f.$slots,"default")]),_:3},8,["data-state","as-child","as"]))}}),iu=wb,Cb=Le({inheritAttrs:!1,__name:"ScrollAreaViewport",props:{nonce:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e,{expose:t}){const n=e,{nonce:s}=js(n),r=U_(s),o=Lt(),l=z();De(()=>{o.onViewportChange(l.value),o.onContentChange(a.value)}),t({viewportElement:l});const{forwardRef:i,currentElement:a}=wt();return(c,u)=>(m(),w(te,null,[g("div",Qe({ref_key:"viewportElement",ref:l,"data-reka-scroll-area-viewport":"",style:{overflowX:G(o).scrollbarXEnabled.value?"scroll":"hidden",overflowY:G(o).scrollbarYEnabled.value?"scroll":"hidden"}},c.$attrs,{tabindex:0}),[N(G(Ot),{ref:G(i),style:nt({minWidth:G(o).scrollbarXEnabled.value?"fit-content":void 0}),"as-child":n.asChild,as:c.as},{default:I(()=>[ue(c.$slots,"default")]),_:3},8,["style","as-child","as"])],16),N(G(Ot),{as:"style",nonce:G(r)},{default:I(()=>u[0]||(u[0]=[ce(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-reka-scroll-area-viewport] { scrollbar-width:none; -ms-overflow-style:none; -webkit-overflow-scrolling:touch; } [data-reka-scroll-area-viewport]::-webkit-scrollbar { display:none; } ")])),_:1,__:[0]},8,["nonce"])],64))}}),Sb=Cb;const[op,kb]=Bs("ToggleGroupRoot");var xb=Le({__name:"ToggleGroupRoot",props:{rovingFocus:{type:Boolean,required:!1,default:!0},disabled:{type:Boolean,required:!1,default:!1},orientation:{type:String,required:!1},dir:{type:String,required:!1},loop:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1},type:{type:String,required:!1},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,s=t,{loop:r,rovingFocus:o,disabled:l,dir:i}=js(n),a=da(i),{forwardRef:c,currentElement:u}=wt(),{modelValue:d,changeModelValue:f,isSingle:p}=N_(n,s),h=Qf(u);return kb({isSingle:p,modelValue:d,changeModelValue:f,dir:a,orientation:n.orientation,loop:r,rovingFocus:o,disabled:l}),(v,_)=>(m(),J(Or(G(o)?G(W_):G(Ot)),{"as-child":"",orientation:G(o)?v.orientation:void 0,dir:G(a),loop:G(o)?G(r):void 0},{default:I(()=>[N(G(Ot),{ref:G(c),role:"group","as-child":v.asChild,as:v.as},{default:I(()=>[ue(v.$slots,"default",{modelValue:G(d)}),G(h)&&v.name?(m(),J(ep,{key:0,name:v.name,required:v.required,value:G(d)},null,8,["name","required","value"])):K("v-if",!0)]),_:3},8,["as-child","as"])]),_:3},8,["orientation","dir","loop"]))}}),$b=xb,Eb=Le({__name:"Toggle",props:{defaultValue:{type:Boolean,required:!1},modelValue:{type:[Boolean,null],required:!1,default:void 0},disabled:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,s=t,{forwardRef:r,currentElement:o}=wt(),l=op(null),i=ca(n,"modelValue",s,{defaultValue:n.defaultValue,passive:n.modelValue===void 0});function a(){i.value=!i.value}const c=W(()=>i.value?"on":"off"),u=Qf(o);return(d,f)=>(m(),J(G(Ot),{ref:G(r),type:d.as==="button"?"button":void 0,"as-child":n.asChild,as:d.as,"aria-pressed":G(i),"data-state":c.value,"data-disabled":d.disabled?"":void 0,disabled:d.disabled,onClick:a},{default:I(()=>[ue(d.$slots,"default",{modelValue:G(i),disabled:d.disabled,pressed:G(i),state:c.value}),G(u)&&d.name&&!G(l)?(m(),J(ep,{key:0,type:"checkbox",name:d.name,value:G(i),required:d.required},null,8,["name","value","required"])):K("v-if",!0)]),_:3},8,["type","as-child","as","aria-pressed","data-state","data-disabled","disabled"]))}}),Ab=Eb,Ib=Le({__name:"ToggleGroupItem",props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e,n=op(),s=W(()=>{var l;return((l=n.disabled)==null?void 0:l.value)||t.disabled}),r=W(()=>Kf(n.modelValue.value,t.value)),{forwardRef:o}=wt();return(l,i)=>(m(),J(Or(G(n).rovingFocus.value?G(X_):G(Ot)),Qe({"as-child":""},G(n).rovingFocus.value?{focusable:!s.value,active:r.value}:{}),{default:I(()=>[N(G(Ab),Qe(t,{ref:G(o),disabled:s.value,"model-value":r.value,"onUpdate:modelValue":i[0]||(i[0]=a=>G(n).changeModelValue(l.value))}),{default:I(a=>[ue(l.$slots,"default",Th(df(a)))]),_:3},16,["disabled","model-value"])]),_:3},16))}}),Rb=Ib;const Tb={__name:"ScrollArea",props:{height:{type:[String,Number],default:null},maxHeight:{type:[String,Number],default:null},idleMs:{type:Number,default:1500},always:{type:Boolean,default:!1}},setup(e){const t=e,n=z(!1);let s=null;const r=()=>{n.value=!0,clearTimeout(s),s=setTimeout(()=>{n.value=!1},t.idleMs)},o=()=>{clearTimeout(s),n.value=!1};us(()=>clearTimeout(s));const l=a=>a==null?void 0:typeof a=="number"?`${a}px`:a,i=W(()=>({height:l(t.height),maxHeight:l(t.maxHeight)}));return(a,c)=>(m(),J(G(Q_),{class:ge(["pc-scrollarea",{"pc-scrollarea--show":e.always||n.value}]),type:"auto",onPointerenter:r,onPointermove:r,onPointerleave:o,onWheel:r},{default:I(()=>[N(G(Sb),{class:"pc-scrollarea__viewport",style:nt(i.value),onScroll:r},{default:I(()=>[ue(a.$slots,"default",{},void 0,!0)]),_:3},8,["style"]),N(G(lu),{class:"pc-scrollarea__bar",orientation:"vertical"},{default:I(()=>[N(G(iu),{class:"pc-scrollarea__thumb"})]),_:1}),N(G(lu),{class:"pc-scrollarea__bar",orientation:"horizontal"},{default:I(()=>[N(G(iu),{class:"pc-scrollarea__thumb"})]),_:1}),N(G(nb),{class:"pc-scrollarea__corner"})]),_:3},8,["class"]))}},is=ke(Tb,[["__scopeId","data-v-ae8703e4"]]),Nb={class:"pc-sidenav"},Pb={class:"pc-sidenav__sections-list"},Ob={key:0,class:"pc-sidenav__section-title"},Lb={class:"pc-sidenav__items"},Mb={key:0,class:"pc-sidenav__icon"},Db={key:0,class:"pc-sidenav__indicator"},Fb={class:"pc-sidenav__name"},jb={key:1,class:"pc-sidenav__badge"},Bb={key:1,class:"pc-sidenav__footer"},Gb={__name:"SideNav",props:{sections:{type:Array,required:!0},activeKey:{type:[String,Number,null],default:null},indicators:{type:Boolean,default:!1},tintedHeader:{type:Boolean,default:!1}},emits:["select"],setup(e,{emit:t}){const n=e,s=t,r=o=>o.active??o.key===n.activeKey;return(o,l)=>(m(),w("nav",Nb,[o.$slots.header?(m(),w("header",{key:0,class:ge(["pc-sidenav__header",{"pc-sidenav__header--tinted":e.tintedHeader}])},[ue(o.$slots,"header",{},void 0,!0)],2)):K("",!0),N(is,{class:"pc-sidenav__sections",height:"100%"},{default:I(()=>[g("div",Pb,[(m(!0),w(te,null,pe(e.sections,i=>(m(),w("div",{key:i.title,class:"pc-sidenav__section"},[i.title?(m(),w("div",Ob,E(i.title),1)):K("",!0),g("ul",Lb,[(m(!0),w(te,null,pe(i.items,a=>(m(),w("li",{key:a.key},[(m(),J(Or(a.to?"a":"button"),{href:a.to,type:"button",class:ge(["pc-sidenav__link",{"pc-sidenav__link--active":r(a)}]),onClick:c=>s("select",a)},{default:I(()=>[ue(o.$slots,"icon",{item:a},()=>[a.icon?(m(),w("span",Mb,E(a.icon),1)):K("",!0)],!0),e.indicators&&!a.icon&&!o.$slots.icon?(m(),w("span",Db)):K("",!0),g("span",Fb,E(a.label),1),a.badge!=null&&a.badge!==0?(m(),w("span",jb,E(a.badge),1)):K("",!0)]),_:2},1032,["href","class","onClick"]))]))),128))])]))),128))])]),_:3}),o.$slots.footer?(m(),w("footer",Bb,[ue(o.$slots,"footer",{},void 0,!0)])):K("",!0)]))}},Vb=ke(Gb,[["__scopeId","data-v-f0d81001"]]);let Ub=0;const So=cs([]),Ds=new Map;function lp(e){const t=Ds.get(e);t&&(t.startedAt=Date.now(),t.handle=setTimeout(()=>ko(e),t.remaining))}function Xe(e){const t={id:++Ub,variant:"neutral",duration:4e3,...e};return So.push(t),t.duration>0&&(Ds.set(t.id,{handle:null,remaining:t.duration,startedAt:0}),lp(t.id)),t.id}Xe.info=(e,t={})=>Xe({...t,title:e,variant:"info"});Xe.success=(e,t={})=>Xe({...t,title:e,variant:"success"});Xe.warning=(e,t={})=>Xe({...t,title:e,variant:"warning"});Xe.error=(e,t={})=>Xe({...t,title:e,variant:"danger"});function Hb(e){const t=Ds.get(e);!t||!t.handle||(clearTimeout(t.handle),t.handle=null,t.remaining-=Date.now()-t.startedAt)}function qb(e){const t=Ds.get(e);if(!(!t||t.handle)){if(t.remaining<=0){ko(e);return}lp(e)}}function ko(e){const t=Ds.get(e);t&&(clearTimeout(t.handle),Ds.delete(e));const n=So.findIndex(s=>s.id===e);n>=0&&So.splice(n,1)}const zb=["onMouseenter","onMouseleave"],Wb={class:"pc-toast__icon","aria-hidden":"true"},Kb={width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},Xb={class:"pc-toast__body"},Yb={class:"pc-toast__eyebrow"},Jb={key:0,class:"pc-toast__title"},Qb={key:1,class:"pc-toast__desc"},Zb=["onClick"],ew=["onClick"],tw={key:0,class:"pc-toast__progress","aria-hidden":"true"},nw={__name:"Notifications",props:{position:{type:String,default:"bottom-right"},tinted:{type:Boolean,default:!1}},setup(e){const t=n=>({info:"Info",success:"Success",warning:"Warning",danger:"Error",neutral:"Notice"})[n]||"Notice";return(n,s)=>(m(),J(Pd,{to:"body"},[g("div",{class:ge(["pc-notifications",`pc-notifications--${e.position}`]),role:"region","aria-label":"Notifications"},[N(Um,{name:"pc-toast",tag:"div",class:"pc-notifications__stack"},{default:I(()=>[(m(!0),w(te,null,pe(G(So),r=>(m(),w("article",{key:r.id,class:ge(["pc-toast",`pc-toast--${r.variant}`,{"pc-toast--tinted":e.tinted}]),role:"status","aria-live":"polite",onMouseenter:o=>G(Hb)(r.id),onMouseleave:o=>G(qb)(r.id)},[g("span",Wb,[(m(),w("svg",Kb,[r.variant==="success"?(m(),w(te,{key:0},[s[0]||(s[0]=g("circle",{cx:"12",cy:"12",r:"10"},null,-1)),s[1]||(s[1]=g("path",{d:"m9 12 2 2 4-4"},null,-1))],64)):r.variant==="warning"?(m(),w(te,{key:1},[s[2]||(s[2]=g("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"},null,-1)),s[3]||(s[3]=g("path",{d:"M12 9v4"},null,-1)),s[4]||(s[4]=g("path",{d:"M12 17h.01"},null,-1))],64)):r.variant==="danger"?(m(),w(te,{key:2},[s[5]||(s[5]=g("circle",{cx:"12",cy:"12",r:"10"},null,-1)),s[6]||(s[6]=g("path",{d:"m15 9-6 6"},null,-1)),s[7]||(s[7]=g("path",{d:"m9 9 6 6"},null,-1))],64)):r.variant==="info"?(m(),w(te,{key:3},[s[8]||(s[8]=g("circle",{cx:"12",cy:"12",r:"10"},null,-1)),s[9]||(s[9]=g("path",{d:"M12 16v-4"},null,-1)),s[10]||(s[10]=g("path",{d:"M12 8h.01"},null,-1))],64)):(m(),w(te,{key:4},[s[11]||(s[11]=g("path",{d:"M10.268 21a2 2 0 0 0 3.464 0"},null,-1)),s[12]||(s[12]=g("path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8a6 6 0 0 0-12 0c0 4.499-1.41 5.956-2.738 7.326z"},null,-1))],64))]))]),g("div",Xb,[g("div",Yb,E(r.eyebrow||t(r.variant)),1),r.title?(m(),w("div",Jb,E(r.title),1)):K("",!0),r.description?(m(),w("div",Qb,E(r.description),1)):K("",!0),r.action?(m(),w("button",{key:2,type:"button",class:"pc-toast__action",onClick:o=>{var l,i;(i=(l=r.action).onClick)==null||i.call(l),G(ko)(r.id)}},E(r.action.label),9,Zb)):K("",!0)]),g("button",{type:"button",class:"pc-toast__close","aria-label":"Dismiss",onClick:o=>G(ko)(r.id)},[...s[13]||(s[13]=[g("svg",{width:"11",height:"11",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true"},[g("path",{d:"M4 4l6 6M10 4l-6 6",stroke:"currentColor","stroke-width":"1.7","stroke-linecap":"round"})],-1)])],8,ew),r.duration>0?(m(),w("div",tw,[g("div",{class:"pc-toast__progress-bar",style:nt({animationDuration:r.duration+"ms"})},null,4)])):K("",!0)],42,zb))),128))]),_:1})],2)]))}},sw=ke(nw,[["__scopeId","data-v-2e45b02a"]]),rw={__name:"App",setup(e){const t=z({queue:!1,cron:!1,limit:[],workflow:!1,realtime:!1,cells:[],lock:[],cache:[],trace:!1}),n=tl(),s=el();De(async()=>{const i=await fetch(Me("/config"));i.ok&&(t.value=await i.json())});const r=W(()=>{var a,c,u,d;const i=[{key:"/",label:"Overview",icon:"lucide:layout-dashboard"}];return t.value.realtime&&i.push({key:"/realtime",label:"Realtime",icon:"lucide:radio-tower"}),(a=t.value.cells)!=null&&a.length&&i.push({key:"/cells",label:"Cells",icon:"lucide:network"}),(c=t.value.lock)!=null&&c.length&&i.push({key:"/locks",label:"Locks",icon:"lucide:lock"}),(u=t.value.cache)!=null&&u.length&&i.push({key:"/cache",label:"Cache",icon:"lucide:database"}),t.value.trace&&i.push({key:"/traces",label:"Traces",icon:"lucide:waypoints"}),t.value.queue&&i.push({key:"/queue",label:"Queue",icon:"lucide:layers"}),t.value.cron&&i.push({key:"/cron",label:"Cron",icon:"lucide:clock"}),(d=t.value.limit)!=null&&d.length&&i.push({key:"/limits",label:"Limits",icon:"lucide:gauge"}),t.value.workflow&&(i.push({key:"/workflows",label:"Workflows",icon:"lucide:workflow"}),i.push({key:"/executions",label:"Executions",icon:"lucide:history"})),[{items:i}]}),o=W(()=>{const i=n.path;if(i==="/")return"/";const a=r.value[0].items.filter(c=>c.key!=="/").find(c=>i.startsWith(c.key));return a?a.key:"/"});function l(i){n.path!==i.key&&s.push(i.key)}return(i,a)=>{const c=Vd("router-view");return m(),w(te,null,[N(h_,{"nav-width":"232px"},{nav:I(()=>[N(Vb,{sections:r.value,"active-key":o.value,"tinted-header":"",onSelect:l},{header:I(()=>[...a[0]||(a[0]=[g("div",{class:"brand"},[g("span",{class:"brand__mark"},"prsm"),g("span",{class:"brand__sub"},"devtools")],-1)])]),icon:I(({item:u})=>[N(G(yi),{icon:u.icon,class:"nav-icon"},null,8,["icon"])]),_:1},8,["sections","active-key"])]),default:I(()=>[N(c,{config:t.value},null,8,["config"])]),_:1}),N(sw,{position:"bottom-right"})],64)}}},ow=ke(rw,[["__scopeId","data-v-e99be00e"]]);function Dr(){const e=z([]);let t=null;return De(()=>{t=new EventSource(Me("/events"));for(const n of["queue:new","queue:complete","queue:retry","queue:failed","queue:drain","cron:fire","cron:error","workflow:execution:queued","workflow:execution:succeeded","workflow:execution:failed","workflow:execution:canceled","workflow:execution:lease-lost","workflow:step:started","workflow:step:succeeded","workflow:step:routed","workflow:step:retry","workflow:step:failed","cells:change","cache:hit","cache:miss","cache:set","cache:del","cache:invalidate","cache:refresh","cache:stampede:lead","cache:stampede:wait","cache:stampede:result","cache:stampede:timeout"])t.addEventListener(n,s=>{const r=JSON.parse(s.data);e.value.unshift({type:n,data:r,ts:Date.now()}),e.value.length>400&&(e.value.length=400)})}),ct(()=>{t&&t.close()}),e}const lw={class:"pc-page-header__main"},iw={key:0,class:"pc-page-header__breadcrumbs"},aw={key:1,class:"pc-page-header__eyebrow"},cw={key:2,class:"pc-page-header__title"},uw={key:3,class:"pc-page-header__subtitle"},dw={key:0,class:"pc-page-header__actions"},fw={__name:"PageHeader",props:{title:{type:String,default:""},subtitle:{type:String,default:""},eyebrow:{type:String,default:""},size:{type:String,default:"default"},padded:{type:Boolean,default:!0}},setup(e){return(t,n)=>(m(),w("header",{class:ge(["pc-page-header",`pc-page-header--${e.size}`,{"pc-page-header--padded":e.padded}])},[g("div",lw,[t.$slots.breadcrumbs?(m(),w("div",iw,[ue(t.$slots,"breadcrumbs",{},void 0,!0)])):K("",!0),e.eyebrow?(m(),w("div",aw,E(e.eyebrow),1)):K("",!0),e.title||t.$slots.title?(m(),w("h1",cw,[ue(t.$slots,"title",{},()=>[ce(E(e.title),1)],!0)])):K("",!0),e.subtitle||t.$slots.subtitle?(m(),w("p",uw,[ue(t.$slots,"subtitle",{},()=>[ce(E(e.subtitle),1)],!0)])):K("",!0)]),t.$slots.actions?(m(),w("div",dw,[ue(t.$slots,"actions",{},void 0,!0)])):K("",!0)],2))}},Xt=ke(fw,[["__scopeId","data-v-43c87a3b"]]),pw={key:0,class:"pc-toggrp__icon"},hw={key:1},gw={__name:"ToggleGroup",props:{modelValue:{type:[String,Number,Array,null],default:null},options:{type:Array,required:!0},multiple:{type:Boolean,default:!1},size:{type:String,default:"md"},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t,s=r=>typeof r=="object"&&r!==null?r:{value:r,label:String(r)};return(r,o)=>(m(),J(G($b),{"model-value":e.modelValue,"onUpdate:modelValue":o[0]||(o[0]=l=>n("update:modelValue",l)),type:e.multiple?"multiple":"single",disabled:e.disabled,rovingFocus:!0,class:ge(["pc-toggrp",`pc-toggrp--${e.size}`])},{default:I(()=>[(m(!0),w(te,null,pe(e.options.map(s),l=>(m(),J(G(Rb),{key:l.value,value:l.value,disabled:l.disabled,class:"pc-toggrp__item"},{default:I(()=>[l.icon?(m(),w("span",pw,E(l.icon),1)):K("",!0),l.label?(m(),w("span",hw,E(l.label),1)):K("",!0)]),_:2},1032,["value","disabled"]))),128))]),_:1},8,["model-value","type","disabled","class"]))}},mw=ke(gw,[["__scopeId","data-v-7721d594"]]),vw={class:"pc-panel__header-main"},yw={key:0,class:"pc-panel__title"},_w={key:1,class:"pc-panel__description"},bw={key:0,class:"pc-panel__aside"},ww={__name:"Panel",props:{title:{type:String,default:""},description:{type:String,default:""},gradient:{type:Boolean,default:!1},elevated:{type:Boolean,default:!1},accent:{type:String,default:"none"}},setup(e){return(t,n)=>(m(),w("div",{class:ge(["pc-panel",`pc-panel--accent-${e.accent}`,{"pc-panel--elevated":e.elevated}])},[e.title||e.description||t.$slots.header?(m(),w("header",{key:0,class:ge(["pc-panel__header",{"pc-panel__header--gradient":e.gradient}])},[g("div",vw,[ue(t.$slots,"header",{},()=>[e.title?(m(),w("h3",yw,E(e.title),1)):K("",!0),e.description?(m(),w("p",_w,E(e.description),1)):K("",!0)],!0)]),t.$slots.aside?(m(),w("div",bw,[ue(t.$slots,"aside",{},void 0,!0)])):K("",!0)],2)):K("",!0),ue(t.$slots,"default",{},void 0,!0)],2))}},ze=ke(ww,[["__scopeId","data-v-35a7d2dc"]]),Cw={__name:"Badge",props:{variant:{type:String,default:"default"},size:{type:String,default:"sm"},dot:{type:Boolean,default:!1}},setup(e){return(t,n)=>(m(),w("span",{class:ge(["pc-badge",`pc-badge--${e.variant}`,`pc-badge--${e.size}`,{"pc-badge--dot":e.dot}])},[ue(t.$slots,"default",{},void 0,!0)],2))}},rt=ke(Cw,[["__scopeId","data-v-139f78cc"]]),Sw={class:"pc-empty"},kw={key:0,class:"pc-empty__icon"},xw={key:1,class:"pc-empty__title"},$w={key:2,class:"pc-empty__desc"},Ew={key:3,class:"pc-empty__actions"},Aw={__name:"EmptyState",props:{title:{type:String,default:""},description:{type:String,default:""},icon:{type:String,default:""}},setup(e){return(t,n)=>(m(),w("div",Sw,[e.icon?(m(),w("div",kw,E(e.icon),1)):K("",!0),e.title?(m(),w("div",xw,E(e.title),1)):K("",!0),e.description?(m(),w("div",$w,E(e.description),1)):K("",!0),t.$slots.default?(m(),w("div",Ew,[ue(t.$slots,"default",{},void 0,!0)])):K("",!0)]))}},Ye=ke(Aw,[["__scopeId","data-v-9778752f"]]),Iw={class:"page-body"},Rw={class:"page-section"},Tw={class:"filter-row"},Nw={class:"page-section"},Pw={key:0,class:"stream"},Ow={class:"event__source"},Lw={class:"event__data"},Mw={class:"event__time"},Dw={__name:"Overview",props:{config:Object},setup(e){const t=e,n=Dr(),s=z([]);function r(v){return new Date(v).toLocaleTimeString()}function o(v){return v.split(":")[0]}function l(v){const _=v.split(":");return _[0]==="workflow"?_.slice(1).join(":"):_[1]}const i=new Set(["complete","fire","execution:succeeded","step:succeeded","change"]),a=new Set(["failed","error","execution:failed","step:failed","execution:lease-lost"]),c=new Set(["retry","step:retry"]),u=new Set(["step:routed"]);function d(v){const _=l(v);return i.has(_)?"active":a.has(_)?"failed":c.has(_)?"warning":u.has(_)?"paused":"default"}Re(()=>t.config,v=>{var y,k,C;if(!v)return;const _=[];v.queue&&_.push("queue"),v.cron&&_.push("cron"),(y=v.limit)!=null&&y.length&&_.push("limit"),v.workflow&&_.push("workflow"),(k=v.cells)!=null&&k.length&&_.push("cells"),(C=v.cache)!=null&&C.length&&_.push("cache"),s.value=_},{immediate:!0,deep:!0});const f=W(()=>{var v,_,y,k,C,R,j,O,L;return[{value:"queue",label:"Queue",disabled:!((v=t.config)!=null&&v.queue)},{value:"cron",label:"Cron",disabled:!((_=t.config)!=null&&_.cron)},{value:"limit",label:"Limit",disabled:!((k=(y=t.config)==null?void 0:y.limit)!=null&&k.length)},{value:"workflow",label:"Workflow",disabled:!((C=t.config)!=null&&C.workflow)},{value:"cells",label:"Cells",disabled:!((j=(R=t.config)==null?void 0:R.cells)!=null&&j.length)},{value:"cache",label:"Cache",disabled:!((L=(O=t.config)==null?void 0:O.cache)!=null&&L.length)}]}),p=W(()=>new Date().toLocaleDateString(void 0,{weekday:"long",month:"long",day:"numeric"})),h=W(()=>n.value.filter(v=>s.value.includes(o(v.type))));return(v,_)=>(m(),w("div",null,[N(Xt,{eyebrow:p.value,title:"Runtime overview",subtitle:"Live event stream across all registered subsystems."},null,8,["eyebrow"]),g("div",Iw,[g("section",Rw,[g("div",Tw,[_[1]||(_[1]=g("span",{class:"filter-row__label"},"Subsystems",-1)),N(mw,{multiple:"","model-value":s.value,options:f.value,"onUpdate:modelValue":_[0]||(_[0]=y=>s.value=y||[])},null,8,["model-value","options"])])]),g("section",Nw,[N(ze,{title:"Event stream",description:"Newest events first, streamed live over SSE."},{default:I(()=>[h.value.length?(m(),w("div",Pw,[(m(!0),w(te,null,pe(h.value.slice(0,100),(y,k)=>(m(),w("div",{key:k,class:"event"},[g("span",Ow,E(o(y.type)),1),N(rt,{variant:d(y.type),size:"sm"},{default:I(()=>[ce(E(l(y.type)),1)]),_:2},1032,["variant"]),g("span",Lw,E(JSON.stringify(y.data)),1),g("span",Mw,E(r(y.ts)),1)]))),128))])):(m(),J(Ye,{key:1,title:"Waiting for events",description:"Activity from connected subsystems will appear here as it happens."}))]),_:1})])])]))}},Fw=ke(Dw,[["__scopeId","data-v-5ada9b87"]]),jw={__name:"Card",props:{padded:{type:Boolean,default:!1},elevated:{type:Boolean,default:!1},dark:{type:Boolean,default:!1},interactive:{type:Boolean,default:!1},radius:{type:String,default:"comfy"}},setup(e){return(t,n)=>(m(),w("div",{class:ge(["pc-card",`pc-card--${e.radius}`,{"pc-card--padded":e.padded,"pc-card--elevated":e.elevated,"pc-card--dark":e.dark,"pc-card--interactive":e.interactive}])},[ue(t.$slots,"default",{},void 0,!0)],2))}},sr=ke(jw,[["__scopeId","data-v-1cf20208"]]),Bw={class:"pc-stat"},Gw={key:0,class:"pc-stat__label"},Vw={key:1,class:"pc-stat__caption"},Uw={__name:"Stat",props:{value:{type:[String,Number],required:!0},label:{type:String,default:""},caption:{type:String,default:""},size:{type:String,default:"lg"}},setup(e){return(t,n)=>(m(),w("div",Bw,[e.label?(m(),w("div",Gw,E(e.label),1)):K("",!0),g("div",{class:ge(["pc-stat__value",`pc-stat__value--${e.size}`])},[ue(t.$slots,"value",{},()=>[ce(E(e.value),1)],!0)],2),e.caption||t.$slots.caption?(m(),w("div",Vw,[ue(t.$slots,"caption",{},()=>[ce(E(e.caption),1)],!0)])):K("",!0)]))}},rr=ke(Uw,[["__scopeId","data-v-876006d9"]]),Hw={class:"page-body"},qw={class:"page-section"},zw={class:"stats-grid"},Ww={class:"page-section"},Kw={key:0,class:"stream"},Xw={class:"event__data"},Yw={class:"event__time"},Jw={__name:"Queue",setup(e){const t=z(0),n=Dr();let s=null;async function r(){const a=await fetch(Me("/queue"));if(a.ok){const c=await a.json();t.value=c.inFlight}}De(()=>{r(),s=setInterval(r,1e3)}),ct(()=>{s&&clearInterval(s)});const o=W(()=>n.value.filter(a=>a.type.startsWith("queue:")).slice(0,100)),l=W(()=>{let a=0,c=0,u=0;for(const d of n.value)d.type==="queue:complete"&&a++,d.type==="queue:failed"&&c++,d.type==="queue:retry"&&u++;return{completed:a,failed:c,retried:u}}),i={complete:"active",failed:"failed",retry:"warning",new:"default",drain:"default"};return(a,c)=>(m(),w("div",null,[N(Xt,{eyebrow:"Job queue",title:"Queue",subtitle:"In-flight work right now, plus completed, failed, and retried counts for this session."}),g("div",Hw,[g("section",qw,[g("div",zw,[N(sr,{padded:""},{default:I(()=>[N(rr,{label:"In-flight",value:t.value,caption:"jobs running right now",size:"lg"},null,8,["value"])]),_:1}),N(sr,{padded:""},{default:I(()=>[N(rr,{label:"Completed",value:l.value.completed,caption:"since page load",size:"lg"},null,8,["value"])]),_:1}),N(sr,{padded:""},{default:I(()=>[N(rr,{label:"Failed",value:l.value.failed,caption:"since page load",size:"lg"},null,8,["value"])]),_:1}),N(sr,{padded:""},{default:I(()=>[N(rr,{label:"Retried",value:l.value.retried,caption:"since page load",size:"lg"},null,8,["value"])]),_:1})])]),g("section",Ww,[N(ze,{title:"Events",description:"Queue lifecycle events, newest first."},{default:I(()=>[o.value.length?(m(),w("div",Kw,[(m(!0),w(te,null,pe(o.value,(u,d)=>(m(),w("div",{key:d,class:"event"},[N(rt,{variant:i[u.type.split(":")[1]]||"default",size:"sm"},{default:I(()=>[ce(E(u.type.split(":")[1]),1)]),_:2},1032,["variant"]),g("span",Xw,E(JSON.stringify(u.data)),1),g("span",Yw,E(new Date(u.ts).toLocaleTimeString()),1)]))),128))])):(m(),J(Ye,{key:1,title:"No queue events yet",description:"Job activity will appear here as it happens."}))]),_:1})])])]))}},Qw=ke(Jw,[["__scopeId","data-v-04dec1c0"]]),Zw=["type","disabled","aria-busy"],e0={key:0,class:"pc-btn__spinner pc-btn__spinner--solo","aria-hidden":"true"},t0={class:"pc-btn__label"},n0={key:1,class:"pc-btn__hint"},s0={__name:"Button",props:{variant:{type:String,default:"primary"},size:{type:String,default:"md"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:""},hint:{type:String,default:""},icon:{type:String,default:""},type:{type:String,default:"button"}},setup(e){const t=e,n=Pg(),s=W(()=>!!t.icon&&!n.default),r=z(null);let o=null;return Re(()=>t.loading,async()=>{var h;const l=r.value;if(!l||s.value||((h=window.matchMedia)==null?void 0:h.call(window,"(prefers-reduced-motion: reduce)").matches))return;o&&o();const a=l.getBoundingClientRect().width;l.style.width=`${a}px`,await cn(),l.style.transition="none",l.style.width="auto";const c=l.getBoundingClientRect().width;if(l.style.width=`${a}px`,l.offsetWidth,l.style.transition="",Math.abs(c-a)<.5){l.style.width="";return}l.style.width=`${c}px`;let u=!1;const d=()=>{u||(u=!0,l.style.width="",l.removeEventListener("transitionend",f),clearTimeout(p),o=null)},f=v=>{v.propertyName==="width"&&d()},p=setTimeout(d,500);o=d,l.addEventListener("transitionend",f)}),(l,i)=>(m(),w("button",{ref_key:"btnRef",ref:r,type:e.type,disabled:e.disabled||e.loading,"aria-busy":e.loading||void 0,class:ge(["pc-btn",`pc-btn--${e.variant}`,`pc-btn--${e.size}`,{"pc-btn--loading":e.loading,"pc-btn--icon":s.value}])},[s.value?(m(),w(te,{key:0},[e.loading?(m(),w("span",e0)):(m(),J(G(yi),{key:1,icon:e.icon,class:"pc-btn__icon","aria-hidden":"true"},null,8,["icon"]))],64)):(m(),w(te,{key:1},[g("span",{class:ge(["pc-btn__spinner-wrap",{"pc-btn__spinner-wrap--on":e.loading}]),"aria-hidden":"true"},[...i[0]||(i[0]=[g("span",{class:"pc-btn__spinner"},null,-1)])],2),e.icon?(m(),J(G(yi),{key:0,icon:e.icon,class:"pc-btn__icon","aria-hidden":"true"},null,8,["icon"])):K("",!0),g("span",t0,[e.loading&&e.loadingLabel?(m(),w(te,{key:0},[ce(E(e.loadingLabel),1)],64)):ue(l.$slots,"default",{key:1},void 0,!0)]),e.hint?(m(),w("span",n0,E(e.hint),1)):K("",!0)],64))],10,Zw))}},Ke=ke(s0,[["__scopeId","data-v-5243cd51"]]),r0={class:"page-body"},o0={class:"page-section"},l0={key:0,class:"cron-grid"},i0={class:"cron-card__head"},a0={class:"cron-card__name"},c0={class:"page-section"},u0={key:0,class:"stream"},d0={class:"event__name"},f0={class:"event__time"},p0={__name:"Cron",setup(e){const t=z([]),n=Dr(),s=z(Date.now()),r=z(null);let o=null,l=null;async function i(){const f=await fetch(Me("/cron"));if(f.ok){const p=await f.json();t.value=p.jobs}}De(()=>{i(),o=setInterval(i,2e3),l=setInterval(()=>{s.value=Date.now()},1e3)}),ct(()=>{o&&clearInterval(o),l&&clearInterval(l)});const a=W(()=>n.value.filter(f=>f.type.startsWith("cron:")).slice(0,100));function c(f){if(!f)return"—";const p=new Date(f).getTime()-s.value;return p<0?"now":p<1e3?"<1s":`${Math.ceil(p/1e3)}s`}function u(f){const p=c(f);return p==="now"||p==="<1s"}async function d(f){r.value=f;try{const p=await fetch(Me(`/cron/${encodeURIComponent(f)}/run`),{method:"POST"}),h=await p.json().catch(()=>({}));p.ok?h.ran===!1?Xe.warning("Job not run",{description:h.reason==="already running"?"This exclusive job is already running.":h.reason||"The job did not run."}):Xe.success(`Triggered ${f}`,{description:"See the events below for the result."}):Xe.error("Run failed",{description:h.error||"The job could not be run."})}catch(p){Xe.error("Run failed",{description:p.message})}finally{r.value=null}}return(f,p)=>(m(),w("div",null,[N(Xt,{eyebrow:"Scheduler",title:"Cron",subtitle:"Registered scheduled jobs with live countdowns to their next fire, and a log of fires and errors."}),g("div",r0,[g("section",o0,[t.value.length?(m(),w("div",l0,[(m(!0),w(te,null,pe(t.value,h=>(m(),J(sr,{key:h.name,padded:"",class:ge(["cron-card",{"cron-card--soon":u(h.nextFireTime)}])},{default:I(()=>[g("div",i0,[g("span",a0,E(h.name),1),N(Ke,{size:"sm",variant:"ghost",icon:"lucide:play",loading:r.value===h.name,onClick:v=>d(h.name)},{default:I(()=>[...p[0]||(p[0]=[ce("Run",-1)])]),_:1},8,["loading","onClick"])]),N(rr,{label:"Next fire",value:c(h.nextFireTime),caption:h.nextFireTime?`at ${new Date(h.nextFireTime).toLocaleTimeString()}`:"no schedule",size:"md"},null,8,["value","caption"])]),_:2},1032,["class"]))),128))])):(m(),J(ze,{key:1},{default:I(()=>[N(Ye,{title:"No cron jobs registered",description:"Scheduled jobs will appear here once registered."})]),_:1}))]),g("section",c0,[N(ze,{title:"Events",description:"Fires and errors, newest first."},{default:I(()=>[a.value.length?(m(),w("div",u0,[(m(!0),w(te,null,pe(a.value,(h,v)=>(m(),w("div",{key:v,class:"event"},[N(rt,{variant:h.type.split(":")[1]==="error"?"failed":"active",size:"sm"},{default:I(()=>[ce(E(h.type.split(":")[1]),1)]),_:2},1032,["variant"]),g("span",d0,E(h.data.name),1),g("span",f0,E(new Date(h.ts).toLocaleTimeString()),1)]))),128))])):(m(),J(Ye,{key:1,title:"No cron events yet",description:"Job fires will appear here as they happen."}))]),_:1})])])]))}},h0=ke(p0,[["__scopeId","data-v-2283b312"]]),g0={key:0,class:"pc-panel__section-head"},m0={key:0,class:"pc-panel__section-label"},v0={key:1,class:"pc-panel__section-action"},y0={__name:"PanelSection",props:{label:{type:String,default:""},flush:{type:Boolean,default:!1},gradient:{type:Boolean,default:!1},tone:{type:String,default:"default"}},setup(e){return(t,n)=>(m(),w("section",{class:ge(["pc-panel__section",`pc-panel__section--tone-${e.tone}`,{"pc-panel__section--flush":e.flush,"pc-panel__section--gradient":e.gradient}])},[e.label||t.$slots.label||t.$slots.action?(m(),w("div",g0,[e.label||t.$slots.label?(m(),w("div",m0,[ue(t.$slots,"label",{},()=>[ce(E(e.label),1)],!0)])):K("",!0),t.$slots.action?(m(),w("div",v0,[ue(t.$slots,"action",{},void 0,!0)])):K("",!0)])):K("",!0),ue(t.$slots,"default",{},void 0,!0)],2))}},Ee=ke(y0,[["__scopeId","data-v-15c2ae0a"]]),_0=["id","type","value","placeholder","disabled","readonly"],b0={__name:"Input",props:{modelValue:{type:[String,Number],default:""},type:{type:String,default:"text"},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},invalid:{type:Boolean,default:!1},size:{type:String,default:"md"},id:{type:String,default:void 0}},emits:["update:modelValue"],setup(e,{expose:t,emit:n}){const s=e,r=n,o=u=>r("update:modelValue",u.target.value),l=z(null);t({focus:()=>{var u;return(u=l.value)==null?void 0:u.focus()},select:()=>{var u;return(u=l.value)==null?void 0:u.select()},el:l});const c=W(()=>["pc-input",`pc-input--${s.size}`,{"pc-input--invalid":s.invalid}]);return(u,d)=>(m(),w("input",{id:e.id,ref_key:"inputRef",ref:l,class:ge(c.value),type:e.type,value:e.modelValue,placeholder:e.placeholder,disabled:e.disabled,readonly:e.readonly,onInput:o},null,42,_0))}},w0=ke(b0,[["__scopeId","data-v-e8794190"]]),C0={class:"lp-title"},S0=["title"],k0={class:"lp-row__state"},x0={key:1,class:"lp-empty"},$0={key:0,class:"lp-result"},E0={class:"lp-row__key"},A0={class:"lp-row__state"},I0={key:1,class:"lp-error"},R0={__name:"LimiterPanel",props:{name:{type:String,required:!0}},setup(e){const t=e,n=z([]),s=z(!1),r=z(""),o=z(null),l=z(null),i=z(!1),a=z(null);let c=null;async function u(){const h=await fetch(Me(`/limits/${encodeURIComponent(t.name)}/keys`));if(h.ok){const v=await h.json();n.value=v.keys}s.value=!0}De(()=>{u(),c=setInterval(u,3e3)}),ct(()=>{c&&clearInterval(c)});function d(h){return h?h.total!==void 0?`${h.remaining} left · ${h.total} used`:`${h.remaining} left`:""}async function f(){const h=r.value.trim();if(h){i.value=!0,l.value=null,o.value=null;try{const v=await fetch(Me(`/limits/${encodeURIComponent(t.name)}/peek/${encodeURIComponent(h)}`)),_=await v.json().catch(()=>({}));v.ok?o.value={key:h,..._}:l.value=_.error||"Peek failed."}catch(v){l.value=v.message}finally{i.value=!1}}}async function p(h){var v;a.value=h;try{const _=await fetch(Me(`/limits/${encodeURIComponent(t.name)}/reset/${encodeURIComponent(h)}`),{method:"POST"}),y=await _.json().catch(()=>({}));_.ok?(Xe.success("Key reset",{description:`"${h}" cleared on "${t.name}".`}),((v=o.value)==null?void 0:v.key)===h&&await f()):Xe.error("Reset failed",{description:y.error||"The key could not be reset."}),await u()}catch(_){Xe.error("Reset failed",{description:_.message})}finally{a.value=null}}return(h,v)=>(m(),J(ze,null,{header:I(()=>[g("h3",C0,E(e.name),1)]),default:I(()=>[N(Ee,{label:"Recent keys"},{default:I(()=>[n.value.length?(m(),J(is,{key:0,"max-height":"280px"},{default:I(()=>[(m(!0),w(te,null,pe(n.value,_=>(m(),w("div",{key:_.key,class:"lp-row"},[g("span",{class:"lp-row__key",title:_.key},E(_.key),9,S0),g("span",k0,E(d(_)),1),N(Ke,{size:"sm",variant:"ghost",loading:a.value===_.key,onClick:y=>p(_.key)},{default:I(()=>[...v[2]||(v[2]=[ce("Reset",-1)])]),_:1},8,["loading","onClick"])]))),128))]),_:1})):(m(),w("p",x0,E(s.value?"No keys touched yet.":"Loading…"),1))]),_:1}),N(Ee,{label:"Look up a key"},{default:I(()=>[g("form",{class:"lp-lookup",onSubmit:Mn(f,["prevent"])},[N(w0,{modelValue:r.value,"onUpdate:modelValue":v[0]||(v[0]=_=>r.value=_),placeholder:"Exact key name",class:"lp-lookup__input"},null,8,["modelValue"]),N(Ke,{type:"submit",variant:"primary",loading:i.value,disabled:!r.value.trim()},{default:I(()=>[...v[3]||(v[3]=[ce(" Peek ",-1)])]),_:1},8,["loading","disabled"])],32),o.value?(m(),w("div",$0,[g("span",E0,E(o.value.key),1),g("span",A0,E(d(o.value)),1),N(Ke,{size:"sm",variant:"ghost",loading:a.value===o.value.key,onClick:v[1]||(v[1]=_=>p(o.value.key))},{default:I(()=>[...v[4]||(v[4]=[ce("Reset",-1)])]),_:1},8,["loading"])])):K("",!0),l.value?(m(),w("p",I0,E(l.value),1)):K("",!0)]),_:1})]),_:1}))}},T0=ke(R0,[["__scopeId","data-v-0ff96548"]]),N0={class:"page-body"},P0={key:1,class:"limit-grid"},O0={__name:"Limits",setup(e){const t=z([]),n=z(!1);return De(async()=>{const s=await fetch(Me("/limits"));if(s.ok){const r=await s.json();t.value=r.limiters}n.value=!0}),(s,r)=>(m(),w("div",null,[N(Xt,{eyebrow:"Rate limiting",title:"Limits",subtitle:"Registered limiters, their most recently touched keys, and a peek-and-reset tool for any key."}),g("div",N0,[n.value&&!t.value.length?(m(),J(Ye,{key:0,title:"No limiters registered",description:"Named limiters passed to devtools will appear here."})):(m(),w("div",P0,[(m(!0),w(te,null,pe(t.value,o=>(m(),J(T0,{key:o,name:o},null,8,["name"]))),128))]))])]))}},L0=ke(O0,[["__scopeId","data-v-032f65d9"]]),M0=["viewBox"],D0=["d"],F0=["x","y"],j0=["onClick"],B0=["x","y","width","height"],G0=["x","y"],V0=["x","y"],U0=["x","y"],H0=["x","y"],q0=["x","y"],z0={__name:"WorkflowGraph",props:{graph:{type:Object,required:!0},execution:{type:Object,default:null},selectedStep:{type:String,default:null}},emits:["select-step"],setup(e,{emit:t}){const n=e,s=t,r=z(null),o=z(!1),l=z(0),i=z(0),a=z(1);let c=!1,u=!1,d=0,f=0;function p(D){D.preventDefault();const Y=D.deltaY>0?.96:1.04,x=Math.min(3,Math.max(.3,a.value*Y)),M=r.value.getBoundingClientRect(),V=D.clientX-M.left,fe=D.clientY-M.top;l.value=V-(V-l.value)*(x/a.value),i.value=fe-(fe-i.value)*(x/a.value),a.value=x}function h(D){D.button===0&&(c=!0,u=!1,d=D.clientX,f=D.clientY)}function v(D){if(!c)return;const Y=D.clientX-d,x=D.clientY-f;(Y!==0||x!==0)&&(u=!0),l.value+=Y,i.value+=x,d=D.clientX,f=D.clientY}function _(){c=!1}function y(D){u||s("select-step",D)}function k(){l.value=0,i.value=0,a.value=1}function C(){o.value=!o.value,k()}function R(D){D.key==="Escape"&&o.value&&(o.value=!1,k())}De(()=>window.addEventListener("keydown",R)),ct(()=>window.removeEventListener("keydown",R));function j(D){const Y=(D==null?void 0:D.nodes)??[],x=(D==null?void 0:D.edges)??[],M=new Map(Y.map(H=>[H.name,0])),V=new Map(Y.map(H=>[H.name,[]]));for(const H of x)M.has(H.to)&&M.set(H.to,M.get(H.to)+1),V.has(H.from)&&V.get(H.from).push(H);const fe=[D.start],me=new Map([[D.start,0]]);for(;fe.length;){const H=fe.shift();for(const Q of V.get(H)??[]){const ie=(me.get(H)??0)+1;(!me.has(Q.to)||ie>me.get(Q.to))&&me.set(Q.to,ie),M.set(Q.to,Math.max(0,(M.get(Q.to)??0)-1)),M.get(Q.to)===0&&fe.push(Q.to)}}const _e=[];for(const H of Y){const Q=me.get(H.name)??0;_e[Q]=_e[Q]??[],_e[Q].push(H)}const de=[],Te=220,Be=92,Ze=90,qe=34,X=32;for(let H=0;H<_e.length;H++){const Q=_e[H]??[];Q.sort((he,S)=>he.name.localeCompare(S.name));const ie=Q.length*Be+Math.max(0,Q.length-1)*qe;for(let he=0;he<Q.length;he++){const S=Q[he];de.push({...S,x:X+H*(Te+Ze),y:X+he*(Be+qe)+Math.max(0,(380-ie)/2),width:Te,height:Be})}}const ne=new Map(de.map(H=>[H.name,H])),se=new Map;for(const H of x){const Q=`${H.from}->${H.to}`;se.has(Q)||se.set(Q,[]),se.get(Q).push(H)}const we=26,B=[];for(const H of se.values())H.forEach((Q,ie)=>{const he=ne.get(Q.from),S=ne.get(Q.to);if(!he||!S)return;const $=he.x+he.width,b=he.y+he.height/2,A=S.x,T=S.y+S.height/2,F=(ie-(H.length-1)/2)*we,oe=($+A)/2,le=b+F*1.6,re=T+F*1.6;B.push({...Q,d:`M ${$} ${b} C ${oe} ${le}, ${oe} ${re}, ${A} ${T}`,labelX:oe,labelY:(b+T)/2+F-7})});return{nodes:de,edges:B,width:Math.max(760,...de.map(H=>H.x+H.width+X)),height:Math.max(420,...de.map(H=>H.y+H.height+X))}}const O=W(()=>j(n.graph));function L(D){var Y,x;return((x=(Y=n.execution)==null?void 0:Y.steps)==null?void 0:x[D])??null}function U(D,Y){var M,V;const x=L(D);return((M=n.execution)==null?void 0:M.currentStep)===D&&n.execution.status==="running"?"running":(x==null?void 0:x.status)==="succeeded"?Y==="decision"?"decision-success":"succeeded":(x==null?void 0:x.status)==="failed"?"failed":((V=n.execution)==null?void 0:V.currentStep)===D?"current":"idle"}function P(D){var x;if(!n.execution)return"edge";const Y=L(D.from);return Y!=null&&Y.route&&Y.route===D.label?"edge edge-active":((x=L(D.from))==null?void 0:x.status)==="succeeded"&&L(D.to)?"edge edge-seen":"edge"}return(D,Y)=>(m(),w("div",{ref_key:"container",ref:r,class:ge(["graph-shell",{fullscreen:o.value}]),onWheel:Mn(p,["prevent"]),onPointerdown:h,onPointermove:v,onPointerup:_},[g("div",{class:"graph-controls",onPointerdown:Y[0]||(Y[0]=Mn(()=>{},["stop"])),onWheel:Y[1]||(Y[1]=Mn(()=>{},["stop"]))},[N(Ke,{size:"sm",variant:"ghost",onClick:Mn(k,["stop"])},{default:I(()=>[...Y[2]||(Y[2]=[ce("1:1",-1)])]),_:1}),N(Ke,{size:"sm",variant:"ghost",icon:o.value?"lucide:minimize-2":"lucide:maximize-2",onClick:Mn(C,["stop"])},{default:I(()=>[ce(E(o.value?"Exit":"Expand"),1)]),_:1},8,["icon"])],32),(m(),w("svg",{viewBox:`0 0 ${O.value.width} ${O.value.height}`,class:"graph",style:nt({transform:`translate(${l.value}px, ${i.value}px) scale(${a.value})`,transformOrigin:"0 0"})},[g("g",null,[(m(!0),w(te,null,pe(O.value.edges,x=>(m(),w("path",{key:`${x.from}:${x.to}:${x.label}`,d:x.d,class:ge(P(x))},null,10,D0))),128)),(m(!0),w(te,null,pe(O.value.edges,x=>(m(),w("text",{key:`${x.from}:${x.to}:${x.label}:label`,x:x.labelX,y:x.labelY,class:"edge-label","text-anchor":"middle"},E(x.label),9,F0))),128))]),(m(!0),w(te,null,pe(O.value.nodes,x=>{var M,V;return m(),w("g",{key:x.name,class:ge(["node",[x.type,U(x.name,x.type),{selected:e.selectedStep===x.name}]]),onClick:Mn(fe=>y(x.name),["stop"])},[g("rect",{x:x.x,y:x.y,width:x.width,height:x.height,rx:"10"},null,8,B0),g("text",{x:x.x+16,y:x.y+28,class:"node-name"},E(x.label||x.name),9,G0),g("text",{x:x.x+16,y:x.y+50,class:"node-type"},E(x.type),9,V0),x.type==="subworkflow"&&x.workflow?(m(),w("text",{key:0,x:x.x+16,y:x.y+72,class:"node-meta node-meta--sub"}," ↳ "+E(x.workflow),9,U0)):(M=L(x.name))!=null&&M.attempts?(m(),w("text",{key:1,x:x.x+16,y:x.y+72,class:"node-meta"}," attempts "+E(L(x.name).attempts),9,H0)):((V=x.retry)==null?void 0:V.maxAttempts)>1?(m(),w("text",{key:2,x:x.x+16,y:x.y+72,class:"node-meta"}," retries "+E(x.retry.maxAttempts),9,q0)):K("",!0)],10,j0)}),128))],12,M0))],34))}},ip=ke(z0,[["__scopeId","data-v-00bfdd81"]]),W0={class:"pc-kv__label"},K0={class:"pc-kv__value"},X0={__name:"KeyValue",props:{items:{type:Array,default:()=>[]},layout:{type:String,default:"row"},labelWidth:{type:String,default:"120px"},compact:{type:Boolean,default:!1},boxed:{type:Boolean,default:!1},dividers:{type:Boolean,default:!0}},setup(e){return(t,n)=>(m(),w("dl",{class:ge(["pc-kv",`pc-kv--${e.layout}`,{"pc-kv--compact":e.compact,"pc-kv--boxed":e.boxed,"pc-kv--no-dividers":!e.dividers}]),style:nt({"--pc-kv-label-w":e.labelWidth})},[(m(!0),w(te,null,pe(e.items,(s,r)=>(m(),w("div",{key:r,class:"pc-kv__row"},[g("dt",W0,[ue(t.$slots,"label",{item:s},()=>[ce(E(s.label),1)],!0)]),g("dd",K0,[ue(t.$slots,"value",{item:s},()=>[ce(E(s.value),1)],!0)])]))),128)),ue(t.$slots,"default",{},void 0,!0)],6))}},Zn=ke(X0,[["__scopeId","data-v-47f66a07"]]),Y0={key:0,class:"pc-modal-root"},J0={key:0,class:"pc-modal__header"},Q0={class:"pc-modal__title"},Z0={class:"pc-modal__body"},e1={key:1,class:"pc-modal__footer"},t1={__name:"Modal",props:{modelValue:{type:Boolean,default:!1},title:{type:String,default:""},size:{type:String,default:"md"},closeOnBackdrop:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0}},emits:["update:modelValue","close"],setup(e,{emit:t}){const n=e,s=t,r=()=>{s("update:modelValue",!1),s("close")},o=l=>{l.key==="Escape"&&n.closeOnEsc&&r()};return Re(()=>n.modelValue,l=>{l?(document.addEventListener("keydown",o),document.body.style.overflow="hidden"):(document.removeEventListener("keydown",o),document.body.style.overflow="")},{immediate:!0}),us(()=>{document.removeEventListener("keydown",o),document.body.style.overflow=""}),(l,i)=>(m(),J(Pd,{to:"body"},[N(wm,{name:"pc-modal",duration:260},{default:I(()=>[e.modelValue?(m(),w("div",Y0,[g("div",{class:"pc-modal-backdrop",onClick:i[0]||(i[0]=a=>e.closeOnBackdrop&&r())}),g("div",{class:ge(["pc-modal",`pc-modal--${e.size}`]),role:"dialog","aria-modal":"true"},[e.title||l.$slots.header?(m(),w("header",J0,[ue(l.$slots,"header",{},()=>[g("h3",Q0,E(e.title),1)],!0),g("button",{class:"pc-modal__close",type:"button","aria-label":"Close",onClick:r},[...i[1]||(i[1]=[g("svg",{width:"13",height:"13",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true"},[g("path",{d:"M4 4l6 6M10 4l-6 6",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round"})],-1)])])])):K("",!0),g("div",Z0,[ue(l.$slots,"default",{close:r},void 0,!0)]),l.$slots.footer?(m(),w("footer",e1,[ue(l.$slots,"footer",{close:r},void 0,!0)])):K("",!0)],2)])):K("",!0)]),_:3})]))}},ap=ke(t1,[["__scopeId","data-v-857b2e8d"]]),n1=["id","value","rows","placeholder","disabled","readonly"],s1={__name:"Textarea",props:{modelValue:{type:String,default:""},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},invalid:{type:Boolean,default:!1},rows:{type:Number,default:4},id:{type:String,default:void 0}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t,s=r=>n("update:modelValue",r.target.value);return(r,o)=>(m(),w("textarea",{id:e.id,class:ge(["pc-textarea",{"pc-textarea--invalid":e.invalid}]),value:e.modelValue,rows:e.rows,placeholder:e.placeholder,disabled:e.disabled,readonly:e.readonly,onInput:s},null,42,n1))}},cp=ke(s1,[["__scopeId","data-v-0e1f9e40"]]),r1={class:"pc-crumbs","aria-label":"Breadcrumb"},o1={class:"pc-crumbs__list"},l1={key:0,class:"pc-crumbs__item pc-crumbs__item--ellipsis","aria-hidden":"true"},i1={key:0,class:"pc-crumbs__icon"},a1={key:2,class:"pc-crumbs__sep","aria-hidden":"true"},c1={__name:"Breadcrumbs",props:{items:{type:Array,required:!0},separator:{type:String,default:"/"},maxItems:{type:Number,default:0}},emits:["select"],setup(e,{emit:t}){const n=e,s=t,r=W(()=>{if(!n.maxItems||n.items.length<=n.maxItems)return n.items.map(a=>({...a,_kind:"item"}));const l=n.items[0],i=n.items.slice(-(n.maxItems-2));return[{...l,_kind:"item"},{_kind:"ellipsis",hidden:n.items.slice(1,-(n.maxItems-2))},...i.map(a=>({...a,_kind:"item"}))]}),o=(l,i,a)=>{i||l.to||(a.preventDefault(),s("select",l))};return(l,i)=>(m(),w("nav",r1,[g("ol",o1,[(m(!0),w(te,null,pe(r.value,(a,c)=>(m(),w(te,{key:c},[a._kind==="ellipsis"?(m(),w("li",l1,[...i[0]||(i[0]=[g("span",{class:"pc-crumbs__ellipsis"},"…",-1)])])):(m(),w("li",{key:1,class:ge(["pc-crumbs__item",{"pc-crumbs__item--current":c===r.value.length-1}])},[(m(),J(Or(a.to&&c!==r.value.length-1?"a":"span"),{href:a.to,class:ge(["pc-crumbs__link",{"pc-crumbs__link--current":c===r.value.length-1}]),"aria-current":c===r.value.length-1?"page":void 0,onClick:u=>o(a,c===r.value.length-1,u)},{default:I(()=>[a.icon?(m(),w("span",i1,[ue(l.$slots,"icon",{item:a},()=>[ce(E(a.icon),1)],!0)])):K("",!0),g("span",null,E(a.label),1)]),_:2},1032,["href","class","aria-current","onClick"]))],2)),c<r.value.length-1?(m(),w("li",a1,[ue(l.$slots,"separator",{},()=>[ce(E(e.separator),1)],!0)])):K("",!0)],64))),128))])]))}},up=ke(c1,[["__scopeId","data-v-f4f9c695"]]),u1={class:"page-body"},d1={key:2,class:"wf-layout"},f1={class:"wf-list"},p1=["onClick"],h1={class:"wf-card__head"},g1={class:"wf-card__name"},m1={key:0,class:"wf-detail"},v1={class:"wf-id"},y1={class:"wf-id__core"},_1={class:"wf-id__name"},b1={class:"wf-id__version"},w1={class:"wf-id__stats"},C1={key:0,class:"wf-node-desc"},S1={class:"wf-sub-row"},k1={class:"wf-sub-target"},x1={key:0},$1={key:1,class:"wf-sub-missing"},E1={key:0,class:"run-modal"},A1={class:"run-modal__meta"},I1={class:"run-modal__field"},R1={key:0,class:"run-modal__error"},T1={__name:"Workflows",setup(e){const t=tl(),n=el(),s=z([]),r=z(""),o=z(""),l=z(null),i=z([]),a=z(!1),c=z("{}"),u=z(null),d=z(!1);async function f(){const U=await fetch(Me("/workflows"));if(!U.ok){l.value="Failed to load workflows.";return}const P=await U.json();s.value=P.workflows;const D=typeof t.query.workflow=="string"?t.query.workflow:"",Y=s.value[0]?`${s.value[0].name}@${s.value[0].version}`:"";r.value=s.value.some(x=>`${x.name}@${x.version}`===D)?D:Y}De(f),Re(r,U=>{var D;if(!U)return;n.replace({query:{workflow:U}});const P=(D=p.value)==null?void 0:D.graph;o.value=(P==null?void 0:P.start)??""}),Re(()=>t.query.workflow,U=>{typeof U=="string"&&U!==r.value&&(r.value=U)});const p=W(()=>s.value.find(U=>`${U.name}@${U.version}`===r.value)??null),h=W(()=>{var U,P,D;return((D=(P=(U=p.value)==null?void 0:U.graph)==null?void 0:P.nodes)==null?void 0:D.find(Y=>Y.name===o.value))??null}),v=W(()=>{var P;const U=h.value;return U?[{label:"Type",value:U.type},{label:"Timeout",value:U.timeout??"—"},{label:"Retries",value:((P=U.retry)==null?void 0:P.maxAttempts)??1}]:[]});function _(U){var P;return((P=s.value.find(D=>`${D.name}@${D.version}`===U))==null?void 0:P.name)??U}const y=W(()=>{const U=h.value;if(!U||U.type!=="subworkflow"||!U.workflow)return null;const P=`${U.workflow}@${U.version}`;if(s.value.some(Y=>`${Y.name}@${Y.version}`===P))return P;const D=s.value.find(Y=>Y.name===U.workflow);return D?`${D.name}@${D.version}`:null});function k(U){i.value=[],r.value=U}function C(){y.value&&(i.value=[...i.value,r.value],r.value=y.value)}const R=W(()=>[...i.value,r.value].map((U,P)=>({label:_(U),key:U,index:P})));function j(U){i.value=i.value.slice(0,U.index),r.value=U.key}function O(){c.value="{}",u.value=null,a.value=!0}async function L(){if(!p.value)return;let U;try{U=c.value.trim()?JSON.parse(c.value):{}}catch(P){u.value=`Invalid JSON: ${P.message}`;return}d.value=!0,u.value=null;try{const P=await fetch(Me("/workflow/start"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:p.value.name,version:p.value.version,input:U})}),D=await P.json();if(!P.ok){u.value=D.error||"Failed to start workflow.";return}a.value=!1,n.push({path:"/executions",query:{execution:D.id}})}catch(P){u.value=P.message}finally{d.value=!1}}return(U,P)=>{var D;return m(),w("div",null,[N(Xt,{eyebrow:"Definitions",title:"Workflows",subtitle:"Registered workflow definitions and their step graphs."},{actions:I(()=>[N(Ke,{variant:"primary",icon:"lucide:play",disabled:!p.value,onClick:O},{default:I(()=>[...P[3]||(P[3]=[ce(" Run workflow ",-1)])]),_:1},8,["disabled"])]),_:1}),g("div",u1,[l.value?(m(),J(Ye,{key:0,title:"Could not load workflows",description:l.value},null,8,["description"])):s.value.length?(m(),w("div",d1,[g("aside",f1,[(m(!0),w(te,null,pe(s.value,Y=>(m(),w("button",{key:`${Y.name}@${Y.version}`,type:"button",class:ge(["wf-card",{"wf-card--active":`${Y.name}@${Y.version}`===r.value}]),onClick:x=>k(`${Y.name}@${Y.version}`)},[g("div",h1,[g("span",g1,E(Y.name),1),N(rt,{size:"sm"},{default:I(()=>[ce("v"+E(Y.version),1)]),_:2},1024)])],10,p1))),128))]),p.value?(m(),w("section",m1,[i.value.length?(m(),J(up,{key:0,items:R.value,separator:"›",onSelect:j},null,8,["items"])):K("",!0),g("header",v1,[g("div",y1,[g("h2",_1,E(p.value.name),1),g("span",b1,"v"+E(p.value.version),1)]),g("dl",w1,[g("div",null,[P[4]||(P[4]=g("dt",null,"Steps",-1)),g("dd",null,E(p.value.graph.nodes.length),1)]),g("div",null,[P[5]||(P[5]=g("dt",null,"Edges",-1)),g("dd",null,E(p.value.graph.edges.length),1)])])]),N(ip,{graph:p.value.graph,"selected-step":o.value,onSelectStep:P[0]||(P[0]=Y=>o.value=Y)},null,8,["graph","selected-step"]),h.value?(m(),J(ze,{key:1,title:h.value.name},{default:I(()=>[N(Ee,{label:"Step definition"},{default:I(()=>[N(Zn,{layout:"divided",boxed:"",items:v.value},null,8,["items"]),h.value.description?(m(),w("p",C1,E(h.value.description),1)):K("",!0)]),_:1}),h.value.type==="subworkflow"?(m(),J(Ee,{key:0,label:"Subworkflow"},{default:I(()=>[g("div",S1,[g("span",k1,[ce(E(h.value.workflow),1),h.value.version?(m(),w("span",x1," · v"+E(h.value.version),1)):K("",!0)]),y.value?(m(),J(Ke,{key:0,size:"sm",variant:"ghost",icon:"lucide:corner-down-right",onClick:C},{default:I(()=>[...P[6]||(P[6]=[ce("Open workflow",-1)])]),_:1})):(m(),w("span",$1,"not registered"))])]),_:1})):K("",!0)]),_:1},8,["title"])):K("",!0)])):K("",!0)])):(m(),J(Ye,{key:1,title:"No workflows registered",description:"Workflow definitions will appear here once registered."}))]),N(ap,{modelValue:a.value,"onUpdate:modelValue":P[2]||(P[2]=Y=>a.value=Y),title:`Run ${((D=p.value)==null?void 0:D.name)??"workflow"}`},{footer:I(({close:Y})=>[N(Ke,{variant:"ghost",onClick:Y},{default:I(()=>[...P[8]||(P[8]=[ce("Cancel",-1)])]),_:1},8,["onClick"]),N(Ke,{variant:"primary",loading:d.value,"loading-label":"Starting",onClick:L},{default:I(()=>[...P[9]||(P[9]=[ce(" Run workflow ",-1)])]),_:1},8,["loading"])]),default:I(()=>[p.value?(m(),w("div",E1,[g("p",A1,E(p.value.name)+" · version "+E(p.value.version),1),g("div",I1,[P[7]||(P[7]=g("label",{class:"run-modal__label"},"Input (JSON)",-1)),N(cp,{modelValue:c.value,"onUpdate:modelValue":P[1]||(P[1]=Y=>c.value=Y),rows:9,invalid:!!u.value,placeholder:'{ "subject": "..." }'},null,8,["modelValue","invalid"])]),u.value?(m(),w("p",R1,E(u.value),1)):K("",!0)])):K("",!0)]),_:1},8,["modelValue","title"])])}}},N1=ke(T1,[["__scopeId","data-v-d0cbfbda"]]);let dt=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function P1(e){return ga(e)}function ga(e){return Array.isArray(e)?O1(e):e instanceof RegExp?e:typeof e=="object"?L1(e):e}function O1(e){let t=[];for(let n=0,s=e.length;n<s;n++)t[n]=ga(e[n]);return t}function L1(e){let t={};for(let n in e)t[n]=ga(e[n]);return t}function dp(e,...t){return t.forEach(n=>{for(let s in n)e[s]=n[s]}),e}function fp(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?fp(e.substring(0,e.length-1)):e.substr(~t+1)}var Dl=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Kr=class{static hasCaptures(e){return e===null?!1:(Dl.lastIndex=0,Dl.test(e))}static replaceCaptures(e,t,n){return e.replace(Dl,(s,r,o,l)=>{let i=n[parseInt(r||o,10)];if(i){let a=t.substring(i.start,i.end);for(;a[0]===".";)a=a.substring(1);switch(l){case"downcase":return a.toLowerCase();case"upcase":return a.toUpperCase();default:return a}}else return s})}};function pp(e,t){return e<t?-1:e>t?1:0}function hp(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,s=t.length;if(n===s){for(let r=0;r<n;r++){let o=pp(e[r],t[r]);if(o!==0)return o}return 0}return n-s}function au(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function gp(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var mp=class{constructor(e){q(this,"cache",new Map);this.fn=e}get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},xo=class{constructor(e,t,n){q(this,"_cachedMatchRoot",new mp(e=>this._root.match(e)));this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(F1(e),t)}static createFromParsedTheme(e,t){return B1(e,t)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,s=this._cachedMatchRoot.get(t).find(r=>M1(e.parent,r.parentScopes));return s?new vp(s.fontStyle,s.foreground,s.background):null}},Fl=class lo{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const s of n)t=new lo(t,s);return t}static from(...t){let n=null;for(let s=0;s<t.length;s++)n=new lo(n,t[s]);return n}push(t){return new lo(this,t)}getSegments(){let t=this;const n=[];for(;t;)n.push(t.scopeName),t=t.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const n=[];let s=this;for(;s&&s!==t;)n.push(s.scopeName),s=s.parent;return s===t?n.reverse():void 0}};function M1(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let s=t[n],r=!1;if(s===">"){if(n===t.length-1)return!1;s=t[++n],r=!0}for(;e&&!D1(e.scopeName,s);){if(r)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function D1(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var vp=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function F1(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],s=0;for(let r=0,o=t.length;r<o;r++){let l=t[r];if(!l.settings)continue;let i;if(typeof l.scope=="string"){let d=l.scope;d=d.replace(/^[,]+/,""),d=d.replace(/[,]+$/,""),i=d.split(",")}else Array.isArray(l.scope)?i=l.scope:i=[""];let a=-1;if(typeof l.settings.fontStyle=="string"){a=0;let d=l.settings.fontStyle.split(" ");for(let f=0,p=d.length;f<p;f++)switch(d[f]){case"italic":a=a|1;break;case"bold":a=a|2;break;case"underline":a=a|4;break;case"strikethrough":a=a|8;break}}let c=null;typeof l.settings.foreground=="string"&&au(l.settings.foreground)&&(c=l.settings.foreground);let u=null;typeof l.settings.background=="string"&&au(l.settings.background)&&(u=l.settings.background);for(let d=0,f=i.length;d<f;d++){let h=i[d].trim().split(" "),v=h[h.length-1],_=null;h.length>1&&(_=h.slice(0,h.length-1),_.reverse()),n[s++]=new j1(v,_,r,a,c,u)}}return n}var j1=class{constructor(e,t,n,s,r,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=s,this.foreground=r,this.background=o}},bt=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(bt||{});function B1(e,t){e.sort((a,c)=>{let u=pp(a.scope,c.scope);return u!==0||(u=hp(a.parentScopes,c.parentScopes),u!==0)?u:a.index-c.index});let n=0,s="#000000",r="#ffffff";for(;e.length>=1&&e[0].scope==="";){let a=e.shift();a.fontStyle!==-1&&(n=a.fontStyle),a.foreground!==null&&(s=a.foreground),a.background!==null&&(r=a.background)}let o=new G1(t),l=new vp(n,o.getId(s),o.getId(r)),i=new U1(new wi(0,null,-1,0,0),[]);for(let a=0,c=e.length;a<c;a++){let u=e[a];i.insert(0,u.scope,u.parentScopes,u.fontStyle,o.getId(u.foreground),o.getId(u.background))}return new xo(o,l,i)}var G1=class{constructor(e){q(this,"_isFrozen");q(this,"_lastColorId");q(this,"_id2color");q(this,"_color2id");if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},V1=Object.freeze([]),wi=class yp{constructor(t,n,s,r,o){q(this,"scopeDepth");q(this,"parentScopes");q(this,"fontStyle");q(this,"foreground");q(this,"background");this.scopeDepth=t,this.parentScopes=n||V1,this.fontStyle=s,this.foreground=r,this.background=o}clone(){return new yp(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let s=0,r=t.length;s<r;s++)n[s]=t[s].clone();return n}acceptOverwrite(t,n,s,r){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),s!==0&&(this.foreground=s),r!==0&&(this.background=r)}},U1=class Ci{constructor(t,n=[],s={}){q(this,"_rulesWithParentScopes");this._mainRule=t,this._children=s,this._rulesWithParentScopes=n}static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let s=0,r=0;for(;t.parentScopes[s]===">"&&s++,n.parentScopes[r]===">"&&r++,!(s>=t.parentScopes.length||r>=n.parentScopes.length);){const o=n.parentScopes[r].length-t.parentScopes[s].length;if(o!==0)return o;s++,r++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let s=t.indexOf("."),r,o;if(s===-1?(r=t,o=""):(r=t.substring(0,s),o=t.substring(s+1)),this._children.hasOwnProperty(r))return this._children[r].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Ci._cmpBySpecificity),n}insert(t,n,s,r,o,l){if(n===""){this._doInsertHere(t,s,r,o,l);return}let i=n.indexOf("."),a,c;i===-1?(a=n,c=""):(a=n.substring(0,i),c=n.substring(i+1));let u;this._children.hasOwnProperty(a)?u=this._children[a]:(u=new Ci(this._mainRule.clone(),wi.cloneArr(this._rulesWithParentScopes)),this._children[a]=u),u.insert(t+1,c,s,r,o,l)}_doInsertHere(t,n,s,r,o){if(n===null){this._mainRule.acceptOverwrite(t,s,r,o);return}for(let l=0,i=this._rulesWithParentScopes.length;l<i;l++){let a=this._rulesWithParentScopes[l];if(hp(a.parentScopes,n)===0){a.acceptOverwrite(t,s,r,o);return}}s===-1&&(s=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new wi(t,n,s,r,o))}},Fs=class Dt{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=Dt.getLanguageId(t),s=Dt.getTokenType(t),r=Dt.getFontStyle(t),o=Dt.getForeground(t),l=Dt.getBackground(t);console.log({languageId:n,tokenType:s,fontStyle:r,foreground:o,background:l})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,s,r,o,l,i){let a=Dt.getLanguageId(t),c=Dt.getTokenType(t),u=Dt.containsBalancedBrackets(t)?1:0,d=Dt.getFontStyle(t),f=Dt.getForeground(t),p=Dt.getBackground(t);return n!==0&&(a=n),s!==8&&(c=s),r!==null&&(u=r?1:0),o!==-1&&(d=o),l!==0&&(f=l),i!==0&&(p=i),(a<<0|c<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function $o(e,t){const n=[],s=H1(e);let r=s.next();for(;r!==null;){let a=0;if(r.length===2&&r.charAt(1)===":"){switch(r.charAt(0)){case"R":a=1;break;case"L":a=-1;break;default:console.log(`Unknown priority ${r} in scope selector`)}r=s.next()}let c=l();if(n.push({matcher:c,priority:a}),r!==",")break;r=s.next()}return n;function o(){if(r==="-"){r=s.next();const a=o();return c=>!!a&&!a(c)}if(r==="("){r=s.next();const a=i();return r===")"&&(r=s.next()),a}if(cu(r)){const a=[];do a.push(r),r=s.next();while(cu(r));return c=>t(a,c)}return null}function l(){const a=[];let c=o();for(;c;)a.push(c),c=o();return u=>a.every(d=>d(u))}function i(){const a=[];let c=l();for(;c&&(a.push(c),r==="|"||r===",");){do r=s.next();while(r==="|"||r===",");c=l()}return u=>a.some(d=>d(u))}}function cu(e){return!!e&&!!e.match(/[\w\.:]+/)}function H1(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const s=n[0];return n=t.exec(e),s}}}function _p(e){typeof e.dispose=="function"&&e.dispose()}var xr=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},q1=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},z1=class{constructor(){q(this,"_references",[]);q(this,"_seenReferenceKeys",new Set);q(this,"visitedRule",new Set)}get references(){return this._references}add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},W1=class{constructor(e,t){q(this,"seenFullScopeRequests",new Set);q(this,"seenPartialScopeRequests",new Set);q(this,"Q");this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new xr(this.initialScopeName)]}processQueue(){const e=this.Q;this.Q=[];const t=new z1;for(const n of e)K1(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof xr){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function K1(e,t,n,s){const r=n.lookup(e.scopeName);if(!r){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const o=n.lookup(t);e instanceof xr?io({baseGrammar:o,selfGrammar:r},s):Si(e.ruleName,{baseGrammar:o,selfGrammar:r,repository:r.repository},s);const l=n.injections(e.scopeName);if(l)for(const i of l)s.add(new xr(i))}function Si(e,t,n){if(t.repository&&t.repository[e]){const s=t.repository[e];Eo([s],t,n)}}function io(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Eo(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Eo(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Eo(e,t,n){for(const s of e){if(n.visitedRule.has(s))continue;n.visitedRule.add(s);const r=s.repository?dp({},t.repository,s.repository):t.repository;Array.isArray(s.patterns)&&Eo(s.patterns,{...t,repository:r},n);const o=s.include;if(!o)continue;const l=bp(o);switch(l.kind){case 0:io({...t,selfGrammar:t.baseGrammar},n);break;case 1:io(t,n);break;case 2:Si(l.ruleName,{...t,repository:r},n);break;case 3:case 4:const i=l.scopeName===t.selfGrammar.scopeName?t.selfGrammar:l.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(i){const a={baseGrammar:t.baseGrammar,selfGrammar:i,repository:r};l.kind===4?Si(l.ruleName,a,n):io(a,n)}else l.kind===4?n.add(new q1(l.scopeName,l.ruleName)):n.add(new xr(l.scopeName));break}}}var X1=class{constructor(){q(this,"kind",0)}},Y1=class{constructor(){q(this,"kind",1)}},J1=class{constructor(e){q(this,"kind",2);this.ruleName=e}},Q1=class{constructor(e){q(this,"kind",3);this.scopeName=e}},Z1=class{constructor(e,t){q(this,"kind",4);this.scopeName=e,this.ruleName=t}};function bp(e){if(e==="$base")return new X1;if(e==="$self")return new Y1;const t=e.indexOf("#");if(t===-1)return new Q1(e);if(t===0)return new J1(e.substring(1));{const n=e.substring(0,t),s=e.substring(t+1);return new Z1(n,s)}}var eC=/\\(\d+)/,uu=/\\(\d+)/g,tC=-1,wp=-2;var Fr=class{constructor(e,t,n,s){q(this,"$location");q(this,"id");q(this,"_nameIsCapturing");q(this,"_name");q(this,"_contentNameIsCapturing");q(this,"_contentName");this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Kr.hasCaptures(this._name),this._contentName=s||null,this._contentNameIsCapturing=Kr.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${fp(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Kr.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Kr.replaceCaptures(this._contentName,e,t)}},nC=class extends Fr{constructor(t,n,s,r,o){super(t,n,s,r);q(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(t,n){throw new Error("Not supported!")}compile(t,n){throw new Error("Not supported!")}compileAG(t,n,s,r){throw new Error("Not supported!")}},sC=class extends Fr{constructor(t,n,s,r,o){super(t,n,s,null);q(this,"_match");q(this,"captures");q(this,"_cachedCompiledPatterns");this._match=new $r(r,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,n){n.push(this._match)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,s,r){return this._getCachedCompiledPatterns(t).compileAG(t,s,r)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Er,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},du=class extends Fr{constructor(t,n,s,r,o){super(t,n,s,r);q(this,"hasMissingPatterns");q(this,"patterns");q(this,"_cachedCompiledPatterns");this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,n){for(const s of this.patterns)t.getRule(s).collectPatterns(t,n)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,s,r){return this._getCachedCompiledPatterns(t).compileAG(t,s,r)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Er,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ki=class extends Fr{constructor(t,n,s,r,o,l,i,a,c,u){super(t,n,s,r);q(this,"_begin");q(this,"beginCaptures");q(this,"_end");q(this,"endHasBackReferences");q(this,"endCaptures");q(this,"applyEndPatternLast");q(this,"hasMissingPatterns");q(this,"patterns");q(this,"_cachedCompiledPatterns");this._begin=new $r(o,this.id),this.beginCaptures=l,this._end=new $r(i||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=c||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,n){return this._end.resolveBackReferences(t,n)}collectPatterns(t,n){n.push(this._begin)}compile(t,n){return this._getCachedCompiledPatterns(t,n).compile(t)}compileAG(t,n,s,r){return this._getCachedCompiledPatterns(t,n).compileAG(t,s,r)}_getCachedCompiledPatterns(t,n){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Er;for(const s of this.patterns)t.getRule(s).collectPatterns(t,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,n):this._cachedCompiledPatterns.setSource(0,n)),this._cachedCompiledPatterns}},Ao=class extends Fr{constructor(t,n,s,r,o,l,i,a,c){super(t,n,s,r);q(this,"_begin");q(this,"beginCaptures");q(this,"whileCaptures");q(this,"_while");q(this,"whileHasBackReferences");q(this,"hasMissingPatterns");q(this,"patterns");q(this,"_cachedCompiledPatterns");q(this,"_cachedCompiledWhilePatterns");this._begin=new $r(o,this.id),this.beginCaptures=l,this.whileCaptures=a,this._while=new $r(i,wp),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,n){return this._while.resolveBackReferences(t,n)}collectPatterns(t,n){n.push(this._begin)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,s,r){return this._getCachedCompiledPatterns(t).compileAG(t,s,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Er;for(const n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,n){return this._getCachedCompiledWhilePatterns(t,n).compile(t)}compileWhileAG(t,n,s,r){return this._getCachedCompiledWhilePatterns(t,n).compileAG(t,s,r)}_getCachedCompiledWhilePatterns(t,n){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Er,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,n||""),this._cachedCompiledWhilePatterns}},Cp=class vt{static createCaptureRule(t,n,s,r,o){return t.registerRule(l=>new nC(n,l,s,r,o))}static getCompiledRuleId(t,n,s){return t.id||n.registerRule(r=>{if(t.id=r,t.match)return new sC(t.$vscodeTextmateLocation,t.id,t.name,t.match,vt._compileCaptures(t.captures,n,s));if(typeof t.begin>"u"){t.repository&&(s=dp({},s,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new du(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,vt._compilePatterns(o,n,s))}return t.while?new Ao(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,vt._compileCaptures(t.beginCaptures||t.captures,n,s),t.while,vt._compileCaptures(t.whileCaptures||t.captures,n,s),vt._compilePatterns(t.patterns,n,s)):new ki(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,vt._compileCaptures(t.beginCaptures||t.captures,n,s),t.end,vt._compileCaptures(t.endCaptures||t.captures,n,s),t.applyEndPatternLast,vt._compilePatterns(t.patterns,n,s))}),t.id}static _compileCaptures(t,n,s){let r=[];if(t){let o=0;for(const l in t){if(l==="$vscodeTextmateLocation")continue;const i=parseInt(l,10);i>o&&(o=i)}for(let l=0;l<=o;l++)r[l]=null;for(const l in t){if(l==="$vscodeTextmateLocation")continue;const i=parseInt(l,10);let a=0;t[l].patterns&&(a=vt.getCompiledRuleId(t[l],n,s)),r[i]=vt.createCaptureRule(n,t[l].$vscodeTextmateLocation,t[l].name,t[l].contentName,a)}}return r}static _compilePatterns(t,n,s){let r=[];if(t)for(let o=0,l=t.length;o<l;o++){const i=t[o];let a=-1;if(i.include){const c=bp(i.include);switch(c.kind){case 0:case 1:a=vt.getCompiledRuleId(s[i.include],n,s);break;case 2:let u=s[c.ruleName];u&&(a=vt.getCompiledRuleId(u,n,s));break;case 3:case 4:const d=c.scopeName,f=c.kind===4?c.ruleName:null,p=n.getExternalGrammar(d,s);if(p)if(f){let h=p.repository[f];h&&(a=vt.getCompiledRuleId(h,n,p.repository))}else a=vt.getCompiledRuleId(p.repository.$self,n,p.repository);break}}else a=vt.getCompiledRuleId(i,n,s);if(a!==-1){const c=n.getRule(a);let u=!1;if((c instanceof du||c instanceof ki||c instanceof Ao)&&c.hasMissingPatterns&&c.patterns.length===0&&(u=!0),u)continue;r.push(a)}}return{patterns:r,hasMissingPatterns:(t?t.length:0)!==r.length}}},$r=class Sp{constructor(t,n){q(this,"source");q(this,"ruleId");q(this,"hasAnchor");q(this,"hasBackReferences");q(this,"_anchorCache");if(t&&typeof t=="string"){const s=t.length;let r=0,o=[],l=!1;for(let i=0;i<s;i++)if(t.charAt(i)==="\\"&&i+1<s){const c=t.charAt(i+1);c==="z"?(o.push(t.substring(r,i)),o.push("$(?!\\n)(?<!\\n)"),r=i+2):(c==="A"||c==="G")&&(l=!0),i++}this.hasAnchor=l,r===0?this.source=t:(o.push(t.substring(r,s)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=eC.test(this.source):this.hasBackReferences=!1}clone(){return new Sp(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let s=n.map(r=>t.substring(r.start,r.end));return uu.lastIndex=0,this.source.replace(uu,(r,o)=>gp(s[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],s=[],r=[],o,l,i,a;for(o=0,l=this.source.length;o<l;o++)i=this.source.charAt(o),t[o]=i,n[o]=i,s[o]=i,r[o]=i,i==="\\"&&o+1<l&&(a=this.source.charAt(o+1),a==="A"?(t[o+1]="",n[o+1]="",s[o+1]="A",r[o+1]="A"):a==="G"?(t[o+1]="",n[o+1]="G",s[o+1]="",r[o+1]="G"):(t[o+1]=a,n[o+1]=a,s[o+1]=a,r[o+1]=a),o++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:s.join(""),A1_G1:r.join("")}}resolveAnchors(t,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Er=class{constructor(){q(this,"_items");q(this,"_hasAnchors");q(this,"_cached");q(this,"_anchorCache");this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(n=>n.source);this._cached=new fu(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let s=this._items.map(r=>r.resolveAnchors(t,n));return new fu(e,s,this._items.map(r=>r.ruleId))}},fu=class{constructor(e,t,n){q(this,"scanner");this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
|
|
28
|
+
`)}findNextMatchSync(e,t,n){const s=this.scanner.findNextMatchSync(e,t,n);return s?{ruleId:this.rules[s.index],captureIndices:s.captureIndices}:null}},jl=class{constructor(e,t){this.languageId=e,this.tokenType=t}},bn,rC=(bn=class{constructor(t,n){q(this,"_defaultAttributes");q(this,"_embeddedLanguagesMatcher");q(this,"_getBasicScopeAttributes",new mp(t=>{const n=this._scopeToLanguage(t),s=this._toStandardTokenType(t);return new jl(n,s)}));this._defaultAttributes=new jl(t,8),this._embeddedLanguagesMatcher=new oC(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?bn._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(bn.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}},q(bn,"_NULL_SCOPE_METADATA",new jl(0,0)),q(bn,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),bn),oC=class{constructor(e){q(this,"values");q(this,"scopesRegExp");if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,s])=>gp(n));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},pu=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function kp(e,t,n,s,r,o,l,i){const a=t.content.length;let c=!1,u=-1;if(l){const p=lC(e,t,n,s,r,o);r=p.stack,s=p.linePos,n=p.isFirstLine,u=p.anchorPosition}const d=Date.now();for(;!c;){if(i!==0&&Date.now()-d>i)return new pu(r,!0);f()}return new pu(r,!1);function f(){const p=iC(e,t,n,s,r,u);if(!p){o.produce(r,a),c=!0;return}const h=p.captureIndices,v=p.matchedRuleId,_=h&&h.length>0?h[0].end>s:!1;if(v===tC){const y=r.getRule(e);o.produce(r,h[0].start),r=r.withContentNameScopesList(r.nameScopesList),or(e,t,n,r,o,y.endCaptures,h),o.produce(r,h[0].end);const k=r;if(r=r.parent,u=k.getAnchorPos(),!_&&k.getEnterPos()===s){r=k,o.produce(r,a),c=!0;return}}else{const y=e.getRule(v);o.produce(r,h[0].start);const k=r,C=y.getName(t.content,h),R=r.contentNameScopesList.pushAttributed(C,e);if(r=r.push(v,s,u,h[0].end===a,null,R,R),y instanceof ki){const j=y;or(e,t,n,r,o,j.beginCaptures,h),o.produce(r,h[0].end),u=h[0].end;const O=j.getContentName(t.content,h),L=R.pushAttributed(O,e);if(r=r.withContentNameScopesList(L),j.endHasBackReferences&&(r=r.withEndRule(j.getEndWithResolvedBackReferences(t.content,h))),!_&&k.hasSameRuleAs(r)){r=r.pop(),o.produce(r,a),c=!0;return}}else if(y instanceof Ao){const j=y;or(e,t,n,r,o,j.beginCaptures,h),o.produce(r,h[0].end),u=h[0].end;const O=j.getContentName(t.content,h),L=R.pushAttributed(O,e);if(r=r.withContentNameScopesList(L),j.whileHasBackReferences&&(r=r.withEndRule(j.getWhileWithResolvedBackReferences(t.content,h))),!_&&k.hasSameRuleAs(r)){r=r.pop(),o.produce(r,a),c=!0;return}}else if(or(e,t,n,r,o,y.captures,h),o.produce(r,h[0].end),r=r.pop(),!_){r=r.safePop(),o.produce(r,a),c=!0;return}}h[0].end>s&&(s=h[0].end,n=!1)}}function lC(e,t,n,s,r,o){let l=r.beginRuleCapturedEOL?0:-1;const i=[];for(let a=r;a;a=a.pop()){const c=a.getRule(e);c instanceof Ao&&i.push({rule:c,stack:a})}for(let a=i.pop();a;a=i.pop()){const{ruleScanner:c,findOptions:u}=uC(a.rule,e,a.stack.endRule,n,s===l),d=c.findNextMatchSync(t,s,u);if(d){if(d.ruleId!==wp){r=a.stack.pop();break}d.captureIndices&&d.captureIndices.length&&(o.produce(a.stack,d.captureIndices[0].start),or(e,t,n,a.stack,o,a.rule.whileCaptures,d.captureIndices),o.produce(a.stack,d.captureIndices[0].end),l=d.captureIndices[0].end,d.captureIndices[0].end>s&&(s=d.captureIndices[0].end,n=!1))}else{r=a.stack.pop();break}}return{stack:r,linePos:s,anchorPosition:l,isFirstLine:n}}function iC(e,t,n,s,r,o){const l=aC(e,t,n,s,r,o),i=e.getInjections();if(i.length===0)return l;const a=cC(i,e,t,n,s,r,o);if(!a)return l;if(!l)return a;const c=l.captureIndices[0].start,u=a.captureIndices[0].start;return u<c||a.priorityMatch&&u===c?a:l}function aC(e,t,n,s,r,o){const l=r.getRule(e),{ruleScanner:i,findOptions:a}=xp(l,e,r.endRule,n,s===o),c=i.findNextMatchSync(t,s,a);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function cC(e,t,n,s,r,o,l){let i=Number.MAX_VALUE,a=null,c,u=0;const d=o.contentNameScopesList.getScopeNames();for(let f=0,p=e.length;f<p;f++){const h=e[f];if(!h.matcher(d))continue;const v=t.getRule(h.ruleId),{ruleScanner:_,findOptions:y}=xp(v,t,null,s,r===l),k=_.findNextMatchSync(n,r,y);if(!k)continue;const C=k.captureIndices[0].start;if(!(C>=i)&&(i=C,a=k.captureIndices,c=k.ruleId,u=h.priority,i===r))break}return a?{priorityMatch:u===-1,captureIndices:a,matchedRuleId:c}:null}function xp(e,t,n,s,r){return{ruleScanner:e.compileAG(t,n,s,r),findOptions:0}}function uC(e,t,n,s,r){return{ruleScanner:e.compileWhileAG(t,n,s,r),findOptions:0}}function or(e,t,n,s,r,o,l){if(o.length===0)return;const i=t.content,a=Math.min(o.length,l.length),c=[],u=l[0].end;for(let d=0;d<a;d++){const f=o[d];if(f===null)continue;const p=l[d];if(p.length===0)continue;if(p.start>u)break;for(;c.length>0&&c[c.length-1].endPos<=p.start;)r.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?r.produceFromScopes(c[c.length-1].scopes,p.start):r.produce(s,p.start),f.retokenizeCapturedWithRuleId){const v=f.getName(i,l),_=s.contentNameScopesList.pushAttributed(v,e),y=f.getContentName(i,l),k=_.pushAttributed(y,e),C=s.push(f.retokenizeCapturedWithRuleId,p.start,-1,!1,null,_,k),R=e.createOnigString(i.substring(0,p.end));kp(e,R,n&&p.start===0,p.start,C,r,!1,0),_p(R);continue}const h=f.getName(i,l);if(h!==null){const _=(c.length>0?c[c.length-1].scopes:s.contentNameScopesList).pushAttributed(h,e);c.push(new dC(_,p.end))}}for(;c.length>0;)r.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var dC=class{constructor(e,t){q(this,"scopes");q(this,"endPos");this.scopes=e,this.endPos=t}};function fC(e,t,n,s,r,o,l,i){return new hC(e,t,n,s,r,o,l,i)}function hu(e,t,n,s,r){const o=$o(t,Io),l=Cp.getCompiledRuleId(n,s,r.repository);for(const i of o)e.push({debugSelector:t,matcher:i.matcher,ruleId:l,grammar:r,priority:i.priority})}function Io(e,t){if(t.length<e.length)return!1;let n=0;return e.every(s=>{for(let r=n;r<t.length;r++)if(pC(t[r],s))return n=r+1,!0;return!1})}function pC(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]==="."}var hC=class{constructor(e,t,n,s,r,o,l,i){q(this,"_rootId");q(this,"_lastRuleId");q(this,"_ruleId2desc");q(this,"_includedGrammars");q(this,"_grammarRepository");q(this,"_grammar");q(this,"_injections");q(this,"_basicScopeAttributesProvider");q(this,"_tokenTypeMatchers");if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=i,this._basicScopeAttributesProvider=new rC(n,s),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=l,this._grammar=gu(t,null),this._injections=null,this._tokenTypeMatchers=[],r)for(const a of Object.keys(r)){const c=$o(a,Io);for(const u of c)this._tokenTypeMatchers.push({matcher:u.matcher,type:r[a]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:r=>r===this._rootScopeName?this._grammar:this.getExternalGrammar(r),injections:r=>this._grammarRepository.injections(r)},t=[],n=this._rootScopeName,s=e.lookup(n);if(s){const r=s.injections;if(r)for(let l in r)hu(t,l,r[l],this,s);const o=this._grammarRepository.injections(n);o&&o.forEach(l=>{const i=this.getExternalGrammar(l);if(i){const a=i.injectionSelector;a&&hu(t,a,i,this,i)}})}return t.sort((r,o)=>r.priority-o.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=gu(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const s=this._tokenize(e,t,!1,n);return{tokens:s.lineTokens.getResult(s.ruleStack,s.lineLength),ruleStack:s.ruleStack,stoppedEarly:s.stoppedEarly}}tokenizeLine2(e,t,n=0){const s=this._tokenize(e,t,!0,n);return{tokens:s.lineTokens.getBinaryResult(s.ruleStack,s.lineLength),ruleStack:s.ruleStack,stoppedEarly:s.stoppedEarly}}_tokenize(e,t,n,s){this._rootId===-1&&(this._rootId=Cp.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let r;if(!t||t===xi.NULL){r=!0;const c=this._basicScopeAttributesProvider.getDefaultAttributes(),u=this.themeProvider.getDefaults(),d=Fs.set(0,c.languageId,c.tokenType,null,u.fontStyle,u.foregroundId,u.backgroundId),f=this.getRule(this._rootId).getName(null,null);let p;f?p=pr.createRootAndLookUpScopeName(f,d,this):p=pr.createRoot("unknown",d),t=new xi(null,this._rootId,-1,-1,!1,null,p,p)}else r=!1,t.reset();e=e+`
|
|
29
|
+
`;const o=this.createOnigString(e),l=o.content.length,i=new mC(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),a=kp(this,o,r,0,t,i,!0,s);return _p(o),{lineLength:l,lineTokens:i,ruleStack:a.stack,stoppedEarly:a.stoppedEarly}}};function gu(e,t){return e=P1(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var pr=class tn{constructor(t,n,s){this.parent=t,this.scopePath=n,this.tokenAttributes=s}static fromExtension(t,n){let s=t,r=(t==null?void 0:t.scopePath)??null;for(const o of n)r=Fl.push(r,o.scopeNames),s=new tn(s,r,o.encodedTokenAttributes);return s}static createRoot(t,n){return new tn(null,new Fl(null,t),n)}static createRootAndLookUpScopeName(t,n,s){const r=s.getMetadataForScope(t),o=new Fl(null,t),l=s.themeProvider.themeMatch(o),i=tn.mergeAttributes(n,r,l);return new tn(null,o,i)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return tn.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,s){let r=-1,o=0,l=0;return s!==null&&(r=s.fontStyle,o=s.foregroundId,l=s.backgroundId),Fs.set(t,n.languageId,n.tokenType,null,r,o,l)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return tn._pushAttributed(this,t,n);const s=t.split(/ /g);let r=this;for(const o of s)r=tn._pushAttributed(r,o,n);return r}static _pushAttributed(t,n,s){const r=s.getMetadataForScope(n),o=t.scopePath.push(n),l=s.themeProvider.themeMatch(o),i=tn.mergeAttributes(t.tokenAttributes,r,l);return new tn(t,o,i)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){var r;const n=[];let s=this;for(;s&&s!==t;)n.push({encodedTokenAttributes:s.tokenAttributes,scopeNames:s.scopePath.getExtensionIfDefined(((r=s.parent)==null?void 0:r.scopePath)??null)}),s=s.parent;return s===t?n.reverse():void 0}},Ft,xi=(Ft=class{constructor(t,n,s,r,o,l,i,a){q(this,"_stackElementBrand");q(this,"_enterPos");q(this,"_anchorPos");q(this,"depth");this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=o,this.endRule=l,this.nameScopesList=i,this.contentNameScopesList=a,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=s,this._anchorPos=r}equals(t){return t===null?!1:Ft._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?pr.equals(t.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.depth!==n.depth||t.ruleId!==n.ruleId||t.endRule!==n.endRule)return!1;t=t.parent,n=n.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){Ft._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,s,r,o,l,i){return new Ft(this,t,n,s,r,o,l,i)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,n){var s,r;return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${(s=this.nameScopesList)==null?void 0:s.toString()}, ${(r=this.contentNameScopesList)==null?void 0:r.toString()})`,n}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new Ft(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){var t,n,s;return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:((n=this.nameScopesList)==null?void 0:n.getExtensionIfDefined(((t=this.parent)==null?void 0:t.nameScopesList)??null))??[],contentNameScopesList:((s=this.contentNameScopesList)==null?void 0:s.getExtensionIfDefined(this.nameScopesList))??[]}}static pushFrame(t,n){const s=pr.fromExtension((t==null?void 0:t.nameScopesList)??null,n.nameScopesList);return new Ft(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,s,pr.fromExtension(s,n.contentNameScopesList))}},q(Ft,"NULL",new Ft(null,0,0,0,!1,null,null,null)),Ft),gC=class{constructor(e,t){q(this,"balancedBracketScopes");q(this,"unbalancedBracketScopes");q(this,"allowAny",!1);this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):$o(n,Io).map(s=>s.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>$o(n,Io).map(s=>s.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},mC=class{constructor(e,t,n,s){q(this,"_emitBinaryTokens");q(this,"_lineText");q(this,"_tokens");q(this,"_binaryTokens");q(this,"_lastTokenEndIndex");q(this,"_tokenTypeOverrides");this.balancedBracketSelectors=s,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){var s;if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let r=(e==null?void 0:e.tokenAttributes)??0,o=!1;if((s=this.balancedBracketSelectors)!=null&&s.matchesAlways&&(o=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const l=(e==null?void 0:e.getScopeNames())??[];for(const i of this._tokenTypeOverrides)i.matcher(l)&&(r=Fs.set(r,0,i.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(l))}if(o&&(r=Fs.set(r,0,8,o,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=t;return}const n=(e==null?void 0:e.getScopeNames())??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let s=0,r=this._binaryTokens.length;s<r;s++)n[s]=this._binaryTokens[s];return n}},vC=class{constructor(e,t){q(this,"_grammars",new Map);q(this,"_rawGrammars",new Map);q(this,"_injectionGrammars",new Map);q(this,"_theme");this._onigLib=t,this._theme=e}dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,s,r){if(!this._grammars.has(e)){let o=this._rawGrammars.get(e);if(!o)return null;this._grammars.set(e,fC(e,o,t,n,s,r,this,this._onigLib))}return this._grammars.get(e)}},yC=class{constructor(t){q(this,"_options");q(this,"_syncRegistry");q(this,"_ensureGrammarCache");this._options=t,this._syncRegistry=new vC(xo.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(xo.createFromRawTheme(t,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,n,s){return this.loadGrammarWithConfiguration(t,n,{embeddedLanguages:s})}loadGrammarWithConfiguration(t,n,s){return this._loadGrammar(t,n,s.embeddedLanguages,s.tokenTypes,new gC(s.balancedBracketSelectors||[],s.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,s,r,o){const l=new W1(this._syncRegistry,t);for(;l.Q.length>0;)l.Q.map(i=>this._loadSingleGrammar(i.scopeName)),l.processQueue();return this._grammarForScopeName(t,n,s,r,o)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const n=this._options.loadGrammar(t);if(n){const s=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,s)}}addGrammar(t,n=[],s=0,r=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,s,r)}_grammarForScopeName(t,n=0,s=null,r=null,o=null){return this._syncRegistry.grammarForScopeName(t,n,s,r,o)}},$i=xi.NULL;const _C=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class jr{constructor(t,n,s){this.normal=n,this.property=t,s&&(this.space=s)}}jr.prototype.normal={};jr.prototype.property={};jr.prototype.space=void 0;function $p(e,t){const n={},s={};for(const r of e)Object.assign(n,r.property),Object.assign(s,r.normal);return new jr(n,s,t)}function Ei(e){return e.toLowerCase()}class Et{constructor(t,n){this.attribute=n,this.property=t}}Et.prototype.attribute="";Et.prototype.booleanish=!1;Et.prototype.boolean=!1;Et.prototype.commaOrSpaceSeparated=!1;Et.prototype.commaSeparated=!1;Et.prototype.defined=!1;Et.prototype.mustUseProperty=!1;Et.prototype.number=!1;Et.prototype.overloadedBoolean=!1;Et.prototype.property="";Et.prototype.spaceSeparated=!1;Et.prototype.space=void 0;let bC=0;const $e=ds(),tt=ds(),Ai=ds(),ee=ds(),Ve=ds(),As=ds(),It=ds();function ds(){return 2**++bC}const Ii=Object.freeze(Object.defineProperty({__proto__:null,boolean:$e,booleanish:tt,commaOrSpaceSeparated:It,commaSeparated:As,number:ee,overloadedBoolean:Ai,spaceSeparated:Ve},Symbol.toStringTag,{value:"Module"})),Bl=Object.keys(Ii);class ma extends Et{constructor(t,n,s,r){let o=-1;if(super(t,n),mu(this,"space",r),typeof s=="number")for(;++o<Bl.length;){const l=Bl[o];mu(this,Bl[o],(s&Ii[l])===Ii[l])}}}ma.prototype.defined=!0;function mu(e,t,n){n&&(e[t]=n)}function Gs(e){const t={},n={};for(const[s,r]of Object.entries(e.properties)){const o=new ma(s,e.transform(e.attributes||{},s),r,e.space);e.mustUseProperty&&e.mustUseProperty.includes(s)&&(o.mustUseProperty=!0),t[s]=o,n[Ei(s)]=s,n[Ei(o.attribute)]=s}return new jr(t,n,e.space)}const Ep=Gs({properties:{ariaActiveDescendant:null,ariaAtomic:tt,ariaAutoComplete:null,ariaBusy:tt,ariaChecked:tt,ariaColCount:ee,ariaColIndex:ee,ariaColSpan:ee,ariaControls:Ve,ariaCurrent:null,ariaDescribedBy:Ve,ariaDetails:null,ariaDisabled:tt,ariaDropEffect:Ve,ariaErrorMessage:null,ariaExpanded:tt,ariaFlowTo:Ve,ariaGrabbed:tt,ariaHasPopup:null,ariaHidden:tt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ve,ariaLevel:ee,ariaLive:null,ariaModal:tt,ariaMultiLine:tt,ariaMultiSelectable:tt,ariaOrientation:null,ariaOwns:Ve,ariaPlaceholder:null,ariaPosInSet:ee,ariaPressed:tt,ariaReadOnly:tt,ariaRelevant:null,ariaRequired:tt,ariaRoleDescription:Ve,ariaRowCount:ee,ariaRowIndex:ee,ariaRowSpan:ee,ariaSelected:tt,ariaSetSize:ee,ariaSort:null,ariaValueMax:ee,ariaValueMin:ee,ariaValueNow:ee,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Ap(e,t){return t in e?e[t]:t}function Ip(e,t){return Ap(e,t.toLowerCase())}const wC=Gs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:As,acceptCharset:Ve,accessKey:Ve,action:null,allow:null,allowFullScreen:$e,allowPaymentRequest:$e,allowUserMedia:$e,alt:null,as:null,async:$e,autoCapitalize:null,autoComplete:Ve,autoFocus:$e,autoPlay:$e,blocking:Ve,capture:null,charSet:null,checked:$e,cite:null,className:Ve,cols:ee,colSpan:null,content:null,contentEditable:tt,controls:$e,controlsList:Ve,coords:ee|As,crossOrigin:null,data:null,dateTime:null,decoding:null,default:$e,defer:$e,dir:null,dirName:null,disabled:$e,download:Ai,draggable:tt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:$e,formTarget:null,headers:Ve,height:ee,hidden:Ai,high:ee,href:null,hrefLang:null,htmlFor:Ve,httpEquiv:Ve,id:null,imageSizes:null,imageSrcSet:null,inert:$e,inputMode:null,integrity:null,is:null,isMap:$e,itemId:null,itemProp:Ve,itemRef:Ve,itemScope:$e,itemType:Ve,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:$e,low:ee,manifest:null,max:null,maxLength:ee,media:null,method:null,min:null,minLength:ee,multiple:$e,muted:$e,name:null,nonce:null,noModule:$e,noValidate:$e,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:$e,optimum:ee,pattern:null,ping:Ve,placeholder:null,playsInline:$e,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:$e,referrerPolicy:null,rel:Ve,required:$e,reversed:$e,rows:ee,rowSpan:ee,sandbox:Ve,scope:null,scoped:$e,seamless:$e,selected:$e,shadowRootClonable:$e,shadowRootDelegatesFocus:$e,shadowRootMode:null,shape:null,size:ee,sizes:null,slot:null,span:ee,spellCheck:tt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ee,step:null,style:null,tabIndex:ee,target:null,title:null,translate:null,type:null,typeMustMatch:$e,useMap:null,value:tt,width:ee,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ve,axis:null,background:null,bgColor:null,border:ee,borderColor:null,bottomMargin:ee,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:$e,declare:$e,event:null,face:null,frame:null,frameBorder:null,hSpace:ee,leftMargin:ee,link:null,longDesc:null,lowSrc:null,marginHeight:ee,marginWidth:ee,noResize:$e,noHref:$e,noShade:$e,noWrap:$e,object:null,profile:null,prompt:null,rev:null,rightMargin:ee,rules:null,scheme:null,scrolling:tt,standby:null,summary:null,text:null,topMargin:ee,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ee,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:$e,disableRemotePlayback:$e,prefix:null,property:null,results:ee,security:null,unselectable:null},space:"html",transform:Ip}),CC=Gs({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:It,accentHeight:ee,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ee,amplitude:ee,arabicForm:null,ascent:ee,attributeName:null,attributeType:null,azimuth:ee,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ee,by:null,calcMode:null,capHeight:ee,className:Ve,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ee,diffuseConstant:ee,direction:null,display:null,dur:null,divisor:ee,dominantBaseline:null,download:$e,dx:null,dy:null,edgeMode:null,editable:null,elevation:ee,enableBackground:null,end:null,event:null,exponent:ee,externalResourcesRequired:null,fill:null,fillOpacity:ee,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:As,g2:As,glyphName:As,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ee,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ee,horizOriginX:ee,horizOriginY:ee,id:null,ideographic:ee,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ee,k:ee,k1:ee,k2:ee,k3:ee,k4:ee,kernelMatrix:It,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ee,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ee,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ee,overlineThickness:ee,paintOrder:null,panose1:null,path:null,pathLength:ee,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ve,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ee,pointsAtY:ee,pointsAtZ:ee,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:It,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:It,rev:It,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:It,requiredFeatures:It,requiredFonts:It,requiredFormats:It,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ee,specularExponent:ee,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ee,strikethroughThickness:ee,string:null,stroke:null,strokeDashArray:It,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ee,strokeOpacity:ee,strokeWidth:null,style:null,surfaceScale:ee,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:It,tabIndex:ee,tableValues:null,target:null,targetX:ee,targetY:ee,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:It,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ee,underlineThickness:ee,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ee,values:null,vAlphabetic:ee,vMathematical:ee,vectorEffect:null,vHanging:ee,vIdeographic:ee,version:null,vertAdvY:ee,vertOriginX:ee,vertOriginY:ee,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ee,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Ap}),Rp=Gs({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Tp=Gs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ip}),Np=Gs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),SC=/[A-Z]/g,vu=/-[a-z]/g,kC=/^data[-\w.:]+$/i;function xC(e,t){const n=Ei(t);let s=t,r=Et;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&kC.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(vu,EC);s="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!vu.test(o)){let l=o.replace(SC,$C);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}r=ma}return new r(s,t)}function $C(e){return"-"+e.toLowerCase()}function EC(e){return e.charAt(1).toUpperCase()}const AC=$p([Ep,wC,Rp,Tp,Np],"html"),Pp=$p([Ep,CC,Rp,Tp,Np],"svg"),yu={}.hasOwnProperty;function IC(e,t){const n=t||{};function s(r,...o){let l=s.invalid;const i=s.handlers;if(r&&yu.call(r,e)){const a=String(r[e]);l=yu.call(i,a)?i[a]:s.unknown}if(l)return l.call(this,r,...o)}return s.handlers=n.handlers||{},s.invalid=n.invalid,s.unknown=n.unknown,s}const RC=/["&'<>`]/g,TC=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,NC=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,PC=/[|\\{}()[\]^$+*?.]/g,_u=new WeakMap;function OC(e,t){if(e=e.replace(t.subset?LC(t.subset):RC,s),t.subset||t.escapeOnly)return e;return e.replace(TC,n).replace(NC,s);function n(r,o,l){return t.format((r.charCodeAt(0)-55296)*1024+r.charCodeAt(1)-56320+65536,l.charCodeAt(o+2),t)}function s(r,o,l){return t.format(r.charCodeAt(0),l.charCodeAt(o+1),t)}}function LC(e){let t=_u.get(e);return t||(t=MC(e),_u.set(e,t)),t}function MC(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(PC,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const DC=/[\dA-Fa-f]/;function FC(e,t,n){const s="&#x"+e.toString(16).toUpperCase();return n&&t&&!DC.test(String.fromCharCode(t))?s:s+";"}const jC=/\d/;function BC(e,t,n){const s="&#"+String(e);return n&&t&&!jC.test(String.fromCharCode(t))?s:s+";"}const GC=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Gl={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},VC=["cent","copy","divide","gt","lt","not","para","times"],Op={}.hasOwnProperty,Ri={};let Xr;for(Xr in Gl)Op.call(Gl,Xr)&&(Ri[Gl[Xr]]=Xr);const UC=/[^\dA-Za-z]/;function HC(e,t,n,s){const r=String.fromCharCode(e);if(Op.call(Ri,r)){const o=Ri[r],l="&"+o;return n&&GC.includes(o)&&!VC.includes(o)&&(!s||t&&t!==61&&UC.test(String.fromCharCode(t)))?l:l+";"}return""}function qC(e,t,n){let s=FC(e,t,n.omitOptionalSemicolons),r;if((n.useNamedReferences||n.useShortestReferences)&&(r=HC(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!r)&&n.useShortestReferences){const o=BC(e,t,n.omitOptionalSemicolons);o.length<s.length&&(s=o)}return r&&(!n.useShortestReferences||r.length<s.length)?r:s}function Is(e,t){return OC(e,Object.assign({format:qC},t))}const zC=/^>|^->|<!--|-->|--!>|<!-$/g,WC=[">"],KC=["<",">"];function XC(e,t,n,s){return s.settings.bogusComments?"<?"+Is(e.value,Object.assign({},s.settings.characterReferences,{subset:WC}))+">":"<!--"+e.value.replace(zC,r)+"-->";function r(o){return Is(o,Object.assign({},s.settings.characterReferences,{subset:KC}))}}function YC(e,t,n,s){return"<!"+(s.settings.upperDoctype?"DOCTYPE":"doctype")+(s.settings.tightDoctype?"":" ")+"html>"}function bu(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let s=0,r=n.indexOf(t);for(;r!==-1;)s++,r=n.indexOf(t,r+t.length);return s}function JC(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function QC(e){return e.join(" ").trim()}const ZC=/[ \t\n\f\r]/g;function va(e){return typeof e=="object"?e.type==="text"?wu(e.value):!1:wu(e)}function wu(e){return e.replace(ZC,"")===""}const ut=Mp(1),Lp=Mp(-1),eS=[];function Mp(e){return t;function t(n,s,r){const o=n?n.children:eS;let l=(s||0)+e,i=o[l];if(!r)for(;i&&va(i);)l+=e,i=o[l];return i}}const tS={}.hasOwnProperty;function Dp(e){return t;function t(n,s,r){return tS.call(e,n.tagName)&&e[n.tagName](n,s,r)}}const ya=Dp({body:sS,caption:Vl,colgroup:Vl,dd:iS,dt:lS,head:Vl,html:nS,li:oS,optgroup:aS,option:cS,p:rS,rp:Cu,rt:Cu,tbody:dS,td:Su,tfoot:fS,th:Su,thead:uS,tr:pS});function Vl(e,t,n){const s=ut(n,t,!0);return!s||s.type!=="comment"&&!(s.type==="text"&&va(s.value.charAt(0)))}function nS(e,t,n){const s=ut(n,t);return!s||s.type!=="comment"}function sS(e,t,n){const s=ut(n,t);return!s||s.type!=="comment"}function rS(e,t,n){const s=ut(n,t);return s?s.type==="element"&&(s.tagName==="address"||s.tagName==="article"||s.tagName==="aside"||s.tagName==="blockquote"||s.tagName==="details"||s.tagName==="div"||s.tagName==="dl"||s.tagName==="fieldset"||s.tagName==="figcaption"||s.tagName==="figure"||s.tagName==="footer"||s.tagName==="form"||s.tagName==="h1"||s.tagName==="h2"||s.tagName==="h3"||s.tagName==="h4"||s.tagName==="h5"||s.tagName==="h6"||s.tagName==="header"||s.tagName==="hgroup"||s.tagName==="hr"||s.tagName==="main"||s.tagName==="menu"||s.tagName==="nav"||s.tagName==="ol"||s.tagName==="p"||s.tagName==="pre"||s.tagName==="section"||s.tagName==="table"||s.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function oS(e,t,n){const s=ut(n,t);return!s||s.type==="element"&&s.tagName==="li"}function lS(e,t,n){const s=ut(n,t);return!!(s&&s.type==="element"&&(s.tagName==="dt"||s.tagName==="dd"))}function iS(e,t,n){const s=ut(n,t);return!s||s.type==="element"&&(s.tagName==="dt"||s.tagName==="dd")}function Cu(e,t,n){const s=ut(n,t);return!s||s.type==="element"&&(s.tagName==="rp"||s.tagName==="rt")}function aS(e,t,n){const s=ut(n,t);return!s||s.type==="element"&&s.tagName==="optgroup"}function cS(e,t,n){const s=ut(n,t);return!s||s.type==="element"&&(s.tagName==="option"||s.tagName==="optgroup")}function uS(e,t,n){const s=ut(n,t);return!!(s&&s.type==="element"&&(s.tagName==="tbody"||s.tagName==="tfoot"))}function dS(e,t,n){const s=ut(n,t);return!s||s.type==="element"&&(s.tagName==="tbody"||s.tagName==="tfoot")}function fS(e,t,n){return!ut(n,t)}function pS(e,t,n){const s=ut(n,t);return!s||s.type==="element"&&s.tagName==="tr"}function Su(e,t,n){const s=ut(n,t);return!s||s.type==="element"&&(s.tagName==="td"||s.tagName==="th")}const hS=Dp({body:vS,colgroup:yS,head:mS,html:gS,tbody:_S});function gS(e){const t=ut(e,-1);return!t||t.type!=="comment"}function mS(e){const t=new Set;for(const s of e.children)if(s.type==="element"&&(s.tagName==="base"||s.tagName==="title")){if(t.has(s.tagName))return!1;t.add(s.tagName)}const n=e.children[0];return!n||n.type==="element"}function vS(e){const t=ut(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&va(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function yS(e,t,n){const s=Lp(n,t),r=ut(e,-1,!0);return n&&s&&s.type==="element"&&s.tagName==="colgroup"&&ya(s,n.children.indexOf(s),n)?!1:!!(r&&r.type==="element"&&r.tagName==="col")}function _S(e,t,n){const s=Lp(n,t),r=ut(e,-1);return n&&s&&s.type==="element"&&(s.tagName==="thead"||s.tagName==="tbody")&&ya(s,n.children.indexOf(s),n)?!1:!!(r&&r.type==="element"&&r.tagName==="tr")}const Yr={name:[[`
|
|
30
|
+
\f\r &/=>`.split(""),`
|
|
31
|
+
\f\r "&'/=>\``.split("")],[`\0
|
|
32
|
+
\f\r "&'/<=>`.split(""),`\0
|
|
33
|
+
\f\r "&'/<=>\``.split("")]],unquoted:[[`
|
|
34
|
+
\f\r &>`.split(""),`\0
|
|
35
|
+
\f\r "&'<=>\``.split("")],[`\0
|
|
36
|
+
\f\r "&'<=>\``.split(""),`\0
|
|
37
|
+
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function bS(e,t,n,s){const r=s.schema,o=r.space==="svg"?!1:s.settings.omitOptionalTags;let l=r.space==="svg"?s.settings.closeEmptyElements:s.settings.voids.includes(e.tagName.toLowerCase());const i=[];let a;r.space==="html"&&e.tagName==="svg"&&(s.schema=Pp);const c=wS(s,e.properties),u=s.all(r.space==="html"&&e.tagName==="template"?e.content:e);return s.schema=r,u&&(l=!1),(c||!o||!hS(e,t,n))&&(i.push("<",e.tagName,c?" "+c:""),l&&(r.space==="svg"||s.settings.closeSelfClosing)&&(a=c.charAt(c.length-1),(!s.settings.tightSelfClosing||a==="/"||a&&a!=='"'&&a!=="'")&&i.push(" "),i.push("/")),i.push(">")),i.push(u),!l&&(!o||!ya(e,t,n))&&i.push("</"+e.tagName+">"),i.join("")}function wS(e,t){const n=[];let s=-1,r;if(t){for(r in t)if(t[r]!==null&&t[r]!==void 0){const o=CS(e,r,t[r]);o&&n.push(o)}}for(;++s<n.length;){const o=e.settings.tightAttributes?n[s].charAt(n[s].length-1):void 0;s!==n.length-1&&o!=='"'&&o!=="'"&&(n[s]+=" ")}return n.join("")}function CS(e,t,n){const s=xC(e.schema,t),r=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,o=e.settings.allowDangerousCharacters?0:1;let l=e.quote,i;if(s.overloadedBoolean&&(n===s.attribute||n==="")?n=!0:(s.boolean||s.overloadedBoolean)&&(typeof n!="string"||n===s.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const a=Is(s.attribute,Object.assign({},e.settings.characterReferences,{subset:Yr.name[r][o]}));return n===!0||(n=Array.isArray(n)?(s.commaSeparated?JC:QC)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?a:(e.settings.preferUnquoted&&(i=Is(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:Yr.unquoted[r][o]}))),i!==n&&(e.settings.quoteSmart&&bu(n,l)>bu(n,e.alternative)&&(l=e.alternative),i=l+Is(n,Object.assign({},e.settings.characterReferences,{subset:(l==="'"?Yr.single:Yr.double)[r][o],attribute:!0}))+l),a+(i&&"="+i))}const SS=["<","&"];function Fp(e,t,n,s){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:Is(e.value,Object.assign({},s.settings.characterReferences,{subset:SS}))}function kS(e,t,n,s){return s.settings.allowDangerousHtml?e.value:Fp(e,t,n,s)}function xS(e,t,n,s){return s.all(e)}const $S=IC("type",{invalid:ES,unknown:AS,handlers:{comment:XC,doctype:YC,element:bS,raw:kS,root:xS,text:Fp}});function ES(e){throw new Error("Expected node, not `"+e+"`")}function AS(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const IS={},RS={},TS=[];function NS(e,t){const n=t||IS,s=n.quote||'"',r=s==='"'?"'":'"';if(s!=='"'&&s!=="'")throw new Error("Invalid quote `"+s+"`, expected `'` or `\"`");return{one:PS,all:OS,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||_C,characterReferences:n.characterReferences||RS,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?Pp:AC,quote:s,alternative:r}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function PS(e,t,n){return $S(e,t,n,this)}function OS(e){const t=[],n=e&&e.children||TS;let s=-1;for(;++s<n.length;)t[s]=this.one(n[s],s,e);return t.join("")}function Ro(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},s=typeof e=="string"?e:e.name;for(const[r,o]of Object.entries((t==null?void 0:t.colorReplacements)||{}))typeof o=="string"?n[r]=o:r===s&&Object.assign(n,o);return n}function Bn(e,t){return e&&((t==null?void 0:t[e==null?void 0:e.toLowerCase()])||e)}function LS(e){return Array.isArray(e)?e:[e]}async function jp(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function _a(e){return!e||["plaintext","txt","text","plain"].includes(e)}function MS(e){return e==="ansi"||_a(e)}function ba(e){return e==="none"}function DS(e){return ba(e)}function Bp(e,t){var s;if(!t)return e;e.properties||(e.properties={}),(s=e.properties).class||(s.class=[]),typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);const n=Array.isArray(t)?t:t.split(/\s+/g);for(const r of n)r&&!e.properties.class.includes(r)&&e.properties.class.push(r);return e}function il(e,t=!1){var o;if(e.length===0)return[["",0]];const n=e.split(/(\r?\n)/g);let s=0;const r=[];for(let l=0;l<n.length;l+=2){const i=t?n[l]+(n[l+1]||""):n[l];r.push([i,s]),s+=n[l].length,s+=((o=n[l+1])==null?void 0:o.length)||0}return r}function FS(e){const t=il(e,!0).map(([r])=>r);function n(r){if(r===e.length)return{line:t.length-1,character:t[t.length-1].length};let o=r,l=0;for(const i of t){if(o<i.length)break;o-=i.length,l++}return{line:l,character:o}}function s(r,o){let l=0;for(let i=0;i<r;i++)l+=t[i].length;return l+=o,l}return{lines:t,indexToPos:n,posToIndex:s}}const wa="light-dark()",jS=["color","background-color"];function BS(e,t){let n=0;const s=[];for(const r of t)r>n&&s.push({...e,content:e.content.slice(n,r),offset:e.offset+n}),n=r;return n<e.content.length&&s.push({...e,content:e.content.slice(n),offset:e.offset+n}),s}function GS(e,t){const n=Array.from(t instanceof Set?t:new Set(t)).sort((s,r)=>s-r);return n.length?e.map(s=>s.flatMap(r=>{const o=n.filter(l=>r.offset<l&&l<r.offset+r.content.length).map(l=>l-r.offset).sort((l,i)=>l-i);return o.length?BS(r,o):r})):e}function VS(e,t,n,s,r="css-vars"){const o={content:e.content,explanation:e.explanation,offset:e.offset},l=t.map(u=>To(e.variants[u])),i=new Set(l.flatMap(u=>Object.keys(u))),a={},c=(u,d)=>{const f=d==="color"?"":d==="background-color"?"-bg":`-${d}`;return n+t[u]+(d==="color"?"":f)};return l.forEach((u,d)=>{for(const f of i){const p=u[f]||"inherit";if(d===0&&s&&jS.includes(f))if(s===wa&&l.length>1){const h=t.findIndex(k=>k==="light"),v=t.findIndex(k=>k==="dark");if(h===-1||v===-1)throw new dt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const _=l[h][f]||"inherit",y=l[v][f]||"inherit";a[f]=`light-dark(${_}, ${y})`,r==="css-vars"&&(a[c(d,f)]=p)}else a[f]=p;else r==="css-vars"&&(a[c(d,f)]=p)}}),o.htmlStyle=a,o}function To(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&bt.Italic&&(t["font-style"]="italic"),e.fontStyle&bt.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&bt.Underline&&n.push("underline"),e.fontStyle&bt.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function Ti(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}const Gp=new WeakMap;function al(e,t){Gp.set(e,t)}function Ar(e){return Gp.get(e)}class Vs{constructor(...t){q(this,"_stacks",{});q(this,"lang");if(t.length===2){const[n,s]=t;this.lang=s,this._stacks=n}else{const[n,s,r]=t;this.lang=s,this._stacks={[r]:n}}}get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new Vs(Object.fromEntries(LS(n).map(s=>[s,$i])),t)}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return US(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function US(e){const t=[],n=new Set;function s(r){var l;if(n.has(r))return;n.add(r);const o=(l=r==null?void 0:r.nameScopesList)==null?void 0:l.scopeName;o&&t.push(o),r.parent&&s(r.parent)}return s(e),t}function HS(e,t){if(!(e instanceof Vs))throw new dt("Invalid grammar state");return e.getInternalStack(t)}function qS(){const e=new WeakMap;function t(n){if(!e.has(n.meta)){let s=function(l){if(typeof l=="number"){if(l<0||l>n.source.length)throw new dt(`Invalid decoration offset: ${l}. Code length: ${n.source.length}`);return{...r.indexToPos(l),offset:l}}else{const i=r.lines[l.line];if(i===void 0)throw new dt(`Invalid decoration position ${JSON.stringify(l)}. Lines length: ${r.lines.length}`);let a=l.character;if(a<0&&(a=i.length+a),a<0||a>i.length)throw new dt(`Invalid decoration position ${JSON.stringify(l)}. Line ${l.line} length: ${i.length}`);return{...l,character:a,offset:r.posToIndex(l.line,a)}}};const r=FS(n.source),o=(n.options.decorations||[]).map(l=>({...l,start:s(l.start),end:s(l.end)}));zS(o),e.set(n.meta,{decorations:o,converter:r,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){var l;if(!((l=this.options.decorations)!=null&&l.length))return;const r=t(this).decorations.flatMap(i=>[i.start.offset,i.end.offset]);return GS(n,r)},code(n){var u;if(!((u=this.options.decorations)!=null&&u.length))return;const s=t(this),r=Array.from(n.children).filter(d=>d.type==="element"&&d.tagName==="span");if(r.length!==s.converter.lines.length)throw new dt(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${s.converter.lines.length}). Failed to apply decorations.`);function o(d,f,p,h){const v=r[d];let _="",y=-1,k=-1;if(f===0&&(y=0),p===0&&(k=0),p===Number.POSITIVE_INFINITY&&(k=v.children.length),y===-1||k===-1)for(let R=0;R<v.children.length;R++)_+=Vp(v.children[R]),y===-1&&_.length===f&&(y=R+1),k===-1&&_.length===p&&(k=R+1);if(y===-1)throw new dt(`Failed to find start index for decoration ${JSON.stringify(h.start)}`);if(k===-1)throw new dt(`Failed to find end index for decoration ${JSON.stringify(h.end)}`);const C=v.children.slice(y,k);if(!h.alwaysWrap&&C.length===v.children.length)i(v,h,"line");else if(!h.alwaysWrap&&C.length===1&&C[0].type==="element")i(C[0],h,"token");else{const R={type:"element",tagName:"span",properties:{},children:C};i(R,h,"wrapper"),v.children.splice(y,C.length,R)}}function l(d,f){r[d]=i(r[d],f,"line")}function i(d,f,p){var _;const h=f.properties||{},v=f.transform||(y=>y);return d.tagName=f.tagName||"span",d.properties={...d.properties,...h,class:d.properties.class},(_=f.properties)!=null&&_.class&&Bp(d,f.properties.class),d=v(d,p)||d,d}const a=[],c=s.decorations.sort((d,f)=>f.start.offset-d.start.offset||d.end.offset-f.end.offset);for(const d of c){const{start:f,end:p}=d;if(f.line===p.line)o(f.line,f.character,p.character,d);else if(f.line<p.line){o(f.line,f.character,Number.POSITIVE_INFINITY,d);for(let h=f.line+1;h<p.line;h++)a.unshift(()=>l(h,d));o(p.line,0,p.character,d)}}a.forEach(d=>d())}}}function zS(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new dt(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let s=t+1;s<e.length;s++){const r=e[s],o=n.start.offset<=r.start.offset&&r.start.offset<n.end.offset,l=n.start.offset<r.end.offset&&r.end.offset<=n.end.offset,i=r.start.offset<=n.start.offset&&n.start.offset<r.end.offset,a=r.start.offset<n.end.offset&&n.end.offset<=r.end.offset;if(o||l||i||a){if(o&&l||i&&a||i&&n.start.offset===n.end.offset||l&&r.start.offset===r.end.offset)continue;throw new dt(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(r.start)} intersect.`)}}}}function Vp(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(Vp).join(""):""}const WS=[qS()];function No(e){const t=KS(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...WS]}function KS(e){const t=[],n=[],s=[];for(const r of e)switch(r.enforce){case"pre":t.push(r);break;case"post":n.push(r);break;default:s.push(r)}return{pre:t,post:n,normal:s}}var es=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Ul={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function XS(e,t){const n=e.indexOf("\x1B",t);if(n!==-1&&e[n+1]==="["){const s=e.indexOf("m",n);if(s!==-1)return{sequence:e.substring(n+2,s).split(";"),startPosition:n,position:s+1}}return{position:e.length}}function ku(e){const t=e.shift();if(t==="2"){const n=e.splice(0,3).map(s=>Number.parseInt(s));return n.length!==3||n.some(s=>Number.isNaN(s))?void 0:{type:"rgb",rgb:n}}else if(t==="5"){const n=e.shift();if(n)return{type:"table",index:Number(n)}}}function YS(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const s=Number.parseInt(n);if(!Number.isNaN(s))if(s===0)t.push({type:"resetAll"});else if(s<=9)Ul[s]&&t.push({type:"setDecoration",value:Ul[s]});else if(s<=29){const r=Ul[s-20];r&&(t.push({type:"resetDecoration",value:r}),r==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(s<=37)t.push({type:"setForegroundColor",value:{type:"named",name:es[s-30]}});else if(s===38){const r=ku(e);r&&t.push({type:"setForegroundColor",value:r})}else if(s===39)t.push({type:"resetForegroundColor"});else if(s<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:es[s-40]}});else if(s===48){const r=ku(e);r&&t.push({type:"setBackgroundColor",value:r})}else s===49?t.push({type:"resetBackgroundColor"}):s===53?t.push({type:"setDecoration",value:"overline"}):s===55?t.push({type:"resetDecoration",value:"overline"}):s>=90&&s<=97?t.push({type:"setForegroundColor",value:{type:"named",name:es[s-90+8]}}):s>=100&&s<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:es[s-100+8]}})}return t}function JS(){let e=null,t=null,n=new Set;return{parse(s){const r=[];let o=0;do{const l=XS(s,o),i=l.sequence?s.substring(o,l.startPosition):s.substring(o);if(i.length>0&&r.push({value:i,foreground:e,background:t,decorations:new Set(n)}),l.sequence){const a=YS(l.sequence);for(const c of a)c.type==="resetAll"?(e=null,t=null,n.clear()):c.type==="resetForegroundColor"?e=null:c.type==="resetBackgroundColor"?t=null:c.type==="resetDecoration"&&n.delete(c.value);for(const c of a)c.type==="setForegroundColor"?e=c.value:c.type==="setBackgroundColor"?t=c.value:c.type==="setDecoration"&&n.add(c.value)}o=l.position}while(o<s.length);return r}}}var QS={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function ZS(e=QS){function t(i){return e[i]}function n(i){return`#${i.map(a=>Math.max(0,Math.min(a,255)).toString(16).padStart(2,"0")).join("")}`}let s;function r(){if(s)return s;s=[];for(let c=0;c<es.length;c++)s.push(t(es[c]));let i=[0,95,135,175,215,255];for(let c=0;c<6;c++)for(let u=0;u<6;u++)for(let d=0;d<6;d++)s.push(n([i[c],i[u],i[d]]));let a=8;for(let c=0;c<24;c++,a+=10)s.push(n([a,a,a]));return s}function o(i){return r()[i]}function l(i){switch(i.type){case"named":return t(i.name);case"rgb":return n(i.rgb);case"table":return o(i.index)}}return{value:l}}const ek={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function tk(e,t,n){const s=Ro(e,n),r=il(t),o=Object.fromEntries(es.map(a=>{var d;const c=`terminal.ansi${a[0].toUpperCase()}${a.substring(1)}`,u=(d=e.colors)==null?void 0:d[c];return[a,u||ek[a]]})),l=ZS(o),i=JS();return r.map(a=>i.parse(a[0]).map(c=>{let u,d;c.decorations.has("reverse")?(u=c.background?l.value(c.background):e.bg,d=c.foreground?l.value(c.foreground):e.fg):(u=c.foreground?l.value(c.foreground):e.fg,d=c.background?l.value(c.background):void 0),u=Bn(u,s),d=Bn(d,s),c.decorations.has("dim")&&(u=nk(u));let f=bt.None;return c.decorations.has("bold")&&(f|=bt.Bold),c.decorations.has("italic")&&(f|=bt.Italic),c.decorations.has("underline")&&(f|=bt.Underline),c.decorations.has("strikethrough")&&(f|=bt.Strikethrough),{content:c.value,offset:a[1],color:u,bgColor:d,fontStyle:f}}))}function nk(e){const t=e.match(/#([0-9a-f]{3,8})/i);if(t){const s=t[1];if(s.length===8){const r=Math.round(Number.parseInt(s.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${s.slice(0,6)}${r}`}else{if(s.length===6)return`#${s}80`;if(s.length===4){const r=s[0],o=s[1],l=s[2],i=s[3],a=Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,"0");return`#${r}${r}${o}${o}${l}${l}${a}`}else if(s.length===3){const r=s[0],o=s[1],l=s[2];return`#${r}${r}${o}${o}${l}${l}80`}}}const n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function Ca(e,t,n={}){const{theme:s=e.getLoadedThemes()[0]}=n,r=e.resolveLangAlias(n.lang||"text");if(_a(r)||ba(s))return il(t).map(a=>[{content:a[0],offset:a[1]}]);const{theme:o,colorMap:l}=e.setTheme(s);if(r==="ansi")return tk(o,t,n);const i=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==i.name)throw new dt(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${i.name}"`);if(!n.grammarState.themes.includes(o.name))throw new dt(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${o.name}"`)}return rk(t,i,o,l,n)}function sk(...e){if(e.length===2)return Ar(e[1]);const[t,n,s={}]=e,{lang:r="text",theme:o=t.getLoadedThemes()[0]}=s;if(_a(r)||ba(o))throw new dt("Plain language does not have grammar state");if(r==="ansi")throw new dt("ANSI language does not have grammar state");const{theme:l,colorMap:i}=t.setTheme(o),a=t.getLanguage(r);return new Vs(Sa(n,a,l,i,s).stateStack,a.name,l.name)}function rk(e,t,n,s,r){const o=Sa(e,t,n,s,r),l=new Vs(o.stateStack,t.name,n.name);return al(o.tokens,l),o.tokens}function Sa(e,t,n,s,r){const o=Ro(n,r),{tokenizeMaxLineLength:l=0,tokenizeTimeLimit:i=500}=r,a=il(e);let c=r.grammarState?HS(r.grammarState,n.name)??$i:r.grammarContextCode!=null?Sa(r.grammarContextCode,t,n,s,{...r,grammarState:void 0,grammarContextCode:void 0}).stateStack:$i,u=[];const d=[];for(let f=0,p=a.length;f<p;f++){const[h,v]=a[f];if(h===""){u=[],d.push([]);continue}if(l>0&&h.length>=l){u=[],d.push([{content:h,offset:v,color:"",fontStyle:0}]);continue}let _,y,k;r.includeExplanation&&(_=t.tokenizeLine(h,c,i),y=_.tokens,k=0);const C=t.tokenizeLine2(h,c,i),R=C.tokens.length/2;for(let j=0;j<R;j++){const O=C.tokens[2*j],L=j+1<R?C.tokens[2*j+2]:h.length;if(O===L)continue;const U=C.tokens[2*j+1],P=Bn(s[Fs.getForeground(U)],o),D=Fs.getFontStyle(U),Y={content:h.substring(O,L),offset:v+O,color:P,fontStyle:D};if(r.includeExplanation){const x=[];if(r.includeExplanation!=="scopeName")for(const V of n.settings){let fe;switch(typeof V.scope){case"string":fe=V.scope.split(/,/).map(me=>me.trim());break;case"object":fe=V.scope;break;default:continue}x.push({settings:V,selectors:fe.map(me=>me.split(/ /))})}Y.explanation=[];let M=0;for(;O+M<L;){const V=y[k],fe=h.substring(V.startIndex,V.endIndex);M+=fe.length,Y.explanation.push({content:fe,scopes:r.includeExplanation==="scopeName"?ok(V.scopes):lk(x,V.scopes)}),k+=1}}u.push(Y)}d.push(u),u=[],c=C.ruleStack}return{tokens:d,stateStack:c}}function ok(e){return e.map(t=>({scopeName:t}))}function lk(e,t){const n=[];for(let s=0,r=t.length;s<r;s++){const o=t[s];n[s]={scopeName:o,themeMatches:ak(e,o,t.slice(0,s))}}return n}function xu(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function ik(e,t,n){if(!xu(e[e.length-1],t))return!1;let s=e.length-2,r=n.length-1;for(;s>=0&&r>=0;)xu(e[s],n[r])&&(s-=1),r-=1;return s===-1}function ak(e,t,n){const s=[];for(const{selectors:r,settings:o}of e)for(const l of r)if(ik(l,t,n)){s.push(o);break}return s}function Up(e,t,n){const s=Object.entries(n.themes).filter(a=>a[1]).map(a=>({color:a[0],theme:a[1]})),r=s.map(a=>{const c=Ca(e,t,{...n,theme:a.theme}),u=Ar(c),d=typeof a.theme=="string"?a.theme:a.theme.name;return{tokens:c,state:u,theme:d}}),o=ck(...r.map(a=>a.tokens)),l=o[0].map((a,c)=>a.map((u,d)=>{const f={content:u.content,variants:{},offset:u.offset};return"includeExplanation"in n&&n.includeExplanation&&(f.explanation=u.explanation),o.forEach((p,h)=>{const{content:v,explanation:_,offset:y,...k}=p[c][d];f.variants[s[h].color]=k}),f})),i=r[0].state?new Vs(Object.fromEntries(r.map(a=>{var c;return[a.theme,(c=a.state)==null?void 0:c.getInternalStack(a.theme)]})),r[0].state.lang):void 0;return i&&al(l,i),l}function ck(...e){const t=e.map(()=>[]),n=e.length;for(let s=0;s<e[0].length;s++){const r=e.map(a=>a[s]),o=t.map(()=>[]);t.forEach((a,c)=>a.push(o[c]));const l=r.map(()=>0),i=r.map(a=>a[0]);for(;i.every(a=>a);){const a=Math.min(...i.map(c=>c.content.length));for(let c=0;c<n;c++){const u=i[c];u.content.length===a?(o[c].push(u),l[c]+=1,i[c]=r[c][l[c]]):(o[c].push({...u,content:u.content.slice(0,a)}),i[c]={...u,content:u.content.slice(a),offset:u.offset+a})}}}return t}function Po(e,t,n){let s,r,o,l,i,a;if("themes"in n){const{defaultColor:c="light",cssVariablePrefix:u="--shiki-",colorsRendering:d="css-vars"}=n,f=Object.entries(n.themes).filter(y=>y[1]).map(y=>({color:y[0],theme:y[1]})).sort((y,k)=>y.color===c?-1:k.color===c?1:0);if(f.length===0)throw new dt("`themes` option must not be empty");const p=Up(e,t,n);if(a=Ar(p),c&&wa!==c&&!f.find(y=>y.color===c))throw new dt(`\`themes\` option must contain the defaultColor key \`${c}\``);const h=f.map(y=>e.getTheme(y.theme)),v=f.map(y=>y.color);o=p.map(y=>y.map(k=>VS(k,v,u,c,d))),a&&al(o,a);const _=f.map(y=>Ro(y.theme,n));r=$u(f,h,_,u,c,"fg",d),s=$u(f,h,_,u,c,"bg",d),l=`shiki-themes ${h.map(y=>y.name).join(" ")}`,i=c?void 0:[r,s].join(";")}else if("theme"in n){const c=Ro(n.theme,n);o=Ca(e,t,n);const u=e.getTheme(n.theme);s=Bn(u.bg,c),r=Bn(u.fg,c),l=u.name,a=Ar(o)}else throw new dt("Invalid options, either `theme` or `themes` must be provided");return{tokens:o,fg:r,bg:s,themeName:l,rootStyle:i,grammarState:a}}function $u(e,t,n,s,r,o,l){return e.map((i,a)=>{const c=Bn(t[a][o],n[a])||"inherit",u=`${s+i.color}${o==="bg"?"-bg":""}:${c}`;if(a===0&&r){if(r===wa&&e.length>1){const d=e.findIndex(v=>v.color==="light"),f=e.findIndex(v=>v.color==="dark");if(d===-1||f===-1)throw new dt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const p=Bn(t[d][o],n[d])||"inherit",h=Bn(t[f][o],n[f])||"inherit";return`light-dark(${p}, ${h});${u}`}return c}return l==="css-vars"?u:null}).filter(i=>!!i).join(";")}function Oo(e,t,n,s={meta:{},options:n,codeToHast:(r,o)=>Oo(e,r,o),codeToTokens:(r,o)=>Po(e,r,o)}){var h,v;let r=t;for(const _ of No(n))r=((h=_.preprocess)==null?void 0:h.call(s,r,n))||r;let{tokens:o,fg:l,bg:i,themeName:a,rootStyle:c,grammarState:u}=Po(e,r,n);const{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?o=dk(o):d==="never"&&(o=fk(o)),f&&(o=pk(o));const p={...s,get source(){return r}};for(const _ of No(n))o=((v=_.tokens)==null?void 0:v.call(p,o))||o;return uk(o,{...n,fg:l,bg:i,themeName:a,rootStyle:n.rootStyle===!1?!1:n.rootStyle??c},p,u)}function uk(e,t,n,s=Ar(e)){var v,_,y,k;const r=No(t),o=[],l={type:"root",children:[]},{structure:i="classic",tabindex:a="0"}=t,c={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?c.style=t.rootStyle:c.style=`background-color:${t.bg};color:${t.fg}`),a!==!1&&a!=null&&(c.tabindex=a.toString());for(const[C,R]of Object.entries(t.meta||{}))C.startsWith("_")||(c[C]=R);let u={type:"element",tagName:"pre",properties:c,children:[],data:t.data},d={type:"element",tagName:"code",properties:{},children:o};const f=[],p={...n,structure:i,addClassToHast:Bp,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return l},get pre(){return u},get code(){return d},get lines(){return f}};if(e.forEach((C,R)=>{var L,U;R&&(i==="inline"?l.children.push({type:"element",tagName:"br",properties:{},children:[]}):i==="classic"&&o.push({type:"text",value:`
|
|
38
|
+
`}));let j={type:"element",tagName:"span",properties:{class:"line"},children:[]},O=0;for(const P of C){let D={type:"element",tagName:"span",properties:{...P.htmlAttrs},children:[{type:"text",value:P.content}]};const Y=Ti(P.htmlStyle||To(P));Y&&(D.properties.style=Y);for(const x of r)D=((L=x==null?void 0:x.span)==null?void 0:L.call(p,D,R+1,O,j,P))||D;i==="inline"?l.children.push(D):i==="classic"&&j.children.push(D),O+=P.content.length}if(i==="classic"){for(const P of r)j=((U=P==null?void 0:P.line)==null?void 0:U.call(p,j,R+1))||j;f.push(j),o.push(j)}else i==="inline"&&f.push(j)}),i==="classic"){for(const C of r)d=((v=C==null?void 0:C.code)==null?void 0:v.call(p,d))||d;u.children.push(d);for(const C of r)u=((_=C==null?void 0:C.pre)==null?void 0:_.call(p,u))||u;l.children.push(u)}else if(i==="inline"){const C=[];let R={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const L of l.children)L.type==="element"&&L.tagName==="br"?(C.push(R),R={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(L.type==="element"||L.type==="text")&&R.children.push(L);C.push(R);let O={type:"element",tagName:"code",properties:{},children:C};for(const L of r)O=((y=L==null?void 0:L.code)==null?void 0:y.call(p,O))||O;l.children=[];for(let L=0;L<O.children.length;L++){L>0&&l.children.push({type:"element",tagName:"br",properties:{},children:[]});const U=O.children[L];U.type==="element"&&l.children.push(...U.children)}}let h=l;for(const C of r)h=((k=C==null?void 0:C.root)==null?void 0:k.call(p,h))||h;return s&&al(h,s),h}function dk(e){return e.map(t=>{const n=[];let s="",r;return t.forEach((o,l)=>{const a=!(o.fontStyle&&(o.fontStyle&bt.Underline||o.fontStyle&bt.Strikethrough));a&&o.content.match(/^\s+$/)&&t[l+1]?(r===void 0&&(r=o.offset),s+=o.content):s?(a?n.push({...o,offset:r,content:s+o.content}):n.push({content:s,offset:r},o),r=void 0,s=""):n.push(o)}),n})}function fk(e){return e.map(t=>t.flatMap(n=>{if(n.content.match(/^\s+$/))return n;const s=n.content.match(/^(\s*)(.*?)(\s*)$/);if(!s)return n;const[,r,o,l]=s;if(!r&&!l)return n;const i=[{...n,offset:n.offset+r.length,content:o}];return r&&i.unshift({content:r,offset:n.offset}),l&&i.push({content:l,offset:n.offset+r.length+o.length}),i}))}function pk(e){return e.map(t=>{const n=[];for(const s of t){if(n.length===0){n.push({...s});continue}const r=n[n.length-1],o=Ti(r.htmlStyle||To(r)),l=Ti(s.htmlStyle||To(s)),i=r.fontStyle&&(r.fontStyle&bt.Underline||r.fontStyle&bt.Strikethrough),a=s.fontStyle&&(s.fontStyle&bt.Underline||s.fontStyle&bt.Strikethrough);!i&&!a&&o===l?r.content+=s.content:n.push({...s})}return n})}const hk=NS;function gk(e,t,n){var o;const s={meta:{},options:n,codeToHast:(l,i)=>Oo(e,l,i),codeToTokens:(l,i)=>Po(e,l,i)};let r=hk(Oo(e,t,n,s));for(const l of No(n))r=((o=l.postprocess)==null?void 0:o.call(s,r,n))||r;return r}const Eu={light:"#333333",dark:"#bbbbbb"},Au={light:"#fffffe",dark:"#1e1e1e"},Iu="__shiki_resolved";function ka(e){var i,a,c,u,d;if(e!=null&&e[Iu])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||(t.type="dark"),t.colorReplacements={...t.colorReplacements},t.settings||(t.settings=[]);let{bg:n,fg:s}=t;if(!n||!s){const f=t.settings?t.settings.find(p=>!p.name&&!p.scope):void 0;(i=f==null?void 0:f.settings)!=null&&i.foreground&&(s=f.settings.foreground),(a=f==null?void 0:f.settings)!=null&&a.background&&(n=f.settings.background),!s&&((c=t==null?void 0:t.colors)!=null&&c["editor.foreground"])&&(s=t.colors["editor.foreground"]),!n&&((u=t==null?void 0:t.colors)!=null&&u["editor.background"])&&(n=t.colors["editor.background"]),s||(s=t.type==="light"?Eu.light:Eu.dark),n||(n=t.type==="light"?Au.light:Au.dark),t.fg=s,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let r=0;const o=new Map;function l(f){var h;if(o.has(f))return o.get(f);r+=1;const p=`#${r.toString(16).padStart(8,"0").toLowerCase()}`;return(h=t.colorReplacements)!=null&&h[`#${p}`]?l(f):(o.set(f,p),p)}t.settings=t.settings.map(f=>{var _,y;const p=((_=f.settings)==null?void 0:_.foreground)&&!f.settings.foreground.startsWith("#"),h=((y=f.settings)==null?void 0:y.background)&&!f.settings.background.startsWith("#");if(!p&&!h)return f;const v={...f,settings:{...f.settings}};if(p){const k=l(f.settings.foreground);t.colorReplacements[k]=f.settings.foreground,v.settings.foreground=k}if(h){const k=l(f.settings.background);t.colorReplacements[k]=f.settings.background,v.settings.background=k}return v});for(const f of Object.keys(t.colors||{}))if((f==="editor.foreground"||f==="editor.background"||f.startsWith("terminal.ansi"))&&!((d=t.colors[f])!=null&&d.startsWith("#"))){const p=l(t.colors[f]);t.colorReplacements[p]=t.colors[f],t.colors[f]=p}return Object.defineProperty(t,Iu,{enumerable:!1,writable:!1,value:!0}),t}async function Hp(e){return Array.from(new Set((await Promise.all(e.filter(t=>!MS(t)).map(async t=>await jp(t).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function qp(e){return(await Promise.all(e.map(async n=>DS(n)?null:ka(await jp(n))))).filter(n=>!!n)}let mk=3;function vk(e,t=3){t>mk||console.trace(`[SHIKI DEPRECATE]: ${e}`)}class _s extends Error{constructor(t){super(t),this.name="ShikiError"}}function zp(e,t){if(!t)return e;if(t[e]){const n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new _s(`Circular alias \`${Array.from(n).join(" -> ")} -> ${e}\``);n.add(e)}}return e}class yk extends yC{constructor(n,s,r,o={}){super(n);q(this,"_resolvedThemes",new Map);q(this,"_resolvedGrammars",new Map);q(this,"_langMap",new Map);q(this,"_langGraph",new Map);q(this,"_textmateThemeCache",new WeakMap);q(this,"_loadedThemesCache",null);q(this,"_loadedLanguagesCache",null);this._resolver=n,this._themes=s,this._langs=r,this._alias=o,this._themes.map(l=>this.loadTheme(l)),this.loadLanguages(this._langs)}getTheme(n){return typeof n=="string"?this._resolvedThemes.get(n):this.loadTheme(n)}loadTheme(n){const s=ka(n);return s.name&&(this._resolvedThemes.set(s.name,s),this._loadedThemesCache=null),s}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(n){let s=this._textmateThemeCache.get(n);s||(s=xo.createFromRawTheme(n),this._textmateThemeCache.set(n,s)),this._syncRegistry.setTheme(s)}getGrammar(n){return n=zp(n,this._alias),this._resolvedGrammars.get(n)}loadLanguage(n){var l,i,a,c;if(this.getGrammar(n.name))return;const s=new Set([...this._langMap.values()].filter(u=>{var d;return(d=u.embeddedLangsLazy)==null?void 0:d.includes(n.name)}));this._resolver.addLanguage(n);const r={balancedBracketSelectors:n.balancedBracketSelectors||["*"],unbalancedBracketSelectors:n.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(n.scopeName,n);const o=this.loadGrammarWithConfiguration(n.scopeName,1,r);if(o.name=n.name,this._resolvedGrammars.set(n.name,o),n.aliases&&n.aliases.forEach(u=>{this._alias[u]=n.name}),this._loadedLanguagesCache=null,s.size)for(const u of s)this._resolvedGrammars.delete(u.name),this._loadedLanguagesCache=null,(i=(l=this._syncRegistry)==null?void 0:l._injectionGrammars)==null||i.delete(u.scopeName),(c=(a=this._syncRegistry)==null?void 0:a._grammars)==null||c.delete(u.scopeName),this.loadLanguage(this._langMap.get(u.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(n){for(const o of n)this.resolveEmbeddedLanguages(o);const s=Array.from(this._langGraph.entries()),r=s.filter(([o,l])=>!l);if(r.length){const o=s.filter(([l,i])=>{if(!i)return!1;const a=i.embeddedLanguages||i.embeddedLangs;return a==null?void 0:a.some(c=>r.map(([u])=>u).includes(c))}).filter(l=>!r.includes(l));throw new _s(`Missing languages ${r.map(([l])=>`\`${l}\``).join(", ")}, required by ${o.map(([l])=>`\`${l}\``).join(", ")}`)}for(const[o,l]of s)this._resolver.addLanguage(l);for(const[o,l]of s)this.loadLanguage(l)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(n){this._langMap.set(n.name,n),this._langGraph.set(n.name,n);const s=n.embeddedLanguages??n.embeddedLangs;if(s)for(const r of s)this._langGraph.set(r,this._langMap.get(r))}}class _k{constructor(t,n){q(this,"_langs",new Map);q(this,"_scopeToLang",new Map);q(this,"_injections",new Map);q(this,"_onigLib");this._onigLib={createOnigScanner:s=>t.createScanner(s),createOnigString:s=>t.createString(s)},n.forEach(s=>this.addLanguage(s))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(n=>{this._langs.set(n,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(n=>{this._injections.get(n)||this._injections.set(n,[]),this._injections.get(n).push(t.scopeName)})}getInjections(t){const n=t.split(".");let s=[];for(let r=1;r<=n.length;r++){const o=n.slice(0,r).join(".");s=[...s,...this._injections.get(o)||[]]}return s}}let Qs=0;function bk(e){Qs+=1,e.warnings!==!1&&Qs>=10&&Qs%10===0&&console.warn(`[Shiki] ${Qs} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new _s("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),s=(e.themes||[]).flat(1).map(ka),r=new _k(e.engine,n),o=new yk(r,s,n,e.langAlias);let l;function i(C){return zp(C,e.langAlias)}function a(C){y();const R=o.getGrammar(typeof C=="string"?C:C.name);if(!R)throw new _s(`Language \`${C}\` not found, you may need to load it first`);return R}function c(C){if(C==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};y();const R=o.getTheme(C);if(!R)throw new _s(`Theme \`${C}\` not found, you may need to load it first`);return R}function u(C){y();const R=c(C);l!==C&&(o.setTheme(R),l=C);const j=o.getColorMap();return{theme:R,colorMap:j}}function d(){return y(),o.getLoadedThemes()}function f(){return y(),o.getLoadedLanguages()}function p(...C){y(),o.loadLanguages(C.flat(1))}async function h(...C){return p(await Hp(C))}function v(...C){y();for(const R of C.flat(1))o.loadTheme(R)}async function _(...C){return y(),v(await qp(C))}function y(){if(t)throw new _s("Shiki instance has been disposed")}function k(){t||(t=!0,o.dispose(),Qs-=1)}return{setTheme:u,getTheme:c,getLanguage:a,getLoadedThemes:d,getLoadedLanguages:f,resolveLangAlias:i,loadLanguage:h,loadLanguageSync:p,loadTheme:_,loadThemeSync:v,dispose:k,[Symbol.dispose]:k}}async function wk(e){e.engine||vk("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,s]=await Promise.all([qp(e.themes||[]),Hp(e.langs||[]),e.engine]);return bk({...e,themes:t,langs:n,engine:s})}async function Ck(e){const t=await wk(e);return{getLastGrammarState:(...n)=>sk(t,...n),codeToTokensBase:(n,s)=>Ca(t,n,s),codeToTokensWithThemes:(n,s)=>Up(t,n,s),codeToTokens:(n,s)=>Po(t,n,s),codeToHast:(n,s)=>Oo(t,n,s),codeToHtml:(n,s)=>gk(t,n,s),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function Us(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function Sk(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}const xa=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),ft=String.raw;function Hs(e,t){if(e==null)throw new Error(t??"Value expected");return e}const Wp=ft`\[\^?`,Kp=`c.? | C(?:-.?)?|${ft`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${ft`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${ft`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${ft`o\{[^\}]*\}?`}|${ft`\d{1,3}`}`,$a=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,Jr=new RegExp(ft`
|
|
39
|
+
\\ (?:
|
|
40
|
+
${Kp}
|
|
41
|
+
| [gk]<[^>]*>?
|
|
42
|
+
| [gk]'[^']*'?
|
|
43
|
+
| .
|
|
44
|
+
)
|
|
45
|
+
| \( (?:
|
|
46
|
+
\? (?:
|
|
47
|
+
[:=!>({]
|
|
48
|
+
| <[=!]
|
|
49
|
+
| <[^>]*>
|
|
50
|
+
| '[^']*'
|
|
51
|
+
| ~\|?
|
|
52
|
+
| #(?:[^)\\]|\\.?)*
|
|
53
|
+
| [^:)]*[:)]
|
|
54
|
+
)?
|
|
55
|
+
| \*[^\)]*\)?
|
|
56
|
+
)?
|
|
57
|
+
| (?:${$a.source})+
|
|
58
|
+
| ${Wp}
|
|
59
|
+
| .
|
|
60
|
+
`.replace(/\s+/g,""),"gsu"),Hl=new RegExp(ft`
|
|
61
|
+
\\ (?:
|
|
62
|
+
${Kp}
|
|
63
|
+
| .
|
|
64
|
+
)
|
|
65
|
+
| \[:(?:\^?\p{Alpha}+|\^):\]
|
|
66
|
+
| ${Wp}
|
|
67
|
+
| &&
|
|
68
|
+
| .
|
|
69
|
+
`.replace(/\s+/g,""),"gsu");function kk(e,t={}){const n={flags:"",...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!="string")throw new Error("String expected as pattern");const s=Uk(n.flags),r=[s.extended],o={captureGroup:n.rules.captureGroup,getCurrentModX(){return r.at(-1)},numOpenGroups:0,popModX(){r.pop()},pushModX(d){r.push(d)},replaceCurrentModX(d){r[r.length-1]=d},singleline:n.rules.singleline};let l=[],i;for(Jr.lastIndex=0;i=Jr.exec(e);){const d=xk(o,e,i[0],Jr.lastIndex);d.tokens?l.push(...d.tokens):d.token&&l.push(d.token),d.lastIndex!==void 0&&(Jr.lastIndex=d.lastIndex)}const a=[];let c=0;l.filter(d=>d.type==="GroupOpen").forEach(d=>{d.kind==="capturing"?d.number=++c:d.raw==="("&&a.push(d)}),c||a.forEach((d,f)=>{d.kind="capturing",d.number=f+1});const u=c||a.length;return{tokens:l.map(d=>d.type==="EscapedNumber"?qk(d,u):d).flat(),flags:s}}function xk(e,t,n,s){const[r,o]=n;if(n==="["||n==="[^"){const l=$k(t,n,s);return{tokens:l.tokens,lastIndex:l.lastIndex}}if(r==="\\"){if("AbBGyYzZ".includes(o))return{token:Ru(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:Mk(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:Yp(n)}}if(o==="K")return{token:Jp("keep",n)};if(o==="N"||o==="R")return{token:ts("newline",n,{negate:o==="N"})};if(o==="O")return{token:ts("any",n)};if(o==="X")return{token:ts("text_segment",n)};const l=Xp(n,{inCharClass:!1});return Array.isArray(l)?{tokens:l}:{token:l}}if(r==="("){if(o==="*")return{token:Bk(n)};if(n==="(?{")throw new Error(`Unsupported callout "${n}"`);if(n.startsWith("(?#")){if(t[s]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:s+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:jk(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n==="("&&!e.captureGroup||n==="(?:")return{token:vs("group",n)};if(n==="(?>")return{token:vs("atomic",n)};if(n==="(?="||n==="(?!"||n==="(?<="||n==="(?<!")return{token:vs(n[2]==="<"?"lookbehind":"lookahead",n,{negate:n.endsWith("!")})};if(n==="("&&e.captureGroup||n.startsWith("(?<")&&n.endsWith(">")||n.startsWith("(?'")&&n.endsWith("'"))return{token:vs("capturing",n,{...n!=="("&&{name:n.slice(3,-1)}})};if(n.startsWith("(?~")){if(n==="(?~|")throw new Error(`Unsupported absence function kind "${n}"`);return{token:vs("absence_repeater",n)}}throw n==="(?("?new Error(`Unsupported conditional "${n}"`):new Error(`Invalid or unsupported group option "${n}"`)}if(n===")"){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:Pk(n)}}if(e.getCurrentModX()){if(n==="#"){const l=t.indexOf(`
|
|
70
|
+
`,s);return{lastIndex:l===-1?t.length:l}}if(/^\s$/.test(n)){const l=/\s+/y;return l.lastIndex=s,{lastIndex:l.exec(t)?l.lastIndex:s}}}if(n===".")return{token:ts("dot",n)};if(n==="^"||n==="$"){const l=e.singleline?{"^":ft`\A`,$:ft`\Z`}[n]:n;return{token:Ru(l,n)}}return n==="|"?{token:Ak(n)}:$a.test(n)?{tokens:zk(n)}:{token:wn(Us(n),n)}}function $k(e,t,n){const s=[Tu(t[1]==="^",t)];let r=1,o;for(Hl.lastIndex=n;o=Hl.exec(e);){const l=o[0];if(l[0]==="["&&l[1]!==":")r++,s.push(Tu(l[1]==="^",l));else if(l==="]"){if(s.at(-1).type==="CharacterClassOpen")s.push(wn(93,l));else if(r--,s.push(Ik(l)),!r)break}else{const i=Ek(l);Array.isArray(i)?s.push(...i):s.push(i)}}return{tokens:s,lastIndex:Hl.lastIndex||e.length}}function Ek(e){if(e[0]==="\\")return Xp(e,{inCharClass:!0});if(e[0]==="["){const t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!xa.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return ts("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?Rk(e):e==="&&"?Tk(e):wn(Us(e),e)}function Xp(e,{inCharClass:t}){const n=e[1];if(n==="c"||n==="C")return Fk(e);if("dDhHsSwW".includes(n))return Gk(e);if(e.startsWith(ft`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw new Error(`Incomplete or invalid Unicode property "${e}"`);return Vk(e)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(e))try{const s=e.split(/\\x/).slice(1).map(l=>parseInt(l,16)),r=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(s)),o=new TextEncoder;return[...r].map(l=>{const i=[...o.encode(l)].map(a=>`\\x${a.toString(16)}`).join("");return wn(Us(l),i)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n==="u"||n==="x")return wn(Hk(e),e);if(Nu.has(n))return wn(Nu.get(n),e);if(/\d/.test(n))return Nk(t,e);if(e==="\\")throw new Error(ft`Incomplete escape "\"`);if(n==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return wn(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function Ak(e){return{type:"Alternator",raw:e}}function Ru(e,t){return{type:"Assertion",kind:e,raw:t}}function Yp(e){return{type:"Backreference",raw:e}}function wn(e,t){return{type:"Character",value:e,raw:t}}function Ik(e){return{type:"CharacterClassClose",raw:e}}function Rk(e){return{type:"CharacterClassHyphen",raw:e}}function Tk(e){return{type:"CharacterClassIntersector",raw:e}}function Tu(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function ts(e,t,n={}){return{type:"CharacterSet",kind:e,...n,raw:t}}function Jp(e,t,n={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:Hs(n.flags),raw:t}}function Nk(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function Pk(e){return{type:"GroupClose",raw:e}}function vs(e,t,n={}){return{type:"GroupOpen",kind:e,...n,raw:t}}function Ok(e,t,n,s){return{type:"NamedCallout",kind:e,tag:t,arguments:n,raw:s}}function Lk(e,t,n,s){return{type:"Quantifier",kind:e,min:t,max:n,raw:s}}function Mk(e){return{type:"Subroutine",raw:e}}const Dk=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),Nu=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function Fk(e){const t=e[1]==="c"?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw new Error(`Unsupported control character "${e}"`);return wn(Us(t.toUpperCase())-64,e)}function jk(e,t){let{on:n,off:s}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;s??(s="");const r=(t.getCurrentModX()||n.includes("x"))&&!s.includes("x"),o=Ou(n),l=Ou(s),i={};if(o&&(i.enable=o),l&&(i.disable=l),e.endsWith(")"))return t.replaceCurrentModX(r),Jp("flags",e,{flags:i});if(e.endsWith(":"))return t.pushModX(r),t.numOpenGroups++,vs("group",e,{...(o||l)&&{flags:i}});throw new Error(`Unexpected flag modifier "${e}"`)}function Bk(e){const t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw new Error(`Incomplete or invalid named callout "${e}"`);const{name:n,tag:s,args:r}=t.groups;if(!n)throw new Error(`Invalid named callout "${e}"`);if(s==="")throw new Error(`Named callout tag with empty value not allowed "${e}"`);const o=r?r.split(",").filter(u=>u!=="").map(u=>/^[+-]?\d+$/.test(u)?+u:u):[],[l,i,a]=o,c=Dk.has(n)?n.toLowerCase():"custom";switch(c){case"fail":case"mismatch":case"skip":if(o.length>0)throw new Error(`Named callout arguments not allowed "${o}"`);break;case"error":if(o.length>1)throw new Error(`Named callout allows only one argument "${o}"`);if(typeof l=="string")throw new Error(`Named callout argument must be a number "${l}"`);break;case"max":if(!o.length||o.length>2)throw new Error(`Named callout must have one or two arguments "${o}"`);if(typeof l=="string"&&!/^[A-Za-z_]\w*$/.test(l))throw new Error(`Named callout argument one must be a tag or number "${l}"`);if(o.length===2&&(typeof i=="number"||!/^[<>X]$/.test(i)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${i}"`);break;case"count":case"total_count":if(o.length>1)throw new Error(`Named callout allows only one argument "${o}"`);if(o.length===1&&(typeof l=="number"||!/^[<>X]$/.test(l)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${l}"`);break;case"cmp":if(o.length!==3)throw new Error(`Named callout must have three arguments "${o}"`);if(typeof l=="string"&&!/^[A-Za-z_]\w*$/.test(l))throw new Error(`Named callout argument one must be a tag or number "${l}"`);if(typeof i=="number"||!/^(?:[<>!=]=|[<>])$/.test(i))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${i}"`);if(typeof a=="string"&&!/^[A-Za-z_]\w*$/.test(a))throw new Error(`Named callout argument three must be a tag or number "${a}"`);break;case"custom":throw new Error(`Undefined callout name "${n}"`);default:throw new Error(`Unexpected named callout kind "${c}"`)}return Ok(c,s??null,(r==null?void 0:r.split(","))??null,e)}function Pu(e){let t=null,n,s;if(e[0]==="{"){const{minStr:r,maxStr:o}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,l=1e5;if(+r>l||o&&+o>l)throw new Error("Quantifier value unsupported in Oniguruma");if(n=+r,s=o===void 0?+r:o===""?1/0:+o,n>s&&(t="possessive",[n,s]=[s,n]),e.endsWith("?")){if(t==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');t="lazy"}else t||(t="greedy")}else n=e[0]==="+"?1:0,s=e[0]==="?"?1:1/0,t=e[1]==="+"?"possessive":e[1]==="?"?"lazy":"greedy";return Lk(t,n,s,e)}function Gk(e){const t=e[1].toLowerCase();return ts({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function Vk(e){const{p:t,neg:n,value:s}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return ts("property",e,{value:s,negate:t==="P"&&!n||t==="p"&&!!n})}function Ou(e){const t={};return e.includes("i")&&(t.ignoreCase=!0),e.includes("m")&&(t.dotAll=!0),e.includes("x")&&(t.extended=!0),Object.keys(t).length?t:null}function Uk(e){const t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){const s=e[n];if(!"imxDPSWy".includes(s))throw new Error(`Invalid flag "${s}"`);if(s==="y"){if(!/^y{[gw]}/.test(e.slice(n)))throw new Error('Invalid or unspecified flag "y" mode');t.textSegmentMode=e[n+2]==="g"?"grapheme":"word",n+=3;continue}t[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[s]]=!0}return t}function Hk(e){if(new RegExp("^(?:\\\\u(?!\\p{AHex}{4})|\\\\x(?!\\p{AHex}{1,2}|\\{\\p{AHex}{1,8}\\}))","u").test(e))throw new Error(`Incomplete or invalid escape "${e}"`);const t=e[2]==="{"?new RegExp("^\\\\x\\{\\s*(?<hex>\\p{AHex}+)","u").exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function qk(e,t){const{raw:n,inCharClass:s}=e,r=n.slice(1);if(!s&&(r!=="0"&&r.length===1||r[0]!=="0"&&+r<=t))return[Yp(n)];const o=[],l=r.match(/^[0-7]+|\d/g);for(let i=0;i<l.length;i++){const a=l[i];let c;if(i===0&&a!=="8"&&a!=="9"){if(c=parseInt(a,8),c>127)throw new Error(ft`Octal encoded byte above 177 unsupported "${n}"`)}else c=Us(a);o.push(wn(c,(i===0?"\\":"")+a))}return o}function zk(e){const t=[],n=new RegExp($a,"gy");let s;for(;s=n.exec(e);){const r=s[0];if(r[0]==="{"){const o=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(r);if(o){const{min:l,max:i}=o.groups;if(+l>+i&&r.endsWith("?")){n.lastIndex--,t.push(Pu(r.slice(0,-1)));continue}}}t.push(Pu(r))}return t}function Qp(e,t){if(!Array.isArray(e.body))throw new Error("Expected node with body array");if(e.body.length!==1)return!1;const n=e.body[0];return!t||Object.keys(t).every(s=>t[s]===n[s])}function Wk(e){return Kk.has(e.type)}const Kk=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function Zp(e,t={}){const n={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},s=kk(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),r=(f,p)=>{const h=s.tokens[o.nextIndex];switch(o.parent=f,o.nextIndex++,h.type){case"Alternator":return as();case"Assertion":return Xk(h);case"Backreference":return Yk(h,o);case"Character":return cl(h.value,{useLastValid:!!p.isCheckingRangeEnd});case"CharacterClassHyphen":return Jk(h,o,p);case"CharacterClassOpen":return Qk(h,o,p);case"CharacterSet":return Zk(h,o);case"Directive":return ox(h.kind,{flags:h.flags});case"GroupOpen":return ex(h,o,p);case"NamedCallout":return ix(h.kind,h.tag,h.arguments);case"Quantifier":return tx(h,o);case"Subroutine":return nx(h,o);default:throw new Error(`Unexpected token type "${h.type}"`)}},o={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:s.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:r},l=cx(lx(s.flags));let i=l.body[0];for(;o.nextIndex<s.tokens.length;){const f=r(i,{});f.type==="Alternative"?(l.body.push(f),i=f):i.body.push(f)}const{capturingGroups:a,hasNumberedRef:c,namedGroupsByName:u,subroutines:d}=o;if(c&&u.size&&!n.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:f}of d)if(typeof f=="number"){if(f>a.length)throw new Error("Subroutine uses a group number that's not defined");f&&(a[f-1].isSubroutined=!0)}else if(u.has(f)){if(u.get(f).length>1)throw new Error(ft`Subroutine uses a duplicate group name "\g<${f}>"`);u.get(f)[0].isSubroutined=!0}else throw new Error(ft`Subroutine uses a group name that's not defined "\g<${f}>"`);return l}function Xk({kind:e}){return Ni(Hs({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[e],`Unexpected assertion kind "${e}"`),{negate:e===ft`\B`||e===ft`\Y`})}function Yk({raw:e},t){const n=/^\\k[<']/.test(e),s=n?e.slice(3,-1):e.slice(1),r=(o,l=!1)=>{const i=t.capturingGroups.length;let a=!1;if(o>i)if(t.skipBackrefValidation)a=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,Pi(l?i+1-o:o,{orphan:a})};if(n){const o=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(s);if(o)return r(+o.groups.num,!!o.groups.sign);if(/[-+]/.test(s))throw new Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(s))throw new Error(`Group name not defined to the left "${e}"`);return Pi(s)}return r(+s)}function Jk(e,t,n){const{tokens:s,walk:r}=t,o=t.parent,l=o.body.at(-1),i=s[t.nextIndex];if(!n.isCheckingRangeEnd&&l&&l.type!=="CharacterClass"&&l.type!=="CharacterClassRange"&&i&&i.type!=="CharacterClassOpen"&&i.type!=="CharacterClassClose"&&i.type!=="CharacterClassIntersector"){const a=r(o,{...n,isCheckingRangeEnd:!0});if(l.type==="Character"&&a.type==="Character")return o.body.pop(),rx(l,a);throw new Error("Invalid character class range")}return cl(Us("-"))}function Qk({negate:e},t,n){const{tokens:s,walk:r}=t,o=[ao()],l=s[t.nextIndex];let i=Du(l);for(;i.type!=="CharacterClassClose";){if(i.type==="CharacterClassIntersector")o.push(ao()),t.nextIndex++;else{const c=o.at(-1);c.body.push(r(c,n))}i=Du(s[t.nextIndex],l)}const a=ao({negate:e});return o.length===1?a.body=o[0].body:(a.kind="intersection",a.body=o.map(c=>c.body.length===1?c.body[0]:c)),t.nextIndex++,a}function Zk({kind:e,negate:t,value:n},s){const{normalizeUnknownPropertyNames:r,skipPropertyNameValidation:o,unicodePropertyMap:l}=s;if(e==="property"){const i=ul(n);if(xa.has(i)&&!(l!=null&&l.has(i)))e="posix",n=i;else return ys(n,{negate:t,normalizeUnknownPropertyNames:r,skipPropertyNameValidation:o,unicodePropertyMap:l})}return e==="posix"?ax(n,{negate:t}):Oi(e,{negate:t})}function ex(e,t,n){const{tokens:s,capturingGroups:r,namedGroupsByName:o,skipLookbehindValidation:l,walk:i}=t,a=ux(e),c=a.type==="AbsenceFunction",u=Mu(a),d=u&&a.negate;if(a.type==="CapturingGroup"&&(r.push(a),a.name&&Sk(o,a.name,[]).push(a)),c&&n.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let f=Fu(s[t.nextIndex]);for(;f.type!=="GroupClose";){if(f.type==="Alternator")a.body.push(as()),t.nextIndex++;else{const p=a.body.at(-1),h=i(p,{...n,isInAbsenceFunction:n.isInAbsenceFunction||c,isInLookbehind:n.isInLookbehind||u,isInNegLookbehind:n.isInNegLookbehind||d});if(p.body.push(h),(u||n.isInLookbehind)&&!l){const v="Lookbehind includes a pattern not allowed by Oniguruma";if(d||n.isInNegLookbehind){if(Lu(h)||h.type==="CapturingGroup")throw new Error(v)}else if(Lu(h)||Mu(h)&&h.negate)throw new Error(v)}}f=Fu(s[t.nextIndex])}return t.nextIndex++,a}function tx({kind:e,min:t,max:n},s){const r=s.parent,o=r.body.at(-1);if(!o||!Wk(o))throw new Error("Quantifier requires a repeatable token");const l=th(e,t,n,o);return r.body.pop(),l}function nx({raw:e},t){const{capturingGroups:n,subroutines:s}=t;let r=e.slice(3,-1);const o=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(r);if(o){const i=+o.groups.num,a=n.length;if(t.hasNumberedRef=!0,r={"":i,"+":a+i,"-":a+1-i}[o.groups.sign],r<1)throw new Error("Invalid subroutine number")}else r==="0"&&(r=0);const l=nh(r);return s.push(l),l}function sx(e,t){return{type:"AbsenceFunction",kind:e,body:Br(t==null?void 0:t.body)}}function as(e){return{type:"Alternative",body:sh(e==null?void 0:e.body)}}function Ni(e,t){const n={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(n.negate=!!(t!=null&&t.negate)),n}function Pi(e,t){const n=!!(t!=null&&t.orphan);return{type:"Backreference",ref:e,...n&&{orphan:n}}}function eh(e,t){const n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!dx(n.name))throw new Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:Br(t==null?void 0:t.body)}}function cl(e,t){const n={useLastValid:!1,...t};if(e>1114111){const s=e.toString(16);if(n.useLastValid)e=1114111;else throw e>1310719?new Error(`Invalid code point out of range "\\x{${s}}"`):new Error(`Invalid code point out of range in JS "\\x{${s}}"`)}return{type:"Character",value:e}}function ao(e){const t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:sh(e==null?void 0:e.body)}}function rx(e,t){if(t.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}function Oi(e,t){const n=!!(t!=null&&t.negate),s={type:"CharacterSet",kind:e};return(e==="digit"||e==="hex"||e==="newline"||e==="space"||e==="word")&&(s.negate=n),(e==="text_segment"||e==="newline"&&!n)&&(s.variableLength=!0),s}function ox(e,t={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:Hs(t.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function lx(e){return{type:"Flags",...e}}function Vt(e){const t=e==null?void 0:e.atomic,n=e==null?void 0:e.flags;if(t&&n)throw new Error("Atomic group cannot have flags");return{type:"Group",...t&&{atomic:t},...n&&{flags:n},body:Br(e==null?void 0:e.body)}}function Jn(e){const t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:Br(e==null?void 0:e.body)}}function ix(e,t,n){return{type:"NamedCallout",kind:e,tag:t,arguments:n}}function ax(e,t){const n=!!(t!=null&&t.negate);if(!xa.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:n}}function th(e,t,n,s){if(t>n)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:n,body:s}}function cx(e,t){return{type:"Regex",body:Br(t==null?void 0:t.body),flags:e}}function nh(e){return{type:"Subroutine",ref:e}}function ys(e,t){var r;const n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t};let s=(r=n.unicodePropertyMap)==null?void 0:r.get(ul(e));if(!s){if(n.normalizeUnknownPropertyNames)s=fx(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw new Error(ft`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:s??e,negate:n.negate}}function ux({flags:e,kind:t,name:n,negate:s,number:r}){switch(t){case"absence_repeater":return sx("repeater");case"atomic":return Vt({atomic:!0});case"capturing":return eh(r,{name:n});case"group":return Vt({flags:e});case"lookahead":case"lookbehind":return Jn({behind:t==="lookbehind",negate:s});default:throw new Error(`Unexpected group kind "${t}"`)}}function Br(e){if(e===void 0)e=[as()];else if(!Array.isArray(e)||!e.length||!e.every(t=>t.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return e}function sh(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(t=>!!t.type))throw new Error("Invalid body; expected array of nodes");return e}function Lu(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function Mu(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function dx(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function fx(e){return e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function ul(e){return e.replace(/[- _]+/g,"").toLowerCase()}function Du(e,t){const n=t;return Hs(e,`Unclosed character class${(n==null?void 0:n.type)==="Character"&&n.value===93&&n.raw==="]"?' (started with "]")':""}`)}function Fu(e){return Hs(e,"Unclosed group")}function hr(e,t,n=null){function s(o,l){for(let i=0;i<o.length;i++){const a=r(o[i],l,i,o);i=Math.max(-1,i+a)}}function r(o,l=null,i=null,a=null){var y,k;let c=0,u=!1;const d={node:o,parent:l,key:i,container:a,root:e,remove(){Qr(a).splice(Math.max(0,ps(i)+c),1),c--,u=!0},removeAllNextSiblings(){return Qr(a).splice(ps(i)+1)},removeAllPrevSiblings(){const C=ps(i)+c;return c-=C,Qr(a).splice(0,Math.max(0,C))},replaceWith(C,R={}){const j=!!R.traverse;a?a[Math.max(0,ps(i)+c)]=C:Hs(l,"Can't replace root node")[i]=C,j&&r(C,l,i,a),u=!0},replaceWithMultiple(C,R={}){const j=!!R.traverse;if(Qr(a).splice(Math.max(0,ps(i)+c),1,...C),c+=C.length-1,j){let O=0;for(let L=0;L<C.length;L++)O+=r(C[L],l,ps(i)+L+O,a)}u=!0},skip(){u=!0}},{type:f}=o,p=t["*"],h=t[f],v=typeof p=="function"?p:p==null?void 0:p.enter,_=typeof h=="function"?h:h==null?void 0:h.enter;if(v==null||v(d,n),_==null||_(d,n),!u)switch(f){case"AbsenceFunction":case"Alternative":case"CapturingGroup":case"CharacterClass":case"Group":case"LookaroundAssertion":s(o.body,o);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":r(o.min,o,"min"),r(o.max,o,"max");break;case"Quantifier":r(o.body,o,"body");break;case"Regex":s(o.body,o),r(o.flags,o,"flags");break;default:throw new Error(`Unexpected node type "${f}"`)}return(y=h==null?void 0:h.exit)==null||y.call(h,d,n),(k=p==null?void 0:p.exit)==null||k.call(p,d,n),c}return r(e),e}function Qr(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function ps(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}const px=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function hx(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function gx(e,t,n,s){return e.slice(0,t)+s+e.slice(t+n.length)}const Bt=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function Ea(e,t,n,s){const r=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),o=[!1];let l=0,i="";for(const a of e.matchAll(r)){const{0:c,groups:{$skip:u}}=a;if(!u&&(!s||s===Bt.DEFAULT==!l)){n instanceof Function?i+=n(a,{context:l?Bt.CHAR_CLASS:Bt.DEFAULT,negated:o[o.length-1]}):i+=n;continue}c[0]==="["?(l++,o.push(c[1]==="^")):c==="]"&&l&&(l--,o.pop()),i+=c}return i}function rh(e,t,n,s){Ea(e,t,n,s)}function mx(e,t,n=0,s){if(!new RegExp(t,"su").test(e))return null;const r=new RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");r.lastIndex=n;let o=0,l;for(;l=r.exec(e);){const{0:i,groups:{$skip:a}}=l;if(!a&&(!s||s===Bt.DEFAULT==!o))return l;i==="["?o++:i==="]"&&o&&o--,r.lastIndex==l.index&&r.lastIndex++}return null}function Zr(e,t,n){return!!mx(e,t,0,n)}function vx(e,t){const n=/\\?./gsu;n.lastIndex=t;let s=e.length,r=0,o=1,l;for(;l=n.exec(e);){const[i]=l;if(i==="[")r++;else if(r)i==="]"&&r--;else if(i==="(")o++;else if(i===")"&&(o--,!o)){s=l.index;break}}return e.slice(t,s)}const ju=new RegExp(String.raw`(?<noncapturingStart>${px})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function yx(e,t){const n=(t==null?void 0:t.hiddenCaptures)??[];let s=(t==null?void 0:t.captureTransfers)??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:s,hiddenCaptures:n};const r="(?>",o="(?:(?=(",l=[0],i=[];let a=0,c=0,u=NaN,d;do{d=!1;let f=0,p=0,h=!1,v;for(ju.lastIndex=Number.isNaN(u)?0:u+o.length;v=ju.exec(e);){const{0:_,index:y,groups:{capturingStart:k,noncapturingStart:C}}=v;if(_==="[")f++;else if(f)_==="]"&&f--;else if(_===r&&!h)u=y,h=!0;else if(h&&C)p++;else if(k)h?p++:(a++,l.push(a+c));else if(_===")"&&h){if(!p){c++;const R=a+c;if(e=`${e.slice(0,u)}${o}${e.slice(u+r.length,y)}))<$$${R}>)${e.slice(y+1)}`,d=!0,i.push(R),hx(n,R),s.size){const j=new Map;s.forEach((O,L)=>{j.set(L>=R?L+1:L,O.map(U=>U>=R?U+1:U))}),s=j}break}p--}}}while(d);return n.push(...i),e=Ea(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:f,groups:{backrefNum:p,wrappedBackrefNum:h}})=>{if(p){const v=+p;if(v>l.length-1)throw new Error(`Backref "${f}" greater than number of captures`);return`\\${l[v]}`}return`\\${h}`},Bt.DEFAULT),{pattern:e,captureTransfers:s,hiddenCaptures:n}}const oh=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,ql=new RegExp(String.raw`
|
|
71
|
+
\\(?: \d+
|
|
72
|
+
| c[A-Za-z]
|
|
73
|
+
| [gk]<[^>]+>
|
|
74
|
+
| [pPu]\{[^\}]+\}
|
|
75
|
+
| u[A-Fa-f\d]{4}
|
|
76
|
+
| x[A-Fa-f\d]{2}
|
|
77
|
+
)
|
|
78
|
+
| \((?: \? (?: [:=!>]
|
|
79
|
+
| <(?:[=!]|[^>]+>)
|
|
80
|
+
| [A-Za-z\-]+:
|
|
81
|
+
| \(DEFINE\)
|
|
82
|
+
))?
|
|
83
|
+
| (?<qBase>${oh})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
|
|
84
|
+
| \\?.
|
|
85
|
+
`.replace(/\s+/g,""),"gsu");function _x(e){if(!new RegExp(`${oh}\\+`).test(e))return{pattern:e};const t=[];let n=null,s=null,r="",o=0,l;for(ql.lastIndex=0;l=ql.exec(e);){const{0:i,index:a,groups:{qBase:c,qMod:u,invalidQ:d}}=l;if(i==="[")o||(s=a),o++;else if(i==="]")o?o--:s=null;else if(!o)if(u==="+"&&r&&!r.startsWith("(")){if(d)throw new Error(`Invalid quantifier "${i}"`);let f=-1;if(/^\{\d+\}$/.test(c))e=gx(e,a+c.length,u,"");else{if(r===")"||r==="]"){const p=r===")"?n:s;if(p===null)throw new Error(`Invalid unmatched "${r}"`);e=`${e.slice(0,p)}(?>${e.slice(p,a)}${c})${e.slice(a+i.length)}`}else e=`${e.slice(0,a-r.length)}(?>${r}${c})${e.slice(a+i.length)}`;f+=4}ql.lastIndex+=f}else i[0]==="("?t.push(a):i===")"&&(n=t.length?t.pop():null);r=i}return{pattern:e}}const jt=String.raw,bx=jt`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,Li=jt`\(\?R=(?<rDepth>[^\)]+)\)|${bx}`,dl=jt`\(\?<(?![=!])(?<captureName>[^>]+)>`,lh=jt`${dl}|(?<unnamed>\()(?!\?)`,zn=new RegExp(jt`${dl}|${Li}|\(\?|\\?.`,"gsu"),zl="Cannot use multiple overlapping recursions";function wx(e,t){const{hiddenCaptures:n,mode:s}={hiddenCaptures:[],mode:"plugin",...t};let r=(t==null?void 0:t.captureTransfers)??new Map;if(!new RegExp(Li,"su").test(e))return{pattern:e,captureTransfers:r,hiddenCaptures:n};if(s==="plugin"&&Zr(e,jt`\(\?\(DEFINE\)`,Bt.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const o=[],l=Zr(e,jt`\\[1-9]`,Bt.DEFAULT),i=new Map,a=[];let c=!1,u=0,d=0,f;for(zn.lastIndex=0;f=zn.exec(e);){const{0:p,groups:{captureName:h,rDepth:v,gRNameOrNum:_,gRDepth:y}}=f;if(p==="[")u++;else if(u)p==="]"&&u--;else if(v){if(Bu(v),c)throw new Error(zl);if(l)throw new Error(`${s==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const k=e.slice(0,f.index),C=e.slice(zn.lastIndex);if(Zr(C,Li,Bt.DEFAULT))throw new Error(zl);const R=+v-1;e=Gu(k,C,R,!1,n,o,d),r=Uu(r,k,R,o.length,0,d);break}else if(_){Bu(y);let k=!1;for(const x of a)if(x.name===_||x.num===+_){if(k=!0,x.hasRecursedWithin)throw new Error(zl);break}if(!k)throw new Error(jt`Recursive \g cannot be used outside the referenced group "${s==="external"?_:jt`\g<${_}&R=${y}>`}"`);const C=i.get(_),R=vx(e,C);if(l&&Zr(R,jt`${dl}|\((?!\?)`,Bt.DEFAULT))throw new Error(`${s==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const j=e.slice(C,f.index),O=R.slice(j.length+p.length),L=o.length,U=+y-1,P=Gu(j,O,U,!0,n,o,d);r=Uu(r,j,U,o.length-L,L,d);const D=e.slice(0,C),Y=e.slice(C+R.length);e=`${D}${P}${Y}`,zn.lastIndex+=P.length-p.length-j.length-O.length,a.forEach(x=>x.hasRecursedWithin=!0),c=!0}else if(h)d++,i.set(String(d),zn.lastIndex),i.set(h,zn.lastIndex),a.push({num:d,name:h});else if(p[0]==="("){const k=p==="(";k&&(d++,i.set(String(d),zn.lastIndex)),a.push(k?{num:d}:{})}else p===")"&&a.pop()}return n.push(...o),{pattern:e,captureTransfers:r,hiddenCaptures:n}}function Bu(e){const t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e))throw new Error(t);if(e=+e,e<2||e>100)throw new Error(t)}function Gu(e,t,n,s,r,o,l){const i=new Set;s&&rh(e+t,dl,({groups:{captureName:c}})=>{i.add(c)},Bt.DEFAULT);const a=[n,s?i:null,r,o,l];return`${e}${Vu(`(?:${e}`,"forward",...a)}(?:)${Vu(`${t})`,"backward",...a)}${t}`}function Vu(e,t,n,s,r,o,l){const a=u=>t==="forward"?u+2:n-u+2-1;let c="";for(let u=0;u<n;u++){const d=a(u);c+=Ea(e,jt`${lh}|\\k<(?<backref>[^>]+)>`,({0:f,groups:{captureName:p,unnamed:h,backref:v}})=>{if(v&&s&&!s.has(v))return f;const _=`_$${d}`;if(h||p){const y=l+o.length+1;return o.push(y),Cx(r,y),h?f:`(?<${p}${_}>`}return jt`\k<${v}${_}>`},Bt.DEFAULT)}return c}function Cx(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function Uu(e,t,n,s,r,o){if(e.size&&s){let l=0;rh(t,lh,()=>l++,Bt.DEFAULT);const i=o-l+r,a=new Map;return e.forEach((c,u)=>{const d=(s-l*n)/n,f=l*n,p=u>i+l?u+s:u,h=[];for(const v of c)if(v<=i)h.push(v);else if(v>i+l+d)h.push(v+s);else if(v<=i+l)for(let _=0;_<=n;_++)h.push(v+l*_);else for(let _=0;_<=n;_++)h.push(v+f+d*_);a.set(p,h)}),a}return e}var at=String.fromCodePoint,xe=String.raw,qt={},fl=globalThis.RegExp;qt.flagGroups=(()=>{try{new fl("(?i:)")}catch{return!1}return!0})();qt.unicodeSets=(()=>{try{new fl("[[]]","v")}catch{return!1}return!0})();qt.bugFlagVLiteralHyphenIsRange=qt.unicodeSets?(()=>{try{new fl(xe`[\d\-a]`,"v")}catch{return!0}return!1})():!1;qt.bugNestedClassIgnoresNegation=qt.unicodeSets&&new fl("[[^a]]","v").test("a");function Lo(e,{enable:t,disable:n}){return{dotAll:!(n!=null&&n.dotAll)&&!!(t!=null&&t.dotAll||e.dotAll),ignoreCase:!(n!=null&&n.ignoreCase)&&!!(t!=null&&t.ignoreCase||e.ignoreCase)}}function Ir(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function Mi(e,t){return Hu[e]>=Hu[t]}function Sx(e,t){if(e==null)throw new Error(t??"Value expected");return e}var Hu={ES2025:2025,ES2024:2024,ES2018:2018},kx={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function ih(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!kx[e.target])throw new Error(`Unexpected target "${e.target}"`);const t={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target==="auto"&&(t.target=qt.flagGroups?"ES2025":qt.unicodeSets?"ES2024":"ES2018"),t}var xx="[ -\r ]",$x=new Set([at(304),at(305)]),fn=xe`[\p{L}\p{M}\p{N}\p{Pc}]`;function ah(e){if($x.has(e))return[e];const t=new Set,n=e.toLowerCase(),s=n.toUpperCase(),r=Ix.get(n),o=Ex.get(n),l=Ax.get(n);return[...s].length===1&&t.add(s),l&&t.add(l),r&&t.add(r),t.add(n),o&&t.add(o),[...t]}var Aa=new Map(`C Other
|
|
86
|
+
Cc Control cntrl
|
|
87
|
+
Cf Format
|
|
88
|
+
Cn Unassigned
|
|
89
|
+
Co Private_Use
|
|
90
|
+
Cs Surrogate
|
|
91
|
+
L Letter
|
|
92
|
+
LC Cased_Letter
|
|
93
|
+
Ll Lowercase_Letter
|
|
94
|
+
Lm Modifier_Letter
|
|
95
|
+
Lo Other_Letter
|
|
96
|
+
Lt Titlecase_Letter
|
|
97
|
+
Lu Uppercase_Letter
|
|
98
|
+
M Mark Combining_Mark
|
|
99
|
+
Mc Spacing_Mark
|
|
100
|
+
Me Enclosing_Mark
|
|
101
|
+
Mn Nonspacing_Mark
|
|
102
|
+
N Number
|
|
103
|
+
Nd Decimal_Number digit
|
|
104
|
+
Nl Letter_Number
|
|
105
|
+
No Other_Number
|
|
106
|
+
P Punctuation punct
|
|
107
|
+
Pc Connector_Punctuation
|
|
108
|
+
Pd Dash_Punctuation
|
|
109
|
+
Pe Close_Punctuation
|
|
110
|
+
Pf Final_Punctuation
|
|
111
|
+
Pi Initial_Punctuation
|
|
112
|
+
Po Other_Punctuation
|
|
113
|
+
Ps Open_Punctuation
|
|
114
|
+
S Symbol
|
|
115
|
+
Sc Currency_Symbol
|
|
116
|
+
Sk Modifier_Symbol
|
|
117
|
+
Sm Math_Symbol
|
|
118
|
+
So Other_Symbol
|
|
119
|
+
Z Separator
|
|
120
|
+
Zl Line_Separator
|
|
121
|
+
Zp Paragraph_Separator
|
|
122
|
+
Zs Space_Separator
|
|
123
|
+
ASCII
|
|
124
|
+
ASCII_Hex_Digit AHex
|
|
125
|
+
Alphabetic Alpha
|
|
126
|
+
Any
|
|
127
|
+
Assigned
|
|
128
|
+
Bidi_Control Bidi_C
|
|
129
|
+
Bidi_Mirrored Bidi_M
|
|
130
|
+
Case_Ignorable CI
|
|
131
|
+
Cased
|
|
132
|
+
Changes_When_Casefolded CWCF
|
|
133
|
+
Changes_When_Casemapped CWCM
|
|
134
|
+
Changes_When_Lowercased CWL
|
|
135
|
+
Changes_When_NFKC_Casefolded CWKCF
|
|
136
|
+
Changes_When_Titlecased CWT
|
|
137
|
+
Changes_When_Uppercased CWU
|
|
138
|
+
Dash
|
|
139
|
+
Default_Ignorable_Code_Point DI
|
|
140
|
+
Deprecated Dep
|
|
141
|
+
Diacritic Dia
|
|
142
|
+
Emoji
|
|
143
|
+
Emoji_Component EComp
|
|
144
|
+
Emoji_Modifier EMod
|
|
145
|
+
Emoji_Modifier_Base EBase
|
|
146
|
+
Emoji_Presentation EPres
|
|
147
|
+
Extended_Pictographic ExtPict
|
|
148
|
+
Extender Ext
|
|
149
|
+
Grapheme_Base Gr_Base
|
|
150
|
+
Grapheme_Extend Gr_Ext
|
|
151
|
+
Hex_Digit Hex
|
|
152
|
+
IDS_Binary_Operator IDSB
|
|
153
|
+
IDS_Trinary_Operator IDST
|
|
154
|
+
ID_Continue IDC
|
|
155
|
+
ID_Start IDS
|
|
156
|
+
Ideographic Ideo
|
|
157
|
+
Join_Control Join_C
|
|
158
|
+
Logical_Order_Exception LOE
|
|
159
|
+
Lowercase Lower
|
|
160
|
+
Math
|
|
161
|
+
Noncharacter_Code_Point NChar
|
|
162
|
+
Pattern_Syntax Pat_Syn
|
|
163
|
+
Pattern_White_Space Pat_WS
|
|
164
|
+
Quotation_Mark QMark
|
|
165
|
+
Radical
|
|
166
|
+
Regional_Indicator RI
|
|
167
|
+
Sentence_Terminal STerm
|
|
168
|
+
Soft_Dotted SD
|
|
169
|
+
Terminal_Punctuation Term
|
|
170
|
+
Unified_Ideograph UIdeo
|
|
171
|
+
Uppercase Upper
|
|
172
|
+
Variation_Selector VS
|
|
173
|
+
White_Space space
|
|
174
|
+
XID_Continue XIDC
|
|
175
|
+
XID_Start XIDS`.split(/\s/).map(e=>[ul(e),e])),Ex=new Map([["s",at(383)],[at(383),"s"]]),Ax=new Map([[at(223),at(7838)],[at(107),at(8490)],[at(229),at(8491)],[at(969),at(8486)]]),Ix=new Map([Pn(453),Pn(456),Pn(459),Pn(498),...Wl(8072,8079),...Wl(8088,8095),...Wl(8104,8111),Pn(8124),Pn(8140),Pn(8188)]),Rx=new Map([["alnum",xe`[\p{Alpha}\p{Nd}]`],["alpha",xe`\p{Alpha}`],["ascii",xe`\p{ASCII}`],["blank",xe`[\p{Zs}\t]`],["cntrl",xe`\p{Cc}`],["digit",xe`\p{Nd}`],["graph",xe`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",xe`\p{Lower}`],["print",xe`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",xe`[\p{P}\p{S}]`],["space",xe`\p{space}`],["upper",xe`\p{Upper}`],["word",xe`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",xe`\p{AHex}`]]);function Tx(e,t){const n=[];for(let s=e;s<=t;s++)n.push(s);return n}function Pn(e){const t=at(e);return[t.toLowerCase(),t]}function Wl(e,t){return Tx(e,t).map(n=>Pn(n))}var ch=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function Nx(e,t){const n={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};uh(e);const s={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:Mi(n.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};hr(e,Px,s);const r={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},o={currentFlags:r,prevFlags:null,globalFlags:r,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:s.subroutineRefMap};hr(e,Ox,o);const l={groupsByName:o.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:o.reffedNodesByReferencer};return hr(e,Lx,l),e._originMap=o.groupOriginByCopy,e._strategy=s.strategy,e}var Px={AbsenceFunction({node:e,parent:t,replaceWith:n}){const{body:s,kind:r}=e;if(r==="repeater"){const o=Vt();o.body[0].body.push(Jn({negate:!0,body:s}),ys("Any"));const l=Vt();l.body[0].body.push(th("greedy",0,1/0,o)),n(Je(l,t),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:s}){const r=e.body.filter(o=>o.kind==="flags");for(let o=n+1;o<t.body.length;o++){const l=t.body[o];Ir(s,l,[]).push(...r)}},exit({node:e},{flagDirectivesByAlt:t}){var n;if((n=t.get(e))!=null&&n.length){const s=fh(t.get(e));if(s){const r=Vt({flags:s});r.body[0].body=e.body,e.body=[Je(r,e)]}}}},Assertion({node:e,parent:t,key:n,container:s,root:r,remove:o,replaceWith:l},i){const{kind:a,negate:c}=e,{asciiWordBoundaries:u,avoidSubclass:d,supportedGNodes:f,wordIsAscii:p}=i;if(a==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${c?"Y":"y"}"`);if(a==="line_end")l(Je(Jn({body:[as({body:[Ni("string_end")]}),as({body:[cl(10)]})]}),t));else if(a==="line_start")l(Je(pn(xe`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(a==="search_start")if(f.has(e))r.flags.sticky=!0,o();else{const h=s[n-1];if(h&&Gx(h))l(Je(Jn({negate:!0}),t));else{if(d)throw new Error(xe`Uses "\G" in a way that requires a subclass`);l(On(Ni("string_start"),t)),i.strategy="clip_search"}}else if(!(a==="string_end"||a==="string_start"))if(a==="string_end_newline")l(Je(pn(xe`(?=\n?\z)`),t));else if(a==="word_boundary"){if(!p&&!u){const h=`(?:(?<=${fn})(?!${fn})|(?<!${fn})(?=${fn}))`,v=`(?:(?<=${fn})(?=${fn})|(?<!${fn})(?!${fn}))`;l(Je(pn(c?v:h),t))}}else throw new Error(`Unexpected assertion kind "${a}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!Xl(n)&&(n=Kl(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:s}=e;s&&!Xl(s)&&(s=Kl(s,t),e.name=s),n.set(e.number,e),s&&n.set(s,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){if(t.kind==="intersection"){const s=ao({body:[e]});n(Je(s,t),{traverse:!0})}},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:s,minTargetEs2024:r,digitIsAscii:o,spaceIsAscii:l,wordIsAscii:i}){const{kind:a,negate:c,value:u}=e;if(o&&(a==="digit"||u==="digit")){n(On(Oi("digit",{negate:c}),t));return}if(l&&(a==="space"||u==="space")){n(Je(Yl(pn(xx),c),t));return}if(i&&(a==="word"||u==="word")){n(On(Oi("word",{negate:c}),t));return}if(a==="any")n(On(ys("Any"),t));else if(a==="digit")n(On(ys("Nd",{negate:c}),t));else if(a!=="dot")if(a==="text_segment"){if(s==="strict")throw new Error(xe`Use of "\X" requires non-strict accuracy`);const d="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",f=xe`\p{RI}{2}|${d}(?:\u200D${d})*`;n(Je(pn(xe`(?>\r\n|${r?xe`\p{RGI_Emoji}`:f}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(a==="hex")n(On(ys("AHex",{negate:c}),t));else if(a==="newline")n(Je(pn(c?`[^
|
|
176
|
+
]`:`(?>\r
|
|
177
|
+
?|[
|
|
178
|
+
\v\f
\u2028\u2029])`),t));else if(a==="posix")if(!r&&(u==="graph"||u==="print")){if(s==="strict")throw new Error(`POSIX class "${u}" requires min target ES2024 or non-strict accuracy`);let d={graph:"!-~",print:" -~"}[u];c&&(d=`\0-${at(d.codePointAt(0)-1)}${at(d.codePointAt(2)+1)}-`),n(Je(pn(`[${d}]`),t))}else n(Je(Yl(pn(Rx.get(u)),c),t));else if(a==="property")Aa.has(ul(u))||(e.key="sc");else if(a==="space")n(On(ys("space",{negate:c}),t));else if(a==="word")n(Je(Yl(pn(fn),c),t));else throw new Error(`Unexpected character set kind "${a}"`)},Directive({node:e,parent:t,root:n,remove:s,replaceWith:r,removeAllPrevSiblings:o,removeAllNextSiblings:l}){const{kind:i,flags:a}=e;if(i==="flags")if(!a.enable&&!a.disable)s();else{const c=Vt({flags:a});c.body[0].body=l(),r(Je(c,t),{traverse:!0})}else if(i==="keep"){const c=n.body[0],d=n.body.length===1&&Qp(c,{type:"Group"})&&c.body[0].body.length===1?c.body[0]:n;if(t.parent!==d||d.body.length>1)throw new Error(xe`Uses "\K" in a way that's unsupported`);const f=Jn({behind:!0});f.body[0].body=o(),r(Je(f,t))}else throw new Error(`Unexpected directive kind "${i}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw new Error('Unsupported flag "P"');if(e.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(n=>delete e[n]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;const{enable:t,disable:n}=e.flags;t!=null&&t.extended&&delete t.extended,n!=null&&n.extended&&delete n.extended,t!=null&&t.dotAll&&(n!=null&&n.dotAll)&&delete t.dotAll,t!=null&&t.ignoreCase&&(n!=null&&n.ignoreCase)&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){const{kind:n}=e;n==="lookbehind"&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){const{kind:s}=e;if(s==="fail")n(Je(Jn({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${s.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=Vt();t.body[0].body.push(e.body),e.body=Je(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){const n=[];let s=!1,r=!1;for(const o of e.body)if(o.body.length===1&&o.body[0].kind==="search_start")o.body.pop();else{const l=hh(o.body);l?(s=!0,Array.isArray(l)?n.push(...l):n.push(l)):r=!0}s&&!r&&n.forEach(o=>t.add(o))},exit(e,{accuracy:t,passedLookbehind:n,strategy:s}){if(t==="strict"&&n&&s)throw new Error(xe`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!Xl(n)&&(n=Kl(n,t),e.ref=n)}},Ox={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){const{orphan:s,ref:r}=e;s||n.set(e,[...t.get(r).map(({node:o})=>o)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:s},{groupOriginByCopy:r,groupsByName:o,multiplexCapturesToLeftByRef:l,openRefs:i,reffedNodesByReferencer:a}){const c=r.get(e);if(c&&i.has(e.number)){const d=On(qu(e.number),t);a.set(d,i.get(e.number)),n(d);return}i.set(e.number,e),l.set(e.number,[]),e.name&&Ir(l,e.name,[]);const u=l.get(e.name??e.number);for(let d=0;d<u.length;d++){const f=u[d];if(c===f.node||c&&c===f.origin||e===f.origin){u.splice(d,1);break}}if(l.get(e.number).push({node:e,origin:c}),e.name&&l.get(e.name).push({node:e,origin:c}),e.name){const d=Ir(o,e.name,new Map);let f=!1;if(c)f=!0;else for(const p of d.values())if(!p.hasDuplicateNameToRemove){f=!0;break}o.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:f})}},exit({node:e},{openRefs:t}){t.get(e.number)===e&&t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=Lo(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},s){const{isRecursive:r,ref:o}=e;if(r){let u=t;for(;(u=u.parent)&&!(u.type==="CapturingGroup"&&(u.name===o||u.number===o)););s.reffedNodesByReferencer.set(e,u);return}const l=s.subroutineRefMap.get(o),i=o===0,a=i?qu(0):dh(l,s.groupOriginByCopy,null);let c=a;if(!i){const u=fh(Fx(l,f=>f.type==="Group"&&!!f.flags)),d=u?Lo(s.globalFlags,u):s.globalFlags;Mx(d,s.currentFlags)||(c=Vt({flags:jx(d)}),c.body[0].body.push(a))}n(Je(c,t),{traverse:!i})}},Lx={Backreference({node:e,parent:t,replaceWith:n},s){if(e.orphan){s.highestOrphanBackref=Math.max(s.highestOrphanBackref,e.ref);return}const o=s.reffedNodesByReferencer.get(e).filter(l=>Dx(l,e));if(!o.length)n(Je(Jn({negate:!0}),t));else if(o.length>1){const l=Vt({atomic:!0,body:o.reverse().map(i=>as({body:[Pi(i.number)]}))});n(Je(l,t))}else e.ref=o[0].number},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){const n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let s=0;s<n;s++){const r=eh();e.body.at(-1).body.push(r)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function uh(e){hr(e,{"*"({node:t,parent:n}){t.parent=n}})}function Mx(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function Dx(e,t){let n=t;do{if(n.type==="Regex")return!1;if(n.type==="Alternative")continue;if(n===e)return!1;const s=ph(n.parent);for(const r of s){if(r===n)break;if(r===e||gh(r,e))return!0}}while(n=n.parent);throw new Error("Unexpected path")}function dh(e,t,n,s){const r=Array.isArray(e)?[]:{};for(const[o,l]of Object.entries(e))o==="parent"?r.parent=Array.isArray(n)?s:n:l&&typeof l=="object"?r[o]=dh(l,t,r,n):(o==="type"&&l==="CapturingGroup"&&t.set(r,t.get(e)??e),r[o]=l);return r}function qu(e){const t=nh(e);return t.isRecursive=!0,t}function Fx(e,t){const n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function Kl(e,t){if(t.has(e))return t.get(e);const n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,n),n}function fh(e){const t=["dotAll","ignoreCase"],n={enable:{},disable:{}};return e.forEach(({flags:s})=>{t.forEach(r=>{var o,l;(o=s.enable)!=null&&o[r]&&(delete n.disable[r],n.enable[r]=!0),(l=s.disable)!=null&&l[r]&&(n.disable[r]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function jx({dotAll:e,ignoreCase:t}){const n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function ph(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function hh(e){const t=e.find(n=>n.kind==="search_start"||Vx(n,{negate:!1})||!Bx(n));if(!t)return null;if(t.kind==="search_start")return t;if(t.type==="LookaroundAssertion")return t.body[0].body[0];if(t.type==="CapturingGroup"||t.type==="Group"){const n=[];for(const s of t.body){const r=hh(s.body);if(!r)return null;Array.isArray(r)?n.push(...r):n.push(r)}return n}return null}function gh(e,t){const n=ph(e)??[];for(const s of n)if(s===t||gh(s,t))return!0;return!1}function Bx({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function Gx(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function Vx(e,t){const n={negate:null,...t};return e.type==="LookaroundAssertion"&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&Qp(e.body[0],{type:"Assertion",kind:"search_start"})}function Xl(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function pn(e,t){const s=Zp(e,{...t,unicodePropertyMap:Aa}).body;return s.length>1||s[0].body.length>1?Vt({body:s}):s[0].body[0]}function Yl(e,t){return e.negate=t,e}function On(e,t){return e.parent=t,e}function Je(e,t){return uh(e),e.parent=t,e}function Ux(e,t){const n=ih(t),s=Mi(n.target,"ES2024"),r=Mi(n.target,"ES2025"),o=n.rules.recursionLimit;if(!Number.isInteger(o)||o<2||o>20)throw new Error("Invalid recursionLimit; use 2-20");let l=null,i=null;if(!r){const p=[e.flags.ignoreCase];hr(e,Hx,{getCurrentModI:()=>p.at(-1),popModI(){p.pop()},pushModI(h){p.push(h)},setHasCasedChar(){p.at(-1)?l=!0:i=!0}})}const a={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||l)&&!i)};let c=e;const u={accuracy:n.accuracy,appliedGlobalFlags:a,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:c,originMap:e._originMap,recursionLimit:o,useAppliedIgnoreCase:!!(!r&&l&&i),useFlagMods:r,useFlagV:s,verbose:n.verbose};function d(p){return u.lastNode=c,c=p,Sx(qx[p.type],`Unexpected node type "${p.type}"`)(p,u,d)}const f={pattern:e.body.map(d).join("|"),flags:d(e.flags),options:{...e.options}};return s||(delete f.options.force.v,f.options.disable.v=!0,f.options.unicodeSetsPlugin=null),f._captureTransfers=new Map,f._hiddenCaptures=[],u.captureMap.forEach((p,h)=>{p.hidden&&f._hiddenCaptures.push(h),p.transferTo&&Ir(f._captureTransfers,p.transferTo,[]).push(h)}),f}var Hx={"*":{enter({node:e},t){if(Wu(e)){const n=t.getCurrentModI();t.pushModI(e.flags?Lo({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){Wu(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){Ia(at(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),mh(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&ch.has(e.value)&&t.setHasCasedChar()}},qx={Alternative({body:e},t,n){return e.map(n).join("")},Assertion({kind:e,negate:t}){if(e==="string_end")return"$";if(e==="string_start")return"^";if(e==="word_boundary")return t?xe`\B`:xe`\b`;throw new Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!="number")throw new Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&t.accuracy==="strict"&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,n){const{body:s,name:r,number:o}=e,l={ignoreCase:t.currentFlags.ignoreCase},i=t.originMap.get(e);return i&&(l.hidden=!0,o>i.number&&(l.transferTo=i.number)),t.captureMap.set(o,l),`(${r?`?<${r}>`:""}${s.map(n).join("|")})`},Character({value:e},t){const n=at(e),s=hs(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(s!==n)return s;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&Ia(n)){const r=ah(n);return t.inCharClass?r.join(""):r.length>1?`[${r.join("")}]`:r[0]}return n},CharacterClass(e,t,n){const{kind:s,negate:r,parent:o}=e;let{body:l}=e;if(s==="intersection"&&!t.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");qt.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&l.some(Ku)&&(l=[cl(45),...l.filter(c=>!Ku(c))]);const i=()=>`[${r?"^":""}${l.map(n).join(s==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||qt.bugNestedClassIgnoresNegation)&&!r){const u=l.filter(d=>d.type==="CharacterClass"&&d.kind==="union"&&d.negate);if(u.length){const d=Vt(),f=d.body[0];return d.parent=o,f.parent=d,l=l.filter(p=>!u.includes(p)),e.body=l,l.length?(e.parent=f,f.body.push(e)):d.body.pop(),u.forEach(p=>{const h=as({body:[p]});p.parent=h,h.parent=d,d.body.push(h)}),n(d)}}t.inCharClass=!0;const c=i();return t.inCharClass=!1,c}const a=l[0];if(s==="union"&&!r&&a&&((!t.useFlagV||!t.verbose)&&o.kind==="union"&&!(qt.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&o.kind==="intersection"&&l.length===1&&a.type!=="CharacterClassRange"))return l.map(n).join("");if(!t.useFlagV&&o.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return i()},CharacterClassRange(e,t){const n=e.min.value,s=e.max.value,r={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},o=hs(n,r),l=hs(s,r),i=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const a=mh(e);Yx(a).forEach(u=>{i.add(Array.isArray(u)?`${hs(u[0],r)}-${hs(u[1],r)}`:hs(u,r))})}return`${o}-${l}${[...i].join("")}`},CharacterSet({kind:e,negate:t,value:n,key:s},r){if(e==="dot")return r.currentFlags.dotAll?r.appliedGlobalFlags.dotAll||r.useFlagMods?".":"[^]":xe`[^\n]`;if(e==="digit")return t?xe`\D`:xe`\d`;if(e==="property"){if(r.useAppliedIgnoreCase&&r.currentFlags.ignoreCase&&ch.has(n))throw new Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?xe`\P`:xe`\p`}{${s?`${s}=`:""}${n}}`}if(e==="word")return t?xe`\W`:xe`\w`;throw new Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":"")},Group({atomic:e,body:t,flags:n,parent:s},r,o){const l=r.currentFlags;n&&(r.currentFlags=Lo(l,n));const i=t.map(o).join("|"),a=!r.verbose&&t.length===1&&s.type!=="Quantifier"&&!e&&(!r.useFlagMods||!n)?i:`(?${Jx(e,n,r.useFlagMods)}${i})`;return r.currentFlags=l,a},LookaroundAssertion({body:e,kind:t,negate:n},s,r){return`(?${`${t==="lookahead"?"":"<"}${n?"!":"="}`}${e.map(r).join("|")})`},Quantifier(e,t,n){return n(e.body)+Qx(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");const s=n.recursionLimit;return t===0?`(?R=${s})`:xe`\g<${t}&R=${s}>`}},zx=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),Wx=new Set(["-","\\","]","^","["]),Kx=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),zu=new Map([[9,xe`\t`],[10,xe`\n`],[11,xe`\v`],[12,xe`\f`],[13,xe`\r`],[8232,xe`\u2028`],[8233,xe`\u2029`],[65279,xe`\uFEFF`]]),Xx=new RegExp("^\\p{Cased}$","u");function Ia(e){return Xx.test(e)}function mh(e,t){const n=!!(t!=null&&t.firstOnly),s=e.min.value,r=e.max.value,o=[];if(s<65&&(r===65535||r>=131071)||s===65536&&r>=131071)return o;for(let l=s;l<=r;l++){const i=at(l);if(!Ia(i))continue;const a=ah(i).filter(c=>{const u=c.codePointAt(0);return u<s||u>r});if(a.length&&(o.push(...a),n))break}return o}function hs(e,{escDigit:t,inCharClass:n,useFlagV:s}){if(zu.has(e))return zu.get(e);if(e<32||e>126&&e<160||e>262143||t&&Zx(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const r=n?s?Kx:Wx:zx,o=at(e);return(r.has(o)?"\\":"")+o}function Yx(e){const t=e.map(r=>r.codePointAt(0)).sort((r,o)=>r-o),n=[];let s=null;for(let r=0;r<t.length;r++)t[r+1]===t[r]+1?s??(s=t[r]):s===null?n.push(t[r]):(n.push([s,t[r]]),s=null);return n}function Jx(e,t,n){if(e)return">";let s="";if(t&&n){const{enable:r,disable:o}=t;s=(r!=null&&r.ignoreCase?"i":"")+(r!=null&&r.dotAll?"s":"")+(o?"-":"")+(o!=null&&o.ignoreCase?"i":"")+(o!=null&&o.dotAll?"s":"")}return`${s}:`}function Qx({kind:e,max:t,min:n}){let s;return!n&&t===1?s="?":!n&&t===1/0?s="*":n===1&&t===1/0?s="+":n===t?s=`{${n}}`:s=`{${n},${t===1/0?"":t}}`,s+{greedy:"",lazy:"?",possessive:"+"}[e]}function Wu({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function Zx(e){return e>47&&e<58}function Ku({type:e,value:t}){return e==="Character"&&t===45}var Fn,mn,ns,jn,ss,Rr,Di,Gn,e$=(Gn=class extends RegExp{constructor(n,s,r){var t=(...qT)=>(super(...qT),An(this,Rr),An(this,Fn,new Map),An(this,mn,null),An(this,ns),An(this,jn,null),An(this,ss,null),q(this,"rawOptions",{}),this);const o=!!(r!=null&&r.lazyCompile);if(n instanceof RegExp){if(r)throw new Error("Cannot provide options when copying a regexp");const l=n;t(l,s),Gt(this,ns,l.source),l instanceof Gn&&(Gt(this,Fn,ot(l,Fn)),Gt(this,jn,ot(l,jn)),Gt(this,ss,ot(l,ss)),this.rawOptions=l.rawOptions)}else{const l={hiddenCaptures:[],strategy:null,transfers:[],...r};t(o?"":n,s),Gt(this,ns,n),Gt(this,Fn,n$(l.hiddenCaptures,l.transfers)),Gt(this,ss,l.strategy),this.rawOptions=r??{}}o||Gt(this,mn,this)}get source(){return ot(this,ns)||"(?:)"}exec(n){if(!ot(this,mn)){const{lazyCompile:o,...l}=this.rawOptions;Gt(this,mn,new Gn(ot(this,ns),this.flags,l))}const s=this.global||this.sticky,r=this.lastIndex;if(ot(this,ss)==="clip_search"&&s&&r){this.lastIndex=0;const o=gl(this,Rr,Di).call(this,n.slice(r));return o&&(t$(o,r,n,this.hasIndices),this.lastIndex+=r),o}return gl(this,Rr,Di).call(this,n)}},Fn=new WeakMap,mn=new WeakMap,ns=new WeakMap,jn=new WeakMap,ss=new WeakMap,Rr=new WeakSet,Di=function(n){ot(this,mn).lastIndex=this.lastIndex;const s=Oa(Gn.prototype,this,"exec").call(ot(this,mn),n);if(this.lastIndex=ot(this,mn).lastIndex,!s||!ot(this,Fn).size)return s;const r=[...s];s.length=1;let o;this.hasIndices&&(o=[...s.indices],s.indices.length=1);const l=[0];for(let i=1;i<r.length;i++){const{hidden:a,transferTo:c}=ot(this,Fn).get(i)??{};if(a?l.push(null):(l.push(s.length),s.push(r[i]),this.hasIndices&&s.indices.push(o[i])),c&&r[i]!==void 0){const u=l[c];if(!u)throw new Error(`Invalid capture transfer to "${u}"`);if(s[u]=r[i],this.hasIndices&&(s.indices[u]=o[i]),s.groups){ot(this,jn)||Gt(this,jn,s$(this.source));const d=ot(this,jn).get(c);d&&(s.groups[d]=r[i],this.hasIndices&&(s.indices.groups[d]=o[i]))}}}return s},Gn);function t$(e,t,n,s){if(e.index+=t,e.input=n,s){const r=e.indices;for(let l=0;l<r.length;l++){const i=r[l];i&&(r[l]=[i[0]+t,i[1]+t])}const o=r.groups;o&&Object.keys(o).forEach(l=>{const i=o[l];i&&(o[l]=[i[0]+t,i[1]+t])})}}function n$(e,t){const n=new Map;for(const s of e)n.set(s,{hidden:!0});for(const[s,r]of t)for(const o of r)Ir(n,o,{}).transferTo=s;return n}function s$(e){const t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map;let s=0,r=0,o;for(;o=t.exec(e);){const{0:l,groups:{capture:i,name:a}}=o;l==="["?s++:s?l==="]"&&s--:i&&(r++,a&&n.set(r,a))}return n}function r$(e,t){const n=o$(e,t);return n.options?new e$(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function o$(e,t){const n=ih(t),s=Zp(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:Aa}),r=Nx(s,{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),o=Ux(r,n),l=wx(o.pattern,{captureTransfers:o._captureTransfers,hiddenCaptures:o._hiddenCaptures,mode:"external"}),i=_x(l.pattern),a=yx(i.pattern,{captureTransfers:l.captureTransfers,hiddenCaptures:l.hiddenCaptures}),c={pattern:a.pattern,flags:`${n.hasIndices?"d":""}${n.global?"g":""}${o.flags}${o.options.disable.v?"u":"v"}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const u=a.hiddenCaptures.sort((h,v)=>h-v),d=Array.from(a.captureTransfers),f=r._strategy,p=c.pattern.length>=n.lazyCompileLength;(u.length||d.length||f||p)&&(c.options={...u.length&&{hiddenCaptures:u},...d.length&&{transfers:d},...f&&{strategy:f},...p&&{lazyCompile:p}})}return c}const Xu=4294967295;class l${constructor(t,n={}){q(this,"regexps");this.patterns=t,this.options=n;const{forgiving:s=!1,cache:r,regexConstructor:o}=n;if(!o)throw new Error("Option `regexConstructor` is not provided");this.regexps=t.map(l=>{if(typeof l!="string")return l;const i=r==null?void 0:r.get(l);if(i){if(i instanceof RegExp)return i;if(s)return null;throw i}try{const a=o(l);return r==null||r.set(l,a),a}catch(a){if(r==null||r.set(l,a),s)return null;throw a}})}findNextMatchSync(t,n,s){const r=typeof t=="string"?t:t.content,o=[];function l(i,a,c=0){return{index:i,captureIndices:a.indices.map(u=>u==null?{start:Xu,end:Xu,length:0}:{start:u[0]+c,end:u[1]+c,length:u[1]-u[0]})}}for(let i=0;i<this.regexps.length;i++){const a=this.regexps[i];if(a)try{a.lastIndex=n;const c=a.exec(r);if(!c)continue;if(c.index===n)return l(i,c,0);o.push([i,c,0])}catch(c){if(this.options.forgiving)continue;throw c}}if(o.length){const i=Math.min(...o.map(a=>a[1].index));for(const[a,c,u]of o)if(c.index===i)return l(a,c,u)}return null}}function i$(e,t){return r$(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function a$(e={}){const t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||(t.regexConstructor=n=>i$(n,{target:t.target})),{createScanner(n){return new l$(n,t)},createString(n){return{content:n}}}}const c$=Object.freeze(JSON.parse('{"displayName":"JSON","name":"json","patterns":[{"include":"#value"}],"repository":{"array":{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.array.begin.json"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.array.end.json"}},"name":"meta.structure.array.json","patterns":[{"include":"#value"},{"match":",","name":"punctuation.separator.array.json"},{"match":"[^]\\\\s]","name":"invalid.illegal.expected-array-separator.json"}]},"comments":{"patterns":[{"begin":"/\\\\*\\\\*(?!/)","captures":{"0":{"name":"punctuation.definition.comment.json"}},"end":"\\\\*/","name":"comment.block.documentation.json"},{"begin":"/\\\\*","captures":{"0":{"name":"punctuation.definition.comment.json"}},"end":"\\\\*/","name":"comment.block.json"},{"captures":{"1":{"name":"punctuation.definition.comment.json"}},"match":"(//).*$\\\\n?","name":"comment.line.double-slash.js"}]},"constant":{"match":"\\\\b(?:true|false|null)\\\\b","name":"constant.language.json"},"number":{"match":"-?(?:0|[1-9]\\\\d*)(?:(?:\\\\.\\\\d+)?(?:[Ee][-+]?\\\\d+)?)?","name":"constant.numeric.json"},"object":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.dictionary.begin.json"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.dictionary.end.json"}},"name":"meta.structure.dictionary.json","patterns":[{"include":"#objectkey"},{"include":"#comments"},{"begin":":","beginCaptures":{"0":{"name":"punctuation.separator.dictionary.key-value.json"}},"end":"(,)|(?=})","endCaptures":{"1":{"name":"punctuation.separator.dictionary.pair.json"}},"name":"meta.structure.dictionary.value.json","patterns":[{"include":"#value"},{"match":"[^,\\\\s]","name":"invalid.illegal.expected-dictionary-separator.json"}]},{"match":"[^}\\\\s]","name":"invalid.illegal.expected-dictionary-separator.json"}]},"objectkey":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.support.type.property-name.begin.json"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.support.type.property-name.end.json"}},"name":"string.json support.type.property-name.json","patterns":[{"include":"#stringcontent"}]},"string":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.json"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.json"}},"name":"string.quoted.double.json","patterns":[{"include":"#stringcontent"}]},"stringcontent":{"patterns":[{"match":"\\\\\\\\(?:[\\"/\\\\\\\\bfnrt]|u\\\\h{4})","name":"constant.character.escape.json"},{"match":"\\\\\\\\.","name":"invalid.illegal.unrecognized-string-escape.json"}]},"value":{"patterns":[{"include":"#constant"},{"include":"#number"},{"include":"#string"},{"include":"#array"},{"include":"#object"},{"include":"#comments"}]}},"scopeName":"source.json"}')),u$=[c$],Fi=z(null),vh=z(!1);let eo=null;const d$={name:"devtools-light",type:"light",bg:"transparent",fg:"#000000",settings:[{scope:["string"],settings:{foreground:"#2c7a4e"}},{scope:["constant.numeric"],settings:{foreground:"#5b3fcb"}},{scope:["constant.language.boolean","constant.language"],settings:{foreground:"#b86b00"}},{scope:["constant.language.null"],settings:{foreground:"rgba(0,0,0,0.4)"}},{scope:["support.type.property-name"],settings:{foreground:"#000000"}},{scope:["punctuation"],settings:{foreground:"rgba(0,0,0,0.4)"}}]};function f$(){return eo||(eo=Ck({themes:[d$],langs:[u$],engine:a$()}).then(e=>(Fi.value=e,vh.value=!0,e)),eo)}function p$(){De(f$);function e(t){const n=typeof t=="string"?t:JSON.stringify(t,null,2);return n?Fi.value?Fi.value.codeToHtml(n,{lang:"json",theme:"devtools-light"}):h$(n):""}return{highlight:e,ready:vh}}function h$(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}const g$={key:0,class:"text-view"},m$=["innerHTML"],v$={__name:"JsonView",props:{data:{default:null}},setup(e){const t=e,{highlight:n}=p$(),s=W(()=>typeof t.data=="string"),r=W(()=>t.data===null||t.data===void 0?'<span class="json-view__null">null</span>':n(t.data));return(o,l)=>s.value?(m(),w("pre",g$,E(t.data),1)):(m(),w("div",{key:1,class:"json-view",innerHTML:r.value},null,8,m$))}},_n=ke(v$,[["__scopeId","data-v-8873787a"]]),y$=["id","value","disabled"],_$={key:0,value:"",disabled:""},b$=["value"],w$={__name:"Select",props:{modelValue:{type:[String,Number,null],default:null},options:{type:Array,default:()=>[]},placeholder:{type:String,default:void 0},disabled:{type:Boolean,default:!1},size:{type:String,default:"md"},id:{type:String,default:void 0}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t,s=o=>typeof o=="object"&&o!==null?o:{value:o,label:String(o)},r=o=>n("update:modelValue",o.target.value);return(o,l)=>(m(),w("select",{id:e.id,class:ge(["pc-select",`pc-select--${e.size}`]),value:e.modelValue??"",disabled:e.disabled,onChange:r},[e.placeholder!==void 0?(m(),w("option",_$,E(e.placeholder),1)):K("",!0),(m(!0),w(te,null,pe(e.options.map(s),i=>(m(),w("option",{key:i.value,value:i.value},E(i.label),9,b$))),128))],42,y$))}},Yu=ke(w$,[["__scopeId","data-v-39f6d012"]]),C$={key:0,class:"pc-callout__stripe"},S$={class:"pc-callout__body"},k$={key:0,class:"pc-callout__eyebrow"},x$={key:1,class:"pc-callout__title"},$$={key:2,class:"pc-callout__content"},E$={key:3,class:"pc-callout__actions"},A$={__name:"Callout",props:{variant:{type:String,default:"info"},eyebrow:{type:String,default:""},title:{type:String,default:""},stripe:{type:Boolean,default:!1},dismissible:{type:Boolean,default:!1}},emits:["dismiss"],setup(e,{emit:t}){const n=t;return(s,r)=>(m(),w("div",{class:ge(["pc-callout",`pc-callout--${e.variant}`,{"pc-callout--with-stripe":e.stripe}])},[e.stripe?(m(),w("div",C$)):K("",!0),g("div",S$,[e.eyebrow?(m(),w("div",k$,E(e.eyebrow),1)):K("",!0),e.title?(m(),w("div",x$,E(e.title),1)):K("",!0),s.$slots.default?(m(),w("div",$$,[ue(s.$slots,"default",{},void 0,!0)])):K("",!0),s.$slots.actions?(m(),w("div",E$,[ue(s.$slots,"actions",{},void 0,!0)])):K("",!0)]),e.dismissible?(m(),w("button",{key:1,type:"button",class:"pc-callout__close","aria-label":"Dismiss",onClick:r[0]||(r[0]=o=>n("dismiss"))},[...r[1]||(r[1]=[g("svg",{width:"12",height:"12",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true"},[g("path",{d:"M4 4l6 6M10 4l-6 6",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round"})],-1)])])):K("",!0)],2))}},I$=ke(A$,[["__scopeId","data-v-c9c90c72"]]),R$={class:"page-body"},T$={class:"exec-layout"},N$={class:"exec-list"},P$=["onClick"],O$={class:"exec-row__top"},L$={class:"exec-row__name"},M$={class:"exec-row__meta"},D$={class:"exec-row__id"},F$={key:0,class:"exec-center"},j$={class:"exec-id"},B$={class:"exec-id__core"},G$={class:"exec-id__name"},V$={class:"exec-id__hash"},U$={class:"exec-id__actions"},H$={key:1,class:"exec-inspector"},q$={class:"exec-sub-row"},z$={class:"exec-sub-id"},W$={class:"timeline"},K$={class:"timeline__type"},X$={class:"timeline__step"},Y$={class:"timeline__time"},J$={class:"signal-modal"},Q$={key:0,class:"signal-modal__routes"},Z$={class:"signal-modal__field"},eE={key:1,class:"signal-modal__error"},tE={__name:"WorkflowExecutions",setup(e){const t=tl(),n=el(),s=Dr(),r=z([]),o=z([]),l=z(""),i=z(null),a=z(""),c=z(typeof t.query.status=="string"?t.query.status:""),u=z(typeof t.query.workflow=="string"?t.query.workflow:""),d=z(Date.now()),f=z(!1),p=z("{}"),h=z(null),v=z(!1),_=z(!1),y=z([]);let k=null,C=null;async function R(){const b=await fetch(Me("/workflows"));if(!b.ok)return;const A=await b.json();r.value=A.workflows}async function j(){var F;const b=new URLSearchParams;c.value&&b.set("status",c.value),u.value&&b.set("workflow",u.value),b.set("limit","100");const A=await fetch(Me(`/workflow/executions?${b.toString()}`));if(!A.ok)return;const T=await A.json();o.value=T.executions,!l.value&&o.value[0]&&(l.value=o.value[0].id),!y.value.length&&l.value&&!o.value.some(oe=>oe.id===l.value)&&(l.value=((F=o.value[0])==null?void 0:F.id)??"")}async function O(b){if(!b){i.value=null;return}const A=await fetch(Me(`/workflow/executions/${b}`));if(!A.ok)return;const T=await A.json();i.value=T.execution,(!a.value||!T.execution.steps[a.value])&&(a.value=T.execution.currentStep||Object.keys(T.execution.steps)[0]||"")}async function L(){await j(),l.value&&await O(l.value)}function U(b){if(!b)return"—";const A=Date.now()-b;return A<1e3?"now":A<6e4?`${Math.floor(A/1e3)}s ago`:A<36e5?`${Math.floor(A/6e4)}m ago`:`${Math.floor(A/36e5)}h ago`}function P(b){return(b==null?void 0:b.slice(0,8))??""}function D(){const b={};u.value&&(b.workflow=u.value),c.value&&(b.status=c.value),l.value&&(b.execution=l.value),n.replace({query:b})}De(async()=>{await R(),await j(),l.value=typeof t.query.execution=="string"?t.query.execution:l.value,await O(l.value),k=setInterval(L,2e3),C=setInterval(()=>{d.value=Date.now()},1e3)}),ct(()=>{k&&clearInterval(k),C&&clearInterval(C)}),Re([c,u],async()=>{D(),await L()}),Re(l,async b=>{D(),await O(b)}),Re(()=>s.value[0],async b=>{var A;(A=b==null?void 0:b.type)!=null&&A.startsWith("workflow:")&&await L()});const Y=W(()=>i.value?r.value.find(b=>b.name===i.value.workflow&&b.version===i.value.workflowVersion)??null:null);Re([i,Y],([b,A])=>{!b||!A||a.value&&b.steps[a.value]||(a.value=b.currentStep||Object.keys(b.steps)[0]||A.graph.start)});const x=W(()=>{var b,A;return((A=(b=i.value)==null?void 0:b.steps)==null?void 0:A[a.value])??null}),M=W(()=>{var b;return((b=x.value)==null?void 0:b.childExecutionId)??null});function V(b){y.value=[],l.value=b}function fe(){!M.value||!i.value||(y.value=[...y.value,{id:l.value,label:i.value.workflow}],a.value="",l.value=M.value)}const me=W(()=>{var A;const b={label:((A=i.value)==null?void 0:A.workflow)??"execution",id:l.value};return[...y.value,b].map((T,F)=>({label:T.label,id:T.id,index:F}))});function _e(b){y.value=y.value.slice(0,b.index),a.value="",l.value=b.id}const de=W(()=>{var b;return(((b=i.value)==null?void 0:b.journal)??[]).slice().sort((A,T)=>T.at-A.at)}),Te=W(()=>{var T;const b=Y.value,A=(T=i.value)==null?void 0:T.currentStep;return!b||!A?null:b.graph.nodes.find(F=>F.name===A)??null}),Be=W(()=>{var b,A;return((b=i.value)==null?void 0:b.status)==="suspended"&&((A=Te.value)==null?void 0:A.type)==="wait"}),Ze=W(()=>{var b;return["queued","waiting","running","suspended"].includes((b=i.value)==null?void 0:b.status)}),qe=W(()=>{var b,A;return((b=i.value)==null?void 0:b.status)==="failed"&&((A=i.value)==null?void 0:A.currentStep)!=null}),X=W(()=>{var T;const b=Y.value,A=(T=i.value)==null?void 0:T.currentStep;return!b||!A?[]:b.graph.edges.filter(F=>F.from===A).map(F=>F.label).filter(Boolean)}),ne=W(()=>{const b=i.value;if(!b||!b.currentStep)return null;const A=(b.journal??[]).filter(T=>T.type==="step.suspended"&&T.step===b.currentStep&&T.timeoutAt);return A.length?A[A.length-1].timeoutAt:null}),se=W(()=>{if(!ne.value)return null;const b=ne.value-d.value;return b<=0?"firing now":`${Math.ceil(b/1e3)}s`}),we=W(()=>[{value:"",label:"All workflows"},...r.value.map(b=>({value:b.name,label:b.name}))]),B=[{value:"",label:"All statuses"},{value:"queued",label:"Queued"},{value:"waiting",label:"Waiting"},{value:"running",label:"Running"},{value:"succeeded",label:"Succeeded"},{value:"failed",label:"Failed"},{value:"canceled",label:"Canceled"}];function H(b){switch(b){case"running":return"paused";case"succeeded":return"active";case"failed":return"failed";case"canceled":return"draft";case"waiting":return"warning";default:return"default"}}const Q=W(()=>{const b=i.value;return b?[{label:"Status",value:b.status},{label:"Current step",value:b.currentStep||"terminal"},{label:"Created",value:new Date(b.createdAt).toLocaleString()},{label:"Updated",value:new Date(b.updatedAt).toLocaleString()}]:[]}),ie=W(()=>{const b=x.value;if(!b)return[];const A=[{label:"Status",value:b.status},{label:"Attempts",value:b.attempts}];return b.route&&A.push({label:"Route",value:b.route}),b.startedAt&&A.push({label:"Started",value:new Date(b.startedAt).toLocaleTimeString()}),b.endedAt&&A.push({label:"Ended",value:new Date(b.endedAt).toLocaleTimeString()}),b.idempotencyKey&&A.push({label:"Idempotency key",value:b.idempotencyKey}),A});function he(){p.value=X.value.length?`{ "route": "${X.value[0]}" }`:"{}",h.value=null,f.value=!0}async function S(){let b;try{b=p.value.trim()?JSON.parse(p.value):{}}catch(A){h.value=`Invalid JSON: ${A.message}`;return}v.value=!0,h.value=null;try{const A=await fetch(Me(`/workflow/executions/${l.value}/signal`),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({payload:b})}),T=await A.json().catch(()=>({}));if(!A.ok){h.value=T.error||"Signal failed.";return}f.value=!1,await L()}catch(A){h.value=A.message}finally{v.value=!1}}async function $(b,A,T){_.value=!0;try{const F=await fetch(Me(`/workflow/executions/${l.value}/${b}`),{method:"POST"}),oe=await F.json().catch(()=>({}));F.ok?Xe.success(`Execution ${T}`):Xe.error(`${A} failed`,{description:oe.error||"The action could not be completed."}),await L()}catch(F){Xe.error(`${A} failed`,{description:F.message})}finally{_.value=!1}}return(b,A)=>(m(),w("div",null,[N(Xt,{eyebrow:"Runs",title:"Executions",subtitle:"Live and historical workflow runs, with per-step state and a journal timeline."},{actions:I(()=>[N(Yu,{modelValue:u.value,"onUpdate:modelValue":A[0]||(A[0]=T=>u.value=T),options:we.value},null,8,["modelValue","options"]),N(Yu,{modelValue:c.value,"onUpdate:modelValue":A[1]||(A[1]=T=>c.value=T),options:B},null,8,["modelValue"])]),_:1}),g("div",R$,[g("div",T$,[g("aside",N$,[N(ze,null,{default:I(()=>[N(is,{"max-height":"calc(100vh - 220px)"},{default:I(()=>[(m(!0),w(te,null,pe(o.value,T=>(m(),w("button",{key:T.id,type:"button",class:ge(["exec-row",{"exec-row--active":T.id===l.value}]),onClick:F=>V(T.id)},[g("div",O$,[g("span",L$,E(T.workflow),1),N(rt,{variant:H(T.status),size:"sm"},{default:I(()=>[ce(E(T.status),1)]),_:2},1032,["variant"])]),g("div",M$,[g("span",D$,E(P(T.id)),1),g("span",null,E(T.currentStep||"terminal"),1),g("span",null,E(U(T.updatedAt)),1)])],10,P$))),128)),o.value.length?K("",!0):(m(),J(Ye,{key:0,title:"No executions",description:"Runs matching the filters will appear here."}))]),_:1})]),_:1})]),i.value&&Y.value?(m(),w("section",F$,[y.value.length?(m(),J(up,{key:0,items:me.value,separator:"›",onSelect:_e},null,8,["items"])):K("",!0),g("header",j$,[g("div",B$,[g("h2",G$,E(i.value.workflow),1),g("code",V$,E(i.value.id),1)]),g("div",U$,[N(rt,{variant:H(i.value.status),dot:""},{default:I(()=>[ce(E(i.value.status),1)]),_:1},8,["variant"]),Be.value?(m(),J(Ke,{key:0,size:"sm",variant:"primary",icon:"lucide:bell",onClick:he},{default:I(()=>[...A[7]||(A[7]=[ce(" Signal ",-1)])]),_:1})):K("",!0),qe.value?(m(),J(Ke,{key:1,size:"sm",variant:"ghost",icon:"lucide:rotate-ccw",loading:_.value,onClick:A[2]||(A[2]=T=>$("resume","Resume","resumed"))},{default:I(()=>[...A[8]||(A[8]=[ce(" Resume ",-1)])]),_:1},8,["loading"])):K("",!0),Ze.value?(m(),J(Ke,{key:2,size:"sm",variant:"danger",loading:_.value,onClick:A[3]||(A[3]=T=>$("cancel","Cancel","canceled"))},{default:I(()=>[...A[9]||(A[9]=[ce(" Cancel ",-1)])]),_:1},8,["loading"])):K("",!0)])]),N(ip,{graph:Y.value.graph,execution:i.value,"selected-step":a.value,onSelectStep:A[4]||(A[4]=T=>a.value=T)},null,8,["graph","execution","selected-step"]),i.value.input!=null?(m(),J(ze,{key:1,title:"Input"},{default:I(()=>[N(Ee,null,{default:I(()=>[N(_n,{data:i.value.input},null,8,["data"])]),_:1})]),_:1})):K("",!0),i.value.output!=null?(m(),J(ze,{key:2,title:"Output"},{default:I(()=>[N(Ee,null,{default:I(()=>[N(_n,{data:i.value.output},null,8,["data"])]),_:1})]),_:1})):K("",!0),i.value.error?(m(),J(ze,{key:3,accent:"lavender",title:"Error"},{default:I(()=>[N(Ee,null,{default:I(()=>[N(_n,{data:i.value.error},null,8,["data"])]),_:1})]),_:1})):K("",!0)])):K("",!0),i.value&&Y.value?(m(),w("aside",H$,[N(ze,{title:"Execution"},{default:I(()=>[N(Ee,null,{default:I(()=>[N(Zn,{layout:"divided",boxed:"",compact:"",items:Q.value},null,8,["items"])]),_:1})]),_:1}),x.value?(m(),J(ze,{key:0,title:`Step · ${a.value}`},{default:I(()=>[x.value.status==="awaiting"&&se.value?(m(),J(Ee,{key:0,flush:""},{default:I(()=>[N(I$,{variant:"info",class:"exec-wait",eyebrow:"Waiting for signal"},{default:I(()=>[ce(" Timeout route fires in "+E(se.value)+". ",1)]),_:1})]),_:1})):K("",!0),N(Ee,null,{default:I(()=>[N(Zn,{layout:"divided",boxed:"",compact:"",items:ie.value},null,8,["items"])]),_:1}),M.value?(m(),J(Ee,{key:1,label:"Subworkflow"},{default:I(()=>[g("div",q$,[g("span",z$,E(M.value.slice(0,8)),1),N(Ke,{size:"sm",variant:"ghost",icon:"lucide:corner-down-right",onClick:fe},{default:I(()=>[...A[10]||(A[10]=[ce(" Open child execution ",-1)])]),_:1})])]),_:1})):K("",!0),x.value.output!=null&&x.value.output!==x.value.route?(m(),J(Ee,{key:2,label:"Output"},{default:I(()=>[N(_n,{data:x.value.output},null,8,["data"])]),_:1})):K("",!0),x.value.error?(m(),J(Ee,{key:3,label:"Error"},{default:I(()=>[N(_n,{data:x.value.error},null,8,["data"])]),_:1})):K("",!0)]),_:1},8,["title"])):K("",!0),N(ze,{title:"Journal"},{default:I(()=>[N(Ee,{flush:""},{default:I(()=>[g("div",W$,[(m(!0),w(te,null,pe(de.value,(T,F)=>(m(),w("div",{key:F,class:"timeline__row"},[g("span",K$,E(T.type),1),g("span",X$,E(T.step||T.route||"—"),1),g("span",Y$,E(new Date(T.at).toLocaleTimeString()),1)]))),128)),de.value.length?K("",!0):(m(),J(Ye,{key:0,title:"No journal entries"}))])]),_:1})]),_:1})])):K("",!0)]),!o.value.length&&!i.value?(m(),J(Ye,{key:0,title:"No executions yet",description:"Workflow runs will appear here as they are queued and processed."})):K("",!0)]),N(ap,{modelValue:f.value,"onUpdate:modelValue":A[6]||(A[6]=T=>f.value=T),title:"Signal execution"},{footer:I(({close:T})=>[N(Ke,{variant:"ghost",onClick:T},{default:I(()=>[...A[12]||(A[12]=[ce("Cancel",-1)])]),_:1},8,["onClick"]),N(Ke,{variant:"primary",loading:v.value,"loading-label":"Sending",onClick:S},{default:I(()=>[...A[13]||(A[13]=[ce(" Send signal ",-1)])]),_:1},8,["loading"])]),default:I(()=>[g("div",J$,[X.value.length?(m(),w("p",Q$," Wait step routes to: "+E(X.value.join(", ")),1)):K("",!0),g("div",Z$,[A[11]||(A[11]=g("label",{class:"signal-modal__label"},"Signal payload (JSON)",-1)),N(cp,{modelValue:p.value,"onUpdate:modelValue":A[5]||(A[5]=T=>p.value=T),rows:6,invalid:!!h.value,placeholder:'{ "route": "resolved" }'},null,8,["modelValue","invalid"])]),h.value?(m(),w("p",eE,E(h.value),1)):K("",!0)])]),_:1},8,["modelValue"])]))}},nE=ke(tE,[["__scopeId","data-v-ed4c23f5"]]);function sE(e=1e3){const t=z(null),n=z(null),s=z(null),r=z(null),o=cs({});let l=null,i=null;async function a(){try{const v=await fetch(Me("/realtime/state"));if(!v.ok)throw new Error(`${v.status}`);t.value=await v.json(),r.value=null}catch(v){r.value=v.message}}async function c(v){try{const _=await fetch(Me(`/realtime/connection/${v}`));if(!_.ok)throw new Error(`${_.status}`);n.value=await _.json()}catch{}}async function u(v){try{const _=await fetch(Me(`/realtime/record/${encodeURIComponent(v)}`));if(!_.ok)throw new Error(`${_.status}`);const y=await _.json();o[v]=y.data}catch{o[v]=null}}function d(v){delete o[v]}async function f(v,_){try{const y=await fetch(Me(`/realtime/collection/${encodeURIComponent(v)}/records?connId=${encodeURIComponent(_)}`));if(!y.ok)throw new Error(`${y.status}`);return await y.json()}catch{return{recordIds:[],records:[]}}}async function p(v){s.value=v,v?await c(v):n.value=null}async function h(){await a(),s.value&&await c(s.value)}return De(()=>{h(),l=setInterval(h,e),i=new EventSource(Me("/events")),i.addEventListener("realtime:record:update",v=>{const{recordId:_,data:y}=JSON.parse(v.data);_ in o&&(o[_]=y)}),i.addEventListener("realtime:record:removed",v=>{const{recordId:_}=JSON.parse(v.data);_ in o&&(o[_]=null)})}),ct(()=>{l&&clearInterval(l),i&&i.close()}),{state:t,connectionDetail:n,selectedConnectionId:s,error:r,selectConnection:p,watchedRecords:o,watchRecord:u,unwatchRecord:d,fetchCollectionRecords:f}}const rE={class:"conn-picker"},oE={key:0,class:"conn-item__count"},lE=["onClick"],iE={class:"conn-item__stack"},aE={key:0,class:"conn-item__label"},cE=["title"],uE={key:0,class:"conn-item__meta",title:"Last measured round-trip time"},dE={class:"conn-item__meta-value"},fE={__name:"ConnectionPicker",props:{connections:{type:Array,default:()=>[]},selectedId:{type:String,default:null}},emits:["select"],setup(e){return(t,n)=>(m(),w("div",rE,[g("button",{type:"button",class:ge(["conn-item",{"conn-item--active":!e.selectedId}]),onClick:n[0]||(n[0]=s=>t.$emit("select",null))},[n[1]||(n[1]=g("span",{class:"conn-item__label"},"All connections",-1)),e.connections.length?(m(),w("span",oE,E(e.connections.length),1)):K("",!0)],2),(m(!0),w(te,null,pe(e.connections,s=>(m(),w("button",{key:s.id,type:"button",class:ge(["conn-item",{"conn-item--active":e.selectedId===s.id}]),onClick:r=>t.$emit("select",s.id)},[g("span",iE,[s.label?(m(),w("span",aE,E(s.label),1)):K("",!0),g("span",{class:ge(["conn-item__id",{"conn-item__id--solo":!s.label}]),title:s.id},E(s.id.slice(0,8)),11,cE)]),s.latency!==null?(m(),w("span",uE,[n[2]||(n[2]=g("span",{class:"conn-item__meta-label"},"rtt",-1)),g("span",dE,E(s.latency)+"ms",1)])):K("",!0)],10,lE))),128))]))}},pE=ke(fE,[["__scopeId","data-v-f72f1b17"]]),hE=["aria-selected","disabled","onClick"],gE={key:0,class:"pc-tab__badge"},mE={__name:"Tabs",props:{modelValue:{type:[String,Number],default:null},tabs:{type:Array,required:!0},variant:{type:String,default:"underline"},size:{type:String,default:"md"}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,s=t,r=z(null),o=z({opacity:0}),l=z(!1),i=W(()=>n.tabs.findIndex(u=>u.value===n.modelValue)),a=()=>{const u=r.value;if(!u)return;const d=u.querySelectorAll(".pc-tab")[i.value];if(!d){o.value={opacity:0};return}o.value={opacity:1,transform:`translateX(${d.offsetLeft}px)`,width:`${d.offsetWidth}px`}};let c=null;return De(()=>{cn(()=>{a(),requestAnimationFrame(()=>{l.value=!0})}),c=new ResizeObserver(()=>a()),r.value&&c.observe(r.value)}),us(()=>c==null?void 0:c.disconnect()),Re(()=>[n.modelValue,n.variant,n.size,n.tabs.length],()=>cn(a)),(u,d)=>(m(),w("div",{ref_key:"rootRef",ref:r,class:ge(["pc-tabs",`pc-tabs--${e.variant}`,`pc-tabs--${e.size}`]),role:"tablist"},[g("span",{class:ge(["pc-tabs__indicator",{"pc-tabs__indicator--animate":l.value}]),style:nt(o.value)},null,6),(m(!0),w(te,null,pe(e.tabs,f=>(m(),w("button",{key:f.value,type:"button",role:"tab","aria-selected":e.modelValue===f.value,disabled:f.disabled,class:ge(["pc-tab",{"pc-tab--active":e.modelValue===f.value,"pc-tab--disabled":f.disabled}]),onClick:p=>!f.disabled&&s("update:modelValue",f.value)},[g("span",null,E(f.label),1),f.badge!=null?(m(),w("span",gE,E(f.badge),1)):K("",!0)],10,hE))),128))],2))}},ji=ke(mE,[["__scopeId","data-v-a428596d"]]),vE={class:"rt-status"},yE={key:0,class:"rt-instance"},_E={class:"page-body"},bE={class:"rt-layout"},wE={class:"rt-sidebar"},CE={class:"rt-sidebar__body"},SE={class:"rt-content"},kE={__name:"Realtime",setup(e){const t=tl(),n=el();function s(j){c(j),n.push("/realtime/metadata")}function r(j){n.push(`/realtime/${j}`)}const{state:o,connectionDetail:l,selectedConnectionId:i,error:a,selectConnection:c,watchedRecords:u,watchRecord:d,unwatchRecord:f,fetchCollectionRecords:p}=sE(),h=W(()=>{var j;return(j=o.value)!=null&&j.rooms?i.value?o.value.rooms.filter(O=>O.members.includes(i.value)):o.value.rooms:[]}),v=W(()=>{var O;if(!((O=o.value)!=null&&O.channels))return{};if(!i.value)return o.value.channels;const j={};for(const[L,U]of Object.entries(o.value.channels))U.includes(i.value)&&(j[L]=U);return j}),_=W(()=>{var O;if(!((O=o.value)!=null&&O.collections))return{};if(!i.value)return o.value.collections;const j={};for(const[L,U]of Object.entries(o.value.collections))U.subscribers[i.value]&&(j[L]=U);return j}),y=W(()=>{var O;if(!((O=o.value)!=null&&O.records))return{};if(!i.value)return o.value.records;const j={};for(const[L,U]of Object.entries(o.value.records))U.subscribers[i.value]&&(j[L]=U);return j}),k=W(()=>{var O;const j=(O=o.value)==null?void 0:O.exposed;return j?Object.values(j).reduce((L,U)=>L+(Array.isArray(U)?U.length:0),0):0}),C=W(()=>[{value:"rooms",label:"Rooms",badge:h.value.length},{value:"channels",label:"Channels",badge:Object.keys(v.value).length},{value:"collections",label:"Collections",badge:Object.keys(_.value).length},{value:"records",label:"Records",badge:Object.keys(y.value).length},{value:"metadata",label:"Metadata"},{value:"exposed",label:"Exposed",badge:k.value}]),R=W(()=>t.path.split("/")[2]||"rooms");return(j,O)=>{var U,P;const L=Vd("router-view");return m(),w("div",null,[N(Xt,{eyebrow:"WebSocket",title:"Realtime",subtitle:"Live inspector for rooms, channels, collections, records, and connection metadata."},{actions:I(()=>{var D;return[g("div",vE,[g("span",{class:ge(["rt-pulse",{"rt-pulse--down":!!G(a)}])},null,2),G(o)?(m(),w("span",yE,"instance "+E((D=G(o).instanceId)==null?void 0:D.slice(0,8)),1)):K("",!0)])]}),_:1}),g("div",_E,[N(ji,{"model-value":R.value,tabs:C.value,variant:"underline","onUpdate:modelValue":r},null,8,["model-value","tabs"]),g("div",bE,[g("aside",wE,[N(ze,{title:"Connections"},{default:I(()=>[N(Ee,{flush:""},{default:I(()=>{var D;return[g("div",CE,[N(pE,{connections:((D=G(o))==null?void 0:D.connections)||[],"selected-id":G(i),onSelect:G(c)},null,8,["connections","selected-id","onSelect"])])]}),_:1})]),_:1})]),g("div",SE,[N(L,{rooms:h.value,channels:v.value,collections:_.value,records:y.value,detail:G(l),connections:((U=G(o))==null?void 0:U.connections)||[],exposed:((P=G(o))==null?void 0:P.exposed)||{},"fetch-records":G(p),"watched-records":G(u),"watch-record":G(d),"unwatch-record":G(f),onNavigate:s},null,8,["rooms","channels","collections","records","detail","connections","exposed","fetch-records","watched-records","watch-record","unwatch-record"])])])])])}}},xE=ke(kE,[["__scopeId","data-v-8518aae1"]]),$E={__name:"SectionLabel",props:{size:{type:String,default:"sm"},dark:{type:Boolean,default:!1}},setup(e){return(t,n)=>(m(),w("div",{class:ge(["pc-section-label",`pc-section-label--${e.size}`,{"pc-section-label--dark":e.dark}])},[ue(t.$slots,"default",{},void 0,!0)],2))}},EE=ke($E,[["__scopeId","data-v-4dff4d3d"]]),AE={class:"page-body"},IE={class:"page-section"},RE={class:"cells-toolbar"},TE={class:"cell-counts"},NE={class:"cell-counts__stat"},PE={class:"cell-counts__stat",style:{color:"var(--status-paused)"}},OE={class:"cell-counts__stat",style:{color:"var(--status-failed)"}},LE={key:0},ME={key:0,class:"ctable"},DE=["onClick"],FE={class:"ctable__col ctable__col--name"},jE=["title"],BE={class:"ctable__col ctable__col--deps"},GE={class:"ctable__col ctable__col--status"},VE={class:"ctable__col ctable__col--updated"},UE={key:1},HE=["width","height"],qE=["d","marker-end"],zE=["transform","onClick"],WE=["width","height"],KE=["fill"],XE=["id"],YE=["width","height"],JE=["clip-path"],QE=["x"],ZE=["x"],eA={key:0,class:"page-section"},tA={class:"detail-title"},nA={class:"detail-sub"},sA={class:"detail-aside"},rA={class:"detail-box detail-box--scroll"},oA={class:"detail-template"},lA={class:"detail-box detail-error"},iA={key:1,class:"detail-hint"},aA={key:2,class:"detail-hint"},cA=90,Zs=24,uA={__name:"Cells",props:{config:Object},setup(e){const t=e,n=W(()=>{var X;return((X=t.config)==null?void 0:X.cells)??[]}),s=z(null),r=z([]),o=z("table"),l=z(null),i=z(0);let a=null;const c=z(null),u=W(()=>c.value?r.value.find(X=>X.name===c.value)??null:null),d=z([]),f=Dr();let p=null,h=null,v=0;const _=z(new Map);Re(n,X=>{X.length&&!X.includes(s.value)&&(s.value=X[0])},{immediate:!0}),Re(s,()=>{r.value=[],c.value=null,d.value=[],_.value.clear(),v=Date.now(),y()});async function y(){if(!s.value)return;const X=await fetch(Me(`/cells/${encodeURIComponent(s.value)}`));if(X.ok){const ne=await X.json();r.value=ne.cells}}async function k(X){if(!s.value)return;const ne=await fetch(Me(`/cells/${encodeURIComponent(s.value)}/${encodeURIComponent(X)}/history?limit=50`));if(ne.ok){const se=await ne.json();c.value===X&&(d.value=se.entries)}}De(()=>{y(),p=setInterval(y,1500),h=setInterval(()=>{const X=Date.now(),ne=[];for(const[se,we]of _.value)X-we>800&&ne.push(se);for(const se of ne)_.value.delete(se)},200)}),ct(()=>{p&&clearInterval(p),h&&clearInterval(h),a&&a.disconnect()}),Re(l,X=>{a&&(a.disconnect(),a=null),X&&(a=new ResizeObserver(ne=>{i.value=ne[0].contentRect.width}),a.observe(X),i.value=X.clientWidth)}),Re(f,X=>{if(!s.value)return;const ne=X.filter(we=>we.type==="cells:change"&&we.ts>v&&we.data.graph===s.value);if(ne.length===0)return;v=Math.max(...ne.map(we=>we.ts));for(const we of ne)_.value.set(we.data.name,we.ts);const se=r.value;for(const we of ne){const B=se.findIndex(H=>H.name===we.data.name);B>=0&&(se[B]={...se[B],value:we.data.value,status:we.data.status,updatedAt:we.data.updatedAt})}c.value&&ne.some(we=>we.data.name===c.value)&&k(c.value)},{deep:!0});function C(X){c.value=X.name,d.value=[],(X==null?void 0:X.historyLimit)>0&&k(X.name)}function R(){c.value=null,d.value=[]}function j(X,ne){return X=String(X??""),X.length>ne?X.slice(0,ne-1)+"…":X}function O(X){if(X===void 0)return"—";if(X===null)return"null";if(typeof X=="string")return X.length>80?X.slice(0,80)+"…":X;if(typeof X=="number"||typeof X=="boolean")return String(X);try{const ne=JSON.stringify(X);return ne.length>80?ne.slice(0,80)+"…":ne}catch{return String(X)}}function L(X){if(!X)return"—";const ne=Date.now()-X;return ne<1e3?"just now":ne<6e4?`${Math.floor(ne/1e3)}s ago`:ne<36e5?`${Math.floor(ne/6e4)}m ago`:new Date(X).toLocaleTimeString()}const U=W(()=>{const X=new Map;for(const ne of r.value)X.set(ne.name,ne);return X}),P=W(()=>{const X=U.value,ne=new Set(X.keys()),se=new Set,we=[];for(;ne.size>0;){const B=[];for(const H of ne)X.get(H).deps.every(he=>!ne.has(he)||se.has(he))&&B.push(H);if(B.length===0)break;for(const H of B)ne.delete(H),se.add(H);we.push(B)}return we}),D={w:168,h:60},Y={y:28},x=W(()=>{const X=new Map,ne=P.value;if(ne.length===0)return{positions:X,width:0,height:0};const se=ne.length*D.w+(ne.length-1)*cA+Zs*2,we=Math.max(se,i.value||se),B=ne.length>1?(we-Zs*2-D.w)/(ne.length-1):0;let H=0;const Q=Math.max(...ne.map(ie=>ie.length*D.h+(ie.length-1)*Y.y));return ne.forEach((ie,he)=>{const S=ie.length*D.h+(ie.length-1)*Y.y,$=Math.max(0,(Q-S)/2);ie.forEach((b,A)=>{const T=he*B+Zs,F=$+A*(D.h+Y.y)+Zs;X.set(b,{x:T,y:F}),F+D.h>H&&(H=F+D.h)})}),{positions:X,width:we,height:H+Zs}}),M=W(()=>{const X=x.value.positions,ne=[];for(const se of r.value){const we=X.get(se.name);if(we)for(const B of se.deps){const H=X.get(B);H&&ne.push({x1:H.x+D.w,y1:H.y+D.h/2,x2:we.x,y2:we.y+D.h/2,from:B,to:se.name})}}return ne});function V(X){return _.value.has(X)}function fe(X){switch(X){case"current":return"var(--status-active)";case"pending":return"var(--status-paused)";case"stale":return"var(--status-warning)";case"error":return"var(--status-failed)";default:return"var(--ink-40)"}}function me(X){switch(X){case"pending":return"paused";case"stale":return"warning";case"error":return"failed";default:return"active"}}const _e=W(()=>{const X={current:0,pending:0,error:0,stale:0};for(const ne of r.value)X[ne.status]!==void 0&&X[ne.status]++;return X});function de(X){return X?Object.entries(X).map(([ne,se])=>({label:ne,value:typeof se=="object"&&se!==null?JSON.stringify(se):String(se)})):[]}const Te=W(()=>{var X;return de((X=u.value)==null?void 0:X.source)}),Be=W(()=>{var X;return de((X=u.value)==null?void 0:X.metadata)}),Ze=W(()=>{const X=u.value;if(!X)return[];const ne=[{label:"Dependencies",value:X.deps.length?X.deps.join(", "):"—"},{label:"Dependents",value:X.dependents.length?X.dependents.join(", "):"—"}];return X.computeTime!=null&&ne.push({label:"Last compute",value:`${X.computeTime}ms`}),ne.push({label:"Updated",value:L(X.updatedAt)}),ne}),qe=W(()=>d.value.slice().reverse().map(X=>({label:L(X.timestamp),value:O(X.value)})));return(X,ne)=>(m(),w("div",null,[N(Xt,{eyebrow:"Reactive graphs",title:"Cells",subtitle:"Inspect reactive computation graphs - values, dependencies, and live propagation."},{actions:I(()=>[n.value.length>1?(m(),J(ji,{key:0,"model-value":s.value,tabs:n.value.map(se=>({value:se,label:se})),variant:"pills","onUpdate:modelValue":ne[0]||(ne[0]=se=>s.value=se)},null,8,["model-value","tabs"])):K("",!0)]),_:1}),g("div",AE,[g("section",IE,[g("div",RE,[N(ji,{modelValue:o.value,"onUpdate:modelValue":ne[1]||(ne[1]=se=>o.value=se),tabs:[{value:"table",label:"Table"},{value:"graph",label:"Graph"}],variant:"pills"},null,8,["modelValue"]),g("div",TE,[g("span",null,E(r.value.length)+" cells",1),ne[4]||(ne[4]=g("span",{class:"cell-counts__sep"},null,-1)),g("span",NE,E(_e.value.current)+" current",1),_e.value.pending?(m(),w(te,{key:0},[ne[2]||(ne[2]=g("span",{class:"cell-counts__sep"},null,-1)),g("span",PE,E(_e.value.pending)+" pending",1)],64)):K("",!0),_e.value.error?(m(),w(te,{key:1},[ne[3]||(ne[3]=g("span",{class:"cell-counts__sep"},null,-1)),g("span",OE,E(_e.value.error)+" error",1)],64)):K("",!0)])]),N(ze,null,{default:I(()=>[o.value==="table"?(m(),w("div",LE,[r.value.length?(m(),w("div",ME,[ne[5]||(ne[5]=g("div",{class:"ctable__head"},[g("span",{class:"ctable__col ctable__col--name"},"Name"),g("span",{class:"ctable__col ctable__col--value"},"Value"),g("span",{class:"ctable__col ctable__col--deps"},"Dependencies"),g("span",{class:"ctable__col ctable__col--status"},"Status"),g("span",{class:"ctable__col ctable__col--updated"},"Updated")],-1)),(m(!0),w(te,null,pe(r.value,se=>(m(),w("div",{key:se.name,class:ge(["ctable__row",{"ctable__row--selected":c.value===se.name,"ctable__row--recent":V(se.name)}]),onClick:we=>C(se)},[g("span",FE,E(se.name),1),g("span",{class:"ctable__col ctable__col--value",title:JSON.stringify(se.value)},E(O(se.value)),9,jE),g("span",BE,E(se.deps.length?se.deps.join(", "):"—"),1),g("span",GE,[se.status!=="current"?(m(),J(rt,{key:0,variant:me(se.status),size:"sm"},{default:I(()=>[ce(E(se.status),1)]),_:2},1032,["variant"])):K("",!0)]),g("span",VE,E(L(se.updatedAt)),1)],10,DE))),128))])):(m(),J(Ye,{key:1,title:"No cells",description:"This graph has no cells defined."}))])):(m(),w("div",UE,[r.value.length?(m(),w("div",{key:0,class:"graph-wrap pc-scroll",ref_key:"graphWrap",ref:l},[(m(),w("svg",{width:x.value.width,height:x.value.height},[ne[6]||(ne[6]=g("defs",null,[g("marker",{id:"cell-arrow",viewBox:"0 0 10 10",refX:"9",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto"},[g("path",{d:"M0,0 L10,5 L0,10 z",fill:"rgba(0,0,0,0.25)"})]),g("marker",{id:"cell-arrow-active",viewBox:"0 0 10 10",refX:"9",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto"},[g("path",{d:"M0,0 L10,5 L0,10 z",fill:"var(--lavender)"})])],-1)),g("g",null,[(m(!0),w(te,null,pe(M.value,se=>(m(),w("path",{key:`${se.from}->${se.to}`,d:`M${se.x1},${se.y1} C${se.x1+36},${se.y1} ${se.x2-36},${se.y2} ${se.x2},${se.y2}`,fill:"none","stroke-width":"1.5",class:ge(["edge-line",{recent:V(se.from)}]),"marker-end":V(se.from)?"url(#cell-arrow-active)":"url(#cell-arrow)"},null,10,qE))),128))]),(m(!0),w(te,null,pe(r.value,se=>{var we,B;return m(),w("g",{key:se.name,transform:`translate(${((we=x.value.positions.get(se.name))==null?void 0:we.x)??0}, ${((B=x.value.positions.get(se.name))==null?void 0:B.y)??0})`,class:ge(["node-group",{selected:c.value===se.name,recent:V(se.name)}]),onClick:H=>C(se)},[g("rect",{width:D.w,height:D.h,rx:"8"},null,8,WE),g("circle",{cx:14,cy:14,r:"3.5",fill:fe(se.status)},null,8,KE),g("clipPath",{id:`clip-${se.name}`},[g("rect",{width:D.w-10,height:D.h-6,x:"5",y:"3"},null,8,YE)],8,XE),g("g",{"clip-path":`url(#clip-${se.name})`},[g("text",{x:D.w/2,y:26,"text-anchor":"middle",class:"node-name"},E(j(se.name,22)),9,QE),g("text",{x:D.w/2,y:45,"text-anchor":"middle",class:"node-value"},E(j(O(se.value),24)),9,ZE)],8,JE)],10,zE)}),128))],8,HE))],512)):(m(),J(Ye,{key:1,title:"No cells",description:"This graph has no cells defined."}))]))]),_:1})]),u.value?(m(),w("section",eA,[N(ze,{gradient:"",elevated:"",accent:"lavender"},{header:I(()=>[N(EE,{size:"md"},{default:I(()=>[ce(E(s.value),1)]),_:1}),g("h2",tA,E(u.value.name),1),g("p",nA,E(u.value.kind==="template"?"Templated cell":u.value.deps.length?"Computed cell":"Source cell"),1)]),aside:I(()=>[g("div",sA,[N(rt,{variant:me(u.value.status),dot:""},{default:I(()=>[ce(E(u.value.status),1)]),_:1},8,["variant"]),N(Ke,{variant:"ghost",size:"sm",icon:"lucide:x",onClick:R})])]),default:I(()=>[N(Ee,{label:"Value"},{default:I(()=>[g("div",rA,[N(_n,{data:u.value.value},null,8,["data"])])]),_:1}),u.value.template?(m(),J(Ee,{key:0,label:"Template"},{default:I(()=>[g("pre",oA,E(u.value.template),1)]),_:1})):K("",!0),u.value.error?(m(),J(Ee,{key:1,label:"Error"},{default:I(()=>[g("div",lA,E(u.value.error),1)]),_:1})):K("",!0),N(Ee,{label:`History${u.value.historyLimit>0?` · ${d.value.length} / ${u.value.historyLimit}`:""}`},{default:I(()=>[u.value.historyLimit>0&&qe.value.length?(m(),J(is,{key:0,"max-height":"260px"},{default:I(()=>[N(Zn,{layout:"divided",boxed:"",compact:"",items:qe.value},null,8,["items"])]),_:1})):u.value.historyLimit>0?(m(),w("p",iA,"No entries captured yet.")):(m(),w("p",aA,[...ne[7]||(ne[7]=[ce(" History is not enabled for this cell. Define it with ",-1),g("code",null,"{ history: true }",-1),ce(" or ",-1),g("code",null,"{ history: N }",-1),ce(" to capture recent values. ",-1)])]))]),_:1},8,["label"]),Te.value.length?(m(),J(Ee,{key:2,label:"Source"},{default:I(()=>[N(Zn,{layout:"divided",boxed:"",items:Te.value},null,8,["items"])]),_:1})):K("",!0),Be.value.length?(m(),J(Ee,{key:3,label:"Metadata"},{default:I(()=>[N(Zn,{layout:"divided",boxed:"",items:Be.value},null,8,["items"])]),_:1})):K("",!0),N(Ee,{label:"Dependencies",tone:"muted"},{default:I(()=>[N(Zn,{layout:"divided",dividers:!1,items:Ze.value},null,8,["items"])]),_:1})]),_:1})])):K("",!0)])]))}},dA=ke(uA,[["__scopeId","data-v-c453d2f3"]]),fA={class:"page-body"},pA={key:1,class:"lock-grid"},hA={class:"lock-panel__title"},gA={class:"lock-error"},mA={class:"lock-item__top"},vA={class:"lock-item__key"},yA={class:"lock-item__meta"},_A={key:1,class:"lock-empty"},bA={class:"sem-block__head"},wA={class:"sem-block__key"},CA=["title"],SA={key:1,class:"lock-empty"},kA={__name:"Locks",setup(e){const t=z([]),n=z(!1),s=z(null);let r=null;async function o(){const c=await fetch(Me("/locks"));if(c.ok){const u=await c.json();t.value=u.managers}n.value=!0}De(()=>{o(),r=setInterval(o,2e3)}),ct(()=>{r&&clearInterval(r)});function l(c){if(c==null||c<0)return"—";const u=Math.round(c/1e3);return u<60?`${u}s`:`${Math.floor(u/60)}m ${u%60}s`}function i(c){return(c==null?void 0:c.length)>14?`${c.slice(0,14)}…`:c}async function a(c,u,d){s.value=`${c}::${u}::${d}`;try{const f=await fetch(Me(`/locks/${encodeURIComponent(c)}/release`),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:u,id:d})}),p=await f.json().catch(()=>({}));f.ok?p.released===!1?Xe.warning("Lock not released",{description:"It had already expired or been re-acquired by another holder."}):Xe.success("Lock released"):Xe.error("Release failed",{description:p.error||"The lock could not be released."}),await o()}catch(f){Xe.error("Release failed",{description:f.message})}finally{s.value=null}}return(c,u)=>(m(),w("div",null,[N(Xt,{eyebrow:"Coordination",title:"Locks",subtitle:"Held mutexes and semaphore leases across every lock manager - who holds what, and for how long."}),g("div",fA,[n.value&&!t.value.length?(m(),J(Ye,{key:0,title:"No lock managers",description:"Mutex and semaphore managers passed to devtools will appear here."})):(m(),w("div",pA,[(m(!0),w(te,null,pe(t.value,d=>(m(),J(ze,{key:d.name},{header:I(()=>[g("h3",hA,E(d.name),1)]),aside:I(()=>[N(rt,{variant:d.kind==="semaphore"?"paused":"default",size:"sm"},{default:I(()=>[ce(E(d.kind),1)]),_:2},1032,["variant"])]),default:I(()=>[d.error?(m(),J(Ee,{key:0,label:"Error"},{default:I(()=>[g("p",gA,E(d.error),1)]),_:2},1024)):d.kind==="mutex"?(m(),J(Ee,{key:1,flush:""},{default:I(()=>[d.locks.length?(m(),J(is,{key:0,"max-height":"340px"},{default:I(()=>[(m(!0),w(te,null,pe(d.locks,f=>(m(),w("div",{key:f.key,class:"lock-item"},[g("div",mA,[g("span",vA,E(f.key),1),N(Ke,{size:"sm",variant:"ghost",loading:s.value===`${d.name}::${f.key}::${f.holder}`,onClick:p=>a(d.name,f.key,f.holder)},{default:I(()=>[...u[0]||(u[0]=[ce("Release",-1)])]),_:1},8,["loading","onClick"])]),g("div",yA,[g("span",null,E(f.holder),1),u[1]||(u[1]=g("span",{class:"lock-item__dot"},null,-1)),g("span",null,"expires in "+E(l(f.ttl)),1)])]))),128))]),_:2},1024)):(m(),w("p",_A,"No locks held."))]),_:2},1024)):(m(),J(Ee,{key:2,flush:""},{default:I(()=>[d.locks.length?(m(),J(is,{key:0,"max-height":"340px"},{default:I(()=>[(m(!0),w(te,null,pe(d.locks,f=>(m(),w("div",{key:f.key,class:"sem-block"},[g("div",bA,[g("span",wA,E(f.key),1),N(rt,{size:"sm"},{default:I(()=>[ce(E(f.active)+" / "+E(f.max),1)]),_:2},1024)]),(m(!0),w(te,null,pe(f.holders,p=>(m(),w("div",{key:p,class:"lock-item lock-item--lease"},[g("span",{class:"lock-item__key lock-item__key--mono",title:p},E(i(p)),9,CA),N(Ke,{size:"sm",variant:"ghost",loading:s.value===`${d.name}::${f.key}::${p}`,onClick:h=>a(d.name,f.key,p)},{default:I(()=>[...u[2]||(u[2]=[ce("Release",-1)])]),_:1},8,["loading","onClick"])]))),128))]))),128))]),_:2},1024)):(m(),w("p",SA,"No active leases."))]),_:2},1024))]),_:2},1024))),128))]))])]))}},xA=ke(kA,[["__scopeId","data-v-09d1dde2"]]),$A={class:"page-body"},EA={key:1,class:"cache-grid"},AA={class:"cache-title"},IA={class:"stats"},RA={class:"stats"},TA={class:"stats__highlight"},NA={class:"events"},PA={class:"event__key"},OA={class:"event__ts"},Ju=50,LA={__name:"Cache",setup(e){const t=z({}),n=z(!1),s=z([]);let r=null,o=null;async function l(){try{const h=await fetch(Me("/cache"));h.ok&&(t.value=await h.json())}catch{}}function i(h){const v=h.hits+h.misses,_=v>0?h.hits/v*100:null;return{total:v,hitRate:_}}const a=W(()=>Object.entries(t.value));function c(h,v){s.value.unshift({kind:h,data:v,ts:Date.now()}),s.value.length>Ju&&(s.value.length=Ju)}function u(h){return s.value.filter(v=>{var _;return((_=v.data)==null?void 0:_.cache)===h}).slice(0,8)}function d(h){return h.replace(/^cache:/,"")}function f(h){return h.includes("hit")?"active":h.includes("miss")||h.includes("refresh")?"default":h.includes("stampede:lead")||h.includes("stampede:wait")?"paused":h.includes("invalidate")||h.includes("del")?"failed":"default"}function p(h){var v,_;return(v=h.data)!=null&&v.key?h.data.key:(_=h.data)!=null&&_.tag?`tag: ${h.data.tag}`+(typeof h.data.count=="number"?` (${h.data.count})`:""):"—"}return De(async()=>{await l(),n.value=!0,r=setInterval(l,1500),o=new EventSource(`${Mf}/api/events`);const h=["cache:hit","cache:miss","cache:set","cache:del","cache:invalidate","cache:refresh","cache:stampede:lead","cache:stampede:wait","cache:stampede:result","cache:stampede:timeout"];for(const v of h)o.addEventListener(v,_=>{try{c(v,JSON.parse(_.data))}catch{}})}),us(()=>{r&&clearInterval(r),o&&o.close()}),(h,v)=>(m(),w("div",null,[N(Xt,{eyebrow:"Read-through cache",title:"Cache",subtitle:"Hit rate, stampede savings, and live activity for every registered cache."}),g("div",$A,[n.value&&!a.value.length?(m(),J(Ye,{key:0,title:"No caches registered",description:"Named caches passed to devtools will appear here."})):(m(),w("div",EA,[(m(!0),w(te,null,pe(a.value,([_,y])=>(m(),J(ze,{key:_},{header:I(()=>[g("h3",AA,E(_),1)]),aside:I(()=>[N(rt,{variant:"active"},{default:I(()=>[ce(E(i(y).hitRate!==null?`${i(y).hitRate.toFixed(1)}% hit`:"no traffic"),1)]),_:2},1024)]),default:I(()=>[N(Ee,null,{default:I(()=>[g("dl",IA,[g("div",null,[v[0]||(v[0]=g("dt",null,"Hits",-1)),g("dd",null,E(y.hits),1)]),g("div",null,[v[1]||(v[1]=g("dt",null,"Misses",-1)),g("dd",null,E(y.misses),1)]),g("div",null,[v[2]||(v[2]=g("dt",null,"Sets",-1)),g("dd",null,E(y.sets),1)]),g("div",null,[v[3]||(v[3]=g("dt",null,"Dels",-1)),g("dd",null,E(y.dels),1)]),g("div",null,[v[4]||(v[4]=g("dt",null,"Refreshes",-1)),g("dd",null,E(y.refreshes),1)]),g("div",null,[v[5]||(v[5]=g("dt",null,"Errors",-1)),g("dd",null,E(y.errors),1)]),g("div",null,[v[6]||(v[6]=g("dt",null,"Invalidations",-1)),g("dd",null,E(y.invalidations),1)])])]),_:2},1024),N(Ee,{label:"Stampede prevention"},{default:I(()=>[g("dl",RA,[g("div",null,[v[7]||(v[7]=g("dt",null,"Leads",-1)),g("dd",null,E(y.stampedeLeads),1)]),g("div",null,[v[8]||(v[8]=g("dt",null,"Waits",-1)),g("dd",null,E(y.stampedeWaits),1)]),g("div",TA,[v[9]||(v[9]=g("dt",null,"Savings",-1)),g("dd",null,E(y.stampedeSavings),1)])]),v[10]||(v[10]=g("p",{class:"stats__caption"}," Loader calls avoided by deduplicating concurrent misses for the same key. ",-1))]),_:2},1024),u(_).length?(m(),J(Ee,{key:0,label:"Recent activity"},{default:I(()=>[g("ul",NA,[(m(!0),w(te,null,pe(u(_),(k,C)=>(m(),w("li",{key:C,class:"event"},[N(rt,{variant:f(k.kind),size:"sm"},{default:I(()=>[ce(E(d(k.kind)),1)]),_:2},1032,["variant"]),g("code",PA,E(p(k)),1),g("span",OA,E(new Date(k.ts).toLocaleTimeString()),1)]))),128))])]),_:2},1024)):K("",!0)]),_:2},1024))),128))]))])]))}},MA=ke(LA,[["__scopeId","data-v-6816a84c"]]),DA={class:"tr-actions"},FA={class:"page-body"},jA={key:1,class:"tr-layout"},BA={class:"tr-list"},GA={class:"tr-filters"},VA=["value"],UA={class:"tr-traces"},HA=["onClick"],qA={class:"tr-trace__name"},zA={class:"tr-trace__meta"},WA={class:"tr-trace__service"},KA={class:"tr-trace__dur"},XA={class:"tr-trace__age"},YA={class:"tr-right"},JA={class:"tr-main"},QA={class:"tr-header"},ZA={class:"tr-header__name"},eI={class:"tr-header__id"},tI={class:"tr-header__stats"},nI={class:"tr-waterfall"},sI={class:"tr-waterfall__axis"},rI={class:"tr-axis__track"},oI={class:"tr-axis__total"},lI=["onClick"],iI={class:"tr-row__name"},aI={class:"tr-row__service"},cI={class:"tr-row__track"},uI=["title","onClick"],dI={class:"tr-row__dur"},fI={key:0,class:"tr-detail"},pI={class:"tr-detail__header"},hI={class:"tr-detail__name"},gI={class:"tr-detail__stats"},mI={key:0},vI={class:"tr-attrs"},yI={key:1},_I={class:"tr-detail__label"},bI={class:"tr-events"},wI=["onClick"],CI={class:"tr-event-row__head"},SI={class:"tr-event-row__name"},kI={class:"tr-event-row__offset"},xI={key:0,class:"tr-event-row__attrs"},$I={key:2},EI={class:"tr-error"},AI={class:"tr-error__name"},II={key:0,class:"tr-error__stack"},RI={class:"tr-ids"},TI={key:0},NI={__name:"Traces",setup(e){const t=z([]),n=z(null),s=z(null),r=z(null),o=z(null),l=z(!0),i=z(""),a=z(""),c=z(""),u=z(!1);let d=null;async function f(){try{const x=new URLSearchParams;a.value&&x.set("status",a.value),c.value&&x.set("service",c.value),x.set("limit","100");const M=await fetch(Me(`/traces?${x}`));if(M.ok){const V=await M.json();t.value=V.traces}}catch{}u.value=!0}async function p(x,{initial:M=!1}={}){var V;if(!x){s.value=null,r.value=null;return}try{const fe=await fetch(Me(`/traces/${x}`));if(!fe.ok){M&&(s.value=null,r.value=null);return}const me=await fe.json();s.value=me,(M||!r.value||!me.spans.some(_e=>_e.spanId===r.value))&&(r.value=((V=me.spans[0])==null?void 0:V.spanId)??null)}catch{M&&(s.value=null,r.value=null)}}function h(x){n.value!==x&&(n.value=x,r.value=null,p(x,{initial:!0}))}function v(){const x=i.value.trim();x&&h(x)}const _=z("depth"),y=W(()=>{const x=t.value.slice();return _.value==="depth"?x.sort((M,V)=>V.spanCount-M.spanCount||V.startedAt-M.startedAt):_.value==="slow"?x.sort((M,V)=>V.durationMs-M.durationMs):x.sort((M,V)=>V.startedAt-M.startedAt),x}),k=W(()=>{const x=new Set;for(const M of t.value)for(const V of M.services)x.add(V);return[...x].sort()}),C=W(()=>!s.value||!r.value?null:s.value.spans.find(x=>x.spanId===r.value)??null),R=W(()=>{if(!s.value)return null;const x=s.value.spans.find(V=>!V.parentSpanId&&V.kind==="server");if(!x)return null;const M=Math.max(.001,s.value.endedAt-s.value.startedAt);return(x.endedAt-s.value.startedAt)/M*100}),j=W(()=>{if(!s.value)return{rows:[],totalDuration:0,startedAt:0};const x=s.value,M=x.startedAt,V=Math.max(.001,x.endedAt-x.startedAt),fe=new Map;for(const de of x.spans){const Te=de.parentSpanId??null;fe.has(Te)||fe.set(Te,[]),fe.get(Te).push(de)}for(const de of fe.values())de.sort((Te,Be)=>Te.startedAt-Be.startedAt);const me=[],_e=(de,Te)=>{for(const Be of fe.get(de)??[]){const Ze=(Be.startedAt-M)/V*100,qe=Math.max(.3,Be.durationMs/V*100);me.push({span:Be,depth:Te,leftPct:Ze,widthPct:qe}),_e(Be.spanId,Te+1)}};_e(null,0);for(const de of x.spans)if(de.parentSpanId&&!x.spans.some(Te=>Te.spanId===de.parentSpanId)){const Te=(de.startedAt-M)/V*100,Be=Math.max(.3,de.durationMs/V*100);me.some(Ze=>Ze.span.spanId===de.spanId)||me.push({span:de,depth:0,leftPct:Te,widthPct:Be})}return{rows:me,totalDuration:V,startedAt:M}});function O(x,M){const V=Math.max(.001,M.endedAt-M.startedAt);return Math.max(0,Math.min(100,(x.time-M.startedAt)/V*100))}function L(x,M){r.value=x,o.value=M}function U(x){return x?x.startsWith("queue.")?"queue":x.startsWith("cache.")?"cache":x.startsWith("workflow.")?"workflow":x.startsWith("cron.")?"cron":x.startsWith("cells.")?"cells":x.startsWith("lock.")?"lock":x.startsWith("limit.")?"limit":x.startsWith("realtime.")?"realtime":x.startsWith("http.")||/^[A-Z]+ /.test(x)?"http":"other":"other"}function P(x){return x<1?`${(x*1e3).toFixed(0)}µs`:x<1e3?`${x.toFixed(1)}ms`:`${(x/1e3).toFixed(2)}s`}function D(x){return x?new Date(x).toLocaleTimeString(void 0,{hour12:!1})+"."+String(x%1e3).padStart(3,"0"):""}function Y(x){const M=Math.floor((Date.now()-x)/1e3);return M<60?`${M}s ago`:M<3600?`${Math.floor(M/60)}m ago`:`${Math.floor(M/3600)}h ago`}return De(async()=>{await f(),d=setInterval(()=>{l.value&&f()},1500)}),us(()=>{d&&clearInterval(d)}),Re([a,c],()=>{f()}),(x,M)=>(m(),w("div",null,[N(Xt,{eyebrow:"Distributed tracing",title:"Traces",subtitle:"Follow a single request across every subsystem. Each row is a span; the waterfall shows causality and time."},{actions:I(()=>[g("div",DA,[Hr(g("input",{"onUpdate:modelValue":M[0]||(M[0]=V=>i.value=V),class:"tr-search",placeholder:"paste trace ID…",onKeydown:Zm(v,["enter"])},null,544),[[Xm,i.value]]),N(Ke,{variant:"ghost",size:"sm",class:ge({"tr-live":l.value}),onClick:M[1]||(M[1]=V=>l.value=!l.value)},{default:I(()=>[ce(E(l.value?"● live":"○ paused"),1)]),_:1},8,["class"])])]),_:1}),g("div",FA,[u.value&&!t.value.length&&!s.value?(m(),J(Ye,{key:0,title:"No traces yet",description:"Traces will appear here as requests flow through the system. If you haven't passed a tracer to prsmDevtools, traces won't show up."})):(m(),w("div",jA,[g("aside",BA,[g("div",GA,[Hr(g("select",{"onUpdate:modelValue":M[2]||(M[2]=V=>_.value=V)},[...M[5]||(M[5]=[g("option",{value:"depth"},"sort: most spans",-1),g("option",{value:"recent"},"sort: most recent",-1),g("option",{value:"slow"},"sort: slowest",-1)])],512),[[Il,_.value]]),Hr(g("select",{"onUpdate:modelValue":M[3]||(M[3]=V=>a.value=V)},[...M[6]||(M[6]=[g("option",{value:""},"all status",-1),g("option",{value:"ok"},"ok",-1),g("option",{value:"error"},"errors only",-1)])],512),[[Il,a.value]]),Hr(g("select",{"onUpdate:modelValue":M[4]||(M[4]=V=>c.value=V)},[M[7]||(M[7]=g("option",{value:""},"all services",-1)),(m(!0),w(te,null,pe(k.value,V=>(m(),w("option",{key:V,value:V},E(V),9,VA))),128))],512),[[Il,c.value]])]),N(is,{"max-height":"calc(100vh - 220px)"},{default:I(()=>[g("ul",UA,[(m(!0),w(te,null,pe(y.value,V=>(m(),w("li",{key:V.traceId,class:ge(["tr-trace",{"tr-trace--active":V.traceId===n.value,"tr-trace--error":V.status==="error"}]),onClick:fe=>h(V.traceId)},[g("div",qA,E(V.rootName??V.traceId.slice(0,8)),1),g("div",zA,[g("span",WA,E(V.rootService??"—"),1),M[8]||(M[8]=g("span",{class:"tr-trace__sep"},"·",-1)),g("span",KA,E(P(V.durationMs)),1),M[9]||(M[9]=g("span",{class:"tr-trace__sep"},"·",-1)),g("span",XA,E(Y(V.startedAt)),1)])],10,HA))),128))])]),_:1})]),g("div",YA,[g("main",JA,[s.value?(m(),w(te,{key:1},[g("div",QA,[g("div",null,[g("h2",ZA,E(s.value.rootName??s.value.traceId.slice(0,8)),1),g("code",eI,E(s.value.traceId),1)]),g("dl",tI,[g("div",null,[M[10]||(M[10]=g("dt",null,"Total",-1)),g("dd",null,E(P(s.value.durationMs)),1)]),g("div",null,[M[11]||(M[11]=g("dt",null,"Spans",-1)),g("dd",null,E(s.value.spanCount),1)]),g("div",null,[M[12]||(M[12]=g("dt",null,"Services",-1)),g("dd",null,E(s.value.services.length),1)]),g("div",null,[M[13]||(M[13]=g("dt",null,"Status",-1)),g("dd",null,[N(rt,{variant:s.value.status==="error"?"failed":"active",size:"sm"},{default:I(()=>[ce(E(s.value.status),1)]),_:1},8,["variant"])])])])]),g("div",nI,[R.value!==null?(m(),w("div",{key:0,class:"tr-response-marker",style:nt({"--marker-pct":`${R.value}%`}),title:"HTTP response sent"},[...M[14]||(M[14]=[g("span",{class:"tr-response-marker__label"},"response sent",-1)])],4)):K("",!0),g("div",sI,[M[15]||(M[15]=g("div",{class:"tr-axis__label"},"0",-1)),g("div",rI,[g("span",null,E(P(s.value.durationMs/4)),1),g("span",null,E(P(s.value.durationMs/2)),1),g("span",null,E(P(s.value.durationMs*3/4)),1)]),g("div",oI,E(P(s.value.durationMs)),1)]),(m(!0),w(te,null,pe(j.value.rows,V=>(m(),w("div",{key:V.span.spanId,class:ge(["tr-row",{"tr-row--active":V.span.spanId===r.value,"tr-row--error":V.span.status==="error"}]),onClick:fe=>r.value=V.span.spanId},[g("div",{class:"tr-row__label",style:nt({paddingLeft:`${V.depth*16+12}px`})},[g("span",iI,E(V.span.name),1),g("span",aI,E(V.span.service),1)],4),g("div",cI,[g("div",{class:ge(["tr-bar",`tr-bar--${U(V.span.name)}`]),style:nt({left:`${V.leftPct}%`,width:`${V.widthPct}%`})},null,6),(m(!0),w(te,null,pe(V.span.events||[],(fe,me)=>(m(),w("button",{key:me,type:"button",class:"tr-event",style:nt({left:`${O(fe,s.value)}%`}),title:`${fe.name}${Object.keys(fe.attributes||{}).length?" · "+JSON.stringify(fe.attributes):""}`,onClick:Mn(_e=>L(V.span.spanId,me),["stop"])},null,12,uI))),128))]),g("div",dI,E(P(V.span.durationMs)),1)],10,lI))),128))])],64)):(m(),J(Ye,{key:0,title:"Select a trace",description:"Pick a trace on the left to see its waterfall."}))]),s.value?(m(),w("aside",fI,[C.value?(m(),w(te,{key:0},[g("div",pI,[g("h3",hI,E(C.value.name),1),N(rt,{variant:C.value.status==="error"?"failed":"active",size:"sm"},{default:I(()=>[ce(E(C.value.status),1)]),_:1},8,["variant"])]),g("dl",gI,[g("div",null,[M[16]||(M[16]=g("dt",null,"Service",-1)),g("dd",null,E(C.value.service),1)]),g("div",null,[M[17]||(M[17]=g("dt",null,"Kind",-1)),g("dd",null,E(C.value.kind),1)]),g("div",null,[M[18]||(M[18]=g("dt",null,"Duration",-1)),g("dd",null,E(P(C.value.durationMs)),1)]),g("div",null,[M[19]||(M[19]=g("dt",null,"Started",-1)),g("dd",null,E(D(C.value.startedAt)),1)])]),C.value.attributes&&Object.keys(C.value.attributes).length?(m(),w("section",mI,[M[20]||(M[20]=g("div",{class:"tr-detail__label"},"Attributes",-1)),g("dl",vI,[(m(!0),w(te,null,pe(C.value.attributes,(V,fe)=>(m(),w("div",{key:fe},[g("dt",null,E(fe),1),g("dd",null,[g("code",null,E(typeof V=="object"?JSON.stringify(V):String(V)),1)])]))),128))])])):K("",!0),C.value.events&&C.value.events.length?(m(),w("section",yI,[g("div",_I,"Events ("+E(C.value.events.length)+")",1),g("ol",bI,[(m(!0),w(te,null,pe(C.value.events,(V,fe)=>(m(),w("li",{key:fe,class:ge(["tr-event-row",{"tr-event-row--active":o.value===fe}]),onClick:me=>o.value=fe},[g("div",CI,[g("span",SI,E(V.name),1),g("span",kI,"+"+E(P(V.time-C.value.startedAt)),1)]),V.attributes&&Object.keys(V.attributes).length?(m(),w("div",xI,[(m(!0),w(te,null,pe(V.attributes,(me,_e)=>(m(),w("span",{key:_e},[g("code",null,E(_e)+"=",1),g("code",null,E(typeof me=="object"?JSON.stringify(me):String(me)),1)]))),128))])):K("",!0)],10,wI))),128))])])):K("",!0),C.value.error?(m(),w("section",$I,[M[21]||(M[21]=g("div",{class:"tr-detail__label"},"Error",-1)),g("div",EI,[g("div",AI,E(C.value.error.name)+": "+E(C.value.error.message),1),C.value.error.stack?(m(),w("pre",II,E(C.value.error.stack),1)):K("",!0)])])):K("",!0),g("section",null,[M[25]||(M[25]=g("div",{class:"tr-detail__label"},"IDs",-1)),g("dl",RI,[g("div",null,[M[22]||(M[22]=g("dt",null,"Trace",-1)),g("dd",null,[g("code",null,E(C.value.traceId),1)])]),g("div",null,[M[23]||(M[23]=g("dt",null,"Span",-1)),g("dd",null,[g("code",null,E(C.value.spanId),1)])]),C.value.parentSpanId?(m(),w("div",TI,[M[24]||(M[24]=g("dt",null,"Parent",-1)),g("dd",null,[g("code",null,E(C.value.parentSpanId),1)])])):K("",!0)])])],64)):K("",!0)])):K("",!0)])]))])]))}},PI=ke(NI,[["__scopeId","data-v-cb782bf1"]]),OI={key:0,class:"cc__label"},LI={key:1,class:"cc__sublabel"},MI={__name:"ConnectionChip",props:{connectionId:{type:String,required:!0},connections:{type:Array,default:()=>[]},interactive:{type:Boolean,default:!1},showSublabel:{type:Boolean,default:!1}},emits:["navigate"],setup(e){const t=e,n=W(()=>t.connections.find(l=>l.id===t.connectionId)??null),s=W(()=>{var l;return((l=n.value)==null?void 0:l.label)??null}),r=W(()=>{var l;return t.showSublabel?((l=n.value)==null?void 0:l.sublabel)??null:null}),o=W(()=>t.connectionId.slice(0,8));return(l,i)=>{var a;return m(),J(Or(e.interactive?"button":"span"),{type:e.interactive?"button":void 0,class:ge(["cc",{"cc--interactive":e.interactive}]),title:((a=n.value)==null?void 0:a.id)??e.connectionId,onClick:i[0]||(i[0]=c=>{var u;return e.interactive?l.$emit("navigate",((u=n.value)==null?void 0:u.id)??e.connectionId):null})},{default:I(()=>[s.value?(m(),w("span",OI,E(s.value),1)):K("",!0),r.value?(m(),w("span",LI,E(r.value),1)):K("",!0),g("code",{class:ge(["cc__id",{"cc__id--solo":!s.value}])},E(o.value),3)]),_:1},8,["type","class","title"])}}},pl=ke(MI,[["__scopeId","data-v-c5427ef6"]]),DI={class:"rt-card-title"},FI={key:0,class:"rt-presence"},jI={key:1,class:"rt-presence rt-presence--none"},BI={__name:"RoomsView",props:{rooms:{type:Array,default:()=>[]},connections:{type:Array,default:()=>[]}},emits:["navigate"],setup(e){function t(n){if(typeof n=="string")return n;if(typeof n=="object"&&n!==null){const s=Object.keys(n);return s.length<=3?s.map(r=>`${r}: ${JSON.stringify(n[r])}`).join(", "):`{${s.length} fields}`}return String(n)}return(n,s)=>e.rooms.length?(m(),w(te,{key:1},[s[1]||(s[1]=g("p",{class:"rt-hint"},"Active rooms, their members, and each member's presence state.",-1)),(m(!0),w(te,null,pe(e.rooms,r=>(m(),J(ze,{key:r.name},{header:I(()=>[g("h3",DI,E(r.name),1)]),aside:I(()=>[N(rt,{variant:"active"},{default:I(()=>[ce(E(r.members.length)+" "+E(r.members.length===1?"member":"members"),1)]),_:2},1024)]),default:I(()=>[N(Ee,{flush:""},{default:I(()=>[(m(!0),w(te,null,pe(r.members,o=>(m(),w("div",{key:o,class:"rt-row"},[N(pl,{"connection-id":o,connections:e.connections,interactive:"","show-sublabel":"",onNavigate:s[0]||(s[0]=l=>n.$emit("navigate",l))},null,8,["connection-id","connections"]),r.presence[o]?(m(),w("span",FI,E(t(r.presence[o])),1)):(m(),w("span",jI,"no presence"))]))),128))]),_:2},1024)]),_:2},1024))),128))],64)):(m(),J(Ye,{key:0,title:"No rooms",description:"Active rooms and their members will appear here."}))}},GI=ke(BI,[["__scopeId","data-v-33d3dabc"]]),VI={class:"rt-card-title"},UI={__name:"ChannelsView",props:{channels:{type:Object,default:()=>({})},connections:{type:Array,default:()=>[]}},emits:["navigate"],setup(e){const t=e,n=W(()=>Object.entries(t.channels));return(s,r)=>n.value.length?(m(),w(te,{key:1},[r[1]||(r[1]=g("p",{class:"rt-hint"},"Channels with active subscribers on this server instance.",-1)),(m(!0),w(te,null,pe(n.value,([o,l])=>(m(),J(ze,{key:o},{header:I(()=>[g("h3",VI,E(o),1)]),aside:I(()=>[N(rt,{variant:"active"},{default:I(()=>[ce(E(l.length)+" "+E(l.length===1?"subscriber":"subscribers"),1)]),_:2},1024)]),default:I(()=>[N(Ee,{flush:""},{default:I(()=>[(m(!0),w(te,null,pe(l,i=>(m(),w("div",{key:i,class:"rt-row"},[N(pl,{"connection-id":i,connections:e.connections,interactive:"","show-sublabel":"",onNavigate:r[0]||(r[0]=a=>s.$emit("navigate",a))},null,8,["connection-id","connections"])]))),128))]),_:2},1024)]),_:2},1024))),128))],64)):(m(),J(Ye,{key:0,title:"No channel subscriptions",description:"Channels with active subscribers will appear here."}))}},HI=ke(UI,[["__scopeId","data-v-a43331da"]]),qI={class:"rt-card-title"},zI={class:"rt-row"},WI={class:"coll-version"},KI={key:0,class:"coll-records"},XI={class:"coll-records__label"},YI={class:"coll-record__id"},JI={key:0,class:"coll-empty"},QI={__name:"CollectionsView",props:{collections:{type:Object,default:()=>({})},connections:{type:Array,default:()=>[]},fetchRecords:{type:Function,required:!0}},emits:["navigate"],setup(e){const t=e,n=W(()=>Object.entries(t.collections)),s=cs({});function r(l,i){return`${l}::${i}`}async function o(l,i){const a=r(l,i);if(s[a]){delete s[a];return}s[a]=await t.fetchRecords(l,i)}return(l,i)=>n.value.length?(m(),w(te,{key:1},[i[2]||(i[2]=g("p",{class:"rt-hint"},"A collection is a per-connection index of record IDs. Each row below is one subscriber - the resolver was called for that connection and returned the list shown when expanded.",-1)),(m(!0),w(te,null,pe(n.value,([a,c])=>(m(),J(ze,{key:a},{header:I(()=>[g("h3",qI,E(a),1)]),aside:I(()=>[N(rt,{variant:"active"},{default:I(()=>[ce(E(Object.keys(c.subscribers).length)+" "+E(Object.keys(c.subscribers).length===1?"subscriber":"subscribers"),1)]),_:2},1024)]),default:I(()=>[N(Ee,{flush:""},{default:I(()=>[i[1]||(i[1]=g("div",{class:"coll-thead"},[g("span",null,"Subscriber"),g("span",null,"Version"),g("span")],-1)),(m(!0),w(te,null,pe(c.subscribers,(u,d)=>(m(),w("div",{key:d,class:"coll-sub"},[g("div",zI,[N(pl,{"connection-id":d,connections:e.connections,interactive:"","show-sublabel":"",onNavigate:i[0]||(i[0]=f=>l.$emit("navigate",f))},null,8,["connection-id","connections"]),g("span",WI,"v"+E(u.version),1),N(Ke,{variant:"ghost",size:"sm",onClick:f=>o(a,d)},{default:I(()=>[ce(E(s[r(a,d)]?"Hide records":"Show records"),1)]),_:2},1032,["onClick"])]),s[r(a,d)]?(m(),w("div",KI,[g("div",XI," Resolved records · "+E(s[r(a,d)].recordIds.length),1),(m(!0),w(te,null,pe(s[r(a,d)].records,f=>(m(),w("div",{key:f.id,class:"coll-record"},[g("div",YI,E(f.id),1),N(_n,{data:f.data},null,8,["data"])]))),128)),s[r(a,d)].records.length?K("",!0):(m(),w("p",JI," No records resolved. "))])):K("",!0)]))),128))]),_:2},1024)]),_:2},1024))),128))],64)):(m(),J(Ye,{key:0,title:"No collection subscriptions",description:"Collections with active subscribers will appear here."}))}},ZI=ke(QI,[["__scopeId","data-v-48c0e4bf"]]),eR={class:"rt-card-title"},tR={class:"rec-aside"},nR={__name:"RecordsView",props:{records:{type:Object,default:()=>({})},connections:{type:Array,default:()=>[]},watchedRecords:{type:Object,required:!0},watchRecord:{type:Function,required:!0},unwatchRecord:{type:Function,required:!0}},emits:["navigate"],setup(e){const t=e,n=W(()=>Object.entries(t.records));function s(r){r in t.watchedRecords?t.unwatchRecord(r):t.watchRecord(r)}return(r,o)=>n.value.length?(m(),w(te,{key:1},[o[1]||(o[1]=g("p",{class:"rt-hint"},"Records being watched by at least one connection, and each subscriber's mode.",-1)),(m(!0),w(te,null,pe(n.value,([l,i])=>(m(),J(ze,{key:l},{header:I(()=>[g("h3",eR,E(l),1)]),aside:I(()=>[g("div",tR,[N(Ke,{variant:"ghost",size:"sm",onClick:a=>s(l)},{default:I(()=>[ce(E(l in e.watchedRecords?"Hide value":"View value"),1)]),_:2},1032,["onClick"]),N(rt,{variant:"active"},{default:I(()=>[ce(E(Object.keys(i.subscribers).length)+" "+E(Object.keys(i.subscribers).length===1?"subscriber":"subscribers"),1)]),_:2},1024)])]),default:I(()=>[l in e.watchedRecords?(m(),J(Ee,{key:0,label:"Current value"},{default:I(()=>[N(_n,{data:e.watchedRecords[l]},null,8,["data"])]),_:2},1024)):K("",!0),N(Ee,{flush:""},{default:I(()=>[(m(!0),w(te,null,pe(i.subscribers,(a,c)=>(m(),w("div",{key:c,class:"rt-row"},[N(pl,{"connection-id":c,connections:e.connections,interactive:"","show-sublabel":"",onNavigate:o[0]||(o[0]=u=>r.$emit("navigate",u))},null,8,["connection-id","connections"]),N(rt,{variant:a==="full"?"paused":"default",size:"sm"},{default:I(()=>[ce(E(a),1)]),_:2},1032,["variant"])]))),128))]),_:2},1024)]),_:2},1024))),128))],64)):(m(),J(Ye,{key:0,title:"No record subscriptions",description:"Records being watched by at least one connection will appear here."}))}},sR=ke(nR,[["__scopeId","data-v-cc973c35"]]),rR={key:0,class:"md"},oR={class:"md-id"},lR={class:"md-id__core"},iR={class:"md-id__row"},aR={class:"md-id__name"},cR={key:0,class:"md-id__role"},uR=["title"],dR={class:"md-id__sub"},fR=["title"],pR={class:"md-id__stats"},hR={key:0},gR={class:"md-grid"},mR={class:"md-col"},vR={class:"md-block"},yR={class:"md-block__head"},_R={class:"md-count"},bR={key:0,class:"md-rooms"},wR={class:"md-room__name"},CR={key:0,class:"md-room__presence"},SR={class:"md-presence-pair__k"},kR={class:"md-presence-pair__v"},xR={key:1,class:"md-room__empty"},$R={key:1,class:"md-empty"},ER={class:"md-block"},AR={class:"md-block__head"},IR={class:"md-count"},RR={key:0,class:"md-chips"},TR={key:1,class:"md-empty"},NR={class:"md-col"},PR={class:"md-block"},OR={class:"md-block__head"},LR={class:"md-count"},MR={key:0,class:"md-records"},DR={class:"md-record__id"},FR={key:1,class:"md-empty"},jR={class:"md-block"},BR={class:"md-block__head"},GR={class:"md-count"},VR={key:0,class:"md-collections"},UR={class:"md-collection__id"},HR={class:"md-collection__version"},qR={key:1,class:"md-empty"},zR={key:0,class:"md-raw"},WR={key:1,class:"md-list"},KR=["onClick"],XR={class:"md-list__core"},YR={class:"md-list__name"},JR={class:"md-list__id"},QR={key:0,class:"md-list__latency"},ZR=["title"],eT={__name:"MetadataView",props:{detail:{type:Object,default:null},connections:{type:Array,default:()=>[]}},emits:["navigate"],setup(e){const t=e;function n(f){let p=0;for(let v=0;v<f.length;v++)p=p*31+f.charCodeAt(v)>>>0;return`hsl(${p%360} 50% 78%)`}function s(f){const p=(f==null?void 0:f.label)??(f==null?void 0:f.id)??"";return{background:n(p)}}function r(f){return f!=null&&f.label?f.label.charAt(0).toUpperCase():f!=null&&f.id?f.id.charAt(0).toUpperCase():"?"}function o(f){var p;return(f==null?void 0:f.label)??`conn ${((p=f==null?void 0:f.id)==null?void 0:p.slice(0,8))??"????"}`}const l=W(()=>o(t.detail)),i=W(()=>{var f;return((f=t.detail)==null?void 0:f.sublabel)??null}),a=W(()=>s(t.detail)),c=W(()=>r(t.detail)),u=W(()=>{var f;return((f=t.detail)==null?void 0:f.metadata)&&Object.keys(t.detail.metadata).length>0});function d(f){return f==null?"—":typeof f=="object"?JSON.stringify(f):String(f)}return(f,p)=>{var h,v,_,y,k,C,R,j;return e.detail?(m(),w("div",rR,[g("header",oR,[g("div",{class:"md-id__avatar",style:nt(a.value)},E(c.value),5),g("div",lR,[g("div",iR,[g("h2",aR,E(l.value),1),i.value?(m(),w("span",cR,E(i.value),1)):K("",!0),g("span",{class:ge(["md-id__dot",{"md-id__dot--dead":!e.detail.alive}]),title:e.detail.alive?"alive":"unresponsive"},null,10,uR)]),g("div",dR,[g("code",{class:"md-id__hash",title:e.detail.id},E(e.detail.id),9,fR)])]),g("dl",pR,[g("div",null,[p[0]||(p[0]=g("dt",null,"Latency",-1)),g("dd",null,E(e.detail.latency!==null?`${e.detail.latency}ms`:"—"),1)]),g("div",null,[p[1]||(p[1]=g("dt",null,"Locality",-1)),g("dd",null,E(e.detail.local?"this instance":"remote"),1)]),e.detail.remoteAddress?(m(),w("div",hR,[p[2]||(p[2]=g("dt",null,"Address",-1)),g("dd",null,E(e.detail.remoteAddress),1)])):K("",!0)])]),g("section",gR,[g("div",mR,[g("div",vR,[g("div",yR,[p[3]||(p[3]=g("h3",null,"Rooms",-1)),g("span",_R,E(((h=e.detail.rooms)==null?void 0:h.length)||0),1)]),(v=e.detail.rooms)!=null&&v.length?(m(),w("ul",bR,[(m(!0),w(te,null,pe(e.detail.rooms,O=>{var L;return m(),w("li",{key:O,class:"md-room"},[g("span",wR,E(O),1),(L=e.detail.presence)!=null&&L[O]?(m(),w("div",CR,[(m(!0),w(te,null,pe(e.detail.presence[O],(U,P)=>(m(),w("span",{key:P,class:"md-presence-pair"},[g("span",SR,E(P),1),g("span",kR,E(d(U)),1)]))),128))])):(m(),w("span",xR,"no presence broadcast"))])}),128))])):(m(),w("p",$R,"Not in any rooms."))]),g("div",ER,[g("div",AR,[p[4]||(p[4]=g("h3",null,"Channels",-1)),g("span",IR,E(((_=e.detail.channels)==null?void 0:_.length)||0),1)]),(y=e.detail.channels)!=null&&y.length?(m(),w("div",RR,[(m(!0),w(te,null,pe(e.detail.channels,O=>(m(),w("code",{key:O,class:"md-chip"},E(O),1))),128))])):(m(),w("p",TR,"No channel subscriptions."))])]),g("div",NR,[g("div",PR,[g("div",OR,[p[5]||(p[5]=g("h3",null,"Records",-1)),g("span",LR,E(((k=e.detail.records)==null?void 0:k.length)||0),1)]),(C=e.detail.records)!=null&&C.length?(m(),w("ul",MR,[(m(!0),w(te,null,pe(e.detail.records,O=>(m(),w("li",{key:O.id,class:"md-record"},[g("code",DR,E(O.id),1),g("span",{class:ge(["md-record__mode",`md-record__mode--${O.mode}`])},E(O.mode),3)]))),128))])):(m(),w("p",FR,"No record subscriptions."))]),g("div",jR,[g("div",BR,[p[6]||(p[6]=g("h3",null,"Collections",-1)),g("span",GR,E(((R=e.detail.collections)==null?void 0:R.length)||0),1)]),(j=e.detail.collections)!=null&&j.length?(m(),w("ul",VR,[(m(!0),w(te,null,pe(e.detail.collections,O=>(m(),w("li",{key:O.id,class:"md-collection"},[g("code",UR,E(O.id),1),g("span",HR,"v"+E(O.version),1)]))),128))])):(m(),w("p",qR,"No collection subscriptions."))])])]),u.value?(m(),w("details",zR,[p[7]||(p[7]=g("summary",null,"Raw connection metadata",-1)),N(_n,{data:e.detail.metadata},null,8,["data"])])):K("",!0)])):e.connections.length?(m(),w("div",WR,[p[8]||(p[8]=g("p",{class:"rt-hint"},"Select a connection on the left to see what it has joined and subscribed to.",-1)),(m(!0),w(te,null,pe(e.connections,O=>(m(),w("button",{key:O.id,type:"button",class:"md-list__row",onClick:L=>f.$emit("navigate",O.id)},[g("span",{class:"md-list__avatar",style:nt(s(O))},E(r(O)),5),g("span",XR,[g("span",YR,E(o(O)),1),g("code",JR,E(O.id.slice(0,8)),1)]),O.latency!==null?(m(),w("span",QR,E(O.latency)+"ms",1)):K("",!0),g("span",{class:ge(["md-list__dot",{"md-list__dot--dead":!O.alive}]),title:O.alive?"alive":"unresponsive"},null,10,ZR)],8,KR))),128))])):(m(),J(Ye,{key:2,title:"No connections",description:"Connected clients will appear here."}))}}},tT=ke(eT,[["__scopeId","data-v-e806e4fd"]]),nT={key:1,class:"exposed"},sT={class:"exposed__grid"},rT={class:"exposed__head"},oT={class:"exposed__title"},lT={class:"exposed__desc"},iT={class:"exposed__items"},aT={__name:"ExposedView",props:{exposed:{type:Object,default:()=>({})}},setup(e){const t=e,n={channels:{label:"Channels",description:"Pub/sub topics clients can subscribe to."},records:{label:"Records",description:"Versioned documents clients can read."},writableRecords:{label:"Writable records",description:"Records clients are allowed to write."},collections:{label:"Collections",description:"Indexes over records resolved per-connection."},presence:{label:"Presence rooms",description:"Rooms where presence states are tracked."},commands:{label:"Commands",description:"RPC-style operations clients can invoke."}},s=W(()=>{var l;const o=[];for(const i of Object.keys(n)){const a=((l=t.exposed)==null?void 0:l[i])??[];a.length&&o.push({key:i,...n[i],items:a})}return o});function r(o){if(typeof o!="string")return String(o);const l=o.match(/^\/\^(.+?)\$\/$/);return l?l[1]:o}return(o,l)=>s.value.length?(m(),w("div",nT,[l[0]||(l[0]=g("p",{class:"exposed__hint"}," Patterns the server has opted in to. Clients can only subscribe to or invoke things that match a pattern here. ",-1)),g("div",sT,[(m(!0),w(te,null,pe(s.value,i=>(m(),J(ze,{key:i.key},{header:I(()=>[g("div",rT,[g("h3",oT,E(i.label),1),N(rt,{size:"sm"},{default:I(()=>[ce(E(i.items.length),1)]),_:2},1024)])]),default:I(()=>[N(Ee,{flush:""},{default:I(()=>[g("p",lT,E(i.description),1),g("div",iT,[(m(!0),w(te,null,pe(i.items,a=>(m(),w("code",{key:a,class:"exposed__item"},E(r(a)),1))),128))])]),_:2},1024)]),_:2},1024))),128))])])):(m(),J(Ye,{key:0,title:"Nothing exposed",description:"The server hasn't exposed any channels, records, collections, presence rooms, or commands yet."}))}},cT=ke(aT,[["__scopeId","data-v-0b0b15e4"]]),uT=uy({history:Vv(Lf),routes:[{path:"/",component:Fw},{path:"/realtime",component:xE,redirect:"/realtime/rooms",children:[{path:"rooms",component:GI},{path:"channels",component:HI},{path:"collections",component:ZI},{path:"records",component:sR},{path:"metadata",component:tT},{path:"exposed",component:cT}]},{path:"/cells",component:dA},{path:"/locks",component:xA},{path:"/cache",component:MA},{path:"/traces",component:PI},{path:"/queue",component:Qw},{path:"/cron",component:h0},{path:"/limits",component:L0},{path:"/workflows",component:N1},{path:"/executions",component:nE}]});nv(ow).use(uT).mount("#app");
|