@fdm-monster/client-next 0.0.20 → 0.0.22
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/.eslintrc-auto-import.json +13 -12
- package/.yarn/install-state.gz +0 -0
- package/.yarn/releases/yarn-4.10.3.cjs +942 -0
- package/.yarnrc.yml +1 -1
- package/RELEASE_NOTES.MD +29 -0
- package/dist/assets/index-Cu6fadRj.js +93 -0
- package/dist/assets/index-Cu6fadRj.js.map +1 -0
- package/dist/assets/index-MwpeX3td.css +5 -0
- package/dist/index.html +3 -3
- package/package.json +2 -2
- package/.yarn/releases/yarn-4.9.1.cjs +0 -948
- package/dist/assets/index-CXYoPsmd.js +0 -93
- package/dist/assets/index-CXYoPsmd.js.map +0 -1
- package/dist/assets/index-DEBy2iV3.css +0 -5
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
var q2=Object.defineProperty;var vw=e=>{throw TypeError(e)};var G2=(e,t,n)=>t in e?q2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var we=(e,t,n)=>G2(e,typeof t!="symbol"?t+"":t,n),sg=(e,t,n)=>t.has(e)||vw("Cannot "+n);var Y=(e,t,n)=>(sg(e,t,"read from private field"),n?n.call(e):t.get(e)),qe=(e,t,n)=>t.has(e)?vw("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Le=(e,t,n,r)=>(sg(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),it=(e,t,n)=>(sg(e,t,"access private method"),n);var pf=(e,t,n,r)=>({set _(s){Le(e,t,s,n)},get _(){return Y(e,t,r)}});(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"b2db768250cce1ec67dbe5bb55b0200cd8fcd38c"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d58fc4d6-4122-446d-9579-749fc492763d",e._sentryDebugIdIdentifier="sentry-dbid-d58fc4d6-4122-446d-9579-749fc492763d")})()}catch{}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();/**
|
|
2
|
+
* @vue/shared v3.5.22
|
|
3
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
|
+
* @license MIT
|
|
5
|
+
**/function Lb(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Vt={},Nl=[],di=()=>{},FC=()=>!1,Gp=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),$b=e=>e.startsWith("onUpdate:"),_n=Object.assign,Fb=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},K2=Object.prototype.hasOwnProperty,It=(e,t)=>K2.call(e,t),Ke=Array.isArray,Bl=e=>Kp(e)==="[object Map]",NC=e=>Kp(e)==="[object Set]",et=e=>typeof e=="function",on=e=>typeof e=="string",to=e=>typeof e=="symbol",jt=e=>e!==null&&typeof e=="object",BC=e=>(jt(e)||et(e))&&et(e.then)&&et(e.catch),VC=Object.prototype.toString,Kp=e=>VC.call(e),Y2=e=>Kp(e).slice(8,-1),UC=e=>Kp(e)==="[object Object]",Nb=e=>on(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Tc=Lb(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Yp=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},X2=/-\w/g,yr=Yp(e=>e.replace(X2,t=>t.slice(1).toUpperCase())),Q2=/\B([A-Z])/g,Ko=Yp(e=>e.replace(Q2,"-$1").toLowerCase()),mi=Yp(e=>e.charAt(0).toUpperCase()+e.slice(1)),ig=Yp(e=>e?`on${mi(e)}`:""),Io=(e,t)=>!Object.is(e,t),lh=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},zC=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},Mv=e=>{const t=parseFloat(e);return isNaN(t)?e:t},J2=e=>{const t=on(e)?Number(e):NaN;return isNaN(t)?e:t};let yw;const Xp=()=>yw||(yw=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Be(e){if(Ke(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],s=on(r)?nL(r):Be(r);if(s)for(const i in s)t[i]=s[i]}return t}else if(on(e)||jt(e))return e}const Z2=/;(?![^(]*\))/g,eL=/:([^]+)/,tL=/\/\*[^]*?\*\//g;function nL(e){const t={};return e.replace(tL,"").split(Z2).forEach(n=>{if(n){const r=n.split(eL);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function Re(e){let t="";if(on(e))t=e;else if(Ke(e))for(let n=0;n<e.length;n++){const r=Re(e[n]);r&&(t+=r+" ")}else if(jt(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function Dv(e){if(!e)return null;let{class:t,style:n}=e;return t&&!on(t)&&(e.class=Re(t)),n&&(e.style=Be(n)),e}const rL="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",sL=Lb(rL);function HC(e){return!!e||e===""}const jC=e=>!!(e&&e.__v_isRef===!0),se=e=>on(e)?e:e==null?"":Ke(e)||jt(e)&&(e.toString===VC||!et(e.toString))?jC(e)?se(e.value):JSON.stringify(e,WC,2):String(e),WC=(e,t)=>jC(t)?WC(e,t.value):Bl(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,s],i)=>(n[og(r,i)+" =>"]=s,n),{})}:NC(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>og(n))}:to(t)?og(t):jt(t)&&!Ke(t)&&!UC(t)?String(t):t,og=(e,t="")=>{var n;return to(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
|
|
6
|
+
* @vue/reactivity v3.5.22
|
|
7
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
8
|
+
* @license MIT
|
|
9
|
+
**/let tr;class qC{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=tr,!t&&tr&&(this.index=(tr.scopes||(tr.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=tr;try{return tr=this,t()}finally{tr=n}}}on(){++this._on===1&&(this.prevScope=tr,tr=this)}off(){this._on>0&&--this._on===0&&(tr=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(this.effects.length=0,n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0}}}function qa(e){return new qC(e)}function $d(){return tr}function dn(e,t=!1){tr&&tr.cleanups.push(e)}let Gt;const ag=new WeakSet;class GC{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,tr&&tr.active&&tr.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,ag.has(this)&&(ag.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||YC(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,bw(this),XC(this);const t=Gt,n=Ls;Gt=this,Ls=!0;try{return this.fn()}finally{QC(this),Gt=t,Ls=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Ub(t);this.deps=this.depsTail=void 0,bw(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?ag.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Lv(this)&&this.run()}get dirty(){return Lv(this)}}let KC=0,Pc,Rc;function YC(e,t=!1){if(e.flags|=8,t){e.next=Rc,Rc=e;return}e.next=Pc,Pc=e}function Bb(){KC++}function Vb(){if(--KC>0)return;if(Rc){let t=Rc;for(Rc=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Pc;){let t=Pc;for(Pc=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=n}}if(e)throw e}function XC(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function QC(e){let t,n=e.depsTail,r=n;for(;r;){const s=r.prevDep;r.version===-1?(r===n&&(n=s),Ub(r),iL(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}e.deps=t,e.depsTail=n}function Lv(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(JC(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function JC(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Yc)||(e.globalVersion=Yc,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Lv(e))))return;e.flags|=2;const t=e.dep,n=Gt,r=Ls;Gt=e,Ls=!0;try{XC(e);const s=e.fn(e._value);(t.version===0||Io(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{Gt=n,Ls=r,QC(e),e.flags&=-3}}function Ub(e,t=!1){const{dep:n,prevSub:r,nextSub:s}=e;if(r&&(r.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)Ub(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function iL(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Ls=!0;const ZC=[];function Wi(){ZC.push(Ls),Ls=!1}function qi(){const e=ZC.pop();Ls=e===void 0?!0:e}function bw(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Gt;Gt=void 0;try{t()}finally{Gt=n}}}let Yc=0;class oL{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 zb{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(!Gt||!Ls||Gt===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Gt)n=this.activeLink=new oL(Gt,this),Gt.deps?(n.prevDep=Gt.depsTail,Gt.depsTail.nextDep=n,Gt.depsTail=n):Gt.deps=Gt.depsTail=n,eT(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=Gt.depsTail,n.nextDep=void 0,Gt.depsTail.nextDep=n,Gt.depsTail=n,Gt.deps===n&&(Gt.deps=r)}return n}trigger(t){this.version++,Yc++,this.notify(t)}notify(t){Bb();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Vb()}}}function eT(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)eT(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Uh=new WeakMap,Da=Symbol(""),$v=Symbol(""),Xc=Symbol("");function rr(e,t,n){if(Ls&&Gt){let r=Uh.get(e);r||Uh.set(e,r=new Map);let s=r.get(n);s||(r.set(n,s=new zb),s.map=r,s.key=n),s.track()}}function Fi(e,t,n,r,s,i){const o=Uh.get(e);if(!o){Yc++;return}const a=l=>{l&&l.trigger()};if(Bb(),t==="clear")o.forEach(a);else{const l=Ke(e),u=l&&Nb(n);if(l&&n==="length"){const c=Number(r);o.forEach((d,f)=>{(f==="length"||f===Xc||!to(f)&&f>=c)&&a(d)})}else switch((n!==void 0||o.has(void 0))&&a(o.get(n)),u&&a(o.get(Xc)),t){case"add":l?u&&a(o.get("length")):(a(o.get(Da)),Bl(e)&&a(o.get($v)));break;case"delete":l||(a(o.get(Da)),Bl(e)&&a(o.get($v)));break;case"set":Bl(e)&&a(o.get(Da));break}}Vb()}function aL(e,t){const n=Uh.get(e);return n&&n.get(t)}function hl(e){const t=Ue(e);return t===e?t:(rr(t,"iterate",Xc),ds(e)?t:t.map(Hn))}function Qp(e){return rr(e=Ue(e),"iterate",Xc),e}const lL={__proto__:null,[Symbol.iterator](){return lg(this,Symbol.iterator,Hn)},concat(...e){return hl(this).concat(...e.map(t=>Ke(t)?hl(t):t))},entries(){return lg(this,"entries",e=>(e[1]=Hn(e[1]),e))},every(e,t){return wi(this,"every",e,t,void 0,arguments)},filter(e,t){return wi(this,"filter",e,t,n=>n.map(Hn),arguments)},find(e,t){return wi(this,"find",e,t,Hn,arguments)},findIndex(e,t){return wi(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return wi(this,"findLast",e,t,Hn,arguments)},findLastIndex(e,t){return wi(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return wi(this,"forEach",e,t,void 0,arguments)},includes(...e){return ug(this,"includes",e)},indexOf(...e){return ug(this,"indexOf",e)},join(e){return hl(this).join(e)},lastIndexOf(...e){return ug(this,"lastIndexOf",e)},map(e,t){return wi(this,"map",e,t,void 0,arguments)},pop(){return sc(this,"pop")},push(...e){return sc(this,"push",e)},reduce(e,...t){return ww(this,"reduce",e,t)},reduceRight(e,...t){return ww(this,"reduceRight",e,t)},shift(){return sc(this,"shift")},some(e,t){return wi(this,"some",e,t,void 0,arguments)},splice(...e){return sc(this,"splice",e)},toReversed(){return hl(this).toReversed()},toSorted(e){return hl(this).toSorted(e)},toSpliced(...e){return hl(this).toSpliced(...e)},unshift(...e){return sc(this,"unshift",e)},values(){return lg(this,"values",Hn)}};function lg(e,t,n){const r=Qp(e),s=r[t]();return r!==e&&!ds(e)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.done||(i.value=n(i.value)),i}),s}const uL=Array.prototype;function wi(e,t,n,r,s,i){const o=Qp(e),a=o!==e&&!ds(e),l=o[t];if(l!==uL[t]){const d=l.apply(e,i);return a?Hn(d):d}let u=n;o!==e&&(a?u=function(d,f){return n.call(this,Hn(d),f,e)}:n.length>2&&(u=function(d,f){return n.call(this,d,f,e)}));const c=l.call(o,u,r);return a&&s?s(c):c}function ww(e,t,n,r){const s=Qp(e);let i=n;return s!==e&&(ds(e)?n.length>3&&(i=function(o,a,l){return n.call(this,o,a,l,e)}):i=function(o,a,l){return n.call(this,o,Hn(a),l,e)}),s[t](i,...r)}function ug(e,t,n){const r=Ue(e);rr(r,"iterate",Xc);const s=r[t](...n);return(s===-1||s===!1)&&Fd(n[0])?(n[0]=Ue(n[0]),r[t](...n)):s}function sc(e,t,n=[]){Wi(),Bb();const r=Ue(e)[t].apply(e,n);return Vb(),qi(),r}const cL=Lb("__proto__,__v_isRef,__isVue"),tT=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(to));function dL(e){to(e)||(e=String(e));const t=Ue(this);return rr(t,"has",e),t.hasOwnProperty(e)}class nT{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){if(n==="__v_skip")return t.__v_skip;const s=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return i;if(n==="__v_raw")return r===(s?i?lT:aT:i?oT:iT).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const o=Ke(t);if(!s){let l;if(o&&(l=lL[n]))return l;if(n==="hasOwnProperty")return dL}const a=Reflect.get(t,n,rt(t)?t:r);if((to(n)?tT.has(n):cL(n))||(s||rr(t,"get",n),i))return a;if(rt(a)){const l=o&&Nb(n)?a:a.value;return s&&jt(l)?Gi(l):l}return jt(a)?s?Gi(a):mn(a):a}}class rT extends nT{constructor(t=!1){super(!1,t)}set(t,n,r,s){let i=t[n];if(!this._isShallow){const l=No(i);if(!ds(r)&&!No(r)&&(i=Ue(i),r=Ue(r)),!Ke(t)&&rt(i)&&!rt(r))return l||(i.value=r),!0}const o=Ke(t)&&Nb(n)?Number(n)<t.length:It(t,n),a=Reflect.set(t,n,r,rt(t)?t:s);return t===Ue(s)&&(o?Io(r,i)&&Fi(t,"set",n,r):Fi(t,"add",n,r)),a}deleteProperty(t,n){const r=It(t,n);t[n];const s=Reflect.deleteProperty(t,n);return s&&r&&Fi(t,"delete",n,void 0),s}has(t,n){const r=Reflect.has(t,n);return(!to(n)||!tT.has(n))&&rr(t,"has",n),r}ownKeys(t){return rr(t,"iterate",Ke(t)?"length":Da),Reflect.ownKeys(t)}}class sT extends nT{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const fL=new rT,hL=new sT,pL=new rT(!0),mL=new sT(!0),Fv=e=>e,mf=e=>Reflect.getPrototypeOf(e);function gL(e,t,n){return function(...r){const s=this.__v_raw,i=Ue(s),o=Bl(i),a=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,u=s[e](...r),c=n?Fv:t?zh:Hn;return!t&&rr(i,"iterate",l?$v:Da),{next(){const{value:d,done:f}=u.next();return f?{value:d,done:f}:{value:a?[c(d[0]),c(d[1])]:c(d),done:f}},[Symbol.iterator](){return this}}}}function gf(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function vL(e,t){const n={get(s){const i=this.__v_raw,o=Ue(i),a=Ue(s);e||(Io(s,a)&&rr(o,"get",s),rr(o,"get",a));const{has:l}=mf(o),u=t?Fv:e?zh:Hn;if(l.call(o,s))return u(i.get(s));if(l.call(o,a))return u(i.get(a));i!==o&&i.get(s)},get size(){const s=this.__v_raw;return!e&&rr(Ue(s),"iterate",Da),s.size},has(s){const i=this.__v_raw,o=Ue(i),a=Ue(s);return e||(Io(s,a)&&rr(o,"has",s),rr(o,"has",a)),s===a?i.has(s):i.has(s)||i.has(a)},forEach(s,i){const o=this,a=o.__v_raw,l=Ue(a),u=t?Fv:e?zh:Hn;return!e&&rr(l,"iterate",Da),a.forEach((c,d)=>s.call(i,u(c),u(d),o))}};return _n(n,e?{add:gf("add"),set:gf("set"),delete:gf("delete"),clear:gf("clear")}:{add(s){!t&&!ds(s)&&!No(s)&&(s=Ue(s));const i=Ue(this);return mf(i).has.call(i,s)||(i.add(s),Fi(i,"add",s,s)),this},set(s,i){!t&&!ds(i)&&!No(i)&&(i=Ue(i));const o=Ue(this),{has:a,get:l}=mf(o);let u=a.call(o,s);u||(s=Ue(s),u=a.call(o,s));const c=l.call(o,s);return o.set(s,i),u?Io(i,c)&&Fi(o,"set",s,i):Fi(o,"add",s,i),this},delete(s){const i=Ue(this),{has:o,get:a}=mf(i);let l=o.call(i,s);l||(s=Ue(s),l=o.call(i,s)),a&&a.call(i,s);const u=i.delete(s);return l&&Fi(i,"delete",s,void 0),u},clear(){const s=Ue(this),i=s.size!==0,o=s.clear();return i&&Fi(s,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=gL(s,e,t)}),n}function Jp(e,t){const n=vL(e,t);return(r,s,i)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?r:Reflect.get(It(n,s)&&s in r?n:r,s,i)}const yL={get:Jp(!1,!1)},bL={get:Jp(!1,!0)},wL={get:Jp(!0,!1)},SL={get:Jp(!0,!0)},iT=new WeakMap,oT=new WeakMap,aT=new WeakMap,lT=new WeakMap;function _L(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function kL(e){return e.__v_skip||!Object.isExtensible(e)?0:_L(Y2(e))}function mn(e){return No(e)?e:em(e,!1,fL,yL,iT)}function Zp(e){return em(e,!1,pL,bL,oT)}function Gi(e){return em(e,!0,hL,wL,aT)}function Hb(e){return em(e,!0,mL,SL,lT)}function em(e,t,n,r,s){if(!jt(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=kL(e);if(i===0)return e;const o=s.get(e);if(o)return o;const a=new Proxy(e,i===2?r:n);return s.set(e,a),a}function Ao(e){return No(e)?Ao(e.__v_raw):!!(e&&e.__v_isReactive)}function No(e){return!!(e&&e.__v_isReadonly)}function ds(e){return!!(e&&e.__v_isShallow)}function Fd(e){return e?!!e.__v_raw:!1}function Ue(e){const t=e&&e.__v_raw;return t?Ue(t):e}function tm(e){return!It(e,"__v_skip")&&Object.isExtensible(e)&&zC(e,"__v_skip",!0),e}const Hn=e=>jt(e)?mn(e):e,zh=e=>jt(e)?Gi(e):e;function rt(e){return e?e.__v_isRef===!0:!1}function K(e){return uT(e,!1)}function Pe(e){return uT(e,!0)}function uT(e,t){return rt(e)?e:new xL(e,t)}class xL{constructor(t,n){this.dep=new zb,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Ue(t),this._value=n?t:Hn(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,r=this.__v_isShallow||ds(t)||No(t);t=r?t:Ue(t),Io(t,n)&&(this._rawValue=t,this._value=r?t:Hn(t),this.dep.trigger())}}function J(e){return rt(e)?e.value:e}function un(e){return et(e)?e():J(e)}const EL={get:(e,t,n)=>t==="__v_raw"?e:J(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const s=e[t];return rt(s)&&!rt(n)?(s.value=n,!0):Reflect.set(e,t,n,r)}};function cT(e){return Ao(e)?e:new Proxy(e,EL)}function sl(e){const t=Ke(e)?new Array(e.length):{};for(const n in e)t[n]=dT(e,n);return t}class CL{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return aL(Ue(this._object),this._key)}}class TL{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function ie(e,t,n){return rt(e)?e:et(e)?new TL(e):jt(e)&&arguments.length>1?dT(e,t,n):K(e)}function dT(e,t,n){const r=e[t];return rt(r)?r:new CL(e,t,n)}class PL{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new zb(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Yc-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&Gt!==this)return YC(this,!0),!0}get value(){const t=this.dep.track();return JC(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function RL(e,t,n=!1){let r,s;return et(e)?r=e:(r=e.get,s=e.set),new PL(r,s,n)}const vf={},Hh=new WeakMap;let fa;function IL(e,t=!1,n=fa){if(n){let r=Hh.get(n);r||Hh.set(n,r=[]),r.push(e)}}function AL(e,t,n=Vt){const{immediate:r,deep:s,once:i,scheduler:o,augmentJob:a,call:l}=n,u=_=>s?_:ds(_)||s===!1||s===0?Ni(_,1):Ni(_);let c,d,f,h,g=!1,m=!1;if(rt(e)?(d=()=>e.value,g=ds(e)):Ao(e)?(d=()=>u(e),g=!0):Ke(e)?(m=!0,g=e.some(_=>Ao(_)||ds(_)),d=()=>e.map(_=>{if(rt(_))return _.value;if(Ao(_))return u(_);if(et(_))return l?l(_,2):_()})):et(e)?t?d=l?()=>l(e,2):e:d=()=>{if(f){Wi();try{f()}finally{qi()}}const _=fa;fa=c;try{return l?l(e,3,[h]):e(h)}finally{fa=_}}:d=di,t&&s){const _=d,S=s===!0?1/0:s;d=()=>Ni(_(),S)}const y=$d(),w=()=>{c.stop(),y&&y.active&&Fb(y.effects,c)};if(i&&t){const _=t;t=(...S)=>{_(...S),w()}}let b=m?new Array(e.length).fill(vf):vf;const x=_=>{if(!(!(c.flags&1)||!c.dirty&&!_))if(t){const S=c.run();if(s||g||(m?S.some((P,A)=>Io(P,b[A])):Io(S,b))){f&&f();const P=fa;fa=c;try{const A=[S,b===vf?void 0:m&&b[0]===vf?[]:b,h];b=S,l?l(t,3,A):t(...A)}finally{fa=P}}}else c.run()};return a&&a(x),c=new GC(d),c.scheduler=o?()=>o(x,!1):x,h=_=>IL(_,!1,c),f=c.onStop=()=>{const _=Hh.get(c);if(_){if(l)l(_,4);else for(const S of _)S();Hh.delete(c)}},t?r?x(!0):b=c.run():o?o(x.bind(null,!0),!0):c.run(),w.pause=c.pause.bind(c),w.resume=c.resume.bind(c),w.stop=w,w}function Ni(e,t=1/0,n){if(t<=0||!jt(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,rt(e))Ni(e.value,t,n);else if(Ke(e))for(let r=0;r<e.length;r++)Ni(e[r],t,n);else if(NC(e)||Bl(e))e.forEach(r=>{Ni(r,t,n)});else if(UC(e)){for(const r in e)Ni(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Ni(e[r],t,n)}return e}/**
|
|
10
|
+
* @vue/runtime-core v3.5.22
|
|
11
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
12
|
+
* @license MIT
|
|
13
|
+
**/function Nd(e,t,n,r){try{return r?e(...r):e()}catch(s){nm(s,t,n)}}function $s(e,t,n,r){if(et(e)){const s=Nd(e,t,n,r);return s&&BC(s)&&s.catch(i=>{nm(i,t,n)}),s}if(Ke(e)){const s=[];for(let i=0;i<e.length;i++)s.push($s(e[i],t,n,r));return s}}function nm(e,t,n,r=!0){const s=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||Vt;if(t){let a=t.parent;const l=t.proxy,u=`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){const c=a.ec;if(c){for(let d=0;d<c.length;d++)if(c[d](e,l,u)===!1)return}a=a.parent}if(i){Wi(),Nd(i,null,10,[e,l,u]),qi();return}}OL(e,n,s,r,o)}function OL(e,t,n,r=!0,s=!1){if(s)throw e;console.error(e)}const mr=[];let ti=-1;const Vl=[];let ho=null,xl=0;const fT=Promise.resolve();let jh=null;function Pt(e){const t=jh||fT;return e?t.then(this?e.bind(this):e):t}function ML(e){let t=ti+1,n=mr.length;for(;t<n;){const r=t+n>>>1,s=mr[r],i=Qc(s);i<e||i===e&&s.flags&2?t=r+1:n=r}return t}function jb(e){if(!(e.flags&1)){const t=Qc(e),n=mr[mr.length-1];!n||!(e.flags&2)&&t>=Qc(n)?mr.push(e):mr.splice(ML(t),0,e),e.flags|=1,hT()}}function hT(){jh||(jh=fT.then(mT))}function DL(e){Ke(e)?Vl.push(...e):ho&&e.id===-1?ho.splice(xl+1,0,e):e.flags&1||(Vl.push(e),e.flags|=1),hT()}function Sw(e,t,n=ti+1){for(;n<mr.length;n++){const r=mr[n];if(r&&r.flags&2){if(e&&r.id!==e.uid)continue;mr.splice(n,1),n--,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function pT(e){if(Vl.length){const t=[...new Set(Vl)].sort((n,r)=>Qc(n)-Qc(r));if(Vl.length=0,ho){ho.push(...t);return}for(ho=t,xl=0;xl<ho.length;xl++){const n=ho[xl];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}ho=null,xl=0}}const Qc=e=>e.id==null?e.flags&2?-1:1/0:e.id;function mT(e){try{for(ti=0;ti<mr.length;ti++){const t=mr[ti];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Nd(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;ti<mr.length;ti++){const t=mr[ti];t&&(t.flags&=-2)}ti=-1,mr.length=0,pT(),jh=null,(mr.length||Vl.length)&&mT()}}let qn=null,gT=null;function Wh(e){const t=qn;return qn=e,gT=e&&e.type.__scopeId||null,t}function v(e,t=qn,n){if(!t||e._n)return e;const r=(...s)=>{r._d&&Kh(-1);const i=Wh(t);let o;try{o=e(...s)}finally{Wh(i),r._d&&Kh(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function zt(e,t){if(qn===null)return e;const n=lm(qn),r=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[i,o,a,l=Vt]=t[s];i&&(et(i)&&(i={mounted:i,updated:i}),i.deep&&Ni(o),r.push({dir:i,instance:n,value:o,oldValue:void 0,arg:a,modifiers:l}))}return e}function ra(e,t,n,r){const s=e.dirs,i=t&&t.dirs;for(let o=0;o<s.length;o++){const a=s[o];i&&(a.oldValue=i[o].value);let l=a.dir[r];l&&(Wi(),$s(l,n,8,[e.el,a,e,t]),qi())}}const vT=Symbol("_vte"),yT=e=>e.__isTeleport,Ic=e=>e&&(e.disabled||e.disabled===""),_w=e=>e&&(e.defer||e.defer===""),kw=e=>typeof SVGElement<"u"&&e instanceof SVGElement,xw=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Nv=(e,t)=>{const n=e&&e.to;return on(n)?t?t(n):null:n},bT={name:"Teleport",__isTeleport:!0,process(e,t,n,r,s,i,o,a,l,u){const{mc:c,pc:d,pbc:f,o:{insert:h,querySelector:g,createText:m,createComment:y}}=u,w=Ic(t.props);let{shapeFlag:b,children:x,dynamicChildren:_}=t;if(e==null){const S=t.el=m(""),P=t.anchor=m("");h(S,n,r),h(P,n,r);const A=(T,R)=>{b&16&&c(x,T,R,s,i,o,a,l)},E=()=>{const T=t.target=Nv(t.props,g),R=wT(T,t,m,h);T&&(o!=="svg"&&kw(T)?o="svg":o!=="mathml"&&xw(T)&&(o="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(T),w||(A(T,R),uh(t,!1)))};w&&(A(n,P),uh(t,!0)),_w(t.props)?(t.el.__isMounted=!1,pr(()=>{E(),delete t.el.__isMounted},i)):E()}else{if(_w(t.props)&&e.el.__isMounted===!1){pr(()=>{bT.process(e,t,n,r,s,i,o,a,l,u)},i);return}t.el=e.el,t.targetStart=e.targetStart;const S=t.anchor=e.anchor,P=t.target=e.target,A=t.targetAnchor=e.targetAnchor,E=Ic(e.props),T=E?n:P,R=E?S:A;if(o==="svg"||kw(P)?o="svg":(o==="mathml"||xw(P))&&(o="mathml"),_?(f(e.dynamicChildren,_,T,s,i,o,a),Zb(e,t,!0)):l||d(e,t,T,R,s,i,o,a,!1),w)E?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):yf(t,n,S,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const I=t.target=Nv(t.props,g);I&&yf(t,I,null,u,0)}else E&&yf(t,P,A,u,1);uh(t,w)}},remove(e,t,n,{um:r,o:{remove:s}},i){const{shapeFlag:o,children:a,anchor:l,targetStart:u,targetAnchor:c,target:d,props:f}=e;if(d&&(s(u),s(c)),i&&s(l),o&16){const h=i||!Ic(f);for(let g=0;g<a.length;g++){const m=a[g];r(m,t,n,h,!!m.dynamicChildren)}}},move:yf,hydrate:LL};function yf(e,t,n,{o:{insert:r},m:s},i=2){i===0&&r(e.targetAnchor,t,n);const{el:o,anchor:a,shapeFlag:l,children:u,props:c}=e,d=i===2;if(d&&r(o,t,n),(!d||Ic(c))&&l&16)for(let f=0;f<u.length;f++)s(u[f],t,n,2);d&&r(a,t,n)}function LL(e,t,n,r,s,i,{o:{nextSibling:o,parentNode:a,querySelector:l,insert:u,createText:c}},d){function f(m,y,w,b){y.anchor=d(o(m),y,a(m),n,r,s,i),y.targetStart=w,y.targetAnchor=b}const h=t.target=Nv(t.props,l),g=Ic(t.props);if(h){const m=h._lpa||h.firstChild;if(t.shapeFlag&16)if(g)f(e,t,m,m&&o(m));else{t.anchor=o(e);let y=m;for(;y;){if(y&&y.nodeType===8){if(y.data==="teleport start anchor")t.targetStart=y;else if(y.data==="teleport anchor"){t.targetAnchor=y,h._lpa=t.targetAnchor&&o(t.targetAnchor);break}}y=o(y)}t.targetAnchor||wT(h,t,c,u),d(m&&o(m),t,h,n,r,s,i)}uh(t,g)}else g&&t.shapeFlag&16&&f(e,t,e,o(e));return t.anchor&&o(t.anchor)}const $L=bT;function uh(e,t){const n=e.ctx;if(n&&n.ut){let r,s;for(t?(r=e.el,s=e.anchor):(r=e.targetStart,s=e.targetAnchor);r&&r!==s;)r.nodeType===1&&r.setAttribute("data-v-owner",n.uid),r=r.nextSibling;n.ut()}}function wT(e,t,n,r){const s=t.targetStart=n(""),i=t.targetAnchor=n("");return s[vT]=i,e&&(r(s,e),r(i,e)),i}const Ai=Symbol("_leaveCb"),bf=Symbol("_enterCb");function ST(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return yt(()=>{e.isMounted=!0}),Vn(()=>{e.isUnmounting=!0}),e}const Zr=[Function,Array],_T={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Zr,onEnter:Zr,onAfterEnter:Zr,onEnterCancelled:Zr,onBeforeLeave:Zr,onLeave:Zr,onAfterLeave:Zr,onLeaveCancelled:Zr,onBeforeAppear:Zr,onAppear:Zr,onAfterAppear:Zr,onAppearCancelled:Zr},kT=e=>{const t=e.subTree;return t.component?kT(t.component):t},FL={name:"BaseTransition",props:_T,setup(e,{slots:t}){const n=Ru(),r=ST();return()=>{const s=t.default&&Wb(t.default(),!0);if(!s||!s.length)return;const i=xT(s),o=Ue(e),{mode:a}=o;if(r.isLeaving)return cg(i);const l=Ew(i);if(!l)return cg(i);let u=Jc(l,o,r,n,d=>u=d);l.type!==Wn&&Ga(l,u);let c=n.subTree&&Ew(n.subTree);if(c&&c.type!==Wn&&!ga(c,l)&&kT(n).type!==Wn){let d=Jc(c,o,r,n);if(Ga(c,d),a==="out-in"&&l.type!==Wn)return r.isLeaving=!0,d.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,c=void 0},cg(i);a==="in-out"&&l.type!==Wn?d.delayLeave=(f,h,g)=>{const m=ET(r,c);m[String(c.key)]=c,f[Ai]=()=>{h(),f[Ai]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{g(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return i}}};function xT(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Wn){t=n;break}}return t}const NL=FL;function ET(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function Jc(e,t,n,r,s){const{appear:i,mode:o,persisted:a=!1,onBeforeEnter:l,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:f,onLeave:h,onAfterLeave:g,onLeaveCancelled:m,onBeforeAppear:y,onAppear:w,onAfterAppear:b,onAppearCancelled:x}=t,_=String(e.key),S=ET(n,e),P=(T,R)=>{T&&$s(T,r,9,R)},A=(T,R)=>{const I=R[1];P(T,R),Ke(T)?T.every(O=>O.length<=1)&&I():T.length<=1&&I()},E={mode:o,persisted:a,beforeEnter(T){let R=l;if(!n.isMounted)if(i)R=y||l;else return;T[Ai]&&T[Ai](!0);const I=S[_];I&&ga(e,I)&&I.el[Ai]&&I.el[Ai](),P(R,[T])},enter(T){let R=u,I=c,O=d;if(!n.isMounted)if(i)R=w||u,I=b||c,O=x||d;else return;let H=!1;const N=T[bf]=D=>{H||(H=!0,D?P(O,[T]):P(I,[T]),E.delayedLeave&&E.delayedLeave(),T[bf]=void 0)};R?A(R,[T,N]):N()},leave(T,R){const I=String(e.key);if(T[bf]&&T[bf](!0),n.isUnmounting)return R();P(f,[T]);let O=!1;const H=T[Ai]=N=>{O||(O=!0,R(),N?P(m,[T]):P(g,[T]),T[Ai]=void 0,S[I]===e&&delete S[I])};S[I]=e,h?A(h,[T,H]):H()},clone(T){const R=Jc(T,t,n,r,s);return s&&s(R),R}};return E}function cg(e){if(rm(e))return e=Ki(e),e.children=null,e}function Ew(e){if(!rm(e))return yT(e.type)&&e.children?xT(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&&et(n.default))return n.default()}}function Ga(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Ga(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 Wb(e,t=!1,n){let r=[],s=0;for(let i=0;i<e.length;i++){let o=e[i];const a=n==null?o.key:String(n)+String(o.key!=null?o.key:i);o.type===Oe?(o.patchFlag&128&&s++,r=r.concat(Wb(o.children,t,a))):(t||o.type!==Wn)&&r.push(a!=null?Ki(o,{key:a}):o)}if(s>1)for(let i=0;i<r.length;i++)r[i].patchFlag=-2;return r}function Fe(e,t){return et(e)?_n({name:e.name},t,{setup:e}):e}function Vr(){const e=Ru();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function CT(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const qh=new WeakMap;function Ac(e,t,n,r,s=!1){if(Ke(e)){e.forEach((g,m)=>Ac(g,t&&(Ke(t)?t[m]:t),n,r,s));return}if(Ul(r)&&!s){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Ac(e,t,n,r.component.subTree);return}const i=r.shapeFlag&4?lm(r.component):r.el,o=s?null:i,{i:a,r:l}=e,u=t&&t.r,c=a.refs===Vt?a.refs={}:a.refs,d=a.setupState,f=Ue(d),h=d===Vt?FC:g=>It(f,g);if(u!=null&&u!==l){if(Cw(t),on(u))c[u]=null,h(u)&&(d[u]=null);else if(rt(u)){u.value=null;const g=t;g.k&&(c[g.k]=null)}}if(et(l))Nd(l,a,12,[o,c]);else{const g=on(l),m=rt(l);if(g||m){const y=()=>{if(e.f){const w=g?h(l)?d[l]:c[l]:l.value;if(s)Ke(w)&&Fb(w,i);else if(Ke(w))w.includes(i)||w.push(i);else if(g)c[l]=[i],h(l)&&(d[l]=c[l]);else{const b=[i];l.value=b,e.k&&(c[e.k]=b)}}else g?(c[l]=o,h(l)&&(d[l]=o)):m&&(l.value=o,e.k&&(c[e.k]=o))};if(o){const w=()=>{y(),qh.delete(e)};w.id=-1,qh.set(e,w),pr(w,n)}else Cw(e),y()}}}function Cw(e){const t=qh.get(e);t&&(t.flags|=8,qh.delete(e))}Xp().requestIdleCallback;Xp().cancelIdleCallback;const Ul=e=>!!e.type.__asyncLoader,rm=e=>e.type.__isKeepAlive;function TT(e,t){PT(e,"a",t)}function qb(e,t){PT(e,"da",t)}function PT(e,t,n=sr){const r=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(sm(t,r,n),n){let s=n.parent;for(;s&&s.parent;)rm(s.parent.vnode)&&BL(r,t,n,s),s=s.parent}}function BL(e,t,n,r){const s=sm(t,e,r,!0);im(()=>{Fb(r[t],s)},n)}function sm(e,t,n=sr,r=!1){if(n){const s=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{Wi();const a=Vd(n),l=$s(t,n,e,o);return a(),qi(),l});return r?s.unshift(i):s.push(i),i}}const no=e=>(t,n=sr)=>{(!td||e==="sp")&&sm(e,(...r)=>t(...r),n)},Pu=no("bm"),yt=no("m"),RT=no("bu"),Gb=no("u"),Vn=no("bum"),im=no("um"),VL=no("sp"),UL=no("rtg"),zL=no("rtc");function HL(e,t=sr){sm("ec",e,t)}const Kb="components",jL="directives";function $n(e,t){return Yb(Kb,e,!0,t)||e}const WL=Symbol.for("v-ndc");function qL(e){return on(e)&&Yb(Kb,e,!1)||e}function Zc(e){return Yb(jL,e)}function Yb(e,t,n=!0,r=!1){const s=qn||sr;if(s){const i=s.type;if(e===Kb){const a=A$(i,!1);if(a&&(a===t||a===yr(t)||a===mi(yr(t))))return i}const o=Tw(s[e]||i[e],t)||Tw(s.appContext[e],t);return!o&&r?i:o}}function Tw(e,t){return e&&(e[t]||e[yr(t)]||e[mi(yr(t))])}function Qt(e,t,n,r){let s;const i=n,o=Ke(e);if(o||on(e)){const a=o&&Ao(e);let l=!1,u=!1;a&&(l=!ds(e),u=No(e),e=Qp(e)),s=new Array(e.length);for(let c=0,d=e.length;c<d;c++)s[c]=t(l?u?zh(Hn(e[c])):Hn(e[c]):e[c],c,void 0,i)}else if(typeof e=="number"){s=new Array(e);for(let a=0;a<e;a++)s[a]=t(a+1,a,void 0,i)}else if(jt(e))if(e[Symbol.iterator])s=Array.from(e,(a,l)=>t(a,l,void 0,i));else{const a=Object.keys(e);s=new Array(a.length);for(let l=0,u=a.length;l<u;l++){const c=a[l];s[l]=t(e[c],c,l,i)}}else s=[];return s}function IT(e,t){for(let n=0;n<t.length;n++){const r=t[n];if(Ke(r))for(let s=0;s<r.length;s++)e[r[s].name]=r[s].fn;else r&&(e[r.name]=r.key?(...s)=>{const i=r.fn(...s);return i&&(i.key=r.key),i}:r.fn)}return e}function om(e,t,n={},r,s){if(qn.ce||qn.parent&&Ul(qn.parent)&&qn.parent.ce){const u=Object.keys(n).length>0;return $(),te(Oe,null,[p("slot",n,r&&r())],u?-2:64)}let i=e[t];i&&i._c&&(i._d=!1),$();const o=i&&AT(i(n)),a=n.key||o&&o.key,l=te(Oe,{key:(a&&!to(a)?a:`_${t}`)+(!o&&r?"_fb":"")},o||(r?r():[]),o&&e._===1?64:-2);return l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),i&&i._c&&(i._d=!0),l}function AT(e){return e.some(t=>su(t)?!(t.type===Wn||t.type===Oe&&!AT(t.children)):!0)?e:null}const Bv=e=>e?YT(e)?lm(e):Bv(e.parent):null,Oc=_n(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=>Bv(e.parent),$root:e=>Bv(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Xb(e),$forceUpdate:e=>e.f||(e.f=()=>{jb(e.update)}),$nextTick:e=>e.n||(e.n=Pt.bind(e.proxy)),$watch:e=>h$.bind(e)}),dg=(e,t)=>e!==Vt&&!e.__isScriptSetup&&It(e,t),GL={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:s,props:i,accessCache:o,type:a,appContext:l}=e;let u;if(t[0]!=="$"){const h=o[t];if(h!==void 0)switch(h){case 1:return r[t];case 2:return s[t];case 4:return n[t];case 3:return i[t]}else{if(dg(r,t))return o[t]=1,r[t];if(s!==Vt&&It(s,t))return o[t]=2,s[t];if((u=e.propsOptions[0])&&It(u,t))return o[t]=3,i[t];if(n!==Vt&&It(n,t))return o[t]=4,n[t];Vv&&(o[t]=0)}}const c=Oc[t];let d,f;if(c)return t==="$attrs"&&rr(e.attrs,"get",""),c(e);if((d=a.__cssModules)&&(d=d[t]))return d;if(n!==Vt&&It(n,t))return o[t]=4,n[t];if(f=l.config.globalProperties,It(f,t))return f[t]},set({_:e},t,n){const{data:r,setupState:s,ctx:i}=e;return dg(s,t)?(s[t]=n,!0):r!==Vt&&It(r,t)?(r[t]=n,!0):It(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:s,propsOptions:i,type:o}},a){let l,u;return!!(n[a]||e!==Vt&&a[0]!=="$"&&It(e,a)||dg(t,a)||(l=i[0])&&It(l,a)||It(r,a)||It(Oc,a)||It(s.config.globalProperties,a)||(u=o.__cssModules)&&u[a])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:It(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Pw(e){return Ke(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Vv=!0;function KL(e){const t=Xb(e),n=e.proxy,r=e.ctx;Vv=!1,t.beforeCreate&&Rw(t.beforeCreate,e,"bc");const{data:s,computed:i,methods:o,watch:a,provide:l,inject:u,created:c,beforeMount:d,mounted:f,beforeUpdate:h,updated:g,activated:m,deactivated:y,beforeDestroy:w,beforeUnmount:b,destroyed:x,unmounted:_,render:S,renderTracked:P,renderTriggered:A,errorCaptured:E,serverPrefetch:T,expose:R,inheritAttrs:I,components:O,directives:H,filters:N}=t;if(u&&YL(u,r,null),o)for(const U in o){const Q=o[U];et(Q)&&(r[U]=Q.bind(n))}if(s){const U=s.call(n,n);jt(U)&&(e.data=mn(U))}if(Vv=!0,i)for(const U in i){const Q=i[U],V=et(Q)?Q.bind(n,n):et(Q.get)?Q.get.bind(n,n):di,L=!et(Q)&&et(Q.set)?Q.set.bind(n):di,oe=M({get:V,set:L});Object.defineProperty(r,U,{enumerable:!0,configurable:!0,get:()=>oe.value,set:j=>oe.value=j})}if(a)for(const U in a)OT(a[U],r,n,U);if(l){const U=et(l)?l.call(n):l;Reflect.ownKeys(U).forEach(Q=>{Jt(Q,U[Q])})}c&&Rw(c,e,"c");function W(U,Q){Ke(Q)?Q.forEach(V=>U(V.bind(n))):Q&&U(Q.bind(n))}if(W(Pu,d),W(yt,f),W(RT,h),W(Gb,g),W(TT,m),W(qb,y),W(HL,E),W(zL,P),W(UL,A),W(Vn,b),W(im,_),W(VL,T),Ke(R))if(R.length){const U=e.exposed||(e.exposed={});R.forEach(Q=>{Object.defineProperty(U,Q,{get:()=>n[Q],set:V=>n[Q]=V,enumerable:!0})})}else e.exposed||(e.exposed={});S&&e.render===di&&(e.render=S),I!=null&&(e.inheritAttrs=I),O&&(e.components=O),H&&(e.directives=H),T&&CT(e)}function YL(e,t,n=di){Ke(e)&&(e=Uv(e));for(const r in e){const s=e[r];let i;jt(s)?"default"in s?i=Je(s.from||r,s.default,!0):i=Je(s.from||r):i=Je(s),rt(i)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[r]=i}}function Rw(e,t,n){$s(Ke(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function OT(e,t,n,r){let s=r.includes(".")?jT(n,r):()=>n[r];if(on(e)){const i=t[e];et(i)&&Ee(s,i)}else if(et(e))Ee(s,e.bind(n));else if(jt(e))if(Ke(e))e.forEach(i=>OT(i,t,n,r));else{const i=et(e.handler)?e.handler.bind(n):t[e.handler];et(i)&&Ee(s,i,e)}}function Xb(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:s,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,a=i.get(t);let l;return a?l=a:!s.length&&!n&&!r?l=t:(l={},s.length&&s.forEach(u=>Gh(l,u,o,!0)),Gh(l,t,o)),jt(t)&&i.set(t,l),l}function Gh(e,t,n,r=!1){const{mixins:s,extends:i}=t;i&&Gh(e,i,n,!0),s&&s.forEach(o=>Gh(e,o,n,!0));for(const o in t)if(!(r&&o==="expose")){const a=XL[o]||n&&n[o];e[o]=a?a(e[o],t[o]):t[o]}return e}const XL={data:Iw,props:Aw,emits:Aw,methods:wc,computed:wc,beforeCreate:cr,created:cr,beforeMount:cr,mounted:cr,beforeUpdate:cr,updated:cr,beforeDestroy:cr,beforeUnmount:cr,destroyed:cr,unmounted:cr,activated:cr,deactivated:cr,errorCaptured:cr,serverPrefetch:cr,components:wc,directives:wc,watch:JL,provide:Iw,inject:QL};function Iw(e,t){return t?e?function(){return _n(et(e)?e.call(this,this):e,et(t)?t.call(this,this):t)}:t:e}function QL(e,t){return wc(Uv(e),Uv(t))}function Uv(e){if(Ke(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function cr(e,t){return e?[...new Set([].concat(e,t))]:t}function wc(e,t){return e?_n(Object.create(null),e,t):t}function Aw(e,t){return e?Ke(e)&&Ke(t)?[...new Set([...e,...t])]:_n(Object.create(null),Pw(e),Pw(t??{})):t}function JL(e,t){if(!e)return t;if(!t)return e;const n=_n(Object.create(null),e);for(const r in t)n[r]=cr(e[r],t[r]);return n}function MT(){return{app:null,config:{isNativeTag:FC,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 ZL=0;function e$(e,t){return function(r,s=null){et(r)||(r=_n({},r)),s!=null&&!jt(s)&&(s=null);const i=MT(),o=new WeakSet,a=[];let l=!1;const u=i.app={_uid:ZL++,_component:r,_props:s,_container:null,_context:i,_instance:null,version:QT,get config(){return i.config},set config(c){},use(c,...d){return o.has(c)||(c&&et(c.install)?(o.add(c),c.install(u,...d)):et(c)&&(o.add(c),c(u,...d))),u},mixin(c){return i.mixins.includes(c)||i.mixins.push(c),u},component(c,d){return d?(i.components[c]=d,u):i.components[c]},directive(c,d){return d?(i.directives[c]=d,u):i.directives[c]},mount(c,d,f){if(!l){const h=u._ceVNode||p(r,s);return h.appContext=i,f===!0?f="svg":f===!1&&(f=void 0),d&&t?t(h,c):e(h,c,f),l=!0,u._container=c,c.__vue_app__=u,lm(h.component)}},onUnmount(c){a.push(c)},unmount(){l&&($s(a,u._instance,16),e(null,u._container),delete u._container.__vue_app__)},provide(c,d){return i.provides[c]=d,u},runWithContext(c){const d=La;La=u;try{return c()}finally{La=d}}};return u}}let La=null;function Jt(e,t){if(sr){let n=sr.provides;const r=sr.parent&&sr.parent.provides;r===n&&(n=sr.provides=Object.create(r)),n[e]=t}}function Je(e,t,n=!1){const r=Ru();if(r||La){let s=La?La._context.provides:r?r.parent==null||r.ce?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(s&&e in s)return s[e];if(arguments.length>1)return n&&et(t)?t.call(r&&r.proxy):t}}function DT(){return!!(Ru()||La)}const LT={},$T=()=>Object.create(LT),FT=e=>Object.getPrototypeOf(e)===LT;function t$(e,t,n,r=!1){const s={},i=$T();e.propsDefaults=Object.create(null),NT(e,t,s,i);for(const o in e.propsOptions[0])o in s||(s[o]=void 0);n?e.props=r?s:Zp(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function n$(e,t,n,r){const{props:s,attrs:i,vnode:{patchFlag:o}}=e,a=Ue(s),[l]=e.propsOptions;let u=!1;if((r||o>0)&&!(o&16)){if(o&8){const c=e.vnode.dynamicProps;for(let d=0;d<c.length;d++){let f=c[d];if(am(e.emitsOptions,f))continue;const h=t[f];if(l)if(It(i,f))h!==i[f]&&(i[f]=h,u=!0);else{const g=yr(f);s[g]=zv(l,a,g,h,e,!1)}else h!==i[f]&&(i[f]=h,u=!0)}}}else{NT(e,t,s,i)&&(u=!0);let c;for(const d in a)(!t||!It(t,d)&&((c=Ko(d))===d||!It(t,c)))&&(l?n&&(n[d]!==void 0||n[c]!==void 0)&&(s[d]=zv(l,a,d,void 0,e,!0)):delete s[d]);if(i!==a)for(const d in i)(!t||!It(t,d))&&(delete i[d],u=!0)}u&&Fi(e.attrs,"set","")}function NT(e,t,n,r){const[s,i]=e.propsOptions;let o=!1,a;if(t)for(let l in t){if(Tc(l))continue;const u=t[l];let c;s&&It(s,c=yr(l))?!i||!i.includes(c)?n[c]=u:(a||(a={}))[c]=u:am(e.emitsOptions,l)||(!(l in r)||u!==r[l])&&(r[l]=u,o=!0)}if(i){const l=Ue(n),u=a||Vt;for(let c=0;c<i.length;c++){const d=i[c];n[d]=zv(s,l,d,u[d],e,!It(u,d))}}return o}function zv(e,t,n,r,s,i){const o=e[n];if(o!=null){const a=It(o,"default");if(a&&r===void 0){const l=o.default;if(o.type!==Function&&!o.skipFactory&&et(l)){const{propsDefaults:u}=s;if(n in u)r=u[n];else{const c=Vd(s);r=u[n]=l.call(null,t),c()}}else r=l;s.ce&&s.ce._setProp(n,r)}o[0]&&(i&&!a?r=!1:o[1]&&(r===""||r===Ko(n))&&(r=!0))}return r}const r$=new WeakMap;function BT(e,t,n=!1){const r=n?r$:t.propsCache,s=r.get(e);if(s)return s;const i=e.props,o={},a=[];let l=!1;if(!et(e)){const c=d=>{l=!0;const[f,h]=BT(d,t,!0);_n(o,f),h&&a.push(...h)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!i&&!l)return jt(e)&&r.set(e,Nl),Nl;if(Ke(i))for(let c=0;c<i.length;c++){const d=yr(i[c]);Ow(d)&&(o[d]=Vt)}else if(i)for(const c in i){const d=yr(c);if(Ow(d)){const f=i[c],h=o[d]=Ke(f)||et(f)?{type:f}:_n({},f),g=h.type;let m=!1,y=!0;if(Ke(g))for(let w=0;w<g.length;++w){const b=g[w],x=et(b)&&b.name;if(x==="Boolean"){m=!0;break}else x==="String"&&(y=!1)}else m=et(g)&&g.name==="Boolean";h[0]=m,h[1]=y,(m||It(h,"default"))&&a.push(d)}}const u=[o,a];return jt(e)&&r.set(e,u),u}function Ow(e){return e[0]!=="$"&&!Tc(e)}const Qb=e=>e==="_"||e==="_ctx"||e==="$stable",Jb=e=>Ke(e)?e.map(oi):[oi(e)],s$=(e,t,n)=>{if(t._n)return t;const r=v((...s)=>Jb(t(...s)),n);return r._c=!1,r},VT=(e,t,n)=>{const r=e._ctx;for(const s in e){if(Qb(s))continue;const i=e[s];if(et(i))t[s]=s$(s,i,r);else if(i!=null){const o=Jb(i);t[s]=()=>o}}},UT=(e,t)=>{const n=Jb(t);e.slots.default=()=>n},zT=(e,t,n)=>{for(const r in t)(n||!Qb(r))&&(e[r]=t[r])},i$=(e,t,n)=>{const r=e.slots=$T();if(e.vnode.shapeFlag&32){const s=t._;s?(zT(r,t,n),n&&zC(r,"_",s,!0)):VT(t,r)}else t&&UT(e,t)},o$=(e,t,n)=>{const{vnode:r,slots:s}=e;let i=!0,o=Vt;if(r.shapeFlag&32){const a=t._;a?n&&a===1?i=!1:zT(s,t,n):(i=!t.$stable,VT(t,s)),o=t}else t&&(UT(e,t),o={default:1});if(i)for(const a in s)!Qb(a)&&o[a]==null&&delete s[a]},pr=S$;function a$(e){return l$(e)}function l$(e,t){const n=Xp();n.__VUE__=!0;const{insert:r,remove:s,patchProp:i,createElement:o,createText:a,createComment:l,setText:u,setElementText:c,parentNode:d,nextSibling:f,setScopeId:h=di,insertStaticContent:g}=e,m=(B,z,q,ce=null,de=null,be=null,Ce=void 0,ye=null,ke=!!z.dynamicChildren)=>{if(B===z)return;B&&!ga(B,z)&&(ce=X(B),j(B,de,be,!0),B=null),z.patchFlag===-2&&(ke=!1,z.dynamicChildren=null);const{type:ge,ref:Ve,shapeFlag:Ie}=z;switch(ge){case Bd:y(B,z,q,ce);break;case Wn:w(B,z,q,ce);break;case pg:B==null&&b(z,q,ce,Ce);break;case Oe:O(B,z,q,ce,de,be,Ce,ye,ke);break;default:Ie&1?S(B,z,q,ce,de,be,Ce,ye,ke):Ie&6?H(B,z,q,ce,de,be,Ce,ye,ke):(Ie&64||Ie&128)&&ge.process(B,z,q,ce,de,be,Ce,ye,ke,G)}Ve!=null&&de?Ac(Ve,B&&B.ref,be,z||B,!z):Ve==null&&B&&B.ref!=null&&Ac(B.ref,null,be,B,!0)},y=(B,z,q,ce)=>{if(B==null)r(z.el=a(z.children),q,ce);else{const de=z.el=B.el;z.children!==B.children&&u(de,z.children)}},w=(B,z,q,ce)=>{B==null?r(z.el=l(z.children||""),q,ce):z.el=B.el},b=(B,z,q,ce)=>{[B.el,B.anchor]=g(B.children,z,q,ce,B.el,B.anchor)},x=({el:B,anchor:z},q,ce)=>{let de;for(;B&&B!==z;)de=f(B),r(B,q,ce),B=de;r(z,q,ce)},_=({el:B,anchor:z})=>{let q;for(;B&&B!==z;)q=f(B),s(B),B=q;s(z)},S=(B,z,q,ce,de,be,Ce,ye,ke)=>{z.type==="svg"?Ce="svg":z.type==="math"&&(Ce="mathml"),B==null?P(z,q,ce,de,be,Ce,ye,ke):T(B,z,de,be,Ce,ye,ke)},P=(B,z,q,ce,de,be,Ce,ye)=>{let ke,ge;const{props:Ve,shapeFlag:Ie,transition:Te,dirs:Ye}=B;if(ke=B.el=o(B.type,be,Ve&&Ve.is,Ve),Ie&8?c(ke,B.children):Ie&16&&E(B.children,ke,null,ce,de,fg(B,be),Ce,ye),Ye&&ra(B,null,ce,"created"),A(ke,B,B.scopeId,Ce,ce),Ve){for(const Wt in Ve)Wt!=="value"&&!Tc(Wt)&&i(ke,Wt,null,Ve[Wt],be,ce);"value"in Ve&&i(ke,"value",null,Ve.value,be),(ge=Ve.onVnodeBeforeMount)&&Ks(ge,ce,B)}Ye&&ra(B,null,ce,"beforeMount");const bt=u$(de,Te);bt&&Te.beforeEnter(ke),r(ke,z,q),((ge=Ve&&Ve.onVnodeMounted)||bt||Ye)&&pr(()=>{ge&&Ks(ge,ce,B),bt&&Te.enter(ke),Ye&&ra(B,null,ce,"mounted")},de)},A=(B,z,q,ce,de)=>{if(q&&h(B,q),ce)for(let be=0;be<ce.length;be++)h(B,ce[be]);if(de){let be=de.subTree;if(z===be||qT(be.type)&&(be.ssContent===z||be.ssFallback===z)){const Ce=de.vnode;A(B,Ce,Ce.scopeId,Ce.slotScopeIds,de.parent)}}},E=(B,z,q,ce,de,be,Ce,ye,ke=0)=>{for(let ge=ke;ge<B.length;ge++){const Ve=B[ge]=ye?po(B[ge]):oi(B[ge]);m(null,Ve,z,q,ce,de,be,Ce,ye)}},T=(B,z,q,ce,de,be,Ce)=>{const ye=z.el=B.el;let{patchFlag:ke,dynamicChildren:ge,dirs:Ve}=z;ke|=B.patchFlag&16;const Ie=B.props||Vt,Te=z.props||Vt;let Ye;if(q&&sa(q,!1),(Ye=Te.onVnodeBeforeUpdate)&&Ks(Ye,q,z,B),Ve&&ra(z,B,q,"beforeUpdate"),q&&sa(q,!0),(Ie.innerHTML&&Te.innerHTML==null||Ie.textContent&&Te.textContent==null)&&c(ye,""),ge?R(B.dynamicChildren,ge,ye,q,ce,fg(z,de),be):Ce||Q(B,z,ye,null,q,ce,fg(z,de),be,!1),ke>0){if(ke&16)I(ye,Ie,Te,q,de);else if(ke&2&&Ie.class!==Te.class&&i(ye,"class",null,Te.class,de),ke&4&&i(ye,"style",Ie.style,Te.style,de),ke&8){const bt=z.dynamicProps;for(let Wt=0;Wt<bt.length;Wt++){const Dt=bt[Wt],Er=Ie[Dt],Zn=Te[Dt];(Zn!==Er||Dt==="value")&&i(ye,Dt,Er,Zn,de,q)}}ke&1&&B.children!==z.children&&c(ye,z.children)}else!Ce&&ge==null&&I(ye,Ie,Te,q,de);((Ye=Te.onVnodeUpdated)||Ve)&&pr(()=>{Ye&&Ks(Ye,q,z,B),Ve&&ra(z,B,q,"updated")},ce)},R=(B,z,q,ce,de,be,Ce)=>{for(let ye=0;ye<z.length;ye++){const ke=B[ye],ge=z[ye],Ve=ke.el&&(ke.type===Oe||!ga(ke,ge)||ke.shapeFlag&198)?d(ke.el):q;m(ke,ge,Ve,null,ce,de,be,Ce,!0)}},I=(B,z,q,ce,de)=>{if(z!==q){if(z!==Vt)for(const be in z)!Tc(be)&&!(be in q)&&i(B,be,z[be],null,de,ce);for(const be in q){if(Tc(be))continue;const Ce=q[be],ye=z[be];Ce!==ye&&be!=="value"&&i(B,be,ye,Ce,de,ce)}"value"in q&&i(B,"value",z.value,q.value,de)}},O=(B,z,q,ce,de,be,Ce,ye,ke)=>{const ge=z.el=B?B.el:a(""),Ve=z.anchor=B?B.anchor:a("");let{patchFlag:Ie,dynamicChildren:Te,slotScopeIds:Ye}=z;Ye&&(ye=ye?ye.concat(Ye):Ye),B==null?(r(ge,q,ce),r(Ve,q,ce),E(z.children||[],q,Ve,de,be,Ce,ye,ke)):Ie>0&&Ie&64&&Te&&B.dynamicChildren?(R(B.dynamicChildren,Te,q,de,be,Ce,ye),(z.key!=null||de&&z===de.subTree)&&Zb(B,z,!0)):Q(B,z,q,Ve,de,be,Ce,ye,ke)},H=(B,z,q,ce,de,be,Ce,ye,ke)=>{z.slotScopeIds=ye,B==null?z.shapeFlag&512?de.ctx.activate(z,q,ce,Ce,ke):N(z,q,ce,de,be,Ce,ke):D(B,z,ke)},N=(B,z,q,ce,de,be,Ce)=>{const ye=B.component=C$(B,ce,de);if(rm(B)&&(ye.ctx.renderer=G),T$(ye,!1,Ce),ye.asyncDep){if(de&&de.registerDep(ye,W,Ce),!B.el){const ke=ye.subTree=p(Wn);w(null,ke,z,q),B.placeholder=ke.el}}else W(ye,B,z,q,de,be,Ce)},D=(B,z,q)=>{const ce=z.component=B.component;if(b$(B,z,q))if(ce.asyncDep&&!ce.asyncResolved){U(ce,z,q);return}else ce.next=z,ce.update();else z.el=B.el,ce.vnode=z},W=(B,z,q,ce,de,be,Ce)=>{const ye=()=>{if(B.isMounted){let{next:Ie,bu:Te,u:Ye,parent:bt,vnode:Wt}=B;{const Wr=HT(B);if(Wr){Ie&&(Ie.el=Wt.el,U(B,Ie,Ce)),Wr.asyncDep.then(()=>{B.isUnmounted||ye()});return}}let Dt=Ie,Er;sa(B,!1),Ie?(Ie.el=Wt.el,U(B,Ie,Ce)):Ie=Wt,Te&&lh(Te),(Er=Ie.props&&Ie.props.onVnodeBeforeUpdate)&&Ks(Er,bt,Ie,Wt),sa(B,!0);const Zn=hg(B),Cs=B.subTree;B.subTree=Zn,m(Cs,Zn,d(Cs.el),X(Cs),B,de,be),Ie.el=Zn.el,Dt===null&&w$(B,Zn.el),Ye&&pr(Ye,de),(Er=Ie.props&&Ie.props.onVnodeUpdated)&&pr(()=>Ks(Er,bt,Ie,Wt),de)}else{let Ie;const{el:Te,props:Ye}=z,{bm:bt,m:Wt,parent:Dt,root:Er,type:Zn}=B,Cs=Ul(z);if(sa(B,!1),bt&&lh(bt),!Cs&&(Ie=Ye&&Ye.onVnodeBeforeMount)&&Ks(Ie,Dt,z),sa(B,!0),Te&&De){const Wr=()=>{B.subTree=hg(B),De(Te,B.subTree,B,de,null)};Cs&&Zn.__asyncHydrate?Zn.__asyncHydrate(Te,B,Wr):Wr()}else{Er.ce&&Er.ce._def.shadowRoot!==!1&&Er.ce._injectChildStyle(Zn);const Wr=B.subTree=hg(B);m(null,Wr,q,ce,B,de,be),z.el=Wr.el}if(Wt&&pr(Wt,de),!Cs&&(Ie=Ye&&Ye.onVnodeMounted)){const Wr=z;pr(()=>Ks(Ie,Dt,Wr),de)}(z.shapeFlag&256||Dt&&Ul(Dt.vnode)&&Dt.vnode.shapeFlag&256)&&B.a&&pr(B.a,de),B.isMounted=!0,z=q=ce=null}};B.scope.on();const ke=B.effect=new GC(ye);B.scope.off();const ge=B.update=ke.run.bind(ke),Ve=B.job=ke.runIfDirty.bind(ke);Ve.i=B,Ve.id=B.uid,ke.scheduler=()=>jb(Ve),sa(B,!0),ge()},U=(B,z,q)=>{z.component=B;const ce=B.vnode.props;B.vnode=z,B.next=null,n$(B,z.props,ce,q),o$(B,z.children,q),Wi(),Sw(B),qi()},Q=(B,z,q,ce,de,be,Ce,ye,ke=!1)=>{const ge=B&&B.children,Ve=B?B.shapeFlag:0,Ie=z.children,{patchFlag:Te,shapeFlag:Ye}=z;if(Te>0){if(Te&128){L(ge,Ie,q,ce,de,be,Ce,ye,ke);return}else if(Te&256){V(ge,Ie,q,ce,de,be,Ce,ye,ke);return}}Ye&8?(Ve&16&&Se(ge,de,be),Ie!==ge&&c(q,Ie)):Ve&16?Ye&16?L(ge,Ie,q,ce,de,be,Ce,ye,ke):Se(ge,de,be,!0):(Ve&8&&c(q,""),Ye&16&&E(Ie,q,ce,de,be,Ce,ye,ke))},V=(B,z,q,ce,de,be,Ce,ye,ke)=>{B=B||Nl,z=z||Nl;const ge=B.length,Ve=z.length,Ie=Math.min(ge,Ve);let Te;for(Te=0;Te<Ie;Te++){const Ye=z[Te]=ke?po(z[Te]):oi(z[Te]);m(B[Te],Ye,q,null,de,be,Ce,ye,ke)}ge>Ve?Se(B,de,be,!0,!1,Ie):E(z,q,ce,de,be,Ce,ye,ke,Ie)},L=(B,z,q,ce,de,be,Ce,ye,ke)=>{let ge=0;const Ve=z.length;let Ie=B.length-1,Te=Ve-1;for(;ge<=Ie&&ge<=Te;){const Ye=B[ge],bt=z[ge]=ke?po(z[ge]):oi(z[ge]);if(ga(Ye,bt))m(Ye,bt,q,null,de,be,Ce,ye,ke);else break;ge++}for(;ge<=Ie&&ge<=Te;){const Ye=B[Ie],bt=z[Te]=ke?po(z[Te]):oi(z[Te]);if(ga(Ye,bt))m(Ye,bt,q,null,de,be,Ce,ye,ke);else break;Ie--,Te--}if(ge>Ie){if(ge<=Te){const Ye=Te+1,bt=Ye<Ve?z[Ye].el:ce;for(;ge<=Te;)m(null,z[ge]=ke?po(z[ge]):oi(z[ge]),q,bt,de,be,Ce,ye,ke),ge++}}else if(ge>Te)for(;ge<=Ie;)j(B[ge],de,be,!0),ge++;else{const Ye=ge,bt=ge,Wt=new Map;for(ge=bt;ge<=Te;ge++){const qr=z[ge]=ke?po(z[ge]):oi(z[ge]);qr.key!=null&&Wt.set(qr.key,ge)}let Dt,Er=0;const Zn=Te-bt+1;let Cs=!1,Wr=0;const rc=new Array(Zn);for(ge=0;ge<Zn;ge++)rc[ge]=0;for(ge=Ye;ge<=Ie;ge++){const qr=B[ge];if(Er>=Zn){j(qr,de,be,!0);continue}let Gs;if(qr.key!=null)Gs=Wt.get(qr.key);else for(Dt=bt;Dt<=Te;Dt++)if(rc[Dt-bt]===0&&ga(qr,z[Dt])){Gs=Dt;break}Gs===void 0?j(qr,de,be,!0):(rc[Gs-bt]=ge+1,Gs>=Wr?Wr=Gs:Cs=!0,m(qr,z[Gs],q,null,de,be,Ce,ye,ke),Er++)}const pw=Cs?c$(rc):Nl;for(Dt=pw.length-1,ge=Zn-1;ge>=0;ge--){const qr=bt+ge,Gs=z[qr],mw=z[qr+1],gw=qr+1<Ve?mw.el||mw.placeholder:ce;rc[ge]===0?m(null,Gs,q,gw,de,be,Ce,ye,ke):Cs&&(Dt<0||ge!==pw[Dt]?oe(Gs,q,gw,2):Dt--)}}},oe=(B,z,q,ce,de=null)=>{const{el:be,type:Ce,transition:ye,children:ke,shapeFlag:ge}=B;if(ge&6){oe(B.component.subTree,z,q,ce);return}if(ge&128){B.suspense.move(z,q,ce);return}if(ge&64){Ce.move(B,z,q,G);return}if(Ce===Oe){r(be,z,q);for(let Ie=0;Ie<ke.length;Ie++)oe(ke[Ie],z,q,ce);r(B.anchor,z,q);return}if(Ce===pg){x(B,z,q);return}if(ce!==2&&ge&1&&ye)if(ce===0)ye.beforeEnter(be),r(be,z,q),pr(()=>ye.enter(be),de);else{const{leave:Ie,delayLeave:Te,afterLeave:Ye}=ye,bt=()=>{B.ctx.isUnmounted?s(be):r(be,z,q)},Wt=()=>{be._isLeaving&&be[Ai](!0),Ie(be,()=>{bt(),Ye&&Ye()})};Te?Te(be,bt,Wt):Wt()}else r(be,z,q)},j=(B,z,q,ce=!1,de=!1)=>{const{type:be,props:Ce,ref:ye,children:ke,dynamicChildren:ge,shapeFlag:Ve,patchFlag:Ie,dirs:Te,cacheIndex:Ye}=B;if(Ie===-2&&(de=!1),ye!=null&&(Wi(),Ac(ye,null,q,B,!0),qi()),Ye!=null&&(z.renderCache[Ye]=void 0),Ve&256){z.ctx.deactivate(B);return}const bt=Ve&1&&Te,Wt=!Ul(B);let Dt;if(Wt&&(Dt=Ce&&Ce.onVnodeBeforeUnmount)&&Ks(Dt,z,B),Ve&6)ae(B.component,q,ce);else{if(Ve&128){B.suspense.unmount(q,ce);return}bt&&ra(B,null,z,"beforeUnmount"),Ve&64?B.type.remove(B,z,q,G,ce):ge&&!ge.hasOnce&&(be!==Oe||Ie>0&&Ie&64)?Se(ge,z,q,!1,!0):(be===Oe&&Ie&384||!de&&Ve&16)&&Se(ke,z,q),ce&&F(B)}(Wt&&(Dt=Ce&&Ce.onVnodeUnmounted)||bt)&&pr(()=>{Dt&&Ks(Dt,z,B),bt&&ra(B,null,z,"unmounted")},q)},F=B=>{const{type:z,el:q,anchor:ce,transition:de}=B;if(z===Oe){re(q,ce);return}if(z===pg){_(B);return}const be=()=>{s(q),de&&!de.persisted&&de.afterLeave&&de.afterLeave()};if(B.shapeFlag&1&&de&&!de.persisted){const{leave:Ce,delayLeave:ye}=de,ke=()=>Ce(q,be);ye?ye(B.el,be,ke):ke()}else be()},re=(B,z)=>{let q;for(;B!==z;)q=f(B),s(B),B=q;s(z)},ae=(B,z,q)=>{const{bum:ce,scope:de,job:be,subTree:Ce,um:ye,m:ke,a:ge}=B;Mw(ke),Mw(ge),ce&&lh(ce),de.stop(),be&&(be.flags|=8,j(Ce,B,z,q)),ye&&pr(ye,z),pr(()=>{B.isUnmounted=!0},z)},Se=(B,z,q,ce=!1,de=!1,be=0)=>{for(let Ce=be;Ce<B.length;Ce++)j(B[Ce],z,q,ce,de)},X=B=>{if(B.shapeFlag&6)return X(B.component.subTree);if(B.shapeFlag&128)return B.suspense.next();const z=f(B.anchor||B.el),q=z&&z[vT];return q?f(q):z};let le=!1;const ee=(B,z,q)=>{B==null?z._vnode&&j(z._vnode,null,null,!0):m(z._vnode||null,B,z,null,null,null,q),z._vnode=B,le||(le=!0,Sw(),pT(),le=!1)},G={p:m,um:j,m:oe,r:F,mt:N,mc:E,pc:Q,pbc:R,n:X,o:e};let _e,De;return{render:ee,hydrate:_e,createApp:e$(ee,_e)}}function fg({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 sa({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function u$(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Zb(e,t,n=!1){const r=e.children,s=t.children;if(Ke(r)&&Ke(s))for(let i=0;i<r.length;i++){const o=r[i];let a=s[i];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=s[i]=po(s[i]),a.el=o.el),!n&&a.patchFlag!==-2&&Zb(o,a)),a.type===Bd&&a.patchFlag!==-1&&(a.el=o.el),a.type===Wn&&!a.el&&(a.el=o.el)}}function c$(e){const t=e.slice(),n=[0];let r,s,i,o,a;const l=e.length;for(r=0;r<l;r++){const u=e[r];if(u!==0){if(s=n[n.length-1],e[s]<u){t[r]=s,n.push(r);continue}for(i=0,o=n.length-1;i<o;)a=i+o>>1,e[n[a]]<u?i=a+1:o=a;u<e[n[i]]&&(i>0&&(t[r]=n[i-1]),n[i]=r)}}for(i=n.length,o=n[i-1];i-- >0;)n[i]=o,o=t[o];return n}function HT(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:HT(t)}function Mw(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const d$=Symbol.for("v-scx"),f$=()=>Je(d$);function Cn(e,t){return e1(e,null,t)}function Ee(e,t,n){return e1(e,t,n)}function e1(e,t,n=Vt){const{immediate:r,deep:s,flush:i,once:o}=n,a=_n({},n),l=t&&r||!t&&i!=="post";let u;if(td){if(i==="sync"){const h=f$();u=h.__watcherHandles||(h.__watcherHandles=[])}else if(!l){const h=()=>{};return h.stop=di,h.resume=di,h.pause=di,h}}const c=sr;a.call=(h,g,m)=>$s(h,c,g,m);let d=!1;i==="post"?a.scheduler=h=>{pr(h,c&&c.suspense)}:i!=="sync"&&(d=!0,a.scheduler=(h,g)=>{g?h():jb(h)}),a.augmentJob=h=>{t&&(h.flags|=4),d&&(h.flags|=2,c&&(h.id=c.uid,h.i=c))};const f=AL(e,t,a);return td&&(u?u.push(f):l&&f()),f}function h$(e,t,n){const r=this.proxy,s=on(e)?e.includes(".")?jT(r,e):()=>r[e]:e.bind(r,r);let i;et(t)?i=t:(i=t.handler,n=t);const o=Vd(this),a=e1(s,i.bind(r),n);return o(),a}function jT(e,t){const n=t.split(".");return()=>{let r=e;for(let s=0;s<n.length&&r;s++)r=r[n[s]];return r}}const p$=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${yr(t)}Modifiers`]||e[`${Ko(t)}Modifiers`];function m$(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||Vt;let s=n;const i=t.startsWith("update:"),o=i&&p$(r,t.slice(7));o&&(o.trim&&(s=n.map(c=>on(c)?c.trim():c)),o.number&&(s=n.map(Mv)));let a,l=r[a=ig(t)]||r[a=ig(yr(t))];!l&&i&&(l=r[a=ig(Ko(t))]),l&&$s(l,e,6,s);const u=r[a+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,$s(u,e,6,s)}}const g$=new WeakMap;function WT(e,t,n=!1){const r=n?g$:t.emitsCache,s=r.get(e);if(s!==void 0)return s;const i=e.emits;let o={},a=!1;if(!et(e)){const l=u=>{const c=WT(u,t,!0);c&&(a=!0,_n(o,c))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!i&&!a?(jt(e)&&r.set(e,null),null):(Ke(i)?i.forEach(l=>o[l]=null):_n(o,i),jt(e)&&r.set(e,o),o)}function am(e,t){return!e||!Gp(t)?!1:(t=t.slice(2).replace(/Once$/,""),It(e,t[0].toLowerCase()+t.slice(1))||It(e,Ko(t))||It(e,t))}function hg(e){const{type:t,vnode:n,proxy:r,withProxy:s,propsOptions:[i],slots:o,attrs:a,emit:l,render:u,renderCache:c,props:d,data:f,setupState:h,ctx:g,inheritAttrs:m}=e,y=Wh(e);let w,b;try{if(n.shapeFlag&4){const _=s||r,S=_;w=oi(u.call(S,_,c,d,h,f,g)),b=a}else{const _=t;w=oi(_.length>1?_(d,{attrs:a,slots:o,emit:l}):_(d,null)),b=t.props?a:v$(a)}}catch(_){Mc.length=0,nm(_,e,1),w=p(Wn)}let x=w;if(b&&m!==!1){const _=Object.keys(b),{shapeFlag:S}=x;_.length&&S&7&&(i&&_.some($b)&&(b=y$(b,i)),x=Ki(x,b,!1,!0))}return n.dirs&&(x=Ki(x,null,!1,!0),x.dirs=x.dirs?x.dirs.concat(n.dirs):n.dirs),n.transition&&Ga(x,n.transition),w=x,Wh(y),w}const v$=e=>{let t;for(const n in e)(n==="class"||n==="style"||Gp(n))&&((t||(t={}))[n]=e[n]);return t},y$=(e,t)=>{const n={};for(const r in e)(!$b(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function b$(e,t,n){const{props:r,children:s,component:i}=e,{props:o,children:a,patchFlag:l}=t,u=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?Dw(r,o,u):!!o;if(l&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const f=c[d];if(o[f]!==r[f]&&!am(u,f))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:r===o?!1:r?o?Dw(r,o,u):!0:!!o;return!1}function Dw(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let s=0;s<r.length;s++){const i=r[s];if(t[i]!==e[i]&&!am(n,i))return!0}return!1}function w$({vnode:e,parent:t},n){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r===e)(e=t.vnode).el=n,t=t.parent;else break}}const qT=e=>e.__isSuspense;function S$(e,t){t&&t.pendingBranch?Ke(e)?t.effects.push(...e):t.effects.push(e):DL(e)}const Oe=Symbol.for("v-fgt"),Bd=Symbol.for("v-txt"),Wn=Symbol.for("v-cmt"),pg=Symbol.for("v-stc"),Mc=[];let Yr=null;function $(e=!1){Mc.push(Yr=e?null:[])}function _$(){Mc.pop(),Yr=Mc[Mc.length-1]||null}let ed=1;function Kh(e,t=!1){ed+=e,e<0&&Yr&&t&&(Yr.hasOnce=!0)}function GT(e){return e.dynamicChildren=ed>0?Yr||Nl:null,_$(),ed>0&&Yr&&Yr.push(e),e}function ve(e,t,n,r,s,i){return GT(C(e,t,n,r,s,i,!0))}function te(e,t,n,r,s){return GT(p(e,t,n,r,s,!0))}function su(e){return e?e.__v_isVNode===!0:!1}function ga(e,t){return e.type===t.type&&e.key===t.key}const KT=({key:e})=>e??null,ch=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?on(e)||rt(e)||et(e)?{i:qn,r:e,k:t,f:!!n}:e:null);function C(e,t=null,n=null,r=0,s=null,i=e===Oe?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&KT(t),ref:t&&ch(t),scopeId:gT,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:i,patchFlag:r,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:qn};return a?(t1(l,n),i&128&&e.normalize(l)):n&&(l.shapeFlag|=on(n)?8:16),ed>0&&!o&&Yr&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&Yr.push(l),l}const p=k$;function k$(e,t=null,n=null,r=0,s=null,i=!1){if((!e||e===WL)&&(e=Wn),su(e)){const a=Ki(e,t,!0);return n&&t1(a,n),ed>0&&!i&&Yr&&(a.shapeFlag&6?Yr[Yr.indexOf(e)]=a:Yr.push(a)),a.patchFlag=-2,a}if(O$(e)&&(e=e.__vccOpts),t){t=Yh(t);let{class:a,style:l}=t;a&&!on(a)&&(t.class=Re(a)),jt(l)&&(Fd(l)&&!Ke(l)&&(l=_n({},l)),t.style=Be(l))}const o=on(e)?1:qT(e)?128:yT(e)?64:jt(e)?4:et(e)?2:0;return C(e,t,n,r,s,o,i,!0)}function Yh(e){return e?Fd(e)||FT(e)?_n({},e):e:null}function Ki(e,t,n=!1,r=!1){const{props:s,ref:i,patchFlag:o,children:a,transition:l}=e,u=t?me(s||{},t):s,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&KT(u),ref:t&&t.ref?n&&i?Ke(i)?i.concat(ch(t)):[i,ch(t)]:ch(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Oe?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ki(e.ssContent),ssFallback:e.ssFallback&&Ki(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&Ga(c,l.clone(c)),c}function k(e=" ",t=0){return p(Bd,null,e,t)}function pe(e="",t=!1){return t?($(),te(Wn,null,e)):p(Wn,null,e)}function oi(e){return e==null||typeof e=="boolean"?p(Wn):Ke(e)?p(Oe,null,e.slice()):su(e)?po(e):p(Bd,null,String(e))}function po(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Ki(e)}function t1(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(Ke(t))n=16;else if(typeof t=="object")if(r&65){const s=t.default;s&&(s._c&&(s._d=!1),t1(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!FT(t)?t._ctx=qn:s===3&&qn&&(qn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else et(t)?(t={default:t,_ctx:qn},n=32):(t=String(t),r&64?(n=16,t=[k(t)]):n=8);e.children=t,e.shapeFlag|=n}function me(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const s in r)if(s==="class")t.class!==r.class&&(t.class=Re([t.class,r.class]));else if(s==="style")t.style=Be([t.style,r.style]);else if(Gp(s)){const i=t[s],o=r[s];o&&i!==o&&!(Ke(i)&&i.includes(o))&&(t[s]=i?[].concat(i,o):o)}else s!==""&&(t[s]=r[s])}return t}function Ks(e,t,n,r=null){$s(e,t,7,[n,r])}const x$=MT();let E$=0;function C$(e,t,n){const r=e.type,s=(t?t.appContext:e.appContext)||x$,i={uid:E$++,vnode:e,type:r,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new qC(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(s.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:BT(r,s),emitsOptions:WT(r,s),emit:null,emitted:null,propsDefaults:Vt,inheritAttrs:r.inheritAttrs,ctx:Vt,data:Vt,props:Vt,attrs:Vt,slots:Vt,refs:Vt,setupState:Vt,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 i.ctx={_:i},i.root=t?t.root:i,i.emit=m$.bind(null,i),e.ce&&e.ce(i),i}let sr=null;const Ru=()=>sr||qn;let Xh,Hv;{const e=Xp(),t=(n,r)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(r),i=>{s.length>1?s.forEach(o=>o(i)):s[0](i)}};Xh=t("__VUE_INSTANCE_SETTERS__",n=>sr=n),Hv=t("__VUE_SSR_SETTERS__",n=>td=n)}const Vd=e=>{const t=sr;return Xh(e),e.scope.on(),()=>{e.scope.off(),Xh(t)}},Lw=()=>{sr&&sr.scope.off(),Xh(null)};function YT(e){return e.vnode.shapeFlag&4}let td=!1;function T$(e,t=!1,n=!1){t&&Hv(t);const{props:r,children:s}=e.vnode,i=YT(e);t$(e,r,i,t),i$(e,s,n||t);const o=i?P$(e,t):void 0;return t&&Hv(!1),o}function P$(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,GL);const{setup:r}=n;if(r){Wi();const s=e.setupContext=r.length>1?I$(e):null,i=Vd(e),o=Nd(r,e,0,[e.props,s]),a=BC(o);if(qi(),i(),(a||e.sp)&&!Ul(e)&&CT(e),a){if(o.then(Lw,Lw),t)return o.then(l=>{$w(e,l,t)}).catch(l=>{nm(l,e,0)});e.asyncDep=o}else $w(e,o,t)}else XT(e,t)}function $w(e,t,n){et(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:jt(t)&&(e.setupState=cT(t)),XT(e,n)}let Fw;function XT(e,t,n){const r=e.type;if(!e.render){if(!t&&Fw&&!r.render){const s=r.template||Xb(e).template;if(s){const{isCustomElement:i,compilerOptions:o}=e.appContext.config,{delimiters:a,compilerOptions:l}=r,u=_n(_n({isCustomElement:i,delimiters:a},o),l);r.render=Fw(s,u)}}e.render=r.render||di}{const s=Vd(e);Wi();try{KL(e)}finally{qi(),s()}}}const R$={get(e,t){return rr(e,"get",""),e[t]}};function I$(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,R$),slots:e.slots,emit:e.emit,expose:t}}function lm(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(cT(tm(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Oc)return Oc[n](e)},has(t,n){return n in t||n in Oc}})):e.proxy}function A$(e,t=!0){return et(e)?e.displayName||e.name:e.name||t&&e.__name}function O$(e){return et(e)&&"__vccOpts"in e}const M=(e,t)=>RL(e,t,td);function br(e,t,n){try{Kh(-1);const r=arguments.length;return r===2?jt(t)&&!Ke(t)?su(t)?p(e,null,[t]):p(e,t):p(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&su(n)&&(n=[n]),p(e,t,n))}finally{Kh(1)}}const QT="3.5.22";/**
|
|
14
|
+
* @vue/runtime-dom v3.5.22
|
|
15
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
16
|
+
* @license MIT
|
|
17
|
+
**/let jv;const Nw=typeof window<"u"&&window.trustedTypes;if(Nw)try{jv=Nw.createPolicy("vue",{createHTML:e=>e})}catch{}const JT=jv?e=>jv.createHTML(e):e=>e,M$="http://www.w3.org/2000/svg",D$="http://www.w3.org/1998/Math/MathML",Ii=typeof document<"u"?document:null,Bw=Ii&&Ii.createElement("template"),L$={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const s=t==="svg"?Ii.createElementNS(M$,e):t==="mathml"?Ii.createElementNS(D$,e):n?Ii.createElement(e,{is:n}):Ii.createElement(e);return e==="select"&&r&&r.multiple!=null&&s.setAttribute("multiple",r.multiple),s},createText:e=>Ii.createTextNode(e),createComment:e=>Ii.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ii.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,s,i){const o=n?n.previousSibling:t.lastChild;if(s&&(s===i||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===i||!(s=s.nextSibling)););else{Bw.innerHTML=JT(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const a=Bw.content;if(r==="svg"||r==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},oo="transition",ic="animation",iu=Symbol("_vtc"),ZT={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},eP=_n({},_T,ZT),$$=e=>(e.displayName="Transition",e.props=eP,e),Bo=$$((e,{slots:t})=>br(NL,tP(e),t)),ia=(e,t=[])=>{Ke(e)?e.forEach(n=>n(...t)):e&&e(...t)},Vw=e=>e?Ke(e)?e.some(t=>t.length>1):e.length>1:!1;function tP(e){const t={};for(const O in e)O in ZT||(t[O]=e[O]);if(e.css===!1)return t;const{name:n="v",type:r,duration:s,enterFromClass:i=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=i,appearActiveClass:u=o,appearToClass:c=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:h=`${n}-leave-to`}=e,g=F$(s),m=g&&g[0],y=g&&g[1],{onBeforeEnter:w,onEnter:b,onEnterCancelled:x,onLeave:_,onLeaveCancelled:S,onBeforeAppear:P=w,onAppear:A=b,onAppearCancelled:E=x}=t,T=(O,H,N,D)=>{O._enterCancelled=D,uo(O,H?c:a),uo(O,H?u:o),N&&N()},R=(O,H)=>{O._isLeaving=!1,uo(O,d),uo(O,h),uo(O,f),H&&H()},I=O=>(H,N)=>{const D=O?A:b,W=()=>T(H,O,N);ia(D,[H,W]),Uw(()=>{uo(H,O?l:i),Js(H,O?c:a),Vw(D)||zw(H,r,m,W)})};return _n(t,{onBeforeEnter(O){ia(w,[O]),Js(O,i),Js(O,o)},onBeforeAppear(O){ia(P,[O]),Js(O,l),Js(O,u)},onEnter:I(!1),onAppear:I(!0),onLeave(O,H){O._isLeaving=!0;const N=()=>R(O,H);Js(O,d),O._enterCancelled?(Js(O,f),Wv(O)):(Wv(O),Js(O,f)),Uw(()=>{O._isLeaving&&(uo(O,d),Js(O,h),Vw(_)||zw(O,r,y,N))}),ia(_,[O,N])},onEnterCancelled(O){T(O,!1,void 0,!0),ia(x,[O])},onAppearCancelled(O){T(O,!0,void 0,!0),ia(E,[O])},onLeaveCancelled(O){R(O),ia(S,[O])}})}function F$(e){if(e==null)return null;if(jt(e))return[mg(e.enter),mg(e.leave)];{const t=mg(e);return[t,t]}}function mg(e){return J2(e)}function Js(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[iu]||(e[iu]=new Set)).add(t)}function uo(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[iu];n&&(n.delete(t),n.size||(e[iu]=void 0))}function Uw(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let N$=0;function zw(e,t,n,r){const s=e._endId=++N$,i=()=>{s===e._endId&&r()};if(n!=null)return setTimeout(i,n);const{type:o,timeout:a,propCount:l}=nP(e,t);if(!o)return r();const u=o+"end";let c=0;const d=()=>{e.removeEventListener(u,f),i()},f=h=>{h.target===e&&++c>=l&&d()};setTimeout(()=>{c<l&&d()},a+1),e.addEventListener(u,f)}function nP(e,t){const n=window.getComputedStyle(e),r=g=>(n[g]||"").split(", "),s=r(`${oo}Delay`),i=r(`${oo}Duration`),o=Hw(s,i),a=r(`${ic}Delay`),l=r(`${ic}Duration`),u=Hw(a,l);let c=null,d=0,f=0;t===oo?o>0&&(c=oo,d=o,f=i.length):t===ic?u>0&&(c=ic,d=u,f=l.length):(d=Math.max(o,u),c=d>0?o>u?oo:ic:null,f=c?c===oo?i.length:l.length:0);const h=c===oo&&/\b(?:transform|all)(?:,|$)/.test(r(`${oo}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:h}}function Hw(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>jw(n)+jw(e[r])))}function jw(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Wv(e){return(e?e.ownerDocument:document).body.offsetHeight}function B$(e,t,n){const r=e[iu];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Qh=Symbol("_vod"),rP=Symbol("_vsh"),ro={name:"show",beforeMount(e,{value:t},{transition:n}){e[Qh]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):oc(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),oc(e,!0),r.enter(e)):r.leave(e,()=>{oc(e,!1)}):oc(e,t))},beforeUnmount(e,{value:t}){oc(e,t)}};function oc(e,t){e.style.display=t?e[Qh]:"none",e[rP]=!t}const V$=Symbol(""),U$=/(?:^|;)\s*display\s*:/;function z$(e,t,n){const r=e.style,s=on(n);let i=!1;if(n&&!s){if(t)if(on(t))for(const o of t.split(";")){const a=o.slice(0,o.indexOf(":")).trim();n[a]==null&&dh(r,a,"")}else for(const o in t)n[o]==null&&dh(r,o,"");for(const o in n)o==="display"&&(i=!0),dh(r,o,n[o])}else if(s){if(t!==n){const o=r[V$];o&&(n+=";"+o),r.cssText=n,i=U$.test(n)}}else t&&e.removeAttribute("style");Qh in e&&(e[Qh]=i?r.display:"",e[rP]&&(r.display="none"))}const Ww=/\s*!important$/;function dh(e,t,n){if(Ke(n))n.forEach(r=>dh(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=H$(e,t);Ww.test(n)?e.setProperty(Ko(r),n.replace(Ww,""),"important"):e[r]=n}}const qw=["Webkit","Moz","ms"],gg={};function H$(e,t){const n=gg[t];if(n)return n;let r=yr(t);if(r!=="filter"&&r in e)return gg[t]=r;r=mi(r);for(let s=0;s<qw.length;s++){const i=qw[s]+r;if(i in e)return gg[t]=i}return t}const Gw="http://www.w3.org/1999/xlink";function Kw(e,t,n,r,s,i=sL(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(Gw,t.slice(6,t.length)):e.setAttributeNS(Gw,t,n):n==null||i&&!HC(n)?e.removeAttribute(t):e.setAttribute(t,i?"":to(n)?String(n):n)}function Yw(e,t,n,r,s){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?JT(n):n);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const a=i==="OPTION"?e.getAttribute("value")||"":e.value,l=n==null?e.type==="checkbox"?"on":"":String(n);(a!==l||!("_value"in e))&&(e.value=l),n==null&&e.removeAttribute(t),e._value=n;return}let o=!1;if(n===""||n==null){const a=typeof e[t];a==="boolean"?n=HC(n):n==null&&a==="string"?(n="",o=!0):a==="number"&&(n=0,o=!0)}try{e[t]=n}catch{}o&&e.removeAttribute(s||t)}function El(e,t,n,r){e.addEventListener(t,n,r)}function j$(e,t,n,r){e.removeEventListener(t,n,r)}const Xw=Symbol("_vei");function W$(e,t,n,r,s=null){const i=e[Xw]||(e[Xw]={}),o=i[t];if(r&&o)o.value=r;else{const[a,l]=q$(t);if(r){const u=i[t]=Y$(r,s);El(e,a,u,l)}else o&&(j$(e,a,o,l),i[t]=void 0)}}const Qw=/(?:Once|Passive|Capture)$/;function q$(e){let t;if(Qw.test(e)){t={};let r;for(;r=e.match(Qw);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Ko(e.slice(2)),t]}let vg=0;const G$=Promise.resolve(),K$=()=>vg||(G$.then(()=>vg=0),vg=Date.now());function Y$(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;$s(X$(r,n.value),t,5,[r])};return n.value=e,n.attached=K$(),n}function X$(e,t){if(Ke(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>s=>!s._stopped&&r&&r(s))}else return t}const Jw=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Q$=(e,t,n,r,s,i)=>{const o=s==="svg";t==="class"?B$(e,r,o):t==="style"?z$(e,n,r):Gp(t)?$b(t)||W$(e,t,n,r,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):J$(e,t,r,o))?(Yw(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Kw(e,t,r,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!on(r))?Yw(e,yr(t),r,i,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Kw(e,t,r,o))};function J$(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&Jw(t)&&et(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return Jw(t)&&on(n)?!1:t in e}const sP=new WeakMap,iP=new WeakMap,Jh=Symbol("_moveCb"),Zw=Symbol("_enterCb"),Z$=e=>(delete e.props.mode,e),eF=Z$({name:"TransitionGroup",props:_n({},eP,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Ru(),r=ST();let s,i;return Gb(()=>{if(!s.length)return;const o=e.moveClass||`${e.name||"v"}-move`;if(!sF(s[0].el,n.vnode.el,o)){s=[];return}s.forEach(tF),s.forEach(nF);const a=s.filter(rF);Wv(n.vnode.el),a.forEach(l=>{const u=l.el,c=u.style;Js(u,o),c.transform=c.webkitTransform=c.transitionDuration="";const d=u[Jh]=f=>{f&&f.target!==u||(!f||f.propertyName.endsWith("transform"))&&(u.removeEventListener("transitionend",d),u[Jh]=null,uo(u,o))};u.addEventListener("transitionend",d)}),s=[]}),()=>{const o=Ue(e),a=tP(o);let l=o.tag||Oe;if(s=[],i)for(let u=0;u<i.length;u++){const c=i[u];c.el&&c.el instanceof Element&&(s.push(c),Ga(c,Jc(c,a,r,n)),sP.set(c,c.el.getBoundingClientRect()))}i=t.default?Wb(t.default()):[];for(let u=0;u<i.length;u++){const c=i[u];c.key!=null&&Ga(c,Jc(c,a,r,n))}return p(l,null,i)}}}),n1=eF;function tF(e){const t=e.el;t[Jh]&&t[Jh](),t[Zw]&&t[Zw]()}function nF(e){iP.set(e,e.el.getBoundingClientRect())}function rF(e){const t=sP.get(e),n=iP.get(e),r=t.left-n.left,s=t.top-n.top;if(r||s){const i=e.el.style;return i.transform=i.webkitTransform=`translate(${r}px,${s}px)`,i.transitionDuration="0s",e}}function sF(e,t,n){const r=e.cloneNode(),s=e[iu];s&&s.forEach(a=>{a.split(/\s+/).forEach(l=>l&&r.classList.remove(l))}),n.split(/\s+/).forEach(a=>a&&r.classList.add(a)),r.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(r);const{hasTransform:o}=nP(r);return i.removeChild(r),o}const eS=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Ke(t)?n=>lh(t,n):t};function iF(e){e.target.composing=!0}function tS(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const yg=Symbol("_assign"),oF={created(e,{modifiers:{lazy:t,trim:n,number:r}},s){e[yg]=eS(s);const i=r||s.props&&s.props.type==="number";El(e,t?"change":"input",o=>{if(o.target.composing)return;let a=e.value;n&&(a=a.trim()),i&&(a=Mv(a)),e[yg](a)}),n&&El(e,"change",()=>{e.value=e.value.trim()}),t||(El(e,"compositionstart",iF),El(e,"compositionend",tS),El(e,"change",tS))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:s,number:i}},o){if(e[yg]=eS(o),e.composing)return;const a=(i||e.type==="number")&&!/^0\d/.test(e.value)?Mv(e.value):e.value,l=t??"";a!==l&&(document.activeElement===e&&e.type!=="range"&&(r&&t===n||s&&e.value.trim()===l)||(e.value=l))}},aF=["ctrl","shift","alt","meta"],lF={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)=>aF.some(n=>e[`${n}Key`]&&!t.includes(n))},Et=(e,t)=>{const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(s,...i)=>{for(let o=0;o<t.length;o++){const a=lF[t[o]];if(a&&a(s,t))return}return e(s,...i)})},uF={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},qv=(e,t)=>{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=s=>{if(!("key"in s))return;const i=Ko(s.key);if(t.some(o=>o===i||uF[o]===i))return e(s)})},cF=_n({patchProp:Q$},L$);let nS;function oP(){return nS||(nS=a$(cF))}const aP=(...e)=>{oP().render(...e)},dF=(...e)=>{const t=oP().createApp(...e),{mount:n}=t;return t.mount=r=>{const s=hF(r);if(!s)return;const i=t._component;!et(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const o=n(s,!1,fF(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},t};function fF(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function hF(e){return on(e)?document.querySelector(e):e}/*!
|
|
18
|
+
* pinia v3.0.3
|
|
19
|
+
* (c) 2025 Eduardo San Martin Morote
|
|
20
|
+
* @license MIT
|
|
21
|
+
*/let lP;const um=e=>lP=e,uP=Symbol();function Gv(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Dc;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Dc||(Dc={}));function pF(){const e=qa(!0),t=e.run(()=>K({}));let n=[],r=[];const s=tm({install(i){um(s),s._a=i,i.provide(uP,s),i.config.globalProperties.$pinia=s,r.forEach(o=>n.push(o)),r=[]},use(i){return this._a?n.push(i):r.push(i),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return s}const cP=()=>{};function rS(e,t,n,r=cP){e.push(t);const s=()=>{const i=e.indexOf(t);i>-1&&(e.splice(i,1),r())};return!n&&$d()&&dn(s),s}function pl(e,...t){e.slice().forEach(n=>{n(...t)})}const mF=e=>e(),sS=Symbol(),bg=Symbol();function Kv(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,r)=>e.set(r,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const r=t[n],s=e[n];Gv(s)&&Gv(r)&&e.hasOwnProperty(n)&&!rt(r)&&!Ao(r)?e[n]=Kv(s,r):e[n]=r}return e}const gF=Symbol();function vF(e){return!Gv(e)||!Object.prototype.hasOwnProperty.call(e,gF)}const{assign:co}=Object;function yF(e){return!!(rt(e)&&e.effect)}function bF(e,t,n,r){const{state:s,actions:i,getters:o}=t,a=n.state.value[e];let l;function u(){a||(n.state.value[e]=s?s():{});const c=sl(n.state.value[e]);return co(c,i,Object.keys(o||{}).reduce((d,f)=>(d[f]=tm(M(()=>{um(n);const h=n._s.get(e);return o[f].call(h,h)})),d),{}))}return l=dP(e,u,t,n,r,!0),l}function dP(e,t,n={},r,s,i){let o;const a=co({actions:{}},n),l={deep:!0};let u,c,d=[],f=[],h;const g=r.state.value[e];!i&&!g&&(r.state.value[e]={}),K({});let m;function y(E){let T;u=c=!1,typeof E=="function"?(E(r.state.value[e]),T={type:Dc.patchFunction,storeId:e,events:h}):(Kv(r.state.value[e],E),T={type:Dc.patchObject,payload:E,storeId:e,events:h});const R=m=Symbol();Pt().then(()=>{m===R&&(u=!0)}),c=!0,pl(d,T,r.state.value[e])}const w=i?function(){const{state:T}=n,R=T?T():{};this.$patch(I=>{co(I,R)})}:cP;function b(){o.stop(),d=[],f=[],r._s.delete(e)}const x=(E,T="")=>{if(sS in E)return E[bg]=T,E;const R=function(){um(r);const I=Array.from(arguments),O=[],H=[];function N(U){O.push(U)}function D(U){H.push(U)}pl(f,{args:I,name:R[bg],store:S,after:N,onError:D});let W;try{W=E.apply(this&&this.$id===e?this:S,I)}catch(U){throw pl(H,U),U}return W instanceof Promise?W.then(U=>(pl(O,U),U)).catch(U=>(pl(H,U),Promise.reject(U))):(pl(O,W),W)};return R[sS]=!0,R[bg]=T,R},_={_p:r,$id:e,$onAction:rS.bind(null,f),$patch:y,$reset:w,$subscribe(E,T={}){const R=rS(d,E,T.detached,()=>I()),I=o.run(()=>Ee(()=>r.state.value[e],O=>{(T.flush==="sync"?c:u)&&E({storeId:e,type:Dc.direct,events:h},O)},co({},l,T)));return R},$dispose:b},S=mn(_);r._s.set(e,S);const A=(r._a&&r._a.runWithContext||mF)(()=>r._e.run(()=>(o=qa()).run(()=>t({action:x}))));for(const E in A){const T=A[E];if(rt(T)&&!yF(T)||Ao(T))i||(g&&vF(T)&&(rt(T)?T.value=g[E]:Kv(T,g[E])),r.state.value[e][E]=T);else if(typeof T=="function"){const R=x(T,E);A[E]=R,a.actions[E]=T}}return co(S,A),co(Ue(S),A),Object.defineProperty(S,"$state",{get:()=>r.state.value[e],set:E=>{y(T=>{co(T,E)})}}),r._p.forEach(E=>{co(S,o.run(()=>E({store:S,app:r._a,pinia:r,options:a})))}),g&&i&&n.hydrate&&n.hydrate(S.$state,g),u=!0,c=!0,S}/*! #__NO_SIDE_EFFECTS__ */function Ss(e,t,n){let r;const s=typeof t=="function";r=s?n:t;function i(o,a){const l=DT();return o=o||(l?Je(uP,null):null),o&&um(o),o=lP,o._s.has(e)||(s?dP(e,t,r,o):bF(e,r,o)),o._s.get(e)}return i.$id=e,i}const fP=Ss("Dialog",{state:()=>({ids:[],dialogsById:{}}),getters:{dialogs(){return this.ids.map(e=>this.dialogsById[e])},getBeforeOpenedCallback(){return e=>{var t;return(t=this.dialogsById[e])==null?void 0:t.beforeOpenedCallback}},getOpenedCallback(){return e=>{var t;return(t=this.dialogsById[e])==null?void 0:t.openedCallback}},getContext(){return e=>{var t;return(t=this.dialogsById[e])==null?void 0:t.context}},getOutput(){return e=>{var t;return(t=this.dialogsById[e])==null?void 0:t.output}},isDialogOpened(){return e=>{var t;return(t=this.dialogsById[e])==null?void 0:t.opened}}},actions:{openDialogWithContext(e,t){let n=this.dialogsById[e];n||(n=this.registerDialogReference(e)),n.opened=!0,n.context=t,this.dialogsById={...this.dialogsById},console.debug(`[Pinia Dialog ${e}] Opened with context`,t)},closeDialog(e,t){let n=this.dialogsById[e];n||(n=this.registerDialogReference(e)),n.opened=!1,delete n.context,n.output=t,this.dialogsById={...this.dialogsById},console.debug(`[Pinia Dialog ${e}] Closed`)},unregisterDialogReference(e){delete this.dialogsById[e],this.ids=this.ids.filter(t=>t!==e)},registerDialogReference(e,t){if(!e)throw new Error("Cannot unregister undefined dialog reference");console.debug(`[Pinia Dialog ${e}] Registered`);const n=this.dialogsById[e];if(n)return console.debug(`[Pinia Dialog ${e}] Already registered dialog, not registering again`),n;const r={id:e,opened:!1,beforeOpenedCallback:t==null?void 0:t.beforeOpenedCallback,openedCallback:t==null?void 0:t.openedCallback};return this.dialogsById[e]=r,this.ids.push(e),r}}});function Yv(e){return $d()?(dn(e),!0):!1}const Xv=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const wF=Object.prototype.toString,SF=e=>wF.call(e)==="[object Object]";function wg(e){return Array.isArray(e)?e:[e]}function _F(e,t=1e3,n={}){const{immediate:r=!0,immediateCallback:s=!1}=n;let i=null;const o=Pe(!1);function a(){i&&(clearInterval(i),i=null)}function l(){o.value=!1,a()}function u(){const c=un(t);c<=0||(o.value=!0,s&&e(),a(),o.value&&(i=setInterval(e,c)))}if(r&&Xv&&u(),rt(t)||typeof t=="function"){const c=Ee(t,()=>{o.value&&Xv&&u()});Yv(c)}return Yv(l),{isActive:Hb(o),pause:l,resume:u}}function kF(e,t,n){return Ee(e,t,{...n,immediate:!0})}const hP=Xv?window:void 0;function xF(e){var t;const n=un(e);return(t=n==null?void 0:n.$el)!=null?t:n}function EF(...e){const t=[],n=()=>{t.forEach(a=>a()),t.length=0},r=(a,l,u,c)=>(a.addEventListener(l,u,c),()=>a.removeEventListener(l,u,c)),s=M(()=>{const a=wg(un(e[0])).filter(l=>l!=null);return a.every(l=>typeof l!="string")?a:void 0}),i=kF(()=>{var a,l;return[(l=(a=s.value)==null?void 0:a.map(u=>xF(u)))!=null?l:[hP].filter(u=>u!=null),wg(un(s.value?e[1]:e[0])),wg(J(s.value?e[2]:e[1])),un(s.value?e[3]:e[2])]},([a,l,u,c])=>{if(n(),!(a!=null&&a.length)||!(l!=null&&l.length)||!(u!=null&&u.length))return;const d=SF(c)?{...c}:c;t.push(...a.flatMap(f=>l.flatMap(h=>u.map(g=>r(f,h,g,d)))))},{flush:"post"}),o=()=>{i(),n()};return Yv(n),o}function CF(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function TF(...e){let t,n,r={};e.length===3?(t=e[0],n=e[1],r=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],r=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:s=hP,eventName:i="keydown",passive:o=!1,dedupe:a=!1}=r,l=CF(t);return EF(s,i,c=>{c.repeat&&un(a)||l(c)&&n(c)},o)}const ac=new Map;function Dn(e){const t=$d();function n(a){var l;const u=ac.get(e)||new Set;u.add(a),ac.set(e,u);const c=()=>s(a);return(l=t==null?void 0:t.cleanups)==null||l.push(c),c}function r(a){function l(...u){s(l),a(...u)}return n(l)}function s(a){const l=ac.get(e);l&&(l.delete(a),l.size||i())}function i(){ac.delete(e)}function o(a,l){var u;(u=ac.get(e))==null||u.forEach(c=>c(a,l))}return{on:n,once:r,off:s,emit:o,reset:i}}function rn(e){const t=fP();async function n(r){const s=t.getBeforeOpenedCallback(e);s&&await s(r),t.openDialogWithContext(e,r);const i=t.getOpenedCallback(e);i&&await i(r)}return{dialogId:e,dialogStore:t,openDialog:n,context:()=>t.getContext(e),closeDialog:r=>t.closeDialog(e,r),isDialogOpened:()=>t.isDialogOpened(e),handleAsync:async r=>(await n(r),new Promise(s=>{Cn(()=>{t.isDialogOpened(e)||s(t.getOutput(e))})}))}}const Ot=typeof window<"u",r1=Ot&&"IntersectionObserver"in window,PF=Ot&&("ontouchstart"in window||window.navigator.maxTouchPoints>0),s1=Ot&&"matchMedia"in window&&typeof window.matchMedia=="function",Ka=()=>s1&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;function iS(e,t,n){RF(e,t),t.set(e,n)}function RF(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function oS(e,t,n){return e.set(pP(e,t),n),n}function Si(e,t){return e.get(pP(e,t))}function pP(e,t,n){if(typeof e=="function"?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}function mP(e,t,n){const r=t.length-1;if(r<0)return e===void 0?n:e;for(let s=0;s<r;s++){if(e==null)return n;e=e[t[s]]}return e==null||e[t[r]]===void 0?n:e[t[r]]}function Dr(e,t){if(e===t)return!0;if(e instanceof Date&&t instanceof Date&&e.getTime()!==t.getTime()||e!==Object(e)||t!==Object(t))return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(r=>Dr(e[r],t[r]))}function Ya(e,t,n){return e==null||!t||typeof t!="string"?n:e[t]!==void 0?e[t]:(t=t.replace(/\[(\w+)\]/g,".$1"),t=t.replace(/^\./,""),mP(e,t.split("."),n))}function Ln(e,t,n){if(t===!0)return e===void 0?n:e;if(t==null||typeof t=="boolean")return n;if(e!==Object(e)){if(typeof t!="function")return n;const s=t(e,n);return typeof s>"u"?n:s}if(typeof t=="string")return Ya(e,t,n);if(Array.isArray(t))return mP(e,t,n);if(typeof t!="function")return n;const r=t(e,n);return typeof r>"u"?n:r}function Rl(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Array.from({length:e},(n,r)=>t+r)}function Ne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"px";if(e==null||e==="")return;const n=Number(e);return isNaN(n)?String(e):isFinite(n)?`${n}${t}`:void 0}function Zh(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function aS(e){let t;return e!==null&&typeof e=="object"&&((t=Object.getPrototypeOf(e))===Object.prototype||t===null)}function i1(e){if(e&&"$el"in e){const t=e.$el;return(t==null?void 0:t.nodeType)===Node.TEXT_NODE?t.nextElementSibling:t}return e}const lS=Object.freeze({enter:"Enter",tab:"Tab",delete:"Delete",esc:"Escape",space:"Space",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",end:"End",home:"Home",del:"Delete",backspace:"Backspace",insert:"Insert",pageup:"PageUp",pagedown:"PageDown",shift:"Shift"});function gP(e){return Object.keys(e)}function Sg(e,t){return t.every(n=>e.hasOwnProperty(n))}function Vo(e,t){const n={};for(const r of t)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function Qv(e,t,n){const r=Object.create(null),s=Object.create(null);for(const i in e)t.some(o=>o instanceof RegExp?o.test(i):o===i)&&!(n!=null&&n.some(o=>o===i))?r[i]=e[i]:s[i]=e[i];return[r,s]}function Ur(e,t){const n={...e};return t.forEach(r=>delete n[r]),n}const vP=/^on[^a-z]/,o1=e=>vP.test(e),IF=["onAfterscriptexecute","onAnimationcancel","onAnimationend","onAnimationiteration","onAnimationstart","onAuxclick","onBeforeinput","onBeforescriptexecute","onChange","onClick","onCompositionend","onCompositionstart","onCompositionupdate","onContextmenu","onCopy","onCut","onDblclick","onFocusin","onFocusout","onFullscreenchange","onFullscreenerror","onGesturechange","onGestureend","onGesturestart","onGotpointercapture","onInput","onKeydown","onKeypress","onKeyup","onLostpointercapture","onMousedown","onMousemove","onMouseout","onMouseover","onMouseup","onMousewheel","onPaste","onPointercancel","onPointerdown","onPointerenter","onPointerleave","onPointermove","onPointerout","onPointerover","onPointerup","onReset","onSelect","onSubmit","onTouchcancel","onTouchend","onTouchmove","onTouchstart","onTransitioncancel","onTransitionend","onTransitionrun","onTransitionstart","onWheel"];function il(e){const[t,n]=Qv(e,[vP]),r=Ur(t,IF),[s,i]=Qv(n,["class","style","id",/^data-/]);return Object.assign(s,t),Object.assign(i,r),[s,i]}function Fn(e){return e==null?[]:Array.isArray(e)?e:[e]}function AF(e,t){let n=0;const r=function(){for(var s=arguments.length,i=new Array(s),o=0;o<s;o++)i[o]=arguments[o];clearTimeout(n),n=setTimeout(()=>e(...i),J(t))};return r.clear=()=>{clearTimeout(n)},r.immediate=e,r}function Nn(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;return Math.max(t,Math.min(n,e))}function uS(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0";return e+n.repeat(Math.max(0,t-e.length))}function cS(e,t){return(arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0").repeat(Math.max(0,t-e.length))+e}function OF(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;const n=[];let r=0;for(;r<e.length;)n.push(e.substr(r,t)),r+=t;return n}function dS(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e3;if(e<t)return`${e} B`;const n=t===1024?["Ki","Mi","Gi"]:["k","M","G"];let r=-1;for(;Math.abs(e)>=t&&r<n.length-1;)e/=t,++r;return`${e.toFixed(1)} ${n[r]}B`}function or(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r={};for(const s in e)r[s]=e[s];for(const s in t){const i=e[s],o=t[s];if(aS(i)&&aS(o)){r[s]=or(i,o,n);continue}if(n&&Array.isArray(i)&&Array.isArray(o)){r[s]=n(i,o);continue}r[s]=o}return r}function yP(e){return e.map(t=>t.type===Oe?yP(t.children):t).flat()}function $a(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if($a.cache.has(e))return $a.cache.get(e);const t=e.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return $a.cache.set(e,t),t}$a.cache=new Map;function Il(e,t){if(!t||typeof t!="object")return[];if(Array.isArray(t))return t.map(n=>Il(e,n)).flat(1);if(t.suspense)return Il(e,t.ssContent);if(Array.isArray(t.children))return t.children.map(n=>Il(e,n)).flat(1);if(t.component){if(Object.getOwnPropertySymbols(t.component.provides).includes(e))return[t.component];if(t.component.subTree)return Il(e,t.component.subTree).flat(1)}return[]}var ml=new WeakMap,oa=new WeakMap;class bP{constructor(t){iS(this,ml,[]),iS(this,oa,0),this.size=t}get isFull(){return Si(ml,this).length===this.size}push(t){Si(ml,this)[Si(oa,this)]=t,oS(oa,this,(Si(oa,this)+1)%this.size)}values(){return Si(ml,this).slice(Si(oa,this)).concat(Si(ml,this).slice(0,Si(oa,this)))}clear(){Si(ml,this).length=0,oS(oa,this,0)}}function a1(e){const t=mn({});Cn(()=>{const r=e();for(const s in r)t[s]=r[s]},{flush:"sync"});const n={};for(const r in t)n[r]=ie(()=>t[r]);return n}function ep(e,t){return e.includes(t)}function wP(e){return e[2].toLowerCase()+e.slice(3)}const Gn=()=>[Function,Array];function fS(e,t){return t="on"+mi(t),!!(e[t]||e[`${t}Once`]||e[`${t}Capture`]||e[`${t}OnceCapture`]||e[`${t}CaptureOnce`])}function Ud(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(Array.isArray(e))for(const s of e)s(...n);else typeof e=="function"&&e(...n)}function ou(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const n=["button","[href]",'input:not([type="hidden"])',"select","textarea","[tabindex]"].map(r=>`${r}${t?':not([tabindex="-1"])':""}:not([disabled])`).join(", ");return[...e.querySelectorAll(n)]}function SP(e,t,n){let r,s=e.indexOf(document.activeElement);const i=t==="next"?1:-1;do s+=i,r=e[s];while((!r||r.offsetParent==null||!((n==null?void 0:n(r))??!0))&&s<e.length&&s>=0);return r}function Lc(e,t){var r,s,i,o;const n=ou(e);if(t==null)(e===document.activeElement||!e.contains(document.activeElement))&&((r=n[0])==null||r.focus());else if(t==="first")(s=n[0])==null||s.focus();else if(t==="last")(i=n.at(-1))==null||i.focus();else if(typeof t=="number")(o=n[t])==null||o.focus();else{const a=SP(n,t);a?a.focus():Lc(e,t==="next"?"first":"last")}}function wf(e){return e==null||typeof e=="string"&&e.trim()===""}function tp(e,t){if(!(Ot&&typeof CSS<"u"&&typeof CSS.supports<"u"&&CSS.supports(`selector(${t})`)))return null;try{return!!e&&e.matches(t)}catch{return null}}function _P(e){return e.some(t=>su(t)?t.type===Wn?!1:t.type!==Oe||_P(t.children):!0)?e:null}function MF(e,t){if(!Ot||e===0)return t(),()=>{};const n=window.setTimeout(t,e);return()=>window.clearTimeout(n)}function DF(e,t){const n=e.clientX,r=e.clientY,s=t.getBoundingClientRect(),i=s.left,o=s.top,a=s.right,l=s.bottom;return n>=i&&n<=a&&r>=o&&r<=l}function Jv(){const e=Pe(),t=n=>{e.value=n};return Object.defineProperty(t,"value",{enumerable:!0,get:()=>e.value,set:n=>e.value=n}),Object.defineProperty(t,"el",{enumerable:!0,get:()=>i1(e.value)}),t}function hS(e){const t=e.key.length===1,n=!e.ctrlKey&&!e.metaKey&&!e.altKey;return t&&n}function Zv(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="bigint"}function LF(e){const t={};for(const n in e)t[yr(n)]=e[n];return t}function $F(e){const t=["checked","disabled"];return Object.fromEntries(Object.entries(e).filter(n=>{let[r,s]=n;return t.includes(r)?!!s:s!==void 0}))}const kP=["top","bottom"],FF=["start","end","left","right"];function ey(e,t){let[n,r]=e.split(" ");return r||(r=ep(kP,n)?"start":ep(FF,n)?"top":"center"),{side:ty(n,t),align:ty(r,t)}}function ty(e,t){return e==="start"?t?"right":"left":e==="end"?t?"left":"right":e}function _g(e){return{side:{center:"center",top:"bottom",bottom:"top",left:"right",right:"left"}[e.side],align:e.align}}function kg(e){return{side:e.side,align:{center:"center",top:"bottom",bottom:"top",left:"right",right:"left"}[e.align]}}function pS(e){return{side:e.align,align:e.side}}function mS(e){return ep(kP,e.side)?"y":"x"}class us{constructor(t){const n=document.body.currentCSSZoom??1,r=t instanceof DOMRect?1+(1-n)/n:1,{x:s,y:i,width:o,height:a}=t;this.x=s*r,this.y=i*r,this.width=o*r,this.height=a*r}get top(){return this.y}get bottom(){return this.y+this.height}get left(){return this.x}get right(){return this.x+this.width}}function gS(e,t){return{x:{before:Math.max(0,t.left-e.left),after:Math.max(0,e.right-t.right)},y:{before:Math.max(0,t.top-e.top),after:Math.max(0,e.bottom-t.bottom)}}}function xP(e){if(Array.isArray(e)){const t=document.body.currentCSSZoom??1,n=1+(1-t)/t;return new us({x:e[0]*n,y:e[1]*n,width:0*n,height:0*n})}else return new us(e.getBoundingClientRect())}function NF(e){if(e===document.documentElement)if(visualViewport){const t=document.body.currentCSSZoom??1;return new us({x:visualViewport.scale>1?0:visualViewport.offsetLeft,y:visualViewport.scale>1?0:visualViewport.offsetTop,width:visualViewport.width*visualViewport.scale/t,height:visualViewport.height*visualViewport.scale/t})}else return new us({x:0,y:0,width:document.documentElement.clientWidth,height:document.documentElement.clientHeight});else{const t=e.getBoundingClientRect();return new us({x:t.x,y:t.y,width:e.clientWidth,height:e.clientHeight})}}function l1(e){const t=new us(e.getBoundingClientRect()),n=getComputedStyle(e),r=n.transform;if(r){let s,i,o,a,l;if(r.startsWith("matrix3d("))s=r.slice(9,-1).split(/, /),i=Number(s[0]),o=Number(s[5]),a=Number(s[12]),l=Number(s[13]);else if(r.startsWith("matrix("))s=r.slice(7,-1).split(/, /),i=Number(s[0]),o=Number(s[3]),a=Number(s[4]),l=Number(s[5]);else return new us(t);const u=n.transformOrigin,c=t.x-a-(1-i)*parseFloat(u),d=t.y-l-(1-o)*parseFloat(u.slice(u.indexOf(" ")+1)),f=i?t.width/i:e.offsetWidth+1,h=o?t.height/o:e.offsetHeight+1;return new us({x:c,y:d,width:f,height:h})}else return new us(t)}function mo(e,t,n){if(typeof e.animate>"u")return{finished:Promise.resolve()};let r;try{r=e.animate(t,n)}catch{return{finished:Promise.resolve()}}return typeof r.finished>"u"&&(r.finished=new Promise(s=>{r.onfinish=()=>{s(r)}})),r}const fh=new WeakMap;function BF(e,t){Object.keys(t).forEach(n=>{if(o1(n)){const r=wP(n),s=fh.get(e);if(t[n]==null)s==null||s.forEach(i=>{const[o,a]=i;o===r&&(e.removeEventListener(r,a),s.delete(i))});else if(!s||![...s].some(i=>i[0]===r&&i[1]===t[n])){e.addEventListener(r,t[n]);const i=s||new Set;i.add([r,t[n]]),fh.has(e)||fh.set(e,i)}}else t[n]==null?e.removeAttribute(n):e.setAttribute(n,t[n])})}function VF(e,t){Object.keys(t).forEach(n=>{if(o1(n)){const r=wP(n),s=fh.get(e);s==null||s.forEach(i=>{const[o,a]=i;o===r&&(e.removeEventListener(r,a),s.delete(i))})}else e.removeAttribute(n)})}const gl=2.4,vS=.2126729,yS=.7151522,bS=.072175,UF=.55,zF=.58,HF=.57,jF=.62,Sf=.03,wS=1.45,WF=5e-4,qF=1.25,GF=1.25,SS=.078,_S=12.82051282051282,_f=.06,kS=.001;function xS(e,t){const n=(e.r/255)**gl,r=(e.g/255)**gl,s=(e.b/255)**gl,i=(t.r/255)**gl,o=(t.g/255)**gl,a=(t.b/255)**gl;let l=n*vS+r*yS+s*bS,u=i*vS+o*yS+a*bS;if(l<=Sf&&(l+=(Sf-l)**wS),u<=Sf&&(u+=(Sf-u)**wS),Math.abs(u-l)<WF)return 0;let c;if(u>l){const d=(u**UF-l**zF)*qF;c=d<kS?0:d<SS?d-d*_S*_f:d-_f}else{const d=(u**jF-l**HF)*GF;c=d>-kS?0:d>-SS?d-d*_S*_f:d+_f}return c*100}function EP(e,t){t=Array.isArray(t)?t.slice(0,-1).map(n=>`'${n}'`).join(", ")+` or '${t.at(-1)}'`:`'${t}'`}const np=.20689655172413793,KF=e=>e>np**3?Math.cbrt(e):e/(3*np**2)+4/29,YF=e=>e>np?e**3:3*np**2*(e-4/29);function CP(e){const t=KF,n=t(e[1]);return[116*n-16,500*(t(e[0]/.95047)-n),200*(n-t(e[2]/1.08883))]}function TP(e){const t=YF,n=(e[0]+16)/116;return[t(n+e[1]/500)*.95047,t(n),t(n-e[2]/200)*1.08883]}const XF=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]],QF=e=>e<=.0031308?e*12.92:1.055*e**(1/2.4)-.055,JF=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],ZF=e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4;function PP(e){const t=Array(3),n=QF,r=XF;for(let s=0;s<3;++s)t[s]=Math.round(Nn(n(r[s][0]*e[0]+r[s][1]*e[1]+r[s][2]*e[2]))*255);return{r:t[0],g:t[1],b:t[2]}}function u1(e){let{r:t,g:n,b:r}=e;const s=[0,0,0],i=ZF,o=JF;t=i(t/255),n=i(n/255),r=i(r/255);for(let a=0;a<3;++a)s[a]=o[a][0]*t+o[a][1]*n+o[a][2]*r;return s}function ny(e){return!!e&&/^(#|var\(--|(rgb|hsl)a?\()/.test(e)}function eN(e){return ny(e)&&!/^((rgb|hsl)a?\()?var\(--/.test(e)}const ES=/^(?<fn>(?:rgb|hsl)a?)\((?<values>.+)\)/,tN={rgb:(e,t,n,r)=>({r:e,g:t,b:n,a:r}),rgba:(e,t,n,r)=>({r:e,g:t,b:n,a:r}),hsl:(e,t,n,r)=>CS({h:e,s:t,l:n,a:r}),hsla:(e,t,n,r)=>CS({h:e,s:t,l:n,a:r}),hsv:(e,t,n,r)=>nd({h:e,s:t,v:n,a:r}),hsva:(e,t,n,r)=>nd({h:e,s:t,v:n,a:r})};function li(e){if(typeof e=="number")return{r:(e&16711680)>>16,g:(e&65280)>>8,b:e&255};if(typeof e=="string"&&ES.test(e)){const{groups:t}=e.match(ES),{fn:n,values:r}=t,s=r.split(/,\s*|\s*\/\s*|\s+/).map((i,o)=>i.endsWith("%")||o>0&&o<3&&["hsl","hsla","hsv","hsva"].includes(n)?parseFloat(i)/100:parseFloat(i));return tN[n](...s)}else if(typeof e=="string"){let t=e.startsWith("#")?e.slice(1):e;return[3,4].includes(t.length)?t=t.split("").map(n=>n+n).join(""):[6,8].includes(t.length),rN(t)}else if(typeof e=="object"){if(Sg(e,["r","g","b"]))return e;if(Sg(e,["h","s","l"]))return nd(RP(e));if(Sg(e,["h","s","v"]))return nd(e)}throw new TypeError(`Invalid color: ${e==null?e:String(e)||e.constructor.name}
|
|
22
|
+
Expected #hex, #hexa, rgb(), rgba(), hsl(), hsla(), object or number`)}function nd(e){const{h:t,s:n,v:r,a:s}=e,i=a=>{const l=(a+t/60)%6;return r-r*n*Math.max(Math.min(l,4-l,1),0)},o=[i(5),i(3),i(1)].map(a=>Math.round(a*255));return{r:o[0],g:o[1],b:o[2],a:s}}function CS(e){return nd(RP(e))}function RP(e){const{h:t,s:n,l:r,a:s}=e,i=r+n*Math.min(r,1-r),o=i===0?0:2-2*r/i;return{h:t,s:o,v:i,a:s}}function kf(e){const t=Math.round(e).toString(16);return("00".substr(0,2-t.length)+t).toUpperCase()}function nN(e){let{r:t,g:n,b:r,a:s}=e;return`#${[kf(t),kf(n),kf(r),s!==void 0?kf(Math.round(s*255)):""].join("")}`}function rN(e){e=sN(e);let[t,n,r,s]=OF(e,2).map(i=>parseInt(i,16));return s=s===void 0?s:s/255,{r:t,g:n,b:r,a:s}}function sN(e){return e.startsWith("#")&&(e=e.slice(1)),e=e.replace(/([^0-9a-f])/gi,"F"),(e.length===3||e.length===4)&&(e=e.split("").map(t=>t+t).join("")),e.length!==6&&(e=uS(uS(e,6),8,"F")),e}function iN(e,t){const n=CP(u1(e));return n[0]=n[0]+t*10,PP(TP(n))}function oN(e,t){const n=CP(u1(e));return n[0]=n[0]-t*10,PP(TP(n))}function aN(e){const t=li(e);return u1(t)[1]}function IP(e){const t=Math.abs(xS(li(0),li(e)));return Math.abs(xS(li(16777215),li(e)))>Math.min(t,50)?"#fff":"#000"}function he(e,t){return n=>Object.keys(e).reduce((r,s)=>{const o=typeof e[s]=="object"&&e[s]!=null&&!Array.isArray(e[s])?e[s]:{type:e[s]};return n&&s in n?r[s]={...o,default:n[s]}:r[s]=o,t&&!r[s].source&&(r[s].source=t),r},{})}const Ge=he({class:[String,Array,Object],style:{type:[String,Array,Object],default:null}},"component");function fn(e,t){const n=Ru();if(!n)throw new Error(`[Vuetify] ${e} must be called from inside a setup function`);return n}function gi(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"composables";const t=fn(e).type;return $a((t==null?void 0:t.aliasName)||(t==null?void 0:t.name))}function lN(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:fn("injectSelf");const{provides:n}=t;if(n&&e in n)return n[e]}const au=Symbol.for("vuetify:defaults");function uN(e){return K(e)}function c1(){const e=Je(au);if(!e)throw new Error("[Vuetify] Could not find defaults instance");return e}function Br(e,t){const n=c1(),r=K(e),s=M(()=>{if(J(t==null?void 0:t.disabled))return n.value;const o=J(t==null?void 0:t.scoped),a=J(t==null?void 0:t.reset),l=J(t==null?void 0:t.root);if(r.value==null&&!(o||a||l))return n.value;let u=or(r.value,{prev:n.value});if(o)return u;if(a||l){const c=Number(a||1/0);for(let d=0;d<=c&&!(!u||!("prev"in u));d++)u=u.prev;return u&&typeof l=="string"&&l in u&&(u=or(or(u,{prev:u}),u[l])),u}return u.prev?or(u.prev,u):u});return Jt(au,s),s}function cN(e,t){return e.props&&(typeof e.props[t]<"u"||typeof e.props[$a(t)]<"u")}function dN(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:c1();const r=fn("useDefaults");if(t=t??r.type.name??r.type.__name,!t)throw new Error("[Vuetify] Could not determine component name");const s=M(()=>{var l;return(l=n.value)==null?void 0:l[e._as??t]}),i=new Proxy(e,{get(l,u){var h,g,m,y;const c=Reflect.get(l,u);if(u==="class"||u==="style")return[(h=s.value)==null?void 0:h[u],c].filter(w=>w!=null);if(cN(r.vnode,u))return c;const d=(g=s.value)==null?void 0:g[u];if(d!==void 0)return d;const f=(y=(m=n.value)==null?void 0:m.global)==null?void 0:y[u];return f!==void 0?f:c}}),o=Pe();Cn(()=>{if(s.value){const l=Object.entries(s.value).filter(u=>{let[c]=u;return c.startsWith(c[0].toUpperCase())});o.value=l.length?Object.fromEntries(l):void 0}else o.value=void 0});function a(){const l=lN(au,r);Jt(au,M(()=>o.value?or((l==null?void 0:l.value)??{},o.value):l==null?void 0:l.value))}return{props:i,provideSubDefaults:a}}function Iu(e){if(e._setup=e._setup??e.setup,!e.name)return e;if(e._setup){e.props=he(e.props??{},e.name)();const t=Object.keys(e.props).filter(n=>n!=="class"&&n!=="style");e.filterProps=function(r){return Vo(r,t)},e.props._as=String,e.setup=function(r,s){const i=c1();if(!i.value)return e._setup(r,s);const{props:o,provideSubDefaults:a}=dN(r,r._as??e.name,i),l=e._setup(o,s);return a(),l}}return e}function xe(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return t=>(e?Iu:Fe)(t)}function fN(e,t){return t.props=e,t}function Au(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"div",n=arguments.length>2?arguments[2]:void 0;return xe()({name:n??mi(yr(e.replace(/__/g,"-"))),props:{tag:{type:String,default:t},...Ge()},setup(r,s){let{slots:i}=s;return()=>{var o;return br(r.tag,{class:[e,r.class],style:r.style},(o=i.default)==null?void 0:o.call(i))}}})}function AP(e){if(typeof e.getRootNode!="function"){for(;e.parentNode;)e=e.parentNode;return e!==document?null:document}const t=e.getRootNode();return t!==document&&t.getRootNode({composed:!0})!==document?null:t}const rp="cubic-bezier(0.4, 0, 0.2, 1)",TS="cubic-bezier(0.0, 0, 0.2, 1)",PS="cubic-bezier(0.4, 0, 1, 1)",hN={linear:e=>e,easeInQuad:e=>e**2,easeOutQuad:e=>e*(2-e),easeInOutQuad:e=>e<.5?2*e**2:-1+(4-2*e)*e,easeInCubic:e=>e**3,easeOutCubic:e=>--e**3+1,easeInOutCubic:e=>e<.5?4*e**3:(e-1)*(2*e-2)*(2*e-2)+1,easeInQuart:e=>e**4,easeOutQuart:e=>1- --e**4,easeInOutQuart:e=>e<.5?8*e**4:1-8*--e**4,easeInQuint:e=>e**5,easeOutQuint:e=>1+--e**5,easeInOutQuint:e=>e<.5?16*e**5:1+16*--e**5,instant:e=>1};function RS(e,t,n){return Object.keys(e).filter(r=>o1(r)&&r.endsWith(t)).reduce((r,s)=>(r[s.slice(0,-t.length)]=i=>Ud(e[s],i,n(i)),r),{})}function OP(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;for(;e;){if(t?pN(e):d1(e))return e;e=e.parentElement}return document.scrollingElement}function sp(e,t){const n=[];if(t&&e&&!t.contains(e))return n;for(;e&&(d1(e)&&n.push(e),e!==t);)e=e.parentElement;return n}function d1(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)return!1;const t=window.getComputedStyle(e),n=t.overflowY==="scroll"||t.overflowY==="auto"&&e.scrollHeight>e.clientHeight,r=t.overflowX==="scroll"||t.overflowX==="auto"&&e.scrollWidth>e.clientWidth;return n||r}function pN(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)return!1;const t=window.getComputedStyle(e);return["scroll","auto"].includes(t.overflowY)}function mN(e){for(;e;){if(window.getComputedStyle(e).position==="fixed")return!0;e=e.offsetParent}return!1}function Me(e){const t=fn("useRender");t.render=e}const _s=he({border:[Boolean,Number,String]},"border");function Vs(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:gi();return{borderClasses:M(()=>{const r=e.border;return r===!0||r===""?`${t}--border`:typeof r=="string"||r===0?String(r).split(" ").map(s=>`border-${s}`):[]})}}const gN=[null,"default","comfortable","compact"],Xn=he({density:{type:String,default:"default",validator:e=>gN.includes(e)}},"density");function ks(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:gi();return{densityClasses:ie(()=>`${t}--density-${e.density}`)}}const xs=he({elevation:{type:[Number,String],validator(e){const t=parseInt(e);return!isNaN(t)&&t>=0&&t<=24}}},"elevation");function Us(e){return{elevationClasses:ie(()=>{const n=rt(e)?e.value:e.elevation;return n==null?[]:[`elevation-${n}`]})}}const Un=he({rounded:{type:[Boolean,Number,String],default:void 0},tile:Boolean},"rounded");function Qn(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:gi();return{roundedClasses:M(()=>{const r=rt(e)?e.value:e.rounded,s=rt(e)?!1:e.tile,i=[];if(s||r===!1)i.push("rounded-0");else if(r===!0||r==="")i.push(`${t}--rounded`);else if(typeof r=="string"||r===0)for(const o of String(r).split(" "))i.push(`rounded-${o}`);return i})}}const pt=he({tag:{type:[String,Object,Function],default:"div"}},"tag"),rd=Symbol.for("vuetify:theme"),Nt=he({theme:String},"theme");function IS(){return{defaultTheme:"light",prefix:"v-",variations:{colors:[],lighten:0,darken:0},themes:{light:{dark:!1,colors:{background:"#FFFFFF",surface:"#FFFFFF","surface-bright":"#FFFFFF","surface-light":"#EEEEEE","surface-variant":"#424242","on-surface-variant":"#EEEEEE",primary:"#1867C0","primary-darken-1":"#1F5592",secondary:"#48A9A6","secondary-darken-1":"#018786",error:"#B00020",info:"#2196F3",success:"#4CAF50",warning:"#FB8C00"},variables:{"border-color":"#000000","border-opacity":.12,"high-emphasis-opacity":.87,"medium-emphasis-opacity":.6,"disabled-opacity":.38,"idle-opacity":.04,"hover-opacity":.04,"focus-opacity":.12,"selected-opacity":.08,"activated-opacity":.12,"pressed-opacity":.12,"dragged-opacity":.08,"theme-kbd":"#EEEEEE","theme-on-kbd":"#000000","theme-code":"#F5F5F5","theme-on-code":"#000000"}},dark:{dark:!0,colors:{background:"#121212",surface:"#212121","surface-bright":"#ccbfd6","surface-light":"#424242","surface-variant":"#c8c8c8","on-surface-variant":"#000000",primary:"#2196F3","primary-darken-1":"#277CC1",secondary:"#54B6B2","secondary-darken-1":"#48A9A6",error:"#CF6679",info:"#2196F3",success:"#4CAF50",warning:"#FB8C00"},variables:{"border-color":"#FFFFFF","border-opacity":.12,"high-emphasis-opacity":1,"medium-emphasis-opacity":.7,"disabled-opacity":.5,"idle-opacity":.1,"hover-opacity":.04,"focus-opacity":.12,"selected-opacity":.08,"activated-opacity":.12,"pressed-opacity":.16,"dragged-opacity":.08,"theme-kbd":"#424242","theme-on-kbd":"#FFFFFF","theme-code":"#343434","theme-on-code":"#CCCCCC"}}},stylesheetId:"vuetify-theme-stylesheet",scoped:!1,unimportant:!1,utilities:!0}}function vN(){var r,s;let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:IS();const t=IS();if(!e)return{...t,isDisabled:!0};const n={};for(const[i,o]of Object.entries(e.themes??{})){const a=o.dark||i==="dark"?(r=t.themes)==null?void 0:r.dark:(s=t.themes)==null?void 0:s.light;n[i]=or(a,o)}return or(t,{...e,themes:n})}function aa(e,t,n,r){e.push(`${SN(t,r)} {
|
|
23
|
+
`,...n.map(s=>` ${s};
|
|
24
|
+
`),`}
|
|
25
|
+
`)}function AS(e,t){const n=e.dark?2:1,r=e.dark?1:2,s=[];for(const[i,o]of Object.entries(e.colors)){const a=li(o);s.push(`--${t}theme-${i}: ${a.r},${a.g},${a.b}`),i.startsWith("on-")||s.push(`--${t}theme-${i}-overlay-multiplier: ${aN(o)>.18?n:r}`)}for(const[i,o]of Object.entries(e.variables)){const a=typeof o=="string"&&o.startsWith("#")?li(o):void 0,l=a?`${a.r}, ${a.g}, ${a.b}`:void 0;s.push(`--${t}${i}: ${l??o}`)}return s}function yN(e,t,n){const r={};if(n)for(const s of["lighten","darken"]){const i=s==="lighten"?iN:oN;for(const o of Rl(n[s],1))r[`${e}-${s}-${o}`]=nN(i(li(t),o))}return r}function bN(e,t){if(!t)return{};let n={};for(const r of t.colors){const s=e[r];s&&(n={...n,...yN(r,s,t)})}return n}function wN(e){const t={};for(const n of Object.keys(e)){if(n.startsWith("on-")||e[`on-${n}`])continue;const r=`on-${n}`,s=li(e[n]);t[r]=IP(s)}return t}function SN(e,t){if(!t)return e;const n=`:where(${t})`;return e===":root"?n:`${n} ${e}`}function _N(e,t,n){const r=kN(e,t);r&&(r.innerHTML=n)}function kN(e,t){if(!Ot)return null;let n=document.getElementById(e);return n||(n=document.createElement("style"),n.id=e,n.type="text/css",t&&n.setAttribute("nonce",t),document.head.appendChild(n)),n}function xN(e){const t=vN(e),n=Pe(t.defaultTheme),r=K(t.themes),s=Pe("light"),i=M({get(){return n.value==="system"?s.value:n.value},set(b){n.value=b}}),o=M(()=>{const b={};for(const[x,_]of Object.entries(r.value)){const S={..._.colors,...bN(_.colors,t.variations)};b[x]={..._,colors:{...S,...wN(S)}}}return b}),a=ie(()=>o.value[i.value]),l=ie(()=>n.value==="system"),u=M(()=>{var S;const b=[],x=t.unimportant?"":" !important",_=t.scoped?t.prefix:"";(S=a.value)!=null&&S.dark&&aa(b,":root",["color-scheme: dark"],t.scope),aa(b,":root",AS(a.value,t.prefix),t.scope);for(const[P,A]of Object.entries(o.value))aa(b,`.${t.prefix}theme--${P}`,[`color-scheme: ${A.dark?"dark":"normal"}`,...AS(A,t.prefix)],t.scope);if(t.utilities){const P=[],A=[],E=new Set(Object.values(o.value).flatMap(T=>Object.keys(T.colors)));for(const T of E)T.startsWith("on-")?aa(A,`.${T}`,[`color: rgb(var(--${t.prefix}theme-${T}))${x}`],t.scope):(aa(P,`.${_}bg-${T}`,[`--${t.prefix}theme-overlay-multiplier: var(--${t.prefix}theme-${T}-overlay-multiplier)`,`background-color: rgb(var(--${t.prefix}theme-${T}))${x}`,`color: rgb(var(--${t.prefix}theme-on-${T}))${x}`],t.scope),aa(A,`.${_}text-${T}`,[`color: rgb(var(--${t.prefix}theme-${T}))${x}`],t.scope),aa(A,`.${_}border-${T}`,[`--${t.prefix}border-color: var(--${t.prefix}theme-${T})`],t.scope));b.push(...P,...A)}return b.map((P,A)=>A===0?P:` ${P}`).join("")}),c=ie(()=>t.isDisabled?void 0:`${t.prefix}theme--${i.value}`),d=ie(()=>Object.keys(o.value));if(s1){let x=function(){s.value=b.matches?"dark":"light"};var w=x;const b=window.matchMedia("(prefers-color-scheme: dark)");x(),b.addEventListener("change",x,{passive:!0}),$d()&&dn(()=>{b.removeEventListener("change",x)})}function f(b){if(t.isDisabled)return;const x=b._context.provides.usehead;if(x){let P=function(){return{style:[{textContent:u.value,id:t.stylesheetId,nonce:t.cspNonce||!1}]}};var _=P;if(x.push){const A=x.push(P);Ot&&Ee(u,()=>{A.patch(P)})}else Ot?(x.addHeadObjs(ie(P)),Cn(()=>x.updateDOM())):x.addHeadObjs(P())}else{let P=function(){_N(t.stylesheetId,t.cspNonce,u.value)};var S=P;Ot?Ee(u,P,{immediate:!0}):P()}}function h(b){b!=="system"&&!d.value.includes(b)||(i.value=b)}function g(){let b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:d.value;const x=b.indexOf(i.value),_=x===-1?0:(x+1)%b.length;h(b[_])}function m(){let b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["light","dark"];g(b)}const y=new Proxy(i,{get(b,x){return Reflect.get(b,x)},set(b,x,_){return x==="value"&&EP(`theme.global.name.value = ${_}`,`theme.change('${_}')`),Reflect.set(b,x,_)}});return{install:f,change:h,cycle:g,toggle:m,isDisabled:t.isDisabled,isSystem:l,name:i,themes:r,current:a,computedThemes:o,prefix:t.prefix,themeClasses:c,styles:u,global:{name:y,current:a}}}function tn(e){fn("provideTheme");const t=Je(rd,null);if(!t)throw new Error("Could not find Vuetify theme injection");const n=ie(()=>e.theme??t.name.value),r=ie(()=>t.themes.value[n.value]),s=ie(()=>t.isDisabled?void 0:`${t.prefix}theme--${n.value}`),i={...t,name:n,current:r,themeClasses:s};return Jt(rd,i),i}function MP(){fn("useTheme");const e=Je(rd,null);if(!e)throw new Error("Could not find Vuetify theme injection");return e}function f1(e){return a1(()=>{const{class:t,style:n}=EN(e);return{colorClasses:t,colorStyles:n}})}function Fs(e){const{colorClasses:t,colorStyles:n}=f1(()=>({text:un(e)}));return{textColorClasses:t,textColorStyles:n}}function vr(e){const{colorClasses:t,colorStyles:n}=f1(()=>({background:un(e)}));return{backgroundColorClasses:t,backgroundColorStyles:n}}function EN(e){const t=un(e),n=[],r={};if(t.background)if(ny(t.background)){if(r.backgroundColor=t.background,!t.text&&eN(t.background)){const s=li(t.background);if(s.a==null||s.a===1){const i=IP(s);r.color=i,r.caretColor=i}}}else n.push(`bg-${t.background}`);return t.text&&(ny(t.text)?(r.color=t.text,r.caretColor=t.text):n.push(`text-${t.text}`)),{class:n,style:r}}const CN=["elevated","flat","tonal","outlined","text","plain"];function Yo(e,t){return C(Oe,null,[e&&C("span",{key:"overlay",class:Re(`${t}__overlay`)},null),C("span",{key:"underlay",class:Re(`${t}__underlay`)},null)])}const zs=he({color:String,variant:{type:String,default:"elevated",validator:e=>CN.includes(e)}},"variant");function ol(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:gi();const n=ie(()=>{const{variant:i}=un(e);return`${t}--variant-${i}`}),{colorClasses:r,colorStyles:s}=f1(()=>{const{variant:i,color:o}=un(e);return{[["elevated","flat"].includes(i)?"background":"text"]:o}});return{colorClasses:r,colorStyles:s,variantClasses:n}}const DP=he({baseColor:String,divided:Boolean,direction:{type:String,default:"horizontal"},..._s(),...Ge(),...Xn(),...xs(),...Un(),...pt(),...Nt(),...zs()},"VBtnGroup"),OS=xe()({name:"VBtnGroup",props:DP(),setup(e,t){let{slots:n}=t;const{themeClasses:r}=tn(e),{densityClasses:s}=ks(e),{borderClasses:i}=Vs(e),{elevationClasses:o}=Us(e),{roundedClasses:a}=Qn(e);Br({VBtn:{height:ie(()=>e.direction==="horizontal"?"auto":null),baseColor:ie(()=>e.baseColor),color:ie(()=>e.color),density:ie(()=>e.density),flat:!0,variant:ie(()=>e.variant)}}),Me(()=>p(e.tag,{class:Re(["v-btn-group",`v-btn-group--${e.direction}`,{"v-btn-group--divided":e.divided},r.value,i.value,s.value,o.value,a.value,e.class]),style:Be(e.style)},n))}});function Lr(e,t){let n;function r(){n=qa(),n.run(()=>t.length?t(()=>{n==null||n.stop(),r()}):t())}Ee(e,s=>{s&&!n?r():s||(n==null||n.stop(),n=void 0)},{immediate:!0}),dn(()=>{n==null||n.stop()})}function lt(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:d=>d,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:d=>d;const i=fn("useProxiedModel"),o=K(e[t]!==void 0?e[t]:n),a=$a(t),u=M(a!==t?()=>{var d,f,h,g;return e[t],!!(((d=i.vnode.props)!=null&&d.hasOwnProperty(t)||(f=i.vnode.props)!=null&&f.hasOwnProperty(a))&&((h=i.vnode.props)!=null&&h.hasOwnProperty(`onUpdate:${t}`)||(g=i.vnode.props)!=null&&g.hasOwnProperty(`onUpdate:${a}`)))}:()=>{var d,f;return e[t],!!((d=i.vnode.props)!=null&&d.hasOwnProperty(t)&&((f=i.vnode.props)!=null&&f.hasOwnProperty(`onUpdate:${t}`)))});Lr(()=>!u.value,()=>{Ee(()=>e[t],d=>{o.value=d})});const c=M({get(){const d=e[t];return r(u.value?d:o.value)},set(d){const f=s(d),h=Ue(u.value?e[t]:o.value);h===f||r(h)===d||(o.value=f,i==null||i.emit(`update:${t}`,f))}});return Object.defineProperty(c,"externalValue",{get:()=>u.value?e[t]:o.value}),c}const zd=he({modelValue:{type:null,default:void 0},multiple:Boolean,mandatory:[Boolean,String],max:Number,selectedClass:String,disabled:Boolean},"group"),Hd=he({value:null,disabled:Boolean,selectedClass:String},"group-item");function lu(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;const r=fn("useGroupItem");if(!r)throw new Error("[Vuetify] useGroupItem composable must be used inside a component setup function");const s=Vr();Jt(Symbol.for(`${t.description}:id`),s);const i=Je(t,null);if(!i){if(!n)return i;throw new Error(`[Vuetify] Could not find useGroup injection with symbol ${t.description}`)}const o=ie(()=>e.value),a=M(()=>!!(i.disabled.value||e.disabled));function l(){i==null||i.register({id:s,value:o,disabled:a},r)}function u(){i==null||i.unregister(s)}yt(()=>l()),Vn(()=>u());const c=M(()=>i.isSelected(s)),d=M(()=>i.items.value[0].id===s),f=M(()=>i.items.value[i.items.value.length-1].id===s),h=M(()=>c.value&&[i.selectedClass.value,e.selectedClass]);return Ee(c,g=>{r.emit("group:selected",{value:g})},{flush:"sync"}),{id:s,isSelected:c,isFirst:d,isLast:f,toggle:()=>i.select(s,!c.value),select:g=>i.select(s,g),selectedClass:h,value:o,disabled:a,group:i,register:l,unregister:u}}function Ou(e,t){let n=!1;const r=mn([]),s=lt(e,"modelValue",[],f=>f===void 0?[]:LP(r,f===null?[null]:Fn(f)),f=>{const h=PN(r,f);return e.multiple?h:h[0]}),i=fn("useGroup");function o(f,h){const g=f,m=Symbol.for(`${t.description}:id`),w=Il(m,i==null?void 0:i.vnode).indexOf(h);J(g.value)===void 0&&(g.value=w,g.useIndexAsValue=!0),w>-1?r.splice(w,0,g):r.push(g)}function a(f){if(n)return;l();const h=r.findIndex(g=>g.id===f);r.splice(h,1)}function l(){const f=r.find(h=>!h.disabled);f&&e.mandatory==="force"&&!s.value.length&&(s.value=[f.id])}yt(()=>{l()}),Vn(()=>{n=!0}),Gb(()=>{for(let f=0;f<r.length;f++)r[f].useIndexAsValue&&(r[f].value=f)});function u(f,h){const g=r.find(m=>m.id===f);if(!(h&&(g!=null&&g.disabled)))if(e.multiple){const m=s.value.slice(),y=m.findIndex(b=>b===f),w=~y;if(h=h??!w,w&&e.mandatory&&m.length<=1||!w&&e.max!=null&&m.length+1>e.max)return;y<0&&h?m.push(f):y>=0&&!h&&m.splice(y,1),s.value=m}else{const m=s.value.includes(f);if(e.mandatory&&m||!m&&!h)return;s.value=h??!m?[f]:[]}}function c(f){if(e.multiple,s.value.length){const h=s.value[0],g=r.findIndex(w=>w.id===h);let m=(g+f)%r.length,y=r[m];for(;y.disabled&&m!==g;)m=(m+f)%r.length,y=r[m];if(y.disabled)return;s.value=[r[m].id]}else{const h=r.find(g=>!g.disabled);h&&(s.value=[h.id])}}const d={register:o,unregister:a,selected:s,select:u,disabled:ie(()=>e.disabled),prev:()=>c(r.length-1),next:()=>c(1),isSelected:f=>s.value.includes(f),selectedClass:ie(()=>e.selectedClass),items:ie(()=>r),getItemIndex:f=>TN(r,f)};return Jt(t,d),d}function TN(e,t){const n=LP(e,[t]);return n.length?e.findIndex(r=>r.id===n[0]):-1}function LP(e,t){const n=[];return t.forEach(r=>{const s=e.find(o=>Dr(r,o.value)),i=e[r];(s==null?void 0:s.value)!==void 0?n.push(s.id):i!=null&&i.useIndexAsValue&&n.push(i.id)}),n}function PN(e,t){const n=[];return t.forEach(r=>{const s=e.findIndex(i=>i.id===r);if(~s){const i=e[s];n.push(i.value!==void 0?i.value:s)}}),n}const $P=Symbol.for("vuetify:v-btn-toggle"),RN=he({...DP(),...zd()},"VBtnToggle"),FP=xe()({name:"VBtnToggle",props:RN(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{isSelected:r,next:s,prev:i,select:o,selected:a}=Ou(e,$P);return Me(()=>{const l=OS.filterProps(e);return p(OS,me({class:["v-btn-toggle",e.class]},l,{style:e.style}),{default:()=>{var u;return[(u=n.default)==null?void 0:u.call(n,{isSelected:r,next:s,prev:i,select:o,selected:a})]}})}),{next:s,prev:i,select:o}}}),IN=he({defaults:Object,disabled:Boolean,reset:[Number,String],root:[Boolean,String],scoped:Boolean},"VDefaultsProvider"),$t=xe(!1)({name:"VDefaultsProvider",props:IN(),setup(e,t){let{slots:n}=t;const{defaults:r,disabled:s,reset:i,root:o,scoped:a}=sl(e);return Br(r,{reset:i,root:o,scoped:a,disabled:s}),()=>{var l;return(l=n.default)==null?void 0:l.call(n)}}}),AN={collapse:"mdi-chevron-up",complete:"mdi-check",cancel:"mdi-close-circle",close:"mdi-close",delete:"mdi-close-circle",clear:"mdi-close-circle",success:"mdi-check-circle",info:"mdi-information",warning:"mdi-alert-circle",error:"mdi-close-circle",prev:"mdi-chevron-left",next:"mdi-chevron-right",checkboxOn:"mdi-checkbox-marked",checkboxOff:"mdi-checkbox-blank-outline",checkboxIndeterminate:"mdi-minus-box",delimiter:"mdi-circle",sortAsc:"mdi-arrow-up",sortDesc:"mdi-arrow-down",expand:"mdi-chevron-down",menu:"mdi-menu",subgroup:"mdi-menu-down",dropdown:"mdi-menu-down",radioOn:"mdi-radiobox-marked",radioOff:"mdi-radiobox-blank",edit:"mdi-pencil",ratingEmpty:"mdi-star-outline",ratingFull:"mdi-star",ratingHalf:"mdi-star-half-full",loading:"mdi-cached",first:"mdi-page-first",last:"mdi-page-last",unfold:"mdi-unfold-more-horizontal",file:"mdi-paperclip",plus:"mdi-plus",minus:"mdi-minus",calendar:"mdi-calendar",treeviewCollapse:"mdi-menu-down",treeviewExpand:"mdi-menu-right",tableGroupCollapse:"mdi-chevron-down",tableGroupExpand:"mdi-chevron-right",eyeDropper:"mdi-eyedropper",upload:"mdi-cloud-upload",color:"mdi-palette",command:"mdi-apple-keyboard-command",ctrl:"mdi-apple-keyboard-control",space:"mdi-keyboard-space",shift:"mdi-apple-keyboard-shift",alt:"mdi-apple-keyboard-option",enter:"mdi-keyboard-return",arrowup:"mdi-arrow-up",arrowdown:"mdi-arrow-down",arrowleft:"mdi-arrow-left",arrowright:"mdi-arrow-right",backspace:"mdi-backspace",play:"mdi-play",pause:"mdi-pause",fullscreen:"mdi-fullscreen",fullscreenExit:"mdi-fullscreen-exit",volumeHigh:"mdi-volume-high",volumeMedium:"mdi-volume-medium",volumeLow:"mdi-volume-low",volumeOff:"mdi-volume-variant-off"},ON={component:e=>br(BP,{...e,class:"mdi"})},He=[String,Function,Object,Array],ry=Symbol.for("vuetify:icons"),cm=he({icon:{type:He},tag:{type:[String,Object,Function],required:!0}},"icon"),MS=xe()({name:"VComponentIcon",props:cm(),setup(e,t){let{slots:n}=t;return()=>{const r=e.icon;return p(e.tag,null,{default:()=>{var s;return[e.icon?p(r,null,null):(s=n.default)==null?void 0:s.call(n)]}})}}}),NP=Iu({name:"VSvgIcon",inheritAttrs:!1,props:cm(),setup(e,t){let{attrs:n}=t;return()=>p(e.tag,me(n,{style:null}),{default:()=>[C("svg",{class:"v-icon__svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true"},[Array.isArray(e.icon)?e.icon.map(r=>Array.isArray(r)?C("path",{d:r[0],"fill-opacity":r[1]},null):C("path",{d:r},null)):C("path",{d:e.icon},null)])]})}}),MN=Iu({name:"VLigatureIcon",props:cm(),setup(e){return()=>p(e.tag,null,{default:()=>[e.icon]})}}),BP=Iu({name:"VClassIcon",props:cm(),setup(e){return()=>p(e.tag,{class:Re(e.icon)},null)}});function DN(){return{svg:{component:NP},class:{component:BP}}}function LN(e){const t=DN(),n=(e==null?void 0:e.defaultSet)??"mdi";return n==="mdi"&&!t.mdi&&(t.mdi=ON),or({defaultSet:n,sets:t,aliases:{...AN,vuetify:["M8.2241 14.2009L12 21L22 3H14.4459L8.2241 14.2009Z",["M7.26303 12.4733L7.00113 12L2 3H12.5261C12.5261 3 12.5261 3 12.5261 3L7.26303 12.4733Z",.6]],"vuetify-outline":"svg:M7.26 12.47 12.53 3H2L7.26 12.47ZM14.45 3 8.22 14.2 12 21 22 3H14.45ZM18.6 5 12 16.88 10.51 14.2 15.62 5ZM7.26 8.35 5.4 5H9.13L7.26 8.35Z","vuetify-play":["m6.376 13.184-4.11-7.192C1.505 4.66 2.467 3 4.003 3h8.532l-.953 1.576-.006.01-.396.677c-.429.732-.214 1.507.194 2.015.404.503 1.092.878 1.869.806a3.72 3.72 0 0 1 1.005.022c.276.053.434.143.523.237.138.146.38.635-.25 2.09-.893 1.63-1.553 1.722-1.847 1.677-.213-.033-.468-.158-.756-.406a4.95 4.95 0 0 1-.8-.927c-.39-.564-1.04-.84-1.66-.846-.625-.006-1.316.27-1.693.921l-.478.826-.911 1.506Z",["M9.093 11.552c.046-.079.144-.15.32-.148a.53.53 0 0 1 .43.207c.285.414.636.847 1.046 1.2.405.35.914.662 1.516.754 1.334.205 2.502-.698 3.48-2.495l.014-.028.013-.03c.687-1.574.774-2.852-.005-3.675-.37-.391-.861-.586-1.333-.676a5.243 5.243 0 0 0-1.447-.044c-.173.016-.393-.073-.54-.257-.145-.18-.127-.316-.082-.392l.393-.672L14.287 3h5.71c1.536 0 2.499 1.659 1.737 2.992l-7.997 13.996c-.768 1.344-2.706 1.344-3.473 0l-3.037-5.314 1.377-2.278.004-.006.004-.007.481-.831Z",.6]]}},e)}const $N=e=>{const t=Je(ry);if(!t)throw new Error("Missing Vuetify Icons provide!");return{iconData:M(()=>{var l;const r=un(e);if(!r)return{component:MS};let s=r;if(typeof s=="string"&&(s=s.trim(),s.startsWith("$")&&(s=(l=t.aliases)==null?void 0:l[s.slice(1)])),Array.isArray(s))return{component:NP,icon:s};if(typeof s!="string")return{component:MS,icon:s};const i=Object.keys(t.sets).find(u=>typeof s=="string"&&s.startsWith(`${u}:`)),o=i?s.slice(i.length+1):s;return{component:t.sets[i??t.defaultSet].component,icon:o}})}},FN=["x-small","small","default","large","x-large"],Mu=he({size:{type:[String,Number],default:"default"}},"size");function jd(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:gi();return a1(()=>{const n=e.size;let r,s;return ep(FN,n)?r=`${t}--size-${n}`:n&&(s={width:Ne(n),height:Ne(n)}),{sizeClasses:r,sizeStyles:s}})}const NN=he({color:String,disabled:Boolean,start:Boolean,end:Boolean,icon:He,opacity:[String,Number],...Ge(),...Mu(),...pt({tag:"i"}),...Nt()},"VIcon"),Z=xe()({name:"VIcon",props:NN(),setup(e,t){let{attrs:n,slots:r}=t;const s=Pe(),{themeClasses:i}=MP(),{iconData:o}=$N(()=>s.value||e.icon),{sizeClasses:a}=jd(e),{textColorClasses:l,textColorStyles:u}=Fs(()=>e.color);return Me(()=>{var f,h;const c=(f=r.default)==null?void 0:f.call(r);c&&(s.value=(h=yP(c).filter(g=>g.type===Bd&&g.children&&typeof g.children=="string")[0])==null?void 0:h.children);const d=!!(n.onClick||n.onClickOnce);return p(o.value.component,{tag:e.tag,icon:o.value.icon,class:Re(["v-icon","notranslate",i.value,a.value,l.value,{"v-icon--clickable":d,"v-icon--disabled":e.disabled,"v-icon--start":e.start,"v-icon--end":e.end},e.class]),style:Be([{"--v-icon-opacity":e.opacity},a.value?void 0:{fontSize:Ne(e.size),height:Ne(e.size),width:Ne(e.size)},u.value,e.style]),role:d?"button":void 0,"aria-hidden":!d,tabindex:d?e.disabled?-1:0:void 0},{default:()=>[c]})}),{}}});function VP(e,t){const n=K(),r=Pe(!1);if(r1){const s=new IntersectionObserver(i=>{r.value=!!i.find(o=>o.isIntersecting)},t);dn(()=>{s.disconnect()}),Ee(n,(i,o)=>{o&&(s.unobserve(o),r.value=!1),i&&s.observe(i)},{flush:"post"})}return{intersectionRef:n,isIntersecting:r}}function Uo(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"content";const n=Jv(),r=K();if(Ot){const s=new ResizeObserver(i=>{e==null||e(i,s),i.length&&(t==="content"?r.value=i[0].contentRect:r.value=i[0].target.getBoundingClientRect())});Vn(()=>{s.disconnect()}),Ee(()=>n.el,(i,o)=>{o&&(s.unobserve(o),r.value=void 0),i&&s.observe(i)},{flush:"post"})}return{resizeRef:n,contentRect:Gi(r)}}const BN=he({bgColor:String,color:String,indeterminate:[Boolean,String],modelValue:{type:[Number,String],default:0},rotate:{type:[Number,String],default:0},width:{type:[Number,String],default:4},...Ge(),...Mu(),...pt({tag:"div"}),...Nt()},"VProgressCircular"),ai=xe()({name:"VProgressCircular",props:BN(),setup(e,t){let{slots:n}=t;const r=20,s=2*Math.PI*r,i=K(),{themeClasses:o}=tn(e),{sizeClasses:a,sizeStyles:l}=jd(e),{textColorClasses:u,textColorStyles:c}=Fs(()=>e.color),{textColorClasses:d,textColorStyles:f}=Fs(()=>e.bgColor),{intersectionRef:h,isIntersecting:g}=VP(),{resizeRef:m,contentRect:y}=Uo(),w=ie(()=>Nn(parseFloat(e.modelValue),0,100)),b=ie(()=>Number(e.width)),x=ie(()=>l.value?Number(e.size):y.value?y.value.width:Math.max(b.value,32)),_=ie(()=>r/(1-b.value/x.value)*2),S=ie(()=>b.value/x.value*_.value),P=ie(()=>Ne((100-w.value)/100*s));return Cn(()=>{h.value=i.value,m.value=i.value}),Me(()=>p(e.tag,{ref:i,class:Re(["v-progress-circular",{"v-progress-circular--indeterminate":!!e.indeterminate,"v-progress-circular--visible":g.value,"v-progress-circular--disable-shrink":e.indeterminate&&(e.indeterminate==="disable-shrink"||Ka())},o.value,a.value,u.value,e.class]),style:Be([l.value,c.value,e.style]),role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":e.indeterminate?void 0:w.value},{default:()=>[C("svg",{style:{transform:`rotate(calc(-90deg + ${Number(e.rotate)}deg))`},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${_.value} ${_.value}`},[C("circle",{class:Re(["v-progress-circular__underlay",d.value]),style:Be(f.value),fill:"transparent",cx:"50%",cy:"50%",r,"stroke-width":S.value,"stroke-dasharray":s,"stroke-dashoffset":0},null),C("circle",{class:"v-progress-circular__overlay",fill:"transparent",cx:"50%",cy:"50%",r,"stroke-width":S.value,"stroke-dasharray":s,"stroke-dashoffset":P.value},null)]),n.default&&C("div",{class:"v-progress-circular__content"},[n.default({value:w.value})])]})),{}}}),Sr=he({height:[Number,String],maxHeight:[Number,String],maxWidth:[Number,String],minHeight:[Number,String],minWidth:[Number,String],width:[Number,String]},"dimension");function _r(e){return{dimensionStyles:M(()=>{const n={},r=Ne(e.height),s=Ne(e.maxHeight),i=Ne(e.maxWidth),o=Ne(e.minHeight),a=Ne(e.minWidth),l=Ne(e.width);return r!=null&&(n.height=r),s!=null&&(n.maxHeight=s),i!=null&&(n.maxWidth=i),o!=null&&(n.minHeight=o),a!=null&&(n.minWidth=a),l!=null&&(n.width=l),n})}}const VN={badge:"Badge",open:"Open",close:"Close",dismiss:"Dismiss",confirmEdit:{ok:"OK",cancel:"Cancel"},dataIterator:{noResultsText:"No matching records found",loadingText:"Loading items..."},dataTable:{itemsPerPageText:"Rows per page:",ariaLabel:{sortDescending:"Sorted descending.",sortAscending:"Sorted ascending.",sortNone:"Not sorted.",activateNone:"Activate to remove sorting.",activateDescending:"Activate to sort descending.",activateAscending:"Activate to sort ascending."},sortBy:"Sort by"},dataFooter:{itemsPerPageText:"Items per page:",itemsPerPageAll:"All",nextPage:"Next page",prevPage:"Previous page",firstPage:"First page",lastPage:"Last page",pageText:"{0}-{1} of {2}"},dateRangeInput:{divider:"to"},datePicker:{itemsSelected:"{0} selected",range:{title:"Select dates",header:"Enter dates"},title:"Select date",header:"Enter date",input:{placeholder:"Enter date"},ariaLabel:{previousMonth:"Previous month",nextMonth:"Next month",selectYear:"Select year",selectDate:"{0}",currentDate:"Today, {0}"}},noDataText:"No data available",carousel:{prev:"Previous visual",next:"Next visual",ariaLabel:{delimiter:"Carousel slide {0} of {1}"}},calendar:{moreEvents:"{0} more",today:"Today"},input:{clear:"Clear {0}",prependAction:"{0} prepended action",appendAction:"{0} appended action",otp:"Please enter OTP character {0}"},fileInput:{counter:"{0} files",counterSize:"{0} files ({1} in total)"},fileUpload:{title:"Drag and drop files here",divider:"or",browse:"Browse Files"},timePicker:{am:"AM",pm:"PM",title:"Select Time"},pagination:{ariaLabel:{root:"Pagination Navigation",next:"Next page",previous:"Previous page",page:"Go to page {0}",currentPage:"Page {0}, Current page",first:"First page",last:"Last page"}},stepper:{next:"Next",prev:"Previous"},rating:{ariaLabel:{item:"Rating {0} of {1}"}},loading:"Loading...",infiniteScroll:{loadMore:"Load more",empty:"No more"},rules:{required:"This field is required",email:"Please enter a valid email",number:"This field can only contain numbers",integer:"This field can only contain integer values",capital:"This field can only contain uppercase letters",maxLength:"You must enter a maximum of {0} characters",minLength:"You must enter a minimum of {0} characters",strictLength:"The length of the entered field is invalid",exclude:"The {0} character is not allowed",notEmpty:"Please choose at least one value",pattern:"Invalid format"},hotkey:{then:"then",ctrl:"Ctrl",command:"Command",space:"Space",shift:"Shift",alt:"Alt",enter:"Enter",escape:"Escape",upArrow:"Up Arrow",downArrow:"Down Arrow",leftArrow:"Left Arrow",rightArrow:"Right Arrow",backspace:"Backspace",option:"Option",plus:"plus",shortcut:"Keyboard shortcut: {0}"},video:{play:"Play",pause:"Pause",seek:"Seek",volume:"Volume",showVolume:"Show volume control",mute:"Mute",unmute:"Unmute",enterFullscreen:"Full screen",exitFullscreen:"Exit full screen"},colorPicker:{ariaLabel:{eyedropper:"Select color with eyedropper",hueSlider:"Hue",alphaSlider:"Alpha",redInput:"Red value",greenInput:"Green value",blueInput:"Blue value",alphaInput:"Alpha value",hueInput:"Hue value",saturationInput:"Saturation value",lightnessInput:"Lightness value",hexInput:"HEX value",hexaInput:"HEX with alpha value",changeFormat:"Change color format"}}},DS="$vuetify.",LS=(e,t)=>e.replace(/\{(\d+)\}/g,(n,r)=>String(t[Number(r)])),UP=(e,t,n)=>function(r){for(var s=arguments.length,i=new Array(s>1?s-1:0),o=1;o<s;o++)i[o-1]=arguments[o];if(!r.startsWith(DS))return LS(r,i);const a=r.replace(DS,""),l=e.value&&n.value[e.value],u=t.value&&n.value[t.value];let c=Ya(l,a,null);return c||(`${r}${e.value}`,c=Ya(u,a,null)),c||(c=r),typeof c!="string"&&(c=r),LS(c,i)};function h1(e,t){return(n,r)=>new Intl.NumberFormat([e.value,t.value],r).format(n)}function zP(e,t){return h1(e,t)(.1).includes(",")?",":"."}function xg(e,t,n){const r=lt(e,t,e[t]??n.value);return r.value=e[t]??n.value,Ee(n,s=>{e[t]==null&&(r.value=n.value)}),r}function HP(e){return t=>{const n=xg(t,"locale",e.current),r=xg(t,"fallback",e.fallback),s=xg(t,"messages",e.messages);return{name:"vuetify",current:n,fallback:r,messages:s,decimalSeparator:ie(()=>zP(n,r)),t:UP(n,r,s),n:h1(n,r),provide:HP({current:n,fallback:r,messages:s})}}}function UN(e){const t=Pe((e==null?void 0:e.locale)??"en"),n=Pe((e==null?void 0:e.fallback)??"en"),r=K({en:VN,...e==null?void 0:e.messages});return{name:"vuetify",current:t,fallback:n,messages:r,decimalSeparator:ie(()=>(e==null?void 0:e.decimalSeparator)??zP(t,n)),t:UP(t,n,r),n:h1(t,n),provide:HP({current:t,fallback:n,messages:r})}}const ip=Symbol.for("vuetify:locale");function zN(e){return e.name!=null}function HN(e){const t=e!=null&&e.adapter&&zN(e==null?void 0:e.adapter)?e==null?void 0:e.adapter:UN(e),n=WN(t,e);return{...t,...n}}function zr(){const e=Je(ip);if(!e)throw new Error("[Vuetify] Could not find injected locale instance");return e}function jN(){return{af:!1,ar:!0,bg:!1,ca:!1,ckb:!1,cs:!1,de:!1,el:!1,en:!1,es:!1,et:!1,fa:!0,fi:!1,fr:!1,hr:!1,hu:!1,he:!0,id:!1,it:!1,ja:!1,km:!1,ko:!1,lv:!1,lt:!1,nl:!1,no:!1,pl:!1,pt:!1,ro:!1,ru:!1,sk:!1,sl:!1,srCyrl:!1,srLatn:!1,sv:!1,th:!1,tr:!1,az:!1,uk:!1,vi:!1,zhHans:!1,zhHant:!1}}function WN(e,t){const n=K((t==null?void 0:t.rtl)??jN()),r=M(()=>n.value[e.current.value]??!1);return{isRtl:r,rtl:n,rtlClasses:ie(()=>`v-locale--is-${r.value?"rtl":"ltr"}`)}}function Hr(){const e=Je(ip);if(!e)throw new Error("[Vuetify] Could not find injected rtl instance");return{isRtl:e.isRtl,rtlClasses:e.rtlClasses}}const $S={center:"center",top:"bottom",bottom:"top",left:"right",right:"left"},Xo=he({location:String},"location");function al(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2?arguments[2]:void 0;const{isRtl:r}=Hr();return{locationStyles:M(()=>{if(!e.location)return{};const{side:i,align:o}=ey(e.location.split(" ").length>1?e.location:`${e.location} center`,r.value);function a(u){return n?n(u):0}const l={};return i!=="center"&&(t?l[$S[i]]=`calc(100% - ${a(i)}px)`:l[i]=0),o!=="center"?t?l[$S[o]]=`calc(100% - ${a(o)}px)`:l[o]=0:(i==="center"?l.top=l.left="50%":l[{top:"left",bottom:"left",left:"top",right:"top"}[i]]="50%",l.transform={top:"translateX(-50%)",bottom:"translateX(-50%)",left:"translateY(-50%)",right:"translateY(-50%)",center:"translate(-50%, -50%)"}[i]),l})}}const qN=he({chunkCount:{type:[Number,String],default:null},chunkWidth:{type:[Number,String],default:null},chunkGap:{type:[Number,String],default:4}},"chunks");function GN(e,t){const n=ie(()=>!!e.chunkCount||!!e.chunkWidth),r=M(()=>{const a=un(t);if(!a)return 0;if(!e.chunkCount)return Number(e.chunkWidth);const l=Number(e.chunkCount);return(a-Number(e.chunkGap)*(l-1))/l}),s=ie(()=>Number(e.chunkGap)),i=M(()=>{if(!n.value)return{};const a=Ne(s.value),l=Ne(r.value);return{maskRepeat:"repeat-x",maskImage:`linear-gradient(90deg, #000, #000 ${l}, transparent ${l}, transparent)`,maskSize:`calc(${l} + ${a}) 100%`}});function o(a){const l=un(t);if(!l)return a;const u=100*s.value/l,c=100*(r.value+s.value)/l,d=Math.floor((a+u)/c);return Nn(0,d*c-u/2,100)}return{hasChunks:n,chunksMaskStyles:i,snapValueToChunk:o}}const KN=he({absolute:Boolean,active:{type:Boolean,default:!0},bgColor:String,bgOpacity:[Number,String],bufferValue:{type:[Number,String],default:0},bufferColor:String,bufferOpacity:[Number,String],clickable:Boolean,color:String,height:{type:[Number,String],default:4},indeterminate:Boolean,max:{type:[Number,String],default:100},modelValue:{type:[Number,String],default:0},opacity:[Number,String],reverse:Boolean,stream:Boolean,striped:Boolean,roundedBar:Boolean,...qN(),...Ge(),...Xo({location:"top"}),...Un(),...pt(),...Nt()},"VProgressLinear"),uu=xe()({name:"VProgressLinear",props:KN(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=K(),s=lt(e,"modelValue"),{isRtl:i,rtlClasses:o}=Hr(),{themeClasses:a}=tn(e),{locationStyles:l}=al(e),{textColorClasses:u,textColorStyles:c}=Fs(()=>e.color),{backgroundColorClasses:d,backgroundColorStyles:f}=vr(()=>e.bgColor||e.color),{backgroundColorClasses:h,backgroundColorStyles:g}=vr(()=>e.bufferColor||e.bgColor||e.color),{backgroundColorClasses:m,backgroundColorStyles:y}=vr(()=>e.color),{roundedClasses:w}=Qn(e),{intersectionRef:b,isIntersecting:x}=VP(),_=M(()=>parseFloat(e.max)),S=M(()=>parseFloat(e.height)),P=M(()=>Nn(parseFloat(e.bufferValue)/_.value*100,0,100)),A=M(()=>Nn(parseFloat(s.value)/_.value*100,0,100)),E=M(()=>i.value!==e.reverse),T=M(()=>e.indeterminate?"fade-transition":"slide-x-transition"),R=Pe(0),{hasChunks:I,chunksMaskStyles:O,snapValueToChunk:H}=GN(e,R);Lr(I,()=>{const{resizeRef:U}=Uo(Q=>R.value=Q[0].contentRect.width);Cn(()=>U.value=r.value)});const N=M(()=>I.value?H(P.value):P.value),D=M(()=>I.value?H(A.value):A.value);function W(U){if(!b.value)return;const{left:Q,right:V,width:L}=b.value.getBoundingClientRect(),oe=E.value?L-U.clientX+(V-L):U.clientX-Q;s.value=Math.round(oe/L*_.value)}return Cn(()=>{b.value=r.value}),Me(()=>p(e.tag,{ref:r,class:Re(["v-progress-linear",{"v-progress-linear--absolute":e.absolute,"v-progress-linear--active":e.active&&x.value,"v-progress-linear--reverse":E.value,"v-progress-linear--rounded":e.rounded,"v-progress-linear--rounded-bar":e.roundedBar,"v-progress-linear--striped":e.striped,"v-progress-linear--clickable":e.clickable},w.value,a.value,o.value,e.class]),style:Be([{bottom:e.location==="bottom"?0:void 0,top:e.location==="top"?0:void 0,height:e.active?Ne(S.value):0,"--v-progress-linear-height":Ne(S.value),...e.absolute?l.value:{}},O.value,e.style]),role:"progressbar","aria-hidden":e.active?"false":"true","aria-valuemin":"0","aria-valuemax":e.max,"aria-valuenow":e.indeterminate?void 0:Math.min(parseFloat(s.value),_.value),onClick:e.clickable&&W},{default:()=>[e.stream&&C("div",{key:"stream",class:Re(["v-progress-linear__stream",u.value]),style:{...c.value,[E.value?"left":"right"]:Ne(-S.value),borderTop:`${Ne(S.value/2)} dotted`,opacity:parseFloat(e.bufferOpacity),top:`calc(50% - ${Ne(S.value/4)})`,width:Ne(100-P.value,"%"),"--v-progress-linear-stream-to":Ne(S.value*(E.value?1:-1))}},null),C("div",{class:Re(["v-progress-linear__background",d.value]),style:Be([f.value,{opacity:parseFloat(e.bgOpacity),width:e.stream?0:void 0}])},null),C("div",{class:Re(["v-progress-linear__buffer",h.value]),style:Be([g.value,{opacity:parseFloat(e.bufferOpacity),width:Ne(N.value,"%")}])},null),p(Bo,{name:T.value},{default:()=>[e.indeterminate?C("div",{class:"v-progress-linear__indeterminate"},[["long","short"].map(U=>C("div",{key:U,class:Re(["v-progress-linear__indeterminate",U,m.value]),style:Be(y.value)},null))]):C("div",{class:Re(["v-progress-linear__determinate",m.value]),style:Be([y.value,{width:Ne(D.value,"%")}])},null)]}),n.default&&C("div",{class:"v-progress-linear__content"},[n.default({value:A.value,buffer:P.value})])]})),{}}}),dm=he({loading:[Boolean,String]},"loader");function Wd(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:gi();return{loaderClasses:ie(()=>({[`${t}--loading`]:e.loading}))}}function fm(e,t){var r;let{slots:n}=t;return C("div",{class:Re(`${e.name}__loader`)},[((r=n.default)==null?void 0:r.call(n,{color:e.color,isActive:e.active}))||p(uu,{absolute:e.absolute,active:e.active,color:e.color,height:"2",indeterminate:!0},null)])}const YN=["static","relative","fixed","absolute","sticky"],Du=he({position:{type:String,validator:e=>YN.includes(e)}},"position");function Lu(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:gi();return{positionClasses:ie(()=>e.position?`${t}--${e.position}`:void 0)}}function XN(){const e=fn("useRoute");return M(()=>{var t;return(t=e==null?void 0:e.proxy)==null?void 0:t.$route})}function jP(){var e,t;return(t=(e=fn("useRouter"))==null?void 0:e.proxy)==null?void 0:t.$router}function hm(e,t){var d,f;const n=qL("RouterLink"),r=ie(()=>!!(e.href||e.to)),s=M(()=>(r==null?void 0:r.value)||fS(t,"click")||fS(e,"click"));if(typeof n=="string"||!("useLink"in n)){const h=ie(()=>e.href);return{isLink:r,isRouterLink:ie(()=>!1),isClickable:s,href:h,linkProps:mn({href:h})}}const i=n.useLink({to:ie(()=>e.to||""),replace:ie(()=>e.replace)}),o=M(()=>e.to?i:void 0),a=XN(),l=M(()=>{var h,g,m;return o.value?e.exact?a.value?((m=o.value.isExactActive)==null?void 0:m.value)&&Dr(o.value.route.value.query,a.value.query):((g=o.value.isExactActive)==null?void 0:g.value)??!1:((h=o.value.isActive)==null?void 0:h.value)??!1:!1}),u=M(()=>{var h;return e.to?(h=o.value)==null?void 0:h.route.value.href:e.href}),c=ie(()=>!!e.to);return{isLink:r,isRouterLink:c,isClickable:s,isActive:l,route:(d=o.value)==null?void 0:d.route,navigate:(f=o.value)==null?void 0:f.navigate,href:u,linkProps:mn({href:u,"aria-current":ie(()=>l.value?"page":void 0),"aria-disabled":ie(()=>e.disabled&&r.value?"true":void 0),tabindex:ie(()=>e.disabled&&r.value?"-1":void 0)})}}const pm=he({href:String,replace:Boolean,to:[String,Object],exact:Boolean},"router");let Eg=!1;function QN(e,t){let n=!1,r,s;Ot&&(e!=null&&e.beforeEach)&&(Pt(()=>{window.addEventListener("popstate",i),r=e.beforeEach((o,a,l)=>{Eg?n?t(l):l():setTimeout(()=>n?t(l):l()),Eg=!0}),s=e==null?void 0:e.afterEach(()=>{Eg=!1})}),dn(()=>{window.removeEventListener("popstate",i),r==null||r(),s==null||s()}));function i(o){var a;(a=o.state)!=null&&a.replaced||(n=!0,setTimeout(()=>n=!1))}}function JN(e,t){Ee(()=>{var n;return(n=e.isActive)==null?void 0:n.value},n=>{e.isLink.value&&n!=null&&t&&Pt(()=>{t(n)})},{immediate:!0})}const sy=Symbol("rippleStop"),ZN=80;function FS(e,t){e.style.transform=t,e.style.webkitTransform=t}function iy(e){return e.constructor.name==="TouchEvent"}function WP(e){return e.constructor.name==="KeyboardEvent"}const eB=function(e,t){var d;let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=0,s=0;if(!WP(e)){const f=t.getBoundingClientRect(),h=iy(e)?e.touches[e.touches.length-1]:e;r=h.clientX-f.left,s=h.clientY-f.top}let i=0,o=.3;(d=t._ripple)!=null&&d.circle?(o=.15,i=t.clientWidth/2,i=n.center?i:i+Math.sqrt((r-i)**2+(s-i)**2)/4):i=Math.sqrt(t.clientWidth**2+t.clientHeight**2)/2;const a=`${(t.clientWidth-i*2)/2}px`,l=`${(t.clientHeight-i*2)/2}px`,u=n.center?a:`${r-i}px`,c=n.center?l:`${s-i}px`;return{radius:i,scale:o,x:u,y:c,centerX:a,centerY:l}},op={show(e,t){var h;let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!((h=t==null?void 0:t._ripple)!=null&&h.enabled))return;const r=document.createElement("span"),s=document.createElement("span");r.appendChild(s),r.className="v-ripple__container",n.class&&(r.className+=` ${n.class}`);const{radius:i,scale:o,x:a,y:l,centerX:u,centerY:c}=eB(e,t,n),d=`${i*2}px`;s.className="v-ripple__animation",s.style.width=d,s.style.height=d,t.appendChild(r);const f=window.getComputedStyle(t);f&&f.position==="static"&&(t.style.position="relative",t.dataset.previousPosition="static"),s.classList.add("v-ripple__animation--enter"),s.classList.add("v-ripple__animation--visible"),FS(s,`translate(${a}, ${l}) scale3d(${o},${o},${o})`),s.dataset.activated=String(performance.now()),requestAnimationFrame(()=>{requestAnimationFrame(()=>{s.classList.remove("v-ripple__animation--enter"),s.classList.add("v-ripple__animation--in"),FS(s,`translate(${u}, ${c}) scale3d(1,1,1)`)})})},hide(e){var i;if(!((i=e==null?void 0:e._ripple)!=null&&i.enabled))return;const t=e.getElementsByClassName("v-ripple__animation");if(t.length===0)return;const n=Array.from(t).findLast(o=>!o.dataset.isHiding);if(n)n.dataset.isHiding="true";else return;const r=performance.now()-Number(n.dataset.activated),s=Math.max(250-r,0);setTimeout(()=>{n.classList.remove("v-ripple__animation--in"),n.classList.add("v-ripple__animation--out"),setTimeout(()=>{var a;e.getElementsByClassName("v-ripple__animation").length===1&&e.dataset.previousPosition&&(e.style.position=e.dataset.previousPosition,delete e.dataset.previousPosition),((a=n.parentNode)==null?void 0:a.parentNode)===e&&e.removeChild(n.parentNode)},300)},s)}};function qP(e){return typeof e>"u"||!!e}function sd(e){const t={},n=e.currentTarget;if(!(!(n!=null&&n._ripple)||n._ripple.touched||e[sy])){if(e[sy]=!0,iy(e))n._ripple.touched=!0,n._ripple.isTouch=!0;else if(n._ripple.isTouch)return;if(t.center=n._ripple.centered||WP(e),n._ripple.class&&(t.class=n._ripple.class),iy(e)){if(n._ripple.showTimerCommit)return;n._ripple.showTimerCommit=()=>{op.show(e,n,t)},n._ripple.showTimer=window.setTimeout(()=>{var r;(r=n==null?void 0:n._ripple)!=null&&r.showTimerCommit&&(n._ripple.showTimerCommit(),n._ripple.showTimerCommit=null)},ZN)}else op.show(e,n,t)}}function NS(e){e[sy]=!0}function Kr(e){const t=e.currentTarget;if(t!=null&&t._ripple){if(window.clearTimeout(t._ripple.showTimer),e.type==="touchend"&&t._ripple.showTimerCommit){t._ripple.showTimerCommit(),t._ripple.showTimerCommit=null,t._ripple.showTimer=window.setTimeout(()=>{Kr(e)});return}window.setTimeout(()=>{t._ripple&&(t._ripple.touched=!1)}),op.hide(t)}}function GP(e){const t=e.currentTarget;t!=null&&t._ripple&&(t._ripple.showTimerCommit&&(t._ripple.showTimerCommit=null),window.clearTimeout(t._ripple.showTimer))}let id=!1;function BS(e,t){!id&&t.includes(e.key)&&(id=!0,sd(e))}function KP(e){id=!1,Kr(e)}function YP(e){id&&(id=!1,Kr(e))}function XP(e,t,n){const{value:r,modifiers:s}=t,i=qP(r);i||op.hide(e),e._ripple=e._ripple??{},e._ripple.enabled=i,e._ripple.centered=s.center,e._ripple.circle=s.circle;const o=Zh(r)?r:{};o.class&&(e._ripple.class=o.class);const a=o.keys??["Enter","Space"];if(e._ripple.keyDownHandler=l=>BS(l,a),i&&!n){if(s.stop){e.addEventListener("touchstart",NS,{passive:!0}),e.addEventListener("mousedown",NS);return}e.addEventListener("touchstart",sd,{passive:!0}),e.addEventListener("touchend",Kr,{passive:!0}),e.addEventListener("touchmove",GP,{passive:!0}),e.addEventListener("touchcancel",Kr),e.addEventListener("mousedown",sd),e.addEventListener("mouseup",Kr),e.addEventListener("mouseleave",Kr),e.addEventListener("keydown",l=>BS(l,a)),e.addEventListener("keyup",KP),e.addEventListener("blur",YP),e.addEventListener("dragstart",Kr,{passive:!0})}else!i&&n&&QP(e)}function QP(e){var t;e.removeEventListener("mousedown",sd),e.removeEventListener("touchstart",sd),e.removeEventListener("touchend",Kr),e.removeEventListener("touchmove",GP),e.removeEventListener("touchcancel",Kr),e.removeEventListener("mouseup",Kr),e.removeEventListener("mouseleave",Kr),(t=e._ripple)!=null&&t.keyDownHandler&&e.removeEventListener("keydown",e._ripple.keyDownHandler),e.removeEventListener("keyup",KP),e.removeEventListener("dragstart",Kr),e.removeEventListener("blur",YP)}function tB(e,t){XP(e,t,!1)}function nB(e){QP(e),delete e._ripple}function rB(e,t){if(t.value===t.oldValue)return;const n=qP(t.oldValue);XP(e,t,n)}const Ns={mounted:tB,unmounted:nB,updated:rB},JP=he({active:{type:Boolean,default:void 0},activeColor:String,baseColor:String,symbol:{type:null,default:$P},flat:Boolean,icon:[Boolean,String,Function,Object],prependIcon:He,appendIcon:He,block:Boolean,readonly:Boolean,slim:Boolean,stacked:Boolean,spaced:String,ripple:{type:[Boolean,Object],default:!0},text:{type:[String,Number,Boolean],default:void 0},..._s(),...Ge(),...Xn(),...Sr(),...xs(),...Hd(),...dm(),...Xo(),...Du(),...Un(),...pm(),...Mu(),...pt({tag:"button"}),...Nt(),...zs({variant:"elevated"})},"VBtn"),ne=xe()({name:"VBtn",props:JP(),emits:{"group:selected":e=>!0},setup(e,t){let{attrs:n,slots:r}=t;const{themeClasses:s}=tn(e),{borderClasses:i}=Vs(e),{densityClasses:o}=ks(e),{dimensionStyles:a}=_r(e),{elevationClasses:l}=Us(e),{loaderClasses:u}=Wd(e),{locationStyles:c}=al(e),{positionClasses:d}=Lu(e),{roundedClasses:f}=Qn(e),{sizeClasses:h,sizeStyles:g}=jd(e),m=lu(e,e.symbol,!1),y=hm(e,n),w=M(()=>{var I;return e.active!==void 0?e.active:y.isRouterLink.value?(I=y.isActive)==null?void 0:I.value:m==null?void 0:m.isSelected.value}),b=ie(()=>w.value?e.activeColor??e.color:e.color),x=M(()=>{var O,H;return{color:(m==null?void 0:m.isSelected.value)&&(!y.isLink.value||((O=y.isActive)==null?void 0:O.value))||!m||((H=y.isActive)==null?void 0:H.value)?b.value??e.baseColor:e.baseColor,variant:e.variant}}),{colorClasses:_,colorStyles:S,variantClasses:P}=ol(x),A=M(()=>(m==null?void 0:m.disabled.value)||e.disabled),E=ie(()=>e.variant==="elevated"&&!(e.disabled||e.flat||e.border)),T=M(()=>{if(!(e.value===void 0||typeof e.value=="symbol"))return Object(e.value)===e.value?JSON.stringify(e.value,null,0):e.value});function R(I){var O;A.value||y.isLink.value&&(I.metaKey||I.ctrlKey||I.shiftKey||I.button!==0||n.target==="_blank")||(y.isRouterLink.value?(O=y.navigate)==null||O.call(y,I):m==null||m.toggle())}return JN(y,m==null?void 0:m.select),Me(()=>{const I=y.isLink.value?"a":e.tag,O=!!(e.prependIcon||r.prepend),H=!!(e.appendIcon||r.append),N=!!(e.icon&&e.icon!==!0);return zt(p(I,me(y.linkProps,{type:I==="a"?void 0:"button",class:["v-btn",m==null?void 0:m.selectedClass.value,{"v-btn--active":w.value,"v-btn--block":e.block,"v-btn--disabled":A.value,"v-btn--elevated":E.value,"v-btn--flat":e.flat,"v-btn--icon":!!e.icon,"v-btn--loading":e.loading,"v-btn--readonly":e.readonly,"v-btn--slim":e.slim,"v-btn--stacked":e.stacked},e.spaced?["v-btn--spaced",`v-btn--spaced-${e.spaced}`]:[],s.value,i.value,_.value,o.value,l.value,u.value,d.value,f.value,h.value,P.value,e.class],style:[S.value,a.value,c.value,g.value,e.style],"aria-busy":e.loading?!0:void 0,disabled:A.value&&I!=="a"||void 0,tabindex:e.loading||e.readonly?-1:void 0,onClick:R,value:T.value}),{default:()=>{var D;return[Yo(!0,"v-btn"),!e.icon&&O&&C("span",{key:"prepend",class:"v-btn__prepend"},[r.prepend?p($t,{key:"prepend-defaults",disabled:!e.prependIcon,defaults:{VIcon:{icon:e.prependIcon}}},r.prepend):p(Z,{key:"prepend-icon",icon:e.prependIcon},null)]),C("span",{class:"v-btn__content","data-no-activator":""},[!r.default&&N?p(Z,{key:"content-icon",icon:e.icon},null):p($t,{key:"content-defaults",disabled:!N,defaults:{VIcon:{icon:e.icon}}},{default:()=>{var W;return[((W=r.default)==null?void 0:W.call(r))??se(e.text)]}})]),!e.icon&&H&&C("span",{key:"append",class:"v-btn__append"},[r.append?p($t,{key:"append-defaults",disabled:!e.appendIcon,defaults:{VIcon:{icon:e.appendIcon}}},r.append):p(Z,{key:"append-icon",icon:e.appendIcon},null)]),!!e.loading&&C("span",{key:"loader",class:"v-btn__loader"},[((D=r.loader)==null?void 0:D.call(r))??p(ai,{color:typeof e.loading=="boolean"?void 0:e.loading,indeterminate:!0,width:"2"},null)])]}}),[[Ns,!A.value&&e.ripple,"",{center:!!e.icon}]])}),{group:m}}}),sB=he({disabled:Boolean,group:Boolean,hideOnLeave:Boolean,leaveAbsolute:Boolean,mode:String,origin:String},"transition");function Jr(e,t,n){return xe()({name:e,props:sB({mode:n,origin:t}),setup(r,s){let{slots:i}=s;const o={onBeforeEnter(a){r.origin&&(a.style.transformOrigin=r.origin)},onLeave(a){if(r.leaveAbsolute){const{offsetTop:l,offsetLeft:u,offsetWidth:c,offsetHeight:d}=a;a._transitionInitialStyles={position:a.style.position,top:a.style.top,left:a.style.left,width:a.style.width,height:a.style.height},a.style.position="absolute",a.style.top=`${l}px`,a.style.left=`${u}px`,a.style.width=`${c}px`,a.style.height=`${d}px`}r.hideOnLeave&&a.style.setProperty("display","none","important")},onAfterLeave(a){if(r.leaveAbsolute&&(a!=null&&a._transitionInitialStyles)){const{position:l,top:u,left:c,width:d,height:f}=a._transitionInitialStyles;delete a._transitionInitialStyles,a.style.position=l||"",a.style.top=u||"",a.style.left=c||"",a.style.width=d||"",a.style.height=f||""}}};return()=>{const a=r.group?n1:Bo;return br(a,{name:r.disabled?"":e,css:!r.disabled,...r.group?void 0:{mode:r.mode},...r.disabled?{}:o},i.default)}}})}function ZP(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"in-out";return xe()({name:e,props:{mode:{type:String,default:n},disabled:{type:Boolean,default:Ka()},group:Boolean},setup(r,s){let{slots:i}=s;const o=r.group?n1:Bo;return()=>br(o,{name:r.disabled?"":e,css:!r.disabled,...r.disabled?{}:t},i.default)}})}function eR(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";const n=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1)?"width":"height",r=yr(`offset-${n}`);return{onBeforeEnter(o){o._parent=o.parentNode,o._initialStyle={transition:o.style.transition,overflow:o.style.overflow,[n]:o.style[n]}},onEnter(o){const a=o._initialStyle;if(!a)return;o.style.setProperty("transition","none","important"),o.style.overflow="hidden";const l=`${o[r]}px`;o.style[n]="0",o.offsetHeight,o.style.transition=a.transition,e&&o._parent&&o._parent.classList.add(e),requestAnimationFrame(()=>{o.style[n]=l})},onAfterEnter:i,onEnterCancelled:i,onLeave(o){o._initialStyle={transition:"",overflow:o.style.overflow,[n]:o.style[n]},o.style.overflow="hidden",o.style[n]=`${o[r]}px`,o.offsetHeight,requestAnimationFrame(()=>o.style[n]="0")},onAfterLeave:s,onLeaveCancelled:s};function s(o){e&&o._parent&&o._parent.classList.remove(e),i(o)}function i(o){if(!o._initialStyle)return;const a=o._initialStyle[n];o.style.overflow=o._initialStyle.overflow,a!=null&&(o.style[n]=a),delete o._initialStyle}}const iB=he({target:[Object,Array]},"v-dialog-transition"),Cg=new WeakMap,p1=xe()({name:"VDialogTransition",props:iB(),setup(e,t){let{slots:n}=t;const r={onBeforeEnter(s){s.style.pointerEvents="none",s.style.visibility="hidden"},async onEnter(s,i){var f;await new Promise(h=>requestAnimationFrame(h)),await new Promise(h=>requestAnimationFrame(h)),s.style.visibility="";const o=US(e.target,s),{x:a,y:l,sx:u,sy:c,speed:d}=o;if(Cg.set(s,o),Ka())mo(s,[{opacity:0},{}],{duration:125*d,easing:TS}).finished.then(()=>i());else{const h=mo(s,[{transform:`translate(${a}px, ${l}px) scale(${u}, ${c})`,opacity:0},{}],{duration:225*d,easing:TS});(f=VS(s))==null||f.forEach(g=>{mo(g,[{opacity:0},{opacity:0,offset:.33},{}],{duration:225*2*d,easing:rp})}),h.finished.then(()=>i())}},onAfterEnter(s){s.style.removeProperty("pointer-events")},onBeforeLeave(s){s.style.pointerEvents="none"},async onLeave(s,i){var f;await new Promise(h=>requestAnimationFrame(h));let o;!Cg.has(s)||Array.isArray(e.target)||e.target.offsetParent||e.target.getClientRects().length?o=US(e.target,s):o=Cg.get(s);const{x:a,y:l,sx:u,sy:c,speed:d}=o;Ka()?mo(s,[{},{opacity:0}],{duration:85*d,easing:PS}).finished.then(()=>i()):(mo(s,[{},{transform:`translate(${a}px, ${l}px) scale(${u}, ${c})`,opacity:0}],{duration:125*d,easing:PS}).finished.then(()=>i()),(f=VS(s))==null||f.forEach(g=>{mo(g,[{},{opacity:0,offset:.2},{opacity:0}],{duration:125*2*d,easing:rp})}))},onAfterLeave(s){s.style.removeProperty("pointer-events")}};return()=>e.target?p(Bo,me({name:"dialog-transition"},r,{css:!1}),n):p(Bo,{name:"dialog-transition"},n)}});function VS(e){var n;const t=(n=e.querySelector(":scope > .v-card, :scope > .v-sheet, :scope > .v-list"))==null?void 0:n.children;return t&&[...t]}function US(e,t){const n=xP(e),r=l1(t),[s,i]=getComputedStyle(t).transformOrigin.split(" ").map(w=>parseFloat(w)),[o,a]=getComputedStyle(t).getPropertyValue("--v-overlay-anchor-origin").split(" ");let l=n.left+n.width/2;o==="left"||a==="left"?l-=n.width/2:(o==="right"||a==="right")&&(l+=n.width/2);let u=n.top+n.height/2;o==="top"||a==="top"?u-=n.height/2:(o==="bottom"||a==="bottom")&&(u+=n.height/2);const c=n.width/r.width,d=n.height/r.height,f=Math.max(1,c,d),h=c/f||0,g=d/f||0,m=r.width*r.height/(window.innerWidth*window.innerHeight),y=m>.12?Math.min(1.5,(m-.12)*10+1):1;return{x:l-(s+r.left),y:u-(i+r.top),sx:h,sy:g,speed:y}}Jr("fab-transition","center center","out-in");Jr("dialog-bottom-transition");Jr("dialog-top-transition");const zS=Jr("fade-transition"),oB=Jr("scale-transition");Jr("scroll-x-transition");Jr("scroll-x-reverse-transition");const aB=Jr("scroll-y-transition");Jr("scroll-y-reverse-transition");Jr("slide-x-transition");Jr("slide-x-reverse-transition");const tR=Jr("slide-y-transition");Jr("slide-y-reverse-transition");const nR=ZP("expand-transition",eR()),rR=ZP("expand-x-transition",eR("",!0));function Tg(e,t){return{x:e.x+t.x,y:e.y+t.y}}function lB(e,t){return{x:e.x-t.x,y:e.y-t.y}}function HS(e,t){if(e.side==="top"||e.side==="bottom"){const{side:n,align:r}=e,s=r==="left"?0:r==="center"?t.width/2:r==="right"?t.width:r,i=n==="top"?0:n==="bottom"?t.height:n;return Tg({x:s,y:i},t)}else if(e.side==="left"||e.side==="right"){const{side:n,align:r}=e,s=n==="left"?0:n==="right"?t.width:n,i=r==="top"?0:r==="center"?t.height/2:r==="bottom"?t.height:r;return Tg({x:s,y:i},t)}return Tg({x:t.width/2,y:t.height/2},t)}const sR={static:dB,connected:hB},uB=he({locationStrategy:{type:[String,Function],default:"static",validator:e=>typeof e=="function"||e in sR},location:{type:String,default:"bottom"},origin:{type:String,default:"auto"},offset:[Number,String,Array],stickToTarget:Boolean},"VOverlay-location-strategies");function cB(e,t){const n=K({}),r=K();Ot&&Lr(()=>!!(t.isActive.value&&e.locationStrategy),a=>{var l,u;Ee(()=>e.locationStrategy,a),dn(()=>{window.removeEventListener("resize",s),visualViewport==null||visualViewport.removeEventListener("resize",i),visualViewport==null||visualViewport.removeEventListener("scroll",o),r.value=void 0}),window.addEventListener("resize",s,{passive:!0}),visualViewport==null||visualViewport.addEventListener("resize",i,{passive:!0}),visualViewport==null||visualViewport.addEventListener("scroll",o,{passive:!0}),typeof e.locationStrategy=="function"?r.value=(l=e.locationStrategy(t,e,n))==null?void 0:l.updateLocation:r.value=(u=sR[e.locationStrategy](t,e,n))==null?void 0:u.updateLocation});function s(a){var l;(l=r.value)==null||l.call(r,a)}function i(a){var l;(l=r.value)==null||l.call(r,a)}function o(a){var l;(l=r.value)==null||l.call(r,a)}return{contentStyles:n,updateLocation:r}}function dB(){}function fB(e,t){const n=l1(e);return t?n.x+=parseFloat(e.style.right||0):n.x-=parseFloat(e.style.left||0),n.y-=parseFloat(e.style.top||0),n}function hB(e,t,n){(Array.isArray(e.target.value)||mN(e.target.value))&&Object.assign(n.value,{position:"fixed",top:0,[e.isRtl.value?"right":"left"]:0});const{preferredAnchor:s,preferredOrigin:i}=a1(()=>{const w=ey(t.location,e.isRtl.value),b=t.origin==="overlap"?w:t.origin==="auto"?_g(w):ey(t.origin,e.isRtl.value);return w.side===b.side&&w.align===kg(b).align?{preferredAnchor:pS(w),preferredOrigin:pS(b)}:{preferredAnchor:w,preferredOrigin:b}}),[o,a,l,u]=["minWidth","minHeight","maxWidth","maxHeight"].map(w=>M(()=>{const b=parseFloat(t[w]);return isNaN(b)?1/0:b})),c=M(()=>{if(Array.isArray(t.offset))return t.offset;if(typeof t.offset=="string"){const w=t.offset.split(" ").map(parseFloat);return w.length<2&&w.push(0),w}return typeof t.offset=="number"?[t.offset,0]:[0,0]});let d=!1,f=-1;const h=new bP(4),g=new ResizeObserver(()=>{if(!d)return;if(requestAnimationFrame(b=>{b!==f&&h.clear(),requestAnimationFrame(x=>{f=x})}),h.isFull){const b=h.values();if(Dr(b.at(-1),b.at(-3))&&!Dr(b.at(-1),b.at(-2)))return}const w=y();w&&h.push(w.flipped)});let m=new us({x:0,y:0,width:0,height:0});Ee(e.target,(w,b)=>{b&&!Array.isArray(b)&&g.unobserve(b),Array.isArray(w)?Dr(w,b)||y():w&&g.observe(w)},{immediate:!0}),Ee(e.contentEl,(w,b)=>{b&&g.unobserve(b),w&&g.observe(w)},{immediate:!0}),dn(()=>{g.disconnect()});function y(){if(d=!1,requestAnimationFrame(()=>d=!0),!e.target.value||!e.contentEl.value)return;(Array.isArray(e.target.value)||e.target.value.offsetParent||e.target.value.getClientRects().length)&&(m=xP(e.target.value));const w=fB(e.contentEl.value,e.isRtl.value),b=sp(e.contentEl.value),x=12;b.length||(b.push(document.documentElement),e.contentEl.value.style.top&&e.contentEl.value.style.left||(w.x-=parseFloat(document.documentElement.style.getPropertyValue("--v-body-scroll-x")||0),w.y-=parseFloat(document.documentElement.style.getPropertyValue("--v-body-scroll-y")||0)));const _=b.reduce((H,N)=>{const D=NF(N);return H?new us({x:Math.max(H.left,D.left),y:Math.max(H.top,D.top),width:Math.min(H.right,D.right)-Math.max(H.left,D.left),height:Math.min(H.bottom,D.bottom)-Math.max(H.top,D.top)}):D},void 0);_.x+=x,_.y+=x,_.width-=x*2,_.height-=x*2;let S={anchor:s.value,origin:i.value};function P(H){const N=new us(w),D=HS(H.anchor,m),W=HS(H.origin,N);let{x:U,y:Q}=lB(D,W);switch(H.anchor.side){case"top":Q-=c.value[0];break;case"bottom":Q+=c.value[0];break;case"left":U-=c.value[0];break;case"right":U+=c.value[0];break}switch(H.anchor.align){case"top":Q-=c.value[1];break;case"bottom":Q+=c.value[1];break;case"left":U-=c.value[1];break;case"right":U+=c.value[1];break}return N.x+=U,N.y+=Q,N.width=Math.min(N.width,l.value),N.height=Math.min(N.height,u.value),{overflows:gS(N,_),x:U,y:Q}}let A=0,E=0;const T={x:0,y:0},R={x:!1,y:!1};let I=-1;for(;!(I++>10);){const{x:H,y:N,overflows:D}=P(S);A+=H,E+=N,w.x+=H,w.y+=N;{const W=mS(S.anchor),U=D.x.before||D.x.after,Q=D.y.before||D.y.after;let V=!1;if(["x","y"].forEach(L=>{if(L==="x"&&U&&!R.x||L==="y"&&Q&&!R.y){const oe={anchor:{...S.anchor},origin:{...S.origin}},j=L==="x"?W==="y"?kg:_g:W==="y"?_g:kg;oe.anchor=j(oe.anchor),oe.origin=j(oe.origin);const{overflows:F}=P(oe);(F[L].before<=D[L].before&&F[L].after<=D[L].after||F[L].before+F[L].after<(D[L].before+D[L].after)/2)&&(S=oe,V=R[L]=!0)}}),V)continue}D.x.before&&(t.stickToTarget||(A+=D.x.before),w.x+=D.x.before),D.x.after&&(t.stickToTarget||(A-=D.x.after),w.x-=D.x.after),D.y.before&&(t.stickToTarget||(E+=D.y.before),w.y+=D.y.before),D.y.after&&(t.stickToTarget||(E-=D.y.after),w.y-=D.y.after);{const W=gS(w,_);T.x=_.width-W.x.before-W.x.after,T.y=_.height-W.y.before-W.y.after,t.stickToTarget||(A+=W.x.before),w.x+=W.x.before,t.stickToTarget||(E+=W.y.before),w.y+=W.y.before}break}const O=mS(S.anchor);return Object.assign(n.value,{"--v-overlay-anchor-origin":`${S.anchor.side} ${S.anchor.align}`,transformOrigin:`${S.origin.side} ${S.origin.align}`,top:Ne(Pg(E)),left:e.isRtl.value?void 0:Ne(Pg(A)),right:e.isRtl.value?Ne(Pg(-A)):void 0,minWidth:Ne(O==="y"?Math.min(o.value,m.width):o.value),maxWidth:Ne(jS(Nn(T.x,o.value===1/0?0:o.value,l.value))),maxHeight:Ne(jS(Nn(T.y,a.value===1/0?0:a.value,u.value)))}),{available:T,contentBox:w,flipped:R}}return Ee(()=>[s.value,i.value,t.offset,t.minWidth,t.minHeight,t.maxWidth,t.maxHeight],()=>y()),Pt(()=>{const w=y();if(!w)return;const{available:b,contentBox:x}=w;x.height>b.y&&requestAnimationFrame(()=>{y(),requestAnimationFrame(()=>{y()})})}),{updateLocation:y}}function Pg(e){return Math.round(e*devicePixelRatio)/devicePixelRatio}function jS(e){return Math.ceil(e*devicePixelRatio)/devicePixelRatio}let oy=!0;const ap=[];function pB(e){!oy||ap.length?(ap.push(e),ay()):(oy=!1,e(),ay())}let WS=-1;function ay(){cancelAnimationFrame(WS),WS=requestAnimationFrame(()=>{const e=ap.shift();e&&e(),ap.length?ay():oy=!0})}const hh={none:null,close:vB,block:yB,reposition:bB},mB=he({scrollStrategy:{type:[String,Function],default:"block",validator:e=>typeof e=="function"||e in hh}},"VOverlay-scroll-strategies");function gB(e,t){if(!Ot)return;let n;Cn(async()=>{n==null||n.stop(),t.isActive.value&&e.scrollStrategy&&(n=qa(),await new Promise(r=>setTimeout(r)),n.active&&n.run(()=>{var r;typeof e.scrollStrategy=="function"?e.scrollStrategy(t,e,n):(r=hh[e.scrollStrategy])==null||r.call(hh,t,e,n)}))}),dn(()=>{n==null||n.stop()})}function vB(e){function t(n){e.isActive.value=!1}iR(m1(e.target.value,e.contentEl.value),t)}function yB(e,t){var a;const n=(a=e.root.value)==null?void 0:a.offsetParent,r=m1(e.target.value,e.contentEl.value),s=[...new Set([...sp(r,t.contained?n:void 0),...sp(e.contentEl.value,t.contained?n:void 0)])].filter(l=>!l.classList.contains("v-overlay-scroll-blocked")),i=window.innerWidth-document.documentElement.offsetWidth,o=(l=>d1(l)&&l)(n||document.documentElement);o&&e.root.value.classList.add("v-overlay--scroll-blocked"),s.forEach((l,u)=>{l.style.setProperty("--v-body-scroll-x",Ne(-l.scrollLeft)),l.style.setProperty("--v-body-scroll-y",Ne(-l.scrollTop)),l!==document.documentElement&&l.style.setProperty("--v-scrollbar-offset",Ne(i)),l.classList.add("v-overlay-scroll-blocked")}),dn(()=>{s.forEach((l,u)=>{const c=parseFloat(l.style.getPropertyValue("--v-body-scroll-x")),d=parseFloat(l.style.getPropertyValue("--v-body-scroll-y")),f=l.style.scrollBehavior;l.style.scrollBehavior="auto",l.style.removeProperty("--v-body-scroll-x"),l.style.removeProperty("--v-body-scroll-y"),l.style.removeProperty("--v-scrollbar-offset"),l.classList.remove("v-overlay-scroll-blocked"),l.scrollLeft=-c,l.scrollTop=-d,l.style.scrollBehavior=f}),o&&e.root.value.classList.remove("v-overlay--scroll-blocked")})}function bB(e,t,n){let r=!1,s=-1,i=-1;function o(a){pB(()=>{var c,d;const l=performance.now();(d=(c=e.updateLocation).value)==null||d.call(c,a),r=(performance.now()-l)/(1e3/60)>2})}i=(typeof requestIdleCallback>"u"?a=>a():requestIdleCallback)(()=>{n.run(()=>{iR(m1(e.target.value,e.contentEl.value),a=>{r?(cancelAnimationFrame(s),s=requestAnimationFrame(()=>{s=requestAnimationFrame(()=>{o(a)})})):o(a)})})}),dn(()=>{typeof cancelIdleCallback<"u"&&cancelIdleCallback(i),cancelAnimationFrame(s)})}function m1(e,t){return Array.isArray(e)?document.elementsFromPoint(...e).find(n=>!(t!=null&&t.contains(n))):e??t}function iR(e,t){const n=[document,...sp(e)];n.forEach(r=>{r.addEventListener("scroll",t,{passive:!0})}),dn(()=>{n.forEach(r=>{r.removeEventListener("scroll",t)})})}const ly=Symbol.for("vuetify:v-menu"),g1=he({closeDelay:[Number,String],openDelay:[Number,String]},"delay");function v1(e,t){let n=()=>{};function r(o){n==null||n();const a=Number(o?e.openDelay:e.closeDelay);return new Promise(l=>{n=MF(a,()=>{t==null||t(o),l(o)})})}function s(){return r(!0)}function i(){return r(!1)}return{clearDelay:n,runOpenDelay:s,runCloseDelay:i}}const wB=he({target:[String,Object],activator:[String,Object],activatorProps:{type:Object,default:()=>({})},openOnClick:{type:Boolean,default:void 0},openOnHover:Boolean,openOnFocus:{type:Boolean,default:void 0},closeOnContentClick:Boolean,...g1()},"VOverlay-activator");function SB(e,t){let{isActive:n,isTop:r,contentEl:s}=t;const i=fn("useActivator"),o=K();let a=!1,l=!1,u=!0;const c=M(()=>e.openOnFocus||e.openOnFocus==null&&e.openOnHover),d=M(()=>e.openOnClick||e.openOnClick==null&&!e.openOnHover&&!c.value),{runOpenDelay:f,runCloseDelay:h}=v1(e,E=>{E===(e.openOnHover&&a||c.value&&l)&&!(e.openOnHover&&n.value&&!r.value)&&(n.value!==E&&(u=!0),n.value=E)}),g=K(),m={onClick:E=>{E.stopPropagation(),o.value=E.currentTarget||E.target,n.value||(g.value=[E.clientX,E.clientY]),n.value=!n.value},onMouseenter:E=>{var T;(T=E.sourceCapabilities)!=null&&T.firesTouchEvents||(a=!0,o.value=E.currentTarget||E.target,f())},onMouseleave:E=>{a=!1,h()},onFocus:E=>{tp(E.target,":focus-visible")!==!1&&(l=!0,E.stopPropagation(),o.value=E.currentTarget||E.target,f())},onBlur:E=>{l=!1,E.stopPropagation(),h()}},y=M(()=>{const E={};return d.value&&(E.onClick=m.onClick),e.openOnHover&&(E.onMouseenter=m.onMouseenter,E.onMouseleave=m.onMouseleave),c.value&&(E.onFocus=m.onFocus,E.onBlur=m.onBlur),E}),w=M(()=>{const E={};if(e.openOnHover&&(E.onMouseenter=()=>{a=!0,f()},E.onMouseleave=()=>{a=!1,h()}),c.value&&(E.onFocusin=()=>{l=!0,f()},E.onFocusout=()=>{l=!1,h()}),e.closeOnContentClick){const T=Je(ly,null);E.onClick=()=>{n.value=!1,T==null||T.closeParents()}}return E}),b=M(()=>{const E={};return e.openOnHover&&(E.onMouseenter=()=>{u&&(a=!0,u=!1,f())},E.onMouseleave=()=>{a=!1,h()}),E});Ee(r,E=>{var T;E&&(e.openOnHover&&!a&&(!c.value||!l)||c.value&&!l&&(!e.openOnHover||!a))&&!((T=s.value)!=null&&T.contains(document.activeElement))&&(n.value=!1)}),Ee(n,E=>{E||setTimeout(()=>{g.value=void 0})},{flush:"post"});const x=Jv();Cn(()=>{x.value&&Pt(()=>{o.value=x.el})});const _=Jv(),S=M(()=>e.target==="cursor"&&g.value?g.value:_.value?_.el:oR(e.target,i)||o.value),P=M(()=>Array.isArray(S.value)?void 0:S.value);let A;return Ee(()=>!!e.activator,E=>{E&&Ot?(A=qa(),A.run(()=>{_B(e,i,{activatorEl:o,activatorEvents:y})})):A&&A.stop()},{flush:"post",immediate:!0}),dn(()=>{A==null||A.stop()}),{activatorEl:o,activatorRef:x,target:S,targetEl:P,targetRef:_,activatorEvents:y,contentEvents:w,scrimEvents:b}}function _B(e,t,n){let{activatorEl:r,activatorEvents:s}=n;Ee(()=>e.activator,(l,u)=>{if(u&&l!==u){const c=a(u);c&&o(c)}l&&Pt(()=>i())},{immediate:!0}),Ee(()=>e.activatorProps,()=>{i()}),dn(()=>{o()});function i(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:a(),u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.activatorProps;l&&BF(l,me(s.value,u))}function o(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:a(),u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.activatorProps;l&&VF(l,me(s.value,u))}function a(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:e.activator;const u=oR(l,t);return r.value=(u==null?void 0:u.nodeType)===Node.ELEMENT_NODE?u:void 0,r.value}}function oR(e,t){var r,s;if(!e)return;let n;if(e==="parent"){let i=(s=(r=t==null?void 0:t.proxy)==null?void 0:r.$el)==null?void 0:s.parentNode;for(;i!=null&&i.hasAttribute("data-no-activator");)i=i.parentNode;n=i}else typeof e=="string"?n=document.querySelector(e):"$el"in e?n=e.$el:n=e;return n}const mm=["sm","md","lg","xl","xxl"],uy=Symbol.for("vuetify:display"),qS={mobileBreakpoint:"lg",thresholds:{xs:0,sm:600,md:960,lg:1280,xl:1920,xxl:2560}},kB=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:qS;return or(qS,e)};function GS(e){return Ot&&!e?window.innerWidth:typeof e=="object"&&e.clientWidth||0}function KS(e){return Ot&&!e?window.innerHeight:typeof e=="object"&&e.clientHeight||0}function YS(e){const t=Ot&&!e?window.navigator.userAgent:"ssr";function n(g){return!!t.match(g)}const r=n(/android/i),s=n(/iphone|ipad|ipod/i),i=n(/cordova/i),o=n(/electron/i),a=n(/chrome/i),l=n(/edge/i),u=n(/firefox/i),c=n(/opera/i),d=n(/win/i),f=n(/mac/i),h=n(/linux/i);return{android:r,ios:s,cordova:i,electron:o,chrome:a,edge:l,firefox:u,opera:c,win:d,mac:f,linux:h,touch:PF,ssr:t==="ssr"}}function xB(e,t){const{thresholds:n,mobileBreakpoint:r}=kB(e),s=Pe(KS(t)),i=Pe(YS(t)),o=mn({}),a=Pe(GS(t));function l(){s.value=KS(),a.value=GS()}function u(){l(),i.value=YS()}return Cn(()=>{const c=a.value<n.sm,d=a.value<n.md&&!c,f=a.value<n.lg&&!(d||c),h=a.value<n.xl&&!(f||d||c),g=a.value<n.xxl&&!(h||f||d||c),m=a.value>=n.xxl,y=c?"xs":d?"sm":f?"md":h?"lg":g?"xl":"xxl",w=typeof r=="number"?r:n[r],b=a.value<w;o.xs=c,o.sm=d,o.md=f,o.lg=h,o.xl=g,o.xxl=m,o.smAndUp=!c,o.mdAndUp=!(c||d),o.lgAndUp=!(c||d||f),o.xlAndUp=!(c||d||f||h),o.smAndDown=!(f||h||g||m),o.mdAndDown=!(h||g||m),o.lgAndDown=!(g||m),o.xlAndDown=!m,o.name=y,o.height=s.value,o.width=a.value,o.mobile=b,o.mobileBreakpoint=r,o.platform=i.value,o.thresholds=n}),Ot&&(window.addEventListener("resize",l,{passive:!0}),dn(()=>{window.removeEventListener("resize",l)},!0)),{...sl(o),update:u,ssr:!!t}}const ll=he({mobile:{type:Boolean,default:!1},mobileBreakpoint:[Number,String]},"display");function vi(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{mobile:null},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:gi();const n=Je(uy);if(!n)throw new Error("Could not find Vuetify display injection");const r=M(()=>e.mobile?!0:typeof e.mobileBreakpoint=="number"?n.width.value<e.mobileBreakpoint:e.mobileBreakpoint?n.width.value<n.thresholds.value[e.mobileBreakpoint]:e.mobile===null?n.mobile.value:!1),s=ie(()=>t?{[`${t}--mobile`]:r.value}:{});return{...n,displayClasses:s,mobile:r}}function EB(){if(!Ot)return Pe(!1);const{ssr:e}=vi();if(e){const t=Pe(!1);return yt(()=>{t.value=!0}),t}else return Pe(!0)}const aR=he({eager:Boolean},"lazy");function lR(e,t){const n=Pe(!1),r=ie(()=>n.value||e.eager||t.value);Ee(t,()=>n.value=!0);function s(){e.eager||(n.value=!1)}return{isBooted:n,hasContent:r,onAfterLeave:s}}function $u(){const t=fn("useScopeId").vnode.scopeId;return{scopeId:t?{[t]:""}:void 0}}const XS=Symbol.for("vuetify:stack"),lc=mn([]);function CB(e,t,n){const r=fn("useStack"),s=!n,i=Je(XS,void 0),o=mn({activeChildren:new Set});Jt(XS,o);const a=Pe(Number(un(t)));Lr(e,()=>{var d;const c=(d=lc.at(-1))==null?void 0:d[1];a.value=c?c+10:Number(un(t)),s&&lc.push([r.uid,a.value]),i==null||i.activeChildren.add(r.uid),dn(()=>{if(s){const f=Ue(lc).findIndex(h=>h[0]===r.uid);lc.splice(f,1)}i==null||i.activeChildren.delete(r.uid)})});const l=Pe(!0);s&&Cn(()=>{var d;const c=((d=lc.at(-1))==null?void 0:d[0])===r.uid;setTimeout(()=>l.value=c)});const u=ie(()=>!o.activeChildren.size);return{globalTop:Gi(l),localTop:u,stackStyles:ie(()=>({zIndex:a.value}))}}function TB(e){return{teleportTarget:M(()=>{const n=e();if(n===!0||!Ot)return;const r=n===!1?document.body:typeof n=="string"?document.querySelector(n):n;if(r==null)return;let s=[...r.children].find(i=>i.matches(".v-overlay-container"));return s||(s=document.createElement("div"),s.className="v-overlay-container",r.appendChild(s)),s})}}const Fu=he({transition:{type:null,default:"fade-transition",validator:e=>e!==!0}},"transition"),ui=(e,t)=>{let{slots:n}=t;const{transition:r,disabled:s,group:i,...o}=e,{component:a=i?n1:Bo,...l}=Zh(r)?r:{};let u;return Zh(r)?u=me(l,$F({disabled:s,group:i}),o):u=me({name:s||!r?"":r},o),br(a,u,n)};function PB(){return!0}function uR(e,t,n){if(!e||cR(e,n)===!1)return!1;const r=AP(t);if(typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&r.host===e.target)return!1;const s=(typeof n.value=="object"&&n.value.include||(()=>[]))();return s.push(t),!s.some(i=>i==null?void 0:i.contains(e.target))}function cR(e,t){return(typeof t.value=="object"&&t.value.closeConditional||PB)(e)}function RB(e,t,n){const r=typeof n.value=="function"?n.value:n.value.handler;e.shadowTarget=e.target,t._clickOutside.lastMousedownWasOutside&&uR(e,t,n)&&setTimeout(()=>{cR(e,n)&&r&&r(e)},0)}function QS(e,t){const n=AP(e);t(document),typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&t(n)}const JS={mounted(e,t){const n=s=>RB(s,e,t),r=s=>{e._clickOutside.lastMousedownWasOutside=uR(s,e,t)};QS(e,s=>{s.addEventListener("click",n,!0),s.addEventListener("mousedown",r,!0)}),e._clickOutside||(e._clickOutside={lastMousedownWasOutside:!1}),e._clickOutside[t.instance.$.uid]={onClick:n,onMousedown:r}},beforeUnmount(e,t){e._clickOutside&&(QS(e,n=>{var i;if(!n||!((i=e._clickOutside)!=null&&i[t.instance.$.uid]))return;const{onClick:r,onMousedown:s}=e._clickOutside[t.instance.$.uid];n.removeEventListener("click",r,!0),n.removeEventListener("mousedown",s,!0)}),delete e._clickOutside[t.instance.$.uid])}};function IB(e){const{modelValue:t,color:n,...r}=e;return p(Bo,{name:"fade-transition",appear:!0},{default:()=>[e.modelValue&&C("div",me({class:["v-overlay__scrim",e.color.backgroundColorClasses.value],style:e.color.backgroundColorStyles.value},r),null)]})}const qd=he({absolute:Boolean,attach:[Boolean,String,Object],closeOnBack:{type:Boolean,default:!0},contained:Boolean,contentClass:null,contentProps:null,disabled:Boolean,opacity:[Number,String],noClickAnimation:Boolean,modelValue:Boolean,persistent:Boolean,scrim:{type:[Boolean,String],default:!0},zIndex:{type:[Number,String],default:2e3},...wB(),...Ge(),...Sr(),...aR(),...uB(),...mB(),...Nt(),...Fu()},"VOverlay"),Yi=xe()({name:"VOverlay",directives:{vClickOutside:JS},inheritAttrs:!1,props:{_disableGlobalStack:Boolean,...qd()},emits:{"click:outside":e=>!0,"update:modelValue":e=>!0,keydown:e=>!0,afterEnter:()=>!0,afterLeave:()=>!0},setup(e,t){let{slots:n,attrs:r,emit:s}=t;const i=fn("VOverlay"),o=K(),a=K(),l=K(),u=lt(e,"modelValue"),c=M({get:()=>u.value,set:X=>{X&&e.disabled||(u.value=X)}}),{themeClasses:d}=tn(e),{rtlClasses:f,isRtl:h}=Hr(),{hasContent:g,onAfterLeave:m}=lR(e,c),y=vr(()=>typeof e.scrim=="string"?e.scrim:null),{globalTop:w,localTop:b,stackStyles:x}=CB(c,()=>e.zIndex,e._disableGlobalStack),{activatorEl:_,activatorRef:S,target:P,targetEl:A,targetRef:E,activatorEvents:T,contentEvents:R,scrimEvents:I}=SB(e,{isActive:c,isTop:b,contentEl:l}),{teleportTarget:O}=TB(()=>{var ee,G,_e;const X=e.attach||e.contained;if(X)return X;const le=((ee=_==null?void 0:_.value)==null?void 0:ee.getRootNode())||((_e=(G=i.proxy)==null?void 0:G.$el)==null?void 0:_e.getRootNode());return le instanceof ShadowRoot?le:!1}),{dimensionStyles:H}=_r(e),N=EB(),{scopeId:D}=$u();Ee(()=>e.disabled,X=>{X&&(c.value=!1)});const{contentStyles:W,updateLocation:U}=cB(e,{isRtl:h,contentEl:l,target:P,isActive:c});gB(e,{root:o,contentEl:l,targetEl:A,target:P,isActive:c,updateLocation:U});function Q(X){s("click:outside",X),e.persistent?re():c.value=!1}function V(X){return c.value&&w.value&&(!e.scrim||X.target===a.value||X instanceof MouseEvent&&X.shadowTarget===a.value)}Ot&&Ee(c,X=>{X?window.addEventListener("keydown",L):window.removeEventListener("keydown",L)},{immediate:!0}),Vn(()=>{Ot&&window.removeEventListener("keydown",L)});function L(X){var le,ee,G;X.key==="Escape"&&w.value&&((le=l.value)!=null&&le.contains(document.activeElement)||s("keydown",X),e.persistent?re():(c.value=!1,(ee=l.value)!=null&&ee.contains(document.activeElement)&&((G=_.value)==null||G.focus())))}function oe(X){X.key==="Escape"&&!w.value||s("keydown",X)}const j=jP();Lr(()=>e.closeOnBack,()=>{QN(j,X=>{w.value&&c.value?(X(!1),e.persistent?re():c.value=!1):X()})});const F=K();Ee(()=>c.value&&(e.absolute||e.contained)&&O.value==null,X=>{if(X){const le=OP(o.value);le&&le!==document.scrollingElement&&(F.value=le.scrollTop)}});function re(){e.noClickAnimation||l.value&&mo(l.value,[{transformOrigin:"center"},{transform:"scale(1.03)"},{transformOrigin:"center"}],{duration:150,easing:rp})}function ae(){s("afterEnter")}function Se(){m(),s("afterLeave")}return Me(()=>{var X;return C(Oe,null,[(X=n.activator)==null?void 0:X.call(n,{isActive:c.value,targetRef:E,props:me({ref:S},T.value,e.activatorProps)}),N.value&&g.value&&p($L,{disabled:!O.value,to:O.value},{default:()=>[C("div",me({class:["v-overlay",{"v-overlay--absolute":e.absolute||e.contained,"v-overlay--active":c.value,"v-overlay--contained":e.contained},d.value,f.value,e.class],style:[x.value,{"--v-overlay-opacity":e.opacity,top:Ne(F.value)},e.style],ref:o,onKeydown:oe},D,r),[p(IB,me({color:y,modelValue:c.value&&!!e.scrim,ref:a},I.value),null),p(ui,{appear:!0,persisted:!0,transition:e.transition,target:P.value,onAfterEnter:ae,onAfterLeave:Se},{default:()=>{var le;return[zt(C("div",me({ref:l,class:["v-overlay__content",e.contentClass],style:[H.value,W.value]},R.value,e.contentProps),[(le=n.default)==null?void 0:le.call(n,{isActive:c})]),[[ro,c.value],[JS,{handler:Q,closeConditional:V,include:()=>[_.value]}]])]}})])]})])}),{activatorEl:_,scrimEl:a,target:P,animateClick:re,contentEl:l,globalTop:w,localTop:b,updateLocation:U}}}),Rg=Symbol("Forwarded refs");function Ig(e,t){let n=e;for(;n;){const r=Reflect.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Es(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e[Rg]=n,new Proxy(e,{get(s,i){if(Reflect.has(s,i))return Reflect.get(s,i);if(!(typeof i=="symbol"||i.startsWith("$")||i.startsWith("__"))){for(const o of n)if(o.value&&Reflect.has(o.value,i)){const a=Reflect.get(o.value,i);return typeof a=="function"?a.bind(o.value):a}}},has(s,i){if(Reflect.has(s,i))return!0;if(typeof i=="symbol"||i.startsWith("$")||i.startsWith("__"))return!1;for(const o of n)if(o.value&&Reflect.has(o.value,i))return!0;return!1},set(s,i,o){if(Reflect.has(s,i))return Reflect.set(s,i,o);if(typeof i=="symbol"||i.startsWith("$")||i.startsWith("__"))return!1;for(const a of n)if(a.value&&Reflect.has(a.value,i))return Reflect.set(a.value,i,o);return!1},getOwnPropertyDescriptor(s,i){var a;const o=Reflect.getOwnPropertyDescriptor(s,i);if(o)return o;if(!(typeof i=="symbol"||i.startsWith("$")||i.startsWith("__"))){for(const l of n){if(!l.value)continue;const u=Ig(l.value,i)??("_"in l.value?Ig((a=l.value._)==null?void 0:a.setupState,i):void 0);if(u)return u}for(const l of n){const u=l.value&&l.value[Rg];if(!u)continue;const c=u.slice();for(;c.length;){const d=c.shift(),f=Ig(d.value,i);if(f)return f;const h=d.value&&d.value[Rg];h&&c.push(...h)}}}}})}const AB=he({fullscreen:Boolean,retainFocus:{type:Boolean,default:!0},scrollable:Boolean,...qd({origin:"center center",scrollStrategy:"block",transition:{component:p1},zIndex:2400})},"VDialog"),dR=xe()({name:"VDialog",props:AB(),emits:{"update:modelValue":e=>!0,afterEnter:()=>!0,afterLeave:()=>!0},setup(e,t){let{emit:n,slots:r}=t;const s=lt(e,"modelValue"),{scopeId:i}=$u(),o=K();async function a(d){var g,m,y;const f=d.relatedTarget,h=d.target;await Pt(),s.value&&f!==h&&((g=o.value)!=null&&g.contentEl)&&((m=o.value)!=null&&m.globalTop)&&![document,o.value.contentEl].includes(h)&&!o.value.contentEl.contains(h)&&((y=ou(o.value.contentEl)[0])==null||y.focus())}function l(d){var y;if(d.key!=="Tab"||!((y=o.value)!=null&&y.contentEl))return;const f=ou(o.value.contentEl);if(!f.length)return;const h=f[0],g=f[f.length-1],m=document.activeElement;d.shiftKey&&m===h?(d.preventDefault(),g.focus()):!d.shiftKey&&m===g&&(d.preventDefault(),h.focus())}Vn(()=>{document.removeEventListener("focusin",a),document.removeEventListener("keydown",l)}),Ot&&Ee(()=>s.value&&e.retainFocus,d=>{d?(document.addEventListener("focusin",a,{once:!0}),document.addEventListener("keydown",l)):(document.removeEventListener("focusin",a),document.removeEventListener("keydown",l))},{immediate:!0});function u(){var d;n("afterEnter"),(e.scrim||e.retainFocus)&&((d=o.value)!=null&&d.contentEl)&&!o.value.contentEl.contains(document.activeElement)&&o.value.contentEl.focus({preventScroll:!0})}function c(){n("afterLeave")}return Ee(s,async d=>{var f;d||(await Pt(),(f=o.value.activatorEl)==null||f.focus({preventScroll:!0}))}),Me(()=>{const d=Yi.filterProps(e),f=me({"aria-haspopup":"dialog"},e.activatorProps),h=me({tabindex:-1},e.contentProps);return p(Yi,me({ref:o,class:["v-dialog",{"v-dialog--fullscreen":e.fullscreen,"v-dialog--scrollable":e.scrollable},e.class],style:e.style},d,{modelValue:s.value,"onUpdate:modelValue":g=>s.value=g,"aria-modal":"true",activatorProps:f,contentProps:h,height:e.fullscreen?void 0:e.height,width:e.fullscreen?void 0:e.width,maxHeight:e.fullscreen?void 0:e.maxHeight,maxWidth:e.fullscreen?void 0:e.maxWidth,role:"dialog",onAfterEnter:u,onAfterLeave:c},i),{activator:r.activator,default:function(){for(var g=arguments.length,m=new Array(g),y=0;y<g;y++)m[y]=arguments[y];return p($t,{root:"VDialog"},{default:()=>{var w;return[(w=r.default)==null?void 0:w.call(r,...m)]}})}})}),Es({},o)}}),OB={class:"pa-3 text--primary"},yi=Fe({__name:"BaseDialog",props:{id:{type:String,required:!0},maxWidth:{type:String,default:"400px"}},emits:["escape","opened","beforeOpened"],setup(e,{emit:t}){const n=e,r=fP(),s=t,i=rn(n.id);function o(c){return s("opened",c)}function a(c){return s("beforeOpened",c)}yt(async()=>{TF("Escape",c=>{l.value&&(c.preventDefault(),u())}),r.registerDialogReference(n.id,{beforeOpenedCallback:a,openedCallback:o})}),Vn(()=>{r.unregisterDialogReference(n.id)});const l=M(()=>{if(!n.id)return;const c=r.isDialogOpened(n.id);return c&&console.debug(`[BaseDialog ${n.id}] Showing dialog: ${i==null?void 0:i.isDialogOpened()}`),c});function u(){s("escape")}return(c,d)=>($(),te(dR,{"max-width":e.maxWidth,"retain-focus":!1,"model-value":l.value,persistent:"",onClose:d[1]||(d[1]=f=>u())},{default:v(()=>[om(c.$slots,"default",{},()=>[C("div",OB,[d[4]||(d[4]=k(" No content defined in dialog. ",-1)),p(ne,{onClick:d[0]||(d[0]=f=>J(i).closeDialog())},{default:v(()=>[p(Z,{class:"mr-3"},{default:v(()=>[...d[2]||(d[2]=[k("close",-1)])]),_:1}),d[3]||(d[3]=k("Close ",-1))]),_:1})])])]),_:3},8,["max-width","model-value"]))}});var sn=(e=>(e.ImportOctoFarmDialog="ImportOctoFarmDialog",e.BatchReprintDialog="BatchReprintDialog",e.YamlImportExport="YamlImportExport",e.AddOrUpdatePrinterDialog="AddOrUpdatePrinterDialog",e.AddOrUpdateFloorDialog="AddOrUpdateFloorDialog",e.PrinterMaintenanceDialog="PrinterMaintenanceDialog",e.AddOrUpdateCameraDialog="AddOrUpdateCameraDialog",e.PrinterControlDialog="PrinterControlDialog",e.CreateUserDialog="CreateUserDialog",e.GridSettingsDialog="GridSettingsDialog",e))(sn||{});function fR(e,t){return function(){return e.apply(t,arguments)}}const{toString:MB}=Object.prototype,{getPrototypeOf:y1}=Object,{iterator:gm,toStringTag:hR}=Symbol,vm=(e=>t=>{const n=MB.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Hs=e=>(e=e.toLowerCase(),t=>vm(t)===e),ym=e=>t=>typeof t===e,{isArray:Nu}=Array,cu=ym("undefined");function Gd(e){return e!==null&&!cu(e)&&e.constructor!==null&&!cu(e.constructor)&&$r(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const pR=Hs("ArrayBuffer");function DB(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&pR(e.buffer),t}const LB=ym("string"),$r=ym("function"),mR=ym("number"),Kd=e=>e!==null&&typeof e=="object",$B=e=>e===!0||e===!1,ph=e=>{if(vm(e)!=="object")return!1;const t=y1(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(hR in e)&&!(gm in e)},FB=e=>{if(!Kd(e)||Gd(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},NB=Hs("Date"),BB=Hs("File"),VB=Hs("Blob"),UB=Hs("FileList"),zB=e=>Kd(e)&&$r(e.pipe),HB=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||$r(e.append)&&((t=vm(e))==="formdata"||t==="object"&&$r(e.toString)&&e.toString()==="[object FormData]"))},jB=Hs("URLSearchParams"),[WB,qB,GB,KB]=["ReadableStream","Request","Response","Headers"].map(Hs),YB=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Yd(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),Nu(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(Gd(e))return;const i=n?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let a;for(r=0;r<o;r++)a=i[r],t.call(null,e[a],a,e)}}function gR(e,t){if(Gd(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const ya=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,vR=e=>!cu(e)&&e!==ya;function cy(){const{caseless:e,skipUndefined:t}=vR(this)&&this||{},n={},r=(s,i)=>{const o=e&&gR(n,i)||i;ph(n[o])&&ph(s)?n[o]=cy(n[o],s):ph(s)?n[o]=cy({},s):Nu(s)?n[o]=s.slice():(!t||!cu(s))&&(n[o]=s)};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&Yd(arguments[s],r);return n}const XB=(e,t,n,{allOwnKeys:r}={})=>(Yd(t,(s,i)=>{n&&$r(s)?e[i]=fR(s,n):e[i]=s},{allOwnKeys:r}),e),QB=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),JB=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},ZB=(e,t,n,r)=>{let s,i,o;const a={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)o=s[i],(!r||r(o,e,t))&&!a[o]&&(t[o]=e[o],a[o]=!0);e=n!==!1&&y1(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},eV=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},tV=e=>{if(!e)return null;if(Nu(e))return e;let t=e.length;if(!mR(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},nV=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&y1(Uint8Array)),rV=(e,t)=>{const r=(e&&e[gm]).call(e);let s;for(;(s=r.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},sV=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},iV=Hs("HTMLFormElement"),oV=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),ZS=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),aV=Hs("RegExp"),yR=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Yd(n,(s,i)=>{let o;(o=t(s,i,e))!==!1&&(r[i]=o||s)}),Object.defineProperties(e,r)},lV=e=>{yR(e,(t,n)=>{if($r(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if($r(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},uV=(e,t)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return Nu(e)?r(e):r(String(e).split(t)),n},cV=()=>{},dV=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function fV(e){return!!(e&&$r(e.append)&&e[hR]==="FormData"&&e[gm])}const hV=e=>{const t=new Array(10),n=(r,s)=>{if(Kd(r)){if(t.indexOf(r)>=0)return;if(Gd(r))return r;if(!("toJSON"in r)){t[s]=r;const i=Nu(r)?[]:{};return Yd(r,(o,a)=>{const l=n(o,s+1);!cu(l)&&(i[a]=l)}),t[s]=void 0,i}}return r};return n(e,0)},pV=Hs("AsyncFunction"),mV=e=>e&&(Kd(e)||$r(e))&&$r(e.then)&&$r(e.catch),bR=((e,t)=>e?setImmediate:t?((n,r)=>(ya.addEventListener("message",({source:s,data:i})=>{s===ya&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),ya.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",$r(ya.postMessage)),gV=typeof queueMicrotask<"u"?queueMicrotask.bind(ya):typeof process<"u"&&process.nextTick||bR,vV=e=>e!=null&&$r(e[gm]),ue={isArray:Nu,isArrayBuffer:pR,isBuffer:Gd,isFormData:HB,isArrayBufferView:DB,isString:LB,isNumber:mR,isBoolean:$B,isObject:Kd,isPlainObject:ph,isEmptyObject:FB,isReadableStream:WB,isRequest:qB,isResponse:GB,isHeaders:KB,isUndefined:cu,isDate:NB,isFile:BB,isBlob:VB,isRegExp:aV,isFunction:$r,isStream:zB,isURLSearchParams:jB,isTypedArray:nV,isFileList:UB,forEach:Yd,merge:cy,extend:XB,trim:YB,stripBOM:QB,inherits:JB,toFlatObject:ZB,kindOf:vm,kindOfTest:Hs,endsWith:eV,toArray:tV,forEachEntry:rV,matchAll:sV,isHTMLForm:iV,hasOwnProperty:ZS,hasOwnProp:ZS,reduceDescriptors:yR,freezeMethods:lV,toObjectSet:uV,toCamelCase:oV,noop:cV,toFiniteNumber:dV,findKey:gR,global:ya,isContextDefined:vR,isSpecCompliantForm:fV,toJSONObject:hV,isAsyncFn:pV,isThenable:mV,setImmediate:bR,asap:gV,isIterable:vV};function nt(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}ue.inherits(nt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ue.toJSONObject(this.config),code:this.code,status:this.status}}});const wR=nt.prototype,SR={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{SR[e]={value:e}});Object.defineProperties(nt,SR);Object.defineProperty(wR,"isAxiosError",{value:!0});nt.from=(e,t,n,r,s,i)=>{const o=Object.create(wR);ue.toFlatObject(e,o,function(c){return c!==Error.prototype},u=>u!=="isAxiosError");const a=e&&e.message?e.message:"Error",l=t==null&&e?e.code:t;return nt.call(o,a,l,n,r,s),e&&o.cause==null&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",i&&Object.assign(o,i),o};const yV=null;function dy(e){return ue.isPlainObject(e)||ue.isArray(e)}function _R(e){return ue.endsWith(e,"[]")?e.slice(0,-2):e}function e_(e,t,n){return e?e.concat(t).map(function(s,i){return s=_R(s),!n&&i?"["+s+"]":s}).join(n?".":""):t}function bV(e){return ue.isArray(e)&&!e.some(dy)}const wV=ue.toFlatObject(ue,{},null,function(t){return/^is[A-Z]/.test(t)});function bm(e,t,n){if(!ue.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=ue.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,y){return!ue.isUndefined(y[m])});const r=n.metaTokens,s=n.visitor||c,i=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&ue.isSpecCompliantForm(t);if(!ue.isFunction(s))throw new TypeError("visitor must be a function");function u(g){if(g===null)return"";if(ue.isDate(g))return g.toISOString();if(ue.isBoolean(g))return g.toString();if(!l&&ue.isBlob(g))throw new nt("Blob is not supported. Use a Buffer instead.");return ue.isArrayBuffer(g)||ue.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function c(g,m,y){let w=g;if(g&&!y&&typeof g=="object"){if(ue.endsWith(m,"{}"))m=r?m:m.slice(0,-2),g=JSON.stringify(g);else if(ue.isArray(g)&&bV(g)||(ue.isFileList(g)||ue.endsWith(m,"[]"))&&(w=ue.toArray(g)))return m=_R(m),w.forEach(function(x,_){!(ue.isUndefined(x)||x===null)&&t.append(o===!0?e_([m],_,i):o===null?m:m+"[]",u(x))}),!1}return dy(g)?!0:(t.append(e_(y,m,i),u(g)),!1)}const d=[],f=Object.assign(wV,{defaultVisitor:c,convertValue:u,isVisitable:dy});function h(g,m){if(!ue.isUndefined(g)){if(d.indexOf(g)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(g),ue.forEach(g,function(w,b){(!(ue.isUndefined(w)||w===null)&&s.call(t,w,ue.isString(b)?b.trim():b,m,f))===!0&&h(w,m?m.concat(b):[b])}),d.pop()}}if(!ue.isObject(e))throw new TypeError("data must be an object");return h(e),t}function t_(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function b1(e,t){this._pairs=[],e&&bm(e,this,t)}const kR=b1.prototype;kR.append=function(t,n){this._pairs.push([t,n])};kR.toString=function(t){const n=t?function(r){return t.call(this,r,t_)}:t_;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function SV(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function xR(e,t,n){if(!t)return e;const r=n&&n.encode||SV;ue.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let i;if(s?i=s(t,n):i=ue.isURLSearchParams(t)?t.toString():new b1(t,n).toString(r),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class n_{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ue.forEach(this.handlers,function(r){r!==null&&t(r)})}}const ER={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},_V=typeof URLSearchParams<"u"?URLSearchParams:b1,kV=typeof FormData<"u"?FormData:null,xV=typeof Blob<"u"?Blob:null,EV={isBrowser:!0,classes:{URLSearchParams:_V,FormData:kV,Blob:xV},protocols:["http","https","file","blob","url","data"]},w1=typeof window<"u"&&typeof document<"u",fy=typeof navigator=="object"&&navigator||void 0,CV=w1&&(!fy||["ReactNative","NativeScript","NS"].indexOf(fy.product)<0),TV=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",PV=w1&&window.location.href||"http://localhost",RV=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:w1,hasStandardBrowserEnv:CV,hasStandardBrowserWebWorkerEnv:TV,navigator:fy,origin:PV},Symbol.toStringTag,{value:"Module"})),ir={...RV,...EV};function IV(e,t){return bm(e,new ir.classes.URLSearchParams,{visitor:function(n,r,s,i){return ir.isNode&&ue.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function AV(e){return ue.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function OV(e){const t={},n=Object.keys(e);let r;const s=n.length;let i;for(r=0;r<s;r++)i=n[r],t[i]=e[i];return t}function CR(e){function t(n,r,s,i){let o=n[i++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),l=i>=n.length;return o=!o&&ue.isArray(s)?s.length:o,l?(ue.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!a):((!s[o]||!ue.isObject(s[o]))&&(s[o]=[]),t(n,r,s[o],i)&&ue.isArray(s[o])&&(s[o]=OV(s[o])),!a)}if(ue.isFormData(e)&&ue.isFunction(e.entries)){const n={};return ue.forEachEntry(e,(r,s)=>{t(AV(r),s,n,0)}),n}return null}function MV(e,t,n){if(ue.isString(e))try{return(t||JSON.parse)(e),ue.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const Xd={transitional:ER,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=ue.isObject(t);if(i&&ue.isHTMLForm(t)&&(t=new FormData(t)),ue.isFormData(t))return s?JSON.stringify(CR(t)):t;if(ue.isArrayBuffer(t)||ue.isBuffer(t)||ue.isStream(t)||ue.isFile(t)||ue.isBlob(t)||ue.isReadableStream(t))return t;if(ue.isArrayBufferView(t))return t.buffer;if(ue.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return IV(t,this.formSerializer).toString();if((a=ue.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return bm(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),MV(t)):t}],transformResponse:[function(t){const n=this.transitional||Xd.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(ue.isResponse(t)||ue.isReadableStream(t))return t;if(t&&ue.isString(t)&&(r&&!this.responseType||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(a){if(o)throw a.name==="SyntaxError"?nt.from(a,nt.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ir.classes.FormData,Blob:ir.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ue.forEach(["delete","get","head","post","put","patch"],e=>{Xd.headers[e]={}});const DV=ue.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),LV=e=>{const t={};let n,r,s;return e&&e.split(`
|
|
26
|
+
`).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!n||t[n]&&DV[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},r_=Symbol("internals");function uc(e){return e&&String(e).trim().toLowerCase()}function mh(e){return e===!1||e==null?e:ue.isArray(e)?e.map(mh):String(e)}function $V(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const FV=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ag(e,t,n,r,s){if(ue.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!ue.isString(t)){if(ue.isString(r))return t.indexOf(r)!==-1;if(ue.isRegExp(r))return r.test(t)}}function NV(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function BV(e,t){const n=ue.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,i,o){return this[r].call(this,t,s,i,o)},configurable:!0})})}let Fr=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function i(a,l,u){const c=uc(l);if(!c)throw new Error("header name must be a non-empty string");const d=ue.findKey(s,c);(!d||s[d]===void 0||u===!0||u===void 0&&s[d]!==!1)&&(s[d||l]=mh(a))}const o=(a,l)=>ue.forEach(a,(u,c)=>i(u,c,l));if(ue.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(ue.isString(t)&&(t=t.trim())&&!FV(t))o(LV(t),n);else if(ue.isObject(t)&&ue.isIterable(t)){let a={},l,u;for(const c of t){if(!ue.isArray(c))throw TypeError("Object iterator must return a key-value pair");a[u=c[0]]=(l=a[u])?ue.isArray(l)?[...l,c[1]]:[l,c[1]]:c[1]}o(a,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=uc(t),t){const r=ue.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return $V(s);if(ue.isFunction(n))return n.call(this,s,r);if(ue.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=uc(t),t){const r=ue.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Ag(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function i(o){if(o=uc(o),o){const a=ue.findKey(r,o);a&&(!n||Ag(r,r[a],a,n))&&(delete r[a],s=!0)}}return ue.isArray(t)?t.forEach(i):i(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const i=n[r];(!t||Ag(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const n=this,r={};return ue.forEach(this,(s,i)=>{const o=ue.findKey(r,i);if(o){n[o]=mh(s),delete n[i];return}const a=t?NV(i):String(i).trim();a!==i&&delete n[i],n[a]=mh(s),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return ue.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&ue.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
27
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[r_]=this[r_]={accessors:{}}).accessors,s=this.prototype;function i(o){const a=uc(o);r[a]||(BV(s,o),r[a]=!0)}return ue.isArray(t)?t.forEach(i):i(t),this}};Fr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ue.reduceDescriptors(Fr.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});ue.freezeMethods(Fr);function Og(e,t){const n=this||Xd,r=t||n,s=Fr.from(r.headers);let i=r.data;return ue.forEach(e,function(a){i=a.call(n,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function TR(e){return!!(e&&e.__CANCEL__)}function Bu(e,t,n){nt.call(this,e??"canceled",nt.ERR_CANCELED,t,n),this.name="CanceledError"}ue.inherits(Bu,nt,{__CANCEL__:!0});function PR(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new nt("Request failed with status code "+n.status,[nt.ERR_BAD_REQUEST,nt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function VV(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function UV(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,i=0,o;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=r[i];o||(o=u),n[s]=l,r[s]=u;let d=i,f=0;for(;d!==s;)f+=n[d++],d=d%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),u-o<t)return;const h=c&&u-c;return h?Math.round(f*1e3/h):void 0}}function zV(e,t){let n=0,r=1e3/t,s,i;const o=(u,c=Date.now())=>{n=c,s=null,i&&(clearTimeout(i),i=null),e(...u)};return[(...u)=>{const c=Date.now(),d=c-n;d>=r?o(u,c):(s=u,i||(i=setTimeout(()=>{i=null,o(s)},r-d)))},()=>s&&o(s)]}const lp=(e,t,n=3)=>{let r=0;const s=UV(50,250);return zV(i=>{const o=i.loaded,a=i.lengthComputable?i.total:void 0,l=o-r,u=s(l),c=o<=a;r=o;const d={loaded:o,total:a,progress:a?o/a:void 0,bytes:l,rate:u||void 0,estimated:u&&a&&c?(a-o)/u:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},s_=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},i_=e=>(...t)=>ue.asap(()=>e(...t)),HV=ir.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,ir.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(ir.origin),ir.navigator&&/(msie|trident)/i.test(ir.navigator.userAgent)):()=>!0,jV=ir.hasStandardBrowserEnv?{write(e,t,n,r,s,i){const o=[e+"="+encodeURIComponent(t)];ue.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),ue.isString(r)&&o.push("path="+r),ue.isString(s)&&o.push("domain="+s),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function WV(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function qV(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function RR(e,t,n){let r=!WV(t);return e&&(r||n==!1)?qV(e,t):t}const o_=e=>e instanceof Fr?{...e}:e;function Xa(e,t){t=t||{};const n={};function r(u,c,d,f){return ue.isPlainObject(u)&&ue.isPlainObject(c)?ue.merge.call({caseless:f},u,c):ue.isPlainObject(c)?ue.merge({},c):ue.isArray(c)?c.slice():c}function s(u,c,d,f){if(ue.isUndefined(c)){if(!ue.isUndefined(u))return r(void 0,u,d,f)}else return r(u,c,d,f)}function i(u,c){if(!ue.isUndefined(c))return r(void 0,c)}function o(u,c){if(ue.isUndefined(c)){if(!ue.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function a(u,c,d){if(d in t)return r(u,c);if(d in e)return r(void 0,u)}const l={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(u,c,d)=>s(o_(u),o_(c),d,!0)};return ue.forEach(Object.keys({...e,...t}),function(c){const d=l[c]||s,f=d(e[c],t[c],c);ue.isUndefined(f)&&d!==a||(n[c]=f)}),n}const IR=e=>{const t=Xa({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:a}=t;if(t.headers=o=Fr.from(o),t.url=xR(RR(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),ue.isFormData(n)){if(ir.hasStandardBrowserEnv||ir.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(ue.isFunction(n.getHeaders)){const l=n.getHeaders(),u=["content-type","content-length"];Object.entries(l).forEach(([c,d])=>{u.includes(c.toLowerCase())&&o.set(c,d)})}}if(ir.hasStandardBrowserEnv&&(r&&ue.isFunction(r)&&(r=r(t)),r||r!==!1&&HV(t.url))){const l=s&&i&&jV.read(i);l&&o.set(s,l)}return t},GV=typeof XMLHttpRequest<"u",KV=GV&&function(e){return new Promise(function(n,r){const s=IR(e);let i=s.data;const o=Fr.from(s.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=s,c,d,f,h,g;function m(){h&&h(),g&&g(),s.cancelToken&&s.cancelToken.unsubscribe(c),s.signal&&s.signal.removeEventListener("abort",c)}let y=new XMLHttpRequest;y.open(s.method.toUpperCase(),s.url,!0),y.timeout=s.timeout;function w(){if(!y)return;const x=Fr.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),S={data:!a||a==="text"||a==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:x,config:e,request:y};PR(function(A){n(A),m()},function(A){r(A),m()},S),y=null}"onloadend"in y?y.onloadend=w:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(w)},y.onabort=function(){y&&(r(new nt("Request aborted",nt.ECONNABORTED,e,y)),y=null)},y.onerror=function(_){const S=_&&_.message?_.message:"Network Error",P=new nt(S,nt.ERR_NETWORK,e,y);P.event=_||null,r(P),y=null},y.ontimeout=function(){let _=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const S=s.transitional||ER;s.timeoutErrorMessage&&(_=s.timeoutErrorMessage),r(new nt(_,S.clarifyTimeoutError?nt.ETIMEDOUT:nt.ECONNABORTED,e,y)),y=null},i===void 0&&o.setContentType(null),"setRequestHeader"in y&&ue.forEach(o.toJSON(),function(_,S){y.setRequestHeader(S,_)}),ue.isUndefined(s.withCredentials)||(y.withCredentials=!!s.withCredentials),a&&a!=="json"&&(y.responseType=s.responseType),u&&([f,g]=lp(u,!0),y.addEventListener("progress",f)),l&&y.upload&&([d,h]=lp(l),y.upload.addEventListener("progress",d),y.upload.addEventListener("loadend",h)),(s.cancelToken||s.signal)&&(c=x=>{y&&(r(!x||x.type?new Bu(null,e,y):x),y.abort(),y=null)},s.cancelToken&&s.cancelToken.subscribe(c),s.signal&&(s.signal.aborted?c():s.signal.addEventListener("abort",c)));const b=VV(s.url);if(b&&ir.protocols.indexOf(b)===-1){r(new nt("Unsupported protocol "+b+":",nt.ERR_BAD_REQUEST,e));return}y.send(i||null)})},YV=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const i=function(u){if(!s){s=!0,a();const c=u instanceof Error?u:this.reason;r.abort(c instanceof nt?c:new Bu(c instanceof Error?c.message:c))}};let o=t&&setTimeout(()=>{o=null,i(new nt(`timeout ${t} of ms exceeded`,nt.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>u.addEventListener("abort",i));const{signal:l}=r;return l.unsubscribe=()=>ue.asap(a),l}},XV=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},QV=async function*(e,t){for await(const n of JV(e))yield*XV(n,t)},JV=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},a_=(e,t,n,r)=>{const s=QV(e,t);let i=0,o,a=l=>{o||(o=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await s.next();if(u){a(),l.close();return}let d=c.byteLength;if(n){let f=i+=d;n(f)}l.enqueue(new Uint8Array(c))}catch(u){throw a(u),u}},cancel(l){return a(l),s.return()}},{highWaterMark:2})},l_=64*1024,{isFunction:xf}=ue,ZV=(({Request:e,Response:t})=>({Request:e,Response:t}))(ue.global),{ReadableStream:u_,TextEncoder:c_}=ue.global,d_=(e,...t)=>{try{return!!e(...t)}catch{return!1}},eU=e=>{e=ue.merge.call({skipUndefined:!0},ZV,e);const{fetch:t,Request:n,Response:r}=e,s=t?xf(t):typeof fetch=="function",i=xf(n),o=xf(r);if(!s)return!1;const a=s&&xf(u_),l=s&&(typeof c_=="function"?(g=>m=>g.encode(m))(new c_):async g=>new Uint8Array(await new n(g).arrayBuffer())),u=i&&a&&d_(()=>{let g=!1;const m=new n(ir.origin,{body:new u_,method:"POST",get duplex(){return g=!0,"half"}}).headers.has("Content-Type");return g&&!m}),c=o&&a&&d_(()=>ue.isReadableStream(new r("").body)),d={stream:c&&(g=>g.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(g=>{!d[g]&&(d[g]=(m,y)=>{let w=m&&m[g];if(w)return w.call(m);throw new nt(`Response type '${g}' is not supported`,nt.ERR_NOT_SUPPORT,y)})});const f=async g=>{if(g==null)return 0;if(ue.isBlob(g))return g.size;if(ue.isSpecCompliantForm(g))return(await new n(ir.origin,{method:"POST",body:g}).arrayBuffer()).byteLength;if(ue.isArrayBufferView(g)||ue.isArrayBuffer(g))return g.byteLength;if(ue.isURLSearchParams(g)&&(g=g+""),ue.isString(g))return(await l(g)).byteLength},h=async(g,m)=>{const y=ue.toFiniteNumber(g.getContentLength());return y??f(m)};return async g=>{let{url:m,method:y,data:w,signal:b,cancelToken:x,timeout:_,onDownloadProgress:S,onUploadProgress:P,responseType:A,headers:E,withCredentials:T="same-origin",fetchOptions:R}=IR(g),I=t||fetch;A=A?(A+"").toLowerCase():"text";let O=YV([b,x&&x.toAbortSignal()],_),H=null;const N=O&&O.unsubscribe&&(()=>{O.unsubscribe()});let D;try{if(P&&u&&y!=="get"&&y!=="head"&&(D=await h(E,w))!==0){let oe=new n(m,{method:"POST",body:w,duplex:"half"}),j;if(ue.isFormData(w)&&(j=oe.headers.get("content-type"))&&E.setContentType(j),oe.body){const[F,re]=s_(D,lp(i_(P)));w=a_(oe.body,l_,F,re)}}ue.isString(T)||(T=T?"include":"omit");const W=i&&"credentials"in n.prototype,U={...R,signal:O,method:y.toUpperCase(),headers:E.normalize().toJSON(),body:w,duplex:"half",credentials:W?T:void 0};H=i&&new n(m,U);let Q=await(i?I(H,R):I(m,U));const V=c&&(A==="stream"||A==="response");if(c&&(S||V&&N)){const oe={};["status","statusText","headers"].forEach(ae=>{oe[ae]=Q[ae]});const j=ue.toFiniteNumber(Q.headers.get("content-length")),[F,re]=S&&s_(j,lp(i_(S),!0))||[];Q=new r(a_(Q.body,l_,F,()=>{re&&re(),N&&N()}),oe)}A=A||"text";let L=await d[ue.findKey(d,A)||"text"](Q,g);return!V&&N&&N(),await new Promise((oe,j)=>{PR(oe,j,{data:L,headers:Fr.from(Q.headers),status:Q.status,statusText:Q.statusText,config:g,request:H})})}catch(W){throw N&&N(),W&&W.name==="TypeError"&&/Load failed|fetch/i.test(W.message)?Object.assign(new nt("Network Error",nt.ERR_NETWORK,g,H),{cause:W.cause||W}):nt.from(W,W&&W.code,g,H)}}},tU=new Map,AR=e=>{let t=e?e.env:{};const{fetch:n,Request:r,Response:s}=t,i=[r,s,n];let o=i.length,a=o,l,u,c=tU;for(;a--;)l=i[a],u=c.get(l),u===void 0&&c.set(l,u=a?new Map:eU(t)),c=u;return u};AR();const hy={http:yV,xhr:KV,fetch:{get:AR}};ue.forEach(hy,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const f_=e=>`- ${e}`,nU=e=>ue.isFunction(e)||e===null||e===!1,OR={getAdapter:(e,t)=>{e=ue.isArray(e)?e:[e];const{length:n}=e;let r,s;const i={};for(let o=0;o<n;o++){r=e[o];let a;if(s=r,!nU(r)&&(s=hy[(a=String(r)).toLowerCase()],s===void 0))throw new nt(`Unknown adapter '${a}'`);if(s&&(ue.isFunction(s)||(s=s.get(t))))break;i[a||"#"+o]=s}if(!s){const o=Object.entries(i).map(([l,u])=>`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=n?o.length>1?`since :
|
|
28
|
+
`+o.map(f_).join(`
|
|
29
|
+
`):" "+f_(o[0]):"as no adapter specified";throw new nt("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return s},adapters:hy};function Mg(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Bu(null,e)}function h_(e){return Mg(e),e.headers=Fr.from(e.headers),e.data=Og.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),OR.getAdapter(e.adapter||Xd.adapter,e)(e).then(function(r){return Mg(e),r.data=Og.call(e,e.transformResponse,r),r.headers=Fr.from(r.headers),r},function(r){return TR(r)||(Mg(e),r&&r.response&&(r.response.data=Og.call(e,e.transformResponse,r.response),r.response.headers=Fr.from(r.response.headers))),Promise.reject(r)})}const MR="1.12.2",wm={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{wm[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const p_={};wm.transitional=function(t,n,r){function s(i,o){return"[Axios v"+MR+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,a)=>{if(t===!1)throw new nt(s(o," has been removed"+(n?" in "+n:"")),nt.ERR_DEPRECATED);return n&&!p_[o]&&(p_[o]=!0,console.warn(s(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,a):!0}};wm.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function rU(e,t,n){if(typeof e!="object")throw new nt("options must be an object",nt.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const i=r[s],o=t[i];if(o){const a=e[i],l=a===void 0||o(a,i,e);if(l!==!0)throw new nt("option "+i+" must be "+l,nt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new nt("Unknown option "+i,nt.ERR_BAD_OPTION)}}const gh={assertOptions:rU,validators:wm},Ys=gh.validators;let Fa=class{constructor(t){this.defaults=t||{},this.interceptors={request:new n_,response:new n_}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
30
|
+
`+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Xa(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&gh.assertOptions(r,{silentJSONParsing:Ys.transitional(Ys.boolean),forcedJSONParsing:Ys.transitional(Ys.boolean),clarifyTimeoutError:Ys.transitional(Ys.boolean)},!1),s!=null&&(ue.isFunction(s)?n.paramsSerializer={serialize:s}:gh.assertOptions(s,{encode:Ys.function,serialize:Ys.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),gh.assertOptions(n,{baseUrl:Ys.spelling("baseURL"),withXsrfToken:Ys.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&ue.merge(i.common,i[n.method]);i&&ue.forEach(["delete","get","head","post","put","patch","common"],g=>{delete i[g]}),n.headers=Fr.concat(o,i);const a=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(l=l&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let c,d=0,f;if(!l){const g=[h_.bind(this),void 0];for(g.unshift(...a),g.push(...u),f=g.length,c=Promise.resolve(n);d<f;)c=c.then(g[d++],g[d++]);return c}f=a.length;let h=n;for(;d<f;){const g=a[d++],m=a[d++];try{h=g(h)}catch(y){m.call(this,y);break}}try{c=h_.call(this,h)}catch(g){return Promise.reject(g)}for(d=0,f=u.length;d<f;)c=c.then(u[d++],u[d++]);return c}getUri(t){t=Xa(this.defaults,t);const n=RR(t.baseURL,t.url,t.allowAbsoluteUrls);return xR(n,t.params,t.paramsSerializer)}};ue.forEach(["delete","get","head","options"],function(t){Fa.prototype[t]=function(n,r){return this.request(Xa(r||{},{method:t,url:n,data:(r||{}).data}))}});ue.forEach(["post","put","patch"],function(t){function n(r){return function(i,o,a){return this.request(Xa(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}Fa.prototype[t]=n(),Fa.prototype[t+"Form"]=n(!0)});let sU=class DR{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(s=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(a=>{r.subscribe(a),i=a}).then(s);return o.cancel=function(){r.unsubscribe(i)},o},t(function(i,o,a){r.reason||(r.reason=new Bu(i,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new DR(function(s){t=s}),cancel:t}}};function iU(e){return function(n){return e.apply(null,n)}}function oU(e){return ue.isObject(e)&&e.isAxiosError===!0}const py={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(py).forEach(([e,t])=>{py[t]=e});function LR(e){const t=new Fa(e),n=fR(Fa.prototype.request,t);return ue.extend(n,Fa.prototype,t,{allOwnKeys:!0}),ue.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return LR(Xa(e,s))},n}const yn=LR(Xd);yn.Axios=Fa;yn.CanceledError=Bu;yn.CancelToken=sU;yn.isCancel=TR;yn.VERSION=MR;yn.toFormData=bm;yn.AxiosError=nt;yn.Cancel=yn.CanceledError;yn.all=function(t){return Promise.all(t)};yn.spread=iU;yn.isAxiosError=oU;yn.mergeConfig=Xa;yn.AxiosHeaders=Fr;yn.formToJSON=e=>CR(ue.isHTMLForm(e)?new FormData(e):e);yn.getAdapter=OR.getAdapter;yn.HttpStatusCode=py;yn.default=yn;const{Axios:zle,AxiosError:$R,CanceledError:Hle,isCancel:jle,CancelToken:Wle,VERSION:qle,all:Gle,Cancel:Kle,isAxiosError:Yle,spread:Xle,toFormData:Qle,AxiosHeaders:Jle,HttpStatusCode:ba,formToJSON:Zle,getAdapter:eue,mergeConfig:tue}=yn;class Sc extends Error{}Sc.prototype.name="InvalidTokenError";function aU(e){return decodeURIComponent(atob(e).replace(/(.)/g,(t,n)=>{let r=n.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}function lU(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return aU(t)}catch{return atob(t)}}function uU(e,t){if(typeof e!="string")throw new Sc("Invalid token specified: must be a string");t||(t={});const n=t.header===!0?0:1,r=e.split(".")[n];if(typeof r!="string")throw new Sc(`Invalid token specified: missing part #${n+1}`);let s;try{s=lU(r)}catch(i){throw new Sc(`Invalid token specified: invalid base64 for part #${n+1} (${i.message})`)}try{return JSON.parse(s)}catch(i){throw new Sc(`Invalid token specified: invalid json for part #${n+1} (${i.message})`)}}function cU(e,t={}){const{onError:n,fallbackValue:r=null}=t,s=(a,l)=>{try{return uU(a,l)}catch(u){return n==null||n(u),r}},i=M(()=>s(un(e),{header:!0})),o=M(()=>s(un(e)));return{header:i,payload:o}}class ha{static async getLoginRequired(){return await(await nr(!1,!1)).get("/api/auth/login-required")}static async postLogin(t,n){return await(await nr(!1,!1)).post("/api/auth/login",{username:t,password:n})}static async logout(){return await(await nr(!0,!1)).post("/api/auth/logout")}static async refreshLogin(t){return await(await nr(!1,!1)).post("/api/auth/refresh",{refreshToken:t})}static async verifyLogin(){return await(await nr(!0,!1)).post("/api/auth/verify")}static async registerAccount(t,n){return await(await nr(!0,!1)).post("/api/auth/register",{username:t,password:n})}}const Ir={IncorrectCredentials:"IncorrectCredentials",InvalidOrExpiredRefreshToken:"InvalidOrExpiredRefreshToken",InvalidOrExpiredAuthToken:"InvalidOrExpiredAuthToken",PasswordChangeRequired:"PasswordChangeRequired",LoginRequired:"LoginRequired",AccountNotVerified:"AccountNotVerified"};function S1(e){switch(e){case Ir.IncorrectCredentials:return"Incorrect credentials";case Ir.InvalidOrExpiredRefreshToken:return"Invalid or expired refresh token";case Ir.InvalidOrExpiredAuthToken:return"Invalid or expired auth token";case Ir.PasswordChangeRequired:return"Password change required";case Ir.LoginRequired:return"Login required";case Ir.AccountNotVerified:return"Account not verified";default:return"Authentication error"}}const ps=Ss("auth",{state:()=>({isDemoMode:null,token:null,refreshToken:null,loginRequired:null,registration:null,wizardState:null,lastLogoutReason:null}),actions:{async checkAuthenticationRequirements(){return await ha.getLoginRequired().then(e=>(this.loginRequired=e.data.loginRequired,this.wizardState=e.data.wizardState,this.registration=e.data.registration,this.isDemoMode=e.data.isDemoMode,{loginRequired:this.loginRequired,wizardState:this.wizardState,registration:this.registration})).catch(e=>{var t;throw console.error("authRequired: failed to check login required",(t=e.response)==null?void 0:t.status),e})},async login(e,t){return this.lastLogoutReason=null,await ha.postLogin(e,t).then(n=>(this.setTokens(n.data.token,n.data.refreshToken),n.data)).catch(n=>{var r;throw console.error("login: failed to login",(r=n.response)==null?void 0:r.status),n})},async logout(e=!1,t){if(console.debug(`Logging out (calling server ${e})`),t&&(this.lastLogoutReason=t),e&&this.tokenClaims&&!this.isLoginExpired)try{await ha.logout()}catch(n){console.error("Server could not process logout, but local logout was successful",n)}this.setIdToken(void 0),this.setRefreshToken(void 0)},async verifyOrRefreshLoginOnceOrLogout(){var e,t;try{return await ha.verifyLogin(),{success:!0}}catch(n){console.error("[AuthStore.verifyOrRefreshLoginOnce]: failed to verify login",n);const r=n;if(!r.response||((e=r.response)==null?void 0:e.status)!==ba.Unauthorized)throw console.error("[AuthStore.verifyOrRefreshLoginOnce]: unknown error",r.status),n;const{reasonCode:s,url:i}=this.extractSpecialReasonCode(n);if(s)return await this.logout(!1,S1(s)),console.error(`[AuthStore] 401 Unauthorized - emitting 'auth:${s}' with reason ${s}`),Dn(`auth:${s}`).emit({url:i,error:r.message,reasonCode:s}),{success:!1,handled:!0};if(!this.hasRefreshToken)return{success:!1,handled:!1};try{await this.refreshLoginToken(),await ha.verifyLogin()}catch(o){const a=o;if(((t=a.response)==null?void 0:t.status)===ba.Unauthorized)return await this.logout(!1),console.error("[AuthStore.verifyOrRefreshLoginOnce]: failed to refresh token",a.status),{success:!1,handled:!1};throw o}return{success:!0,handled:!1}}},extractSpecialReasonCode(e){var n,r,s;const t=(r=(n=e==null?void 0:e.response)==null?void 0:n.data)==null?void 0:r.reasonCode;return t&&console.error("[AuthStore] 401 Unauthorized - Checking received reason code",t),t&&(t===Ir.AccountNotVerified||t===Ir.PasswordChangeRequired)?{reasonCode:t,url:(s=e==null?void 0:e.config)==null?void 0:s.url}:{reasonCode:null,url:null}},loadTokens(){this.token=localStorage.getItem("token"),this.refreshToken=localStorage.getItem("refreshToken")},async refreshLoginToken(){if(!this.refreshToken)throw new Error("refreshLoginToken: no refresh token");return await ha.refreshLogin(this.refreshToken).then(e=>{var t;return(t=e==null?void 0:e.data)!=null&&t.token&&this.setIdToken(e.data.token),!0}).catch(e=>{var t,n,r;throw((t=e.response)==null?void 0:t.status)==ba.Unauthorized?(this.setTokens(void 0,void 0),console.error("refreshLoginToken: authentication error, failed to refresh tokens",(n=e.response)==null?void 0:n.status)):console.error("refreshLoginToken: unknown error, failed to refresh tokens",(r=e.response)==null?void 0:r.status),e})},setTokens(e,t){this.setIdToken(e),this.setRefreshToken(t)},setIdToken(e){e!=null&&e.length?(localStorage.setItem("token",e),this.token=e):localStorage.removeItem("token")},setRefreshToken(e){e!=null&&e.length?(localStorage.setItem("refreshToken",e),this.refreshToken=e):localStorage.removeItem("refreshToken")}},getters:{hasRefreshToken(){return!!this.refreshToken},isLoginExpired(){const e=this.tokenClaims;return e!=null&&e.exp?e.exp<Date.now()/1e3:!1},hasAuthToken(){return!!this.tokenClaims},tokenClaims(){if(!this.token)return null;const e=cU(this.token,{fallbackValue:null});return e?e.payload.value:null}}}),je=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,_t=globalThis,Na="10.19.0";function ul(){return Sm(_t),_t}function Sm(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Na,t[Na]=t[Na]||{}}function Vu(e,t,n=_t){const r=n.__SENTRY__=n.__SENTRY__||{},s=r[Na]=r[Na]||{};return s[e]||(s[e]=t())}const dU=["debug","info","warn","error","log","assert","trace"],fU="Sentry Logger ",up={};function so(e){if(!("console"in _t))return e();const t=_t.console,n={},r=Object.keys(up);r.forEach(s=>{const i=up[s];n[s]=t[s],t[s]=i});try{return e()}finally{r.forEach(s=>{t[s]=n[s]})}}function hU(){k1().enabled=!0}function pU(){k1().enabled=!1}function FR(){return k1().enabled}function mU(...e){_1("log",...e)}function gU(...e){_1("warn",...e)}function vU(...e){_1("error",...e)}function _1(e,...t){je&&FR()&&so(()=>{_t.console[e](`${fU}[${e}]:`,...t)})}function k1(){return je?Vu("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const Ae={enable:hU,disable:pU,isEnabled:FR,log:mU,warn:gU,error:vU},NR=50,Qa="?",m_=/\(error: (.*)\)/,g_=/captureMessage|captureException/;function BR(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,s=0)=>{const i=[],o=n.split(`
|
|
31
|
+
`);for(let a=r;a<o.length;a++){let l=o[a];l.length>1024&&(l=l.slice(0,1024));const u=m_.test(l)?l.replace(m_,"$1"):l;if(!u.match(/\S*Error: /)){for(const c of t){const d=c(u);if(d){i.push(d);break}}if(i.length>=NR+s)break}}return bU(i.slice(s))}}function yU(e){return Array.isArray(e)?BR(...e):e}function bU(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(Ef(t).function||"")&&t.pop(),t.reverse(),g_.test(Ef(t).function||"")&&(t.pop(),g_.test(Ef(t).function||"")&&t.pop()),t.slice(0,NR).map(n=>({...n,filename:n.filename||Ef(t).filename,function:n.function||Qa}))}function Ef(e){return e[e.length-1]||{}}const Dg="<anonymous>";function Xi(e){try{return!e||typeof e!="function"?Dg:e.name||Dg}catch{return Dg}}function v_(e){const t=e.exception;if(t){const n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}const vh={},y_={};function Qo(e,t){vh[e]=vh[e]||[],vh[e].push(t)}function Jo(e,t){if(!y_[e]){y_[e]=!0;try{t()}catch(n){je&&Ae.error(`Error while instrumenting ${e}`,n)}}}function fs(e,t){const n=e&&vh[e];if(n)for(const r of n)try{r(t)}catch(s){je&&Ae.error(`Error while triggering instrumentation handler.
|
|
32
|
+
Type: ${e}
|
|
33
|
+
Name: ${Xi(r)}
|
|
34
|
+
Error:`,s)}}let Lg=null;function VR(e){const t="error";Qo(t,e),Jo(t,wU)}function wU(){Lg=_t.onerror,_t.onerror=function(e,t,n,r,s){return fs("error",{column:r,error:s,line:n,msg:e,url:t}),Lg?Lg.apply(this,arguments):!1},_t.onerror.__SENTRY_INSTRUMENTED__=!0}let $g=null;function UR(e){const t="unhandledrejection";Qo(t,e),Jo(t,SU)}function SU(){$g=_t.onunhandledrejection,_t.onunhandledrejection=function(e){return fs("unhandledrejection",e),$g?$g.apply(this,arguments):!0},_t.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const zR=Object.prototype.toString;function x1(e){switch(zR.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Qi(e,Error)}}function Uu(e,t){return zR.call(e)===`[object ${t}]`}function HR(e){return Uu(e,"ErrorEvent")}function b_(e){return Uu(e,"DOMError")}function _U(e){return Uu(e,"DOMException")}function Bi(e){return Uu(e,"String")}function E1(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function od(e){return e===null||E1(e)||typeof e!="object"&&typeof e!="function"}function ad(e){return Uu(e,"Object")}function _m(e){return typeof Event<"u"&&Qi(e,Event)}function kU(e){return typeof Element<"u"&&Qi(e,Element)}function xU(e){return Uu(e,"RegExp")}function zu(e){return!!(e!=null&&e.then&&typeof e.then=="function")}function EU(e){return ad(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function Qi(e,t){try{return e instanceof t}catch{return!1}}function jR(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function WR(e){return typeof Request<"u"&&Qi(e,Request)}const C1=_t,CU=80;function ms(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,s=[];let i=0,o=0;const a=" > ",l=a.length;let u;const c=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||CU;for(;n&&i++<r&&(u=TU(n,c),!(u==="html"||i>1&&o+s.length*l+u.length>=d));)s.push(u),o+=u.length,n=n.parentNode;return s.reverse().join(a)}catch{return"<unknown>"}}function TU(e,t){const n=e,r=[];if(!(n!=null&&n.tagName))return"";if(C1.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const s=t!=null&&t.length?t.filter(o=>n.getAttribute(o)).map(o=>[o,n.getAttribute(o)]):null;if(s!=null&&s.length)s.forEach(o=>{r.push(`[${o[0]}="${o[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const o=n.className;if(o&&Bi(o)){const a=o.split(/\s+/);for(const l of a)r.push(`.${l}`)}}const i=["aria-label","type","name","title","alt"];for(const o of i){const a=n.getAttribute(o);a&&r.push(`[${o}="${a}"]`)}return r.join("")}function Hu(){try{return C1.document.location.href}catch{return""}}function qR(e){if(!C1.HTMLElement)return null;let t=e;const n=5;for(let r=0;r<n;r++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}function cp(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function w_(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const s=e[r];try{jR(s)?n.push("[VueViewModel]"):n.push(String(s))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function yh(e,t,n=!1){return Bi(e)?xU(t)?t.test(e):Bi(t)?n?e===t:e.includes(t):!1:!1}function Vi(e,t=[],n=!1){return t.some(r=>yh(e,r,n))}function Or(e,t,n){if(!(t in e))return;const r=e[t];if(typeof r!="function")return;const s=n(r);typeof s=="function"&&GR(s,r);try{e[t]=s}catch{je&&Ae.log(`Failed to replace method "${t}" in object`,e)}}function Qr(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{je&&Ae.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function GR(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,Qr(e,"__sentry_original__",t)}catch{}}function T1(e){return e.__sentry_original__}function KR(e){if(x1(e))return{message:e.message,name:e.name,stack:e.stack,...__(e)};if(_m(e)){const t={type:e.type,target:S_(e.target),currentTarget:S_(e.currentTarget),...__(e)};return typeof CustomEvent<"u"&&Qi(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function S_(e){try{return kU(e)?ms(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function __(e){if(typeof e=="object"&&e!==null){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function PU(e,t=40){const n=Object.keys(KR(e));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return cp(r,t);for(let s=n.length;s>0;s--){const i=n.slice(0,s).join(", ");if(!(i.length>t))return s===n.length?i:cp(i,t)}return""}function RU(){const e=_t;return e.crypto||e.msCrypto}function Xr(e=RU()){let t=()=>Math.random()*16;try{if(e!=null&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e!=null&&e.getRandomValues&&(t=()=>{const n=new Uint8Array(1);return e.getRandomValues(n),n[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,n=>(n^(t()&15)>>n/4).toString(16))}function YR(e){var t,n;return(n=(t=e.exception)==null?void 0:t.values)==null?void 0:n[0]}function va(e){const{message:t,event_id:n}=e;if(t)return t;const r=YR(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function my(e,t,n){const r=e.exception=e.exception||{},s=r.values=r.values||[],i=s[0]=s[0]||{};i.value||(i.value=t||""),i.type||(i.type="Error")}function du(e,t){const n=YR(e);if(!n)return;const r={type:"generic",handled:!0},s=n.mechanism;if(n.mechanism={...r,...s,...t},t&&"data"in t){const i={...s==null?void 0:s.data,...t.data};n.mechanism.data=i}}function k_(e){if(IU(e))return!0;try{Qr(e,"__sentry_captured__",!0)}catch{}return!1}function IU(e){try{return e.__sentry_captured__}catch{}}const XR=1e3;function cl(){return Date.now()/XR}function AU(){const{performance:e}=_t;if(!(e!=null&&e.now)||!e.timeOrigin)return cl;const t=e.timeOrigin;return()=>(t+e.now())/XR}let x_;function Sn(){return(x_??(x_=AU()))()}let Fg;function OU(){var c;const{performance:e}=_t;if(!(e!=null&&e.now))return[void 0,"none"];const t=3600*1e3,n=e.now(),r=Date.now(),s=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,i=s<t,o=(c=e.timing)==null?void 0:c.navigationStart,l=typeof o=="number"?Math.abs(o+n-r):t,u=l<t;return i||u?s<=l?[e.timeOrigin,"timeOrigin"]:[o,"navigationStart"]:[r,"dateNow"]}function jr(){return Fg||(Fg=OU()),Fg[0]}function MU(e){const t=Sn(),n={sid:Xr(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>LU(n)};return e&&fu(n,e),n}function fu(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Sn(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:Xr()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function DU(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),fu(e,n)}function LU(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}function Qd(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&Object.keys(t).length===0)return e;const r={...e};for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=Qd(r[s],t[s],n-1));return r}function Ji(){return Xr()}function Ui(){return Xr().substring(16)}const gy="_sentrySpan";function hu(e,t){t?Qr(e,gy,t):delete e[gy]}function dp(e){return e[gy]}const $U=100;class hi{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Ji(),sampleRand:Math.random()}}clone(){const t=new hi;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,hu(t,dp(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&fu(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n=typeof t=="function"?t(this):t,r=n instanceof hi?n.getScopeData():ad(n)?t:void 0,{tags:s,extra:i,user:o,contexts:a,level:l,fingerprint:u=[],propagationContext:c}=r||{};return this._tags={...this._tags,...s},this._extra={...this._extra,...i},this._contexts={...this._contexts,...a},o&&Object.keys(o).length&&(this._user=o),l&&(this._level=l),u.length&&(this._fingerprint=u),c&&(this._propagationContext=c),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,hu(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Ji(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){var i;const r=typeof n=="number"?n:$U;if(r<=0)return this;const s={timestamp:cl(),...t,message:t.message?cp(t.message,2048):t.message};return this._breadcrumbs.push(s),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),(i=this._client)==null||i.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:dp(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=Qd(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=(n==null?void 0:n.event_id)||Xr();if(!this._client)return je&&Ae.warn("No client configured on scope - will not capture exception!"),r;const s=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:s,...n,event_id:r},this),r}captureMessage(t,n,r){const s=(r==null?void 0:r.event_id)||Xr();if(!this._client)return je&&Ae.warn("No client configured on scope - will not capture message!"),s;const i=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:i,...r,event_id:s},this),s}captureEvent(t,n){const r=(n==null?void 0:n.event_id)||Xr();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(je&&Ae.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function FU(){return Vu("defaultCurrentScope",()=>new hi)}function NU(){return Vu("defaultIsolationScope",()=>new hi)}class BU{constructor(t,n){let r;t?r=t:r=new hi;let s;n?s=n:s=new hi,this._stack=[{scope:r}],this._isolationScope=s}withScope(t){const n=this._pushScope();let r;try{r=t(n)}catch(s){throw this._popScope(),s}return zu(r)?r.then(s=>(this._popScope(),s),s=>{throw this._popScope(),s}):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function pu(){const e=ul(),t=Sm(e);return t.stack=t.stack||new BU(FU(),NU())}function VU(e){return pu().withScope(e)}function UU(e,t){const n=pu();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function E_(e){return pu().withScope(()=>e(pu().getIsolationScope()))}function zU(){return{withIsolationScope:E_,withScope:VU,withSetScope:UU,withSetIsolationScope:(e,t)=>E_(t),getCurrentScope:()=>pu().getScope(),getIsolationScope:()=>pu().getIsolationScope()}}function ju(e){const t=Sm(e);return t.acs?t.acs:zU()}function Mt(){const e=ul();return ju(e).getCurrentScope()}function bi(){const e=ul();return ju(e).getIsolationScope()}function HU(){return Vu("globalScope",()=>new hi)}function km(...e){const t=ul(),n=ju(t);if(e.length===2){const[r,s]=e;return r?n.withSetScope(r,s):n.withScope(s)}return n.withScope(e[0])}function ht(){return Mt().getClient()}function jU(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:s}=t,i={trace_id:n,span_id:s||Ui()};return r&&(i.parent_span_id=r),i}const Mr="sentry.source",P1="sentry.sample_rate",QR="sentry.previous_trace_sample_rate",Zi="sentry.op",cn="sentry.origin",ld="sentry.idle_span_finish_reason",Jd="sentry.measurement_unit",Zd="sentry.measurement_value",C_="sentry.custom_span_name",R1="sentry.profile_id",Wu="sentry.exclusive_time",WU="sentry.link.type",qU=0,JR=1,Rn=2;function GU(e){if(e<400&&e>=100)return{code:JR};if(e>=400&&e<500)switch(e){case 401:return{code:Rn,message:"unauthenticated"};case 403:return{code:Rn,message:"permission_denied"};case 404:return{code:Rn,message:"not_found"};case 409:return{code:Rn,message:"already_exists"};case 413:return{code:Rn,message:"failed_precondition"};case 429:return{code:Rn,message:"resource_exhausted"};case 499:return{code:Rn,message:"cancelled"};default:return{code:Rn,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:Rn,message:"unimplemented"};case 503:return{code:Rn,message:"unavailable"};case 504:return{code:Rn,message:"deadline_exceeded"};default:return{code:Rn,message:"internal_error"}}return{code:Rn,message:"unknown_error"}}function ZR(e,t){e.setAttribute("http.response.status_code",t);const n=GU(t);n.message!=="unknown_error"&&e.setStatus(n)}const eI="_sentryScope",tI="_sentryIsolationScope";function KU(e){try{const t=_t.WeakRef;if(typeof t=="function")return new t(e)}catch{}return e}function YU(e){if(e){if(typeof e=="object"&&"deref"in e&&typeof e.deref=="function")try{return e.deref()}catch{return}return e}}function XU(e,t,n){e&&(Qr(e,tI,KU(n)),Qr(e,eI,t))}function fp(e){const t=e;return{scope:t[eI],isolationScope:YU(t[tI])}}const I1="sentry-",QU=/^sentry-/,JU=8192;function nI(e){const t=e3(e);if(!t)return;const n=Object.entries(t).reduce((r,[s,i])=>{if(s.match(QU)){const o=s.slice(I1.length);r[o]=i}return r},{});if(Object.keys(n).length>0)return n}function ZU(e){if(!e)return;const t=Object.entries(e).reduce((n,[r,s])=>(s&&(n[`${I1}${r}`]=s),n),{});return t3(t)}function e3(e){if(!(!e||!Bi(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=T_(n);return Object.entries(r).forEach(([s,i])=>{t[s]=i}),t},{}):T_(e)}function T_(e){return e.split(",").map(t=>{const n=t.indexOf("=");if(n===-1)return[];const r=t.slice(0,n),s=t.slice(n+1);return[r,s].map(i=>{try{return decodeURIComponent(i.trim())}catch{return}})}).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function t3(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],s)=>{const i=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,o=s===0?i:`${t},${i}`;return o.length>JU?(je&&Ae.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):o},"")}const n3=/^o(\d+)\./,r3=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function s3(e){return e==="http"||e==="https"}function qu(e,t=!1){const{host:n,path:r,pass:s,port:i,projectId:o,protocol:a,publicKey:l}=e;return`${a}://${l}${t&&s?`:${s}`:""}@${n}${i?`:${i}`:""}/${r&&`${r}/`}${o}`}function i3(e){const t=r3.exec(e);if(!t){so(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,s="",i="",o="",a=""]=t.slice(1);let l="",u=a;const c=u.split("/");if(c.length>1&&(l=c.slice(0,-1).join("/"),u=c.pop()),u){const d=u.match(/^\d+/);d&&(u=d[0])}return rI({host:i,pass:s,path:l,projectId:u,port:o,protocol:n,publicKey:r})}function rI(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function o3(e){if(!je)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(o=>e[o]?!1:(Ae.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:n.match(/^\d+$/)?s3(r)?t&&isNaN(parseInt(t,10))?(Ae.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(Ae.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(Ae.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function a3(e){const t=e.match(n3);return t==null?void 0:t[1]}function l3(e){const t=e.getOptions(),{host:n}=e.getDsn()||{};let r;return t.orgId?r=String(t.orgId):n&&(r=a3(n)),r}function u3(e){const t=typeof e=="string"?i3(e):rI(e);if(!(!t||!o3(t)))return t}function Ja(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(!(typeof t!="number"||isNaN(t)||t<0||t>1))return t}const sI=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function c3(e){if(!e)return;const t=e.match(sI);if(!t)return;let n;return t[3]==="1"?n=!0:t[3]==="0"&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function d3(e,t){const n=c3(e),r=nI(t);if(!(n!=null&&n.traceId))return{traceId:Ji(),sampleRand:Math.random()};const s=f3(n,r);r&&(r.sample_rand=s.toString());const{traceId:i,parentSpanId:o,parentSampled:a}=n;return{traceId:i,parentSpanId:o,sampled:a,dsc:r||{},sampleRand:s}}function iI(e=Ji(),t=Ui(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function oI(e=Ji(),t=Ui(),n){return`00-${e}-${t}-${n?"01":"00"}`}function f3(e,t){const n=Ja(t==null?void 0:t.sample_rand);if(n!==void 0)return n;const r=Ja(t==null?void 0:t.sample_rate);return r&&(e==null?void 0:e.parentSampled)!==void 0?e.parentSampled?Math.random()*r:r+Math.random()*(1-r):Math.random()}const aI=0,A1=1;let P_=!1;function h3(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:s,parent_span_id:i,status:o,origin:a,links:l}=vt(e);return{parent_span_id:i,span_id:t,trace_id:n,data:r,op:s,status:o,origin:a,links:l}}function p3(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),s=r?t:vt(e).parent_span_id,i=fp(e).scope,o=r?(i==null?void 0:i.getPropagationContext().propagationSpanId)||Ui():t;return{parent_span_id:s,span_id:o,trace_id:n}}function m3(e){const{traceId:t,spanId:n}=e.spanContext(),r=Zo(e);return iI(t,n,r)}function g3(e){const{traceId:t,spanId:n}=e.spanContext(),r=Zo(e);return oI(t,n,r)}function lI(e){if(e&&e.length>0)return e.map(({context:{spanId:t,traceId:n,traceFlags:r,...s},attributes:i})=>({span_id:t,trace_id:n,sampled:r===A1,attributes:i,...s}))}function Ba(e){return typeof e=="number"?R_(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?R_(e.getTime()):Sn()}function R_(e){return e>9999999999?e/1e3:e}function vt(e){var r;if(y3(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(v3(e)){const{attributes:s,startTime:i,name:o,endTime:a,status:l,links:u}=e,c="parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?(r=e.parentSpanContext)==null?void 0:r.spanId:void 0;return{span_id:t,trace_id:n,data:s,description:o,parent_span_id:c,start_timestamp:Ba(i),timestamp:Ba(a)||void 0,status:uI(l),op:s[Zi],origin:s[cn],links:lI(u)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function v3(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function y3(e){return typeof e.getSpanJSON=="function"}function Zo(e){const{traceFlags:t}=e.spanContext();return t===A1}function uI(e){if(!(!e||e.code===qU))return e.code===JR?"ok":e.message||"unknown_error"}const Va="_sentryChildSpans",vy="_sentryRootSpan";function cI(e,t){const n=e[vy]||e;Qr(t,vy,n),e[Va]?e[Va].add(t):Qr(e,Va,new Set([t]))}function b3(e,t){e[Va]&&e[Va].delete(t)}function bh(e){const t=new Set;function n(r){if(!t.has(r)&&Zo(r)){t.add(r);const s=r[Va]?Array.from(r[Va]):[];for(const i of s)n(i)}}return n(e),Array.from(t)}function Kn(e){return e[vy]||e}function Jn(){const e=ul(),t=ju(e);return t.getActiveSpan?t.getActiveSpan():dp(Mt())}function yy(){P_||(so(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),P_=!0)}let I_=!1;function w3(){if(I_)return;function e(){const t=Jn(),n=t&&Kn(t);if(n){const r="internal_error";je&&Ae.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:Rn,message:r})}}e.tag="sentry_tracingErrorCallback",I_=!0,VR(e),UR(e)}function hs(e){var n;if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=e||((n=ht())==null?void 0:n.getOptions());return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function A_(e){Ae.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function hp(e,t){if(!(t!=null&&t.length)||!e.description)return!1;for(const n of t){if(_3(n)){if(yh(e.description,n))return je&&A_(e),!0;continue}if(!n.name&&!n.op)continue;const r=n.name?yh(e.description,n.name):!0,s=n.op?e.op&&yh(e.op,n.op):!0;if(r&&s)return je&&A_(e),!0}return!1}function S3(e,t){const n=t.parent_span_id,r=t.span_id;if(n)for(const s of e)s.parent_span_id===r&&(s.parent_span_id=n)}function _3(e){return typeof e=="string"||e instanceof RegExp}const O1="production",dI="_frozenDsc";function wh(e,t){Qr(e,dI,t)}function fI(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},s={environment:n.environment||O1,release:n.release,public_key:r,trace_id:e,org_id:l3(t)};return t.emit("createDsc",s),s}function hI(e,t){const n=t.getPropagationContext();return n.dsc||fI(n.traceId,e)}function eo(e){var g;const t=ht();if(!t)return{};const n=Kn(e),r=vt(n),s=r.data,i=n.spanContext().traceState,o=(i==null?void 0:i.get("sentry.sample_rate"))??s[P1]??s[QR];function a(m){return(typeof o=="number"||typeof o=="string")&&(m.sample_rate=`${o}`),m}const l=n[dI];if(l)return a(l);const u=i==null?void 0:i.get("sentry.dsc"),c=u&&nI(u);if(c)return a(c);const d=fI(e.spanContext().traceId,t),f=s[Mr],h=r.description;return f!=="url"&&h&&(d.transaction=h),hs()&&(d.sampled=String(Zo(n)),d.sample_rand=(i==null?void 0:i.get("sentry.sample_rand"))??((g=fp(n).scope)==null?void 0:g.getPropagationContext().sampleRand.toString())),a(d),t.emit("createDsc",d,n),d}class zo{constructor(t={}){this._traceId=t.traceId||Ji(),this._spanId=t.spanId||Ui()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:aI}}end(t){}setAttribute(t,n){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}addEvent(t,n,r){return this}addLink(t){return this}addLinks(t){return this}recordException(t,n){}}function Is(e,t=100,n=1/0){try{return by("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function pI(e,t=3,n=100*1024){const r=Is(e,t);return C3(r)>n?pI(e,t-1,n):r}function by(e,t,n=1/0,r=1/0,s=T3()){const[i,o]=s;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const a=k3(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;const l=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(l===0)return a.replace("object ","");if(i(t))return"[Circular ~]";const u=t;if(u&&typeof u.toJSON=="function")try{const h=u.toJSON();return by("",h,l-1,r,s)}catch{}const c=Array.isArray(t)?[]:{};let d=0;const f=KR(t);for(const h in f){if(!Object.prototype.hasOwnProperty.call(f,h))continue;if(d>=r){c[h]="[MaxProperties ~]";break}const g=f[h];c[h]=by(h,g,l-1,r,s),d++}return o(t),c}function k3(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(jR(t))return"[VueViewModel]";if(EU(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${Xi(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=x3(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function x3(e){const t=Object.getPrototypeOf(e);return t!=null&&t.constructor?t.constructor.name:"null prototype"}function E3(e){return~-encodeURI(e).split(/%..|./).length}function C3(e){return E3(JSON.stringify(e))}function T3(){const e=new WeakSet;function t(r){return e.has(r)?!0:(e.add(r),!1)}function n(r){e.delete(r)}return[t,n]}function ea(e,t=[]){return[e,t]}function P3(e,t){const[n,r]=e;return[n,[...r,t]]}function O_(e,t){const n=e[1];for(const r of n){const s=r[0].type;if(t(r,s))return!0}return!1}function wy(e){const t=Sm(_t);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function R3(e){const[t,n]=e;let r=JSON.stringify(t);function s(i){typeof r=="string"?r=typeof i=="string"?r+i:[wy(r),i]:r.push(typeof i=="string"?wy(i):i)}for(const i of n){const[o,a]=i;if(s(`
|
|
35
|
+
${JSON.stringify(o)}
|
|
36
|
+
`),typeof a=="string"||a instanceof Uint8Array)s(a);else{let l;try{l=JSON.stringify(a)}catch{l=JSON.stringify(Is(a))}s(l)}}return typeof r=="string"?r:I3(r)}function I3(e){const t=e.reduce((s,i)=>s+i.length,0),n=new Uint8Array(t);let r=0;for(const s of e)n.set(s,r),r+=s.length;return n}function A3(e){return[{type:"span"},e]}function O3(e){const t=typeof e.data=="string"?wy(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const M3={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item",metric:"metric",trace_metric:"metric"};function M_(e){return M3[e]}function M1(e){if(!(e!=null&&e.sdk))return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function mI(e,t,n,r){var i;const s=(i=e.sdkProcessingMetadata)==null?void 0:i.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:qu(r)},...s&&{trace:s}}}function D3(e,t){var r,s,i,o;if(!t)return e;const n=e.sdk||{};return e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...((r=e.sdk)==null?void 0:r.integrations)||[],...t.integrations||[]],packages:[...((s=e.sdk)==null?void 0:s.packages)||[],...t.packages||[]],settings:(i=e.sdk)!=null&&i.settings||t.settings?{...(o=e.sdk)==null?void 0:o.settings,...t.settings}:void 0},e}function L3(e,t,n,r){const s=M1(n),i={sent_at:new Date().toISOString(),...s&&{sdk:s},...!!r&&t&&{dsn:qu(t)}},o="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return ea(i,[o])}function $3(e,t,n,r){const s=M1(n),i=e.type&&e.type!=="replay_event"?e.type:"event";D3(e,n==null?void 0:n.sdk);const o=mI(e,s,r,t);return delete e.sdkProcessingMetadata,ea(o,[[{type:i},e]])}function F3(e,t){function n(h){return!!h.trace_id&&!!h.public_key}const r=eo(e[0]),s=t==null?void 0:t.getDsn(),i=t==null?void 0:t.getOptions().tunnel,o={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!i&&s&&{dsn:qu(s)}},{beforeSendSpan:a,ignoreSpans:l}=(t==null?void 0:t.getOptions())||{},u=l!=null&&l.length?e.filter(h=>!hp(vt(h),l)):e,c=e.length-u.length;c&&(t==null||t.recordDroppedEvent("before_send","span",c));const d=a?h=>{const g=vt(h),m=a(g);return m||(yy(),g)}:vt,f=[];for(const h of u){const g=d(h);g&&f.push(A3(g))}return ea(o,f)}function N3(e){if(!je)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=vt(e),{spanId:s}=e.spanContext(),i=Zo(e),o=Kn(e),a=o===e,l=`[Tracing] Starting ${i?"sampled":"unsampled"} ${a?"root ":""}span`,u=[`op: ${n}`,`name: ${t}`,`ID: ${s}`];if(r&&u.push(`parent ID: ${r}`),!a){const{op:c,description:d}=vt(o);u.push(`root ID: ${o.spanContext().spanId}`),c&&u.push(`root op: ${c}`),d&&u.push(`root description: ${d}`)}Ae.log(`${l}
|
|
37
|
+
${u.join(`
|
|
38
|
+
`)}`)}function B3(e){if(!je)return;const{description:t="< unknown name >",op:n="< unknown op >"}=vt(e),{spanId:r}=e.spanContext(),i=Kn(e)===e,o=`[Tracing] Finishing "${n}" ${i?"root ":""}span "${t}" with ID ${r}`;Ae.log(o)}function V3(e,t,n,r=Jn()){const s=r&&Kn(r);s&&(je&&Ae.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),s.addEvent(e,{[Zd]:t,[Jd]:n}))}function D_(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},s=r[Jd],i=r[Zd];typeof s=="string"&&typeof i=="number"&&(t[n.name]={value:i,unit:s})}),t}const L_=1e3;class xm{constructor(t={}){this._traceId=t.traceId||Ji(),this._spanId=t.spanId||Ui(),this._startTime=t.startTimestamp||Sn(),this._links=t.links,this._attributes={},this.setAttributes({[cn]:"manual",[Zi]:t.op,...t.attributes}),this._name=t.name,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.endTimestamp&&(this._endTime=t.endTimestamp),this._events=[],this._isStandaloneSpan=t.isStandalone,this._endTime&&this._onSpanEnded()}addLink(t){return this._links?this._links.push(t):this._links=[t],this}addLinks(t){return this._links?this._links.push(...t):this._links=t,this}recordException(t,n){}spanContext(){const{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?A1:aI}}setAttribute(t,n){return n===void 0?delete this._attributes[t]:this._attributes[t]=n,this}setAttributes(t){return Object.keys(t).forEach(n=>this.setAttribute(n,t[n])),this}updateStartTime(t){this._startTime=Ba(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute(Mr,"custom"),this}end(t){this._endTime||(this._endTime=Ba(t),B3(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[Zi],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:uI(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[cn],profile_id:this._attributes[R1],exclusive_time:this._attributes[Wu],measurements:D_(this._events),is_segment:this._isStandaloneSpan&&Kn(this)===this||void 0,segment_id:this._isStandaloneSpan?Kn(this).spanContext().spanId:void 0,links:lI(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){je&&Ae.log("[Tracing] Adding an event to span:",t);const s=$_(n)?n:r||Sn(),i=$_(n)?{}:n||{},o={name:t,time:Ba(s),attributes:i};return this._events.push(o),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=ht();if(t&&t.emit("spanEnd",this),!(this._isStandaloneSpan||this===Kn(this)))return;if(this._isStandaloneSpan){this._sampled?z3(F3([this],t)):(je&&Ae.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}const r=this._convertSpanToTransaction();r&&(fp(this).scope||Mt()).captureEvent(r)}_convertSpanToTransaction(){var c;if(!F_(vt(this)))return;this._name||(je&&Ae.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:t,isolationScope:n}=fp(this),r=(c=t==null?void 0:t.getScopeData().sdkProcessingMetadata)==null?void 0:c.normalizedRequest;if(this._sampled!==!0)return;const i=bh(this).filter(d=>d!==this&&!U3(d)).map(d=>vt(d)).filter(F_),o=this._attributes[Mr];delete this._attributes[C_],i.forEach(d=>{delete d.data[C_]});const a={contexts:{trace:h3(this)},spans:i.length>L_?i.sort((d,f)=>d.start_timestamp-f.start_timestamp).slice(0,L_):i,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,dynamicSamplingContext:eo(this)},request:r,...o&&{transaction_info:{source:o}}},l=D_(this._events);return l&&Object.keys(l).length&&(je&&Ae.log("[Measurements] Adding measurements to transaction event",JSON.stringify(l,void 0,2)),a.measurements=l),a}}function $_(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function F_(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function U3(e){return e instanceof xm&&e.isStandaloneSpan()}function z3(e){const t=ht();if(!t)return;const n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}function H3(e,t,n=()=>{},r=()=>{}){let s;try{s=e()}catch(i){throw t(i),n(),i}return j3(s,t,n,r)}function j3(e,t,n,r){return zu(e)?e.then(s=>(n(),r(s),s),s=>{throw t(s),n(),s}):(n(),r(e),e)}function W3(e,t,n){if(!hs(e))return[!1];let r,s;typeof e.tracesSampler=="function"?(s=e.tracesSampler({...t,inheritOrSampleWith:a=>typeof t.parentSampleRate=="number"?t.parentSampleRate:typeof t.parentSampled=="boolean"?Number(t.parentSampled):a}),r=!0):t.parentSampled!==void 0?s=t.parentSampled:typeof e.tracesSampleRate<"u"&&(s=e.tracesSampleRate,r=!0);const i=Ja(s);if(i===void 0)return je&&Ae.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(s)} of type ${JSON.stringify(typeof s)}.`),[!1];if(!i)return je&&Ae.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,i,r];const o=n<i;return o||je&&Ae.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(s)})`),[o,i,r]}const gI="__SENTRY_SUPPRESS_TRACING__";function q3(e,t){const n=L1();if(n.startSpan)return n.startSpan(e,t);const r=yI(e),{forceTransaction:s,parentSpan:i,scope:o}=e,a=o==null?void 0:o.clone();return km(a,()=>K3(i)(()=>{const u=Mt(),c=bI(u,i),f=e.onlyIfParent&&!c?new zo:vI({parentSpan:c,spanArguments:r,forceTransaction:s,scope:u});return hu(u,f),H3(()=>t(f),()=>{const{status:h}=vt(f);f.isRecording()&&(!h||h==="ok")&&f.setStatus({code:Rn,message:"internal_error"})},()=>{f.end()})}))}function Ho(e){const t=L1();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=yI(e),{forceTransaction:r,parentSpan:s}=e;return(e.scope?o=>km(e.scope,o):s!==void 0?o=>D1(s,o):o=>o())(()=>{const o=Mt(),a=bI(o,s);return e.onlyIfParent&&!a?new zo:vI({parentSpan:a,spanArguments:n,forceTransaction:r,scope:o})})}function D1(e,t){const n=L1();return n.withActiveSpan?n.withActiveSpan(e,t):km(r=>(hu(r,e||void 0),t(r)))}function vI({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!hs()){const o=new zo;if(n||!e){const a={sampled:"false",sample_rate:"0",transaction:t.name,...eo(o)};wh(o,a)}return o}const s=bi();let i;if(e&&!n)i=G3(e,r,t),cI(e,i);else if(e){const o=eo(e),{traceId:a,spanId:l}=e.spanContext(),u=Zo(e);i=N_({traceId:a,parentSpanId:l,...t},r,u),wh(i,o)}else{const{traceId:o,dsc:a,parentSpanId:l,sampled:u}={...s.getPropagationContext(),...r.getPropagationContext()};i=N_({traceId:o,parentSpanId:l,...t},r,u),a&&wh(i,a)}return N3(i),XU(i,r,s),i}function yI(e){const n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const r={...n};return r.startTimestamp=Ba(e.startTime),delete r.startTime,r}return n}function L1(){const e=ul();return ju(e)}function N_(e,t,n){var g;const r=ht(),s=(r==null?void 0:r.getOptions())||{},{name:i=""}=e,o={spanAttributes:{...e.attributes},spanName:i,parentSampled:n};r==null||r.emit("beforeSampling",o,{decision:!1});const a=o.parentSampled??n,l=o.spanAttributes,u=t.getPropagationContext(),[c,d,f]=t.getScopeData().sdkProcessingMetadata[gI]?[!1]:W3(s,{name:i,parentSampled:a,attributes:l,parentSampleRate:Ja((g=u.dsc)==null?void 0:g.sample_rate)},u.sampleRand),h=new xm({...e,attributes:{[Mr]:"custom",[P1]:d!==void 0&&f?d:void 0,...l},sampled:c});return!c&&r&&(je&&Ae.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),r.recordDroppedEvent("sample_rate","transaction")),r&&r.emit("spanStart",h),h}function G3(e,t,n){const{spanId:r,traceId:s}=e.spanContext(),i=t.getScopeData().sdkProcessingMetadata[gI]?!1:Zo(e),o=i?new xm({...n,parentSpanId:r,traceId:s,sampled:i}):new zo({traceId:s});cI(e,o);const a=ht();return a&&(a.emit("spanStart",o),n.endTimestamp&&a.emit("spanEnd",o)),o}function bI(e,t){if(t)return t;if(t===null)return;const n=dp(e);if(!n)return;const r=ht();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?Kn(n):n}function K3(e){return e!==void 0?t=>D1(e,t):t=>t()}const Sh={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},Y3="heartbeatFailed",X3="idleTimeout",Q3="finalTimeout",J3="externalFinish";function wI(e,t={}){const n=new Map;let r=!1,s,i=J3,o=!t.disableAutoFinish;const a=[],{idleTimeout:l=Sh.idleTimeout,finalTimeout:u=Sh.finalTimeout,childSpanTimeout:c=Sh.childSpanTimeout,beforeSpanEnd:d,trimIdleSpanEndTimestamp:f=!0}=t,h=ht();if(!h||!hs()){const A=new zo,E={sample_rate:"0",sampled:"false",...eo(A)};return wh(A,E),A}const g=Mt(),m=Jn(),y=Z3(e);y.end=new Proxy(y.end,{apply(A,E,T){if(d&&d(y),E instanceof zo)return;const[R,...I]=T,O=R||Sn(),H=Ba(O),N=bh(y).filter(L=>L!==y),D=vt(y);if(!N.length||!f)return P(H),Reflect.apply(A,E,[H,...I]);const W=h.getOptions().ignoreSpans,U=N==null?void 0:N.reduce((L,oe)=>{const j=vt(oe);return!j.timestamp||W&&hp(j,W)?L:L?Math.max(L,j.timestamp):j.timestamp},void 0),Q=D.start_timestamp,V=Math.min(Q?Q+u/1e3:1/0,Math.max(Q||-1/0,Math.min(H,U||1/0)));return P(V),Reflect.apply(A,E,[V,...I])}});function w(){s&&(clearTimeout(s),s=void 0)}function b(A){w(),s=setTimeout(()=>{!r&&n.size===0&&o&&(i=X3,y.end(A))},l)}function x(A){s=setTimeout(()=>{!r&&o&&(i=Y3,y.end(A))},c)}function _(A){w(),n.set(A,!0);const E=Sn();x(E+c/1e3)}function S(A){if(n.has(A)&&n.delete(A),n.size===0){const E=Sn();b(E+l/1e3)}}function P(A){r=!0,n.clear(),a.forEach(H=>H()),hu(g,m);const E=vt(y),{start_timestamp:T}=E;if(!T)return;E.data[ld]||y.setAttribute(ld,i),Ae.log(`[Tracing] Idle span "${E.op}" finished`);const I=bh(y).filter(H=>H!==y);let O=0;I.forEach(H=>{H.isRecording()&&(H.setStatus({code:Rn,message:"cancelled"}),H.end(A),je&&Ae.log("[Tracing] Cancelling span since span ended early",JSON.stringify(H,void 0,2)));const N=vt(H),{timestamp:D=0,start_timestamp:W=0}=N,U=W<=A,Q=(u+l)/1e3,V=D-W<=Q;if(je){const L=JSON.stringify(H,void 0,2);U?V||Ae.log("[Tracing] Discarding span since it finished after idle span final timeout",L):Ae.log("[Tracing] Discarding span since it happened after idle span was finished",L)}(!V||!U)&&(b3(y,H),O++)}),O>0&&y.setAttribute("sentry.idle_span_discarded_spans",O)}return a.push(h.on("spanStart",A=>{if(r||A===y||vt(A).timestamp||A instanceof xm&&A.isStandaloneSpan())return;bh(y).includes(A)&&_(A.spanContext().spanId)})),a.push(h.on("spanEnd",A=>{r||S(A.spanContext().spanId)})),a.push(h.on("idleSpanEnableAutoFinish",A=>{A===y&&(o=!0,b(),n.size&&x())})),t.disableAutoFinish||b(),setTimeout(()=>{r||(y.setStatus({code:Rn,message:"deadline_exceeded"}),i=Q3,y.end())},u),y}function Z3(e){const t=Ho(e);return hu(Mt(),t),je&&Ae.log("[Tracing] Started span is an idle span"),t}const Ng=0,B_=1,V_=2;function Em(e){return new ud(t=>{t(e)})}function $1(e){return new ud((t,n)=>{n(e)})}class ud{constructor(t){this._state=Ng,this._handlers=[],this._runExecutor(t)}then(t,n){return new ud((r,s)=>{this._handlers.push([!1,i=>{if(!t)r(i);else try{r(t(i))}catch(o){s(o)}},i=>{if(!n)s(i);else try{r(n(i))}catch(o){s(o)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new ud((n,r)=>{let s,i;return this.then(o=>{i=!1,s=o,t&&t()},o=>{i=!0,s=o,t&&t()}).then(()=>{if(i){r(s);return}n(s)})})}_executeHandlers(){if(this._state===Ng)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===B_&&n[1](this._value),this._state===V_&&n[2](this._value),n[0]=!0)})}_runExecutor(t){const n=(i,o)=>{if(this._state===Ng){if(zu(o)){o.then(r,s);return}this._state=i,this._value=o,this._executeHandlers()}},r=i=>{n(B_,i)},s=i=>{n(V_,i)};try{t(r,s)}catch(i){s(i)}}}function e5(e,t,n,r=0){try{const s=Sy(t,n,e,r);return zu(s)?s:Em(s)}catch(s){return $1(s)}}function Sy(e,t,n,r){const s=n[r];if(!e||!s)return e;const i=s({...e},t);return je&&i===null&&Ae.log(`Event processor "${s.id||"?"}" dropped event`),zu(i)?i.then(o=>Sy(o,t,n,r+1)):Sy(i,t,n,r+1)}function t5(e,t){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:i}=t;n5(e,t),r&&i5(e,r),o5(e,n),r5(e,s),s5(e,i)}function U_(e,t){const{extra:n,tags:r,user:s,contexts:i,level:o,sdkProcessingMetadata:a,breadcrumbs:l,fingerprint:u,eventProcessors:c,attachments:d,propagationContext:f,transactionName:h,span:g}=t;Cf(e,"extra",n),Cf(e,"tags",r),Cf(e,"user",s),Cf(e,"contexts",i),e.sdkProcessingMetadata=Qd(e.sdkProcessingMetadata,a,2),o&&(e.level=o),h&&(e.transactionName=h),g&&(e.span=g),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),c.length&&(e.eventProcessors=[...e.eventProcessors,...c]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...f}}function Cf(e,t,n){e[t]=Qd(e[t],n,1)}function n5(e,t){const{extra:n,tags:r,user:s,contexts:i,level:o,transactionName:a}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(s).length&&(e.user={...s,...e.user}),Object.keys(i).length&&(e.contexts={...i,...e.contexts}),o&&(e.level=o),a&&e.type!=="transaction"&&(e.transaction=a)}function r5(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function s5(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function i5(e,t){e.contexts={trace:p3(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:eo(t),...e.sdkProcessingMetadata};const n=Kn(t),r=vt(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function o5(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}let Tf,z_,Pf;function a5(e){const t=_t._sentryDebugIds;if(!t)return{};const n=Object.keys(t);return Pf&&n.length===z_||(z_=n.length,Pf=n.reduce((r,s)=>{Tf||(Tf={});const i=Tf[s];if(i)r[i[0]]=i[1];else{const o=e(s);for(let a=o.length-1;a>=0;a--){const l=o[a],u=l==null?void 0:l.filename,c=t[s];if(u&&c){r[u]=c,Tf[s]=[u,c];break}}}return r},{})),Pf}function SI(e,t,n,r,s,i){const{normalizeDepth:o=3,normalizeMaxBreadth:a=1e3}=e,l={...t,event_id:t.event_id||n.event_id||Xr(),timestamp:t.timestamp||cl()},u=n.integrations||e.integrations.map(y=>y.name);l5(l,e),d5(l,u),s&&s.emit("applyFrameMetadata",t),t.type===void 0&&u5(l,e.stackParser);const c=h5(r,n.captureContext);n.mechanism&&du(l,n.mechanism);const d=s?s.getEventProcessors():[],f=HU().getScopeData();if(i){const y=i.getScopeData();U_(f,y)}if(c){const y=c.getScopeData();U_(f,y)}const h=[...n.attachments||[],...f.attachments];h.length&&(n.attachments=h),t5(l,f);const g=[...d,...f.eventProcessors];return e5(g,l,n).then(y=>(y&&c5(y),typeof o=="number"&&o>0?f5(y,o,a):y))}function l5(e,t){const{environment:n,release:r,dist:s,maxValueLength:i=250}=t;e.environment=e.environment||n||O1,!e.release&&r&&(e.release=r),!e.dist&&s&&(e.dist=s);const o=e.request;o!=null&&o.url&&(o.url=cp(o.url,i))}function u5(e,t){var r,s;const n=a5(t);(s=(r=e.exception)==null?void 0:r.values)==null||s.forEach(i=>{var o,a;(a=(o=i.stacktrace)==null?void 0:o.frames)==null||a.forEach(l=>{l.filename&&(l.debug_id=n[l.filename])})})}function c5(e){var r,s;const t={};if((s=(r=e.exception)==null?void 0:r.values)==null||s.forEach(i=>{var o,a;(a=(o=i.stacktrace)==null?void 0:o.frames)==null||a.forEach(l=>{l.debug_id&&(l.abs_path?t[l.abs_path]=l.debug_id:l.filename&&(t[l.filename]=l.debug_id),delete l.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([i,o])=>{n.push({type:"sourcemap",code_file:i,debug_id:o})})}function d5(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function f5(e,t,n){var s,i;if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(o=>({...o,...o.data&&{data:Is(o.data,t,n)}}))},...e.user&&{user:Is(e.user,t,n)},...e.contexts&&{contexts:Is(e.contexts,t,n)},...e.extra&&{extra:Is(e.extra,t,n)}};return(s=e.contexts)!=null&&s.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Is(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(o=>({...o,...o.data&&{data:Is(o.data,t,n)}}))),(i=e.contexts)!=null&&i.flags&&r.contexts&&(r.contexts.flags=Is(e.contexts.flags,3,n)),r}function h5(e,t){if(!t)return e;const n=e?e.clone():new hi;return n.update(t),n}function p5(e){if(e)return m5(e)?{captureContext:e}:v5(e)?{captureContext:e}:e}function m5(e){return e instanceof hi||typeof e=="function"}const g5=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function v5(e){return Object.keys(e).some(t=>g5.includes(t))}function fi(e,t){return Mt().captureException(e,p5(t))}function _I(e,t){return Mt().captureEvent(e,t)}function y5(e,t){bi().setContext(e,t)}function b5(){const e=ht();return(e==null?void 0:e.getOptions().enabled)!==!1&&!!(e!=null&&e.getTransport())}function w5(e){bi().addEventProcessor(e)}function H_(e){const t=bi(),n=Mt(),{userAgent:r}=_t.navigator||{},s=MU({user:n.getUser()||t.getUser(),...r&&{userAgent:r},...e}),i=t.getSession();return(i==null?void 0:i.status)==="ok"&&fu(i,{status:"exited"}),kI(),t.setSession(s),s}function kI(){const e=bi(),n=Mt().getSession()||e.getSession();n&&DU(n),xI(),e.setSession()}function xI(){const e=bi(),t=ht(),n=e.getSession();n&&t&&t.captureSession(n)}function j_(e=!1){if(e){kI();return}xI()}const S5="7";function _5(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function k5(e){return`${_5(e)}${e.projectId}/envelope/`}function x5(e,t){const n={sentry_version:S5};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function E5(e,t,n){return t||`${k5(e)}?${x5(e,n)}`}const W_=[];function C5(e){const t={};return e.forEach(n=>{const{name:r}=n,s=t[r];s&&!s.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function T5(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(s=>{s.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){const s=n(t);r=Array.isArray(s)?s:[s]}else r=t;return C5(r)}function P5(e,t){const n={};return t.forEach(r=>{r&&EI(e,r,n)}),n}function q_(e,t){for(const n of t)n!=null&&n.afterAllSetup&&n.afterAllSetup(e)}function EI(e,t,n){if(n[t.name]){je&&Ae.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,W_.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),W_.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(s,i)=>r(s,i,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),s=Object.assign((i,o)=>r(i,o,e),{id:t.name});e.addEventProcessor(s)}je&&Ae.log(`Integration installed: ${t.name}`)}function R5(e,t,n){const r=[{type:"client_report"},{timestamp:cl(),discarded_events:e}];return ea(t?{dsn:t}:{},[r])}function CI(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n!=null&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function I5(e){var l;const{trace_id:t,parent_span_id:n,span_id:r,status:s,origin:i,data:o,op:a}=((l=e.contexts)==null?void 0:l.trace)??{};return{data:o??{},description:e.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:s,timestamp:e.timestamp,trace_id:t??"",origin:i,profile_id:o==null?void 0:o[R1],exclusive_time:o==null?void 0:o[Wu],measurements:e.measurements,is_segment:!0}}function A5(e){return{type:"transaction",timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{[R1]:e.profile_id},...e.exclusive_time&&{[Wu]:e.exclusive_time}}}},measurements:e.measurements}}const G_="Not capturing exception because it's already been captured.",K_="Discarded session because of missing or non-string release",TI=Symbol.for("SentryInternalError"),PI=Symbol.for("SentryDoNotSendEventError");function _h(e){return{message:e,[TI]:!0}}function Bg(e){return{message:e,[PI]:!0}}function Y_(e){return!!e&&typeof e=="object"&&TI in e}function X_(e){return!!e&&typeof e=="object"&&PI in e}class O5{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=u3(t.dsn):je&&Ae.warn("No DSN provided, client will not send events."),this._dsn){const n=E5(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}}captureException(t,n,r){const s=Xr();if(k_(t))return je&&Ae.log(G_),s;const i={event_id:s,...n};return this._process(this.eventFromException(t,i).then(o=>this._captureEvent(o,i,r))),i.event_id}captureMessage(t,n,r,s){const i={event_id:Xr(),...r},o=E1(t)?t:String(t),a=od(t)?this.eventFromMessage(o,n,i):this.eventFromException(t,i);return this._process(a.then(l=>this._captureEvent(l,i,s))),i.event_id}captureEvent(t,n,r){const s=Xr();if(n!=null&&n.originalException&&k_(n.originalException))return je&&Ae.log(G_),s;const i={event_id:s,...n},o=t.sdkProcessingMetadata||{},a=o.capturedSpanScope,l=o.capturedSpanIsolationScope;return this._process(this._captureEvent(t,i,a||r,l)),i.event_id}captureSession(t){this.sendSession(t),fu(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(t){const n=this._transport;if(!n)return!0;this.emit("flush");const r=await this._isClientDoneProcessing(t),s=await n.flush(t);return r&&s}async close(t){const n=await this.flush(t);return this.getOptions().enabled=!1,this.emit("close"),n}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const n=this._integrations[t.name];EI(this,t,this._integrations),n||q_(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=$3(t,this._dsn,this._options._metadata,this._options.tunnel);for(const s of n.attachments||[])r=P3(r,O3(s));this.sendEnvelope(r).then(s=>this.emit("afterSendEvent",t,s))}sendSession(t){const{release:n,environment:r=O1}=this._options;if("aggregates"in t){const i=t.attrs||{};if(!i.release&&!n){je&&Ae.warn(K_);return}i.release=i.release||n,i.environment=i.environment||r,t.attrs=i}else{if(!t.release&&!n){je&&Ae.warn(K_);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const s=L3(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(s)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){const s=`${t}:${n}`;je&&Ae.log(`Recording outcome: "${s}"${r>1?` (${r} times)`:""}`),this._outcomes[s]=(this._outcomes[s]||0)+r}}on(t,n){const r=this._hooks[t]=this._hooks[t]||new Set,s=(...i)=>n(...i);return r.add(s),()=>{r.delete(s)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(s=>s(...n))}async sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)try{return await this._transport.send(t)}catch(n){return je&&Ae.error("Error while sending envelope:",n),{}}return je&&Ae.error("Transport disabled"),{}}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=P5(this,t),q_(this,t)}_updateSessionFromEvent(t,n){var l;let r=n.level==="fatal",s=!1;const i=(l=n.exception)==null?void 0:l.values;if(i){s=!0;for(const u of i){const c=u.mechanism;if((c==null?void 0:c.handled)===!1){r=!0;break}}}const o=t.status==="ok";(o&&t.errors===0||o&&r)&&(fu(t,{...r&&{status:"crashed"},errors:t.errors||Number(s||r)}),this.captureSession(t))}async _isClientDoneProcessing(t){let n=0;for(;!t||n<t;){if(await new Promise(r=>setTimeout(r,1)),!this._numProcessing)return!0;n++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,s){const i=this.getOptions(),o=Object.keys(this._integrations);return!n.integrations&&(o!=null&&o.length)&&(n.integrations=o),this.emit("preprocessEvent",t,n),t.type||s.setLastEventId(t.event_id||n.event_id),SI(i,t,n,r,this,s).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:jU(r),...a.contexts};const l=hI(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:l,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},r=Mt(),s=bi()){return je&&_y(t)&&Ae.log(`Captured error event \`${CI(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,s).then(i=>i.event_id,i=>{je&&(X_(i)?Ae.log(i.message):Y_(i)?Ae.warn(i.message):Ae.warn(i))})}_processEvent(t,n,r,s){const i=this.getOptions(),{sampleRate:o}=i,a=RI(t),l=_y(t),u=t.type||"error",c=`before send for type \`${u}\``,d=typeof o>"u"?void 0:Ja(o);if(l&&typeof d=="number"&&Math.random()>d)return this.recordDroppedEvent("sample_rate","error"),$1(Bg(`Discarding event because it's not included in the random sample (sampling rate = ${o})`));const f=u==="replay_event"?"replay":u;return this._prepareEvent(t,n,r,s).then(h=>{if(h===null)throw this.recordDroppedEvent("event_processor",f),Bg("An event processor returned `null`, will not send event.");if(n.data&&n.data.__sentry__===!0)return h;const m=D5(this,i,h,n);return M5(m,c)}).then(h=>{var y;if(h===null){if(this.recordDroppedEvent("before_send",f),a){const b=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",b)}throw Bg(`${c} returned \`null\`, will not send event.`)}const g=r.getSession()||s.getSession();if(l&&g&&this._updateSessionFromEvent(g,h),a){const w=((y=h.sdkProcessingMetadata)==null?void 0:y.spanCountBeforeProcessing)||0,b=h.spans?h.spans.length:0,x=w-b;x>0&&this.recordDroppedEvent("before_send","span",x)}const m=h.transaction_info;if(a&&m&&h.transaction!==t.transaction){const w="custom";h.transaction_info={...m,source:w}}return this.sendEvent(h,n),h}).then(null,h=>{throw X_(h)||Y_(h)?h:(this.captureException(h,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:h}),_h(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
39
|
+
Reason: ${h}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[s,i]=n.split(":");return{reason:s,category:i,quantity:r}})}_flushOutcomes(){je&&Ae.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){je&&Ae.log("No outcomes to send");return}if(!this._dsn){je&&Ae.log("No dsn provided, will not send outcomes");return}je&&Ae.log("Sending outcomes:",t);const n=R5(t,this._options.tunnel&&qu(this._dsn));this.sendEnvelope(n)}}function M5(e,t){const n=`${t} must return \`null\` or a valid event.`;if(zu(e))return e.then(r=>{if(!ad(r)&&r!==null)throw _h(n);return r},r=>{throw _h(`${t} rejected with ${r}`)});if(!ad(e)&&e!==null)throw _h(n);return e}function D5(e,t,n,r){const{beforeSend:s,beforeSendTransaction:i,beforeSendSpan:o,ignoreSpans:a}=t;let l=n;if(_y(l)&&s)return s(l,r);if(RI(l)){if(o||a){const u=I5(l);if(a!=null&&a.length&&hp(u,a))return null;if(o){const c=o(u);c?l=Qd(n,A5(c)):yy()}if(l.spans){const c=[],d=l.spans;for(const h of d){if(a!=null&&a.length&&hp(h,a)){S3(d,h);continue}if(o){const g=o(h);g?c.push(g):(yy(),c.push(h))}else c.push(h)}const f=l.spans.length-c.length;f&&e.recordDroppedEvent("before_send","span",f),l.spans=c}}if(i){if(l.spans){const u=l.spans.length;l.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:u}}return i(l,r)}}return l}function _y(e){return e.type===void 0}function RI(e){return e.type==="transaction"}function L5(e){return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{items:e}]}function $5(e,t,n,r){const s={};return t!=null&&t.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=qu(r)),ea(s,[L5(e)])}function Vg(e,t){const n=F5(e)??[];if(n.length===0)return;const r=e.getOptions(),s=$5(n,r._metadata,r.tunnel,e.getDsn());II().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(s)}function F5(e){return II().get(e)}function II(){return Vu("clientToLogBufferMap",()=>new WeakMap)}function N5(e){return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{items:e}]}function B5(e,t,n,r){const s={};return t!=null&&t.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=qu(r)),ea(s,[N5(e)])}function Ug(e,t){const n=V5(e)??[];if(n.length===0)return;const r=e.getOptions(),s=B5(n,r._metadata,r.tunnel,e.getDsn());AI().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(s)}function V5(e){return AI().get(e)}function AI(){return Vu("clientToMetricBufferMap",()=>new WeakMap)}function U5(e,t){t.debug===!0&&(je?Ae.enable():so(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Mt().update(t.initialScope);const r=new e(t);return z5(r),r.init(),r}function z5(e){Mt().setClient(e)}const OI=Symbol.for("SentryBufferFullError");function H5(e=100){const t=new Set;function n(){return t.size<e}function r(o){t.delete(o)}function s(o){if(!n())return $1(OI);const a=o();return t.add(a),a.then(()=>r(a),()=>r(a)),a}function i(o){if(!t.size)return Em(!0);const a=Promise.allSettled(Array.from(t)).then(()=>!0);if(!o)return a;const l=[a,new Promise(u=>setTimeout(()=>u(!1),o))];return Promise.race(l)}return{get $(){return Array.from(t)},add:s,drain:i}}const j5=60*1e3;function W5(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?j5:r-t}function q5(e,t){return e[t]||e.all||0}function MI(e,t,n=Date.now()){return q5(e,t)>n}function DI(e,{statusCode:t,headers:n},r=Date.now()){const s={...e},i=n==null?void 0:n["x-sentry-rate-limits"],o=n==null?void 0:n["retry-after"];if(i)for(const a of i.trim().split(",")){const[l,u,,,c]=a.split(":",5),d=parseInt(l,10),f=(isNaN(d)?60:d)*1e3;if(!u)s.all=r+f;else for(const h of u.split(";"))h==="metric_bucket"?(!c||c.split(";").includes("custom"))&&(s[h]=r+f):s[h]=r+f}else o?s.all=r+W5(o,r):t===429&&(s.all=r+60*1e3);return s}const G5=64;function K5(e,t,n=H5(e.bufferSize||G5)){let r={};const s=o=>n.drain(o);function i(o){const a=[];if(O_(o,(d,f)=>{const h=M_(f);MI(r,h)?e.recordDroppedEvent("ratelimit_backoff",h):a.push(d)}),a.length===0)return Promise.resolve({});const l=ea(o[0],a),u=d=>{O_(l,(f,h)=>{e.recordDroppedEvent(d,M_(h))})},c=()=>t({body:R3(l)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&je&&Ae.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=DI(r,d),d),d=>{throw u("network_error"),je&&Ae.error("Encountered error running transport request:",d),d});return n.add(c).then(d=>d,d=>{if(d===OI)return je&&Ae.error("Skipped sending event because buffer is full."),u("queue_overflow"),Promise.resolve({});throw d})}return{send:i,flush:s}}const Y5="thismessage:/";function F1(e){return"isRelative"in e}function N1(e,t){const n=e.indexOf("://")<=0&&e.indexOf("//")!==0,r=n?Y5:void 0;try{if("canParse"in URL&&!URL.canParse(e,r))return;const s=new URL(e,r);return n?{isRelative:n,pathname:s.pathname,search:s.search,hash:s.hash}:s}catch{}}function X5(e){if(F1(e))return e.pathname;const t=new URL(e);return t.search="",t.hash="",["80","443"].includes(t.port)&&(t.port=""),t.password&&(t.password="%filtered%"),t.username&&(t.username="%filtered%"),t.toString()}function Ua(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function Q5(e){return e.split(/[?#]/,1)[0]}function J5(e,t){const n=t==null?void 0:t.getDsn(),r=t==null?void 0:t.getOptions().tunnel;return e4(e,n)||Z5(e,r)}function Z5(e,t){return t?Q_(e)===Q_(t):!1}function e4(e,t){const n=N1(e);return!n||F1(n)?!1:t?n.host.includes(t.host)&&/(^|&|\?)sentry_key=/.test(n.search):!1}function Q_(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function t4(e){var t;"aggregates"in e?((t=e.attrs)==null?void 0:t.ip_address)===void 0&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):e.ipAddress===void 0&&(e.ipAddress="{{auto}}")}function LI(e,t,n=[t],r="npm"){const s=e._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${t}`,packages:n.map(i=>({name:`${r}:@sentry/${i}`,version:Na})),version:Na}),e._metadata=s}function $I(e={}){const t=e.client||ht();if(!b5()||!t)return{};const n=ul(),r=ju(n);if(r.getTraceData)return r.getTraceData(e);const s=e.scope||Mt(),i=e.span||Jn(),o=i?m3(i):n4(s),a=i?eo(i):hI(t,s),l=ZU(a);if(!sI.test(o))return Ae.warn("Invalid sentry-trace data. Cannot generate trace data"),{};const c={"sentry-trace":o,baggage:l};if(e.propagateTraceparent){const d=i?g3(i):r4(s);d&&(c.traceparent=d)}return c}function n4(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return iI(t,r,n)}function r4(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return oI(t,r,n)}function s4(e,t,n){let r,s,i;const o=n!=null&&n.maxWait?Math.max(n.maxWait,t):0,a=(n==null?void 0:n.setTimeoutImpl)||setTimeout;function l(){return u(),r=e(),r}function u(){s!==void 0&&clearTimeout(s),i!==void 0&&clearTimeout(i),s=i=void 0}function c(){return s!==void 0||i!==void 0?l():r}function d(){return s&&clearTimeout(s),s=a(l,t),o&&i===void 0&&(i=a(l,o)),r}return d.cancel=u,d.flush=c,d}const i4=100;function jo(e,t){const n=ht(),r=bi();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:i=i4}=n.getOptions();if(i<=0)return;const a={timestamp:cl(),...e},l=s?so(()=>s(a,t)):a;l!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",l,t),r.addBreadcrumb(l,i))}let J_;const o4="FunctionToString",Z_=new WeakMap,a4=()=>({name:o4,setupOnce(){J_=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=T1(this),n=Z_.has(ht())&&t!==void 0?t:this;return J_.apply(n,e)}}catch{}},setup(e){Z_.set(e,!0)}}),l4=a4,u4=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],c4="EventFilters",d4=(e={})=>{let t;return{name:c4,setup(n){const r=n.getOptions();t=ek(e,r)},processEvent(n,r,s){if(!t){const i=s.getOptions();t=ek(e,i)}return h4(n,t)?null:n}}},f4=(e={})=>({...d4(e),name:"InboundFilters"});function ek(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:u4],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function h4(e,t){if(e.type){if(e.type==="transaction"&&m4(e,t.ignoreTransactions))return je&&Ae.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
40
|
+
Event: ${va(e)}`),!0}else{if(p4(e,t.ignoreErrors))return je&&Ae.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
41
|
+
Event: ${va(e)}`),!0;if(b4(e))return je&&Ae.warn(`Event dropped due to not having an error message, error type or stacktrace.
|
|
42
|
+
Event: ${va(e)}`),!0;if(g4(e,t.denyUrls))return je&&Ae.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
43
|
+
Event: ${va(e)}.
|
|
44
|
+
Url: ${pp(e)}`),!0;if(!v4(e,t.allowUrls))return je&&Ae.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
45
|
+
Event: ${va(e)}.
|
|
46
|
+
Url: ${pp(e)}`),!0}return!1}function p4(e,t){return t!=null&&t.length?CI(e).some(n=>Vi(n,t)):!1}function m4(e,t){if(!(t!=null&&t.length))return!1;const n=e.transaction;return n?Vi(n,t):!1}function g4(e,t){if(!(t!=null&&t.length))return!1;const n=pp(e);return n?Vi(n,t):!1}function v4(e,t){if(!(t!=null&&t.length))return!0;const n=pp(e);return n?Vi(n,t):!0}function y4(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function pp(e){var t,n;try{const r=[...((t=e.exception)==null?void 0:t.values)??[]].reverse().find(i=>{var o,a,l;return((o=i.mechanism)==null?void 0:o.parent_id)===void 0&&((l=(a=i.stacktrace)==null?void 0:a.frames)==null?void 0:l.length)}),s=(n=r==null?void 0:r.stacktrace)==null?void 0:n.frames;return s?y4(s):null}catch{return je&&Ae.error(`Cannot extract url for event ${va(e)}`),null}}function b4(e){var t,n;return(n=(t=e.exception)==null?void 0:t.values)!=null&&n.length?!e.message&&!e.exception.values.some(r=>r.stacktrace||r.type&&r.type!=="Error"||r.value):!1}function w4(e,t,n,r,s,i){var a;if(!((a=s.exception)!=null&&a.values)||!i||!Qi(i.originalException,Error))return;const o=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;o&&(s.exception.values=ky(e,t,r,i.originalException,n,s.exception.values,o,0))}function ky(e,t,n,r,s,i,o,a){if(i.length>=n+1)return i;let l=[...i];if(Qi(r[s],Error)){tk(o,a);const u=e(t,r[s]),c=l.length;nk(u,s,c,a),l=ky(e,t,n,r[s],s,[u,...l],u,c)}return Array.isArray(r.errors)&&r.errors.forEach((u,c)=>{if(Qi(u,Error)){tk(o,a);const d=e(t,u),f=l.length;nk(d,`errors[${c}]`,f,a),l=ky(e,t,n,u,s,[d,...l],d,f)}}),l}function tk(e,t){e.mechanism={handled:!0,type:"auto.core.linked_errors",...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function nk(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function S4(e){const t="console";Qo(t,e),Jo(t,_4)}function _4(){"console"in _t&&dU.forEach(function(e){e in _t.console&&Or(_t.console,e,function(t){return up[e]=t,function(...n){fs("console",{args:n,level:e});const s=up[e];s==null||s.apply(_t.console,n)}})})}function FI(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const k4="Dedupe",x4=()=>{let e;return{name:k4,processEvent(t){if(t.type)return t;try{if(C4(t,e))return je&&Ae.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},E4=x4;function C4(e,t){return t?!!(T4(e,t)||P4(e,t)):!1}function T4(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!BI(e,t)||!NI(e,t))}function P4(e,t){const n=rk(t),r=rk(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!BI(e,t)||!NI(e,t))}function NI(e,t){let n=v_(e),r=v_(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let s=0;s<r.length;s++){const i=r[s],o=n[s];if(i.filename!==o.filename||i.lineno!==o.lineno||i.colno!==o.colno||i.function!==o.function)return!1}return!0}function BI(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function rk(e){var t,n;return(n=(t=e.exception)==null?void 0:t.values)==null?void 0:n[0]}function R4(e,t,n,r,s){if(!e.fetchData)return;const{method:i,url:o}=e.fetchData,a=hs()&&t(o);if(e.endTimestamp&&a){const h=e.fetchData.__span;if(!h)return;const g=r[h];g&&(A4(g,e),delete r[h]);return}const{spanOrigin:l="auto.http.browser",propagateTraceparent:u=!1}=typeof s=="object"?s:{spanOrigin:s},c=!!Jn(),d=a&&c?Ho(M4(o,i,l)):new zo;if(e.fetchData.__span=d.spanContext().spanId,r[d.spanContext().spanId]=d,n(e.fetchData.url)){const h=e.args[0],g=e.args[1]||{},m=I4(h,g,hs()&&c?d:void 0,u);m&&(e.args[1]=g,g.headers=m)}const f=ht();if(f){const h={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};f.emit("beforeOutgoingRequestSpan",d,h)}return d}function I4(e,t,n,r){const s=$I({span:n,propagateTraceparent:r}),i=s["sentry-trace"],o=s.baggage,a=s.traceparent;if(!i)return;const l=t.headers||(WR(e)?e.headers:void 0);if(l)if(O4(l)){const u=new Headers(l);if(u.get("sentry-trace")||u.set("sentry-trace",i),r&&a&&!u.get("traceparent")&&u.set("traceparent",a),o){const c=u.get("baggage");c?Rf(c)||u.set("baggage",`${c},${o}`):u.set("baggage",o)}return u}else if(Array.isArray(l)){const u=[...l];l.find(d=>d[0]==="sentry-trace")||u.push(["sentry-trace",i]),r&&a&&!l.find(d=>d[0]==="traceparent")&&u.push(["traceparent",a]);const c=l.find(d=>d[0]==="baggage"&&Rf(d[1]));return o&&!c&&u.push(["baggage",o]),u}else{const u="sentry-trace"in l?l["sentry-trace"]:void 0,c="traceparent"in l?l.traceparent:void 0,d="baggage"in l?l.baggage:void 0,f=d?Array.isArray(d)?[...d]:[d]:[],h=d&&(Array.isArray(d)?d.find(m=>Rf(m)):Rf(d));o&&!h&&f.push(o);const g={...l,"sentry-trace":u??i,baggage:f.length>0?f.join(","):void 0};return r&&a&&!c&&(g.traceparent=a),g}else return{...s}}function A4(e,t){var n,r;if(t.response){ZR(e,t.response.status);const s=(r=(n=t.response)==null?void 0:n.headers)==null?void 0:r.get("content-length");if(s){const i=parseInt(s);i>0&&e.setAttribute("http.response_content_length",i)}}else t.error&&e.setStatus({code:Rn,message:"internal_error"});e.end()}function Rf(e){return e.split(",").some(t=>t.trim().startsWith(I1))}function O4(e){return typeof Headers<"u"&&Qi(e,Headers)}function M4(e,t,n){const r=N1(e);return{name:r?`${t} ${X5(r)}`:t,attributes:D4(e,r,t,n)}}function D4(e,t,n,r){const s={url:e,type:"fetch","http.method":n,[cn]:r,[Zi]:"http.client"};return t&&(F1(t)||(s["http.url"]=t.href,s["server.address"]=t.host),t.search&&(s["http.query"]=t.search),t.hash&&(s["http.fragment"]=t.hash)),s}function VI(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const cd=_t;function L4(){return"history"in cd&&!!cd.history}function $4(){if(!("fetch"in cd))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function xy(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function F4(){var n;if(typeof EdgeRuntime=="string")return!0;if(!$4())return!1;if(xy(cd.fetch))return!0;let e=!1;const t=cd.document;if(t&&typeof t.createElement=="function")try{const r=t.createElement("iframe");r.hidden=!0,t.head.appendChild(r),(n=r.contentWindow)!=null&&n.fetch&&(e=xy(r.contentWindow.fetch)),t.head.removeChild(r)}catch(r){je&&Ae.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return e}function UI(e,t){const n="fetch";Qo(n,e),Jo(n,()=>zI(void 0,t))}function N4(e){const t="fetch-body-resolved";Qo(t,e),Jo(t,()=>zI(V4))}function zI(e,t=!1){t&&!F4()||Or(_t,"fetch",function(n){return function(...r){const s=new Error,{method:i,url:o}=U4(r),a={args:r,fetchData:{method:i,url:o},startTimestamp:Sn()*1e3,virtualError:s,headers:z4(r)};return e||fs("fetch",{...a}),n.apply(_t,r).then(async l=>(e?e(l):fs("fetch",{...a,endTimestamp:Sn()*1e3,response:l}),l),l=>{if(fs("fetch",{...a,endTimestamp:Sn()*1e3,error:l}),x1(l)&&l.stack===void 0&&(l.stack=s.stack,Qr(l,"framesToPop",1)),l instanceof TypeError&&(l.message==="Failed to fetch"||l.message==="Load failed"||l.message==="NetworkError when attempting to fetch resource."))try{const u=new URL(a.fetchData.url);l.message=`${l.message} (${u.host})`}catch{}throw l})}})}async function B4(e,t){if(e!=null&&e.body){const n=e.body,r=n.getReader(),s=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3);let i=!0;for(;i;){let o;try{o=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:a}=await r.read();clearTimeout(o),a&&(t(),i=!1)}catch{i=!1}finally{clearTimeout(o)}}clearTimeout(s),r.releaseLock(),n.cancel().then(null,()=>{})}}function V4(e){let t;try{t=e.clone()}catch{return}B4(t,()=>{fs("fetch-body-resolved",{endTimestamp:Sn()*1e3,response:e})})}function Ey(e,t){return!!e&&typeof e=="object"&&!!e[t]}function sk(e){return typeof e=="string"?e:e?Ey(e,"url")?e.url:e.toString?e.toString():"":""}function U4(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:sk(n),method:Ey(r,"method")?String(r.method).toUpperCase():"GET"}}const t=e[0];return{url:sk(t),method:Ey(t,"method")?String(t.method).toUpperCase():"GET"}}function z4(e){const[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(WR(t))return new Headers(t.headers)}catch{}}function H4(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function j4(){return"npm"}function W4(){return!H4()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function ik(){return typeof window<"u"&&(!W4()||q4())}function q4(){const e=_t.process;return(e==null?void 0:e.type)==="renderer"}const xt=_t;let Cy=0;function HI(){return Cy>0}function G4(){Cy++,setTimeout(()=>{Cy--})}function mu(e,t={}){function n(s){return typeof s=="function"}if(!n(e))return e;try{const s=e.__sentry_wrapped__;if(s)return typeof s=="function"?s:e;if(T1(e))return e}catch{return e}const r=function(...s){try{const i=s.map(o=>mu(o,t));return e.apply(this,i)}catch(i){throw G4(),km(o=>{o.addEventProcessor(a=>(t.mechanism&&(my(a,void 0),du(a,t.mechanism)),a.extra={...a.extra,arguments:s},a)),fi(i)}),i}};try{for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])}catch{}GR(r,e),Qr(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function B1(){const e=Hu(),{referrer:t}=xt.document||{},{userAgent:n}=xt.navigator||{},r={...t&&{Referer:t},...n&&{"User-Agent":n}};return{url:e,headers:r}}function V1(e,t){const n=U1(e,t),r={type:J4(t),value:Z4(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function K4(e,t,n,r){const s=ht(),i=s==null?void 0:s.getOptions().normalizeDepth,o=sz(t),a={__serialized__:pI(t,i)};if(o)return{exception:{values:[V1(e,o)]},extra:a};const l={exception:{values:[{type:_m(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:nz(t,{isUnhandledRejection:r})}]},extra:a};if(n){const u=U1(e,n);u.length&&(l.exception.values[0].stacktrace={frames:u})}return l}function zg(e,t){return{exception:{values:[V1(e,t)]}}}function U1(e,t){const n=t.stacktrace||t.stack||"",r=X4(t),s=Q4(t);try{return e(n,r,s)}catch{}return[]}const Y4=/Minified React error #\d+;/i;function X4(e){return e&&Y4.test(e.message)?1:0}function Q4(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function jI(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function J4(e){const t=e==null?void 0:e.name;return!t&&jI(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function Z4(e){const t=e==null?void 0:e.message;return jI(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function ez(e,t,n,r){const s=(n==null?void 0:n.syntheticException)||void 0,i=z1(e,t,s,r);return du(i),i.level="error",n!=null&&n.event_id&&(i.event_id=n.event_id),Em(i)}function tz(e,t,n="info",r,s){const i=(r==null?void 0:r.syntheticException)||void 0,o=Ty(e,t,i,s);return o.level=n,r!=null&&r.event_id&&(o.event_id=r.event_id),Em(o)}function z1(e,t,n,r,s){let i;if(HR(t)&&t.error)return zg(e,t.error);if(b_(t)||_U(t)){const o=t;if("stack"in t)i=zg(e,t);else{const a=o.name||(b_(o)?"DOMError":"DOMException"),l=o.message?`${a}: ${o.message}`:a;i=Ty(e,l,n,r),my(i,l)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}return x1(t)?zg(e,t):ad(t)||_m(t)?(i=K4(e,t,n,s),du(i,{synthetic:!0}),i):(i=Ty(e,t,n,r),my(i,`${t}`),du(i,{synthetic:!0}),i)}function Ty(e,t,n,r){const s={};if(r&&n){const i=U1(e,n);i.length&&(s.exception={values:[{value:t,stacktrace:{frames:i}}]}),du(s,{synthetic:!0})}if(E1(t)){const{__sentry_template_string__:i,__sentry_template_values__:o}=t;return s.logentry={message:i,params:o},s}return s.message=t,s}function nz(e,{isUnhandledRejection:t}){const n=PU(e),r=t?"promise rejection":"exception";return HR(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:_m(e)?`Event \`${rz(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function rz(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function sz(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}const ok=5e3;class iz extends O5{constructor(t){var l;const n=oz(t),r=xt.SENTRY_SDK_SOURCE||j4();LI(n,"browser",["browser"],r),(l=n._metadata)!=null&&l.sdk&&(n._metadata.sdk.settings={infer_ip:n.sendDefaultPii?"auto":"never",...n._metadata.sdk.settings}),super(n);const{sendDefaultPii:s,sendClientReports:i,enableLogs:o,_experiments:a}=this._options;xt.document&&(i||o||a!=null&&a.enableMetrics)&&xt.document.addEventListener("visibilitychange",()=>{xt.document.visibilityState==="hidden"&&(i&&this._flushOutcomes(),o&&Vg(this),a!=null&&a.enableMetrics&&Ug(this))}),o&&(this.on("flush",()=>{Vg(this)}),this.on("afterCaptureLog",()=>{this._logFlushIdleTimeout&&clearTimeout(this._logFlushIdleTimeout),this._logFlushIdleTimeout=setTimeout(()=>{Vg(this)},ok)})),a!=null&&a.enableMetrics&&(this.on("flush",()=>{Ug(this)}),this.on("afterCaptureMetric",()=>{this._metricFlushIdleTimeout&&clearTimeout(this._metricFlushIdleTimeout),this._metricFlushIdleTimeout=setTimeout(()=>{Ug(this)},ok)})),s&&this.on("beforeSendSession",t4)}eventFromException(t,n){return ez(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return tz(this._options.stackParser,t,n,r,this._options.attachStacktrace)}_prepareEvent(t,n,r,s){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r,s)}}function oz(e){var t;return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:(t=xt.SENTRY_RELEASE)==null?void 0:t.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}const gu=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Ze=_t,az=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",ef=(e,t,n,r)=>{let s,i;return o=>{t.value>=0&&(o||r)&&(i=t.value-(s??0),(i||s===void 0)&&(s=t.value,t.delta=i,t.rating=az(t.value,n),e(t)))}},lz=()=>`v5-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,tf=(e=!0)=>{var n,r;const t=(r=(n=Ze.performance)==null?void 0:n.getEntriesByType)==null?void 0:r.call(n,"navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},Gu=()=>{const e=tf();return(e==null?void 0:e.activationStart)??0},nf=(e,t=-1)=>{var i,o;const n=tf();let r="navigate";return n&&((i=Ze.document)!=null&&i.prerendering||Gu()>0?r="prerender":(o=Ze.document)!=null&&o.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:lz(),navigationType:r}},Hg=new WeakMap;function H1(e,t){return Hg.get(e)||Hg.set(e,new t),Hg.get(e)}class mp{constructor(){mp.prototype.__init.call(this),mp.prototype.__init2.call(this)}__init(){this._sessionValue=0}__init2(){this._sessionEntries=[]}_processEntry(t){var s;if(t.hadRecentInput)return;const n=this._sessionEntries[0],r=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&n&&r&&t.startTime-r.startTime<1e3&&t.startTime-n.startTime<5e3?(this._sessionValue+=t.value,this._sessionEntries.push(t)):(this._sessionValue=t.value,this._sessionEntries=[t]),(s=this._onAfterProcessingUnexpectedShift)==null||s.call(this,t)}}const Ku=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(s=>{Promise.resolve().then(()=>{t(s.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},j1=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let $c=-1;const uz=()=>{var e,t;return((e=Ze.document)==null?void 0:e.visibilityState)==="hidden"&&!((t=Ze.document)!=null&&t.prerendering)?0:1/0},gp=e=>{Ze.document.visibilityState==="hidden"&&$c>-1&&($c=e.type==="visibilitychange"?e.timeStamp:0,dz())},cz=()=>{addEventListener("visibilitychange",gp,!0),addEventListener("prerenderingchange",gp,!0)},dz=()=>{removeEventListener("visibilitychange",gp,!0),removeEventListener("prerenderingchange",gp,!0)},W1=()=>{var e;if(Ze.document&&$c<0){const t=Gu();$c=(Ze.document.prerendering||(e=globalThis.performance.getEntriesByType("visibility-state").filter(r=>r.name==="hidden"&&r.startTime>t)[0])==null?void 0:e.startTime)??uz(),cz()}return{get firstHiddenTime(){return $c}}},Cm=e=>{var t;(t=Ze.document)!=null&&t.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},fz=[1800,3e3],hz=(e,t={})=>{Cm(()=>{const n=W1(),r=nf("FCP");let s;const o=Ku("paint",a=>{for(const l of a)l.name==="first-contentful-paint"&&(o.disconnect(),l.startTime<n.firstHiddenTime&&(r.value=Math.max(l.startTime-Gu(),0),r.entries.push(l),s(!0)))});o&&(s=ef(e,r,fz,t.reportAllChanges))})},pz=[.1,.25],mz=(e,t={})=>{hz(j1(()=>{var a,l;const n=nf("CLS",0);let r;const s=H1(t,mp),i=u=>{for(const c of u)s._processEntry(c);s._sessionValue>n.value&&(n.value=s._sessionValue,n.entries=s._sessionEntries,r())},o=Ku("layout-shift",i);o&&(r=ef(e,n,pz,t.reportAllChanges),(a=Ze.document)==null||a.addEventListener("visibilitychange",()=>{var u;((u=Ze.document)==null?void 0:u.visibilityState)==="hidden"&&(i(o.takeRecords()),r(!0))}),(l=Ze==null?void 0:Ze.setTimeout)==null||l.call(Ze,r))}))};let WI=0,jg=1/0,If=0;const gz=e=>{e.forEach(t=>{t.interactionId&&(jg=Math.min(jg,t.interactionId),If=Math.max(If,t.interactionId),WI=If?(If-jg)/7+1:0)})};let Py;const qI=()=>Py?WI:performance.interactionCount||0,vz=()=>{"interactionCount"in performance||Py||(Py=Ku("event",gz,{type:"event",buffered:!0,durationThreshold:0}))},Wg=10;let GI=0;const yz=()=>qI()-GI;class vp{constructor(){vp.prototype.__init.call(this),vp.prototype.__init2.call(this)}__init(){this._longestInteractionList=[]}__init2(){this._longestInteractionMap=new Map}_resetInteractions(){GI=qI(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const t=Math.min(this._longestInteractionList.length-1,Math.floor(yz()/50));return this._longestInteractionList[t]}_processEntry(t){var s,i;if((s=this._onBeforeProcessingEntry)==null||s.call(this,t),!(t.interactionId||t.entryType==="first-input"))return;const n=this._longestInteractionList.at(-1);let r=this._longestInteractionMap.get(t.interactionId);if(r||this._longestInteractionList.length<Wg||t.duration>n._latency){if(r?t.duration>r._latency?(r.entries=[t],r._latency=t.duration):t.duration===r._latency&&t.startTime===r.entries[0].startTime&&r.entries.push(t):(r={id:t.interactionId,entries:[t],_latency:t.duration},this._longestInteractionMap.set(r.id,r),this._longestInteractionList.push(r)),this._longestInteractionList.sort((o,a)=>a._latency-o._latency),this._longestInteractionList.length>Wg){const o=this._longestInteractionList.splice(Wg);for(const a of o)this._longestInteractionMap.delete(a.id)}(i=this._onAfterProcessingINPCandidate)==null||i.call(this,r)}}}const q1=e=>{const t=n=>{var r;(n.type==="pagehide"||((r=Ze.document)==null?void 0:r.visibilityState)==="hidden")&&e(n)};Ze.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))},KI=e=>{var n;const t=Ze.requestIdleCallback||Ze.setTimeout;((n=Ze.document)==null?void 0:n.visibilityState)==="hidden"?e():(e=j1(e),t(e),q1(e))},bz=[200,500],wz=40,Sz=(e,t={})=>{globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&Cm(()=>{vz();const n=nf("INP");let r;const s=H1(t,vp),i=a=>{KI(()=>{for(const u of a)s._processEntry(u);const l=s._estimateP98LongestInteraction();l&&l._latency!==n.value&&(n.value=l._latency,n.entries=l.entries,r())})},o=Ku("event",i,{durationThreshold:t.durationThreshold??wz});r=ef(e,n,bz,t.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),q1(()=>{i(o.takeRecords()),r(!0)}))})};class _z{_processEntry(t){var n;(n=this._onBeforeProcessingEntry)==null||n.call(this,t)}}const kz=[2500,4e3],xz=(e,t={})=>{Cm(()=>{const n=W1(),r=nf("LCP");let s;const i=H1(t,_z),o=l=>{t.reportAllChanges||(l=l.slice(-1));for(const u of l)i._processEntry(u),u.startTime<n.firstHiddenTime&&(r.value=Math.max(u.startTime-Gu(),0),r.entries=[u],s())},a=Ku("largest-contentful-paint",o);if(a){s=ef(e,r,kz,t.reportAllChanges);const l=j1(()=>{o(a.takeRecords()),a.disconnect(),s(!0)});for(const u of["keydown","click","visibilitychange"])Ze.document&&addEventListener(u,()=>KI(l),{capture:!0,once:!0})}})},Ez=[800,1800],Ry=e=>{var t,n;(t=Ze.document)!=null&&t.prerendering?Cm(()=>Ry(e)):((n=Ze.document)==null?void 0:n.readyState)!=="complete"?addEventListener("load",()=>Ry(e),!0):setTimeout(e)},Cz=(e,t={})=>{const n=nf("TTFB"),r=ef(e,n,Ez,t.reportAllChanges);Ry(()=>{const s=tf();s&&(n.value=Math.max(s.responseStart-Gu(),0),n.entries=[s],r(!0))})},Fc={},yp={};let YI,XI,QI,JI;function G1(e,t=!1){return Tm("cls",e,Pz,YI,t)}function K1(e,t=!1){return Tm("lcp",e,Rz,XI,t)}function Tz(e){return Tm("ttfb",e,Iz,QI)}function ZI(e){return Tm("inp",e,Az,JI)}function Za(e,t){return eA(e,t),yp[e]||(Oz(e),yp[e]=!0),tA(e,t)}function rf(e,t){const n=Fc[e];if(n!=null&&n.length)for(const r of n)try{r(t)}catch(s){gu&&Ae.error(`Error while triggering instrumentation handler.
|
|
47
|
+
Type: ${e}
|
|
48
|
+
Name: ${Xi(r)}
|
|
49
|
+
Error:`,s)}}function Pz(){return mz(e=>{rf("cls",{metric:e}),YI=e},{reportAllChanges:!0})}function Rz(){return xz(e=>{rf("lcp",{metric:e}),XI=e},{reportAllChanges:!0})}function Iz(){return Cz(e=>{rf("ttfb",{metric:e}),QI=e})}function Az(){return Sz(e=>{rf("inp",{metric:e}),JI=e})}function Tm(e,t,n,r,s=!1){eA(e,t);let i;return yp[e]||(i=n(),yp[e]=!0),r&&t({metric:r}),tA(e,t,s?i:void 0)}function Oz(e){const t={};e==="event"&&(t.durationThreshold=0),Ku(e,n=>{rf(e,{entries:n})},t)}function eA(e,t){Fc[e]=Fc[e]||[],Fc[e].push(t)}function tA(e,t,n){return()=>{n&&n();const r=Fc[e];if(!r)return;const s=r.indexOf(t);s!==-1&&r.splice(s,1)}}function Mz(e){return"duration"in e}function qg(e){return typeof e=="number"&&isFinite(e)}function Wo(e,t,n,{...r}){const s=vt(e).start_timestamp;return s&&s>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),D1(e,()=>{const i=Ho({startTime:t,...r});return i&&i.end(n),i})}function Y1(e){var y;const t=ht();if(!t)return;const{name:n,transaction:r,attributes:s,startTime:i}=e,{release:o,environment:a,sendDefaultPii:l}=t.getOptions(),u=t.getIntegrationByName("Replay"),c=u==null?void 0:u.getReplayId(),d=Mt(),f=d.getUser(),h=f!==void 0?f.email||f.id||f.ip_address:void 0;let g;try{g=d.getScopeData().contexts.profile.profile_id}catch{}const m={release:o,environment:a,user:h||void 0,profile_id:g||void 0,replay_id:c||void 0,transaction:r,"user_agent.original":(y=Ze.navigator)==null?void 0:y.userAgent,"client.address":l?"{{auto}}":void 0,...s};return Ho({name:n,attributes:m,startTime:i,experimental:{standalone:!0}})}function sf(){return Ze.addEventListener&&Ze.performance}function gn(e){return e/1e3}function Dz(e){let t="unknown",n="unknown",r="";for(const s of e){if(s==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(s))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=s}return r===e&&(t=r),{name:t,version:n}}function nA(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function rA(e,t){let n,r=!1;function s(a){!r&&n&&t(a,n),r=!0}q1(()=>{s("pagehide")});const i=e.on("beforeStartNavigationSpan",(a,l)=>{l!=null&&l.isRedirect||(s("navigation"),i(),o())}),o=e.on("afterStartPageLoadSpan",a=>{n=a.spanContext().spanId,o()})}function Lz(e){let t=0,n;if(!nA("layout-shift"))return;const r=G1(({metric:s})=>{const i=s.entries[s.entries.length-1];i&&(t=s.value,n=i)},!0);rA(e,(s,i)=>{$z(t,n,i,s),r()})}function $z(e,t,n,r){var u;gu&&Ae.log(`Sending CLS span (${e})`);const s=t?gn((jr()||0)+t.startTime):Sn(),i=Mt().getScopeData().transactionName,o=t?ms((u=t.sources[0])==null?void 0:u.node):"Layout shift",a={[cn]:"auto.http.browser.cls",[Zi]:"ui.webvital.cls",[Wu]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t!=null&&t.sources&&t.sources.forEach((c,d)=>{a[`cls.source.${d+1}`]=ms(c.node)});const l=Y1({name:o,transaction:i,attributes:a,startTime:s});l&&(l.addEvent("cls",{[Jd]:"",[Zd]:e}),l.end(s))}function Fz(e){let t=0,n;if(!nA("largest-contentful-paint"))return;const r=K1(({metric:s})=>{const i=s.entries[s.entries.length-1];i&&(t=s.value,n=i)},!0);rA(e,(s,i)=>{Nz(t,n,i,s),r()})}function Nz(e,t,n,r){gu&&Ae.log(`Sending LCP span (${e})`);const s=gn((jr()||0)+((t==null?void 0:t.startTime)||0)),i=Mt().getScopeData().transactionName,o=t?ms(t.element):"Largest contentful paint",a={[cn]:"auto.http.browser.lcp",[Zi]:"ui.webvital.lcp",[Wu]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(a["lcp.element"]=ms(t.element)),t.id&&(a["lcp.id"]=t.id),t.url&&(a["lcp.url"]=t.url.trim().slice(0,200)),t.loadTime!=null&&(a["lcp.loadTime"]=t.loadTime),t.renderTime!=null&&(a["lcp.renderTime"]=t.renderTime),t.size!=null&&(a["lcp.size"]=t.size));const l=Y1({name:o,transaction:i,attributes:a,startTime:s});l&&(l.addEvent("lcp",{[Jd]:"millisecond",[Zd]:e}),l.end(s))}function es(e){return e&&((jr()||performance.timeOrigin)+e)/1e3}function sA(e){var n;const t={};if(e.nextHopProtocol!=null){const{name:r,version:s}=Dz(e.nextHopProtocol);t["network.protocol.version"]=s,t["network.protocol.name"]=r}return jr()||(n=sf())!=null&&n.timeOrigin?Bz({...t,"http.request.redirect_start":es(e.redirectStart),"http.request.redirect_end":es(e.redirectEnd),"http.request.worker_start":es(e.workerStart),"http.request.fetch_start":es(e.fetchStart),"http.request.domain_lookup_start":es(e.domainLookupStart),"http.request.domain_lookup_end":es(e.domainLookupEnd),"http.request.connect_start":es(e.connectStart),"http.request.secure_connection_start":es(e.secureConnectionStart),"http.request.connection_end":es(e.connectEnd),"http.request.request_start":es(e.requestStart),"http.request.response_start":es(e.responseStart),"http.request.response_end":es(e.responseEnd),"http.request.time_to_first_byte":e.responseStart!=null?e.responseStart/1e3:void 0}):t}function Bz(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null))}const Vz=2147483647;let ak=0,As={},Tr,Al;function Uz({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){const r=sf();if(r&&jr()){r.mark&&Ze.performance.mark("sentry-tracing-init");const s=t?Fz(n):qz(),i=Gz(),o=e?Lz(n):Wz();return()=>{s==null||s(),i(),o==null||o()}}return()=>{}}function zz(){Za("longtask",({entries:e})=>{const t=Jn();if(!t)return;const{op:n,start_timestamp:r}=vt(t);for(const s of e){const i=gn(jr()+s.startTime),o=gn(s.duration);n==="navigation"&&r&&i<r||Wo(t,i,i+o,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[cn]:"auto.ui.browser.metrics"}})}})}function Hz(){new PerformanceObserver(t=>{const n=Jn();if(n)for(const r of t.getEntries()){if(!r.scripts[0])continue;const s=gn(jr()+r.startTime),{start_timestamp:i,op:o}=vt(n);if(o==="navigation"&&i&&s<i)continue;const a=gn(r.duration),l={[cn]:"auto.ui.browser.metrics"},u=r.scripts[0],{invoker:c,invokerType:d,sourceURL:f,sourceFunctionName:h,sourceCharPosition:g}=u;l["browser.script.invoker"]=c,l["browser.script.invoker_type"]=d,f&&(l["code.filepath"]=f),h&&(l["code.function"]=h),g!==-1&&(l["browser.script.source_char_position"]=g),Wo(n,s,s+a,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:l})}}).observe({type:"long-animation-frame",buffered:!0})}function jz(){Za("event",({entries:e})=>{const t=Jn();if(t){for(const n of e)if(n.name==="click"){const r=gn(jr()+n.startTime),s=gn(n.duration),i={name:ms(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[cn]:"auto.ui.browser.metrics"}},o=qR(n.target);o&&(i.attributes["ui.component_name"]=o),Wo(t,r,r+s,i)}}})}function Wz(){return G1(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(As.cls={value:e.value,unit:""},Al=t)},!0)}function qz(){return K1(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(As.lcp={value:e.value,unit:"millisecond"},Tr=t)},!0)}function Gz(){return Tz(({metric:e})=>{e.entries[e.entries.length-1]&&(As.ttfb={value:e.value,unit:"millisecond"})})}function Kz(e,t){const n=sf(),r=jr();if(!(n!=null&&n.getEntries)||!r)return;const s=gn(r),i=n.getEntries(),{op:o,start_timestamp:a}=vt(e);i.slice(ak).forEach(l=>{const u=gn(l.startTime),c=gn(Math.max(0,l.duration));if(!(o==="navigation"&&a&&s+u<a))switch(l.entryType){case"navigation":{Qz(e,l,s);break}case"mark":case"paint":case"measure":{Yz(e,l,u,c,s,t.ignorePerformanceApiSpans);const d=W1(),f=l.startTime<d.firstHiddenTime;l.name==="first-paint"&&f&&(As.fp={value:l.startTime,unit:"millisecond"}),l.name==="first-contentful-paint"&&f&&(As.fcp={value:l.startTime,unit:"millisecond"});break}case"resource":{eH(e,l,l.name,u,c,s,t.ignoreResourceSpans);break}}}),ak=Math.max(i.length-1,0),tH(e),o==="pageload"&&(sH(As),t.recordClsOnPageloadSpan||delete As.cls,t.recordLcpOnPageloadSpan||delete As.lcp,Object.entries(As).forEach(([l,u])=>{V3(l,u.value,u.unit)}),e.setAttribute("performance.timeOrigin",s),e.setAttribute("performance.activationStart",Gu()),nH(e,t)),Tr=void 0,Al=void 0,As={}}function Yz(e,t,n,r,s,i){if(["mark","measure"].includes(t.entryType)&&Vi(t.name,i))return;const o=tf(!1),a=gn(o?o.requestStart:0),l=s+Math.max(n,a),u=s+n,c=u+r,d={[cn]:"auto.resource.browser.metrics"};l!==u&&(d["sentry.browser.measure_happened_before_request"]=!0,d["sentry.browser.measure_start_time"]=l),Xz(d,t),l<=c&&Wo(e,l,c,{name:t.name,op:t.entryType,attributes:d})}function Xz(e,t){try{const n=t.detail;if(!n)return;if(typeof n=="object"){for(const[r,s]of Object.entries(n))if(s&&od(s))e[`sentry.browser.measure.detail.${r}`]=s;else if(s!==void 0)try{e[`sentry.browser.measure.detail.${r}`]=JSON.stringify(s)}catch{}return}if(od(n)){e["sentry.browser.measure.detail"]=n;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}}function Qz(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{Af(e,t,r,n)}),Af(e,t,"secureConnection",n,"TLS/SSL"),Af(e,t,"fetch",n,"cache"),Af(e,t,"domainLookup",n,"DNS"),Zz(e,t,n)}function Af(e,t,n,r,s=n){const i=Jz(n),o=t[i],a=t[`${n}Start`];!a||!o||Wo(e,r+gn(a),r+gn(o),{op:`browser.${s}`,name:t.name,attributes:{[cn]:"auto.ui.browser.metrics",...n==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function Jz(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function Zz(e,t,n){const r=n+gn(t.requestStart),s=n+gn(t.responseEnd),i=n+gn(t.responseStart);t.responseEnd&&(Wo(e,r,s,{op:"browser.request",name:t.name,attributes:{[cn]:"auto.ui.browser.metrics"}}),Wo(e,i,s,{op:"browser.response",name:t.name,attributes:{[cn]:"auto.ui.browser.metrics"}}))}function eH(e,t,n,r,s,i,o){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const a=t.initiatorType?`resource.${t.initiatorType}`:"resource.other";if(o!=null&&o.includes(a))return;const l={[cn]:"auto.resource.browser.metrics"},u=Ua(n);u.protocol&&(l["url.scheme"]=u.protocol.split(":").pop()),u.host&&(l["server.address"]=u.host),l["url.same_origin"]=n.includes(Ze.location.origin),rH(t,l,[["responseStatus","http.response.status_code"],["transferSize","http.response_transfer_size"],["encodedBodySize","http.response_content_length"],["decodedBodySize","http.decoded_response_content_length"],["renderBlockingStatus","resource.render_blocking_status"],["deliveryType","http.response_delivery_type"]]);const c={...l,...sA(t)},d=i+r,f=d+s;Wo(e,d,f,{name:n.replace(Ze.location.origin,""),op:a,attributes:c})}function tH(e){const t=Ze.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute("connectionType",n.type),qg(n.rtt)&&(As["connection.rtt"]={value:n.rtt,unit:"millisecond"})),qg(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),qg(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}function nH(e,t){Tr&&t.recordLcpOnPageloadSpan&&(Tr.element&&e.setAttribute("lcp.element",ms(Tr.element)),Tr.id&&e.setAttribute("lcp.id",Tr.id),Tr.url&&e.setAttribute("lcp.url",Tr.url.trim().slice(0,200)),Tr.loadTime!=null&&e.setAttribute("lcp.loadTime",Tr.loadTime),Tr.renderTime!=null&&e.setAttribute("lcp.renderTime",Tr.renderTime),e.setAttribute("lcp.size",Tr.size)),Al!=null&&Al.sources&&t.recordClsOnPageloadSpan&&Al.sources.forEach((n,r)=>e.setAttribute(`cls.source.${r+1}`,ms(n.node)))}function rH(e,t,n){n.forEach(([r,s])=>{const i=e[r];i!=null&&(typeof i=="number"&&i<Vz||typeof i=="string")&&(t[s]=i)})}function sH(e){const t=tf(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}function iH(){return sf()&&jr()?Za("element",oH):()=>{}}const oH=({entries:e})=>{const t=Jn(),n=t?Kn(t):void 0,r=n?vt(n).description:Mt().getScopeData().transactionName;e.forEach(s=>{var h,g;const i=s;if(!i.identifier)return;const o=i.name,a=i.renderTime,l=i.loadTime,[u,c]=l?[gn(l),"load-time"]:a?[gn(a),"render-time"]:[Sn(),"entry-emission"],d=o==="image-paint"?gn(Math.max(0,(a??0)-(l??0))):0,f={[cn]:"auto.ui.browser.elementtiming",[Zi]:"ui.elementtiming",[Mr]:"component","sentry.span_start_time_source":c,"sentry.transaction_name":r,"element.id":i.id,"element.type":((g=(h=i.element)==null?void 0:h.tagName)==null?void 0:g.toLowerCase())||"unknown","element.size":i.naturalWidth&&i.naturalHeight?`${i.naturalWidth}x${i.naturalHeight}`:void 0,"element.render_time":a,"element.load_time":l,"element.url":i.url||void 0,"element.identifier":i.identifier,"element.paint_type":o};q3({name:`element[${i.identifier}]`,attributes:f,startTime:u,onlyIfParent:!0},m=>{m.end(u+d)})})},aH=1e3;let lk,Iy,Ay;function iA(e){const t="dom";Qo(t,e),Jo(t,lH)}function lH(){if(!Ze.document)return;const e=fs.bind(null,"dom"),t=uk(e,!0);Ze.document.addEventListener("click",t,!1),Ze.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{var i,o;const s=(i=Ze[n])==null?void 0:i.prototype;(o=s==null?void 0:s.hasOwnProperty)!=null&&o.call(s,"addEventListener")&&(Or(s,"addEventListener",function(a){return function(l,u,c){if(l==="click"||l=="keypress")try{const d=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},f=d[l]=d[l]||{refCount:0};if(!f.handler){const h=uk(e);f.handler=h,a.call(this,l,h,c)}f.refCount++}catch{}return a.call(this,l,u,c)}}),Or(s,"removeEventListener",function(a){return function(l,u,c){if(l==="click"||l=="keypress")try{const d=this.__sentry_instrumentation_handlers__||{},f=d[l];f&&(f.refCount--,f.refCount<=0&&(a.call(this,l,f.handler,c),f.handler=void 0,delete d[l]),Object.keys(d).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return a.call(this,l,u,c)}}))})}function uH(e){if(e.type!==Iy)return!1;try{if(!e.target||e.target._sentryId!==Ay)return!1}catch{}return!0}function cH(e,t){return e!=="keypress"?!1:t!=null&&t.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function uk(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=dH(n);if(cH(n.type,r))return;Qr(n,"_sentryCaptured",!0),r&&!r._sentryId&&Qr(r,"_sentryId",Xr());const s=n.type==="keypress"?"input":n.type;uH(n)||(e({event:n,name:s,global:t}),Iy=n.type,Ay=r?r._sentryId:void 0),clearTimeout(lk),lk=Ze.setTimeout(()=>{Ay=void 0,Iy=void 0},aH)}}function dH(e){try{return e.target}catch{return null}}let Of;function Pm(e){const t="history";Qo(t,e),Jo(t,fH)}function fH(){if(Ze.addEventListener("popstate",()=>{const t=Ze.location.href,n=Of;if(Of=t,n===t)return;fs("history",{from:n,to:t})}),!L4())return;function e(t){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const s=Of,i=hH(String(r));if(Of=i,s===i)return t.apply(this,n);fs("history",{from:s,to:i})}return t.apply(this,n)}}Or(Ze.history,"pushState",e),Or(Ze.history,"replaceState",e)}function hH(e){try{return new URL(e,Ze.location.origin).toString()}catch{return e}}const kh={};function oA(e){const t=kh[e];if(t)return t;let n=Ze[e];if(xy(n))return kh[e]=n.bind(Ze);const r=Ze.document;if(r&&typeof r.createElement=="function")try{const s=r.createElement("iframe");s.hidden=!0,r.head.appendChild(s);const i=s.contentWindow;i!=null&&i[e]&&(n=i[e]),r.head.removeChild(s)}catch(s){gu&&Ae.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,s)}return n&&(kh[e]=n.bind(Ze))}function pH(e){kh[e]=void 0}function of(...e){return oA("setTimeout")(...e)}const wa="__sentry_xhr_v3__";function aA(e){const t="xhr";Qo(t,e),Jo(t,mH)}function mH(){if(!Ze.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const s=new Error,i=Sn()*1e3,o=Bi(r[0])?r[0].toUpperCase():void 0,a=gH(r[1]);if(!o||!a)return t.apply(n,r);n[wa]={method:o,url:a,request_headers:{}},o==="POST"&&a.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const l=()=>{const u=n[wa];if(u&&n.readyState===4){try{u.status_code=n.status}catch{}const c={endTimestamp:Sn()*1e3,startTimestamp:i,xhr:n,virtualError:s};fs("xhr",c)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(u,c,d){return l(),u.apply(c,d)}}):n.addEventListener("readystatechange",l),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(u,c,d){const[f,h]=d,g=c[wa];return g&&Bi(f)&&Bi(h)&&(g.request_headers[f.toLowerCase()]=h),u.apply(c,d)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const s=n[wa];if(!s)return t.apply(n,r);r[0]!==void 0&&(s.body=r[0]);const i={startTimestamp:Sn()*1e3,xhr:n};return fs("xhr",i),t.apply(n,r)}})}function gH(e){if(Bi(e))return e;try{return e.toString()}catch{}}function lA(e){return new URLSearchParams(e).toString()}function uA(e,t=Ae){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[lA(e)];if(!e)return[void 0]}catch(n){return gu&&t.error(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return gu&&t.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function cA(e=[]){if(!(e.length!==2||typeof e[1]!="object"))return e[1].body}const Gg=[],xh=new Map,vH=60;function yH(){if(sf()&&jr()){const t=bH();return()=>{t()}}return()=>{}}const ck={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function bH(){return ZI(wH)}const wH=({metric:e})=>{if(e.value==null)return;const t=gn(e.value);if(t>vH)return;const n=e.entries.find(g=>g.duration===e.value&&ck[g.name]);if(!n)return;const{interactionId:r}=n,s=ck[n.name],i=gn(jr()+n.startTime),o=Jn(),a=o?Kn(o):void 0,u=(r!=null?xh.get(r):void 0)||a,c=u?vt(u).description:Mt().getScopeData().transactionName,d=ms(n.target),f={[cn]:"auto.http.browser.inp",[Zi]:`ui.interaction.${s}`,[Wu]:n.duration},h=Y1({name:d,transaction:c,attributes:f,startTime:i});h&&(h.addEvent("inp",{[Jd]:"millisecond",[Zd]:e.value}),h.end(i+t))};function SH(){const e=({entries:t})=>{const n=Jn(),r=n&&Kn(n);t.forEach(s=>{if(!Mz(s)||!r)return;const i=s.interactionId;if(i!=null&&!xh.has(i)){if(Gg.length>10){const o=Gg.shift();xh.delete(o)}Gg.push(i),xh.set(i,r)}})};Za("event",e),Za("first-input",e)}function _H(e,t=oA("fetch")){let n=0,r=0;async function s(i){const o=i.body.length;n+=o,r++;const a={body:i.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{const l=await t(e.url,a);return{statusCode:l.status,headers:{"x-sentry-rate-limits":l.headers.get("X-Sentry-Rate-Limits"),"retry-after":l.headers.get("Retry-After")}}}catch(l){throw pH("fetch"),l}finally{n-=o,r--}}return K5(e,s)}const kH=30,xH=50;function Oy(e,t,n,r){const s={filename:e,function:t==="<anonymous>"?Qa:t,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}const EH=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,CH=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,TH=/\((\S*)(?::(\d+))(?::(\d+))\)/,PH=/at (.+?) ?\(data:(.+?),/,RH=e=>{const t=e.match(PH);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const n=EH.exec(e);if(n){const[,s,i,o]=n;return Oy(s,Qa,+i,+o)}const r=CH.exec(e);if(r){if(r[2]&&r[2].indexOf("eval")===0){const a=TH.exec(r[2]);a&&(r[2]=a[1],r[3]=a[2],r[4]=a[3])}const[i,o]=dA(r[1]||Qa,r[2]);return Oy(o,i,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},IH=[kH,RH],AH=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,OH=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,MH=e=>{const t=AH.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const i=OH.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let r=t[3],s=t[1]||Qa;return[s,r]=dA(s,r),Oy(r,s,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},DH=[xH,MH],LH=[IH,DH],$H=BR(...LH),dA=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:Qa,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},gs=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Mf=1024,FH="Breadcrumbs",NH=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:FH,setup(n){t.console&&S4(zH(n)),t.dom&&iA(UH(n,t.dom)),t.xhr&&aA(HH(n)),t.fetch&&UI(jH(n)),t.history&&Pm(WH(n)),t.sentry&&n.on("beforeSendEvent",VH(n))}}},BH=NH;function VH(e){return function(n){ht()===e&&jo({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:va(n)},{event:n})}}function UH(e,t){return function(r){if(ht()!==e)return;let s,i,o=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>Mf&&(gs&&Ae.warn(`\`dom.maxStringLength\` cannot exceed ${Mf}, but a value of ${a} was configured. Sentry will use ${Mf} instead.`),a=Mf),typeof o=="string"&&(o=[o]);try{const u=r.event,c=qH(u)?u.target:u;s=ms(c,{keyAttrs:o,maxStringLength:a}),i=qR(c)}catch{s="<unknown>"}if(s.length===0)return;const l={category:`ui.${r.name}`,message:s};i&&(l.data={"ui.component_name":i}),jo(l,{event:r.event,name:r.name,global:r.global})}}function zH(e){return function(n){if(ht()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:FI(n.level),message:w_(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${w_(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;jo(r,{input:n.args,level:n.level})}}function HH(e){return function(n){if(ht()!==e)return;const{startTimestamp:r,endTimestamp:s}=n,i=n.xhr[wa];if(!r||!s||!i)return;const{method:o,url:a,status_code:l,body:u}=i,c={method:o,url:a,status_code:l},d={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:s},f={category:"xhr",data:c,type:"http",level:VI(l)};e.emit("beforeOutgoingRequestBreadcrumb",f,d),jo(f,d)}}function jH(e){return function(n){if(ht()!==e)return;const{startTimestamp:r,endTimestamp:s}=n;if(s&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.fetchData.method,n.fetchData.url,n.error){const i=n.fetchData,o={data:n.error,input:n.args,startTimestamp:r,endTimestamp:s},a={category:"fetch",data:i,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",a,o),jo(a,o)}else{const i=n.response,o={...n.fetchData,status_code:i==null?void 0:i.status};n.fetchData.request_body_size,n.fetchData.response_body_size,i==null||i.status;const a={input:n.args,response:i,startTimestamp:r,endTimestamp:s},l={category:"fetch",data:o,type:"http",level:VI(o.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",l,a),jo(l,a)}}}function WH(e){return function(n){if(ht()!==e)return;let r=n.from,s=n.to;const i=Ua(xt.location.href);let o=r?Ua(r):void 0;const a=Ua(s);o!=null&&o.path||(o=i),i.protocol===a.protocol&&i.host===a.host&&(s=a.relative),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),jo({category:"navigation",data:{from:r,to:s}})}}function qH(e){return!!e&&!!e.target}const GH=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],KH="BrowserApiErrors",YH=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:KH,setupOnce(){t.setTimeout&&Or(xt,"setTimeout",dk),t.setInterval&&Or(xt,"setInterval",dk),t.requestAnimationFrame&&Or(xt,"requestAnimationFrame",QH),t.XMLHttpRequest&&"XMLHttpRequest"in xt&&Or(XMLHttpRequest.prototype,"send",JH);const n=t.eventTarget;n&&(Array.isArray(n)?n:GH).forEach(s=>ZH(s,t))}}},XH=YH;function dk(e){return function(...t){const n=t[0];return t[0]=mu(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${Xi(e)}`}}),e.apply(this,t)}}function QH(e){return function(t){return e.apply(this,[mu(t,{mechanism:{data:{handler:Xi(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function JH(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&Or(n,s,function(i){const o={mechanism:{data:{handler:Xi(i)},handled:!1,type:`auto.browser.browserapierrors.xhr.${s}`}},a=T1(i);return a&&(o.mechanism.data.handler=Xi(a)),mu(i,o)})}),e.apply(this,t)}}function ZH(e,t){var s,i;const r=(s=xt[e])==null?void 0:s.prototype;(i=r==null?void 0:r.hasOwnProperty)!=null&&i.call(r,"addEventListener")&&(Or(r,"addEventListener",function(o){return function(a,l,u){try{e8(l)&&(l.handleEvent=mu(l.handleEvent,{mechanism:{data:{handler:Xi(l),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&t8(this,a,l),o.apply(this,[a,mu(l,{mechanism:{data:{handler:Xi(l),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),u])}}),Or(r,"removeEventListener",function(o){return function(a,l,u){try{const c=l.__sentry_wrapped__;c&&o.call(this,a,c,u)}catch{}return o.call(this,a,l,u)}}))}function e8(e){return typeof e.handleEvent=="function"}function t8(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}const n8=()=>({name:"BrowserSession",setupOnce(){if(typeof xt.document>"u"){gs&&Ae.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}H_({ignoreDuration:!0}),j_(),Pm(({from:e,to:t})=>{e!==void 0&&e!==t&&(H_({ignoreDuration:!0}),j_())})}}),r8="GlobalHandlers",s8=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:r8,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(o8(n),fk("onerror")),t.onunhandledrejection&&(a8(n),fk("onunhandledrejection"))}}},i8=s8;function o8(e){VR(t=>{const{stackParser:n,attachStacktrace:r}=fA();if(ht()!==e||HI())return;const{msg:s,url:i,line:o,column:a,error:l}=t,u=c8(z1(n,l||s,void 0,r,!1),i,o,a);u.level="error",_I(u,{originalException:l,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function a8(e){UR(t=>{const{stackParser:n,attachStacktrace:r}=fA();if(ht()!==e||HI())return;const s=l8(t),i=od(s)?u8(s):z1(n,s,void 0,r,!0);i.level="error",_I(i,{originalException:s,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function l8(e){if(od(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function u8(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function c8(e,t,n,r){const s=e.exception=e.exception||{},i=s.values=s.values||[],o=i[0]=i[0]||{},a=o.stacktrace=o.stacktrace||{},l=a.frames=a.frames||[],u=r,c=n,d=d8(t)??Hu();return l.length===0&&l.push({colno:u,filename:d,function:Qa,in_app:!0,lineno:c}),e}function fk(e){gs&&Ae.log(`Global Handler attached: ${e}`)}function fA(){const e=ht();return(e==null?void 0:e.getOptions())||{stackParser:()=>[],attachStacktrace:!1}}function d8(e){if(!(!Bi(e)||e.length===0)){if(e.startsWith("data:")){const t=e.match(/^data:([^;]+)/),n=t?t[1]:"text/javascript",r=e.includes("base64,");return`<data:${n}${r?",base64":""}>`}return e.slice(0,1024)}}const f8=()=>({name:"HttpContext",preprocessEvent(e){var r;if(!xt.navigator&&!xt.location&&!xt.document)return;const t=B1(),n={...t.headers,...(r=e.request)==null?void 0:r.headers};e.request={...t,...e.request,headers:n}}}),h8="cause",p8=5,m8="LinkedErrors",g8=(e={})=>{const t=e.limit||p8,n=e.key||h8;return{name:m8,preprocessEvent(r,s,i){const o=i.getOptions();w4(V1,o.stackParser,n,t,r,s)}}},v8=g8;function y8(){return b8()?(gs&&so(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function b8(){var i;if(typeof xt.window>"u")return!1;const e=xt;if(e.nw)return!1;const t=e.chrome||e.browser;if(!((i=t==null?void 0:t.runtime)!=null&&i.id))return!1;const n=Hu(),r=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(xt===xt.top&&r.some(o=>n.startsWith(`${o}://`)))}function hA(e){return[f4(),l4(),XH(),BH(),i8(),v8(),E4(),f8(),n8()]}function w8(e={}){const t=!e.skipBrowserExtensionCheck&&y8(),n={...e,enabled:t?!1:e.enabled,stackParser:yU(e.stackParser||$H),integrations:T5({integrations:e.integrations,defaultIntegrations:e.defaultIntegrations==null?hA():e.defaultIntegrations}),transport:e.transport||_H};return U5(iz,n)}const Kt=_t,X1="sentryReplaySession",S8="replay_event",Q1="Unable to send Replay",_8=3e5,k8=9e5,x8=5e3,E8=5500,C8=6e4,T8=5e3,P8=3,hk=15e4,Df=5e3,R8=3e3,I8=300,J1=2e7,A8=4999,O8=15e3,pk=36e5;var M8=Object.defineProperty,D8=(e,t,n)=>t in e?M8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,mk=(e,t,n)=>D8(e,typeof t!="symbol"?t+"":t,n),kn=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(kn||{});function L8(e){return e.nodeType===e.ELEMENT_NODE}function Nc(e){const t=e==null?void 0:e.host;return(t==null?void 0:t.shadowRoot)===e}function Bc(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function $8(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function F8(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}function bp(e){try{const t=e.rules||e.cssRules;return t?$8(Array.from(t,pA).join("")):null}catch{return null}}function N8(e){let t="";for(let n=0;n<e.style.length;n++){const r=e.style,s=r[n],i=r.getPropertyPriority(s);t+=`${s}:${r.getPropertyValue(s)}${i?" !important":""};`}return`${e.selectorText} { ${t} }`}function pA(e){let t;if(V8(e))try{t=bp(e.styleSheet)||F8(e)}catch{}else if(U8(e)){let n=e.cssText;const r=e.selectorText.includes(":"),s=typeof e.style.all=="string"&&e.style.all;if(s&&(n=N8(e)),r&&(n=B8(n)),r||s)return n}return t||e.cssText}function B8(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function V8(e){return"styleSheet"in e}function U8(e){return"selectorText"in e}class mA{constructor(){mk(this,"idNodeMap",new Map),mk(this,"nodeMetaMap",new WeakMap)}getId(t){var r;return t?((r=this.getMeta(t))==null?void 0:r.id)??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const s=this.nodeMetaMap.get(r);s&&this.nodeMetaMap.set(n,s)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function z8(){return new mA}function Rm({maskInputOptions:e,tagName:t,type:n}){return t==="OPTION"&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||n==="password"||t==="INPUT"&&!n&&e.text)}function dd({isMasked:e,element:t,value:n,maskInputFn:r}){let s=n||"";return e?(r&&(s=r(s,t)),"*".repeat(s.length)):s}function vu(e){return e.toLowerCase()}function My(e){return e.toUpperCase()}const gk="__rrweb_original__";function H8(e){const t=e.getContext("2d");if(!t)return!0;const n=50;for(let r=0;r<e.width;r+=n)for(let s=0;s<e.height;s+=n){const i=t.getImageData,o=gk in i?i[gk]:i;if(new Uint32Array(o.call(t,r,s,Math.min(n,e.width-r),Math.min(n,e.height-s)).data.buffer).some(l=>l!==0))return!1}return!0}function Z1(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?vu(t):null}function wp(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function gA(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i,s=n.pathname.match(r);return(s==null?void 0:s[1])??null}const vk={};function vA(e){const t=vk[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const s=n.createElement("iframe");s.hidden=!0,n.head.appendChild(s);const i=s.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(s)}catch{}return vk[e]=r.bind(window)}function Dy(...e){return vA("setTimeout")(...e)}function yA(...e){return vA("clearTimeout")(...e)}function bA(e){try{return e.contentDocument}catch{}}let j8=1;const W8=new RegExp("[^a-z0-9-_:]"),fd=-2;function e0(){return j8++}function q8(e){if(e instanceof HTMLFormElement)return"form";const t=vu(e.tagName);return W8.test(t)?"div":t}function G8(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let vl,yk;const K8=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Y8=/^(?:[a-z+]+:)?\/\//i,X8=/^www\..*/i,Q8=/^(data:)([^,]*),(.*)/i;function Sp(e,t){return(e||"").replace(K8,(n,r,s,i,o,a)=>{const l=s||o||a,u=r||i||"";if(!l)return n;if(Y8.test(l)||X8.test(l))return`url(${u}${l}${u})`;if(Q8.test(l))return`url(${u}${l}${u})`;if(l[0]==="/")return`url(${u}${G8(t)+l}${u})`;const c=t.split("/"),d=l.split("/");c.pop();for(const f of d)f!=="."&&(f===".."?c.pop():c.push(f));return`url(${u}${c.join("/")}${u})`})}const J8=/^[^ \t\n\r\u000c]+/,Z8=/^[, \t\n\r\u000c]+/;function ej(e,t){if(t.trim()==="")return t;let n=0;function r(i){let o;const a=i.exec(t.substring(n));return a?(o=a[0],n+=o.length,o):""}const s=[];for(;r(Z8),!(n>=t.length);){let i=r(J8);if(i.slice(-1)===",")i=Ol(e,i.substring(0,i.length-1)),s.push(i);else{let o="";i=Ol(e,i);let a=!1;for(;;){const l=t.charAt(n);if(l===""){s.push((i+o).trim());break}else if(a)l===")"&&(a=!1);else if(l===","){n+=1,s.push((i+o).trim());break}else l==="("&&(a=!0);o+=l,n+=1}}}return s.join(", ")}const bk=new WeakMap;function Ol(e,t){return!t||t.trim()===""?t:Im(e,t)}function tj(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Im(e,t){let n=bk.get(e);if(n||(n=e.createElement("a"),bk.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function wA(e,t,n,r,s,i){return r&&(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&(t==="table"||t==="td"||t==="th")?Ol(e,r):n==="srcset"?ej(e,r):n==="style"?Sp(r,Im(e)):t==="object"&&n==="data"?Ol(e,r):typeof i=="function"?i(n,r,s):r)}function SA(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function nj(e,t,n,r){try{if(r&&e.matches(r))return!1;if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let s=e.classList.length;s--;){const i=e.classList[s];if(t.test(i))return!0}if(n)return e.matches(n)}catch{}return!1}function rj(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function Sa(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Sa(e.parentNode,t,n,r+1)}function Ml(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(rj(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function yu(e,t,n,r,s,i){try{const o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(o===null)return!1;if(o.tagName==="INPUT"){const u=o.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(u))return!0}let a=-1,l=-1;if(i){if(l=Sa(o,Ml(r,s)),l<0)return!0;a=Sa(o,Ml(t,n),l>=0?l:1/0)}else{if(a=Sa(o,Ml(t,n)),a<0)return!1;l=Sa(o,Ml(r,s),a>=0?a:1/0)}return a>=0?l>=0?a<=l:!0:l>=0?!1:!!i}catch{}return!!i}function sj(e,t,n){const r=e.contentWindow;if(!r)return;let s=!1,i;try{i=r.document.readyState}catch{return}if(i!=="complete"){const a=Dy(()=>{s||(t(),s=!0)},n);e.addEventListener("load",()=>{yA(a),s=!0,t()});return}const o="about:blank";if(r.location.href!==o||e.src===o||e.src==="")return Dy(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function ij(e,t,n){let r=!1,s;try{s=e.sheet}catch{return}if(s)return;const i=Dy(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{yA(i),r=!0,t()})}function oj(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskAttributeFn:l,maskTextClass:u,unmaskTextClass:c,maskTextSelector:d,unmaskTextSelector:f,inlineStylesheet:h,maskInputOptions:g={},maskTextFn:m,maskInputFn:y,dataURLOptions:w={},inlineImages:b,recordCanvas:x,keepIframeSrcFn:_,newlyAddedElement:S=!1}=t,P=aj(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:kn.Document,childNodes:[],compatMode:e.compatMode}:{type:kn.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:kn.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:P};case e.ELEMENT_NODE:return uj(e,{doc:n,blockClass:s,blockSelector:i,unblockSelector:o,inlineStylesheet:h,maskAttributeFn:l,maskInputOptions:g,maskInputFn:y,dataURLOptions:w,inlineImages:b,recordCanvas:x,keepIframeSrcFn:_,newlyAddedElement:S,rootId:P,maskTextClass:u,unmaskTextClass:c,maskTextSelector:d,unmaskTextSelector:f});case e.TEXT_NODE:return lj(e,{doc:n,maskAllText:a,maskTextClass:u,unmaskTextClass:c,maskTextSelector:d,unmaskTextSelector:f,maskTextFn:m,maskInputOptions:g,maskInputFn:y,rootId:P});case e.CDATA_SECTION_NODE:return{type:kn.CDATA,textContent:"",rootId:P};case e.COMMENT_NODE:return{type:kn.Comment,textContent:e.textContent||"",rootId:P};default:return!1}}function aj(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function lj(e,t){var w;const{maskAllText:n,maskTextClass:r,unmaskTextClass:s,maskTextSelector:i,unmaskTextSelector:o,maskTextFn:a,maskInputOptions:l,maskInputFn:u,rootId:c}=t,d=e.parentNode&&e.parentNode.tagName;let f=e.textContent;const h=d==="STYLE"?!0:void 0,g=d==="SCRIPT"?!0:void 0,m=d==="TEXTAREA"?!0:void 0;if(h&&f){try{e.nextSibling||e.previousSibling||(w=e.parentNode.sheet)!=null&&w.cssRules&&(f=bp(e.parentNode.sheet))}catch(b){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${b}`,e)}f=Sp(f,Im(t.doc))}g&&(f="SCRIPT_PLACEHOLDER");const y=yu(e,r,i,s,o,n);if(!h&&!g&&!m&&f&&y&&(f=a?a(f,e.parentElement):f.replace(/[\S]/g,"*")),m&&f&&(l.textarea||y)&&(f=u?u(f,e.parentNode):f.replace(/[\S]/g,"*")),d==="OPTION"&&f){const b=Rm({type:null,tagName:d,maskInputOptions:l});f=dd({isMasked:yu(e,r,i,s,o,b),element:e,value:f,maskInputFn:u})}return{type:kn.Text,textContent:f||"",isStyle:h,rootId:c}}function uj(e,t){const{doc:n,blockClass:r,blockSelector:s,unblockSelector:i,inlineStylesheet:o,maskInputOptions:a={},maskAttributeFn:l,maskInputFn:u,dataURLOptions:c={},inlineImages:d,recordCanvas:f,keepIframeSrcFn:h,newlyAddedElement:g=!1,rootId:m,maskTextClass:y,unmaskTextClass:w,maskTextSelector:b,unmaskTextSelector:x}=t,_=nj(e,r,s,i),S=q8(e);let P={};const A=e.attributes.length;for(let T=0;T<A;T++){const R=e.attributes[T];R.name&&!SA(S,R.name,R.value)&&(P[R.name]=wA(n,S,vu(R.name),R.value,e,l))}if(S==="link"&&o){const T=Array.from(n.styleSheets).find(I=>I.href===e.href);let R=null;T&&(R=bp(T)),R&&(P.rel=null,P.href=null,P.crossorigin=null,P._cssText=Sp(R,T.href))}if(S==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const T=bp(e.sheet);T&&(P._cssText=Sp(T,Im(n)))}if(S==="input"||S==="textarea"||S==="select"||S==="option"){const T=e,R=Z1(T),I=wp(T,My(S),R),O=T.checked;if(R!=="submit"&&R!=="button"&&I){const H=yu(T,y,b,w,x,Rm({type:R,tagName:My(S),maskInputOptions:a}));P.value=dd({isMasked:H,element:T,value:I,maskInputFn:u})}O&&(P.checked=O)}if(S==="option"&&(e.selected&&!a.select?P.selected=!0:delete P.selected),S==="canvas"&&f){if(e.__context==="2d")H8(e)||(P.rr_dataURL=e.toDataURL(c.type,c.quality));else if(!("__context"in e)){const T=e.toDataURL(c.type,c.quality),R=n.createElement("canvas");R.width=e.width,R.height=e.height;const I=R.toDataURL(c.type,c.quality);T!==I&&(P.rr_dataURL=T)}}if(S==="img"&&d){vl||(vl=n.createElement("canvas"),yk=vl.getContext("2d"));const T=e,R=T.currentSrc||T.getAttribute("src")||"<unknown-src>",I=T.crossOrigin,O=()=>{T.removeEventListener("load",O);try{vl.width=T.naturalWidth,vl.height=T.naturalHeight,yk.drawImage(T,0,0),P.rr_dataURL=vl.toDataURL(c.type,c.quality)}catch(H){if(T.crossOrigin!=="anonymous"){T.crossOrigin="anonymous",T.complete&&T.naturalWidth!==0?O():T.addEventListener("load",O);return}else console.warn(`Cannot inline img src=${R}! Error: ${H}`)}T.crossOrigin==="anonymous"&&(I?P.crossOrigin=I:T.removeAttribute("crossorigin"))};T.complete&&T.naturalWidth!==0?O():T.addEventListener("load",O)}if((S==="audio"||S==="video")&&(P.rr_mediaState=e.paused?"paused":"played",P.rr_mediaCurrentTime=e.currentTime),g||(e.scrollLeft&&(P.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(P.rr_scrollTop=e.scrollTop)),_){const{width:T,height:R}=e.getBoundingClientRect();P={class:P.class,rr_width:`${T}px`,rr_height:`${R}px`}}S==="iframe"&&!h(P.src)&&(!_&&!bA(e)&&(P.rr_src=P.src),delete P.src);let E;try{customElements.get(S)&&(E=!0)}catch{}return{type:kn.Element,tagName:S,attributes:P,childNodes:[],isSVG:tj(e)||void 0,needBlock:_,rootId:m,isCustom:E}}function qt(e){return e==null?"":e.toLowerCase()}function cj(e,t){if(t.comment&&e.type===kn.Comment)return!0;if(e.type===kn.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&gA(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(qt(e.attributes.name).match(/^msapplication-tile(image|color)$/)||qt(e.attributes.name)==="application-name"||qt(e.attributes.rel)==="icon"||qt(e.attributes.rel)==="apple-touch-icon"||qt(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&qt(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(qt(e.attributes.property).match(/^(og|twitter|fb):/)||qt(e.attributes.name).match(/^(og|twitter):/)||qt(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(qt(e.attributes.name)==="robots"||qt(e.attributes.name)==="googlebot"||qt(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(qt(e.attributes.name)==="author"||qt(e.attributes.name)==="generator"||qt(e.attributes.name)==="framework"||qt(e.attributes.name)==="publisher"||qt(e.attributes.name)==="progid"||qt(e.attributes.property).match(/^article:/)||qt(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(qt(e.attributes.name)==="google-site-verification"||qt(e.attributes.name)==="yandex-verification"||qt(e.attributes.name)==="csrf-token"||qt(e.attributes.name)==="p:domain_verify"||qt(e.attributes.name)==="verify-v1"||qt(e.attributes.name)==="verification"||qt(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Dl(e,t){const{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:l,unmaskTextClass:u,maskTextSelector:c,unmaskTextSelector:d,skipChild:f=!1,inlineStylesheet:h=!0,maskInputOptions:g={},maskAttributeFn:m,maskTextFn:y,maskInputFn:w,slimDOMOptions:b,dataURLOptions:x={},inlineImages:_=!1,recordCanvas:S=!1,onSerialize:P,onIframeLoad:A,iframeLoadTimeout:E=5e3,onBlockedImageLoad:T,onStylesheetLoad:R,stylesheetLoadTimeout:I=5e3,keepIframeSrcFn:O=()=>!1,newlyAddedElement:H=!1}=t;let{preserveWhiteSpace:N=!0}=t;const D=oj(e,{doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:a,unblockSelector:o,maskTextClass:l,unmaskTextClass:u,maskTextSelector:c,unmaskTextSelector:d,inlineStylesheet:h,maskInputOptions:g,maskAttributeFn:m,maskTextFn:y,maskInputFn:w,dataURLOptions:x,inlineImages:_,recordCanvas:S,keepIframeSrcFn:O,newlyAddedElement:H});if(!D)return console.warn(e,"not serialized"),null;let W;r.hasNode(e)?W=r.getId(e):cj(D,b)||!N&&D.type===kn.Text&&!D.isStyle&&!D.textContent.replace(/^\s+|\s+$/gm,"").length?W=fd:W=e0();const U=Object.assign(D,{id:W});if(r.add(e,U),W===fd)return null;P&&P(e);let Q=!f;if(U.type===kn.Element){Q=Q&&!U.needBlock;const V=e.shadowRoot;V&&Bc(V)&&(U.isShadowHost=!0)}if((U.type===kn.Document||U.type===kn.Element)&&Q){b.headWhitespace&&U.type===kn.Element&&U.tagName==="head"&&(N=!1);const V={doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:a,unblockSelector:o,maskTextClass:l,unmaskTextClass:u,maskTextSelector:c,unmaskTextSelector:d,skipChild:f,inlineStylesheet:h,maskInputOptions:g,maskAttributeFn:m,maskTextFn:y,maskInputFn:w,slimDOMOptions:b,dataURLOptions:x,inlineImages:_,recordCanvas:S,preserveWhiteSpace:N,onSerialize:P,onIframeLoad:A,iframeLoadTimeout:E,onBlockedImageLoad:T,onStylesheetLoad:R,stylesheetLoadTimeout:I,keepIframeSrcFn:O},L=e.childNodes?Array.from(e.childNodes):[];for(const oe of L){const j=Dl(oe,V);j&&U.childNodes.push(j)}if(L8(e)&&e.shadowRoot)for(const oe of Array.from(e.shadowRoot.childNodes)){const j=Dl(oe,V);j&&(Bc(e.shadowRoot)&&(j.isShadow=!0),U.childNodes.push(j))}}if(e.parentNode&&Nc(e.parentNode)&&Bc(e.parentNode)&&(U.isShadow=!0),U.type===kn.Element&&U.tagName==="iframe"&&!U.needBlock&&sj(e,()=>{const V=bA(e);if(V&&A){const L=Dl(V,{doc:V,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:l,unmaskTextClass:u,maskTextSelector:c,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:g,maskAttributeFn:m,maskTextFn:y,maskInputFn:w,slimDOMOptions:b,dataURLOptions:x,inlineImages:_,recordCanvas:S,preserveWhiteSpace:N,onSerialize:P,onIframeLoad:A,iframeLoadTimeout:E,onStylesheetLoad:R,stylesheetLoadTimeout:I,keepIframeSrcFn:O});L&&A(e,L)}},E),U.type===kn.Element&&U.tagName==="img"&&!e.complete&&U.needBlock){const V=e,L=()=>{if(V.isConnected&&!V.complete&&T)try{const oe=V.getBoundingClientRect();oe.width>0&&oe.height>0&&T(V,U,oe)}catch{}V.removeEventListener("load",L)};V.isConnected&&V.addEventListener("load",L)}return U.type===kn.Element&&U.tagName==="link"&&typeof U.attributes.rel=="string"&&(U.attributes.rel==="stylesheet"||U.attributes.rel==="preload"&&typeof U.attributes.href=="string"&&gA(U.attributes.href)==="css")&&ij(e,()=>{if(R){const V=Dl(e,{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:l,unmaskTextClass:u,maskTextSelector:c,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:g,maskAttributeFn:m,maskTextFn:y,maskInputFn:w,slimDOMOptions:b,dataURLOptions:x,inlineImages:_,recordCanvas:S,preserveWhiteSpace:N,onSerialize:P,onIframeLoad:A,iframeLoadTimeout:E,onStylesheetLoad:R,stylesheetLoadTimeout:I,keepIframeSrcFn:O});V&&R(e,V)}},I),U.type===kn.Element&&delete U.needBlock,U}function dj(e,t){const{mirror:n=new mA,blockClass:r="rr-block",blockSelector:s=null,unblockSelector:i=null,maskAllText:o=!1,maskTextClass:a="rr-mask",unmaskTextClass:l=null,maskTextSelector:u=null,unmaskTextSelector:c=null,inlineStylesheet:d=!0,inlineImages:f=!1,recordCanvas:h=!1,maskAllInputs:g=!1,maskAttributeFn:m,maskTextFn:y,maskInputFn:w,slimDOM:b=!1,dataURLOptions:x,preserveWhiteSpace:_,onSerialize:S,onIframeLoad:P,iframeLoadTimeout:A,onBlockedImageLoad:E,onStylesheetLoad:T,stylesheetLoadTimeout:R,keepIframeSrcFn:I=()=>!1}=t||{};return Dl(e,{doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,maskAllText:o,maskTextClass:a,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:c,skipChild:!1,inlineStylesheet:d,maskInputOptions:g===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:g===!1?{}:g,maskAttributeFn:m,maskTextFn:y,maskInputFn:w,slimDOMOptions:b===!0||b==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:b==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:b===!1?{}:b,dataURLOptions:x,inlineImages:f,recordCanvas:h,preserveWhiteSpace:_,onSerialize:S,onIframeLoad:P,iframeLoadTimeout:A,onBlockedImageLoad:E,onStylesheetLoad:T,stylesheetLoadTimeout:R,keepIframeSrcFn:I,newlyAddedElement:!1})}function gr(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const Cl=`Please stop import mirror directly. Instead of that,\r
|
|
50
|
+
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
51
|
+
or you can use record.mirror to access the mirror instance during recording.`;let wk={map:{},getId(){return console.error(Cl),-1},getNode(){return console.error(Cl),null},removeNodeFromMap(){console.error(Cl)},has(){return console.error(Cl),!1},reset(){console.error(Cl)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(wk=new Proxy(wk,{get(e,t,n){return t==="map"&&console.error(Cl),Reflect.get(e,t,n)}}));function hd(e,t,n={}){let r=null,s=0;return function(...i){const o=Date.now();!s&&n.leading===!1&&(s=o);const a=t-(o-s),l=this;a<=0||a>t?(r&&(yj(r),r=null),s=o,e.apply(l,i)):!r&&n.trailing!==!1&&(r=Am(()=>{s=n.leading===!1?0:Date.now(),r=null,e.apply(l,i)},a))}}function _A(e,t,n,r,s=window){const i=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,r?n:{set(o){Am(()=>{n.set.call(this,o)},0),i&&i.set&&i.set.call(this,o)}}),()=>_A(e,t,i||{},!0)}function t0(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],s=n(r);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=s,()=>{e[t]=r}}catch{return()=>{}}}let _p=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(_p=()=>new Date().getTime());function kA(e){var n,r,s,i,o,a;const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:(t==null?void 0:t.documentElement.scrollLeft)||((r=(n=t==null?void 0:t.body)==null?void 0:n.parentElement)==null?void 0:r.scrollLeft)||((s=t==null?void 0:t.body)==null?void 0:s.scrollLeft)||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:(t==null?void 0:t.documentElement.scrollTop)||((o=(i=t==null?void 0:t.body)==null?void 0:i.parentElement)==null?void 0:o.scrollTop)||((a=t==null?void 0:t.body)==null?void 0:a.scrollTop)||0}}function xA(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function EA(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function CA(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Gr(e,t,n,r,s){if(!e)return!1;const i=CA(e);if(!i)return!1;const o=Ml(t,n);if(!s){const u=r&&i.matches(r);return o(i)&&!u}const a=Sa(i,o);let l=-1;return a<0?!1:(r&&(l=Sa(i,Ml(null,r))),a>-1&&l<0?!0:a<l)}function fj(e,t){return t.getId(e)!==-1}function Kg(e,t){return t.getId(e)===fd}function TA(e,t){if(Nc(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?TA(e.parentNode,t):!0:!0}function Ly(e){return!!e.changedTouches}function hj(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function PA(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function RA(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function $y(e){return!!(e!=null&&e.shadowRoot)}class pj{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function IA(e){var n,r;let t=null;return((r=(n=e.getRootNode)==null?void 0:n.call(e))==null?void 0:r.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function mj(e){let t=e,n;for(;n=IA(t);)t=n;return t}function gj(e){const t=e.ownerDocument;if(!t)return!1;const n=mj(e);return t.contains(n)}function AA(e){const t=e.ownerDocument;return t?t.contains(e)||gj(e):!1}const Sk={};function n0(e){const t=Sk[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const s=n.createElement("iframe");s.hidden=!0,n.head.appendChild(s);const i=s.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(s)}catch{}return Sk[e]=r.bind(window)}function vj(...e){return n0("requestAnimationFrame")(...e)}function Am(...e){return n0("setTimeout")(...e)}function yj(...e){return n0("clearTimeout")(...e)}var ct=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(ct||{}),tt=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(tt||{}),dr=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(dr||{}),Ci=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Ci||{}),Tl=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Tl||{});function r0(e){try{return e.contentDocument}catch{}}function bj(e){try{return e.contentWindow}catch{}}function _k(e){return"__ln"in e}class wj{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=(n==null?void 0:n.next)||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&_k(t.previousSibling)){const r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&_k(t.nextSibling)&&t.nextSibling.__ln.previous){const r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(t){const n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const kk=(e,t)=>`${e}@${t}`;class Sj{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],n=new Set,r=new wj,s=l=>{let u=l,c=fd;for(;c===fd;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},i=l=>{if(!l.parentNode||!AA(l))return;const u=Nc(l.parentNode)?this.mirror.getId(IA(l)):this.mirror.getId(l.parentNode),c=s(l);if(u===-1||c===-1)return r.addNode(l);const d=Dl(l,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:f=>{PA(f,this.mirror)&&!Gr(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(f),RA(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),$y(l)&&this.shadowDomManager.addShadowRoot(l.shadowRoot,this.doc)},onIframeLoad:(f,h)=>{Gr(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(f,h),f.contentWindow&&this.canvasManager.addWindow(f.contentWindow),this.shadowDomManager.observeAttachShadow(f))},onStylesheetLoad:(f,h)=>{this.stylesheetManager.attachLinkElement(f,h)},onBlockedImageLoad:(f,h,{width:g,height:m})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:h.id,attributes:{style:{width:`${g}px`,height:`${m}px`}}}]})}});d&&(t.push({parentId:u,nextId:c,node:d}),n.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const l of this.movedSet)xk(this.removes,l,this.mirror)&&!this.movedSet.has(l.parentNode)||i(l);for(const l of this.addedSet)!Ek(this.droppedSet,l)&&!xk(this.removes,l,this.mirror)||Ek(this.movedSet,l)?i(l):this.droppedSet.add(l);let o=null;for(;r.length;){let l=null;if(o){const u=this.mirror.getId(o.value.parentNode),c=s(o.value);u!==-1&&c!==-1&&(l=o)}if(!l){let u=r.tail;for(;u;){const c=u;if(u=u.previous,c){const d=this.mirror.getId(c.value.parentNode);if(s(c.value)===-1)continue;if(d!==-1){l=c;break}else{const h=c.value;if(h.parentNode&&h.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const g=h.parentNode.host;if(this.mirror.getId(g)!==-1){l=c;break}}}}}}if(!l){for(;r.head;)r.removeNode(r.head.value);break}o=l.previous,r.removeNode(l.value),i(l.value)}const a={texts:this.texts.map(l=>({id:this.mirror.getId(l.node),value:l.value})).filter(l=>!n.has(l.id)).filter(l=>this.mirror.has(l.id)),attributes:this.attributes.map(l=>{const{attributes:u}=l;if(typeof u.style=="string"){const c=JSON.stringify(l.styleDiff),d=JSON.stringify(l._unchangedStyles);c.length<u.style.length&&(c+d).split("var(").length===u.style.split("var(").length&&(u.style=l.styleDiff)}return{id:this.mirror.getId(l.node),attributes:u}}).filter(l=>!n.has(l.id)).filter(l=>this.mirror.has(l.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=t=>{if(!Kg(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!Gr(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:yu(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,CA(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{const n=t.target;let r=t.attributeName,s=t.target.getAttribute(r);if(r==="value"){const o=Z1(n),a=n.tagName;s=wp(n,a,o);const l=Rm({maskInputOptions:this.maskInputOptions,tagName:a,type:o}),u=yu(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,l);s=dd({isMasked:u,element:n,value:s,maskInputFn:this.maskInputFn})}if(Gr(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||s===t.oldValue)return;let i=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(s))if(!r0(n))r="rr_src";else return;if(i||(i={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(t.target,i)),r==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!SA(n.tagName,r)&&(i.attributes[r]=wA(this.doc,vu(n.tagName),vu(r),s,n,this.maskAttributeFn),r==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const o=this.unattachedDoc.createElement("span");t.oldValue&&o.setAttribute("style",t.oldValue);for(const a of Array.from(n.style)){const l=n.style.getPropertyValue(a),u=n.style.getPropertyPriority(a);l!==o.style.getPropertyValue(a)||u!==o.style.getPropertyPriority(a)?u===""?i.styleDiff[a]=l:i.styleDiff[a]=[l,u]:i._unchangedStyles[a]=[l,u]}for(const a of Array.from(o.style))n.style.getPropertyValue(a)===""&&(i.styleDiff[a]=!1)}break}case"childList":{if(Gr(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{const r=this.mirror.getId(n),s=Nc(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Gr(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Kg(n,this.mirror)||!fj(n,this.mirror)||(this.addedSet.has(n)?(Fy(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||TA(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[kk(r,s)]?Fy(this.movedSet,n):this.removes.push({parentId:s,id:r,isShadow:Nc(t.target)&&Bc(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Kg(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[kk(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Gr(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes&&t.childNodes.forEach(r=>this.genAdds(r)),$y(t)&&t.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,t)}))}}}init(t){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(n=>{this[n]=t[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Fy(e,t){var n;e.delete(t),(n=t.childNodes)==null||n.forEach(r=>Fy(e,r))}function xk(e,t,n){return e.length===0?!1:_j(e,t,n)}function _j(e,t,n){let r=t.parentNode;for(;r;){const s=n.getId(r);if(e.some(i=>i.id===s))return!0;r=r.parentNode}return!1}function Ek(e,t){return e.size===0?!1:OA(e,t)}function OA(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:OA(e,n):!1}let Vc;function kj(e){Vc=e}function xj(){Vc=void 0}const wt=e=>Vc?(...n)=>{try{return e(...n)}catch(r){if(Vc&&Vc(r)===!0)return()=>{};throw r}}:e,Ll=[];function af(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function MA(e,t){var o,a;const n=new Sj;Ll.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const s=(a=(o=window==null?void 0:window.Zone)==null?void 0:o.__symbol__)==null?void 0:a.call(o,"MutationObserver");s&&window[s]&&(r=window[s]);const i=new r(wt(l=>{e.onMutation&&e.onMutation(l)===!1||n.processMutations.bind(n)(l)}));return i.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function Ej({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const s=typeof t.mousemove=="number"?t.mousemove:50,i=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let o=[],a;const l=hd(wt(d=>{const f=Date.now()-a;e(o.map(h=>(h.timeOffset-=f,h)),d),o=[],a=null}),i),u=wt(hd(wt(d=>{const f=af(d),{clientX:h,clientY:g}=Ly(d)?d.changedTouches[0]:d;a||(a=_p()),o.push({x:h,y:g,id:r.getId(f),timeOffset:_p()-a}),l(typeof DragEvent<"u"&&d instanceof DragEvent?tt.Drag:d instanceof MouseEvent?tt.MouseMove:tt.TouchMove)}),s,{trailing:!1})),c=[gr("mousemove",u,n),gr("touchmove",u,n),gr("drag",u,n)];return wt(()=>{c.forEach(d=>d())})}function Cj({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const a=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,l=[];let u=null;const c=d=>f=>{const h=af(f);if(Gr(h,r,s,i,!0))return;let g=null,m=d;if("pointerType"in f){switch(f.pointerType){case"mouse":g=Ci.Mouse;break;case"touch":g=Ci.Touch;break;case"pen":g=Ci.Pen;break}g===Ci.Touch?dr[d]===dr.MouseDown?m="TouchStart":dr[d]===dr.MouseUp&&(m="TouchEnd"):Ci.Pen}else Ly(f)&&(g=Ci.Touch);g!==null?(u=g,(m.startsWith("Touch")&&g===Ci.Touch||m.startsWith("Mouse")&&g===Ci.Mouse)&&(g=null)):dr[d]===dr.Click&&(g=u,u=null);const y=Ly(f)?f.changedTouches[0]:f;if(!y)return;const w=n.getId(h),{clientX:b,clientY:x}=y;wt(e)({type:dr[m],id:w,x:b,y:x,...g!==null&&{pointerType:g}})};return Object.keys(dr).filter(d=>Number.isNaN(Number(d))&&!d.endsWith("_Departed")&&a[d]!==!1).forEach(d=>{let f=vu(d);const h=c(d);if(window.PointerEvent)switch(dr[d]){case dr.MouseDown:case dr.MouseUp:f=f.replace("mouse","pointer");break;case dr.TouchStart:case dr.TouchEnd:return}l.push(gr(f,h,t))}),wt(()=>{l.forEach(d=>d())})}function DA({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){const a=wt(hd(wt(l=>{const u=af(l);if(!u||Gr(u,r,s,i,!0))return;const c=n.getId(u);if(u===t&&t.defaultView){const d=kA(t.defaultView);e({id:c,x:d.left,y:d.top})}else e({id:c,x:u.scrollLeft,y:u.scrollTop})}),o.scroll||100));return gr("scroll",a,t)}function Tj({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const s=wt(hd(wt(()=>{const i=xA(),o=EA();(n!==i||r!==o)&&(e({width:Number(o),height:Number(i)}),n=i,r=o)}),200));return gr("resize",s,t)}const Pj=["INPUT","TEXTAREA","SELECT"],Ck=new WeakMap;function Rj({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,ignoreClass:o,ignoreSelector:a,maskInputOptions:l,maskInputFn:u,sampling:c,userTriggeredOnInput:d,maskTextClass:f,unmaskTextClass:h,maskTextSelector:g,unmaskTextSelector:m}){function y(A){let E=af(A);const T=A.isTrusted,R=E&&My(E.tagName);if(R==="OPTION"&&(E=E.parentElement),!E||!R||Pj.indexOf(R)<0||Gr(E,r,s,i,!0))return;const I=E;if(I.classList.contains(o)||a&&I.matches(a))return;const O=Z1(E);let H=wp(I,R,O),N=!1;const D=Rm({maskInputOptions:l,tagName:R,type:O}),W=yu(E,f,g,h,m,D);(O==="radio"||O==="checkbox")&&(N=E.checked),H=dd({isMasked:W,element:E,value:H,maskInputFn:u}),w(E,d?{text:H,isChecked:N,userTriggered:T}:{text:H,isChecked:N});const U=E.name;O==="radio"&&U&&N&&t.querySelectorAll(`input[type="radio"][name="${U}"]`).forEach(Q=>{if(Q!==E){const V=dd({isMasked:W,element:Q,value:wp(Q,R,O),maskInputFn:u});w(Q,d?{text:V,isChecked:!N,userTriggered:!1}:{text:V,isChecked:!N})}})}function w(A,E){const T=Ck.get(A);if(!T||T.text!==E.text||T.isChecked!==E.isChecked){Ck.set(A,E);const R=n.getId(A);wt(e)({...E,id:R})}}const x=(c.input==="last"?["change"]:["input","change"]).map(A=>gr(A,wt(y),t)),_=t.defaultView;if(!_)return()=>{x.forEach(A=>A())};const S=_.Object.getOwnPropertyDescriptor(_.HTMLInputElement.prototype,"value"),P=[[_.HTMLInputElement.prototype,"value"],[_.HTMLInputElement.prototype,"checked"],[_.HTMLSelectElement.prototype,"value"],[_.HTMLTextAreaElement.prototype,"value"],[_.HTMLSelectElement.prototype,"selectedIndex"],[_.HTMLOptionElement.prototype,"selected"]];return S&&S.set&&x.push(...P.map(A=>_A(A[0],A[1],{set(){wt(y)({target:this,isTrusted:!1})}},!1,_))),wt(()=>{x.forEach(A=>A())})}function kp(e){const t=[];function n(r,s){if(Lf("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Lf("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Lf("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Lf("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const o=Array.from(r.parentRule.cssRules).indexOf(r);s.unshift(o)}else if(r.parentStyleSheet){const o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);s.unshift(o)}return s}return n(e,t)}function go(e,t,n){let r,s;return e?(e.ownerNode?r=t.getId(e.ownerNode):s=n.getId(e),{styleId:s,id:r}):{}}function Ij({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const s=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:wt((c,d,f)=>{const[h,g]=f,{id:m,styleId:y}=go(d,t,n.styleMirror);return(m&&m!==-1||y&&y!==-1)&&e({id:m,styleId:y,adds:[{rule:h,index:g}]}),c.apply(d,f)})});const i=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:wt((c,d,f)=>{const[h]=f,{id:g,styleId:m}=go(d,t,n.styleMirror);return(g&&g!==-1||m&&m!==-1)&&e({id:g,styleId:m,removes:[{index:h}]}),c.apply(d,f)})});let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:wt((c,d,f)=>{const[h]=f,{id:g,styleId:m}=go(d,t,n.styleMirror);return(g&&g!==-1||m&&m!==-1)&&e({id:g,styleId:m,replace:h}),c.apply(d,f)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:wt((c,d,f)=>{const[h]=f,{id:g,styleId:m}=go(d,t,n.styleMirror);return(g&&g!==-1||m&&m!==-1)&&e({id:g,styleId:m,replaceSync:h}),c.apply(d,f)})}));const l={};$f("CSSGroupingRule")?l.CSSGroupingRule=r.CSSGroupingRule:($f("CSSMediaRule")&&(l.CSSMediaRule=r.CSSMediaRule),$f("CSSConditionRule")&&(l.CSSConditionRule=r.CSSConditionRule),$f("CSSSupportsRule")&&(l.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(l).forEach(([c,d])=>{u[c]={insertRule:d.prototype.insertRule,deleteRule:d.prototype.deleteRule},d.prototype.insertRule=new Proxy(u[c].insertRule,{apply:wt((f,h,g)=>{const[m,y]=g,{id:w,styleId:b}=go(h.parentStyleSheet,t,n.styleMirror);return(w&&w!==-1||b&&b!==-1)&&e({id:w,styleId:b,adds:[{rule:m,index:[...kp(h),y||0]}]}),f.apply(h,g)})}),d.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:wt((f,h,g)=>{const[m]=g,{id:y,styleId:w}=go(h.parentStyleSheet,t,n.styleMirror);return(y&&y!==-1||w&&w!==-1)&&e({id:y,styleId:w,removes:[{index:[...kp(h),m]}]}),f.apply(h,g)})})}),wt(()=>{r.CSSStyleSheet.prototype.insertRule=s,r.CSSStyleSheet.prototype.deleteRule=i,o&&(r.CSSStyleSheet.prototype.replace=o),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([c,d])=>{d.prototype.insertRule=u[c].insertRule,d.prototype.deleteRule=u[c].deleteRule})})}function LA({mirror:e,stylesheetManager:t},n){var o,a,l;let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);const s=n.nodeName==="#document"?(o=n.defaultView)==null?void 0:o.Document:(l=(a=n.ownerDocument)==null?void 0:a.defaultView)==null?void 0:l.ShadowRoot,i=s!=null&&s.prototype?Object.getOwnPropertyDescriptor(s==null?void 0:s.prototype,"adoptedStyleSheets"):void 0;return r===null||r===-1||!s||!i?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get(){var u;return(u=i.get)==null?void 0:u.call(this)},set(u){var d;const c=(d=i.set)==null?void 0:d.call(this,u);if(r!==null&&r!==-1)try{t.adoptStyleSheets(u,r)}catch{}return c}}),wt(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))}function Aj({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:s}){const i=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:wt((a,l,u)=>{var m;const[c,d,f]=u;if(n.has(c))return i.apply(l,[c,d,f]);const{id:h,styleId:g}=go((m=l.parentRule)==null?void 0:m.parentStyleSheet,t,r.styleMirror);return(h&&h!==-1||g&&g!==-1)&&e({id:h,styleId:g,set:{property:c,value:d,priority:f},index:kp(l.parentRule)}),a.apply(l,u)})});const o=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:wt((a,l,u)=>{var h;const[c]=u;if(n.has(c))return o.apply(l,[c]);const{id:d,styleId:f}=go((h=l.parentRule)==null?void 0:h.parentStyleSheet,t,r.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,remove:{property:c},index:kp(l.parentRule)}),a.apply(l,u)})}),wt(()=>{s.CSSStyleDeclaration.prototype.setProperty=i,s.CSSStyleDeclaration.prototype.removeProperty=o})}function Oj({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:s,sampling:i,doc:o}){const a=wt(u=>hd(wt(c=>{const d=af(c);if(!d||Gr(d,t,n,r,!0))return;const{currentTime:f,volume:h,muted:g,playbackRate:m}=d;e({type:u,id:s.getId(d),currentTime:f,volume:h,muted:g,playbackRate:m})}),i.media||500)),l=[gr("play",a(Tl.Play),o),gr("pause",a(Tl.Pause),o),gr("seeked",a(Tl.Seeked),o),gr("volumechange",a(Tl.VolumeChange),o),gr("ratechange",a(Tl.RateChange),o)];return wt(()=>{l.forEach(u=>u())})}function Mj({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],s=new WeakMap,i=n.FontFace;n.FontFace=function(l,u,c){const d=new i(l,u,c);return s.set(d,{family:l,buffer:typeof u!="string",descriptors:c,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),d};const o=t0(t.fonts,"add",function(a){return function(l){return Am(wt(()=>{const u=s.get(l);u&&(e(u),s.delete(l))}),0),a.apply(this,[l])}});return r.push(()=>{n.FontFace=i}),r.push(o),wt(()=>{r.forEach(a=>a())})}function Dj(e){const{doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,selectionCb:o}=e;let a=!0;const l=wt(()=>{const u=t.getSelection();if(!u||a&&(u!=null&&u.isCollapsed))return;a=u.isCollapsed||!1;const c=[],d=u.rangeCount||0;for(let f=0;f<d;f++){const h=u.getRangeAt(f),{startContainer:g,startOffset:m,endContainer:y,endOffset:w}=h;Gr(g,r,s,i,!0)||Gr(y,r,s,i,!0)||c.push({start:n.getId(g),startOffset:m,end:n.getId(y),endOffset:w})}o({ranges:c})});return l(),gr("selectionchange",l)}function Lj({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:t0(n.customElements,"define",function(s){return function(i,o,a){try{t({define:{name:i}})}catch{}return s.apply(this,[i,o,a])}})}function $j(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=MA(e,e.doc));const s=Ej(e),i=Cj(e),o=DA(e),a=Tj(e,{win:n}),l=Rj(e),u=Oj(e);let c=()=>{},d=()=>{},f=()=>{},h=()=>{};e.recordDOM&&(c=Ij(e,{win:n}),d=LA(e,e.doc),f=Aj(e,{win:n}),e.collectFonts&&(h=Mj(e)));const g=Dj(e),m=Lj(e),y=[];for(const w of e.plugins)y.push(w.observer(w.callback,n,w.options));return wt(()=>{Ll.forEach(w=>w.reset()),r==null||r.disconnect(),s(),i(),o(),a(),l(),u(),c(),d(),f(),h(),g(),m(),y.forEach(w=>w())})}function Lf(e){return typeof window[e]<"u"}function $f(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Ny{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,s){const i=r||this.getIdToRemoteIdMap(t),o=s||this.getRemoteIdToIdMap(t);let a=i.get(n);return a||(a=this.generateIdFn(),i.set(n,a),o.set(a,n)),a}getIds(t,n){const r=this.getIdToRemoteIdMap(t),s=this.getRemoteIdToIdMap(t);return n.map(i=>this.getId(t,i,r,s))}getRemoteId(t,n,r){const s=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;const i=s.get(n);return i||-1}getRemoteIds(t,n){const r=this.getRemoteIdToIdMap(t);return n.map(s=>this.getRemoteId(t,s,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}}class Fj{constructor(){this.crossOriginIframeMirror=new Ny(e0),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class Nj{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Ny(e0),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Ny(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){var s,i;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((s=t.contentWindow)==null||s.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,t);const r=r0(t);r&&r.adoptedStyleSheets&&r.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(r.adoptedStyleSheets,this.mirror.getId(r))}handleMessage(t){const n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;const s=this.crossOriginIframeMap.get(t.source);if(!s)return;const i=this.transformCrossOriginEvent(s,n.data.event);i&&this.wrappedEmit(i,n.data.isCheckout)}transformCrossOriginEvent(t,n){var r;switch(n.type){case ct.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);const s=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,s),this.patchRootIdOnNode(n.data.node,s),{timestamp:n.timestamp,type:ct.IncrementalSnapshot,data:{source:tt.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case ct.Meta:case ct.Load:case ct.DomContentLoaded:return!1;case ct.Plugin:return n;case ct.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case ct.IncrementalSnapshot:switch(n.data.source){case tt.Mutation:return n.data.adds.forEach(s=>{this.replaceIds(s,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(s.node,t);const i=this.crossOriginIframeRootIdMap.get(t);i&&this.patchRootIdOnNode(s.node,i)}),n.data.removes.forEach(s=>{this.replaceIds(s,t,["parentId","id"])}),n.data.attributes.forEach(s=>{this.replaceIds(s,t,["id"])}),n.data.texts.forEach(s=>{this.replaceIds(s,t,["id"])}),n;case tt.Drag:case tt.TouchMove:case tt.MouseMove:return n.data.positions.forEach(s=>{this.replaceIds(s,t,["id"])}),n;case tt.ViewportResize:return!1;case tt.MediaInteraction:case tt.MouseInteraction:case tt.Scroll:case tt.CanvasMutation:case tt.Input:return this.replaceIds(n.data,t,["id"]),n;case tt.StyleSheetRule:case tt.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case tt.Font:return n;case tt.Selection:return n.data.ranges.forEach(s=>{this.replaceIds(s,t,["start","end"])}),n;case tt.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),(r=n.data.styles)==null||r.forEach(s=>{this.replaceStyleIds(s,t,["styleId"])}),n}}return!1}replace(t,n,r,s){for(const i of s)!Array.isArray(n[i])&&typeof n[i]!="number"||(Array.isArray(n[i])?n[i]=t.getIds(r,n[i]):n[i]=t.getId(r,n[i]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(t,n){t.type!==kn.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class Bj{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class Vj{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,n){if(!Bc(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const r=MA({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(DA({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),Am(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(LA({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){const n=r0(t),r=bj(t);!n||!r||this.patchAttachShadow(r.Element,n)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(t0(t.prototype,"attachShadow",function(s){return function(i){const o=s.call(this,i);return this.shadowRoot&&AA(this)&&r.addShadowRoot(this.shadowRoot,n),o}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}var Tk="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Uj=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Ff=0;Ff<Tk.length;Ff++)Uj[Tk.charCodeAt(Ff)]=Ff;class Pk{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class zj{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new pj,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;const r={id:n,styleIds:[]},s=[];for(const i of t){let o;this.styleMirror.has(i)?o=this.styleMirror.getId(i):(o=this.styleMirror.add(i),s.push({styleId:o,rules:Array.from(i.rules||CSSRule,(a,l)=>({rule:pA(a),index:l}))})),r.styleIds.push(o)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class Hj{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(t,n){const r=this.nodeMap.get(t);return r&&Array.from(r).some(s=>s!==n)}add(t,n){this.active||(this.active=!0,vj(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}destroy(){}}let hn,xp;var EC;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((EC=e.contentWindow)==null?void 0:EC.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const Ts=z8();function zi(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:s="rr-block",blockSelector:i=null,unblockSelector:o=null,ignoreClass:a="rr-ignore",ignoreSelector:l=null,maskAllText:u=!1,maskTextClass:c="rr-mask",unmaskTextClass:d=null,maskTextSelector:f=null,unmaskTextSelector:h=null,inlineStylesheet:g=!0,maskAllInputs:m,maskInputOptions:y,slimDOMOptions:w,maskAttributeFn:b,maskInputFn:x,maskTextFn:_,maxCanvasSize:S=null,packFn:P,sampling:A={},dataURLOptions:E={},mousemoveWait:T,recordDOM:R=!0,recordCanvas:I=!1,recordCrossOriginIframes:O=!1,recordAfter:H=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:N=!1,collectFonts:D=!1,inlineImages:W=!1,plugins:U,keepIframeSrcFn:Q=()=>!1,ignoreCSSAttributes:V=new Set([]),errorHandler:L,onMutation:oe,getCanvasManager:j}=e;kj(L);const F=O?window.parent===window:!0;let re=!1;if(!F)try{window.parent.document&&(re=!1)}catch{re=!0}if(F&&!t)throw new Error("emit function is required");if(!F&&!re)return()=>{};T!==void 0&&A.mousemove===void 0&&(A.mousemove=T),Ts.reset();const ae=m===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:y!==void 0?y:{},Se=w===!0||w==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:w==="all",headMetaDescKeywords:w==="all"}:w||{};hj();let X,le=0;const ee=ye=>{for(const ke of U||[])ke.eventProcessor&&(ye=ke.eventProcessor(ye));return P&&!re&&(ye=P(ye)),ye};hn=(ye,ke)=>{var Ve;const ge=ye;if(ge.timestamp=_p(),(Ve=Ll[0])!=null&&Ve.isFrozen()&&ge.type!==ct.FullSnapshot&&!(ge.type===ct.IncrementalSnapshot&&ge.data.source===tt.Mutation)&&Ll.forEach(Ie=>Ie.unfreeze()),F)t==null||t(ee(ge),ke);else if(re){const Ie={type:"rrweb",event:ee(ge),origin:window.location.origin,isCheckout:ke};window.parent.postMessage(Ie,"*")}if(ge.type===ct.FullSnapshot)X=ge,le=0;else if(ge.type===ct.IncrementalSnapshot){if(ge.data.source===tt.Mutation&&ge.data.isAttachIframe)return;le++;const Ie=r&&le>=r,Te=n&&X&&ge.timestamp-X.timestamp>n;(Ie||Te)&&Ce(!0)}};const G=ye=>{hn({type:ct.IncrementalSnapshot,data:{source:tt.Mutation,...ye}})},_e=ye=>hn({type:ct.IncrementalSnapshot,data:{source:tt.Scroll,...ye}}),De=ye=>hn({type:ct.IncrementalSnapshot,data:{source:tt.CanvasMutation,...ye}}),B=ye=>hn({type:ct.IncrementalSnapshot,data:{source:tt.AdoptedStyleSheet,...ye}}),z=new zj({mutationCb:G,adoptedStyleSheetCb:B}),q=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new Fj:new Nj({mirror:Ts,mutationCb:G,stylesheetManager:z,recordCrossOriginIframes:O,wrappedEmit:hn});for(const ye of U||[])ye.getMirror&&ye.getMirror({nodeMirror:Ts,crossOriginIframeMirror:q.crossOriginIframeMirror,crossOriginIframeStyleMirror:q.crossOriginIframeStyleMirror});const ce=new Hj,de=Wj(j,{mirror:Ts,win:window,mutationCb:ye=>hn({type:ct.IncrementalSnapshot,data:{source:tt.CanvasMutation,...ye}}),recordCanvas:I,blockClass:s,blockSelector:i,unblockSelector:o,maxCanvasSize:S,sampling:A.canvas,dataURLOptions:E,errorHandler:L}),be=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new Bj:new Vj({mutationCb:G,scrollCb:_e,bypassOptions:{onMutation:oe,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:c,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:h,inlineStylesheet:g,maskInputOptions:ae,dataURLOptions:E,maskAttributeFn:b,maskTextFn:_,maskInputFn:x,recordCanvas:I,inlineImages:W,sampling:A,slimDOMOptions:Se,iframeManager:q,stylesheetManager:z,canvasManager:de,keepIframeSrcFn:Q,processedNodeManager:ce},mirror:Ts}),Ce=(ye=!1)=>{if(!R)return;hn({type:ct.Meta,data:{href:window.location.href,width:EA(),height:xA()}},ye),z.reset(),be.init(),Ll.forEach(ge=>ge.lock());const ke=dj(document,{mirror:Ts,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:c,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:h,inlineStylesheet:g,maskAllInputs:ae,maskAttributeFn:b,maskInputFn:x,maskTextFn:_,slimDOM:Se,dataURLOptions:E,recordCanvas:I,inlineImages:W,onSerialize:ge=>{PA(ge,Ts)&&q.addIframe(ge),RA(ge,Ts)&&z.trackLinkElement(ge),$y(ge)&&be.addShadowRoot(ge.shadowRoot,document)},onIframeLoad:(ge,Ve)=>{q.attachIframe(ge,Ve),ge.contentWindow&&de.addWindow(ge.contentWindow),be.observeAttachShadow(ge)},onStylesheetLoad:(ge,Ve)=>{z.attachLinkElement(ge,Ve)},onBlockedImageLoad:(ge,Ve,{width:Ie,height:Te})=>{G({adds:[],removes:[],texts:[],attributes:[{id:Ve.id,attributes:{style:{width:`${Ie}px`,height:`${Te}px`}}}]})},keepIframeSrcFn:Q});if(!ke)return console.warn("Failed to snapshot the document");hn({type:ct.FullSnapshot,data:{node:ke,initialOffset:kA(window)}}),Ll.forEach(ge=>ge.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&z.adoptStyleSheets(document.adoptedStyleSheets,Ts.getId(document))};xp=Ce;try{const ye=[],ke=Ve=>{var Ie;return wt($j)({onMutation:oe,mutationCb:G,mousemoveCb:(Te,Ye)=>hn({type:ct.IncrementalSnapshot,data:{source:Ye,positions:Te}}),mouseInteractionCb:Te=>hn({type:ct.IncrementalSnapshot,data:{source:tt.MouseInteraction,...Te}}),scrollCb:_e,viewportResizeCb:Te=>hn({type:ct.IncrementalSnapshot,data:{source:tt.ViewportResize,...Te}}),inputCb:Te=>hn({type:ct.IncrementalSnapshot,data:{source:tt.Input,...Te}}),mediaInteractionCb:Te=>hn({type:ct.IncrementalSnapshot,data:{source:tt.MediaInteraction,...Te}}),styleSheetRuleCb:Te=>hn({type:ct.IncrementalSnapshot,data:{source:tt.StyleSheetRule,...Te}}),styleDeclarationCb:Te=>hn({type:ct.IncrementalSnapshot,data:{source:tt.StyleDeclaration,...Te}}),canvasMutationCb:De,fontCb:Te=>hn({type:ct.IncrementalSnapshot,data:{source:tt.Font,...Te}}),selectionCb:Te=>{hn({type:ct.IncrementalSnapshot,data:{source:tt.Selection,...Te}})},customElementCb:Te=>{hn({type:ct.IncrementalSnapshot,data:{source:tt.CustomElement,...Te}})},blockClass:s,ignoreClass:a,ignoreSelector:l,maskAllText:u,maskTextClass:c,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:h,maskInputOptions:ae,inlineStylesheet:g,sampling:A,recordDOM:R,recordCanvas:I,inlineImages:W,userTriggeredOnInput:N,collectFonts:D,doc:Ve,maskAttributeFn:b,maskInputFn:x,maskTextFn:_,keepIframeSrcFn:Q,blockSelector:i,unblockSelector:o,slimDOMOptions:Se,dataURLOptions:E,mirror:Ts,iframeManager:q,stylesheetManager:z,shadowDomManager:be,processedNodeManager:ce,canvasManager:de,ignoreCSSAttributes:V,plugins:((Ie=U==null?void 0:U.filter(Te=>Te.observer))==null?void 0:Ie.map(Te=>({observer:Te.observer,options:Te.options,callback:Ye=>hn({type:ct.Plugin,data:{plugin:Te.name,payload:Ye}})})))||[]},{})};q.addLoadListener(Ve=>{try{ye.push(ke(Ve.contentDocument))}catch(Ie){console.warn(Ie)}});const ge=()=>{Ce(),ye.push(ke(document))};return document.readyState==="interactive"||document.readyState==="complete"?ge():(ye.push(gr("DOMContentLoaded",()=>{hn({type:ct.DomContentLoaded,data:{}}),H==="DOMContentLoaded"&&ge()})),ye.push(gr("load",()=>{hn({type:ct.Load,data:{}}),H==="load"&&ge()},window))),()=>{ye.forEach(Ve=>Ve()),ce.destroy(),xp=void 0,xj()}}catch(ye){console.warn(ye)}}function jj(e){if(!xp)throw new Error("please take full snapshot after start recording");xp(e)}zi.mirror=Ts;zi.takeFullSnapshot=jj;function Wj(e,t){try{return e?e(t):new Pk}catch{return console.warn("Unable to initialize CanvasManager"),new Pk}}var Rk;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Rk||(Rk={}));const qj=3,Gj=5;function s0(e){return e>9999999999?e:e*1e3}function Yg(e){return e>9999999999?e/1e3:e}function lf(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:ct.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:Is(t,10,1e3)}}),t.category==="console")))}const Kj="button,a";function $A(e){return e.closest(Kj)||e}function FA(e){const t=NA(e);return!t||!(t instanceof Element)?t:$A(t)}function NA(e){return Yj(e)?e.target:e}function Yj(e){return typeof e=="object"&&!!e&&"target"in e}let vo;function Xj(e){return vo||(vo=[],Qj()),vo.push(e),()=>{const t=vo?vo.indexOf(e):-1;t>-1&&vo.splice(t,1)}}function Qj(){Or(Kt,"open",function(e){return function(...t){if(vo)try{vo.forEach(n=>n())}catch{}return e.apply(Kt,t)}})}const Jj=new Set([tt.Mutation,tt.StyleSheetRule,tt.StyleDeclaration,tt.AdoptedStyleSheet,tt.CanvasMutation,tt.Selection,tt.MediaInteraction]);function Zj(e,t,n){e.handleClick(t,n)}class e6{constructor(t,n,r=lf){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scrollTimeout=n.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){const t=Xj(()=>{this._lastMutation=Ik()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,n){if(n6(n,this._ignoreSelector)||!r6(t))return;const r={timestamp:Yg(t.timestamp),clickBreadcrumb:t,clickCount:0,node:n};this._clicks.some(s=>s.node===r.node&&Math.abs(s.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=Yg(t)}registerScroll(t=Date.now()){this._lastScroll=Yg(t)}registerClick(t){const n=$A(t);this._handleMultiClick(n)}_handleMultiClick(t){this._getClicks(t).forEach(n=>{n.clickCount++})}_getClicks(t){return this._clicks.filter(n=>n.node===t)}_checkClicks(){const t=[],n=Ik();this._clicks.forEach(r=>{!r.mutationAfter&&this._lastMutation&&(r.mutationAfter=r.timestamp<=this._lastMutation?this._lastMutation-r.timestamp:void 0),!r.scrollAfter&&this._lastScroll&&(r.scrollAfter=r.timestamp<=this._lastScroll?this._lastScroll-r.timestamp:void 0),r.timestamp+this._timeout<=n&&t.push(r)});for(const r of t){const s=this._clicks.indexOf(r);s>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(s,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const n=this._replay,r=t.scrollAfter&&t.scrollAfter<=this._scrollTimeout,s=t.mutationAfter&&t.mutationAfter<=this._threshold,i=!r&&!s,{clickCount:o,clickBreadcrumb:a}=t;if(i){const l=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,u=l<this._timeout*1e3?"mutation":"timeout",c={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:Kt.location.href,route:n.getCurrentRoute(),timeAfterClickMs:l,endReason:u,clickCount:o||1}};this._addBreadcrumbEvent(n,c);return}if(o>1){const l={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:Kt.location.href,route:n.getCurrentRoute(),clickCount:o,metric:!0}};this._addBreadcrumbEvent(n,l)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=of(()=>this._checkClicks(),1e3)}}const t6=["A","BUTTON","INPUT"];function n6(e,t){return!!(!t6.includes(e.tagName)||e.tagName==="INPUT"&&!["submit","button"].includes(e.getAttribute("type")||"")||e.tagName==="A"&&(e.hasAttribute("download")||e.hasAttribute("target")&&e.getAttribute("target")!=="_self")||t&&e.matches(t))}function r6(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function Ik(){return Date.now()/1e3}function s6(e,t){try{if(!i6(t))return;const{source:n}=t.data;if(Jj.has(n)&&e.registerMutation(t.timestamp),n===tt.Scroll&&e.registerScroll(t.timestamp),o6(t)){const{type:r,id:s}=t.data,i=zi.mirror.getNode(s);i instanceof HTMLElement&&r===dr.Click&&e.registerClick(i)}}catch{}}function i6(e){return e.type===qj}function o6(e){return e.data.source===tt.MouseInteraction}function ci(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var i0=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(i0||{});const a6=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function l6(e){const t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(const n in e)if(a6.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}const u6=e=>t=>{if(!e.isEnabled())return;const n=c6(t);if(!n)return;const r=t.name==="click",s=r?t.event:void 0;r&&e.clickDetector&&(s!=null&&s.target)&&!s.altKey&&!s.metaKey&&!s.ctrlKey&&!s.shiftKey&&Zj(e.clickDetector,n,FA(t.event)),lf(e,n)};function BA(e,t){const n=zi.mirror.getId(e),r=n&&zi.mirror.getNode(n),s=r&&zi.mirror.getMeta(r),i=s&&f6(s)?s:null;return{message:t,data:i?{nodeId:n,node:{id:n,tagName:i.tagName,textContent:Array.from(i.childNodes).map(o=>o.type===i0.Text&&o.textContent).filter(Boolean).map(o=>o.trim()).join(""),attributes:l6(i.attributes)}}:{}}}function c6(e){const{target:t,message:n}=d6(e);return ci({category:`ui.${e.name}`,...BA(t,n)})}function d6(e){const t=e.name==="click";let n,r=null;try{r=t?FA(e.event):NA(e.event),n=ms(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function f6(e){return e.type===i0.Element}function h6(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=p6(t);n&&lf(e,n)}function p6(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:i,target:o}=e;if(!o||m6(o)||!i)return null;const a=t||r||s,l=i.length===1;if(!a&&l)return null;const u=ms(o,{maxStringLength:200})||"<unknown>",c=BA(o,u);return ci({category:"ui.keyDown",message:u,data:{...c.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:i}})}function m6(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const g6={resource:S6,paint:b6,navigation:w6};function Xg(e,t){return({metric:n})=>void t.replayPerformanceEntries.push(e(n))}function v6(e){return e.map(y6).filter(Boolean)}function y6(e){const t=g6[e.entryType];return t?t(e):null}function bu(e){return((jr()||Kt.performance.timeOrigin)+e)/1e3}function b6(e){const{duration:t,entryType:n,name:r,startTime:s}=e,i=bu(s);return{type:n,name:r,start:i,end:i+t,data:void 0}}function w6(e){const{entryType:t,name:n,decodedBodySize:r,duration:s,domComplete:i,encodedBodySize:o,domContentLoadedEventStart:a,domContentLoadedEventEnd:l,domInteractive:u,loadEventStart:c,loadEventEnd:d,redirectCount:f,startTime:h,transferSize:g,type:m}=e;return s===0?null:{type:`${t}.${m}`,start:bu(h),end:bu(i),name:n,data:{size:g,decodedBodySize:r,encodedBodySize:o,duration:s,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:l,loadEventStart:c,loadEventEnd:d,domComplete:i,redirectCount:f}}}function S6(e){const{entryType:t,initiatorType:n,name:r,responseEnd:s,startTime:i,decodedBodySize:o,encodedBodySize:a,responseStatus:l,transferSize:u}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:bu(i),end:bu(s),name:r,data:{size:u,statusCode:l,decodedBodySize:o,encodedBodySize:a}}}function _6(e){const t=e.entries[e.entries.length-1],n=t!=null&&t.element?[t.element]:void 0;return o0(e,"largest-contentful-paint",n)}function k6(e){return e.sources!==void 0}function x6(e){const t=[],n=[];for(const r of e.entries)if(k6(r)){const s=[];for(const i of r.sources)if(i.node){n.push(i.node);const o=zi.mirror.getId(i.node);o&&s.push(o)}t.push({value:r.value,nodeIds:s.length?s:void 0})}return o0(e,"cumulative-layout-shift",n,t)}function E6(e){const t=e.entries[e.entries.length-1],n=t!=null&&t.target?[t.target]:void 0;return o0(e,"interaction-to-next-paint",n)}function o0(e,t,n,r){const s=e.value,i=e.rating,o=bu(s);return{type:"web-vital",name:t,start:o,end:o,data:{value:s,size:s,rating:i,nodeIds:n?n.map(a=>zi.mirror.getId(a)):void 0,attributions:r}}}function C6(e){function t(s){e.performanceEntries.includes(s)||e.performanceEntries.push(s)}function n({entries:s}){s.forEach(t)}const r=[];return["navigation","paint","resource"].forEach(s=>{r.push(Za(s,n))}),r.push(K1(Xg(_6,e)),G1(Xg(x6,e)),ZI(Xg(E6,e))),()=>{r.forEach(s=>s())}}const Xe=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,T6='var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new n(31),s=0;s<31;++s)i[s]=e+=1<<t[s-1];var a=new r(i[30]);for(s=1;s<30;++s)for(var o=i[s];o<i[s+1];++o)a[o]=o-i[s]<<5|s;return{b:i,r:a}},o=a(e,2),h=o.b,f=o.r;h[28]=258,f[258]=28;for(var l=a(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,s=0,a=new n(r);s<i;++s)t[s]&&++a[t[s]-1];var o,h=new n(r);for(s=1;s<r;++s)h[s]=h[s-1]+a[s-1]<<1;if(e){o=new n(1<<r);var f=15-r;for(s=0;s<i;++s)if(t[s])for(var l=s<<4|t[s],c=r-t[s],v=h[t[s]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>f]=l}else for(o=new n(i),s=0;s<i;++s)t[s]&&(o[s]=u[h[t[s]-1]++]>>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],s=0;s<r.length;++s)r[s]&&i.push({s:s,f:r[s]});var a=i.length,o=i.slice();if(!a)return{t:F,l:0};if(1==a){var h=new t(i[0].s+1);return h[i[0].s]=1,{t:h,l:1}}i.sort(function(t,n){return t.f-n.f}),i.push({s:-1,f:25001});var f=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:f.f+l.f,l:f,r:l};c!=a-1;)f=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:f.f+l.f,l:f,r:l};var d=o[0].s;for(s=1;s<a;++s)o[s].s>d&&(d=o[s].s);var p=new n(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<<y;for(o.sort(function(t,n){return p[n.s]-p[t.s]||t.f-n.f});s<a;++s){var b=o[s].s;if(!(p[b]>e))break;w+=m-(1<<g-p[b]),p[b]=e}for(w>>=y;w>0;){var M=o[s].s;p[M]<e?w-=1<<e-p[M]++-1:++s}for(;s>=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=r;++h)if(t[h]==s&&h!=r)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s<e;++s)t[i+s+4]=r[s];return 8*(i+4+e)},U=function(t,r,a,o,h,f,l,u,c,v,m){z(r,m++,a),++h[256];for(var b=x(h,15),M=b.t,E=b.l,A=x(f,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[s[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=w,P=p,Q=y,R=g;for(B=0;B<u;++B){var rt=o[B];if(rt>255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=e+=r[a];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(s[t]^s[t+1]<<A^s[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(s[j+Q]==s[j+Q-W]){for(var $=0;$<Z&&s[j+$]==s[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=s[j],++I[s[j]];w=U(s,p,g,F,I,S,O,q,G,j-G,w),g||(c.r=7&w|p[w/8|0]<<3,w-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+g;j+=65535){var at=j+65535;at>=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(n.subarray(0,s),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(s),32768),this.s.z=n.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n.prototype.flush=function(){this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,s=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),a=s.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(s,n),O(s,a-8,r.d()),O(s,a-4,e),s}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){j.prototype.flush.call(this)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(G)return G.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),s=0,a=function(t){i[s++]=t},o=0;o<e;++o){if(s+5>i.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=n.charCodeAt(o);f<128||r?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&n.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J((t,n)=>{this.deflate.push(t,n)}),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}}),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function P6(){const e=new Blob([T6]);return URL.createObjectURL(e)}const Ak=["log","warn","error"],Eh="[Replay] ";function Qg(e,t="info"){jo({category:"console",data:{logger:"replay"},level:t,message:`${Eh}${e}`},{level:t})}function R6(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:r=>{e=!!r.captureExceptions,t=!!r.traceInternals}};return Xe?(Ak.forEach(r=>{n[r]=(...s)=>{Ae[r](Eh,...s),t&&Qg(s.join(""),FI(r))}}),n.exception=(r,...s)=>{s.length&&n.error&&n.error(...s),Ae.error(Eh,r),e?fi(r,{mechanism:{handled:!0,type:"auto.function.replay.debug"}}):t&&Qg(r,"error")},n.infoTick=(...r)=>{Ae.log(Eh,...r),t&&setTimeout(()=>Qg(r[0]),0)}):Ak.forEach(r=>{n[r]=()=>{}}),n}const Qe=R6();class a0 extends Error{constructor(){super(`Event buffer exceeded maximum size of ${J1}.`)}}class VA{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(t){const n=JSON.stringify(t).length;if(this._totalSize+=n,this._totalSize>J1)throw new a0;this.events.push(t)}finish(){return new Promise(t=>{const n=this.events;this.clear(),t(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const t=this.events.map(n=>n.timestamp).sort()[0];return t?s0(t):null}}class I6{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?t():n()},{once:!0}),this._worker.addEventListener("error",r=>{n(r)},{once:!0})}),this._ensureReadyPromise)}destroy(){Xe&&Qe.log("Destroying compression worker"),this._worker.terminate()}postMessage(t,n){const r=this._getAndIncrementId();return new Promise((s,i)=>{const o=({data:a})=>{const l=a;if(l.method===t&&l.id===r){if(this._worker.removeEventListener("message",o),!l.success){Xe&&Qe.error("Error in compression worker: ",l.response),i(new Error("Error in compression worker"));return}s(l.response)}};this._worker.addEventListener("message",o),this._worker.postMessage({id:r,method:t,arg:n})})}_getAndIncrementId(){return this._id++}}class A6{constructor(t){this._worker=new I6(t),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(t){const n=s0(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>J1?Promise.reject(new a0):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{Xe&&Qe.exception(t,'Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){const t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}}class O6{constructor(t){this._fallback=new VA,this._compression=new A6(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(t){this._used.hasCheckout=t}set waitForCheckout(t){this._used.waitForCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(t){Xe&&Qe.exception(t,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:n,waitForCheckout:r}=this._fallback,s=[];for(const i of t)s.push(this._compression.addEvent(i));this._compression.hasCheckout=n,this._compression.waitForCheckout=r,this._used=this._compression;try{await Promise.all(s),this._fallback.clear()}catch(i){Xe&&Qe.exception(i,"Failed to add events when switching buffers.")}}}function M6({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=D6(t);if(n)return n}return Xe&&Qe.log("Using simple buffer"),new VA}function D6(e){try{const t=e||L6();if(!t)return;Xe&&Qe.log(`Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new O6(n)}catch(t){Xe&&Qe.exception(t,"Failed to create compression worker")}}function L6(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?P6():""}function l0(){try{return"sessionStorage"in Kt&&!!Kt.sessionStorage}catch{return!1}}function $6(e){F6(),e.session=void 0}function F6(){if(l0())try{Kt.sessionStorage.removeItem(X1)}catch{}}function UA(e){return e===void 0?!1:Math.random()<e}function u0(e){if(l0())try{Kt.sessionStorage.setItem(X1,JSON.stringify(e))}catch{}}function zA(e){const t=Date.now(),n=e.id||Xr(),r=e.started||t,s=e.lastActivity||t,i=e.segmentId||0,o=e.sampled,a=e.previousSessionId;return{id:n,started:r,lastActivity:s,segmentId:i,sampled:o,previousSessionId:a}}function N6(e,t){return UA(e)?"session":t?"buffer":!1}function Ok({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const s=N6(e,t),i=zA({sampled:s,previousSessionId:r});return n&&u0(i),i}function B6(){if(!l0())return null;try{const e=Kt.sessionStorage.getItem(X1);if(!e)return null;const t=JSON.parse(e);return Xe&&Qe.infoTick("Loading existing session"),zA(t)}catch{return null}}function By(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function HA(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return By(e.started,t,r)||By(e.lastActivity,n,r)}function jA(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!HA(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function Jg({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const s=r.stickySession&&B6();return s?jA(s,{sessionIdleExpire:e,maxReplayDuration:t})?(Xe&&Qe.infoTick("Session in sessionStorage is expired, creating new one..."),Ok(r,{previousSessionId:s.id})):s:(Xe&&Qe.infoTick("Creating new session"),Ok(r,{previousSessionId:n}))}function V6(e){return e.type===ct.Custom}function c0(e,t,n){return qA(e,t)?(WA(e,t,n),!0):!1}function U6(e,t,n){return qA(e,t)?WA(e,t,n):Promise.resolve(null)}async function WA(e,t,n){const{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;const s=e.recordingMode==="buffer";try{n&&s&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const i=e.getOptions(),o=z6(t,i.beforeAddRecordingEvent);return o?await r.addEvent(o):void 0}catch(i){const o=i&&i instanceof a0,a=o?"addEventSizeExceeded":"addEvent";if(o&&s)return r.clear(),r.waitForCheckout=!0,null;e.handleException(i),await e.stop({reason:a});const l=ht();l&&l.recordDroppedEvent("internal_sdk_error","replay")}}function qA(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=s0(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(Xe&&Qe.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function z6(e,t){try{if(typeof t=="function"&&V6(e))return t(e)}catch(n){return Xe&&Qe.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function d0(e){return!e.type}function Vy(e){return e.type==="transaction"}function H6(e){return e.type==="replay_event"}function Mk(e){return e.type==="feedback"}function j6(e){return(t,n)=>{if(!e.isEnabled()||!d0(t)&&!Vy(t))return;const r=n.statusCode;if(!(!r||r<200||r>=300)){if(Vy(t)){W6(e,t);return}q6(e,t)}}}function W6(e,t){var r,s;const n=e.getContext();(s=(r=t.contexts)==null?void 0:r.trace)!=null&&s.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function q6(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||of(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(s){e.handleException(s)}})}function G6(e){return t=>{!e.isEnabled()||!d0(t)||K6(e,t)}}function K6(e,t){var r,s,i;const n=(i=(s=(r=t.exception)==null?void 0:r.values)==null?void 0:s[0])==null?void 0:i.value;if(typeof n=="string"&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){const o=ci({category:"replay.hydrate-error",data:{url:Hu()}});lf(e,o)}}function Y6(e){const t=ht();t&&t.on("beforeAddBreadcrumb",n=>X6(e,n))}function X6(e,t){if(!e.isEnabled()||!GA(t))return;const n=Q6(t);n&&lf(e,n)}function Q6(e){return!GA(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?J6(e):ci(e)}function J6(e){var s;const t=(s=e.data)==null?void 0:s.arguments;if(!Array.isArray(t)||t.length===0)return ci(e);let n=!1;const r=t.map(i=>{if(!i)return i;if(typeof i=="string")return i.length>Df?(n=!0,`${i.slice(0,Df)}…`):i;if(typeof i=="object")try{const o=Is(i,7);return JSON.stringify(o).length>Df?(n=!0,`${JSON.stringify(o,null,2).slice(0,Df)}…`):o}catch{}return i});return ci({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function GA(e){return!!e.category}function Z6(e,t){var n,r,s;return e.type||!((r=(n=e.exception)==null?void 0:n.values)!=null&&r.length)?!1:!!((s=t.originalException)!=null&&s.__rrweb__)}function KA(){const e=Mt().getPropagationContext().dsc;e&&delete e.replay_id;const t=Jn();if(t){const n=eo(t);delete n.replay_id}}function eW(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:ct.Custom,timestamp:t.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1):!0)}function tW(e,t){return e.recordingMode!=="buffer"||t.message===Q1||!t.exception||t.type?!1:UA(e.getOptions().errorSampleRate)}function nW(e){return Object.assign((t,n)=>!e.isEnabled()||e.isPaused()?t:H6(t)?(delete t.breadcrumbs,t):!d0(t)&&!Vy(t)&&!Mk(t)?t:e.checkAndHandleExpiredSession()?Mk(t)?(e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),eW(e,t),t):Z6(t,n)&&!e.getOptions()._experiments.captureExceptions?(Xe&&Qe.log("Ignoring error from rrweb internals",t),null):((tW(e,t)||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),t):(KA(),t),{id:"Replay"})}function Om(e,t){return t.map(({type:n,start:r,end:s,name:i,data:o})=>{const a=e.throttledAddEvent({type:ct.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:i,startTimestamp:r,endTimestamp:s,data:o}}});return typeof a=="string"?Promise.resolve(null):a})}function rW(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}function sW(e){return t=>{if(!e.isEnabled())return;const n=rW(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(Om(e,[n]),!1)))}}function iW(e,t){return Xe&&e.getOptions()._experiments.traceInternals?!1:J5(t,ht())}function YA(e,t){e.isEnabled()&&t!==null&&(iW(e,t.name)||e.addUpdate(()=>(Om(e,[t]),!0)))}function Mm(e){if(!e)return;const t=new TextEncoder;try{if(typeof e=="string")return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=lA(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function XA(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function Ep(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function QA(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:s,method:i,statusCode:o,request:a,response:l}=t;return{type:e,start:n/1e3,end:r/1e3,name:s,data:{method:i,statusCode:o,request:a,response:l}}}function pd(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function Oo(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:s,warnings:i}=oW(n);return r.body=s,i!=null&&i.length&&(r._meta={warnings:i}),r}function Uy(e,t){return Object.entries(e).reduce((n,[r,s])=>{const i=r.toLowerCase();return t.includes(i)&&e[r]&&(n[i]=s),n},{})}function oW(e){if(!e||typeof e!="string")return{body:e};const t=e.length>hk,n=aW(e);if(t){const r=e.slice(0,hk);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${r}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function aW(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function Cp(e,t){const n=lW(e);return Vi(n,t)}function lW(e,t=Kt.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(Kt.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}async function uW(e,t,n){try{const r=await dW(e,t,n),s=QA("resource.fetch",r);YA(n.replay,s)}catch(r){Xe&&Qe.exception(r,"Failed to capture fetch breadcrumb")}}function cW(e,t){const{input:n,response:r}=t,s=n?cA(n):void 0,i=Mm(s),o=r?XA(r.headers.get("content-length")):void 0;i!==void 0&&(e.data.request_body_size=i),o!==void 0&&(e.data.response_body_size=o)}async function dW(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:i=r}=t,{url:o,method:a,status_code:l=0,request_body_size:u,response_body_size:c}=e.data,d=Cp(o,n.networkDetailAllowUrls)&&!Cp(o,n.networkDetailDenyUrls),f=d?fW(n,t.input,u):pd(u),h=await hW(d,n,t.response,c);return{startTimestamp:s,endTimestamp:i,url:o,method:a,statusCode:l,request:f,response:h}}function fW({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const s=n?gW(n,t):{};if(!e)return Oo(s,r,void 0);const i=cA(n),[o,a]=uA(i,Qe),l=Oo(s,r,o);return a?Ep(l,a):l}async function hW(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,s){if(!e&&s!==void 0)return pd(s);const i=r?JA(r.headers,n):{};if(!r||!t&&s!==void 0)return Oo(i,s,void 0);const[o,a]=await mW(r),l=pW(o,{networkCaptureBodies:t,responseBodySize:s,captureDetails:e,headers:i});return a?Ep(l,a):l}function pW(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:s}){try{const i=e!=null&&e.length&&n===void 0?Mm(e):n;return r?t?Oo(s,i,e):Oo(s,i,void 0):pd(i)}catch(i){return Xe&&Qe.exception(i,"Failed to serialize response body"),Oo(s,n,void 0)}}async function mW(e){const t=vW(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await yW(t)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(Xe&&Qe.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(Xe&&Qe.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function JA(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function gW(e,t){return e.length===1&&typeof e[0]!="string"?Dk(e[0],t):e.length===2?Dk(e[1],t):{}}function Dk(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?JA(n,t):Array.isArray(n)?{}:Uy(n,t):{}}function vW(e){try{return e.clone()}catch(t){Xe&&Qe.exception(t,"Failed to clone response body")}}function yW(e){return new Promise((t,n)=>{const r=of(()=>n(new Error("Timeout while trying to read response body")),500);bW(e).then(s=>t(s),s=>n(s)).finally(()=>clearTimeout(r))})}async function bW(e){return await e.text()}async function wW(e,t,n){try{const r=_W(e,t,n),s=QA("resource.xhr",r);YA(n.replay,s)}catch(r){Xe&&Qe.exception(r,"Failed to capture xhr breadcrumb")}}function SW(e,t){const{xhr:n,input:r}=t;if(!n)return;const s=Mm(r),i=n.getResponseHeader("content-length")?XA(n.getResponseHeader("content-length")):CW(n.response,n.responseType);s!==void 0&&(e.data.request_body_size=s),i!==void 0&&(e.data.response_body_size=i)}function _W(e,t,n){const r=Date.now(),{startTimestamp:s=r,endTimestamp:i=r,input:o,xhr:a}=t,{url:l,method:u,status_code:c=0,request_body_size:d,response_body_size:f}=e.data;if(!l)return null;if(!a||!Cp(l,n.networkDetailAllowUrls)||Cp(l,n.networkDetailDenyUrls)){const P=pd(d),A=pd(f);return{startTimestamp:s,endTimestamp:i,url:l,method:u,statusCode:c,request:P,response:A}}const h=a[wa],g=h?Uy(h.request_headers,n.networkRequestHeaders):{},m=Uy(kW(a),n.networkResponseHeaders),[y,w]=n.networkCaptureBodies?uA(o,Qe):[void 0],[b,x]=n.networkCaptureBodies?xW(a):[void 0],_=Oo(g,d,y),S=Oo(m,f,b);return{startTimestamp:s,endTimestamp:i,url:l,method:u,statusCode:c,request:w?Ep(_,w):_,response:x?Ep(S,x):S}}function kW(e){const t=e.getAllResponseHeaders();return t?t.split(`\r
|
|
52
|
+
`).reduce((n,r)=>{const[s,i]=r.split(": ");return i&&(n[s.toLowerCase()]=i),n},{}):{}}function xW(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return EW(e.response,e.responseType)}catch(n){t.push(n)}return Xe&&Qe.warn("Failed to get xhr response body",...t),[void 0]}function EW(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&e&&typeof e=="object")return[JSON.stringify(e)];if(!e)return[void 0]}catch(n){return Xe&&Qe.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Xe&&Qe.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function CW(e,t){try{const n=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return Mm(n)}catch{return}}function TW(e){const t=ht();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:i,networkResponseHeaders:o}=e.getOptions(),a={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:s,networkRequestHeaders:i,networkResponseHeaders:o};t&&t.on("beforeAddBreadcrumb",(l,u)=>PW(a,l,u))}catch{}}function PW(e,t,n){if(t.data)try{RW(t)&&AW(n)&&(SW(t,n),wW(t,n,e)),IW(t)&&OW(n)&&(cW(t,n),uW(t,n,e))}catch(r){Xe&&Qe.exception(r,"Error when enriching network breadcrumb")}}function RW(e){return e.category==="xhr"}function IW(e){return e.category==="fetch"}function AW(e){return e==null?void 0:e.xhr}function OW(e){return e==null?void 0:e.response}function MW(e){const t=ht();iA(u6(e)),Pm(sW(e)),Y6(e),TW(e);const n=nW(e);w5(n),t&&(t.on("beforeSendEvent",G6(e)),t.on("afterSendEvent",j6(e)),t.on("createDsc",r=>{const s=e.getSessionId();s&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(r.replay_id=s)}),t.on("spanStart",r=>{e.lastActiveSpan=r}),t.on("spanEnd",r=>{e.lastActiveSpan=r}),t.on("beforeSendFeedback",async(r,s)=>{var o;const i=e.getSessionId();s!=null&&s.includeReplay&&e.isEnabled()&&i&&((o=r.contexts)!=null&&o.feedback)&&(r.contexts.feedback.source==="api"&&await e.sendBufferedReplayOrFlush(),r.contexts.feedback.replay_id=i)}),t.on("openFeedbackWidget",async()=>{await e.sendBufferedReplayOrFlush()}))}async function DW(e){try{return Promise.all(Om(e,[LW(Kt.performance.memory)]))}catch{return[]}}function LW(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,s=Date.now()/1e3;return{type:"memory",name:"memory",start:s,end:s,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function $W(e,t,n){return s4(e,t,{...n,setTimeoutImpl:of})}const ts=_t.navigator;function FW(){return/iPhone|iPad|iPod/i.test((ts==null?void 0:ts.userAgent)??"")||/Macintosh/i.test((ts==null?void 0:ts.userAgent)??"")&&(ts!=null&&ts.maxTouchPoints)&&(ts==null?void 0:ts.maxTouchPoints)>1?{sampling:{mousemove:!1}}:{}}function NW(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){Xe&&Qe.warn("Received replay event after session expired.");return}const s=r||!t;t=!0,e.clickDetector&&s6(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&s&&e.setInitialState(),!c0(e,n,s))return!0;if(!s)return!1;const i=e.session;if(VW(e,s),e.recordingMode==="buffer"&&i&&e.eventBuffer){const o=e.eventBuffer.getEarliestTimestamp();o&&(Xe&&Qe.log(`Updating session start time to earliest event in buffer to ${new Date(o)}`),i.started=o,e.getOptions().stickySession&&u0(i))}return i!=null&&i.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}}function BW(e){const t=e.getOptions();return{type:ct.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:e.eventBuffer?e.eventBuffer.type==="worker":!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function VW(e,t){!t||!e.session||e.session.segmentId!==0||c0(e,BW(e),!1)}function UW(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function zW(e,t,n,r){return ea(mI(e,M1(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function HW({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}
|
|
53
|
+
`;if(typeof e=="string")n=`${r}${e}`;else{const i=new TextEncoder().encode(r);n=new Uint8Array(i.length+e.length),n.set(i),n.set(e,i.length)}return n}async function jW({client:e,scope:t,replayId:n,event:r}){const s=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,i={event_id:n,integrations:s};e.emit("preprocessEvent",r,i);const o=await SI(e.getOptions(),r,i,t,e,bi());if(!o)return null;e.emit("postprocessEvent",o,i),o.platform=o.platform||"javascript";const a=e.getSdkMetadata(),{name:l,version:u,settings:c}=(a==null?void 0:a.sdk)||{};return o.sdk={...o.sdk,name:l||"sentry.javascript.unknown",version:u||"0.0.0",settings:c},o}async function WW({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:s,session:i}){const o=HW({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:l,traceIds:u,initialTimestamp:c}=r,d=ht(),f=Mt(),h=d==null?void 0:d.getTransport(),g=d==null?void 0:d.getDsn();if(!d||!h||!g||!i.sampled)return Promise.resolve({});const m={type:S8,replay_start_timestamp:c/1e3,timestamp:s/1e3,error_ids:l,trace_ids:u,urls:a,replay_id:t,segment_id:n,replay_type:i.sampled},y=await jW({scope:f,client:d,replayId:t,event:m});if(!y)return d.recordDroppedEvent("event_processor","replay"),Xe&&Qe.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete y.sdkProcessingMetadata;const w=zW(y,o,g,d.getOptions().tunnel);let b;try{b=await h.send(w)}catch(_){const S=new Error(Q1);try{S.cause=_}catch{}throw S}if(typeof b.statusCode=="number"&&(b.statusCode<200||b.statusCode>=300))throw new ZA(b.statusCode);const x=DI({},b);if(MI(x,"replay"))throw new f0(x);return b}class ZA extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class f0 extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}async function eO(e,t={count:0,interval:T8}){const{recordingData:n,onError:r}=e;if(n.length)try{return await WW(e),!0}catch(s){if(s instanceof ZA||s instanceof f0)throw s;if(y5("Replays",{_retryCount:t.count}),r&&r(s),t.count>=P8){const i=new Error(`${Q1} - max retries exceeded`);try{i.cause=s}catch{}throw i}return t.interval*=++t.count,new Promise((i,o)=>{of(async()=>{try{await eO(e,t),i(!0)}catch(a){o(a)}},t.interval)})}}const tO="__THROTTLED",qW="__SKIPPED";function GW(e,t,n){const r=new Map,s=a=>{const l=a-n;r.forEach((u,c)=>{c<l&&r.delete(c)})},i=()=>[...r.values()].reduce((a,l)=>a+l,0);let o=!1;return(...a)=>{const l=Math.floor(Date.now()/1e3);if(s(l),i()>=t){const c=o;return o=!0,c?qW:tO}o=!1;const u=r.get(l)||0;return r.set(l,u+1),e(...a)}}class KW{constructor({options:t,recordingOptions:n}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:_8,sessionIdleExpire:k8},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=n,this._options=t,this._debouncedFlush=$W(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=GW((o,a)=>U6(this,o,a),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:s}=this.getOptions(),i=r?{threshold:Math.min(R8,r),timeout:r,scrollTimeout:I8,ignoreSelector:s?s.join(","):""}:void 0;if(i&&(this.clickDetector=new e6(this,i)),Xe){const o=t._experiments;Qe.setConfig({captureExceptions:!!o.captureExceptions,traceInternals:!!o.traceInternals})}this._handleVisibilityChange=()=>{Kt.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{const o=ci({category:"ui.blur"});this._doChangeToBackgroundTasks(o)},this._handleWindowFocus=()=>{const o=ci({category:"ui.focus"});this._doChangeToForegroundTasks(o)},this._handleKeyboardEvent=o=>{h6(this,o)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){Xe&&Qe.exception(t),this._options.onError&&this._options.onError(t)}initializeSampling(t){const{errorSampleRate:n,sessionSampleRate:r}=this._options,s=n<=0&&r<=0;if(this._requiresManualStart=s,!s){if(this._initializeSessionForSampling(t),!this.session){Xe&&Qe.exception(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",Xe&&Qe.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){Xe&&Qe.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){Xe&&Qe.log("Buffering is in progress, call `flush()` to save the replay");return}Xe&&Qe.infoTick("Starting replay in session mode"),this._updateUserActivity();const t=Jg({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this.recordingMode="session",this._initializeRecording()}startBuffering(){if(this._isEnabled){Xe&&Qe.log("Buffering is in progress, call `flush()` to save the replay");return}Xe&&Qe.infoTick("Starting replay in buffer mode");const t=Jg({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const t=this._canvas;this._stopRecording=zi({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:C8}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:NW(this),...FW(),onMutation:this._onMutationHandler.bind(this),...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this.handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this.handleException(t),!1}}async stop({forceFlush:t=!1,reason:n}={}){var r;if(this._isEnabled){this._isEnabled=!1,this.recordingMode="buffer";try{Xe&&Qe.log(`Stopping Replay${n?` triggered by ${n}`:""}`),KA(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),(r=this.eventBuffer)==null||r.destroy(),this.eventBuffer=null,$6(this)}catch(s){this.handleException(s)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),Xe&&Qe.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),Xe&&Qe.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();Xe&&Qe.log("Converting buffer to session"),await this.flushImmediate();const r=this.stopRecording();!t||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())}addUpdate(t){const n=t();this.recordingMode==="buffer"||!this._isEnabled||n!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode==="buffer"?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(t){var n,r;if(!(t&&((n=this.session)==null?void 0:n.sampled)===!1))return(r=this.session)==null?void 0:r.id}checkAndHandleExpiredSession(){if(this._lastActivity&&By(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${Kt.location.pathname}${Kt.location.hash}${Kt.location.search}`,n=`${Kt.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(t,n){const r=this._throttledAddEvent(t,n);if(r===tO){const s=ci({category:"replay.throttled"});this.addUpdate(()=>!c0(this,{type:Gj,timestamp:s.timestamp||0,data:{tag:"breadcrumb",payload:s,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastActiveSpan||Jn(),n=t&&Kn(t),s=(n&&vt(n).data||{})[Mr];if(!(!n||!s||!["route","custom"].includes(s)))return vt(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=M6({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(t){const n=this._options.errorSampleRate>0,r=Jg({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=r}_checkSession(){if(!this.session)return!1;const t=this.session;return jA(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(t.id))}_addListeners(){try{Kt.document.addEventListener("visibilitychange",this._handleVisibilityChange),Kt.addEventListener("blur",this._handleWindowBlur),Kt.addEventListener("focus",this._handleWindowFocus),Kt.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(MW(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=C6(this)}_removeListeners(){try{Kt.document.removeEventListener("visibilitychange",this._handleVisibilityChange),Kt.removeEventListener("blur",this._handleWindowBlur),Kt.removeEventListener("focus",this._handleWindowFocus),Kt.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}_doChangeToBackgroundTasks(t){!this.session||HA(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(t&&this._createCustomBreadcrumb(t),this.conditionalFlush())}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){Xe&&Qe.log("Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{this.throttledAddEvent({type:ct.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=v6(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const n=this._context.initialTimestamp/1e3;t=t.filter(r=>r.start>=n)}return Promise.all(Om(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:n}=this;if(!t||!n||this._requiresManualStart||t.segmentId)return;const r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}_popEventContext(){const t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){var n;const t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){Xe&&Qe.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!((n=this.eventBuffer)!=null&&n.hasEvents)&&(await DW(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const r=Date.now();if(r-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const s=this._popEventContext(),i=this.session.segmentId++;this._maybeSaveSession();const o=await this.eventBuffer.finish();await eO({replayId:t,recordingData:o,segmentId:i,eventContext:s,session:this.session,timestamp:r,onError:a=>this.handleException(a)})}catch(r){this.handleException(r),this.stop({reason:"sendReplay"});const s=ht();if(s){const i=r instanceof f0?"ratelimit_backoff":"send_error";s.recordDroppedEvent(i,"replay")}}}async _flush({force:t=!1}={}){if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){Xe&&Qe.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;const n=this.session.started,s=Date.now()-n;this._debouncedFlush.cancel();const i=s<this._options.minReplayDuration,o=s>this._options.maxReplayDuration+5e3;if(i||o){Xe&&Qe.log(`Session duration (${Math.floor(s/1e3)}s) is too ${i?"short":"long"}, not sending replay.`),i&&this._debouncedFlush();return}const a=this.eventBuffer;a&&this.session.segmentId===0&&!a.hasCheckout&&Xe&&Qe.log("Flushing initial segment without checkout.");const l=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(u){this.handleException(u)}finally{this._flushLock=void 0,l&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&u0(this.session)}_onMutationHandler(t){const{ignoreMutations:n}=this._options._experiments;if(n!=null&&n.length&&t.some(a=>{const l=UW(a.target),u=n.join(",");return l==null?void 0:l.matches(u)}))return!1;const r=t.length,s=this._options.mutationLimit,i=this._options.mutationBreadcrumbLimit,o=s&&r>s;if(r>i||o){const a=ci({category:"replay.mutations",data:{count:r,limit:o}});this._createCustomBreadcrumb(a)}return o?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}function cc(e,t){return[...e,...t].join(",")}function YW({mask:e,unmask:t,block:n,unblock:r,ignore:s}){const i=["base","iframe[srcdoc]:not([src])"],o=cc(e,[".sentry-mask","[data-sentry-mask]"]),a=cc(t,[]);return{maskTextSelector:o,unmaskTextSelector:a,blockSelector:cc(n,[".sentry-block","[data-sentry-block]",...i]),unblockSelector:cc(r,[]),ignoreSelector:cc(s,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function XW({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:s,value:i}){return!r||s.unmaskTextSelector&&e.matches(s.unmaskTextSelector)?i:n.includes(t)||t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"")?i.replace(/[\S]/g,"*"):i}const Lk='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',QW=["content-length","content-type","accept"];let $k=!1;const JW=e=>new ZW(e);class ZW{constructor({flushMinDelay:t=x8,flushMaxDelay:n=E8,minReplayDuration:r=A8,maxReplayDuration:s=pk,stickySession:i=!0,useCompression:o=!0,workerUrl:a,_experiments:l={},maskAllText:u=!0,maskAllInputs:c=!0,blockAllMedia:d=!0,mutationBreadcrumbLimit:f=750,mutationLimit:h=1e4,slowClickTimeout:g=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:y=[],networkDetailDenyUrls:w=[],networkCaptureBodies:b=!0,networkRequestHeaders:x=[],networkResponseHeaders:_=[],mask:S=[],maskAttributes:P=["title","placeholder","aria-label"],unmask:A=[],block:E=[],unblock:T=[],ignore:R=[],maskFn:I,beforeAddRecordingEvent:O,beforeErrorSampling:H,onError:N}={}){this.name="Replay";const D=YW({mask:S,unmask:A,block:E,unblock:T,ignore:R});if(this._recordingOptions={maskAllInputs:c,maskAllText:u,maskInputOptions:{password:!0},maskTextFn:I,maskInputFn:I,maskAttributeFn:(W,U,Q)=>XW({maskAttributes:P,maskAllText:u,privacyOptions:D,key:W,value:U,el:Q}),...D,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:W=>{try{W.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!l.recordCrossOriginIframes},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,O8),maxReplayDuration:Math.min(s,pk),stickySession:i,useCompression:o,workerUrl:a,blockAllMedia:d,maskAllInputs:c,maskAllText:u,mutationBreadcrumbLimit:f,mutationLimit:h,slowClickTimeout:g,slowClickIgnoreSelectors:m,networkDetailAllowUrls:y,networkDetailDenyUrls:w,networkCaptureBodies:b,networkRequestHeaders:Fk(x),networkResponseHeaders:Fk(_),beforeAddRecordingEvent:O,beforeErrorSampling:H,onError:N,_experiments:l},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Lk}`:Lk),this._isInitialized&&ik())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return $k}set _isInitialized(t){$k=t}afterAllSetup(t){!ik()||this._replay||(this._setup(t),this._initialize(t))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session"}):Promise.resolve()}flush(t){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(t){var n;if((n=this._replay)!=null&&n.isEnabled())return this._replay.getSessionId(t)}getRecordingMode(){var t;if((t=this._replay)!=null&&t.isEnabled())return this._replay.recordingMode}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){const n=eq(this._initialOptions,t);this._replay=new KW({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}function eq(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},s=Ja(n.replaysSessionSampleRate),i=Ja(n.replaysOnErrorSampleRate);return s==null&&i==null&&so(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),s!=null&&(r.sessionSampleRate=s),i!=null&&(r.errorSampleRate=i),r}function Fk(e){return[...QW,...e.map(t=>t.toLowerCase())]}const Nk=new WeakMap,Zg=new Map,nO={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function tq(e,t){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:s,shouldCreateSpanForRequest:i,enableHTTPTimings:o,tracePropagationTargets:a,onRequestSpanStart:l}={...nO,...t},u=typeof i=="function"?i:h=>!0,c=h=>rq(h,a),d={},f=e.getOptions().propagateTraceparent;n&&(e.addEventProcessor(h=>(h.type==="transaction"&&h.spans&&h.spans.forEach(g=>{if(g.op==="http.client"){const m=Zg.get(g.span_id);m&&(g.timestamp=m/1e3,Zg.delete(g.span_id))}}),h)),s&&N4(h=>{if(h.response){const g=Nk.get(h.response);g&&h.endTimestamp&&Zg.set(g,h.endTimestamp)}}),UI(h=>{const g=R4(h,u,c,d,{propagateTraceparent:f});if(h.response&&h.fetchData.__span&&Nk.set(h.response,h.fetchData.__span),g){const m=rO(h.fetchData.url),y=m?Ua(m).host:void 0;g.setAttributes({"http.url":m,"server.address":y}),o&&Bk(g),l==null||l(g,{headers:h.headers})}})),r&&aA(h=>{var m;const g=sq(h,u,c,d,f);if(g){o&&Bk(g);let y;try{y=new Headers((m=h.xhr.__sentry_xhr_v3__)==null?void 0:m.request_headers)}catch{}l==null||l(g,{headers:y})}})}function nq(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function Bk(e){const{url:t}=vt(e).data;if(!t||typeof t!="string")return;const n=Za("resource",({entries:r})=>{r.forEach(s=>{nq(s)&&s.name.endsWith(t)&&(e.setAttributes(sA(s)),setTimeout(n))})})}function rq(e,t){const n=Hu();if(n){let r,s;try{r=new URL(e,n),s=new URL(n).origin}catch{return!1}const i=r.origin===s;return t?Vi(r.toString(),t)||i&&Vi(r.pathname,t):i}else{const r=!!e.match(/^\/(?!\/)/);return t?Vi(e,t):r}}function sq(e,t,n,r,s){const i=e.xhr,o=i==null?void 0:i[wa];if(!i||i.__sentry_own_request__||!o)return;const{url:a,method:l}=o,u=hs()&&t(a);if(e.endTimestamp&&u){const y=i.__sentry_xhr_span_id__;if(!y)return;const w=r[y];w&&o.status_code!==void 0&&(ZR(w,o.status_code),w.end(),delete r[y]);return}const c=rO(a),d=Ua(c||a),f=Q5(a),h=!!Jn(),g=u&&h?Ho({name:`${l} ${f}`,attributes:{url:a,type:"xhr","http.method":l,"http.url":c,"server.address":d==null?void 0:d.host,[cn]:"auto.http.browser",[Zi]:"http.client",...(d==null?void 0:d.search)&&{"http.query":d==null?void 0:d.search},...(d==null?void 0:d.hash)&&{"http.fragment":d==null?void 0:d.hash}}}):new zo;i.__sentry_xhr_span_id__=g.spanContext().spanId,r[i.__sentry_xhr_span_id__]=g,n(a)&&iq(i,hs()&&h?g:void 0,s);const m=ht();return m&&m.emit("beforeOutgoingRequestSpan",g,e),g}function iq(e,t,n){const{"sentry-trace":r,baggage:s,traceparent:i}=$I({span:t,propagateTraceparent:n});r&&oq(e,r,s,i)}function oq(e,t,n,r){var i;const s=(i=e.__sentry_xhr_v3__)==null?void 0:i.request_headers;if(!(s!=null&&s["sentry-trace"]||!e.setRequestHeader))try{if(e.setRequestHeader("sentry-trace",t),r&&!(s!=null&&s.traceparent)&&e.setRequestHeader("traceparent",r),n){const o=s==null?void 0:s.baggage;(!o||!aq(o))&&e.setRequestHeader("baggage",n)}}catch{}}function aq(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function rO(e){try{return new URL(e,xt.location.origin).href}catch{return}}function lq(){xt.document?xt.document.addEventListener("visibilitychange",()=>{const e=Jn();if(!e)return;const t=Kn(e);if(xt.document.hidden&&t){const n="cancelled",{op:r,status:s}=vt(t);gs&&Ae.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),s||t.setStatus({code:Rn,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):gs&&Ae.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const uq=3600,sO="sentry_previous_trace",cq="sentry.previous_trace";function dq(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const r=t==="session-storage";let s=r?pq():void 0;e.on("spanStart",o=>{if(Kn(o)!==o)return;const a=Mt().getPropagationContext();s=fq(s,o,a),r&&hq(s)});let i=!0;n&&e.on("beforeSampling",o=>{if(!s)return;const a=Mt(),l=a.getPropagationContext();if(i&&l.parentSpanId){i=!1;return}a.setPropagationContext({...l,dsc:{...l.dsc,sample_rate:String(s.sampleRate),sampled:String(zy(s.spanContext))},sampleRand:s.sampleRand}),o.parentSampled=zy(s.spanContext),o.parentSampleRate=s.sampleRate,o.spanAttributes={...o.spanAttributes,[QR]:s.sampleRate}})}function fq(e,t,n){const r=vt(t);function s(){var a,l;try{return Number((a=n.dsc)==null?void 0:a.sample_rate)??Number((l=r.data)==null?void 0:l[P1])}catch{return 0}}const i={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:s(),sampleRand:n.sampleRand};if(!e)return i;const o=e.spanContext;return o.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=uq&&(gs&&Ae.log(`Adding previous_trace ${o} link to span ${{op:r.op,...t.spanContext()}}`),t.addLink({context:o,attributes:{[WU]:"previous_trace"}}),t.setAttribute(cq,`${o.traceId}-${o.spanId}-${zy(o)?1:0}`)),i)}function hq(e){try{xt.sessionStorage.setItem(sO,JSON.stringify(e))}catch(t){gs&&Ae.warn("Could not store previous trace in sessionStorage",t)}}function pq(){var e;try{const t=(e=xt.sessionStorage)==null?void 0:e.getItem(sO);return JSON.parse(t)}catch{return}}function zy(e){return e.traceFlags===1}const mq="BrowserTracing",gq={...Sh,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,enableElementTiming:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...nO},Vk=(e={})=>{const t={name:void 0,source:void 0},n=xt.document,{enableInp:r,enableElementTiming:s,enableLongTask:i,enableLongAnimationFrame:o,_experiments:{enableInteractions:a,enableStandaloneClsSpans:l,enableStandaloneLcpSpans:u},beforeStartSpan:c,idleTimeout:d,finalTimeout:f,childSpanTimeout:h,markBackgroundSpan:g,traceFetch:m,traceXHR:y,trackFetchStreamPerformance:w,shouldCreateSpanForRequest:b,enableHTTPTimings:x,ignoreResourceSpans:_,ignorePerformanceApiSpans:S,instrumentPageLoad:P,instrumentNavigation:A,detectRedirects:E,linkPreviousTrace:T,consistentTraceSampling:R,enableReportPageLoaded:I,onRequestSpanStart:O}={...gq,...e};let H,N,D;function W(U,Q,V=!0){const L=Q.op==="pageload",oe=Q.name,j=c?c(Q):Q,F=j.attributes||{};if(oe!==j.name&&(F[Mr]="custom",j.attributes=F),!V){const Se=cl();Ho({...j,startTime:Se}).end(Se);return}t.name=j.name,t.source=F[Mr];const re=wI(j,{idleTimeout:d,finalTimeout:f,childSpanTimeout:h,disableAutoFinish:L,beforeSpanEnd:Se=>{H==null||H(),Kz(Se,{recordClsOnPageloadSpan:!l,recordLcpOnPageloadSpan:!u,ignoreResourceSpans:_,ignorePerformanceApiSpans:S}),zk(U,void 0);const X=Mt(),le=X.getPropagationContext();X.setPropagationContext({...le,traceId:re.spanContext().traceId,sampled:Zo(re),dsc:eo(Se)}),L&&(D=void 0)},trimIdleSpanEndTimestamp:!I});L&&I&&(D=re),zk(U,re);function ae(){n&&["interactive","complete"].includes(n.readyState)&&U.emit("idleSpanEnableAutoFinish",re)}L&&!I&&n&&(n.addEventListener("readystatechange",()=>{ae()}),ae())}return{name:mq,setup(U){if(w3(),H=Uz({recordClsStandaloneSpans:l||!1,recordLcpStandaloneSpans:u||!1,client:U}),r&&yH(),s&&iH(),o&&_t.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?Hz():i&&zz(),a&&jz(),E&&n){const V=()=>{N=Sn()};addEventListener("click",V,{capture:!0}),addEventListener("keydown",V,{capture:!0,passive:!0})}function Q(){const V=md(U);V&&!vt(V).timestamp&&(gs&&Ae.log(`[Tracing] Finishing current active span with op: ${vt(V).op}`),V.setAttribute(ld,"cancelled"),V.end())}U.on("startNavigationSpan",(V,L)=>{if(ht()!==U)return;if(L!=null&&L.isRedirect){gs&&Ae.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),W(U,{op:"navigation.redirect",...V},!1);return}N=void 0,Q(),bi().setPropagationContext({traceId:Ji(),sampleRand:Math.random(),propagationSpanId:hs()?void 0:Ui()});const oe=Mt();oe.setPropagationContext({traceId:Ji(),sampleRand:Math.random(),propagationSpanId:hs()?void 0:Ui()}),oe.setSDKProcessingMetadata({normalizedRequest:void 0}),W(U,{op:"navigation",...V,parentSpan:null,forceTransaction:!0})}),U.on("startPageLoadSpan",(V,L={})=>{if(ht()!==U)return;Q();const oe=L.sentryTrace||Uk("sentry-trace"),j=L.baggage||Uk("baggage"),F=d3(oe,j),re=Mt();re.setPropagationContext(F),hs()||(re.getPropagationContext().propagationSpanId=Ui()),re.setSDKProcessingMetadata({normalizedRequest:B1()}),W(U,{op:"pageload",...V})}),U.on("endPageloadSpan",()=>{I&&D&&(D.setAttribute(ld,"reportPageLoaded"),D.end())})},afterAllSetup(U){let Q=Hu();if(T!=="off"&&dq(U,{linkPreviousTrace:T,consistentTraceSampling:R}),xt.location){if(P){const V=jr();vq(U,{name:xt.location.pathname,startTime:V?V/1e3:void 0,attributes:{[Mr]:"url",[cn]:"auto.pageload.browser"}})}A&&Pm(({to:V,from:L})=>{if(L===void 0&&(Q==null?void 0:Q.indexOf(V))!==-1){Q=void 0;return}Q=void 0;const oe=N1(V),j=md(U),F=j&&E&&bq(j,N);iO(U,{name:(oe==null?void 0:oe.pathname)||xt.location.pathname,attributes:{[Mr]:"url",[cn]:"auto.navigation.browser"}},{url:V,isRedirect:F})})}g&&lq(),a&&yq(U,d,f,h,t),r&&SH(),tq(U,{traceFetch:m,traceXHR:y,trackFetchStreamPerformance:w,tracePropagationTargets:U.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:b,enableHTTPTimings:x,onRequestSpanStart:O})}}};function vq(e,t,n){e.emit("startPageLoadSpan",t,n),Mt().setTransactionName(t.name);const r=md(e);return r&&e.emit("afterStartPageLoadSpan",r),r}function iO(e,t,n){const{url:r,isRedirect:s}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:s}),e.emit("startNavigationSpan",t,{isRedirect:s});const i=Mt();return i.setTransactionName(t.name),r&&!s&&i.setSDKProcessingMetadata({normalizedRequest:{...B1(),url:r}}),md(e)}function Uk(e){const t=xt.document,n=t==null?void 0:t.querySelector(`meta[name=${e}]`);return(n==null?void 0:n.getAttribute("content"))||void 0}function yq(e,t,n,r,s){const i=xt.document;let o;const a=()=>{const l="ui.action.click",u=md(e);if(u){const c=vt(u).op;if(["navigation","pageload"].includes(c)){gs&&Ae.warn(`[Tracing] Did not create ${l} span because a pageload or navigation span is in progress.`);return}}if(o&&(o.setAttribute(ld,"interactionInterrupted"),o.end(),o=void 0),!s.name){gs&&Ae.warn(`[Tracing] Did not create ${l} transaction because _latestRouteName is missing.`);return}o=wI({name:s.name,op:l,attributes:{[Mr]:s.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})};i&&addEventListener("click",a,{capture:!0})}const oO="_sentry_idleSpan";function md(e){return e[oO]}function zk(e,t){Qr(e,oO,t)}const Hk=1.5;function bq(e,t){const n=vt(e),r=cl(),s=n.start_timestamp;return!(r-s>Hk||t&&r-t<=Hk)}const aO=["activate","mount"],lO=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,wq=/(?:^|[-_])(\w)/g,Sq=e=>e.replace(wq,t=>t.toUpperCase()).replace(/[-_]/g,""),_q="<Root>",ev="<Anonymous>",kq=(e,t)=>e.repeat(t),Uc=(e,t)=>{if(!e)return ev;if(e.$root===e)return _q;if(!e.$options)return ev;const n=e.$options;let r=n.name||n._componentTag||n.__name;const s=n.__file;if(!r&&s){const i=s.match(/([^/\\]+)\.vue$/);i&&(r=i[1])}return(r?`<${Sq(r)}>`:ev)+(s&&t!==!1?` at ${s}`:"")},xq=e=>{if(e&&(e._isVue||e.__isVue)&&e.$parent){const t=[];let n=0;for(;e;){if(t.length>0){const s=t[t.length-1];if(s.constructor===e.constructor){n++,e=e.$parent;continue}else n>0&&(t[t.length-1]=[s,n],n=0)}t.push(e),e=e.$parent}return`
|
|
54
|
+
|
|
55
|
+
found in
|
|
56
|
+
|
|
57
|
+
${t.map((s,i)=>`${(i===0?"---> ":kq(" ",5+i*2))+(Array.isArray(s)?`${Uc(s[0])}... (${s[1]} recursive calls)`:Uc(s))}`).join(`
|
|
58
|
+
`)}`}return`
|
|
59
|
+
|
|
60
|
+
(found in ${Uc(e)})`},Eq=(e,t)=>{const{errorHandler:n}=e.config;e.config.errorHandler=(r,s,i)=>{var u;const o=Uc(s,!1),a=s?xq(s):"",l={componentName:o,lifecycleHook:i,trace:a};if(t.attachProps&&s&&((u=s.$options)!=null&&u.propsData?l.propsData=s.$options.propsData:s.$props&&(l.propsData=s.$props)),setTimeout(()=>{fi(r,{captureContext:{contexts:{vue:l}},mechanism:{handled:!!n,type:"auto.function.vue.error_handler"}})}),typeof n=="function"&&e.config.errorHandler)n.call(e,r,s,i);else throw r}},jk="ui.vue",Cq={activate:["activated","deactivated"],create:["beforeCreate","created"],unmount:["beforeUnmount","unmounted"],destroy:["beforeDestroy","destroyed"],mount:["beforeMount","mounted"],update:["beforeUpdate","updated"]};function tv(e,t,n){e.$_sentryRootComponentSpanTimer&&clearTimeout(e.$_sentryRootComponentSpanTimer),e.$_sentryRootComponentSpanTimer=setTimeout(()=>{var r;(r=e.$root)!=null&&r.$_sentryRootComponentSpan&&(e.$root.$_sentryRootComponentSpan.end(t),e.$root.$_sentryRootComponentSpan=void 0)},n)}function Tq(e,t){function n(s){return s.replace(/^<([^\s]*)>(?: at [^\s]*)?$/,"$1")}return e.some(s=>n(t)===n(s))}const Pq=(e={})=>{const t=(e.hooks||[]).concat(aO).filter((s,i,o)=>o.indexOf(s)===i),n={},r=e.timeout||2e3;for(const s of t){const i=Cq[s];if(!i){lO&&Ae.warn(`Unknown hook: ${s}`);continue}for(const o of i)n[o]=function(){var f;const a=this.$root===this;a&&(this.$_sentryRootComponentSpan=this.$_sentryRootComponentSpan||Ho({name:"Application Render",op:`${jk}.render`,attributes:{[cn]:"auto.ui.vue"},onlyIfParent:!0}),tv(this,Sn(),r));const l=Uc(this,!1);if(!(a||(Array.isArray(e.trackComponents)?Tq(e.trackComponents,l):e.trackComponents))){tv(this,Sn(),r);return}this.$_sentryComponentSpans=this.$_sentryComponentSpans||{};const c=o===i[0],d=((f=this.$root)==null?void 0:f.$_sentryRootComponentSpan)||Jn();if(c){if(d){const h=this.$_sentryComponentSpans[s];h&&h.end(),this.$_sentryComponentSpans[s]=Ho({name:`Vue ${l}`,op:`${jk}.${s}`,attributes:{[cn]:"auto.ui.vue"},onlyIfParent:!0})}}else{const h=this.$_sentryComponentSpans[s];if(!h)return;h.end(),tv(this,Sn(),r)}}}return n},Rq=_t,Iq={Vue:Rq.Vue,attachProps:!0,attachErrorHandler:!0,tracingOptions:{hooks:aO,timeout:2e3,trackComponents:!1}},Aq="Vue",Oq=(e={})=>({name:Aq,setup(t){const n={...Iq,...t.getOptions(),...e};if(!n.Vue&&!n.app){so(()=>{console.warn("[@sentry/vue]: Misconfigured SDK. Vue specific errors will not be captured. Update your `Sentry.init` call with an appropriate config option: `app` (Application Instance - Vue 3) or `Vue` (Vue Constructor - Vue 2).")});return}n.app?(Array.isArray(n.app)?n.app:[n.app]).forEach(s=>Wk(s,n)):n.Vue&&Wk(n.Vue,n)}}),Wk=(e,t)=>{var n;lO&&((n=e._instance)==null?void 0:n.isMounted)===!0&&so(()=>{console.warn("[@sentry/vue]: Misconfigured SDK. Vue app is already mounted. Make sure to call `app.mount()` after `Sentry.init()`.")}),t.attachErrorHandler&&Eq(e,t),hs(t)&&e.mixin(Pq(t.tracingOptions))};function Mq(e={}){const t={defaultIntegrations:[...hA(),Oq()],...e};return LI(t,"vue"),w8(t)}function Dq(e,t,n){let r=!1;e.onError(s=>fi(s,{mechanism:{handled:!1}})),e.beforeEach((s,i,o)=>{const a=r?void 0:Lq(),l={};for(const d of Object.keys(s.params))l[`url.path.parameter.${d}`]=s.params[d],l[`params.${d}`]=s.params[d];for(const d of Object.keys(s.query)){const f=s.query[d];f&&(l[`query.${d}`]=f)}let u=s.path,c="url";if(s.name&&t.routeLabel!=="path")u=s.name.toString(),c="custom";else if(s.matched.length>0){const d=s.matched.length-1;u=s.matched[d].path,c="route"}Mt().setTransactionName(u),t.instrumentPageLoad&&a&&(vt(a).data[Mr]!=="custom"&&(a.updateName(u),a.setAttribute(Mr,c)),a.setAttributes({...l,[cn]:"auto.pageload.vue"}),r=!0),t.instrumentNavigation&&!a&&n({name:u,op:"navigation",attributes:{...l,[cn]:"auto.navigation.vue",[Mr]:c}}),o&&o()})}function Lq(){const e=Jn(),t=e&&Kn(e);return t&&vt(t).op==="pageload"?t:void 0}function $q(e={}){if(!e.router)return Vk(e);const t=Vk({...e,instrumentNavigation:!1}),{router:n,instrumentNavigation:r=!0,instrumentPageLoad:s=!0,routeLabel:i="name"}=e;return{...t,afterAllSetup(o){t.afterAllSetup(o),Dq(n,{routeLabel:i,instrumentNavigation:r,instrumentPageLoad:s},l=>{iO(o,l)})}}}async function uO(){return"/"}async function nr(e=!0,t=!0){const n=yn.create({baseURL:await uO()});return n.interceptors.request.use(r=>{var s,i;return console.debug(`${(s=r.method)==null?void 0:s.toUpperCase().padEnd(6)} ${(i=r.url)==null?void 0:i.padEnd(25)} WithAuth: ${e==null?void 0:e.toString().padEnd(7)} AutoHandle401: ${t==null?void 0:t.toString().padEnd(7)} BaseURL: ${r.baseURL}`),r}),e&&n.interceptors.request.use(async r=>{const s=ps();return s.loadTokens(),s.hasAuthToken&&(r.headers.Authorization=`Bearer ${s.token}`),r},r=>(console.error("Error in axios request interceptor",r),Promise.reject(r))),t&&n.interceptors.response.use(r=>r,async r=>{var d;const{response:s,config:i}=r;if(!s)return console.error("No response was returned by axios",r),Promise.reject({message:`No response was returned by axios - URL ${i==null?void 0:i.url}`,stack:r.stack});if(s.status===ba.FailedDependency)return Promise.reject(r);if(![ba.Unauthorized,ba.Forbidden].includes(s.status))return console.error("Error in axios response interceptor which is not 401 or 403",r),fi(r),Promise.reject({message:`${r.message} - URL ${i==null?void 0:i.url}`,stack:r.stack});if(s.status===ba.Forbidden){const f=(d=r==null?void 0:r.response)==null?void 0:d.data;return console.error("[HttpClient] 403 Forbidden",f),Dn("auth:permission-denied").emit({roles:f==null?void 0:f.roles,permissions:f==null?void 0:f.permissions,error:f==null?void 0:f.error,url:i==null?void 0:i.url}),Promise.reject(r)}const o=ps();o.loadTokens();const{reasonCode:a,url:l}=o.extractSpecialReasonCode(r);if(a)return await o.logout(!1,S1(a)),console.error(`[AuthStore] 401 Unauthorized - emitting 'auth:${a}' with reason ${a}`),Dn(`auth:${a}`).emit({url:l,error:r.message,reasonCode:a}),Promise.reject(r);await o.checkAuthenticationRequirements();const{success:u,handled:c}=await o.verifyOrRefreshLoginOnceOrLogout();if(c)return Promise.reject(r);if(u){if(!(i!=null&&i.url))throw new Error("No URL in axios config, cannot retry");console.debug("Redoing request without interceptors",i==null?void 0:i.url);const f=i;return f.headers||(f.headers={}),f.headers.Authorization=`Bearer ${o.token}`,yn(f)}return console.error("[HttpClient] 401 Unauthorized - emitting 'auth:failure'"),Dn("auth:failure").emit({url:i==null?void 0:i.url,error:r.message}),Promise.reject(r)}),n}class kr{static async get(t){return(await(await nr(!0)).get(t)).data}static async put(t,n){return(await(await nr(!0)).put(t,n)).data}static async post(t,n){return(await(await nr(!0)).post(t,n)).data}static async postUpload(t,n,r){return await(await nr(!0)).post(t,n,r)}static async getDownload(t,n){return await(await nr(!0)).request({method:"GET",url:t,data:n,responseType:"arraybuffer"})}static async delete(t,n){return(await(await nr(!0)).request({url:t,method:"delete",data:n})).data}static async patch(t,n){return(await(await nr(!0)).patch(t,n)).data}}const fe=class fe{};we(fe,"base","/api"),we(fe,"firstTimeSetupRoute",`${fe.base}/first-time-setup`),we(fe,"completeFirstTimeSetupRoute",`${fe.firstTimeSetupRoute}/complete`),we(fe,"printerRoute",`${fe.base}/printer`),we(fe,"printerBatchRoute",`${fe.printerRoute}/batch`),we(fe,"printerTestConnectionRoute",`${fe.printerRoute}/test-connection`),we(fe,"printerSettingsRoute",`${fe.base}/printer-settings`),we(fe,"floorRoute",`${fe.base}/floor`),we(fe,"batchRoute",`${fe.base}/batch`),we(fe,"batchGetLastPrintedFilesRoute",`${fe.batchRoute}/reprint/list`),we(fe,"batchReprintFilesRoute",`${fe.batchRoute}/reprint/execute`),we(fe,"printCompletionRoute",`${fe.base}/print-completion`),we(fe,"printerFilesRoute",`${fe.base}/printer-files`),we(fe,"printerFilesPurgeRoute",`${fe.printerFilesRoute}/purge`),we(fe,"printerGroupRoute",`${fe.base}/printer-group`),we(fe,"createGroupRoute",`${fe.base}/printer-group`),we(fe,"customGCodeRoute",`${fe.base}/custom-gcode`),we(fe,"userRoute",`${fe.base}/user`),we(fe,"rolesRoute",`${fe.base}/user/roles`),we(fe,"userProfileRoute",`${fe.userRoute}/profile`),we(fe,"settingsRoute",`${fe.base}/settings`),we(fe,"settingsSensitiveRoute",`${fe.settingsRoute}/sensitive`),we(fe,"updateLoginRequiredRoute",`${fe.settingsRoute}/login-required`),we(fe,"updateRegistrationEnabledRoute",`${fe.settingsRoute}/registration-enabled`),we(fe,"updateCredentialSettings",`${fe.settingsRoute}/credential`),we(fe,"fileCleanSettingsRoute",`${fe.settingsRoute}/file-clean`),we(fe,"updateFrontendSettingsRoute",`${fe.settingsRoute}/frontend`),we(fe,"updateTimeoutSettingRoute",`${fe.settingsRoute}/timeout`),we(fe,"serverSentryDiagnosticsSettingRoute",`${fe.settingsRoute}/sentry-diagnostics`),we(fe,"updateExperimentalMoonrakerSupportRoute",`${fe.settingsRoute}/experimental-moonraker-support`),we(fe,"updateExperimentalThumbnailSupportRoute",`${fe.settingsRoute}/experimental-thumbnail-support`),we(fe,"updateExperimentalClientSupportRoute",`${fe.settingsRoute}/experimental-client-support`),we(fe,"updateExperimentalPrusaLinkSupportRoute",`${fe.settingsRoute}/experimental-prusa-link-support`),we(fe,"deleteGroupRoute",t=>`${fe.base}/printer-group/${t}`),we(fe,"updateGroupNameRoute",t=>`${fe.base}/printer-group/${t}/name`),we(fe,"addPrinterToGroupRoute",t=>`${fe.base}/printer-group/${t}/printer`),we(fe,"deletePrinterFromGroupRoute",fe.addPrinterToGroupRoute),we(fe,"getPrinterRoute",t=>`${fe.printerRoute}/${t}`),we(fe,"postPrinterDisabledReasonRoute",t=>`${fe.printerRoute}/${t}/disabled-reason`),we(fe,"getPrinterLoginDetailsRoute",t=>`${fe.getPrinterRoute(t)}/login-details`),we(fe,"restartOctoPrintRoute",t=>`${fe.getPrinterRoute(t)}/restart-octoprint`),we(fe,"refreshSocketRoute",t=>`${fe.getPrinterRoute(t)}/refresh-socket`),we(fe,"getPrinterSettingsRoute",t=>`${fe.printerSettingsRoute}/${t}`),we(fe,"setPrinterSettingsGCodeAnalysisRoute",t=>`${fe.getPrinterSettingsRoute(t)}/gcode-analysis`),we(fe,"syncPrinterNameSettingRoute",t=>`${fe.getPrinterSettingsRoute(t)}/sync-printername`),we(fe,"getFloorRoute",t=>`${fe.floorRoute}/${t}`),we(fe,"addOrRemovePrinterFromFloorRoute",t=>`${fe.getFloorRoute(t)}/printer`),we(fe,"sendQuickStopM112Route",t=>`${fe.customGCodeRoute}/send-emergency-m112/${t}`),we(fe,"updatePrinterFloorNameRoute",t=>`${fe.getFloorRoute(t)}/name`),we(fe,"updatePrinterFloorNumberRoute",t=>`${fe.getFloorRoute(t)}/floor-number`),we(fe,"printerFilesClearRoute",t=>`${fe.printerFilesRoute}/${t}/clear`),we(fe,"printerFilesStartPrintRoute",t=>`${fe.printerFilesRoute}/${t}/select`),we(fe,"printerFilesUploadRoute",t=>`${fe.printerFilesRoute}/${t}/upload`),we(fe,"printerFilesCacheRoute",t=>`${fe.printerFilesRoute}/${t}/cache`),we(fe,"printerEnabledRoute",t=>`${fe.getPrinterRoute(t)}/enabled`),we(fe,"printerSerialConnectRoute",t=>`${fe.getPrinterRoute(t)}/serial-connect`),we(fe,"printerJogCommandRoute",t=>`${fe.getPrinterRoute(t)}/jog`),we(fe,"printerHomeCommandRoute",t=>`${fe.getPrinterRoute(t)}/home`),we(fe,"printerSerialDisconnectRoute",t=>`${fe.getPrinterRoute(t)}/serial-disconnect`),we(fe,"printerJobRoute",t=>`${fe.getPrinterRoute(t)}/job`),we(fe,"printerStopJobRoute",t=>`${fe.printerJobRoute(t)}/stop`),we(fe,"printerPauseJobRoute",t=>`${fe.printerJobRoute(t)}/pause`),we(fe,"printerResumeJobRoute",t=>`${fe.printerJobRoute(t)}/resume`),we(fe,"userChangeUsernameRoute",t=>`${fe.userRoute}/${t}/change-username`),we(fe,"userChangePasswordRoute",t=>`${fe.userRoute}/${t}/change-password`),we(fe,"userDeleteRoute",t=>`${fe.userRoute}/${t}`),we(fe,"userSetVerifiedRoute",t=>`${fe.userRoute}/${t}/set-verified`),we(fe,"userSetRootUserRoute",t=>`${fe.userRoute}/${t}/set-root-user`),we(fe,"userSetUserRolesRoute",t=>`${fe.userRoute}/${t}/set-user-roles`);let $e=fe;const Fq=Symbol("Progress snackbar message event symbol"),Nq=Symbol("Info snackbar message event symbol"),Bq=Symbol("Error snackbar message event symbol");function Ft(){const{emit:e,on:t}=Dn(Fq),{emit:n,on:r}=Dn(Nq),{emit:s,on:i}=Dn(Bq);return{openProgressMessage:(o,a,l,u)=>e({key:o,title:a,value:l,completed:u}),openInfoMessage:o=>n(o),info:(o,a,l)=>n({title:o,subtitle:a,timeout:l}),openErrorMessage:o=>s(o),error:(o,a)=>s({title:o,subtitle:a}),onProgressMessage:t,onInfoMessage:r,onErrorMessage:i}}function Hy(e,t){if(!e)throw new Error("No data to download");const n=new Blob([e],{type:"text/plain"}),r=document.createElement("a");r.href=URL.createObjectURL(n),r.download=t,r.click(),URL.revokeObjectURL(r.href)}class Hi extends kr{static async getFiles(t){const n=`${$e.printerFilesRoute}/${t}`;return await this.get(n)}static async getThumbnail(t){const n=`${$e.printerFilesRoute}/${t}/thumbnail`;return await this.get(n)}static async getFileCache(t){const n=`${$e.printerFilesCacheRoute(t)}`;return await this.get(n)}static async selectAndPrintFile(t,n,r=!0){const s=$e.printerFilesStartPrintRoute(t);return await this.post(s,{filePath:n,print:r})}static async uploadFile(t,n,r=!0){const s=$e.printerFilesUploadRoute(t.id),i=new FormData;return i.append("startPrint",r.toString()),i.append("files[0]",n),this.postUpload(s,i,{onUploadProgress:o=>{Ft().openProgressMessage("single-file-upload",`Uploading file ${n.name}`,100*o.loaded/o.total,!1)}})}static async clearFiles(t){const n=`${$e.printerFilesClearRoute(t)}`;return this.delete(n)}static async purgeFiles(){const t=`${$e.printerFilesPurgeRoute}`;return this.post(t)}static async deleteFileOrFolder(t,n){const r=`${$e.printerFilesRoute}/${t}?path=${encodeURIComponent(n)}`;return this.delete(r)}static async downloadFile(t,n){const r=`${$e.printerFilesRoute}/${t}/download/${encodeURIComponent(n)}`,s=await this.getDownload(r);Hy(s.data,n)}}const Vq=["able","above","absent","absolute","abstract","abundant","academic","acceptable","accepted","accessible","accurate","accused","active","actual","acute","added","additional","adequate","adjacent","administrative","adorable","advanced","adverse","advisory","aesthetic","afraid","afraid","african","aggregate","aggressive","agreeable","agreed","agricultural","alert","alive","alive","alleged","allied","alone","alright","alternative","amateur","amazing","ambitious","american","amused","ancient","ancient","angry","angry","annoyed","annual","anonymous","anxious","anxious","appalling","apparent","applicable","appropriate","arab","arbitrary","architectural","armed","arrogant","artificial","artistic","ashamed","ashamed","asian","asleep","assistant","associated","atomic","attractive","australian","automatic","autonomous","available","average","average","average","awake","aware","awful","awful","awkward","back","bad","bad","bad","balanced","bare","basic","beautiful","beautiful","beautiful","beneficial","better","bewildered","big","big","big","binding","biological","bitter","bitter","bizarre","black","black","blank","blind","blonde","bloody","bloody","blue","blue","blushing","boiling","bold","bored","bored","boring","bottom","brainy","brave","brave","breakable","breezy","brief","brief","bright","bright","bright","brilliant","british","broad","broad","broken","broken","brown","bumpy","burning","busy","busy","calm","calm","canadian","capable","capitalist","careful","careful","casual","catholic","causal","cautious","cautious","central","certain","changing","characteristic","charming","charming","cheap","cheerful","cheerful","chemical","chief","chilly","chinese","chosen","christian","chronic","chubby","circular","civic","civil","civilian","classic","classical","clean","clean","clear","clear","clever","clever","clinical","close","closed","cloudy","clumsy","coastal","cognitive","coherent","cold","cold","collective","colonial","colorful","colossal","coloured","colourful","combative","combined","comfortable","comfortable","coming","commercial","common","communist","compact","comparable","comparative","compatible","competent","competitive","complete","complex","complicated","comprehensive","compulsory","conceptual","concerned","concerned","concrete","condemned","confident","confidential","confused","confused","conscious","conservation","conservative","considerable","consistent","constant","constitutional","contemporary","content","continental","continued","continuing","continuous","controlled","controversial","convenient","conventional","convinced","convincing","cooing","cool","cool","cooperative","corporate","correct","corresponding","costly","courageous","crazy","crazy","crazy","creative","creepy","creepy","criminal","critical","crooked","crooked","crowded","crucial","crude","cruel","cruel","cuddly","cultural","curious","curious","curly","current","curved","cute","daily","damaged","damp","damp","dangerous","dangerous","dark","dark","dead","dead","deaf","deafening","dear","decent","decisive","deep","deep","defeated","defensive","defiant","definite","deliberate","delicate","delicious","delicious","delighted","delightful","delightful","democratic","dependent","depressed","depressed","desirable","desperate","detailed","determined","determined","developed","developing","devoted","different","different","difficult","difficult","digital","diplomatic","direct","dirty","dirty","disabled","disappointed","disastrous","disciplinary","disgusted","distant","distinct","distinct","distinctive","distinguished","disturbed","disturbing","diverse","divine","dizzy","domestic","dominant","double","doubtful","doubtful","drab","dramatic","dreadful","driving","drunk","dry","dry","dual","due","dull","dull","dull","dusty","dutch","dying","dynamic","eager","eager","early","early","eastern","easy","easy","economic","educational","eerie","effective","efficient","elaborate","elated","elderly","eldest","electoral","electric","electrical","electronic","elegant","elegant","eligible","embarrassed","embarrassed","embarrassing","emotional","empirical","empty","empty","enchanting","encouraging","encouraging","endless","energetic","english","enormous","enthusiastic","enthusiastic","entire","entitled","envious","environmental","equal","equivalent","essential","established","estimated","ethical","ethnic","european","eventual","everyday","evident","evil","evil","evolutionary","exact","excellent","exceptional","excess","excessive","excited","excited","exciting","exclusive","existing","exotic","expected","expensive","experienced","experimental","explicit","extended","extensive","external","extra","extraordinary","extreme","exuberant","faint","faint","fair","fair","faithful","faithful","familiar","famous","famous","fancy","fantastic","fantastic","far","fascinating","fashionable","fast","fast","fat","fat","fat","fatal","favourable","favourite","federal","fellow","female","feminist","few","fierce","fierce","filthy","filthy","final","financial","fine","fine","firm","fiscal","fit","fixed","flaky","flat","flat","flexible","fluffy","fluttering","flying","following","fond","foolish","foolish","foreign","formal","formidable","forthcoming","fortunate","forward","fragile","frail","frantic","free","french","frequent","fresh","fresh","friendly","friendly","friendly","frightened","frightened","front","frozen","fucking","full","full-time","fun","functional","fundamental","funny","funny","funny","furious","future","fuzzy","gastric","gay","general","generous","genetic","gentle","gentle","genuine","geographical","german","giant","giant","gigantic","gigantic","given","glad","glamorous","gleaming","global","glorious","glorious","golden","good","good","gorgeous","gothic","governing","graceful","gradual","grand","grateful","greasy","great","great","great","greek","green","green","grey","grieving","grim","gross","grotesque","growing","grubby","grumpy","guilty","handicapped","handsome","handsome","happy","happy","happy","hard","hard","harsh","harsh","head","healthy","healthy","heavy","heavy","helpful","helpful","helpful","helpless","helpless","hidden","high","high","high-pitched","hilarious","hissing","historic","historical","hollow","holy","homeless","homeless","homely","hon","honest","horizontal","horrible","horrible","hostile","hot","hot","huge","huge","human","hungry","hungry","hurt","hushed","husky","icy","ideal","identical","ideological","ill","ill","illegal","imaginative","immediate","immense","immense","imperial","implicit","important","important","impossible","impossible","impressed","impressive","improved","inadequate","inappropriate","inc","inclined","increased","increasing","incredible","independent","indian","indirect","individual","industrial","inevitable","influential","informal","inherent","initial","injured","inland","inner","innocent","innocent","innovative","inquisitive","instant","institutional","insufficient","intact","integral","integrated","intellectual","intelligent","intense","intensive","interested","interesting","interim","interior","intermediate","internal","international","intimate","invisible","involved","iraqi","irish","irrelevant","islamic","isolated","israeli","italian","itchy","japanese","jealous","jewish","jittery","joint","jolly","jolly","joyous","judicial","juicy","junior","just","keen","key","kind","kind","kind","known","korean","labour","large","large","large-scale","late","late","latin","lazy","leading","left","legal","legislative","legitimate","lengthy","lesser","level","lexical","liable","liberal","light","light","light","like","likely","limited","linear","linguistic","liquid","literary","little","little","live","lively","lively","living","local","logical","lonely","lonely","long","long","long","long","long-term","loose","loose","lost","loud","loud","lovely","lovely","low","low","loyal","ltd","lucky","lucky","mad","magenta","magic","magnetic","magnificent","magnificent","main","major","male","mammoth","managerial","managing","manual","many","many","marginal","marine","marked","married","marvellous","marxist","mass","massive","massive","mathematical","mature","maximum","mean","meaningful","mechanical","medical","medieval","melodic","melted","mental","mere","metropolitan","mid","middle","middle-class","mighty","mighty","mild","military","miniature","minimal","minimum","ministerial","minor","miserable","misleading","missing","misty","mixed","moaning","mobile","moderate","modern","modern","modern","modest","molecular","monetary","monthly","moral","motionless","muddy","multiple","mushy","musical","mute","mutual","mysterious","mysterious","naked","narrow","narrow","nasty","nasty","national","native","natural","naughty","naval","near","nearby","neat","necessary","negative","neighbouring","nervous","nervous","net","neutral","new","new","nice","nice","nineteenth-century","noble","noisy","noisy","normal","northern","nosy","notable","novel","nuclear","numerous","numerous","nursing","nutritious","nutty","obedient","objective","obliged","obnoxious","obvious","occasional","occupational","odd","odd","official","ok","okay","old","old","old-fashioned","old-fashioned","olympic","only","open","open","operational","opposite","optimistic","oral","orange","orange","ordinary","ordinary","organic","organisational","original","orthodox","other","outdoor","outer","outrageous","outside","outstanding","outstanding","overall","overseas","overwhelming","painful","pale","palestinian","panicky","parallel","parental","parliamentary","part-time","partial","particular","passing","passive","past","patient","payable","peaceful","peculiar","perfect","perfect","permanent","persistent","personal","petite","philosophical","physical","pink","plain","plain","planned","plastic","pleasant","pleasant","pleased","poised","polish","polite","political","poor","poor","popular","positive","possible","post-war","potential","powerful","powerful","practical","precious","precious","precise","preferred","pregnant","preliminary","premier","prepared","present","presidential","pretty","pretty","previous","prickly","prickly","primary","prime","primitive","principal","printed","prior","private","probable","productive","professional","profitable","profound","progressive","prominent","promising","proper","proposed","prospective","protective","protestant","proud","proud","provincial","psychiatric","psychological","public","puny","pure","purple","purple","purring","puzzled","puzzled","quaint","quaint","qualified","quick","quick","quick","quickest","quiet","quiet","quiet","racial","radical","rainy","rainy","random","rapid","rapid","rare","rare","raspy","rational","ratty","raw","ready","real","real","realistic","rear","reasonable","recent","red","red","reduced","redundant","regional","registered","regular","regulatory","related","relative","relaxed","relevant","reliable","relieved","relieved","religious","reluctant","remaining","remarkable","remote","renewed","representative","repulsive","required","resident","residential","resonant","respectable","respective","responsible","resulting","retail","retired","revolutionary","rich","rich","ridiculous","right","rigid","ripe","rising","rival","roasted","robust","rolling","roman","romantic","rotten","rough","rough","round","round","round","royal","rubber","rude","ruling","running","rural","russian","sacred","sad","sad","safe","salty","satisfactory","satisfied","scared","scary","scary","scattered","scientific","scornful","scottish","scrawny","screeching","secondary","secret","secure","select","selected","selective","selfish","semantic","senior","sensible","sensitive","separate","serious","severe","sexual","shaggy","shaky","shallow","shallow","shared","sharp","sharp","sheer","shiny","shivering","shocked","short","short","short","short","short-term","shrill","shy","shy","sick","significant","silent","silent","silky","silly","silly","silly","similar","simple","single","skilled","skinny","sleepy","slight","slim","slimy","slippery","slow","slow","small","small","smart","smiling","smoggy","smooth","smooth","so-called","social","socialist","soft","soft","soft","solar","sole","solid","solid","sophisticated","sore","sorry","sound","sound","sour","southern","soviet","spanish","spare","sparkling","spatial","special","specific","specified","spectacular","spicy","spiritual","splendid","splendid","spontaneous","sporting","spotless","spotty","square","square","squealing","stable","stale","standard","static","statistical","statutory","steady","steady","steep","steep","sticky","sticky","stiff","still","stingy","stormy","straight","straight","straightforward","strange","strange","strange","strategic","strict","striking","striped","strong","strong","structural","stuck","stupid","stupid","subjective","subsequent","substantial","subtle","successful","successful","successive","sudden","sufficient","suitable","sunny","super","super","superb","superior","supporting","supposed","supreme","sure","surprised","surprising","surrounding","surviving","suspicious","sweet","sweet","swift","swiss","symbolic","sympathetic","systematic","tall","tall","tall","tame","tame","tan","tart","tasteless","tasty","technical","technological","teenage","temporary","tender","tender","tender","tense","terrible","terrible","territorial","testy","then","theoretical","thick","thin","thirsty","thorough","thoughtful","thoughtless","thundering","tight","tight","tiny","tiny","tired","tired","top","tory","total","tough","tough","toxic","traditional","tragic","tremendous","tricky","tropical","troubled","turkish","typical","ugliest","ugly","ugly","ugly","ultimate","unable","unacceptable","unaware","uncertain","unchanged","uncomfortable","unconscious","underground","underlying","unemployed","uneven","unexpected","unfair","unfortunate","unhappy","uniform","uninterested","unique","united","universal","unknown","unlikely","unnecessary","unpleasant","unsightly","unusual","unusual","unwilling","upper","upset","upset","uptight","urban","urgent","used","useful","useless","usual","vague","valid","valuable","variable","varied","various","varying","vast","vast","verbal","vertical","very","victorian","victorious","video-taped","violent","visible","visiting","visual","vital","vivacious","vivid","vocational","voiceless","voluntary","vulnerable","wandering","warm","wasteful","watery","weak","weak","wealthy","weary","wee","weekly","weird","welcome","well","well-known","welsh","western","wet","wet","wet","whispering","white","whole","wicked","wicked","wide","wide","wide-eyed","widespread","wild","wild","willing","wise","witty","wonderful","wonderful","wonderful","wooden","wooden","working","working-class","worldwide","worried","worried","worrying","worthwhile","worthy","written","wrong","wrong","yellow","yellow","young","young","yummy","zany","zany","zealous"],Uq=["aardvark","abacus","abbey","abdomen","abolishment","abroad","abyssinian","accelerant","accelerator","accompanist","accordion","account","accountant","achieve","achiever","acid","acknowledgment","acoustic","acoustics","acrylic","act","action","active","activity","actor","actress","acupuncture","adapter","addiction","addition","address","adjustment","administration","adrenalin","adult","advancement","advantage","advertisement","advertising","advice","affair","affect","afghanistan","africa","aftermath","afternoon","aftershave","aftershock","afterthought","age","agency","agenda","agent","aglet","agreement","air","airbag","airbus","airfare","airforce","airline","airmail","airplane","airport","airship","alarm","alb","albatross","alcohol","alcove","alder","algebra","algeria","alibi","allergist","alley","alligator","alloy","almanac","almond","alpaca","alpenglow","alpenhorn","alpha","alphabet","alternative","altitude","alto","aluminium","aluminum","ambassador","ambulance","amendment","america","amount","amusement","anagram","analgesia","analog","analysis","analyst","anatomy","anesthesiology","anethesiologist","anger","angiosperm","angle","angora","angstrom","anguish","animal","anime","ankle","anklet","annual","anorak","answer","ant","antarctica","anteater","antechamber","antelope","anthony","anthropology","antler","anybody","anything","anywhere","apartment","ape","aperitif","apology","apparatus","apparel","appeal","appendix","apple","applewood","appliance","approval","april","apron","apse","aquarius","aquifer","arch","archaeology","archeology","archer","architect","architecture","arch-rival","area","argentina","argument","aries","arithmetic","arm","armadillo","armament","armchair","armenian","armoire","armor","arm-rest","army","arrival","arrow","art","artichoke","artificer","ascot","ash","ashram","ashtray","asia","asparagus","asphalt","assignment","assistance","associate","association","asterisk","astrakhan","astrolabe","astrologer","astrology","astronomy","atelier","athelete","athlete","atm","atmosphere","atom","atrium","attachment","attack","attempt","attendant","attention","attenuation","attic","attitude","attorney","attraction","audience","auditorium","august","aunt","australia","australian","author","authorisation","authority","authorization","automaton","avalanche","avenue","average","azimuth","babe","babies","baboon","babushka","baby","back","backbone","backdrop","backpack","bacon","bad","badge","badger","bafflement","bag","bagel","bagpipe","bagpipes","bail","bait","bake","baker","bakery","bakeware","balaclava","balalaika","balance","balcony","balinese","ball","balloon","ballpark","bamboo","banana","band","bandana","bandolier","bangladesh","bangle","banjo","bank","bankbook","banker","banquette","baobab","bar","barbara","barbeque","barber","barbiturate","barge","baritone","barium","barn","barometer","barracks","barstool","base","baseball","basement","basin","basis","basket","basketball","bass","bassinet","bassoon","bat","bath","bather","bathhouse","bathrobe","bathroom","bathtub","batter","battery","batting","battle","battleship","bay","bayou","beach","bead","beak","beam","bean","beanie","beanstalk","bear","beard","beast","beat","beautician","beauty","beaver","bed","bedroom","bee","beech","beef","beer","beet","beetle","beggar","beginner","begonia","behavior","beheading","behest","belfry","belgian","belief","believe","bell","belligerency","bellows","belly","belt","bench","bend","beneficiary","benefit","bengal","beret","berry","bestseller","best-seller","betty","beverage","beyond","bibliography","bicycle","bid","bidet","bifocals","big","big-rig","bijou","bike","bikini","bill","billboard","bin","biology","biplane","birch","bird","birdbath","birdcage","birdhouse","bird-watcher","birth","birthday","bit","bite","black","blackberry","blackboard","blackfish","bladder","blade","blame","blank","blanket","blazer","blight","blinker","blister","blizzard","block","blocker","blood","bloodflow","bloom","bloomers","blossom","blouse","blow","blowgun","blowhole","blue","blueberry","boar","board","boat","boat-building","boatload","boatyard","bobcat","body","bog","bolero","bolt","bomb","bomber","bondsman","bone","bongo","bonnet","bonsai","bonus","boogeyman","book","bookcase","bookend","booklet","booster","boot","bootee","bootie","boots","booty","border","bore","bosom","botany","bottle","bottling","bottom","bottom-line","boudoir","bough","boundary","bow","bower","bowl","bowler","bowling","bowtie","box","boxer","boxspring","boy","bra","brace","bracelet","bracket","brain","brake","branch","brand","brandy","brass","brassiere","bratwurst","brazil","bread","breadcrumb","break","breakfast","breakpoint","breast","breastplate","breath","breeze","brian","bribery","brick","bricklaying","bridge","brief","briefs","brilliant","british","broccoli","brochure","broiler","broker","brome","bronchitis","bronco","bronze","brooch","brood","brook","broom","brother","brother-in-law","brow","brown","brush","brushfire","brushing","bubble","bucket","buckle","bud","budget","buffer","buffet","bug","buggy","bugle","building","bulb","bull","bulldozer","bullet","bull-fighter","bumper","bun","bunch","bungalow","bunghole","bunkhouse","burglar","burlesque","burma","burn","burn-out","burst","bus","bush","business","bust","bustle","butane","butcher","butter","button","buy","buyer","buzzard","cabana","cabbage","cabin","cabinet","cable","caboose","cacao","cactus","caddy","cadet","cafe","caftan","cake","calcification","calculation","calculator","calculus","calendar","calf","calico","call","calm","camel","cameo","camera","camp","campaign","campanile","can","canada","canadian","canal","cancel","cancer","candelabra","candidate","candle","candy","cane","cannon","canoe","canon","canopy","canteen","canvas","cap","cape","capital","capitulation","capon","cappelletti","cappuccino","capricorn","captain","caption","car","caravan","carbon","card","cardboard","cardigan","care","cargo","carload","carnation","carol","carotene","carp","carpenter","carpet","carport","carriage","carrier","carrot","carry","cart","cartilage","cartload","cartoon","cartridge","cascade","case","casement","cash","cashier","casino","casserole","cassock","cast","castanet","castanets","castle","cat","catacomb","catamaran","category","caterpillar","cathedral","catsup","cattle","cauliflower","cause","caution","cave","c-clamp","cd","ceiling","celebration","celeriac","celery","celeste","cell","cellar","cello","celsius","cement","cemetery","cenotaph","census","cent","centenarian","center","centimeter","centurion","century","cephalopod","ceramic","cereal","certification","cesspool","chador","chafe","chain","chainstay","chair","chairlift","chairman","chairperson","chairwoman","chaise","chalet","chalice","chalk","champion","chance","chandelier","change","channel","chap","chapel","character","chard","charge","charity","charlatan","charles","charm","chart","chastity","chasuble","chateau","chauffeur","chauvinist","check","checkroom","cheek","cheese","cheetah","chef","chemistry","cheque","cherries","cherry","chess","chest","chick","chicken","chicory","chief","chiffonier","child","childhood","children","chill","chime","chimpanzee","chin","china","chinese","chino","chipmunk","chit-chat","chivalry","chive","chocolate","choice","choker","chop","chopstick","chord","chowder","christmas","christopher","chrome","chromolithograph","chronograph","chronometer","chub","chug","church","churn","cicada","cinema","circle","circulation","circumference","cirrus","citizenship","city","civilisation","clam","clank","clapboard","clarinet","clasp","class","claus","clave","clavicle","clavier","cleaner","cleat","cleavage","clef","cleric","clerk","click","client","cliff","climb","clip","clipper","cloak","cloakroom","clock","clockwork","clogs","cloister","close","closet","cloth","clothes","clothing","cloud","cloudburst","cloudy","clove","clover","club","clutch","coach","coal","coast","coat","cob","cobweb","cockpit","cockroach","cocktail","cocoa","cod","codon","codpiece","coevolution","coffee","coffin","coil","coin","coinsurance","coke","cold","coliseum","collar","collection","college","collision","colloquia","colombia","colon","colonisation","colony","color","colt","column","columnist","comb","combat","combination","comfort","comfortable","comic","comma","command","commercial","commission","committee","communicant","communication","community","company","comparison","competition","competitor","complement","complex","component","comportment","composer","composition","compost","compulsion","computer","comradeship","concert","concrete","condition","condominium","condor","conductor","cone","confectionery","conference","confidence","confirmation","conflict","conga","congo","congressman","congressperson","congresswoman","conifer","connection","consent","consequence","console","consonant","conspirator","constant","constellation","construction","consul","consulate","contact lens","contagion","contest","context","continent","contract","contrail","contrary","contribution","control","convection","convert","convertible","cook","cookie","cooking","coonskin","cope","cop-out","copper","co-producer","copy","copyright","copywriter","cord","corduroy","cork","cormorant","corn","cornerstone","cornet","corral","correspondent","corridor","corsage","cost","costume","cot","cottage","cotton","couch","cougar","cough","council","councilman","councilor","councilperson","councilwoman","counter","counter-force","countess","country","couple","courage","course","court","cousin","covariate","cover","coverall","cow","cowbell","cowboy","crab","crack","cracker","crackers","cradle","craftsman","crash","crate","cravat","craw","crawdad","crayfish","crayon","cream","creative","creator","creature","creche","credenza","credit","creditor","creek","creme brulee","crest","crew","crib","cribbage","cricket","cricketer","crime","criminal","crinoline","criteria","criterion","criticism","crocodile","crocus","croissant","crook","crop","cross","cross-contamination","cross-stitch","crotch","croup","crow","crowd","crown","crude","crush","cry","crystallography","cub","cuban","cuckoo","cucumber","cuff-links","cultivar","cultivator","culture","culvert","cummerbund","cup","cupboard","cupcake","cupola","curio","curl","curler","currency","current","cursor","curtain","curve","cushion","custard","custodian","customer","cut","cuticle","cutlet","cutover","cutting","cyclamen","cycle","cyclone","cylinder","cymbal","cymbals","cynic","cyst","cytoplasm","dad","daffodil","dagger","dahlia","daisy","damage","dame","dance","dancer","danger","daniel","dark","dart","dash","dashboard","database","date","daughter","david","day","daybed","dead","deadline","deal","dealer","dear","death","deathwatch","deborah","debt","debtor","decade","december","decimal","decision","deck","declination","decongestant","decrease","decryption","dedication","deer","defense","deficit","deformation","degree","delete","delivery","demand","demur","den","denim","dentist","deodorant","department","dependent","deployment","deposit","depressive","depth","deputy","derby","derrick","description","desert","design","designer","desire","desk","dessert","destiny","destroyer","destruction","detail","detainment","detective","detention","determination","development","deviance","dew","dhow","diadem","diamond","diaphragm","diarist","dibble","dickey","dictaphone","diction","dictionary","diet","dietician","difference","differential","difficulty","digestion","digger","digital","dilapidation","dill","dime","dimension","dimple","diner","dinghy","dinner","dinosaur","diploma","dipstick","direction","director","dirndl","dirt","disadvantage","disarmament","disaster","disco","disconnection","discount","discovery","discrepancy","discussion","disease","disembodiment","disengagement","disguise","disgust","dish","dishes","dishwasher","disk","display","disposer","distance","distribution","distributor","district","divan","diver","divide","divider","diving","division","dock","doctor","document","doe","dog","dogsled","dogwood","doll","dollar","dolman","dolphin","domain","donald","donkey","donna","door","doorknob","doorpost","dorothy","dory","dot","double","doubling","doubt","doubter","downforce","downgrade","downtown","draft","dragon","dragonfly","dragster","drain","drake","drama","dramaturge","draw","drawbridge","drawer","drawing","dream","dredger","dress","dresser","dressing","drill","drink","drive","driver","driveway","driving","drizzle","dromedary","drop","drug","drum","drummer","drunk","dry","dryer","duck","duckling","dud","duffel","dugout","dulcimer","dumbwaiter","dump truck","dune buggy","dungarees","dungeon","duplexer","dust","dust storm","duster","duty","dwarf","dwelling","dynamo","eagle","ear","eardrum","earmuffs","earplug","earrings","earth","earthquake","earthworm","ease","easel","east","eave","eavesdropper","e-book","ecclesia","eclipse","ecliptic","economics","ecumenist","eddy","edge","edger","editor","editorial","education","edward","eel","effacement","effect","effective","efficacy","efficiency","effort","egg","egghead","eggnog","eggplant","egypt","eight","ejector","elbow","election","electrocardiogram","element","elephant","elevator","elixir","elizabeth","elk","ellipse","elm","elongation","embossing","emergence","emergent","emery","emotion","employ","employee","employer","employment","empowerment","emu","encirclement","encyclopedia","end","endothelium","enemy","energy","engine","engineer","engineering","english","enigma","enquiry","entertainment","entrance","entry","environment","epauliere","epee","ephemera","ephemeris","epoch","eponym","epoxy","equinox","equipment","era","e-reader","error","escape","espadrille","espalier","establishment","estate","estimate","estrogen","estuary","ethernet","ethiopia","euphonium","eurocentrism","europe","evaluator","evening","evening-wear","event","eviction","evidence","evocation","examination","examiner","example","exchange","exclamation","excuse","executor","exhaust","ex-husband","exile","existence","exit","expansion","expansionism","experience","expert","explanation","exposition","extension","extent","extreme","ex-wife","eye","eyeball","eyebrow","eyebrows","eyeglasses","eyelash","eyelashes","eyelid","eyelids","eyeliner","eyestrain","face","facelift","facet","facilities","facsimile","fact","factor","factory","faculty","fahrenheit","fairies","fairy","fall","falling-out","familiar","family","fan","fang","fanlight","fanny","fanny-pack","farm","farmer","fascia","fat","father","father-in-law","fatigues","faucet","fault","fawn","fax","fear","feast","feather","feature","february","fedelini","fedora","feed","feedback","feeling","feet","felony","female","fen","fence","fencing","fender","ferry","ferryboat","fertilizer","few","fiber","fiberglass","fibre","fiction","fiddle","field","fifth","fight","fighter","figurine","file","fill","filly","filth","final","finance","find","fine","finger","fingernail","finisher","fir","fire","fireman","fireplace","firewall","fish","fishbone","fisherman","fishery","fishmonger","fishnet","fisting","fix","fixture","flag","flame","flanker","flare","flash","flat","flatboat","flavor","flax","fleck","fleece","flesh","flight","flintlock","flip-flops","flock","flood","floor","floozie","flower","flu","flugelhorn","fluke","flute","fly","flytrap","foam","fob","focus","fog","fold","folder","fondue","font","food","foot","football","footnote","footrest","foot-rest","footstool","foray","force","forearm","forebear","forecast","forehead","forest","forestry","forgery","fork","form","formal","format","former","fort","fortnight","fortress","forum","foundation","fountain","fowl","fox","foxglove","fragrance","frame","france","fratricide","fraudster","frazzle","freckle","freeplay","freeze","freezer","freight","freighter","french","freon","fresco","friction","friday","fridge","friend","friendship","frigate","fringe","frock","frog","front","frost","frown","fruit","frustration","fuel","fulfillment","full","function","fundraising","funny","fur","furnace","furniture","fusarium","futon","future","gaffer","gaiters","gale","gall-bladder","galleon","gallery","galley","gallon","galoshes","game","gamebird","gamma-ray","gander","gap","garage","garb","garbage","garden","garlic","garment","garter","gas","gasoline","gastropod","gate","gateway","gather","gauge","gauntlet","gazebo","gazelle","gear","gearshift","geese","gelding","gem","gemini","gemsbok","gender","gene","general","genetics","geography","geology","geometry","george","geranium","gerbil","geriatrician","german","germany","geyser","ghana","gherkin","ghost","giant","gigantism","ginseng","giraffe","girdle","girl","git","glad","gladiolus","gland","glass","glasses","glen","glider","gliding","glockenspiel","glove","gloves","glue","glut","goal","goat","gobbler","godmother","goggles","go-kart","gold","goldfish","golf","gondola","gong","good","goodbye","good-bye","goodie","goose","gopher","gore-tex","gorilla","gosling","governance","government","governor","gown","grab-bag","grade","grain","gram","granddaughter","grandfather","grandmom","grandmother","grandson","granny","grape","grapefruit","graph","graphic","grass","grasshopper","grassland","gray","grease","great","great-grandfather","great-grandmother","greece","greek","green","greenhouse","grenade","grey","grief","grill","grip","grit","ground","group","grouper","grouse","growth","guarantee","guatemalan","guest","guestbook","guide","guilty","guitar","guitarist","gum","gumshoes","gun","gutter","guy","gym","gymnast","gynaecology","gyro","hacienda","hacksaw","hackwork","hail","hair","haircut","half","half-brother","half-sister","halibut","hall","hallway","hamaki","hamburger","hammer","hammock","hamster","hand","handball","hand-holding","handicap","handle","handlebar","handmaiden","handsaw","hang","harbor","harbour","hardboard","hardcover","hardening","hardhat","hard-hat","hardware","harm","harmonica","harmony","harp","harpooner","harpsichord","hassock","hat","hatbox","hatchet","hate","haunt","haversack","hawk","hay","head","headlight","headline","headrest","health","hearing","heart","heartache","hearth","hearthside","heart-throb","heartwood","heat","heater","heaven","heavy","hedge","hedgehog","heel","height","heirloom","helen","helicopter","helium","hell","hellcat","helmet","helo","help","hemp","hen","herb","heron","herring","hexagon","heyday","hide","high","highlight","high-rise","highway","hill","himalayan","hip","hippodrome","hippopotamus","historian","history","hit","hive","hobbies","hobbit","hobby","hockey","hoe","hog","hold","hole","holiday","home","homogenate","homonym","honey","honeybee","honoree","hood","hoof","hook","hope","hops","horn","hornet","horse","hose","hosiery","hospice","hospital","host","hostel","hostess","hot","hot-dog","hotel","hour","hourglass","house","houseboat","hovel","hovercraft","howitzer","hub","hubcap","hugger","human","humidity","humor","hunger","hurdler","hurricane","hurry","hurt","husband","hut","hutch","hyacinth","hybridisation","hydrant","hydraulics","hydrofoil","hydrogen","hyena","hygienic","hyphenation","hypochondria","hypothermia","ice","icebreaker","icecream","ice-cream","icicle","icon","idea","ideal","igloo","ikebana","illegal","image","imagination","impact","implement","importance","impress","imprisonment","improvement","impudence","impulse","inbox","incandescence","inch","income","increase","independent","index","india","indigence","indonesia","industry","infancy","inflammation","inflation","information","infusion","inglenook","ingrate","initial","initiative","in-joke","injury","ink","in-laws","inlay","inn","innervation","innocent","input","inquiry","inscription","insect","inside","insolence","inspector","instruction","instrument","instrumentalist","instrumentation","insulation","insurance","insurgence","intelligence","intention","interactive","interest","interferometer","interior","interloper","internal","internet","interpreter","intervenor","interview","interviewer","intestine","intestines","invention","inventor","inventory","invite","invoice","ipad","iran","iraq","iridescence","iris","iron","ironclad","island","israel","issue","italian","italy","jackal","jacket","jaguar","jail","jailhouse","jam","james","january","japan","japanese","jar","jasmine","jason","jaw","jeans","jeep","jeff","jelly","jellyfish","jennifer","jet","jewel","jewelry","jiffy","job","jockey","jodhpurs","joey","jogging","john","join","joke","joseph","jot","journey","judge","judo","juggernaut","juice","july","jumbo","jump","jumper","jumpsuit","june","junior","junk","junker","junket","jury","justice","jute","kale","kamikaze","kangaroo","karate","karen","kayak","kazoo","kendo","kenneth","kenya","ketch","ketchup","kettle","kettledrum","kevin","key","keyboard","keyboarding","keystone","kick","kick-off","kid","kidney","kidneys","kielbasa","kill","kilogram","kilometer","kilt","kimberly","kimono","kind","king","kingfish","kiosk","kiss","kitchen","kite","kitten","kitty","kleenex","klomps","knee","kneejerk","knickers","knife","knife-edge","knight","knitting","knot","knowledge","knuckle","koala","kohlrabi","korean","lab","laborer","lace","lacquerware","ladder","ladybug","lake","lamb","lamp","lan","lanai","land","landform","landmine","language","lantern","lap","laparoscope","lapdog","laptop","larch","larder","lark","laryngitis","lasagna","latency","latex","lathe","latte","laugh","laundry","laura","law","lawn","lawsuit","lawyer","layer","lead","leader","leaf","league","leaker","learning","leash","leather","leaver","lecture","leek","leg","legal","legging","legume","lei","lemon","lemonade","lemur","length","lentil","leo","leopard","leotard","leprosy","let","letter","lettuce","level","lever","leverage","libra","librarian","library","license","lier","life","lift","light","lighting","lightning","lilac","lily","limit","limo","line","linen","liner","link","linseed","lion","lip","lipstick","liquid","liquor","lisa","list","literature","litigation","litter","liver","living","lizard","llama","loaf","loafer","loan","lobotomy","lobster","lock","locker","locket","locomotive","locust","loft","log","loggia","loincloth","look","loss","lot","lotion","lounge","lout","love","low","loyalty","luck","luggage","lumber","lumberman","lunch","luncheonette","lunchroom","lung","lunge","lute","luttuce","lycra","lye","lymphocyte","lynx","lyocell","lyre","lyric","macadamia","macaroni","machine","macrame","macrofauna","maelstrom","maestro","magazine","magic","magician","maid","maiden","mail","mailbox","mailman","maintenance","major","major-league","makeup","malaysia","male","mall","mallet","mambo","mammoth","man","management","manager","mandarin","mandolin","mangrove","manhunt","maniac","manicure","manner","manor","mansard","manservant","mansion","mantel","mantle","mantua","manufacturer","manx","map","maple","maraca","maracas","marble","march","mare","margaret","margin","maria","mariachi","marimba","mark","market","marketing","marksman","marriage","marsh","marshland","marxism","mary","mascara","mask","mass","massage","master","mastication","mastoid","mat","match","material","math","mattock","mattress","maximum","may","maybe","mayonnaise","mayor","meal","meaning","measure","meat","mechanic","medicine","medium","meet","meeting","megalomaniac","melody","member","membership","memory","men","menorah","mention","menu","mercury","mess","message","metal","metallurgist","meteor","meteorology","meter","methane","method","methodology","metro","metronome","mexican","mexico","mezzanine","mice","michael","michelle","microlending","microwave","mid-course","middle","middleman","midi","midline","midnight","midwife","might","migrant","mile","milk","milkshake","millennium","millimeter","millisecond","mime","mimosa","mind","mine","mini","minibus","minion","mini-skirt","minister","minor","minor-league","mint","minute","mirror","miscarriage","miscommunication","misfit","misogyny","misplacement","misreading","missile","mission","mist","mistake","mister","miter","mitten","mix","mixer","mixture","moat","mobile","moccasins","mocha","mode","model","modem","mole","mom","moment","monastery","monasticism","monday","money","monger","monitor","monkey","monocle","monotheism","monsoon","monster","month","mood","moon","moonscape","moonshine","mop","Mormon","morning","morocco","morsel","mortise","mosque","mosquito","most","motel","moth","mother","mother-in-law","motion","motor","motorboat","motorcar","motorcycle","mound","mountain","mouse","mouser","mousse","moustache","mouth","mouton","move","mover","movie","mower","mug","mukluk","mule","multimedia","muscle","musculature","museum","music","music-box","musician","music-making","mustache","mustard","mutt","myanmar","mycoplasma","nail","name","naming","nancy","nanoparticle","napkin","narcissus","nation","naturalisation","nature","neat","neck","necklace","necktie","necromancer","need","needle","negligee","neologism","neon","nepal","nephew","nerve","nest","net","netball","netbook","netsuke","network","neurobiologist","neuropathologist","neuropsychiatry","news","newspaper","newsprint","newsstand","nexus","nic","nicety","niche","nickel","niece","nigeria","night","nightclub","nightgown","nightingale","nightlight","nitrogen","node","noise","nonbeliever","nonconformist","nondisclosure","noodle","normal","norse","north","north america","north korea","norwegian","nose","note","notebook","notice","notify","notoriety","nougat","novel","november","nudge","number","numeracy","numeric","numismatist","nurse","nursery","nurture","nut","nylon","oak","oar","oasis","oatmeal","obi","objective","obligation","oboe","observation","observatory","occasion","occupation","ocean","ocelot","octagon","octave","octavo","octet","october","octopus","odometer","oeuvre","offence","offer","office","official","off-ramp","oil","okra","oldie","olive","omega","omelet","oncology","one","onion","open","opening","opera","operation","ophthalmologist","opinion","opium","opossum","opportunist","opportunity","opposite","option","orange","orangutan","orator","orchard","orchestra","orchid","order","ordinary","ordination","organ","organisation","organization","original","ornament","osmosis","osprey","ostrich","others","otter","ottoman","ounce","outback","outcome","outfit","outhouse","outlay","output","outrigger","outset","outside","oval","ovary","oven","overcharge","overclocking","overcoat","overexertion","overflight","overnighter","overshoot","owl","owner","ox","oxen","oxford","oxygen","oyster","pacemaker","pack","package","packet","pad","paddle","paddock","page","pagoda","pail","pain","paint","painter","painting","paintwork","pair","pajama","pajamas","pakistan","paleontologist","paleontology","palm","pamphlet","pan","pancake","pancreas","panda","panic","pannier","panpipe","pansy","panther","panties","pantry","pants","pantsuit","panty","pantyhose","paper","paperback","parable","parachute","parade","parallelogram","paramedic","parcel","parchment","parent","parentheses","park","parka","parrot","parsnip","part","participant","particle","particular","partner","partridge","party","passage","passbook","passenger","passive","pasta","paste","pastor","pastoralist","pastry","patch","path","patient","patina","patio","patriarch","patricia","patrimony","patriot","patrol","pattern","paul","pavement","pavilion","paw","pawnshop","payee","payment","pea","peace","peach","peacoat","peacock","peak","peanut","pear","pearl","pedal","pedestrian","pediatrician","peen","peer","peer-to-peer","pegboard","pelican","pelt","pen","penalty","pencil","pendant","pendulum","penicillin","pension","pentagon","peony","people","pepper","percentage","perch","perfume","period","periodical","peripheral","permafrost","permission","permit","perp","persian","person","personality","peru","pest","pet","petal","petticoat","pew","pharmacist","pharmacopoeia","phase","pheasant","philippines","philosopher","philosophy","phone","photo","photographer","phrase","physical","physician","pianist","piano","piccolo","pick","pickax","picket","pickle","picture","pie","piece","pier","piety","pig","pigeon","pike","pile","pilgrimage","pillbox","pillow","pilot","pimp","pimple","pin","pinafore","pince-nez","pine","pineapple","pinecone","ping","pink","pinkie","pinstripe","pint","pinto","pinworm","pioneer","pipe","piracy","piranha","pisces","piss","pitch","pitching","pith","pizza","place","plain","plane","planet","plant","plantation","planter","plaster","plasterboard","plastic","plate","platform","platinum","platypus","play","player","playground","playroom","pleasure","pleated","plier","plot","plough","plover","plow","plowman","plume","plunger","plywood","pneumonia","pocket","pocketbook","pocket-watch","poet","poignance","point","poison","poisoning","poland","pole","polenta","police","policeman","policy","polish","politician","pollution","polo","polyester","pompom","poncho","pond","pony","poof","pool","popcorn","poppy","popsicle","population","populist","porch","porcupine","port","porter","portfolio","porthole","position","positive","possibility","postage","postbox","poster","pot","potato","potential","potty","pouch","poultry","pound","pounding","powder","power","precedent","precipitation","preface","prelude","premeditation","premier","preoccupation","preparation","presence","presentation","president","pressroom","pressure","pressurisation","price","pride","priest","priesthood","primary","primate","prince","princess","principal","print","printer","priority","prison","prize","prizefight","probation","problem","procedure","process","processing","produce","producer","product","production","professional","professor","profit","program","project","promotion","prompt","proof-reader","propane","property","prose","prosecution","protest","protocol","prow","pruner","pseudoscience","psychiatrist","psychoanalyst","psychologist","psychology","ptarmigan","publisher","pudding","puddle","puffin","pull","pulley","puma","pump","pumpkin","pumpkinseed","punch","punishment","pupa","pupil","puppy","purchase","puritan","purple","purpose","purse","push","pusher","put","pvc","pyjama","pyramid","quadrant","quail","quality","quart","quarter","quartz","queen","question","quicksand","quiet","quill","quilt","quince","quit","quiver","quotation","rabbi","rabbit","raccoon","race","racer","racing","racist","rack","radar","radiator","radio","radiosonde","radish","raffle","raft","rag","rage","rail","railway","raiment","rain","rainbow","raincoat","rainmaker","rainstorm","raise","rake","ram","rambler","ramie","ranch","random","randomisation","range","rank","raspberry","rat","rate","ratio","raven","ravioli","raw","rawhide","ray","rayon","reactant","reaction","read","reading","reamer","rear","reason","receipt","reception","recess","recliner","recognition","recommendation","record","recorder","recover","recruit","rectangle","red","redesign","rediscovery","reduction","reef","refectory","reflection","refrigerator","refund","refuse","region","register","regret","regular","regulation","reindeer","reinscription","reject","relation","relative","religion","relish","reminder","rent","repair","reparation","repeat","replace","replication","reply","report","representative","reprocessing","request","resale","research","resident","resist","resolution","respect","respite","responsibility","rest","restaurant","result","retailer","rethinking","retina","retouch","return","reveal","revenant","review","revolution","revolve","revolver","reward","rheumatism","rhinoceros","rhyme","rhythm","rice","richard","riddle","ride","rider","ridge","rifle","right","rim","ring","ringworm","ripple","rise","riser","risk","river","riverbed","rivulet","road","roadway","roast","robe","robert","robin","rock","rocker","rocket","rocket-ship","rod","role","roll","roller","romania","romanian","ronald","roof","room","rooster","root","rope","rose","rostrum","rotate","roundabout","route","router","routine","row","rowboat","royal","rub","rubber","rubric","ruckus","ruffle","rugby","rule","run","runaway","runner","russia","russian","rutabaga","ruth","sabre","sack","sad","saddle","safe","safety","sage","sagittarius","sail","sailboat","sailor","salad","salary","sale","salesman","salmon","salon","saloon","salt","samovar","sampan","sample","samurai","sand","sandals","sandbar","sandra","sandwich","santa","sarah","sardine","sari","sarong","sash","satellite","satin","satire","saturday","sauce","saudi arabia","sausage","save","saving","savior","saviour","saw","saxophone","scale","scallion","scanner","scarecrow","scarf","scarification","scene","scent","schedule","scheme","schizophrenic","schnitzel","school","schoolhouse","schooner","science","scimitar","scissors","scooter","score","scorn","scorpio","scorpion","scow","scraper","screamer","screen","screenwriting","screw","screwdriver","screw-up","scrim","scrip","sculpting","sculpture","sea","seagull","seal","seaplane","search","seashore","season","seat","second","secretariat","secretary","section","sectional","sector","secure","security","seed","seeder","segment","select","selection","self","sell","semicircle","semicolon","senator","sense","sentence","sepal","september","septicaemia","series","servant","server","service","session","set","setting","settler","sewer","sex","shack","shade","shadow","shadowbox","shake","shakedown","shaker","shallot","shame","shampoo","shanty","shape","share","shark","sharon","shawl","shearling","shears","sheath","shed","sheep","sheet","shelf","shell","sherry","shield","shift","shin","shine","shingle","ship","shirt","shirtdress","shoat","shock","shoe","shoehorn","shoe-horn","shoelace","shoemaker","shoes","shoestring","shofar","shoot","shootdown","shop","shopper","shopping","shore","shortage","shorts","shortwave","shot","shoulder","shovel","show","shower","show-stopper","shred","shrimp","shrine","siamese","siberian","sibling","sick","side","sideboard","sideburns","sidecar","sidestream","sidewalk","siding","sign","signature","signet","significance","signup","silica","silk","silkworm","sill","silo","silver","simple","sing","singer","single","sink","sister","sister-in-law","sit","sitar","size","skate","skiing","skill","skin","skirt","skulduggery","skull","skullcap","skullduggery","skunk","sky","skylight","skyscraper","skywalk","slapstick","slash","slave","sled","sledge","sleep","sleet","sleuth","slice","slider","slime","slip","slipper","slippers","slope","sloth","smash","smell","smelting","smile","smock","smog","smoke","smuggling","snail","snake","snakebite","sneakers","sneeze","snob","snorer","snow","snowboarding","snowflake","snowman","snowmobiling","snowplow","snowstorm","snowsuit","snuggle","soap","soccer","society","sociology","sock","socks","soda","sofa","softball","softdrink","softening","software","soil","soldier","solid","solitaire","sombrero","somersault","somewhere","son","song","songbird","sonnet","soot","soprano","sorbet","sort","soulmate","sound","soup","source","sourwood","sousaphone","south","south africa","south america","south korea","sow","soy","soybean","space","spacing","spade","spaghetti","spain","spandex","spank","spark","sparrow","spasm","speaker","speakerphone","spear","special","specialist","specific","spectacle","spectacles","spectrograph","speedboat","spend","sphere","sphynx","spider","spike","spinach","spine","spiral","spirit","spiritual","spite","spleen","split","sponge","spoon","sport","spot","spotlight","spray","spread","spring","sprinter","sprout","spruce","spume","spur","spy","square","squash","squatter","squeegee","squid","squirrel","stable","stack","stacking","stadium","staff","stag","stage","stain","stair","staircase","stallion","stamen","stamina","stamp","stance","standoff","star","start","starter","state","statement","station","station-wagon","statistic","statistician","steak","steal","steam","steamroller","steel","steeple","stem","stencil","step","step-aunt","step-brother","stepdaughter","step-daughter","step-father","step-grandfather","step-grandmother","stepmother","step-mother","stepping-stone","steps","step-sister","stepson","step-son","step-uncle","steven","stew","stick","stiletto","still","stinger","stitch","stock","stocking","stockings","stock-in-trade","stole","stomach","stone","stonework","stool","stop","stopsign","stopwatch","store","storey","storm","story","storyboard","story-telling","stove","strait","stranger","strap","straw","strawberry","stream","street","streetcar","stress","stretch","strike","string","strip","structure","struggle","stud","student","studio","study","stuff","stumbling","sturgeon","style","styling","stylus","subcomponent","subconscious","submarine","subroutine","subsidence","substance","suburb","subway","success","suck","sudan","suede","suffocation","sugar","suggestion","suit","suitcase","sultan","summer","sun","sunbeam","sunbonnet","sunday","sundial","sunflower","sunglasses","sunlamp","sunroom","sunshine","supermarket","supply","support","supporter","suppression","surface","surfboard","surgeon","surgery","surname","surprise","susan","sushi","suspect","suspenders","sustainment","SUV","swallow","swamp","swan","swath","sweat","sweater","sweats","sweatshirt","sweatshop","sweatsuit","swedish","sweets","swell","swim","swimming","swimsuit","swing","swiss","switch","switchboard","swivel","sword","swordfish","sycamore","syndicate","synergy","synod","syria","syrup","system","tabby","tabernacle","table","tablecloth","tabletop","tachometer","tackle","tadpole","tail","tailor","tailspin","taiwan","tale","talk","tam","tambour","tambourine","tam-o'-shanter","tandem","tangerine","tank","tanker","tankful","tank-top","tanzania","tap","target","tassel","taste","tatami","tattler","tattoo","taurus","tavern","tax","taxi","taxicab","tea","teacher","teaching","team","tear","technician","technologist","technology","teen","teeth","telephone","telescreen","teletype","television","teller","temp","temper","temperature","temple","tempo","temporariness","temptress","tendency","tenement","tennis","tenor","tent","tepee","term","terracotta","terrapin","territory","test","text","textbook","texture","thailand","thanks","thaw","theater","theism","theme","theoretician","theory","therapist","thermals","thermometer","thigh","thing","thinking","thistle","thomas","thong","thongs","thorn","thought","thread","thrill","throat","throne","thrush","thumb","thunder","thunderbolt","thunderhead","thunderstorm","thursday","tiara","tic","ticket","tie","tiger","tight","tights","tile","till","timbale","time","timeline","timeout","timer","timpani","tin","tinderbox","tinkle","tintype","tip","tire","tissue","titanium","title","toad","toast","toe","toenail","toga","togs","toilet","tom","tomato","tomography","tomorrow","tom-tom","ton","tongue","toot","tooth","toothbrush","toothpaste","toothpick","top","top-hat","topsail","toque","torchiere","toreador","tornado","torso","tortellini","tortoise","tosser","total","tote","touch","tough","tough-guy","tour","tourist","towel","tower","town","townhouse","tow-truck","toy","trachoma","track","tracksuit","tractor","trade","tradition","traditionalism","traffic","trail","trailer","train","trainer","training","tram","tramp","transaction","translation","transmission","transom","transport","trapdoor","trapezium","trapezoid","trash","travel","tray","treatment","tree","trellis","tremor","trench","trial","triangle","tribe","trick","trigonometry","trim","trinket","trip","tripod","trolley","trombone","trooper","trouble","trousers","trout","trove","trowel","truck","truckit","trumpet","trunk","trust","try","t-shirt","tsunami","tub","tuba","tube","tuesday","tugboat","tulip","tummy","tuna","tune","tune-up","tunic","tunnel","turban","turkey","turkish","turn","turnip","turnover","turnstile","turret","turtle","tussle","tutu","tuxedo","tv","twig","twilight","twine","twist","twister","two","typewriter","typhoon","tyvek","uganda","ukraine","ukrainian","ukulele","umbrella","unblinking","uncle","underclothes","underground","underneath","underpants","underpass","undershirt","underwear","underwire","unibody","uniform","union","unit","united kingdom","urn","use","usher","utensil","uzbekistan","vacation","vacuum","vagrant","valance","valley","valuable","value","van","vane","vanity","variation","variety","vase","vast","vault","vaulting","veal","vegetable","vegetarian","vehicle","veil","vein","veldt","vellum","velodrome","velvet","venezuela","venezuelan","venom","veranda","verdict","vermicelli","verse","version","vertigo","verve","vessel","vest","vestment","veterinarian","vibe","vibraphone","vibration","vietnam","view","villa","village","vineyard","vinyl","viola","violet","violin","virginal","virgo","virtue","viscose","vise","vision","visit","visitor","visor","vixen","voice","volcano","volleyball","voyage","vulture","wad","wafer","waffle","waist","waistband","waiter","waitress","walk","walker","walkway","wall","wallaby","wallet","walnut","walrus","wampum","wannabe","war","warden","warlock","warm-up","warning","wash","washbasin","washcloth","washer","washtub","wasp","waste","wastebasket","watch","watchmaker","water","waterbed","waterfall","waterskiing","waterspout","wave","wax","way","weakness","wealth","weapon","weasel","weather","web","wedge","wednesday","weed","weeder","weedkiller","week","weekend","weekender","weight","weird","well","west","western","wet-bar","wetsuit","whale","wharf","wheel","whip","whirlpool","whirlwind","whisker","whiskey","whistle","white","whole","wholesale","wholesaler","whorl","wife","wilderness","will","william","willow","wind","windage","wind-chime","window","windscreen","windshield","wine","wing","wingman","wingtip","winter","wire","wiseguy","wish","wisteria","witch","witch-hunt","withdrawal","witness","wolf","woman","wombat","women","wood","woodland","woodshed","woodwind","wool","woolen","word","work","workbench","worker","workhorse","worklife","workshop","world","worm","worthy","wound","wrap","wraparound","wrecker","wren","wrench","wrestler","wrinkle","wrist","writer","writing","wrong","xylophone","yacht","yak","yam","yard","yarmulke","yarn","yawl","year","yellow","yesterday","yew","yin","yogurt","yoke","young","youth","yugoslavian","yurt","zampone","zebra","zebrafish","zephyr","ziggurat","zinc","zipper","zither","zone","zoo","zoologist","zoology","zoot-suit","zucchini"];function qk(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}function Yu(){const e=Math.round(Math.random()*1124),t=Math.round(Math.random()*3260);return`${qk(Vq[e])} ${qk(Uq[t])}`}function Dm(e){var n,r;if(!(e!=null&&e.trim().length))return"?";const t=(r=(n=e==null?void 0:e.trim())==null?void 0:n.replace(/[^a-zA-Z ]/g,""))==null?void 0:r.split(" ").map(s=>s.length?s:"").slice(0,3).reduce((s,i)=>s+i[0],"");return t==null?void 0:t.replace("undefined","")}const jy=()=>({id:void 0,name:Yu(),apiKey:"",username:"",password:"",printerURL:"",printerType:0,enabled:!0});class en extends kr{static convertPrinterToCreateForm(t){const n=jy();return n.id=t.id,n.printerURL=t.printerURL,n.name=t.name||Yu(),n.apiKey=t.apiKey,n.username=t.username,n.password=t.password,n.enabled=t.enabled,n}static openPrinterURL(t){t&&window.open(t)}static async getPrinters(){const t=$e.printerRoute;return await this.get(t)}static async getPrinterLoginDetails(t){const n=$e.getPrinterLoginDetailsRoute(t);return await this.get(n)}static async restartOctoPrint(t){const n=`${$e.restartOctoPrintRoute(t)}`;return await this.post(n)}static async refreshSocket(t){const n=`${$e.refreshSocketRoute(t)}`;return await this.post(n)}static async sendPrinterConnectCommand(t){const n=$e.printerSerialConnectRoute(t);return await this.post(n)}static async sendPrinterDisconnectCommand(t){const n=$e.printerSerialDisconnectRoute(t);return await this.post(n)}static async sendPrinterJogCommand(t,n){const r=$e.printerJogCommandRoute(t);return await this.post(r,n)}static async sendPrinterHomeCommand(t,n){const r=$e.printerHomeCommandRoute(t);return await this.post(r,n)}static async createPrinter(t,n){const r=`${$e.printerRoute}?forceSave=${n}`;return await this.post(r,t)}static async batchImportPrinters(t){const n=$e.printerBatchRoute;return await this.post(n,t)}static async deletePrinter(t){const n=$e.getPrinterRoute(t);return await this.delete(n)}static async updatePrinter(t,n,r){const i=`${$e.getPrinterRoute(t)}?forceSave=${r}`;return await this.patch(i,n)}static async updatePrinterMaintenance(t,n=null){const r=$e.postPrinterDisabledReasonRoute(t);return await this.patch(r,{disabledReason:n})}static async testConnection(t){const n=$e.printerTestConnectionRoute;return await this.post(n,t)}static async toggleEnabled(t,n){const r=$e.printerEnabledRoute(t);return await this.patch(r,{enabled:n})}}class xn extends kr{static async getSettings(){const t=$e.settingsRoute;return await this.get(t)}static async getSettingsSensitive(){const t=$e.settingsSensitiveRoute;return await this.get(t)}static async updateLoginRequiredSettings(t){const n=`${$e.updateLoginRequiredRoute}`;return await this.put(n,{loginRequired:t})}static async updateRegistrationEnabledSettings(t){const n=`${$e.updateRegistrationEnabledRoute}`;return await this.put(n,{registrationEnabled:t})}static async updateCredentialSettings(t,n,r){const s=`${$e.updateCredentialSettings}`;return await this.put(s,{jwtExpiresIn:t,refreshTokenAttempts:n,refreshTokenExpiry:r})}static async updateFrontendSettings(t){const n=`${$e.updateFrontendSettingsRoute}`;return await this.put(n,t)}static async setSentryDiagnosticsSettings(t){const n=`${$e.serverSentryDiagnosticsSettingRoute}`;return await this.patch(n,{enabled:t})}static async updateTimeoutSettings(t){const n=`${$e.updateTimeoutSettingRoute}`;return await this.put(n,t)}static async setFileCleanSettings(t){const n=`${$e.fileCleanSettingsRoute}`;return await this.put(n,t)}static async updateExperimentalMoonrakerSupport(t){const n=$e.updateExperimentalMoonrakerSupportRoute;return await this.put(n,{enabled:t})}static async updateExperimentalPrusaLinkSupport(t){const n=$e.updateExperimentalPrusaLinkSupportRoute;return await this.put(n,{enabled:t})}static async updateExperimentalClientSupport(t){const n=$e.updateExperimentalClientSupportRoute;return await this.put(n,{enabled:t})}}class za extends kr{static async stopPrintJob(t){const n=$e.printerStopJobRoute(t);return await this.post(n)}static async pausePrintJob(t){const n=$e.printerPauseJobRoute(t);return await this.post(n)}static async resumePrintJob(t){const n=$e.printerResumeJobRoute(t);return await this.post(n)}}const js=Ss("Settings",{state:()=>({settings:void 0,frontendDebugSettings:{showPrinterStateUpdateSideNav:!1,showInterpretedPrinterState:!1,showJobsRendered:!1}}),actions:{async loadSettings(){const e=await xn.getSettings();return this.settings=e,e},async updateFrontendSettings(e){const t=await xn.updateFrontendSettings(e);return this.settings=t,t},async saveFrontendSettings(){if(!this.settings)return;const e=await xn.updateFrontendSettings(this.settings.frontend);this.settings=e},async updateTimeoutSettings(e){const t=await xn.updateTimeoutSettings(e);return this.settings=t,t}},getters:{serverSettings(){var e;return(e=this.settings)==null?void 0:e.server},frontendSettings(){var e;return(e=this.settings)==null?void 0:e.frontend},preferCancelOverQuickStop(){var e,t;return((t=(e=this.settings)==null?void 0:e.frontend)==null?void 0:t.tilePreferCancelOverQuickStop)||!1},thumbnailsEnabled(){var e;return((e=this.settings)==null?void 0:e.server.experimentalThumbnailSupport)||!1},largeTiles(){var e,t;return((t=(e=this.settings)==null?void 0:e.frontend)==null?void 0:t.largeTiles)||!1},gridCols(){var e,t;return((t=(e=this.settings)==null?void 0:e.frontend)==null?void 0:t.gridCols)||8},gridRows(){var e,t;return((t=(e=this.settings)==null?void 0:e.frontend)==null?void 0:t.gridRows)||8}}}),_i={danger:"danger",dark:"dark",secondary:"secondary",success:"success"},ki={DarkBlue:"#050c2e",Black:"#000000",DarkGray:"#262626",LightBrown:"#583c0e",Brown:"#580e47",Red:"#2e0905"},yl={Disabled:"Disabled",Maintenance:"Maintenance",Offline:"Offline",Finding:"Finding",Disconnected:"Disconnected",Error:"Error",Paused:"Paused",Operational:"Operational",Printing:"Printing"};function cO(e,t,n){var f,h,g,m;const s=js().frontendDebugSettings.showInterpretedPrinterState,i={};if(!e.enabled)return(f=e.disabledReason)!=null&&f.length?{...i,color:_i.danger,rgb:ki.Black,text:yl.Maintenance}:{...i,color:_i.secondary,rgb:ki.DarkBlue,text:yl.Disabled};const o=(t==null?void 0:t.api)==="responding",a=(t==null?void 0:t.api)==="authFail";if(!o||!t){const y=(t==null?void 0:t.api)==="noResponse";return{...i,color:_i.secondary,rgb:ki.Red,text:a?"API key wrong":y?"API unreachable":(t==null?void 0:t.api)||"-"}}if(!o)return{...i,color:_i.danger,rgb:ki.Red,text:a?"API key wrong":"No API connection"};const l=t.socket==="authenticated",u=t.socket==="authenticating",c=(g=(h=n==null?void 0:n.current)==null?void 0:h.payload)==null?void 0:g.state,d=c==null?void 0:c.flags;if(!l||!d)return s&&console.debug(`Socket opened ${l?1:0}, socketAuthing ${u?1:0} printerState ${n?1:0},
|
|
61
|
+
currentState: ${c}, FLAGS ${d}`),{...i,color:_i.danger,rgb:ki.Red,text:n?"Awaiting state":"No USB"};if(!d){console.error("No flags",d);return}return d.error||d.closedOrError?{...i,color:_i.danger,rgb:ki.Red,text:((m=c.text)==null?void 0:m.replace("Offline","Disconnected"))||yl.Error,description:c.error}:d.paused||d.pausing?{...i,color:_i.success,rgb:ki.Brown,text:yl.Paused}:d.printing?{...i,color:_i.success,rgb:ki.LightBrown,text:yl.Printing}:{...i,color:_i.dark,rgb:ki.DarkGray,text:yl.Operational,description:c.error}}const Ha=e=>{var t,n;return(n=(t=e==null?void 0:e.current)==null?void 0:t.payload)==null?void 0:n.state},zq=e=>{var t;return(t=Ha(e))==null?void 0:t.flags.printing},Hq=(e,t)=>{var n,r,s;return!Lm(e)&&(e==null?void 0:e.enabled)&&!((n=Ha(t))!=null&&n.flags.operational)||((r=Ha(t))==null?void 0:r.flags.error)||((s=Ha(t))==null?void 0:s.flags.closedOrError)},dO=e=>!Lm(e)&&!(e!=null&&e.enabled),Lm=e=>{var t;return!(e!=null&&e.enabled)&&((t=e==null?void 0:e.disabledReason)==null?void 0:t.length)},jq=(e,t)=>{var n,r,s;return((n=Ha(t))==null?void 0:n.flags)&&!((r=Ha(t))!=null&&r.flags.printing)&&((s=Ha(t))==null?void 0:s.flags.operational)&&!dO(e)&&!Lm(e)},lr=Ss("PrinterState",{state:()=>({printerIds:[],printerEventsById:{},socketStatesById:{}}),getters:{operationalPrintersById(){const e=Xt(),t={};return this.printerIds.forEach(n=>{var s,i,o,a;const r=this.printerEventsById[n];if((a=(o=(i=(s=r==null?void 0:r.current)==null?void 0:s.payload)==null?void 0:i.state)==null?void 0:o.flags)!=null&&a.operational){const l=e.printer(n);if(l)t[n]=l;else throw new Error(`PrinterStore contains no printer with id ${n} but events are known`)}}),t},isPrinterOperational(){return e=>!!this.operationalPrintersById[e]},printingPrintersById(){const e={};return this.printerIds.forEach(t=>{var r,s,i,o;const n=this.printerEventsById[t];(o=(i=(s=(r=n==null?void 0:n.current)==null?void 0:r.payload)==null?void 0:s.state)==null?void 0:i.flags)!=null&&o.printing&&(e[t]=n)}),e},isPrinterPrinting(){return e=>!!this.printingPrintersById[e]},isPrinterStoppable(){return e=>{var r,s,i;const t=this.printerEventsById[e];if(!t)return!1;const n=(i=(s=(r=t==null?void 0:t.current)==null?void 0:r.payload)==null?void 0:s.state)==null?void 0:i.flags;return(n==null?void 0:n.printing)||(n==null?void 0:n.paused)||(n==null?void 0:n.pausing)}},isPrinterPaused(){return e=>{var r,s,i;const t=this.printerEventsById[e];if(!t)return!1;const n=(i=(s=(r=t==null?void 0:t.current)==null?void 0:r.payload)==null?void 0:s.state)==null?void 0:i.flags;return(n==null?void 0:n.paused)||(n==null?void 0:n.pausing)}},printerCurrentEventReceivedAtById(){const e={};return this.printerIds.forEach(t=>{var r;const n=this.printerEventsById[t];(r=n==null?void 0:n.current)!=null&&r.receivedAt&&(e[t]=n.current.receivedAt)}),e},onlinePrinters(){const e=Xt(),t={};return this.printerIds.forEach(n=>{const r=this.socketStatesById[n];if((r==null?void 0:r.api)==="responding"){const s=e.printer(n);if(s)t[n]=s;else throw new Error(`PrinterStore contains no printer with id ${n} but socket state is opened`)}}),t},onlinePrintersWithStates(){return Object.values(this.onlinePrinters).map(e=>({printer:e,printerState:this.printerEventsById[e.id]}))},printingCount(){const e=lr();return Object.values(e.onlinePrintersWithStates).filter(t=>zq(t.printerState)).length},operationalNotPrintingCount(){return this.onlinePrintersWithStates.filter(e=>jq(e.printer,e.printerState)).length},isApiResponding(){return e=>Object.keys(this.onlinePrinters).includes(e.toString())},isPrinterNotOnline(){return e=>!this.isApiResponding(e)},printerJobsById(){const e=Xt(),t=js().frontendDebugSettings.showJobsRendered,n={};return this.printerIds.forEach(r=>{var o,a,l,u;const s=this.printerEventsById[r],i=(l=(a=(o=s==null?void 0:s.current)==null?void 0:o.payload)==null?void 0:a.state)==null?void 0:l.flags;if(i!=null&&i.printing||i!=null&&i.paused||i!=null&&i.pausing){const c=e.printer(r);if(c)n[c.id]=(u=s==null?void 0:s.current)==null?void 0:u.payload;else throw new Error(`PrinterStore contains no printer with id ${r} but events are known`)}}),t&&console.debug("[PrinterStateStore] rendered printerJobsById",n),n},printersWithJob(){const e=Xt(),t=[];return this.printerIds.forEach(n=>{var i,o,a,l;const r=this.printerEventsById[n],s=(a=(o=(i=r==null?void 0:r.current)==null?void 0:i.payload)==null?void 0:o.state)==null?void 0:a.flags;if(s!=null&&s.printing||s!=null&&s.paused||s!=null&&s.pausing){const u=e.printer(n);if(u)t.push({printer:u,job:(l=r==null?void 0:r.current)==null?void 0:l.payload});else throw new Error(`PrinterStore contains no printer with id ${n} but events are known`)}}),t},printingFilePathsByPrinterId(){const e={};return this.printerIds.forEach(t=>{var s,i,o,a,l,u,c;const n=this.printerEventsById[t],r=(o=(i=(s=n==null?void 0:n.current)==null?void 0:s.payload)==null?void 0:i.state)==null?void 0:o.flags;(r!=null&&r.printing||r!=null&&r.paused||r!=null&&r.pausing)&&(e[t]=(c=(u=(l=(a=n==null?void 0:n.current)==null?void 0:a.payload)==null?void 0:l.job)==null?void 0:u.file)==null?void 0:c.path)}),e}},actions:{setSocketStates(e){this.socketStatesById=e,this.printerIds=Object.keys(e)},setPrinterEvents(e){this.printerEventsById=e},deletePrinterEvents(e){delete this.printerEventsById[e],this.printerIds=Object.keys(this.printerEventsById)},async selectAndPrintFile({printerId:e,fullPath:t}){if(!(!e||!Xt().printer(e))){if(this.isPrinterPrinting(e)){alert("This printer is printing or not connected! Either way printing is not an option.");return}await Hi.selectAndPrintFile(e,t,!0)}}}}),Xt=Ss("Printers",{state:()=>({printers:[],printerFileCache:{},sideNavPrinter:void 0,updateDialogPrinter:void 0,selectedPrinters:[],maintenanceDialogPrinter:void 0}),getters:{printer(){return e=>this.printers.find(t=>t.id==e)},isSelectedPrinter(e){return t=>!!e.selectedPrinters.find(n=>n.id===t)},printerFiles(){return e=>this.printerFileCache[e]},disabledCount(){return this.printers.filter(dO).length},disconnectedCount(){const e=lr();return this.printers.filter(t=>Hq(t,e.printerEventsById[t.id])).length},maintenanceCount(){return this.printers.filter(e=>Lm(e)).length}},actions:{async createPrinter(e,t){const n=await en.createPrinter(e,t);return this.printers.push(n),this.printers.sort((r,s)=>{var i,o,a;return(a=(i=r.name)==null?void 0:i.toLowerCase())!=null&&a.localeCompare((o=s==null?void 0:s.name)==null?void 0:o.toLowerCase())?1:-1}),n},toggleSelectedPrinter(e){const t=lr(),n=this.selectedPrinters.findIndex(r=>r.id==e.id);n===-1?t.isApiResponding(e.id)&&this.selectedPrinters.push(e):this.selectedPrinters.splice(n,1)},clearSelectedPrinters(){this.selectedPrinters=[]},setSideNavPrinter(e){this.sideNavPrinter=e},setUpdateDialogPrinter(e){this.updateDialogPrinter=e},setMaintenanceDialogPrinter(e){this.maintenanceDialogPrinter=e},async updatePrinter({printerId:e,updatedPrinter:t},n){const r=await en.updatePrinter(e,t,n);return this._replacePrinter({printerId:e,printer:r}),r},async loadPrinters(){const e=await en.getPrinters();return this.setPrinters(e),e},async deletePrinter(e){const t=await en.deletePrinter(e);return this._popPrinter(e),t},setPrinters(e){var n;if(!(e!=null&&e.length)){this.printers=[];return}const t=(n=this.sideNavPrinter)==null?void 0:n.id;t&&(this.sideNavPrinter=e.find(r=>r.id===t)),this.printers=e.sort((r,s)=>{var i,o,a;return(a=(i=r.name)==null?void 0:i.toLowerCase())!=null&&a.localeCompare((o=s==null?void 0:s.name)==null?void 0:o.toLowerCase())?1:-1})},_popPrinter(e){const t=this.printers.findIndex(n=>n.id===e);t!==-1?this.printers.splice(t,1):console.warn("Printer was not popped as it did not occur in state",e)},_replacePrinter({printerId:e,printer:t}){const n=this.printers.findIndex(r=>r.id===e);n!==-1?this.printers[n]=t:console.warn("Printer was not purged as it did not occur in state",e)},async deletePrinterFiles(e){if(!e)throw new Error("No printerId was provided");const t=await Hi.clearFiles(e);if(!(t!=null&&t.failedFiles))throw new Error("No failed files were returned");this.printerFileCache[e]&&(this.printerFileCache[e]=t.failedFiles)},async loadPrinterFiles(e){const t=await Hi.getFiles(e);return t.sort((n,r)=>n.date<r.date?1:-1),this.printerFileCache[e]=t,t},async deletePrinterFile(e,t){await Hi.deleteFileOrFolder(e,t);const n=this.printerFileCache[e];if(!(n!=null&&n.length)){console.warn("Printer file list was nonexistent",e);return}const r=n.findIndex(s=>s.path===t);return r!==-1?n.splice(r,1):console.warn("File was not purged as it did not occur in state",t),this.printerFiles(e)},async sendStopJobCommand(e){const t=lr();if(!e)return;const n=this.printer(e);if(!n)return;const r=t.isPrinterPrinting(e)?"The printer seems idle - do you want to command it to stop anyway?":"The printer is still printing - are you sure to stop it?";confirm(r)&&await za.stopPrintJob(n.id)}}}),Wq=he({...Ge(),...pt()},"VCardActions"),Bn=xe()({name:"VCardActions",props:Wq(),setup(e,t){let{slots:n}=t;return Br({VBtn:{slim:!0,variant:"text"}}),Me(()=>p(e.tag,{class:Re(["v-card-actions",e.class]),style:Be(e.style)},n)),{}}}),qq=he({opacity:[Number,String],...Ge(),...pt()},"VCardSubtitle"),$m=xe()({name:"VCardSubtitle",props:qq(),setup(e,t){let{slots:n}=t;return Me(()=>p(e.tag,{class:Re(["v-card-subtitle",e.class]),style:Be([{"--v-card-subtitle-opacity":e.opacity},e.style])},n)),{}}}),an=Au("v-card-title");function Gq(e){return{aspectStyles:M(()=>{const t=Number(e.aspectRatio);return t?{paddingBottom:String(1/t*100)+"%"}:void 0})}}const fO=he({aspectRatio:[String,Number],contentClass:null,inline:Boolean,...Ge(),...Sr()},"VResponsive"),Gk=xe()({name:"VResponsive",props:fO(),setup(e,t){let{slots:n}=t;const{aspectStyles:r}=Gq(e),{dimensionStyles:s}=_r(e);return Me(()=>{var i;return C("div",{class:Re(["v-responsive",{"v-responsive--inline":e.inline},e.class]),style:Be([s.value,e.style])},[C("div",{class:"v-responsive__sizer",style:Be(r.value)},null),(i=n.additional)==null?void 0:i.call(n),n.default&&C("div",{class:Re(["v-responsive__content",e.contentClass])},[n.default()])])}),{}}});function Kq(e,t){if(!r1)return;const n=t.modifiers||{},r=t.value,{handler:s,options:i}=typeof r=="object"?r:{handler:r,options:{}},o=new IntersectionObserver(function(){var d;let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],l=arguments.length>1?arguments[1]:void 0;const u=(d=e._observe)==null?void 0:d[t.instance.$.uid];if(!u)return;const c=a.some(f=>f.isIntersecting);s&&(!n.quiet||u.init)&&(!n.once||c||u.init)&&s(c,a,l),c&&n.once?hO(e,t):u.init=!0},i);e._observe=Object(e._observe),e._observe[t.instance.$.uid]={init:!1,observer:o},o.observe(e)}function hO(e,t){var r;const n=(r=e._observe)==null?void 0:r[t.instance.$.uid];n&&(n.observer.unobserve(e),delete e._observe[t.instance.$.uid])}const wu={mounted:Kq,unmounted:hO},Yq=he({absolute:Boolean,alt:String,cover:Boolean,color:String,draggable:{type:[Boolean,String],default:void 0},eager:Boolean,gradient:String,lazySrc:String,options:{type:Object,default:()=>({root:void 0,rootMargin:void 0,threshold:void 0})},sizes:String,src:{type:[String,Object],default:""},crossorigin:String,referrerpolicy:String,srcset:String,position:String,...fO(),...Ge(),...Un(),...Fu()},"VImg"),vs=xe()({name:"VImg",directives:{vIntersect:wu},props:Yq(),emits:{loadstart:e=>!0,load:e=>!0,error:e=>!0},setup(e,t){let{emit:n,slots:r}=t;const{backgroundColorClasses:s,backgroundColorStyles:i}=vr(()=>e.color),{roundedClasses:o}=Qn(e),a=fn("VImg"),l=Pe(""),u=K(),c=Pe(e.eager?"loading":"idle"),d=Pe(),f=Pe(),h=M(()=>e.src&&typeof e.src=="object"?{src:e.src.src,srcset:e.srcset||e.src.srcset,lazySrc:e.lazySrc||e.src.lazySrc,aspect:Number(e.aspectRatio||e.src.aspect||0)}:{src:e.src,srcset:e.srcset,lazySrc:e.lazySrc,aspect:Number(e.aspectRatio||0)}),g=M(()=>h.value.aspect||d.value/f.value||0);Ee(()=>e.src,()=>{m(c.value!=="idle")}),Ee(g,(O,H)=>{!O&&H&&u.value&&_(u.value)}),Pu(()=>m());function m(O){if(!(e.eager&&O)&&!(r1&&!O&&!e.eager)){if(c.value="loading",h.value.lazySrc){const H=new Image;H.src=h.value.lazySrc,_(H,null)}h.value.src&&Pt(()=>{var H;n("loadstart",((H=u.value)==null?void 0:H.currentSrc)||h.value.src),setTimeout(()=>{var N;if(!a.isUnmounted)if((N=u.value)!=null&&N.complete){if(u.value.naturalWidth||w(),c.value==="error")return;g.value||_(u.value,null),c.value==="loading"&&y()}else g.value||_(u.value),b()})})}}function y(){var O;a.isUnmounted||(b(),_(u.value),c.value="loaded",n("load",((O=u.value)==null?void 0:O.currentSrc)||h.value.src))}function w(){var O;a.isUnmounted||(c.value="error",n("error",((O=u.value)==null?void 0:O.currentSrc)||h.value.src))}function b(){const O=u.value;O&&(l.value=O.currentSrc||O.src)}let x=-1;Vn(()=>{clearTimeout(x)});function _(O){let H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:100;const N=()=>{if(clearTimeout(x),a.isUnmounted)return;const{naturalHeight:D,naturalWidth:W}=O;D||W?(d.value=W,f.value=D):!O.complete&&c.value==="loading"&&H!=null?x=window.setTimeout(N,H):(O.currentSrc.endsWith(".svg")||O.currentSrc.startsWith("data:image/svg+xml"))&&(d.value=1,f.value=1)};N()}const S=ie(()=>({"v-img__img--cover":e.cover,"v-img__img--contain":!e.cover})),P=()=>{var N;if(!h.value.src||c.value==="idle")return null;const O=C("img",{class:Re(["v-img__img",S.value]),style:{objectPosition:e.position},crossorigin:e.crossorigin,src:h.value.src,srcset:h.value.srcset,alt:e.alt,referrerpolicy:e.referrerpolicy,draggable:e.draggable,sizes:e.sizes,ref:u,onLoad:y,onError:w},null),H=(N=r.sources)==null?void 0:N.call(r);return p(ui,{transition:e.transition,appear:!0},{default:()=>[zt(H?C("picture",{class:"v-img__picture"},[H,O]):O,[[ro,c.value==="loaded"]])]})},A=()=>p(ui,{transition:e.transition},{default:()=>[h.value.lazySrc&&c.value!=="loaded"&&C("img",{class:Re(["v-img__img","v-img__img--preload",S.value]),style:{objectPosition:e.position},crossorigin:e.crossorigin,src:h.value.lazySrc,alt:e.alt,referrerpolicy:e.referrerpolicy,draggable:e.draggable},null)]}),E=()=>r.placeholder?p(ui,{transition:e.transition,appear:!0},{default:()=>[(c.value==="loading"||c.value==="error"&&!r.error)&&C("div",{class:"v-img__placeholder"},[r.placeholder()])]}):null,T=()=>r.error?p(ui,{transition:e.transition,appear:!0},{default:()=>[c.value==="error"&&C("div",{class:"v-img__error"},[r.error()])]}):null,R=()=>e.gradient?C("div",{class:"v-img__gradient",style:{backgroundImage:`linear-gradient(${e.gradient})`}},null):null,I=Pe(!1);{const O=Ee(g,H=>{H&&(requestAnimationFrame(()=>{requestAnimationFrame(()=>{I.value=!0})}),O())})}return Me(()=>{const O=Gk.filterProps(e);return zt(p(Gk,me({class:["v-img",{"v-img--absolute":e.absolute,"v-img--booting":!I.value},s.value,o.value,e.class],style:[{width:Ne(e.width==="auto"?d.value:e.width)},i.value,e.style]},O,{aspectRatio:g.value,"aria-label":e.alt,role:e.alt?"img":void 0}),{additional:()=>C(Oe,null,[p(P,null,null),p(A,null,null),p(R,null,null),p(E,null,null),p(T,null,null)]),default:r.default}),[[wu,{handler:m,options:e.options},null,{once:!0}]])}),{currentSrc:l,image:u,state:c,naturalWidth:d,naturalHeight:f}}}),Xq=he({start:Boolean,end:Boolean,icon:He,image:String,text:String,..._s(),...Ge(),...Xn(),...Un(),...Mu(),...pt(),...Nt(),...zs({variant:"flat"})},"VAvatar"),dt=xe()({name:"VAvatar",props:Xq(),setup(e,t){let{slots:n}=t;const{themeClasses:r}=tn(e),{borderClasses:s}=Vs(e),{colorClasses:i,colorStyles:o,variantClasses:a}=ol(e),{densityClasses:l}=ks(e),{roundedClasses:u}=Qn(e),{sizeClasses:c,sizeStyles:d}=jd(e);return Me(()=>p(e.tag,{class:Re(["v-avatar",{"v-avatar--start":e.start,"v-avatar--end":e.end},r.value,s.value,i.value,l.value,u.value,c.value,a.value,e.class]),style:Be([o.value,d.value,e.style])},{default:()=>[n.default?p($t,{key:"content-defaults",defaults:{VImg:{cover:!0,src:e.image},VIcon:{icon:e.icon}}},{default:()=>[n.default()]}):e.image?p(vs,{key:"image",src:e.image,alt:"",cover:!0},null):e.icon?p(Z,{key:"icon",icon:e.icon},null):e.text,Yo(!1,"v-avatar")]})),{}}}),Qq=he({appendAvatar:String,appendIcon:He,prependAvatar:String,prependIcon:He,subtitle:{type:[String,Number,Boolean],default:void 0},title:{type:[String,Number,Boolean],default:void 0},...Ge(),...Xn(),...pt()},"VCardItem"),Jq=xe()({name:"VCardItem",props:Qq(),setup(e,t){let{slots:n}=t;return Me(()=>{const r=!!(e.prependAvatar||e.prependIcon),s=!!(r||n.prepend),i=!!(e.appendAvatar||e.appendIcon),o=!!(i||n.append),a=!!(e.title!=null||n.title),l=!!(e.subtitle!=null||n.subtitle);return p(e.tag,{class:Re(["v-card-item",e.class]),style:Be(e.style)},{default:()=>{var u;return[s&&C("div",{key:"prepend",class:"v-card-item__prepend"},[n.prepend?p($t,{key:"prepend-defaults",disabled:!r,defaults:{VAvatar:{density:e.density,image:e.prependAvatar},VIcon:{density:e.density,icon:e.prependIcon}}},n.prepend):C(Oe,null,[e.prependAvatar&&p(dt,{key:"prepend-avatar",density:e.density,image:e.prependAvatar},null),e.prependIcon&&p(Z,{key:"prepend-icon",density:e.density,icon:e.prependIcon},null)])]),C("div",{class:"v-card-item__content"},[a&&p(an,{key:"title"},{default:()=>{var c;return[((c=n.title)==null?void 0:c.call(n))??se(e.title)]}}),l&&p($m,{key:"subtitle"},{default:()=>{var c;return[((c=n.subtitle)==null?void 0:c.call(n))??se(e.subtitle)]}}),(u=n.default)==null?void 0:u.call(n)]),o&&C("div",{key:"append",class:"v-card-item__append"},[n.append?p($t,{key:"append-defaults",disabled:!i,defaults:{VAvatar:{density:e.density,image:e.appendAvatar},VIcon:{density:e.density,icon:e.appendIcon}}},n.append):C(Oe,null,[e.appendIcon&&p(Z,{key:"append-icon",density:e.density,icon:e.appendIcon},null),e.appendAvatar&&p(dt,{key:"append-avatar",density:e.density,image:e.appendAvatar},null)])])]}})}),{}}}),Zq=he({opacity:[Number,String],...Ge(),...pt()},"VCardText"),nn=xe()({name:"VCardText",props:Zq(),setup(e,t){let{slots:n}=t;return Me(()=>p(e.tag,{class:Re(["v-card-text",e.class]),style:Be([{"--v-card-text-opacity":e.opacity},e.style])},n)),{}}}),e7=he({appendAvatar:String,appendIcon:He,disabled:Boolean,flat:Boolean,hover:Boolean,image:String,link:{type:Boolean,default:void 0},prependAvatar:String,prependIcon:He,ripple:{type:[Boolean,Object],default:!0},subtitle:{type:[String,Number,Boolean],default:void 0},text:{type:[String,Number,Boolean],default:void 0},title:{type:[String,Number,Boolean],default:void 0},..._s(),...Ge(),...Xn(),...Sr(),...xs(),...dm(),...Xo(),...Du(),...Un(),...pm(),...pt(),...Nt(),...zs({variant:"elevated"})},"VCard"),kt=xe()({name:"VCard",directives:{vRipple:Ns},props:e7(),setup(e,t){let{attrs:n,slots:r}=t;const{themeClasses:s}=tn(e),{borderClasses:i}=Vs(e),{colorClasses:o,colorStyles:a,variantClasses:l}=ol(e),{densityClasses:u}=ks(e),{dimensionStyles:c}=_r(e),{elevationClasses:d}=Us(e),{loaderClasses:f}=Wd(e),{locationStyles:h}=al(e),{positionClasses:g}=Lu(e),{roundedClasses:m}=Qn(e),y=hm(e,n);return Me(()=>{const w=e.link!==!1&&y.isLink.value,b=!e.disabled&&e.link!==!1&&(e.link||y.isClickable.value),x=w?"a":e.tag,_=!!(r.title||e.title!=null),S=!!(r.subtitle||e.subtitle!=null),P=_||S,A=!!(r.append||e.appendAvatar||e.appendIcon),E=!!(r.prepend||e.prependAvatar||e.prependIcon),T=!!(r.image||e.image),R=P||E||A,I=!!(r.text||e.text!=null);return zt(p(x,me(y.linkProps,{class:["v-card",{"v-card--disabled":e.disabled,"v-card--flat":e.flat,"v-card--hover":e.hover&&!(e.disabled||e.flat),"v-card--link":b},s.value,i.value,o.value,u.value,d.value,f.value,g.value,m.value,l.value,e.class],style:[a.value,c.value,h.value,e.style],onClick:b&&y.navigate,tabindex:e.disabled?-1:void 0}),{default:()=>{var O;return[T&&C("div",{key:"image",class:"v-card__image"},[r.image?p($t,{key:"image-defaults",disabled:!e.image,defaults:{VImg:{cover:!0,src:e.image}}},r.image):p(vs,{key:"image-img",cover:!0,src:e.image},null)]),p(fm,{name:"v-card",active:!!e.loading,color:typeof e.loading=="boolean"?void 0:e.loading},{default:r.loader}),R&&p(Jq,{key:"item",prependAvatar:e.prependAvatar,prependIcon:e.prependIcon,title:e.title,subtitle:e.subtitle,appendAvatar:e.appendAvatar,appendIcon:e.appendIcon},{default:r.item,prepend:r.prepend,title:r.title,subtitle:r.subtitle,append:r.append}),I&&p(nn,{key:"text"},{default:()=>{var H;return[((H=r.text)==null?void 0:H.call(r))??e.text]}}),(O=r.default)==null?void 0:O.call(r),r.actions&&p(Bn,null,{default:r.actions}),Yo(b,"v-card")]}}),[[Ns,b&&e.ripple]])}),{}}}),pO=Symbol.for("vuetify:goto");function mO(){return{container:void 0,duration:300,layout:!1,offset:0,easing:"easeInOutCubic",patterns:hN}}function t7(e){return h0(e)??(document.scrollingElement||document.body)}function h0(e){return typeof e=="string"?document.querySelector(e):i1(e)}function nv(e,t,n){if(typeof e=="number")return t&&n?-e:e;let r=h0(e),s=0;for(;r;)s+=t?r.offsetLeft:r.offsetTop,r=r.offsetParent;return s}function n7(e,t){return{rtl:t.isRtl,options:or(mO(),e)}}async function Kk(e,t,n,r){const s=n?"scrollLeft":"scrollTop",i=or((r==null?void 0:r.options)??mO(),t),o=r==null?void 0:r.rtl.value,a=(typeof e=="number"?e:h0(e))??0,l=i.container==="parent"&&a instanceof HTMLElement?a.parentElement:t7(i.container),u=Ka()?i.patterns.instant:typeof i.easing=="function"?i.easing:i.patterns[i.easing];if(!u)throw new TypeError(`Easing function "${i.easing}" not found.`);let c;if(typeof a=="number")c=nv(a,n,o);else if(c=nv(a,n,o)-nv(l,n,o),i.layout){const g=window.getComputedStyle(a).getPropertyValue("--v-layout-top");g&&(c-=parseInt(g,10))}c+=i.offset,c=s7(l,c,!!o,!!n);const d=l[s]??0;if(c===d)return Promise.resolve(c);const f=performance.now();return new Promise(h=>requestAnimationFrame(function g(m){const w=(m-f)/i.duration,b=Math.floor(d+(c-d)*u(Nn(w,0,1)));if(l[s]=b,w>=1&&Math.abs(b-l[s])<10)return h(c);if(w>2)return h(l[s]);requestAnimationFrame(g)}))}function r7(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=Je(pO),{isRtl:n}=Hr();if(!t)throw new Error("[Vuetify] Could not find injected goto instance");const r={...t,rtl:ie(()=>t.rtl.value||n.value)};async function s(i,o){return Kk(i,or(e,o),!1,r)}return s.horizontal=async(i,o)=>Kk(i,or(e,o),!0,r),s}function s7(e,t,n,r){const{scrollWidth:s,scrollHeight:i}=e,[o,a]=e===document.scrollingElement?[window.innerWidth,window.innerHeight]:[e.offsetWidth,e.offsetHeight];let l,u;return r?n?(l=-(s-o),u=0):(l=0,u=s-o):(l=0,u=i+-a),Nn(t,l,u)}function i7(e){let{selectedElement:t,containerElement:n,isRtl:r,isHorizontal:s}=e;const i=gd(s,n),o=gO(s,r,n),a=gd(s,t),l=vO(s,t),u=a*.4;return o>l?l-u:o+i<l+a?l-i+a+u:o}function o7(e){let{selectedElement:t,containerElement:n,isHorizontal:r}=e;const s=gd(r,n),i=vO(r,t),o=gd(r,t);return i-s/2+o/2}function Yk(e,t){const n=e?"scrollWidth":"scrollHeight";return(t==null?void 0:t[n])||0}function a7(e,t){const n=e?"clientWidth":"clientHeight";return(t==null?void 0:t[n])||0}function gO(e,t,n){if(!n)return 0;const{scrollLeft:r,offsetWidth:s,scrollWidth:i}=n;return e?t?i-s+r:r:n.scrollTop}function gd(e,t){const n=e?"offsetWidth":"offsetHeight";return(t==null?void 0:t[n])||0}function vO(e,t){const n=e?"offsetLeft":"offsetTop";return(t==null?void 0:t[n])||0}const yO=Symbol.for("vuetify:v-slide-group"),bO=he({centerActive:Boolean,contentClass:null,direction:{type:String,default:"horizontal"},symbol:{type:null,default:yO},nextIcon:{type:He,default:"$next"},prevIcon:{type:He,default:"$prev"},showArrows:{type:[Boolean,String],validator:e=>typeof e=="boolean"||["always","desktop","mobile"].includes(e)},...Ge(),...ll({mobile:null}),...pt(),...zd({selectedClass:"v-slide-group-item--active"})},"VSlideGroup"),Xk=xe()({name:"VSlideGroup",props:bO(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{isRtl:r}=Hr(),{displayClasses:s,mobile:i}=vi(e),o=Ou(e,e.symbol),a=Pe(!1),l=Pe(0),u=Pe(0),c=Pe(0),d=M(()=>e.direction==="horizontal"),{resizeRef:f,contentRect:h}=Uo(),{resizeRef:g,contentRect:m}=Uo(),y=r7(),w=M(()=>({container:f.el,duration:200,easing:"easeOutQuart"})),b=M(()=>o.selected.value.length?o.items.value.findIndex(j=>j.id===o.selected.value[0]):-1),x=M(()=>o.selected.value.length?o.items.value.findIndex(j=>j.id===o.selected.value[o.selected.value.length-1]):-1);if(Ot){let j=-1;Ee(()=>[o.selected.value,h.value,m.value,d.value],()=>{cancelAnimationFrame(j),j=requestAnimationFrame(()=>{if(h.value&&m.value){const F=d.value?"width":"height";u.value=h.value[F],c.value=m.value[F],a.value=u.value+1<c.value}if(b.value>=0&&g.el){const F=g.el.children[x.value];S(F,e.centerActive)}})})}const _=Pe(!1);function S(j,F){let re=0;F?re=o7({containerElement:f.el,isHorizontal:d.value,selectedElement:j}):re=i7({containerElement:f.el,isHorizontal:d.value,isRtl:r.value,selectedElement:j}),P(re)}function P(j){if(!Ot||!f.el)return;const F=gd(d.value,f.el),re=gO(d.value,r.value,f.el);if(!(Yk(d.value,f.el)<=F||Math.abs(j-re)<16)){if(d.value&&r.value&&f.el){const{scrollWidth:Se,offsetWidth:X}=f.el;j=Se-X-j}d.value?y.horizontal(j,w.value):y(j,w.value)}}function A(j){const{scrollTop:F,scrollLeft:re}=j.target;l.value=d.value?re:F}function E(j){if(_.value=!0,!(!a.value||!g.el)){for(const F of j.composedPath())for(const re of g.el.children)if(re===F){S(re);return}}}function T(j){_.value=!1}let R=!1;function I(j){var F;!R&&!_.value&&!(j.relatedTarget&&((F=g.el)!=null&&F.contains(j.relatedTarget)))&&D(),R=!1}function O(){R=!0}function H(j){if(!g.el)return;function F(re){j.preventDefault(),D(re)}d.value?j.key==="ArrowRight"?F(r.value?"prev":"next"):j.key==="ArrowLeft"&&F(r.value?"next":"prev"):j.key==="ArrowDown"?F("next"):j.key==="ArrowUp"&&F("prev"),j.key==="Home"?F("first"):j.key==="End"&&F("last")}function N(j,F){if(!j)return;let re=j;do re=re==null?void 0:re[F==="next"?"nextElementSibling":"previousElementSibling"];while(re!=null&&re.hasAttribute("disabled"));return re}function D(j){if(!g.el)return;let F;if(!j)F=ou(g.el)[0];else if(j==="next"){if(F=N(g.el.querySelector(":focus"),j),!F)return D("first")}else if(j==="prev"){if(F=N(g.el.querySelector(":focus"),j),!F)return D("last")}else j==="first"?(F=g.el.firstElementChild,F!=null&&F.hasAttribute("disabled")&&(F=N(F,"next"))):j==="last"&&(F=g.el.lastElementChild,F!=null&&F.hasAttribute("disabled")&&(F=N(F,"prev")));F&&F.focus({preventScroll:!0})}function W(j){const F=d.value&&r.value?-1:1,re=(j==="prev"?-F:F)*u.value;let ae=l.value+re;if(d.value&&r.value&&f.el){const{scrollWidth:Se,offsetWidth:X}=f.el;ae+=Se-X}P(ae)}const U=M(()=>({next:o.next,prev:o.prev,select:o.select,isSelected:o.isSelected})),Q=M(()=>a.value||Math.abs(l.value)>0),V=M(()=>{switch(e.showArrows){case"always":return!0;case"desktop":return!i.value;case!0:return Q.value;case"mobile":return i.value||Q.value;default:return!i.value&&Q.value}}),L=M(()=>Math.abs(l.value)>1),oe=M(()=>{if(!f.value||!Q.value)return!1;const j=Yk(d.value,f.el),F=a7(d.value,f.el);return j-F-Math.abs(l.value)>1});return Me(()=>p(e.tag,{class:Re(["v-slide-group",{"v-slide-group--vertical":!d.value,"v-slide-group--has-affixes":V.value,"v-slide-group--is-overflowing":a.value},s.value,e.class]),style:Be(e.style),tabindex:_.value||o.selected.value.length?-1:0,onFocus:I},{default:()=>{var j,F,re;return[V.value&&C("div",{key:"prev",class:Re(["v-slide-group__prev",{"v-slide-group__prev--disabled":!L.value}]),onMousedown:O,onClick:()=>L.value&&W("prev")},[((j=n.prev)==null?void 0:j.call(n,U.value))??p(zS,null,{default:()=>[p(Z,{icon:r.value?e.nextIcon:e.prevIcon},null)]})]),C("div",{key:"container",ref:f,class:Re(["v-slide-group__container",e.contentClass]),onScroll:A},[C("div",{ref:g,class:"v-slide-group__content",onFocusin:E,onFocusout:T,onKeydown:H},[(F=n.default)==null?void 0:F.call(n,U.value)])]),V.value&&C("div",{key:"next",class:Re(["v-slide-group__next",{"v-slide-group__next--disabled":!oe.value}]),onMousedown:O,onClick:()=>oe.value&&W("next")},[((re=n.next)==null?void 0:re.call(n,U.value))??p(zS,null,{default:()=>[p(Z,{icon:r.value?e.prevIcon:e.nextIcon},null)]})])]}})),{selected:o.selected,scrollTo:W,scrollOffset:l,focus:D,hasPrev:L,hasNext:oe}}}),wO=Symbol.for("vuetify:v-chip-group"),l7=he({baseColor:String,column:Boolean,filter:Boolean,valueComparator:{type:Function,default:Dr},...bO(),...Ge(),...zd({selectedClass:"v-chip--selected"}),...pt(),...Nt(),...zs({variant:"tonal"})},"VChipGroup"),Tp=xe()({name:"VChipGroup",props:l7(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{themeClasses:r}=tn(e),{isSelected:s,select:i,next:o,prev:a,selected:l}=Ou(e,wO);return Br({VChip:{baseColor:ie(()=>e.baseColor),color:ie(()=>e.color),disabled:ie(()=>e.disabled),filter:ie(()=>e.filter),variant:ie(()=>e.variant)}}),Me(()=>{const u=Xk.filterProps(e);return p(Xk,me(u,{class:["v-chip-group",{"v-chip-group--column":e.column},r.value,e.class],style:e.style}),{default:()=>{var c;return[(c=n.default)==null?void 0:c.call(n,{isSelected:s,select:i,next:o,prev:a,selected:l.value})]}})}),{}}}),u7=he({activeClass:String,appendAvatar:String,appendIcon:He,baseColor:String,closable:Boolean,closeIcon:{type:He,default:"$delete"},closeLabel:{type:String,default:"$vuetify.close"},draggable:Boolean,filter:Boolean,filterIcon:{type:He,default:"$complete"},label:Boolean,link:{type:Boolean,default:void 0},pill:Boolean,prependAvatar:String,prependIcon:He,ripple:{type:[Boolean,Object],default:!0},text:{type:[String,Number,Boolean],default:void 0},modelValue:{type:Boolean,default:!0},onClick:Gn(),onClickOnce:Gn(),..._s(),...Ge(),...Xn(),...xs(),...Hd(),...Un(),...pm(),...Mu(),...pt({tag:"span"}),...Nt(),...zs({variant:"tonal"})},"VChip"),In=xe()({name:"VChip",directives:{vRipple:Ns},props:u7(),emits:{"click:close":e=>!0,"update:modelValue":e=>!0,"group:selected":e=>!0,click:e=>!0},setup(e,t){let{attrs:n,emit:r,slots:s}=t;const{t:i}=zr(),{borderClasses:o}=Vs(e),{densityClasses:a}=ks(e),{elevationClasses:l}=Us(e),{roundedClasses:u}=Qn(e),{sizeClasses:c}=jd(e),{themeClasses:d}=tn(e),f=lt(e,"modelValue"),h=lu(e,wO,!1),g=lu(e,yO,!1),m=hm(e,n),y=ie(()=>e.link!==!1&&m.isLink.value),w=M(()=>!e.disabled&&e.link!==!1&&(!!h||e.link||m.isClickable.value)),b=ie(()=>({"aria-label":i(e.closeLabel),disabled:e.disabled,onClick(E){E.preventDefault(),E.stopPropagation(),f.value=!1,r("click:close",E)}}));Ee(f,E=>{E?(h==null||h.register(),g==null||g.register()):(h==null||h.unregister(),g==null||g.unregister())});const{colorClasses:x,colorStyles:_,variantClasses:S}=ol(()=>({color:!h||h.isSelected.value?e.color??e.baseColor:e.baseColor,variant:e.variant}));function P(E){var T;r("click",E),w.value&&((T=m.navigate)==null||T.call(m,E),h==null||h.toggle())}function A(E){(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),P(E))}return()=>{var D;const E=m.isLink.value?"a":e.tag,T=!!(e.appendIcon||e.appendAvatar),R=!!(T||s.append),I=!!(s.close||e.closable),O=!!(s.filter||e.filter)&&h,H=!!(e.prependIcon||e.prependAvatar),N=!!(H||s.prepend);return f.value&&zt(p(E,me(m.linkProps,{class:["v-chip",{"v-chip--disabled":e.disabled,"v-chip--label":e.label,"v-chip--link":w.value,"v-chip--filter":O,"v-chip--pill":e.pill,[`${e.activeClass}`]:e.activeClass&&((D=m.isActive)==null?void 0:D.value)},d.value,o.value,x.value,a.value,l.value,u.value,c.value,S.value,h==null?void 0:h.selectedClass.value,e.class],style:[_.value,e.style],disabled:e.disabled||void 0,draggable:e.draggable,tabindex:w.value?0:void 0,onClick:P,onKeydown:w.value&&!y.value&&A}),{default:()=>{var W;return[Yo(w.value,"v-chip"),O&&p(rR,{key:"filter"},{default:()=>[zt(C("div",{class:"v-chip__filter"},[s.filter?p($t,{key:"filter-defaults",disabled:!e.filterIcon,defaults:{VIcon:{icon:e.filterIcon}}},s.filter):p(Z,{key:"filter-icon",icon:e.filterIcon},null)]),[[ro,h.isSelected.value]])]}),N&&C("div",{key:"prepend",class:"v-chip__prepend"},[s.prepend?p($t,{key:"prepend-defaults",disabled:!H,defaults:{VAvatar:{image:e.prependAvatar,start:!0},VIcon:{icon:e.prependIcon,start:!0}}},s.prepend):C(Oe,null,[e.prependIcon&&p(Z,{key:"prepend-icon",icon:e.prependIcon,start:!0},null),e.prependAvatar&&p(dt,{key:"prepend-avatar",image:e.prependAvatar,start:!0},null)])]),C("div",{class:"v-chip__content","data-no-activator":""},[((W=s.default)==null?void 0:W.call(s,{isSelected:h==null?void 0:h.isSelected.value,selectedClass:h==null?void 0:h.selectedClass.value,select:h==null?void 0:h.select,toggle:h==null?void 0:h.toggle,value:h==null?void 0:h.value.value,disabled:e.disabled}))??se(e.text)]),R&&C("div",{key:"append",class:"v-chip__append"},[s.append?p($t,{key:"append-defaults",disabled:!T,defaults:{VAvatar:{end:!0,image:e.appendAvatar},VIcon:{end:!0,icon:e.appendIcon}}},s.append):C(Oe,null,[e.appendIcon&&p(Z,{key:"append-icon",end:!0,icon:e.appendIcon},null),e.appendAvatar&&p(dt,{key:"append-avatar",end:!0,image:e.appendAvatar},null)])]),I&&C("button",me({key:"close",class:"v-chip__close",type:"button","data-testid":"close-chip"},b.value),[s.close?p($t,{key:"close-defaults",defaults:{VIcon:{icon:e.closeIcon,size:"x-small"}}},s.close):p(Z,{key:"close-icon",icon:e.closeIcon,size:"x-small"},null)])]}}),[[Ns,w.value&&e.ripple,null]])}}}),c7=he({fluid:{type:Boolean,default:!1},...Ge(),...Sr(),...pt()},"VContainer"),Yn=xe()({name:"VContainer",props:c7(),setup(e,t){let{slots:n}=t;const{rtlClasses:r}=Hr(),{dimensionStyles:s}=_r(e);return Me(()=>p(e.tag,{class:Re(["v-container",{"v-container--fluid":e.fluid},r.value,e.class]),style:Be([s.value,e.style])},n)),{}}}),SO=mm.reduce((e,t)=>(e[t]={type:[Boolean,String,Number],default:!1},e),{}),_O=mm.reduce((e,t)=>{const n="offset"+mi(t);return e[n]={type:[String,Number],default:null},e},{}),kO=mm.reduce((e,t)=>{const n="order"+mi(t);return e[n]={type:[String,Number],default:null},e},{}),Qk={col:Object.keys(SO),offset:Object.keys(_O),order:Object.keys(kO)};function d7(e,t,n){let r=e;if(!(n==null||n===!1)){if(t){const s=t.replace(e,"");r+=`-${s}`}return e==="col"&&(r="v-"+r),e==="col"&&(n===""||n===!0)||(r+=`-${n}`),r.toLowerCase()}}const f7=["auto","start","end","center","baseline","stretch"],h7=he({cols:{type:[Boolean,String,Number],default:!1},...SO,offset:{type:[String,Number],default:null},..._O,order:{type:[String,Number],default:null},...kO,alignSelf:{type:String,default:null,validator:e=>f7.includes(e)},...Ge(),...pt()},"VCol"),We=xe()({name:"VCol",props:h7(),setup(e,t){let{slots:n}=t;const r=M(()=>{const s=[];let i;for(i in Qk)Qk[i].forEach(a=>{const l=e[a],u=d7(i,a,l);u&&s.push(u)});const o=s.some(a=>a.startsWith("v-col-"));return s.push({"v-col":!o||!e.cols,[`v-col-${e.cols}`]:e.cols,[`offset-${e.offset}`]:e.offset,[`order-${e.order}`]:e.order,[`align-self-${e.alignSelf}`]:e.alignSelf}),s});return()=>{var s;return br(e.tag,{class:[r.value,e.class],style:e.style},(s=n.default)==null?void 0:s.call(n))}}}),p0=["start","end","center"],xO=["space-between","space-around","space-evenly"];function m0(e,t){return mm.reduce((n,r)=>{const s=e+mi(r);return n[s]=t(),n},{})}const p7=[...p0,"baseline","stretch"],EO=e=>p7.includes(e),CO=m0("align",()=>({type:String,default:null,validator:EO})),m7=[...p0,...xO],TO=e=>m7.includes(e),PO=m0("justify",()=>({type:String,default:null,validator:TO})),g7=[...p0,...xO,"stretch"],RO=e=>g7.includes(e),IO=m0("alignContent",()=>({type:String,default:null,validator:RO})),Jk={align:Object.keys(CO),justify:Object.keys(PO),alignContent:Object.keys(IO)},v7={align:"align",justify:"justify",alignContent:"align-content"};function y7(e,t,n){let r=v7[e];if(n!=null){if(t){const s=t.replace(e,"");r+=`-${s}`}return r+=`-${n}`,r.toLowerCase()}}const b7=he({dense:Boolean,noGutters:Boolean,align:{type:String,default:null,validator:EO},...CO,justify:{type:String,default:null,validator:TO},...PO,alignContent:{type:String,default:null,validator:RO},...IO,...Ge(),...pt()},"VRow"),st=xe()({name:"VRow",props:b7(),setup(e,t){let{slots:n}=t;const r=M(()=>{const s=[];let i;for(i in Jk)Jk[i].forEach(o=>{const a=e[o],l=y7(i,o,a);l&&s.push(l)});return s.push({"v-row--no-gutters":e.noGutters,"v-row--dense":e.dense,[`align-${e.align}`]:e.align,[`justify-${e.justify}`]:e.justify,[`align-content-${e.alignContent}`]:e.alignContent}),s});return()=>{var s;return br(e.tag,{class:["v-row",r.value,e.class],style:e.style},(s=n.default)==null?void 0:s.call(n))}}}),Tn=Au("v-spacer","div","VSpacer"),w7=Fe({__name:"PrinterControlDialog",setup(e){const t=rn(sn.PrinterControlDialog),n=Xt(),r=lr(),s=M(()=>{var d;return(d=t.context())==null?void 0:d.printerId}),i=M(()=>{if(s.value)return n.printer(s.value)}),o=K(10),a=M(()=>{var f,h,g,m,y,w,b,x,_,S;const d=r.printerEventsById[s.value];return(g=(h=(f=d==null?void 0:d.current)==null?void 0:f.payload)==null?void 0:h.temps)!=null&&g.length&&((b=(w=(y=(m=d==null?void 0:d.current)==null?void 0:m.payload)==null?void 0:y.temps[0])==null?void 0:w.tool0)!=null&&b.actual)?(S=(_=(x=d==null?void 0:d.current)==null?void 0:x.payload)==null?void 0:_.temps[0])==null?void 0:S.tool0:null}),l=async(d,f,h)=>{await en.sendPrinterJogCommand(s.value,{x:d*o.value,y:f*o.value,z:h*o.value})},u=async d=>{await en.sendPrinterHomeCommand(s.value,d)},c=()=>{t.closeDialog()};return(d,f)=>{const h=yi;return $(),te(h,{id:J(t).dialogId,"max-width":"700px",onEscape:f[14]||(f[14]=g=>c())},{default:v(()=>[p(kt,null,{default:v(()=>[p(an,null,{default:v(()=>[...f[15]||(f[15]=[k(" Printer Controls ",-1)])]),_:1}),p(nn,null,{default:v(()=>[i.value?($(),te(Yn,{key:0},{default:v(()=>[p(st,null,{default:v(()=>[p(We,{cols:12},{default:v(()=>{var g;return[k(" Printer: "+se((g=i.value)==null?void 0:g.name)+" ",1),f[16]||(f[16]=C("br",null,null,-1)),p(In,{color:"primary"},{default:v(()=>{var m,y;return[k(se((m=a.value)==null?void 0:m.actual)+"C / "+se((y=a.value)==null?void 0:y.target)+"C ",1)]}),_:1})]}),_:1})]),_:1}),p(st,null,{default:v(()=>[p(We,{cols:8},{default:v(()=>[f[26]||(f[26]=k(" X/Y ",-1)),f[27]||(f[27]=C("br",null,null,-1)),p(ne,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[0]||(f[0]=g=>l(-1,1,0))},{default:v(()=>[p(Z,null,{default:v(()=>[...f[17]||(f[17]=[k("north_west",-1)])]),_:1})]),_:1}),p(ne,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[1]||(f[1]=g=>l(0,1,0))},{default:v(()=>[p(Z,null,{default:v(()=>[...f[18]||(f[18]=[k("north",-1)])]),_:1})]),_:1}),p(ne,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[2]||(f[2]=g=>l(1,1,0))},{default:v(()=>[p(Z,null,{default:v(()=>[...f[19]||(f[19]=[k("north_east",-1)])]),_:1})]),_:1}),f[28]||(f[28]=C("br",null,null,-1)),p(ne,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[3]||(f[3]=g=>l(-1,0,0))},{default:v(()=>[p(Z,null,{default:v(()=>[...f[20]||(f[20]=[k("west",-1)])]),_:1})]),_:1}),p(ne,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[4]||(f[4]=g=>u(["x","y"]))},{default:v(()=>[p(Z,null,{default:v(()=>[...f[21]||(f[21]=[k("home",-1)])]),_:1})]),_:1}),p(ne,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[5]||(f[5]=g=>l(1,0,0))},{default:v(()=>[p(Z,null,{default:v(()=>[...f[22]||(f[22]=[k("east",-1)])]),_:1})]),_:1}),f[29]||(f[29]=C("br",null,null,-1)),p(ne,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[6]||(f[6]=g=>l(-1,-1,0))},{default:v(()=>[p(Z,null,{default:v(()=>[...f[23]||(f[23]=[k("south_west",-1)])]),_:1})]),_:1}),p(ne,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[7]||(f[7]=g=>l(0,-1,0))},{default:v(()=>[p(Z,null,{default:v(()=>[...f[24]||(f[24]=[k("south",-1)])]),_:1})]),_:1}),p(ne,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[8]||(f[8]=g=>l(1,-1,0))},{default:v(()=>[p(Z,null,{default:v(()=>[...f[25]||(f[25]=[k("south_east",-1)])]),_:1})]),_:1})]),_:1}),p(We,{cols:"4"},{default:v(()=>[f[33]||(f[33]=k(" Z ",-1)),f[34]||(f[34]=C("br",null,null,-1)),p(ne,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[9]||(f[9]=g=>l(0,0,1))},{default:v(()=>[p(Z,null,{default:v(()=>[...f[30]||(f[30]=[k("north",-1)])]),_:1})]),_:1}),f[35]||(f[35]=C("br",null,null,-1)),p(ne,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[10]||(f[10]=g=>u(["z"]))},{default:v(()=>[p(Z,null,{default:v(()=>[...f[31]||(f[31]=[k("home",-1)])]),_:1})]),_:1}),f[36]||(f[36]=C("br",null,null,-1)),p(ne,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[11]||(f[11]=g=>l(1,0,1))},{default:v(()=>[p(Z,null,{default:v(()=>[...f[32]||(f[32]=[k("south",-1)])]),_:1})]),_:1})]),_:1})]),_:1}),p(st,null,{default:v(()=>[p(We,{cols:"12"},{default:v(()=>[p(FP,{modelValue:o.value,"onUpdate:modelValue":f[12]||(f[12]=g=>o.value=g)},{default:v(()=>[p(ne,{value:.1},{default:v(()=>[...f[37]||(f[37]=[k(" 0.1 ",-1)])]),_:1}),p(ne,{value:1},{default:v(()=>[...f[38]||(f[38]=[k(" 1 ",-1)])]),_:1}),p(ne,{value:10},{default:v(()=>[...f[39]||(f[39]=[k(" 10 ",-1)])]),_:1}),p(ne,{value:100},{default:v(()=>[...f[40]||(f[40]=[k(" 100 ",-1)])]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1})):pe("",!0)]),_:1}),p(Bn,null,{default:v(()=>[p(Tn),p(ne,{variant:"text",onClick:f[13]||(f[13]=g=>c())},{default:v(()=>[...f[41]||(f[41]=[k(" Close ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}});class $l extends kr{static async batchSettingsGet(t){return await this.post("/api/batch/settings/get",{printerIds:t})}static async batchConnectUsb(t){return await this.post("/api/batch/connect/usb",{printerIds:t})}static async batchConnectSocket(t){return await this.post("/api/batch/connect/socket",{printerIds:t})}static async batchToggleEnabled(t,n){return await this.post("/api/batch/toggle-enabled",{printerIds:t,enabled:n})}static async batchGetLastPrintedFiles(t){const n=$e.batchGetLastPrintedFilesRoute;return await this.post(n,{printerIds:t})}static async batchReprintFiles(t){const n=$e.batchReprintFilesRoute;return await this.post(n,{prints:t})}}var pa=(e=>(e[e.PrinterNotAvailable=0]="PrinterNotAvailable",e[e.NoLastPrint=1]="NoLastPrint",e[e.LastPrintReady=2]="LastPrintReady",e))(pa||{});function S7(e){return e.message?`${e.message}
|
|
62
|
+
${e.stack}`:`'${e}'`}const _7=Au("v-alert-title"),k7=he({iconSize:[Number,String],iconSizes:{type:Array,default:()=>[["x-small",10],["small",16],["default",24],["large",28],["x-large",32]]}},"iconSize");function x7(e,t){return{iconSize:M(()=>{const r=new Map(e.iconSizes),s=e.iconSize??t()??"default";return r.has(s)?r.get(s):s})}}const E7=["success","info","warning","error"],C7=he({border:{type:[Boolean,String],validator:e=>typeof e=="boolean"||["top","end","bottom","start"].includes(e)},borderColor:String,closable:Boolean,closeIcon:{type:He,default:"$close"},closeLabel:{type:String,default:"$vuetify.close"},icon:{type:[Boolean,String,Function,Object],default:null},modelValue:{type:Boolean,default:!0},prominent:Boolean,title:String,text:String,type:{type:String,validator:e=>E7.includes(e)},...Ge(),...Xn(),...Sr(),...xs(),...k7(),...Xo(),...Du(),...Un(),...pt(),...Nt(),...zs({variant:"flat"})},"VAlert"),vn=xe()({name:"VAlert",props:C7(),emits:{"click:close":e=>!0,"update:modelValue":e=>!0},setup(e,t){let{emit:n,slots:r}=t;const s=lt(e,"modelValue"),i=ie(()=>{if(e.icon!==!1)return e.type?e.icon??`$${e.type}`:e.icon}),{iconSize:o}=x7(e,()=>e.prominent?44:void 0),{themeClasses:a}=tn(e),{colorClasses:l,colorStyles:u,variantClasses:c}=ol(()=>({color:e.color??e.type,variant:e.variant})),{densityClasses:d}=ks(e),{dimensionStyles:f}=_r(e),{elevationClasses:h}=Us(e),{locationStyles:g}=al(e),{positionClasses:m}=Lu(e),{roundedClasses:y}=Qn(e),{textColorClasses:w,textColorStyles:b}=Fs(()=>e.borderColor),{t:x}=zr(),_=ie(()=>({"aria-label":x(e.closeLabel),onClick(S){s.value=!1,n("click:close",S)}}));return()=>{const S=!!(r.prepend||i.value),P=!!(r.title||e.title),A=!!(r.close||e.closable),E={density:e.density,icon:i.value,size:e.iconSize||e.prominent?o.value:void 0};return s.value&&p(e.tag,{class:Re(["v-alert",e.border&&{"v-alert--border":!!e.border,[`v-alert--border-${e.border===!0?"start":e.border}`]:!0},{"v-alert--prominent":e.prominent},a.value,l.value,d.value,h.value,m.value,y.value,c.value,e.class]),style:Be([u.value,f.value,g.value,e.style]),role:"alert"},{default:()=>{var T,R;return[Yo(!1,"v-alert"),e.border&&C("div",{key:"border",class:Re(["v-alert__border",w.value]),style:Be(b.value)},null),S&&C("div",{key:"prepend",class:"v-alert__prepend"},[r.prepend?p($t,{key:"prepend-defaults",disabled:!i.value,defaults:{VIcon:{...E}}},r.prepend):p(Z,me({key:"prepend-icon"},E),null)]),C("div",{class:"v-alert__content"},[P&&p(_7,{key:"title"},{default:()=>{var I;return[((I=r.title)==null?void 0:I.call(r))??e.title]}}),((T=r.text)==null?void 0:T.call(r))??e.text,(R=r.default)==null?void 0:R.call(r)]),r.append&&C("div",{key:"append",class:"v-alert__append"},[r.append()]),A&&C("div",{key:"close",class:"v-alert__close"},[r.close?p($t,{key:"close-defaults",defaults:{VBtn:{icon:e.closeIcon,size:"x-small",variant:"text"}}},{default:()=>{var I;return[(I=r.close)==null?void 0:I.call(r,{props:_.value})]}}):p(ne,me({key:"close-btn",icon:e.closeIcon,size:"x-small",variant:"text"},_.value),null)])]}})}}}),Wy=Symbol.for("vuetify:list");function AO(){let{filterable:e}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{filterable:!1};const t=Je(Wy,{filterable:!1,hasPrepend:Pe(!1),updateHasPrepend:()=>null}),n={filterable:t.filterable||e,hasPrepend:Pe(!1),updateHasPrepend:r=>{r&&(n.hasPrepend.value=r)}};return Jt(Wy,n),t}function OO(){return Je(Wy,null)}const g0=e=>{const t={activate:n=>{let{id:r,value:s,activated:i}=n;return r=Ue(r),e&&!s&&i.size===1&&i.has(r)||(s?i.add(r):i.delete(r)),i},in:(n,r,s)=>{let i=new Set;if(n!=null)for(const o of Fn(n))i=t.activate({id:o,value:!0,activated:new Set(i),children:r,parents:s});return i},out:n=>Array.from(n)};return t},MO=e=>{const t=g0(e);return{activate:r=>{let{activated:s,id:i,...o}=r;i=Ue(i);const a=s.has(i)?new Set([i]):new Set;return t.activate({...o,id:i,activated:a})},in:(r,s,i)=>{let o=new Set;if(r!=null){const a=Fn(r);a.length&&(o=t.in(a.slice(0,1),s,i))}return o},out:(r,s,i)=>t.out(r,s,i)}},T7=e=>{const t=g0(e);return{activate:r=>{let{id:s,activated:i,children:o,...a}=r;return s=Ue(s),o.has(s)?i:t.activate({id:s,activated:i,children:o,...a})},in:t.in,out:t.out}},P7=e=>{const t=MO(e);return{activate:r=>{let{id:s,activated:i,children:o,...a}=r;return s=Ue(s),o.has(s)?i:t.activate({id:s,activated:i,children:o,...a})},in:t.in,out:t.out}},R7={open:e=>{let{id:t,value:n,opened:r,parents:s}=e;if(n){const i=new Set;i.add(t);let o=s.get(t);for(;o!=null;)i.add(o),o=s.get(o);return i}else return r.delete(t),r},select:()=>null},DO={open:e=>{let{id:t,value:n,opened:r,parents:s}=e;if(n){let i=s.get(t);for(r.add(t);i!=null&&i!==t;)r.add(i),i=s.get(i);return r}else r.delete(t);return r},select:()=>null},I7={open:DO.open,select:e=>{let{id:t,value:n,opened:r,parents:s}=e;if(!n)return r;const i=[];let o=s.get(t);for(;o!=null;)i.push(o),o=s.get(o);return new Set(i)}},v0=e=>{const t={select:n=>{let{id:r,value:s,selected:i}=n;if(r=Ue(r),e&&!s){const o=Array.from(i.entries()).reduce((a,l)=>{let[u,c]=l;return c==="on"&&a.push(u),a},[]);if(o.length===1&&o[0]===r)return i}return i.set(r,s?"on":"off"),i},in:(n,r,s,i)=>{const o=new Map;for(const a of n||[])t.select({id:a,value:!0,selected:o,children:r,parents:s,disabled:i});return o},out:n=>{const r=[];for(const[s,i]of n.entries())i==="on"&&r.push(s);return r}};return t},LO=e=>{const t=v0(e);return{select:r=>{let{selected:s,id:i,...o}=r;i=Ue(i);const a=s.has(i)?new Map([[i,s.get(i)]]):new Map;return t.select({...o,id:i,selected:a})},in:(r,s,i,o)=>r!=null&&r.length?t.in(r.slice(0,1),s,i,o):new Map,out:(r,s,i)=>t.out(r,s,i)}},A7=e=>{const t=v0(e);return{select:r=>{let{id:s,selected:i,children:o,...a}=r;return s=Ue(s),o.has(s)?i:t.select({id:s,selected:i,children:o,...a})},in:t.in,out:t.out}},O7=e=>{const t=LO(e);return{select:r=>{let{id:s,selected:i,children:o,...a}=r;return s=Ue(s),o.has(s)?i:t.select({id:s,selected:i,children:o,...a})},in:t.in,out:t.out}},$O=e=>{const t={select:n=>{let{id:r,value:s,selected:i,children:o,parents:a,disabled:l}=n;r=Ue(r);const u=new Map(i),c=[r];for(;c.length;){const f=c.shift();l.has(f)||i.set(Ue(f),s?"on":"off"),o.has(f)&&c.push(...o.get(f))}let d=Ue(a.get(r));for(;d;){let f=!0,h=!0;for(const g of o.get(d)){const m=Ue(g);if(!l.has(m)&&(i.get(m)!=="on"&&(f=!1),i.has(m)&&i.get(m)!=="off"&&(h=!1),!f&&!h))break}i.set(d,f?"on":h?"off":"indeterminate"),d=Ue(a.get(d))}return e&&!s&&Array.from(i.entries()).reduce((h,g)=>{let[m,y]=g;return y==="on"&&h.push(m),h},[]).length===0?u:i},in:(n,r,s,i)=>{let o=new Map;for(const a of n||[])o=t.select({id:a,value:!0,selected:o,children:r,parents:s,disabled:i});return o},out:(n,r)=>{const s=[];for(const[i,o]of n.entries())o==="on"&&!r.has(i)&&s.push(i);return s}};return t},M7=e=>{const t=$O(e);return{select:t.select,in:t.in,out:(r,s,i)=>{const o=[];for(const[a,l]of r.entries())if(l==="on"){if(i.has(a)){const u=i.get(a);if(r.get(u)==="on")continue}o.push(a)}return o}}},vd=Symbol.for("vuetify:nested"),FO={id:Pe(),root:{register:()=>null,unregister:()=>null,children:K(new Map),parents:K(new Map),disabled:K(new Set),open:()=>null,openOnSelect:()=>null,activate:()=>null,select:()=>null,activatable:K(!1),selectable:K(!1),opened:K(new Set),activated:K(new Set),selected:K(new Map),selectedValues:K([]),getPath:()=>[]}},D7=he({activatable:Boolean,selectable:Boolean,activeStrategy:[String,Function,Object],selectStrategy:[String,Function,Object],openStrategy:[String,Object],opened:null,activated:null,selected:null,mandatory:Boolean},"nested"),L7=e=>{let t=!1;const n=Pe(new Map),r=Pe(new Map),s=Pe(new Set),i=lt(e,"opened",e.opened,m=>new Set(Array.isArray(m)?m.map(y=>Ue(y)):m),m=>[...m.values()]),o=M(()=>{if(typeof e.activeStrategy=="object")return e.activeStrategy;if(typeof e.activeStrategy=="function")return e.activeStrategy(e.mandatory);switch(e.activeStrategy){case"leaf":return T7(e.mandatory);case"single-leaf":return P7(e.mandatory);case"independent":return g0(e.mandatory);case"single-independent":default:return MO(e.mandatory)}}),a=M(()=>{if(typeof e.selectStrategy=="object")return e.selectStrategy;if(typeof e.selectStrategy=="function")return e.selectStrategy(e.mandatory);switch(e.selectStrategy){case"single-leaf":return O7(e.mandatory);case"leaf":return A7(e.mandatory);case"independent":return v0(e.mandatory);case"single-independent":return LO(e.mandatory);case"trunk":return M7(e.mandatory);case"classic":default:return $O(e.mandatory)}}),l=M(()=>{if(typeof e.openStrategy=="object")return e.openStrategy;switch(e.openStrategy){case"list":return I7;case"single":return R7;case"multiple":default:return DO}}),u=lt(e,"activated",e.activated,m=>o.value.in(m,n.value,r.value),m=>o.value.out(m,n.value,r.value)),c=lt(e,"selected",e.selected,m=>a.value.in(m,n.value,r.value,s.value),m=>a.value.out(m,n.value,r.value));Vn(()=>{t=!0});function d(m){const y=[];let w=Ue(m);for(;w!==void 0;)y.unshift(w),w=r.value.get(w);return y}const f=fn("nested"),h=new Set,g={id:Pe(),root:{opened:i,activatable:ie(()=>e.activatable),selectable:ie(()=>e.selectable),activated:u,selected:c,selectedValues:M(()=>{const m=[];for(const[y,w]of c.value.entries())w==="on"&&m.push(y);return m}),register:(m,y,w,b)=>{if(h.has(m)){d(m).map(String).join(" -> "),d(y).concat(m).map(String).join(" -> ");return}else h.add(m);y&&m!==y&&r.value.set(m,y),w&&s.value.add(m),b&&n.value.set(m,[]),y!=null&&n.value.set(y,[...n.value.get(y)||[],m])},unregister:m=>{if(t)return;h.delete(m),n.value.delete(m),s.value.delete(m);const y=r.value.get(m);if(y){const w=n.value.get(y)??[];n.value.set(y,w.filter(b=>b!==m))}r.value.delete(m)},open:(m,y,w)=>{f.emit("click:open",{id:m,value:y,path:d(m),event:w});const b=l.value.open({id:m,value:y,opened:new Set(i.value),children:n.value,parents:r.value,event:w});b&&(i.value=b)},openOnSelect:(m,y,w)=>{const b=l.value.select({id:m,value:y,selected:new Map(c.value),opened:new Set(i.value),children:n.value,parents:r.value,event:w});b&&(i.value=b)},select:(m,y,w)=>{f.emit("click:select",{id:m,value:y,path:d(m),event:w});const b=a.value.select({id:m,value:y,selected:new Map(c.value),children:n.value,parents:r.value,disabled:s.value,event:w});b&&(c.value=b),g.root.openOnSelect(m,y,w)},activate:(m,y,w)=>{if(!e.activatable)return g.root.select(m,!0,w);f.emit("click:activate",{id:m,value:y,path:d(m),event:w});const b=o.value.activate({id:m,value:y,activated:new Set(u.value),children:n.value,parents:r.value,event:w});if(b.size!==u.value.size)u.value=b;else{for(const x of b)if(!u.value.has(x)){u.value=b;return}for(const x of u.value)if(!b.has(x)){u.value=b;return}}},children:n,parents:r,disabled:s,getPath:d}};return Jt(vd,g),g.root},NO=(e,t,n)=>{const r=Je(vd,FO),s=Symbol("nested item"),i=M(()=>{const a=Ue(un(e));return a!==void 0?a:s}),o={...r,id:i,open:(a,l)=>r.root.open(i.value,a,l),openOnSelect:(a,l)=>r.root.openOnSelect(i.value,a,l),isOpen:M(()=>r.root.opened.value.has(i.value)),parent:M(()=>r.root.parents.value.get(i.value)),activate:(a,l)=>r.root.activate(i.value,a,l),isActivated:M(()=>r.root.activated.value.has(i.value)),select:(a,l)=>r.root.select(i.value,a,l),isSelected:M(()=>r.root.selected.value.get(i.value)==="on"),isIndeterminate:M(()=>r.root.selected.value.get(i.value)==="indeterminate"),isLeaf:M(()=>!r.root.children.value.get(i.value)),isGroupActivator:r.isGroupActivator};return Pu(()=>{r.isGroupActivator||r.root.register(i.value,r.id.value,un(t),n)}),Vn(()=>{r.isGroupActivator||r.root.unregister(i.value)}),n&&Jt(vd,o),o},$7=()=>{const e=Je(vd,FO);Jt(vd,{...e,isGroupActivator:!0})};function uf(){const e=Pe(!1);return yt(()=>{window.requestAnimationFrame(()=>{e.value=!0})}),{ssrBootStyles:ie(()=>e.value?void 0:{transition:"none !important"}),isBooted:Gi(e)}}const F7=Iu({name:"VListGroupActivator",setup(e,t){let{slots:n}=t;return $7(),()=>{var r;return(r=n.default)==null?void 0:r.call(n)}}}),N7=he({activeColor:String,baseColor:String,color:String,collapseIcon:{type:He,default:"$collapse"},disabled:Boolean,expandIcon:{type:He,default:"$expand"},rawId:[String,Number],prependIcon:He,appendIcon:He,fluid:Boolean,subgroup:Boolean,title:String,value:null,...Ge(),...pt()},"VListGroup"),qy=xe()({name:"VListGroup",props:N7(),setup(e,t){let{slots:n}=t;const{isOpen:r,open:s,id:i}=NO(()=>e.value,()=>e.disabled,!0),o=M(()=>`v-list-group--id-${String(e.rawId??i.value)}`),a=OO(),{isBooted:l}=uf();function u(h){var g;["INPUT","TEXTAREA"].includes((g=h.target)==null?void 0:g.tagName)||s(!r.value,h)}const c=M(()=>({onClick:u,class:"v-list-group__header",id:o.value})),d=M(()=>r.value?e.collapseIcon:e.expandIcon),f=M(()=>({VListItem:{activeColor:e.activeColor,baseColor:e.baseColor,color:e.color,prependIcon:e.prependIcon||e.subgroup&&d.value,appendIcon:e.appendIcon||!e.subgroup&&d.value,title:e.title,value:e.value}}));return Me(()=>p(e.tag,{class:Re(["v-list-group",{"v-list-group--prepend":a==null?void 0:a.hasPrepend.value,"v-list-group--fluid":e.fluid,"v-list-group--subgroup":e.subgroup,"v-list-group--open":r.value},e.class]),style:Be(e.style)},{default:()=>[n.activator&&p($t,{defaults:f.value},{default:()=>[p(F7,null,{default:()=>[n.activator({props:c.value,isOpen:r.value})]})]}),p(ui,{transition:{component:nR},disabled:!l.value},{default:()=>{var h;return[zt(C("div",{class:"v-list-group__items",role:"group","aria-labelledby":o.value},[(h=n.default)==null?void 0:h.call(n)]),[[ro,r.value]])]}})]})),{isOpen:r}}}),B7=he({opacity:[Number,String],...Ge(),...pt()},"VListItemSubtitle"),St=xe()({name:"VListItemSubtitle",props:B7(),setup(e,t){let{slots:n}=t;return Me(()=>p(e.tag,{class:Re(["v-list-item-subtitle",e.class]),style:Be([{"--v-list-item-subtitle-opacity":e.opacity},e.style])},n)),{}}}),ft=Au("v-list-item-title"),V7=he({active:{type:Boolean,default:void 0},activeClass:String,activeColor:String,appendAvatar:String,appendIcon:He,baseColor:String,disabled:Boolean,lines:[Boolean,String],link:{type:Boolean,default:void 0},nav:Boolean,prependAvatar:String,prependIcon:He,ripple:{type:[Boolean,Object],default:!0},slim:Boolean,subtitle:{type:[String,Number,Boolean],default:void 0},title:{type:[String,Number,Boolean],default:void 0},value:null,onClick:Gn(),onClickOnce:Gn(),..._s(),...Ge(),...Xn(),...Sr(),...xs(),...Un(),...pm(),...pt(),...Nt(),...zs({variant:"text"})},"VListItem"),ze=xe()({name:"VListItem",directives:{vRipple:Ns},props:V7(),emits:{click:e=>!0},setup(e,t){let{attrs:n,slots:r,emit:s}=t;const i=hm(e,n),o=M(()=>e.value===void 0?i.href.value:e.value),{activate:a,isActivated:l,select:u,isOpen:c,isSelected:d,isIndeterminate:f,isGroupActivator:h,root:g,parent:m,openOnSelect:y,id:w}=NO(o,()=>e.disabled,!1),b=OO(),x=M(()=>{var X;return e.active!==!1&&(e.active||((X=i.isActive)==null?void 0:X.value)||(g.activatable.value?l.value:d.value))}),_=ie(()=>e.link!==!1&&i.isLink.value),S=M(()=>!!b&&(g.selectable.value||g.activatable.value||e.value!=null)),P=M(()=>!e.disabled&&e.link!==!1&&(e.link||i.isClickable.value||S.value)),A=M(()=>b?_.value?"link":S.value?"option":"listitem":void 0),E=M(()=>{if(S.value)return g.activatable.value?l.value:g.selectable.value?d.value:x.value}),T=ie(()=>e.rounded||e.nav),R=ie(()=>e.color??e.activeColor),I=ie(()=>({color:x.value?R.value??e.baseColor:e.baseColor,variant:e.variant}));Ee(()=>{var X;return(X=i.isActive)==null?void 0:X.value},X=>{X&&O()}),Pu(()=>{var X;(X=i.isActive)!=null&&X.value&&O()});function O(){m.value!=null&&g.open(m.value,!0),y(!0)}const{themeClasses:H}=tn(e),{borderClasses:N}=Vs(e),{colorClasses:D,colorStyles:W,variantClasses:U}=ol(I),{densityClasses:Q}=ks(e),{dimensionStyles:V}=_r(e),{elevationClasses:L}=Us(e),{roundedClasses:oe}=Qn(T),j=ie(()=>e.lines?`v-list-item--${e.lines}-line`:void 0),F=ie(()=>e.ripple!==void 0&&e.ripple&&(b!=null&&b.filterable)?{keys:["Enter"]}:e.ripple),re=M(()=>({isActive:x.value,select:u,isOpen:c.value,isSelected:d.value,isIndeterminate:f.value}));function ae(X){var le,ee;s("click",X),!["INPUT","TEXTAREA"].includes((le=X.target)==null?void 0:le.tagName)&&P.value&&((ee=i.navigate)==null||ee.call(i,X),!h&&(g.activatable.value?a(!l.value,X):(g.selectable.value||e.value!=null&&!_.value)&&u(!d.value,X)))}function Se(X){const le=X.target;["INPUT","TEXTAREA"].includes(le.tagName)||(X.key==="Enter"||X.key===" "&&!(b!=null&&b.filterable))&&(X.preventDefault(),X.stopPropagation(),X.target.dispatchEvent(new MouseEvent("click",X)))}return Me(()=>{const X=_.value?"a":e.tag,le=r.title||e.title!=null,ee=r.subtitle||e.subtitle!=null,G=!!(e.appendAvatar||e.appendIcon),_e=!!(G||r.append),De=!!(e.prependAvatar||e.prependIcon),B=!!(De||r.prepend);return b==null||b.updateHasPrepend(B),e.activeColor&&EP("active-color",["color","base-color"]),zt(p(X,me(i.linkProps,{class:["v-list-item",{"v-list-item--active":x.value,"v-list-item--disabled":e.disabled,"v-list-item--link":P.value,"v-list-item--nav":e.nav,"v-list-item--prepend":!B&&(b==null?void 0:b.hasPrepend.value),"v-list-item--slim":e.slim,[`${e.activeClass}`]:e.activeClass&&x.value},H.value,N.value,D.value,Q.value,L.value,j.value,oe.value,U.value,e.class],style:[W.value,V.value,e.style],tabindex:P.value?b?-2:0:void 0,"aria-selected":E.value,role:A.value,onClick:ae,onKeydown:P.value&&!_.value&&Se}),{default:()=>{var z;return[Yo(P.value||x.value,"v-list-item"),B&&C("div",{key:"prepend",class:"v-list-item__prepend"},[r.prepend?p($t,{key:"prepend-defaults",disabled:!De,defaults:{VAvatar:{density:e.density,image:e.prependAvatar},VIcon:{density:e.density,icon:e.prependIcon},VListItemAction:{start:!0}}},{default:()=>{var q;return[(q=r.prepend)==null?void 0:q.call(r,re.value)]}}):C(Oe,null,[e.prependAvatar&&p(dt,{key:"prepend-avatar",density:e.density,image:e.prependAvatar},null),e.prependIcon&&p(Z,{key:"prepend-icon",density:e.density,icon:e.prependIcon},null)]),C("div",{class:"v-list-item__spacer"},null)]),C("div",{class:"v-list-item__content","data-no-activator":""},[le&&p(ft,{key:"title"},{default:()=>{var q;return[((q=r.title)==null?void 0:q.call(r,{title:e.title}))??se(e.title)]}}),ee&&p(St,{key:"subtitle"},{default:()=>{var q;return[((q=r.subtitle)==null?void 0:q.call(r,{subtitle:e.subtitle}))??se(e.subtitle)]}}),(z=r.default)==null?void 0:z.call(r,re.value)]),_e&&C("div",{key:"append",class:"v-list-item__append"},[r.append?p($t,{key:"append-defaults",disabled:!G,defaults:{VAvatar:{density:e.density,image:e.appendAvatar},VIcon:{density:e.density,icon:e.appendIcon},VListItemAction:{end:!0}}},{default:()=>{var q;return[(q=r.append)==null?void 0:q.call(r,re.value)]}}):C(Oe,null,[e.appendIcon&&p(Z,{key:"append-icon",density:e.density,icon:e.appendIcon},null),e.appendAvatar&&p(dt,{key:"append-avatar",density:e.density,image:e.appendAvatar},null)]),C("div",{class:"v-list-item__spacer"},null)])]}}),[[Ns,P.value&&F.value]])}),{activate:a,isActivated:l,isGroupActivator:h,isSelected:d,list:b,select:u,root:g,id:w,link:i}}}),U7=he({color:String,inset:Boolean,sticky:Boolean,title:String,...Ge(),...pt()},"VListSubheader"),Nr=xe()({name:"VListSubheader",props:U7(),setup(e,t){let{slots:n}=t;const{textColorClasses:r,textColorStyles:s}=Fs(()=>e.color);return Me(()=>{const i=!!(n.default||e.title);return p(e.tag,{class:Re(["v-list-subheader",{"v-list-subheader--inset":e.inset,"v-list-subheader--sticky":e.sticky},r.value,e.class]),style:Be([{textColorStyles:s},e.style])},{default:()=>{var o;return[i&&C("div",{class:"v-list-subheader__text"},[((o=n.default)==null?void 0:o.call(n))??e.title])]}})}),{}}}),z7=he({color:String,inset:Boolean,length:[Number,String],opacity:[Number,String],thickness:[Number,String],vertical:Boolean,...Ge(),...Nt()},"VDivider"),ln=xe()({name:"VDivider",props:z7(),setup(e,t){let{attrs:n,slots:r}=t;const{themeClasses:s}=tn(e),{textColorClasses:i,textColorStyles:o}=Fs(()=>e.color),a=M(()=>{const l={};return e.length&&(l[e.vertical?"height":"width"]=Ne(e.length)),e.thickness&&(l[e.vertical?"borderRightWidth":"borderTopWidth"]=Ne(e.thickness)),l});return Me(()=>{const l=C("hr",{class:Re([{"v-divider":!0,"v-divider--inset":e.inset,"v-divider--vertical":e.vertical},s.value,i.value,e.class]),style:Be([a.value,o.value,{"--v-border-opacity":e.opacity},e.style]),"aria-orientation":!n.role||n.role==="separator"?e.vertical?"vertical":"horizontal":void 0,role:`${n.role||"separator"}`},null);return r.default?C("div",{class:Re(["v-divider__wrapper",{"v-divider__wrapper--vertical":e.vertical,"v-divider__wrapper--inset":e.inset}])},[l,C("div",{class:"v-divider__content"},[r.default()]),l]):l}),{}}}),H7=he({items:Array,returnObject:Boolean},"VListChildren"),BO=xe()({name:"VListChildren",props:H7(),setup(e,t){let{slots:n}=t;return AO(),()=>{var r,s;return((r=n.default)==null?void 0:r.call(n))??((s=e.items)==null?void 0:s.map(i=>{var f,h;let{children:o,props:a,type:l,raw:u}=i;if(l==="divider")return((f=n.divider)==null?void 0:f.call(n,{props:a}))??p(ln,a,null);if(l==="subheader")return((h=n.subheader)==null?void 0:h.call(n,{props:a}))??p(Nr,a,null);const c={subtitle:n.subtitle?g=>{var m;return(m=n.subtitle)==null?void 0:m.call(n,{...g,item:u})}:void 0,prepend:n.prepend?g=>{var m;return(m=n.prepend)==null?void 0:m.call(n,{...g,item:u})}:void 0,append:n.append?g=>{var m;return(m=n.append)==null?void 0:m.call(n,{...g,item:u})}:void 0,title:n.title?g=>{var m;return(m=n.title)==null?void 0:m.call(n,{...g,item:u})}:void 0},d=qy.filterProps(a);return o?p(qy,me(d,{value:e.returnObject?u:a==null?void 0:a.value,rawId:a==null?void 0:a.value}),{activator:g=>{let{props:m}=g;const y=me(a,m,{value:e.returnObject?u:a.value});return n.header?n.header({props:y}):p(ze,y,c)},default:()=>p(BO,{items:o,returnObject:e.returnObject},n)}):n.item?n.item({props:a}):p(ze,me(a,{value:e.returnObject?u:a.value}),c)}))}}}),VO=he({items:{type:Array,default:()=>[]},itemTitle:{type:[String,Array,Function],default:"title"},itemValue:{type:[String,Array,Function],default:"value"},itemChildren:{type:[Boolean,String,Array,Function],default:"children"},itemProps:{type:[Boolean,String,Array,Function],default:"props"},itemType:{type:[Boolean,String,Array,Function],default:"type"},returnObject:Boolean,valueComparator:Function},"list-items"),j7=new Set(["item","divider","subheader"]);function zl(e,t){const n=Ln(t,e.itemTitle,t),r=Ln(t,e.itemValue,n),s=Ln(t,e.itemChildren),i=e.itemProps===!0?typeof t=="object"&&t!=null&&!Array.isArray(t)?"children"in t?Ur(t,["children"]):t:void 0:Ln(t,e.itemProps);let o=Ln(t,e.itemType,"item");j7.has(o)||(o="item");const a={title:n,value:r,...i};return{type:o,title:String(a.title??""),value:a.value,props:a,children:o==="item"&&Array.isArray(s)?UO(e,s):void 0,raw:t}}zl.neededProps=["itemTitle","itemValue","itemChildren","itemProps","itemType"];function UO(e,t){const n=Vo(e,zl.neededProps),r=[];for(const s of t)r.push(zl(n,s));return r}function W7(e){const t=M(()=>UO(e,e.items)),n=M(()=>t.value.some(a=>a.value===null)),r=Pe(new Map),s=Pe([]);Cn(()=>{const a=t.value,l=new Map,u=[];for(let c=0;c<a.length;c++){const d=a[c];if(Zv(d.value)||d.value===null){let f=l.get(d.value);f||(f=[],l.set(d.value,f)),f.push(d)}else u.push(d)}r.value=l,s.value=u});function i(a){const l=r.value,u=t.value,c=s.value,d=n.value,f=e.returnObject,h=!!e.valueComparator,g=e.valueComparator||Dr,m=Vo(e,zl.neededProps),y=[];e:for(const w of a){if(!d&&w===null)continue;if(f&&typeof w=="string"){y.push(zl(m,w));continue}const b=l.get(w);if(h||!b){for(const x of h?u:c)if(g(w,x.value)){y.push(x);continue e}y.push(zl(m,w));continue}y.push(...b)}return y}function o(a){return e.returnObject?a.map(l=>{let{raw:u}=l;return u}):a.map(l=>{let{value:u}=l;return u})}return{items:t,transformIn:i,transformOut:o}}const q7=new Set(["item","divider","subheader"]);function G7(e,t){const n=Zv(t)?t:Ln(t,e.itemTitle),r=Zv(t)?t:Ln(t,e.itemValue,void 0),s=Ln(t,e.itemChildren),i=e.itemProps===!0?Ur(t,["children"]):Ln(t,e.itemProps);let o=Ln(t,e.itemType,"item");q7.has(o)||(o="item");const a={title:n,value:r,...i};return{type:o,title:a.title,value:a.value,props:a,children:o==="item"&&s?zO(e,s):void 0,raw:t}}function zO(e,t){const n=[];for(const r of t)n.push(G7(e,r));return n}function K7(e){return{items:M(()=>zO(e,e.items))}}const Y7=he({baseColor:String,activeColor:String,activeClass:String,bgColor:String,disabled:Boolean,filterable:Boolean,expandIcon:He,collapseIcon:He,lines:{type:[Boolean,String],default:"one"},slim:Boolean,nav:Boolean,"onClick:open":Gn(),"onClick:select":Gn(),"onUpdate:opened":Gn(),...D7({selectStrategy:"single-leaf",openStrategy:"list"}),..._s(),...Ge(),...Xn(),...Sr(),...xs(),...VO(),...Un(),...pt(),...Nt(),...zs({variant:"text"})},"VList"),Ht=xe()({name:"VList",props:Y7(),emits:{"update:selected":e=>!0,"update:activated":e=>!0,"update:opened":e=>!0,"click:open":e=>!0,"click:activate":e=>!0,"click:select":e=>!0},setup(e,t){let{slots:n}=t;const{items:r}=K7(e),{themeClasses:s}=tn(e),{backgroundColorClasses:i,backgroundColorStyles:o}=vr(()=>e.bgColor),{borderClasses:a}=Vs(e),{densityClasses:l}=ks(e),{dimensionStyles:u}=_r(e),{elevationClasses:c}=Us(e),{roundedClasses:d}=Qn(e),{children:f,open:h,parents:g,select:m,getPath:y}=L7(e),w=ie(()=>e.lines?`v-list--${e.lines}-line`:void 0),b=ie(()=>e.activeColor),x=ie(()=>e.baseColor),_=ie(()=>e.color),S=ie(()=>e.selectable||e.activatable);AO({filterable:e.filterable}),Br({VListGroup:{activeColor:b,baseColor:x,color:_,expandIcon:ie(()=>e.expandIcon),collapseIcon:ie(()=>e.collapseIcon)},VListItem:{activeClass:ie(()=>e.activeClass),activeColor:b,baseColor:x,color:_,density:ie(()=>e.density),disabled:ie(()=>e.disabled),lines:ie(()=>e.lines),nav:ie(()=>e.nav),slim:ie(()=>e.slim),variant:ie(()=>e.variant)}});const P=Pe(!1),A=K();function E(N){P.value=!0}function T(N){P.value=!1}function R(N){var D;!P.value&&!(N.relatedTarget&&((D=A.value)!=null&&D.contains(N.relatedTarget)))&&H()}function I(N){const D=N.target;if(!(!A.value||D.tagName==="INPUT"&&["Home","End"].includes(N.key)||D.tagName==="TEXTAREA")){if(N.key==="ArrowDown")H("next");else if(N.key==="ArrowUp")H("prev");else if(N.key==="Home")H("first");else if(N.key==="End")H("last");else return;N.preventDefault()}}function O(N){P.value=!0}function H(N){if(A.value)return Lc(A.value,N)}return Me(()=>p(e.tag,{ref:A,class:Re(["v-list",{"v-list--disabled":e.disabled,"v-list--nav":e.nav,"v-list--slim":e.slim},s.value,i.value,a.value,l.value,c.value,w.value,d.value,e.class]),style:Be([o.value,u.value,e.style]),tabindex:e.disabled?-1:0,role:S.value?"listbox":"list","aria-activedescendant":void 0,onFocusin:E,onFocusout:T,onFocus:R,onKeydown:I,onMousedown:O},{default:()=>[p(BO,{items:r.value,returnObject:e.returnObject},n)]})),{open:h,select:m,focus:H,children:f,parents:g,getPath:y}}}),X7=he({start:Boolean,end:Boolean,...Ge(),...pt()},"VListItemAction"),Su=xe()({name:"VListItemAction",props:X7(),setup(e,t){let{slots:n}=t;return Me(()=>p(e.tag,{class:Re(["v-list-item-action",{"v-list-item-action--start":e.start,"v-list-item-action--end":e.end},e.class]),style:Be(e.style)},n)),{}}}),Q7=he({start:Boolean,end:Boolean,...Ge(),...pt()},"VListItemMedia"),J7=xe()({name:"VListItemMedia",props:Q7(),setup(e,t){let{slots:n}=t;return Me(()=>p(e.tag,{class:Re(["v-list-item-media",{"v-list-item-media--start":e.start,"v-list-item-media--end":e.end},e.class]),style:Be(e.style)},n)),{}}}),Z7={key:1},eG={key:2},tG={class:"mt-3"},nG={key:0},rG={key:1},sG={key:2},iG=Fe({__name:"BatchReprintDialog",setup(e){const t=Xt(),n=K(),r=rn(sn.BatchReprintDialog),s=K(!1),i=K(!1),o=K([]),a=K([]),l=K(""),u=Ft();function c(g){s.value=!0}async function d(g){n.value=g;try{const m=await $l.batchGetLastPrintedFiles(n.value);o.value=m,a.value=m.filter(y=>y.connectionState==="Operational"&&y.reprintState==pa.LastPrintReady)}catch(m){l.value=m.code.toString()??""}s.value=!1}async function f(){i.value=!0;try{await $l.batchReprintFiles(a.value.filter(g=>{var m;return(m=g.file)==null?void 0:m.path}).map(g=>{var m;return{printerId:g.printerId,path:((m=g.file)==null?void 0:m.path)||""}})),t.clearSelectedPrinters(),u.info("Action completed","Your reprinted jobs are starting",5e3),h()}catch(g){l.value=S7(g)}finally{i.value=!1}}function h(){r.closeDialog(r.context())}return(g,m)=>{const y=yi;return $(),te(y,{id:J(r).dialogId,"max-width":"1000px",onBeforeOpened:c,onEscape:m[3]||(m[3]=w=>h()),onOpened:d},{default:v(()=>[p(kt,{class:"pa-4"},{default:v(()=>[p(an,null,{default:v(()=>[...m[4]||(m[4]=[C("span",{class:"text-h5"}," Batch - Submit Reprint Jobs ",-1)])]),_:1}),p(nn,null,{default:v(()=>{var w;return[(w=l.value)!=null&&w.length?($(),te(vn,{key:0,color:"error"},{default:v(()=>[k(se(l.value),1)]),_:1})):pe("",!0),s.value?($(),ve("span",Z7," Loading... ")):($(),ve("div",eG,[p(Ht,{density:"compact"},{default:v(()=>[p(Nr,null,{default:v(()=>[...m[5]||(m[5]=[k(" Reprinted Files - Select from list ",-1)])]),_:1}),p(qy,{modelValue:a.value,"onUpdate:modelValue":m[0]||(m[0]=b=>a.value=b),multiple:""},{default:v(()=>[($(!0),ve(Oe,null,Qt(o.value,(b,x)=>($(),te(ze,{key:x,value:b,disabled:b.connectionState!=="Operational"||b.reprintState!==J(pa).LastPrintReady},{prepend:v(()=>[b.reprintState==J(pa).LastPrintReady?($(),te(Z,{key:0},{default:v(()=>[...m[6]||(m[6]=[k("checklist",-1)])]),_:1})):pe("",!0),b.reprintState==J(pa).NoLastPrint?($(),te(Z,{key:1},{default:v(()=>[...m[7]||(m[7]=[k(" question_mark ",-1)])]),_:1})):pe("",!0),b.reprintState==J(pa).PrinterNotAvailable?($(),te(Z,{key:2},{default:v(()=>[...m[8]||(m[8]=[k(" signal_disconnected ",-1)])]),_:1})):pe("",!0)]),default:v(()=>{var _,S;return[(S=(_=b.file)==null?void 0:_.path)!=null&&S.length?($(),te(ft,{key:0},{default:v(()=>{var P;return[k(se((P=b.file)==null?void 0:P.path)+" ",1),b.connectionState!=="Operational"?($(),te(In,{key:0},{default:v(()=>[...m[9]||(m[9]=[k(" Printer busy ",-1)])]),_:1})):pe("",!0)]}),_:2},1024)):b.reprintState==J(pa).NoLastPrint?($(),te(ft,{key:1},{default:v(()=>[...m[10]||(m[10]=[k(" No file is present to print again ",-1)])]),_:1})):($(),te(ft,{key:2},{default:v(()=>[...m[11]||(m[11]=[k(" OctoPrint cant be reached ",-1)])]),_:1})),p(St,null,{default:v(()=>{var P;return[k(" Printer '"+se(((P=J(t).printer(b.printerId))==null?void 0:P.name)??"Unknown printer")+"' ",1)]}),_:2},1024)]}),_:2},1032,["value","disabled"]))),128))]),_:1},8,["modelValue"])]),_:1})])),C("div",tG,[i.value?($(),ve("div",nG,[p(ai,{class:"ma-3",indeterminate:"",color:"blue"}),m[12]||(m[12]=k(" Submitting ",-1))])):a.value.length>0?($(),ve("div",rG,se(a.value.length)+" reprint selected ",1)):($(),ve("div",sG,"Must select at least one file"))]),m[14]||(m[14]=C("br",null,null,-1)),p(ne,{disabled:i.value||a.value.length===0,onClick:m[1]||(m[1]=b=>f())},{default:v(()=>[...m[13]||(m[13]=[k(" Submit Batch Reprint ",-1)])]),_:1},8,["disabled"])]}),_:1}),p(Bn,null,{default:v(()=>[p(Tn),p(ne,{variant:"text",onClick:m[2]||(m[2]=w=>J(r).closeDialog())},{default:v(()=>[...m[15]||(m[15]=[k(" Close ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}});function HO(e,t=2){if(e===0)return"0 Bytes";const n=1024,r=t<0?0:t,s=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],i=Math.floor(Math.log(e)/Math.log(n));return parseFloat((e/Math.pow(n,i)).toFixed(r))+" "+s[i]}const Gy="/assets/octoprint-tentacle-D_4slObB.svg",Ch=0,Ky=1,Th=2;function jO(e){return e===Ch}function Pp(e){return e===Ky}function Rp(e){return e===Th}function zc(e){return jO(e)?"OctoPrint":Pp(e)?"Moonraker":Rp(e)?"PrusaLink":"Unknown"}function oG(e){let{rootEl:t,isSticky:n,layoutItemStyles:r}=e;const s=Pe(!1),i=Pe(0),o=M(()=>{const u=typeof s.value=="boolean"?"top":s.value;return[n.value?{top:"auto",bottom:"auto",height:void 0}:void 0,s.value?{[u]:Ne(i.value)}:{top:r.value.top}]});yt(()=>{Ee(n,u=>{u?window.addEventListener("scroll",l,{passive:!0}):window.removeEventListener("scroll",l)},{immediate:!0})}),Vn(()=>{window.removeEventListener("scroll",l)});let a=0;function l(){const u=a>window.scrollY?"up":"down",c=t.value.getBoundingClientRect(),d=parseFloat(r.value.top??0),f=window.scrollY-Math.max(0,i.value-d),h=c.height+Math.max(i.value,d)-window.scrollY-window.innerHeight,g=parseFloat(getComputedStyle(t.value).getPropertyValue("--v-body-scroll-y"))||0;c.height<window.innerHeight-d?(s.value="top",i.value=d):u==="up"&&s.value==="bottom"||u==="down"&&s.value==="top"?(i.value=window.scrollY+c.top-g,s.value=!0):u==="down"&&h<=0?(i.value=0,s.value="bottom"):u==="up"&&f<=0&&(g?s.value!=="top"&&(i.value=-f+g+d,s.value="top"):(i.value=c.top+f,s.value="top")),a=window.scrollY}return{isStuck:s,stickyStyles:o}}const aG=100,lG=20;function Zk(e){return(e<0?-1:1)*Math.sqrt(Math.abs(e))*1.41421356237}function ex(e){if(e.length<2)return 0;if(e.length===2)return e[1].t===e[0].t?0:(e[1].d-e[0].d)/(e[1].t-e[0].t);let t=0;for(let n=e.length-1;n>0;n--){if(e[n].t===e[n-1].t)continue;const r=Zk(t),s=(e[n].d-e[n-1].d)/(e[n].t-e[n-1].t);t+=(s-r)*Math.abs(s),n===e.length-1&&(t*=.5)}return Zk(t)*1e3}function uG(){const e={};function t(s){Array.from(s.changedTouches).forEach(i=>{(e[i.identifier]??(e[i.identifier]=new bP(lG))).push([s.timeStamp,i])})}function n(s){Array.from(s.changedTouches).forEach(i=>{delete e[i.identifier]})}function r(s){var u;const i=(u=e[s])==null?void 0:u.values().reverse();if(!i)throw new Error(`No samples for touch id ${s}`);const o=i[0],a=[],l=[];for(const c of i){if(o[0]-c[0]>aG)break;a.push({t:c[0],d:c[1].clientX}),l.push({t:c[0],d:c[1].clientY})}return{x:ex(a),y:ex(l),get direction(){const{x:c,y:d}=this,[f,h]=[Math.abs(c),Math.abs(d)];return f>h&&c>=0?"right":f>h&&c<=0?"left":h>f&&d>=0?"down":h>f&&d<=0?"up":cG()}}}return{addMovement:t,endTouch:n,getVelocity:r}}function cG(){throw new Error}function dG(e){let{el:t,isActive:n,isTemporary:r,width:s,touchless:i,position:o}=e;yt(()=>{window.addEventListener("touchstart",b,{passive:!0}),window.addEventListener("touchmove",x,{passive:!1}),window.addEventListener("touchend",_,{passive:!0})}),Vn(()=>{window.removeEventListener("touchstart",b),window.removeEventListener("touchmove",x),window.removeEventListener("touchend",_)});const a=M(()=>["left","right"].includes(o.value)),{addMovement:l,endTouch:u,getVelocity:c}=uG();let d=!1;const f=Pe(!1),h=Pe(0),g=Pe(0);let m;function y(P,A){return(o.value==="left"?P:o.value==="right"?document.documentElement.clientWidth-P:o.value==="top"?P:o.value==="bottom"?document.documentElement.clientHeight-P:bl())-(A?s.value:0)}function w(P){let A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const E=o.value==="left"?(P-g.value)/s.value:o.value==="right"?(document.documentElement.clientWidth-P-g.value)/s.value:o.value==="top"?(P-g.value)/s.value:o.value==="bottom"?(document.documentElement.clientHeight-P-g.value)/s.value:bl();return A?Nn(E):E}function b(P){if(i.value)return;const A=P.changedTouches[0].clientX,E=P.changedTouches[0].clientY,T=25,R=o.value==="left"?A<T:o.value==="right"?A>document.documentElement.clientWidth-T:o.value==="top"?E<T:o.value==="bottom"?E>document.documentElement.clientHeight-T:bl(),I=n.value&&(o.value==="left"?A<s.value:o.value==="right"?A>document.documentElement.clientWidth-s.value:o.value==="top"?E<s.value:o.value==="bottom"?E>document.documentElement.clientHeight-s.value:bl());(R||I||n.value&&r.value)&&(m=[A,E],g.value=y(a.value?A:E,n.value),h.value=w(a.value?A:E),d=g.value>-20&&g.value<80,u(P),l(P))}function x(P){const A=P.changedTouches[0].clientX,E=P.changedTouches[0].clientY;if(d){if(!P.cancelable){d=!1;return}const R=Math.abs(A-m[0]),I=Math.abs(E-m[1]);(a.value?R>I&&R>3:I>R&&I>3)?(f.value=!0,d=!1):(a.value?I:R)>3&&(d=!1)}if(!f.value)return;P.preventDefault(),l(P);const T=w(a.value?A:E,!1);h.value=Math.max(0,Math.min(1,T)),T>1?g.value=y(a.value?A:E,!0):T<0&&(g.value=y(a.value?A:E,!1))}function _(P){if(d=!1,!f.value)return;l(P),f.value=!1;const A=c(P.changedTouches[0].identifier),E=Math.abs(A.x),T=Math.abs(A.y);(a.value?E>T&&E>400:T>E&&T>3)?n.value=A.direction===({left:"right",right:"left",top:"down",bottom:"up"}[o.value]||bl()):n.value=h.value>.5}const S=M(()=>f.value?{transform:o.value==="left"?`translateX(calc(-100% + ${h.value*s.value}px))`:o.value==="right"?`translateX(calc(100% - ${h.value*s.value}px))`:o.value==="top"?`translateY(calc(-100% + ${h.value*s.value}px))`:o.value==="bottom"?`translateY(calc(100% - ${h.value*s.value}px))`:bl(),transition:"none"}:void 0);return Lr(f,()=>{var E,T;const P=((E=t.value)==null?void 0:E.style.transform)??null,A=((T=t.value)==null?void 0:T.style.transition)??null;Cn(()=>{var R,I,O,H;(I=t.value)==null||I.style.setProperty("transform",((R=S.value)==null?void 0:R.transform)||"none"),(H=t.value)==null||H.style.setProperty("transition",((O=S.value)==null?void 0:O.transition)||null)}),dn(()=>{var R,I;(R=t.value)==null||R.style.setProperty("transform",P),(I=t.value)==null||I.style.setProperty("transition",A)})}),{isDragging:f,dragProgress:h,dragStyles:S}}function bl(){throw new Error}function cf(e){const t=e.slice(-2).toUpperCase();switch(!0){case e==="GB-alt-variant":return{firstDay:0,firstWeekSize:4};case e==="001":return{firstDay:1,firstWeekSize:1};case`AG AS BD BR BS BT BW BZ CA CO DM DO ET GT GU HK HN ID IL IN JM JP KE
|
|
63
|
+
KH KR LA MH MM MO MT MX MZ NI NP PA PE PH PK PR PY SA SG SV TH TT TW UM US
|
|
64
|
+
VE VI WS YE ZA ZW`.includes(t):return{firstDay:0,firstWeekSize:1};case`AI AL AM AR AU AZ BA BM BN BY CL CM CN CR CY EC GE HR KG KZ LB LK LV
|
|
65
|
+
MD ME MK MN MY NZ RO RS SI TJ TM TR UA UY UZ VN XK`.includes(t):return{firstDay:1,firstWeekSize:1};case`AD AN AT AX BE BG CH CZ DE DK EE ES FI FJ FO FR GB GF GP GR HU IE IS
|
|
66
|
+
IT LI LT LU MC MQ NL NO PL RE RU SE SK SM VA`.includes(t):return{firstDay:1,firstWeekSize:4};case"AE AF BH DJ DZ EG IQ IR JO KW LY OM QA SD SY".includes(t):return{firstDay:6,firstWeekSize:1};case t==="MV":return{firstDay:5,firstWeekSize:1};case t==="PT":return{firstDay:0,firstWeekSize:4};default:return null}}function fG(e,t,n){var c;const r=[];let s=[];const i=WO(e),o=qO(e),a=n??((c=cf(t))==null?void 0:c.firstDay)??0,l=(i.getDay()-a+7)%7,u=(o.getDay()-a+7)%7;for(let d=0;d<l;d++){const f=new Date(i);f.setDate(f.getDate()-(l-d)),s.push(f)}for(let d=1;d<=o.getDate();d++){const f=new Date(e.getFullYear(),e.getMonth(),d);s.push(f),s.length===7&&(r.push(s),s=[])}for(let d=1;d<7-u;d++){const f=new Date(o);f.setDate(f.getDate()+d),s.push(f)}return s.length>0&&r.push(s),r}function Ip(e,t,n){var i;let r=(n??((i=cf(t))==null?void 0:i.firstDay)??0)%7;[0,1,2,3,4,5,6].includes(r)||(r=0);const s=new Date(e);for(;s.getDay()!==r;)s.setDate(s.getDate()-1);return s}function hG(e,t){var s;const n=new Date(e),r=((((s=cf(t))==null?void 0:s.firstDay)??0)+6)%7;for(;n.getDay()!==r;)n.setDate(n.getDate()+1);return n}function WO(e){return new Date(e.getFullYear(),e.getMonth(),1)}function qO(e){return new Date(e.getFullYear(),e.getMonth()+1,0)}function pG(e){const t=e.split("-").map(Number);return new Date(t[0],t[1]-1,t[2])}const mG=/^([12]\d{3}-([1-9]|0[1-9]|1[0-2])-([1-9]|0[1-9]|[12]\d|3[01]))$/;function GO(e){if(e==null)return new Date;if(e instanceof Date)return e;if(typeof e=="string"){let t;if(mG.test(e))return pG(e);if(t=Date.parse(e),!isNaN(t))return new Date(t)}return null}const tx=new Date(2e3,0,2);function gG(e,t,n){var s;const r=t??((s=cf(e))==null?void 0:s.firstDay)??0;return Rl(7).map(i=>{const o=new Date(tx);return o.setDate(tx.getDate()+r+i),new Intl.DateTimeFormat(e,{weekday:n??"narrow"}).format(o)})}function vG(e,t,n,r){const s=GO(e)??new Date,i=r==null?void 0:r[t];if(typeof i=="function")return i(s,t,n);let o={};switch(t){case"fullDate":o={year:"numeric",month:"short",day:"numeric"};break;case"fullDateWithWeekday":o={weekday:"long",year:"numeric",month:"long",day:"numeric"};break;case"normalDate":const a=s.getDate(),l=new Intl.DateTimeFormat(n,{month:"long"}).format(s);return`${a} ${l}`;case"normalDateWithWeekday":o={weekday:"short",day:"numeric",month:"short"};break;case"shortDate":o={month:"short",day:"numeric"};break;case"year":o={year:"numeric"};break;case"month":o={month:"long"};break;case"monthShort":o={month:"short"};break;case"monthAndYear":o={month:"long",year:"numeric"};break;case"monthAndDate":o={month:"long",day:"numeric"};break;case"weekday":o={weekday:"long"};break;case"weekdayShort":o={weekday:"short"};break;case"dayOfMonth":return new Intl.NumberFormat(n).format(s.getDate());case"hours12h":o={hour:"numeric",hour12:!0};break;case"hours24h":o={hour:"numeric",hour12:!1};break;case"minutes":o={minute:"numeric"};break;case"seconds":o={second:"numeric"};break;case"fullTime":o={hour:"numeric",minute:"numeric"};break;case"fullTime12h":o={hour:"numeric",minute:"numeric",hour12:!0};break;case"fullTime24h":o={hour:"numeric",minute:"numeric",hour12:!1};break;case"fullDateTime":o={year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric"};break;case"fullDateTime12h":o={year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",hour12:!0};break;case"fullDateTime24h":o={year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",hour12:!1};break;case"keyboardDate":o={year:"numeric",month:"2-digit",day:"2-digit"};break;case"keyboardDateTime":return o={year:"numeric",month:"2-digit",day:"2-digit",hour:"numeric",minute:"numeric"},new Intl.DateTimeFormat(n,o).format(s).replace(/, /g," ");case"keyboardDateTime12h":return o={year:"numeric",month:"2-digit",day:"2-digit",hour:"numeric",minute:"numeric",hour12:!0},new Intl.DateTimeFormat(n,o).format(s).replace(/, /g," ");case"keyboardDateTime24h":return o={year:"numeric",month:"2-digit",day:"2-digit",hour:"numeric",minute:"numeric",hour12:!1},new Intl.DateTimeFormat(n,o).format(s).replace(/, /g," ");default:o=i??{timeZone:"UTC",timeZoneName:"short"}}return new Intl.DateTimeFormat(n,o).format(s)}function yG(e,t){const n=e.toJsDate(t),r=n.getFullYear(),s=cS(String(n.getMonth()+1),2,"0"),i=cS(String(n.getDate()),2,"0");return`${r}-${s}-${i}`}function bG(e){const[t,n,r]=e.split("-").map(Number);return new Date(t,n-1,r)}function wG(e,t){const n=new Date(e);return n.setMinutes(n.getMinutes()+t),n}function SG(e,t){const n=new Date(e);return n.setHours(n.getHours()+t),n}function ja(e,t){const n=new Date(e);return n.setDate(n.getDate()+t),n}function _G(e,t){const n=new Date(e);return n.setDate(n.getDate()+t*7),n}function kG(e,t){const n=new Date(e);return n.setDate(1),n.setMonth(n.getMonth()+t),n}function yd(e){return e.getFullYear()}function xG(e){return e.getMonth()}function EG(e,t,n,r){const s=cf(t),i=n??(s==null?void 0:s.firstDay)??0,o=(s==null?void 0:s.firstWeekSize)??1;return r!==void 0?CG(e,t,i,r):TG(e,t,i,o)}function CG(e,t,n,r){const s=(7+r-n)%7,i=Ip(e,t,n),o=ja(i,6);function a(f){return(7+new Date(f,0,1).getDay()-n)%7}let l=yd(e);l<yd(o)&&a(l+1)<=s&&l++;const u=new Date(l,0,1),c=a(l),d=c<=s?ja(u,-c):ja(u,7-c);return 1+Op(y0(e),bd(d),"weeks")}function TG(e,t,n,r){const s=ja(Ip(e,t,n),6);function i(c){const d=new Date(c,0,1);return 7-Op(d,Ip(d,t,n),"days")}let o=yd(e);o<yd(s)&&i(o+1)>=r&&o++;const a=new Date(o,0,1),l=i(o),u=l>=r?ja(a,l-7):ja(a,l);return 1+Op(y0(e),bd(u),"weeks")}function PG(e){return e.getDate()}function RG(e){return new Date(e.getFullYear(),e.getMonth()+1,1)}function IG(e){return new Date(e.getFullYear(),e.getMonth()-1,1)}function AG(e){return e.getHours()}function OG(e){return e.getMinutes()}function MG(e){return new Date(e.getFullYear(),0,1)}function DG(e){return new Date(e.getFullYear(),11,31)}function LG(e,t){return Ap(e,t[0])&&NG(e,t[1])}function $G(e){const t=new Date(e);return t instanceof Date&&!isNaN(t.getTime())}function Ap(e,t){return e.getTime()>t.getTime()}function FG(e,t){return Ap(bd(e),bd(t))}function NG(e,t){return e.getTime()<t.getTime()}function nx(e,t){return e.getTime()===t.getTime()}function BG(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}function VG(e,t){return e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}function UG(e,t){return e.getFullYear()===t.getFullYear()}function Op(e,t,n){const r=new Date(e),s=new Date(t);switch(n){case"years":return r.getFullYear()-s.getFullYear();case"quarters":return Math.floor((r.getMonth()-s.getMonth()+(r.getFullYear()-s.getFullYear())*12)/4);case"months":return r.getMonth()-s.getMonth()+(r.getFullYear()-s.getFullYear())*12;case"weeks":return Math.floor((r.getTime()-s.getTime())/(1e3*60*60*24*7));case"days":return Math.floor((r.getTime()-s.getTime())/(1e3*60*60*24));case"hours":return Math.floor((r.getTime()-s.getTime())/(1e3*60*60));case"minutes":return Math.floor((r.getTime()-s.getTime())/(1e3*60));case"seconds":return Math.floor((r.getTime()-s.getTime())/1e3);default:return r.getTime()-s.getTime()}}function zG(e,t){const n=new Date(e);return n.setHours(t),n}function HG(e,t){const n=new Date(e);return n.setMinutes(t),n}function jG(e,t){const n=new Date(e);return n.setMonth(t),n}function WG(e,t){const n=new Date(e);return n.setDate(t),n}function qG(e,t){const n=new Date(e);return n.setFullYear(t),n}function bd(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0,0)}function y0(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),23,59,59,999)}class GG{constructor(t){this.locale=t.locale,this.formats=t.formats}date(t){return GO(t)}toJsDate(t){return t}toISO(t){return yG(this,t)}parseISO(t){return bG(t)}addMinutes(t,n){return wG(t,n)}addHours(t,n){return SG(t,n)}addDays(t,n){return ja(t,n)}addWeeks(t,n){return _G(t,n)}addMonths(t,n){return kG(t,n)}getWeekArray(t,n){const r=n!==void 0?Number(n):void 0;return fG(t,this.locale,r)}startOfWeek(t,n){const r=n!==void 0?Number(n):void 0;return Ip(t,this.locale,r)}endOfWeek(t){return hG(t,this.locale)}startOfMonth(t){return WO(t)}endOfMonth(t){return qO(t)}format(t,n){return vG(t,n,this.locale,this.formats)}isEqual(t,n){return nx(t,n)}isValid(t){return $G(t)}isWithinRange(t,n){return LG(t,n)}isAfter(t,n){return Ap(t,n)}isAfterDay(t,n){return FG(t,n)}isBefore(t,n){return!Ap(t,n)&&!nx(t,n)}isSameDay(t,n){return BG(t,n)}isSameMonth(t,n){return VG(t,n)}isSameYear(t,n){return UG(t,n)}setMinutes(t,n){return HG(t,n)}setHours(t,n){return zG(t,n)}setMonth(t,n){return jG(t,n)}setDate(t,n){return WG(t,n)}setYear(t,n){return qG(t,n)}getDiff(t,n,r){return Op(t,n,r)}getWeekdays(t,n){const r=t!==void 0?Number(t):void 0;return gG(this.locale,r,n)}getYear(t){return yd(t)}getMonth(t){return xG(t)}getWeek(t,n,r){const s=n!==void 0?Number(n):void 0,i=r!==void 0?Number(r):void 0;return EG(t,this.locale,s,i)}getDate(t){return PG(t)}getNextMonth(t){return RG(t)}getPreviousMonth(t){return IG(t)}getHours(t){return AG(t)}getMinutes(t){return OG(t)}startOfDay(t){return bd(t)}endOfDay(t){return y0(t)}startOfYear(t){return MG(t)}endOfYear(t){return DG(t)}}const KG=Symbol.for("vuetify:date-options"),rx=Symbol.for("vuetify:date-adapter");function YG(e,t){const n=or({adapter:GG,locale:{af:"af-ZA",bg:"bg-BG",ca:"ca-ES",ckb:"",cs:"cs-CZ",de:"de-DE",el:"el-GR",en:"en-US",et:"et-EE",fa:"fa-IR",fi:"fi-FI",hr:"hr-HR",hu:"hu-HU",he:"he-IL",id:"id-ID",it:"it-IT",ja:"ja-JP",ko:"ko-KR",lv:"lv-LV",lt:"lt-LT",nl:"nl-NL",no:"no-NO",pl:"pl-PL",pt:"pt-PT",ro:"ro-RO",ru:"ru-RU",sk:"sk-SK",sl:"sl-SI",srCyrl:"sr-SP",srLatn:"sr-SP",sv:"sv-SE",th:"th-TH",tr:"tr-TR",az:"az-AZ",uk:"uk-UA",vi:"vi-VN",zhHans:"zh-CN",zhHant:"zh-TW"}},e);return{options:n,instance:XG(n,t)}}function XG(e,t){const n=mn(typeof e.adapter=="function"?new e.adapter({locale:e.locale[t.current.value]??t.current.value,formats:e.formats}):e.adapter);return Ee(t.current,r=>{n.locale=e.locale[r]??r??n.locale}),n}const wd=Symbol.for("vuetify:layout"),KO=Symbol.for("vuetify:layout-item"),sx=1e3,YO=he({overlaps:{type:Array,default:()=>[]},fullHeight:Boolean},"layout"),XO=he({name:{type:String},order:{type:[Number,String],default:0},absolute:Boolean},"layout-item");function QO(){const e=Je(wd);if(!e)throw new Error("[Vuetify] Could not find injected layout");return{getLayoutItem:e.getLayoutItem,mainRect:e.mainRect,mainStyles:e.mainStyles}}function JO(e){const t=Je(wd);if(!t)throw new Error("[Vuetify] Could not find injected layout");const n=e.id??`layout-item-${Vr()}`,r=fn("useLayoutItem");Jt(KO,{id:n});const s=Pe(!1);qb(()=>s.value=!0),TT(()=>s.value=!1);const{layoutItemStyles:i,layoutItemScrimStyles:o}=t.register(r,{...e,active:M(()=>s.value?!1:e.active.value),id:n});return Vn(()=>t.unregister(n)),{layoutItemStyles:i,layoutRect:t.layoutRect,layoutItemScrimStyles:o}}const QG=(e,t,n,r)=>{let s={top:0,left:0,right:0,bottom:0};const i=[{id:"",layer:{...s}}];for(const o of e){const a=t.get(o),l=n.get(o),u=r.get(o);if(!a||!l||!u)continue;const c={...s,[a.value]:parseInt(s[a.value],10)+(u.value?parseInt(l.value,10):0)};i.push({id:o,layer:c}),s=c}return i};function ZO(e){const t=Je(wd,null),n=M(()=>t?t.rootZIndex.value-100:sx),r=K([]),s=mn(new Map),i=mn(new Map),o=mn(new Map),a=mn(new Map),l=mn(new Map),{resizeRef:u,contentRect:c}=Uo(),d=M(()=>{const P=new Map,A=e.overlaps??[];for(const E of A.filter(T=>T.includes(":"))){const[T,R]=E.split(":");if(!r.value.includes(T)||!r.value.includes(R))continue;const I=s.get(T),O=s.get(R),H=i.get(T),N=i.get(R);!I||!O||!H||!N||(P.set(R,{position:I.value,amount:parseInt(H.value,10)}),P.set(T,{position:O.value,amount:-parseInt(N.value,10)}))}return P}),f=M(()=>{const P=[...new Set([...o.values()].map(E=>E.value))].sort((E,T)=>E-T),A=[];for(const E of P){const T=r.value.filter(R=>{var I;return((I=o.get(R))==null?void 0:I.value)===E});A.push(...T)}return QG(A,s,i,a)}),h=M(()=>!Array.from(l.values()).some(P=>P.value)),g=M(()=>f.value[f.value.length-1].layer),m=ie(()=>({"--v-layout-left":Ne(g.value.left),"--v-layout-right":Ne(g.value.right),"--v-layout-top":Ne(g.value.top),"--v-layout-bottom":Ne(g.value.bottom),...h.value?void 0:{transition:"none"}})),y=M(()=>f.value.slice(1).map((P,A)=>{let{id:E}=P;const{layer:T}=f.value[A],R=i.get(E),I=s.get(E);return{id:E,...T,size:Number(R.value),position:I.value}})),w=P=>y.value.find(A=>A.id===P),b=fn("createLayout"),x=Pe(!1);yt(()=>{x.value=!0}),Jt(wd,{register:(P,A)=>{let{id:E,order:T,position:R,layoutSize:I,elementSize:O,active:H,disableTransitions:N,absolute:D}=A;o.set(E,T),s.set(E,R),i.set(E,I),a.set(E,H),N&&l.set(E,N);const U=Il(KO,b==null?void 0:b.vnode).indexOf(P);U>-1?r.value.splice(U,0,E):r.value.push(E);const Q=M(()=>y.value.findIndex(j=>j.id===E)),V=M(()=>n.value+f.value.length*2-Q.value*2),L=M(()=>{const j=R.value==="left"||R.value==="right",F=R.value==="right",re=R.value==="bottom",ae=O.value??I.value,Se=ae===0?"%":"px",X={[R.value]:0,zIndex:V.value,transform:`translate${j?"X":"Y"}(${(H.value?0:-(ae===0?100:ae))*(F||re?-1:1)}${Se})`,position:D.value||n.value!==sx?"absolute":"fixed",...h.value?void 0:{transition:"none"}};if(!x.value)return X;const le=y.value[Q.value],ee=d.value.get(E);return ee&&(le[ee.position]+=ee.amount),{...X,height:j?`calc(100% - ${le.top}px - ${le.bottom}px)`:O.value?`${O.value}px`:void 0,left:F?void 0:`${le.left}px`,right:F?`${le.right}px`:void 0,top:R.value!=="bottom"?`${le.top}px`:void 0,bottom:R.value!=="top"?`${le.bottom}px`:void 0,width:j?O.value?`${O.value}px`:void 0:`calc(100% - ${le.left}px - ${le.right}px)`}}),oe=M(()=>({zIndex:V.value-1}));return{layoutItemStyles:L,layoutItemScrimStyles:oe,zIndex:V}},unregister:P=>{o.delete(P),s.delete(P),i.delete(P),a.delete(P),l.delete(P),r.value=r.value.filter(A=>A!==P)},mainRect:g,mainStyles:m,getLayoutItem:w,items:y,layoutRect:c,rootZIndex:n});const _=ie(()=>["v-layout",{"v-layout--full-height":e.fullHeight}]),S=ie(()=>({zIndex:t?n.value:void 0,position:t?"relative":void 0,overflow:t?"hidden":void 0}));return{layoutClasses:_,layoutStyles:S,getLayoutItem:w,items:y,layoutRect:c,layoutRef:u}}const JG=["start","end","left","right","top","bottom"],ZG=he({color:String,disableResizeWatcher:Boolean,disableRouteWatcher:Boolean,expandOnHover:Boolean,floating:Boolean,modelValue:{type:Boolean,default:null},permanent:Boolean,rail:{type:Boolean,default:null},railWidth:{type:[Number,String],default:56},scrim:{type:[Boolean,String],default:!0},image:String,temporary:Boolean,persistent:Boolean,touchless:Boolean,width:{type:[Number,String],default:256},location:{type:String,default:"start",validator:e=>JG.includes(e)},sticky:Boolean,..._s(),...Ge(),...g1(),...ll({mobile:null}),...xs(),...XO(),...Un(),...pt({tag:"nav"}),...Nt()},"VNavigationDrawer"),b0=xe()({name:"VNavigationDrawer",props:ZG(),emits:{"update:modelValue":e=>!0,"update:rail":e=>!0},setup(e,t){let{attrs:n,emit:r,slots:s}=t;const{isRtl:i}=Hr(),{themeClasses:o}=tn(e),{borderClasses:a}=Vs(e),{backgroundColorClasses:l,backgroundColorStyles:u}=vr(()=>e.color),{elevationClasses:c}=Us(e),{displayClasses:d,mobile:f}=vi(e),{roundedClasses:h}=Qn(e),g=jP(),m=lt(e,"modelValue",null,L=>!!L),{ssrBootStyles:y}=uf(),{scopeId:w}=$u(),b=K(),x=Pe(!1),{runOpenDelay:_,runCloseDelay:S}=v1(e,L=>{x.value=L}),P=M(()=>e.rail&&e.expandOnHover&&x.value?Number(e.width):Number(e.rail?e.railWidth:e.width)),A=M(()=>ty(e.location,i.value)),E=ie(()=>e.persistent),T=M(()=>!e.permanent&&(f.value||e.temporary)),R=M(()=>e.sticky&&!T.value&&A.value!=="bottom");Lr(()=>e.expandOnHover&&e.rail!=null,()=>{Ee(x,L=>r("update:rail",!L))}),Lr(()=>!e.disableResizeWatcher,()=>{Ee(T,L=>!e.permanent&&Pt(()=>m.value=!L))}),Lr(()=>!e.disableRouteWatcher&&!!g,()=>{Ee(g.currentRoute,()=>T.value&&(m.value=!1))}),Ee(()=>e.permanent,L=>{L&&(m.value=!0)}),e.modelValue==null&&!T.value&&(m.value=e.permanent||!f.value);const{isDragging:I,dragProgress:O}=dG({el:b,isActive:m,isTemporary:T,width:P,touchless:ie(()=>e.touchless),position:A}),H=M(()=>{const L=T.value?0:e.rail&&e.expandOnHover?Number(e.railWidth):P.value;return I.value?L*O.value:L}),{layoutItemStyles:N,layoutItemScrimStyles:D}=JO({id:e.name,order:M(()=>parseInt(e.order,10)),position:A,layoutSize:H,elementSize:P,active:Gi(m),disableTransitions:ie(()=>I.value),absolute:M(()=>e.absolute||R.value&&typeof W.value!="string")}),{isStuck:W,stickyStyles:U}=oG({rootEl:b,isSticky:R,layoutItemStyles:N}),Q=vr(()=>typeof e.scrim=="string"?e.scrim:null),V=M(()=>({...I.value?{opacity:O.value*.2,transition:"none"}:void 0,...D.value}));return Br({VList:{bgColor:"transparent"}}),Me(()=>{const L=s.image||e.image;return C(Oe,null,[p(e.tag,me({ref:b,onMouseenter:_,onMouseleave:S,class:["v-navigation-drawer",`v-navigation-drawer--${A.value}`,{"v-navigation-drawer--expand-on-hover":e.expandOnHover,"v-navigation-drawer--floating":e.floating,"v-navigation-drawer--is-hovering":x.value,"v-navigation-drawer--rail":e.rail,"v-navigation-drawer--temporary":T.value,"v-navigation-drawer--persistent":E.value,"v-navigation-drawer--active":m.value,"v-navigation-drawer--sticky":R.value},o.value,l.value,a.value,d.value,c.value,h.value,e.class],style:[u.value,N.value,y.value,U.value,e.style]},w,n),{default:()=>{var oe,j,F;return[L&&C("div",{key:"image",class:"v-navigation-drawer__img"},[s.image?p($t,{key:"image-defaults",disabled:!e.image,defaults:{VImg:{alt:"",cover:!0,height:"inherit",src:e.image}}},s.image):p(vs,{key:"image-img",alt:"",cover:!0,height:"inherit",src:e.image},null)]),s.prepend&&C("div",{class:"v-navigation-drawer__prepend"},[(oe=s.prepend)==null?void 0:oe.call(s)]),C("div",{class:"v-navigation-drawer__content"},[(j=s.default)==null?void 0:j.call(s)]),s.append&&C("div",{class:"v-navigation-drawer__append"},[(F=s.append)==null?void 0:F.call(s)])]}}),p(Bo,{name:"fade-transition"},{default:()=>[T.value&&(I.value||m.value)&&!!e.scrim&&C("div",me({class:["v-navigation-drawer__scrim",Q.backgroundColorClasses.value],style:[V.value,Q.backgroundColorStyles.value],onClick:()=>{E.value||(m.value=!1)}},w),null)]})])}),{isStuck:W}}}),e9=he({active:Boolean,disabled:Boolean,max:[Number,String],value:{type:[Number,String],default:0},...Ge(),...Fu({transition:{component:tR}})},"VCounter"),w0=xe()({name:"VCounter",functional:!0,props:e9(),setup(e,t){let{slots:n}=t;const r=ie(()=>e.max?`${e.value} / ${e.max}`:String(e.value));return Me(()=>p(ui,{transition:e.transition},{default:()=>[zt(C("div",{class:Re(["v-counter",{"text-error":e.max&&!e.disabled&&parseFloat(e.value)>parseFloat(e.max)},e.class]),style:Be(e.style)},[n.default?n.default({counter:r.value,max:e.max,value:e.value}):r.value]),[[ro,e.active]])]})),{}}}),t9=he({text:String,onClick:Gn(),...Ge(),...Nt()},"VLabel"),S0=xe()({name:"VLabel",props:t9(),setup(e,t){let{slots:n}=t;return Me(()=>{var r;return C("label",{class:Re(["v-label",{"v-label--clickable":!!e.onClick},e.class]),style:Be(e.style),onClick:e.onClick},[e.text,(r=n.default)==null?void 0:r.call(n)])}),{}}}),n9=he({floating:Boolean,...Ge()},"VFieldLabel"),Nf=xe()({name:"VFieldLabel",props:n9(),setup(e,t){let{slots:n}=t;return Me(()=>p(S0,{class:Re(["v-field-label",{"v-field-label--floating":e.floating},e.class]),style:Be(e.style)},n)),{}}});function eM(e){const{t}=zr();function n(r){let{name:s,color:i,...o}=r;const a={prepend:"prependAction",prependInner:"prependAction",append:"appendAction",appendInner:"appendAction",clear:"clear"}[s],l=e[`onClick:${s}`];function u(d){d.key!=="Enter"&&d.key!==" "||(d.preventDefault(),d.stopPropagation(),Ud(l,new PointerEvent("click",d)))}const c=l&&a?t(`$vuetify.input.${a}`,e.label??""):void 0;return p(Z,me({icon:e[`${s}Icon`],"aria-label":c,onClick:l,onKeydown:u,color:i},o),null)}return{InputIcon:n}}const tM=he({focused:Boolean,"onUpdate:focused":Gn()},"focus");function Xu(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:gi();const n=lt(e,"focused"),r=ie(()=>({[`${t}--focused`]:n.value}));function s(){n.value=!0}function i(){n.value=!1}return{focusClasses:r,isFocused:n,focus:s,blur:i}}const r9=["underlined","outlined","filled","solo","solo-inverted","solo-filled","plain"],Fm=he({appendInnerIcon:He,bgColor:String,clearable:Boolean,clearIcon:{type:He,default:"$clear"},active:Boolean,centerAffix:{type:Boolean,default:void 0},color:String,baseColor:String,details:Boolean,dirty:Boolean,disabled:{type:Boolean,default:null},glow:Boolean,error:Boolean,flat:Boolean,iconColor:[Boolean,String],label:String,persistentClear:Boolean,prependInnerIcon:He,reverse:Boolean,singleLine:Boolean,variant:{type:String,default:"filled",validator:e=>r9.includes(e)},"onClick:clear":Gn(),"onClick:appendInner":Gn(),"onClick:prependInner":Gn(),...Ge(),...dm(),...Un(),...Nt()},"VField"),_u=xe()({name:"VField",inheritAttrs:!1,props:{id:String,...tM(),...Fm()},emits:{"update:focused":e=>!0,"update:modelValue":e=>!0},setup(e,t){let{attrs:n,emit:r,slots:s}=t;const{themeClasses:i}=tn(e),{loaderClasses:o}=Wd(e),{focusClasses:a,isFocused:l,focus:u,blur:c}=Xu(e),{InputIcon:d}=eM(e),{roundedClasses:f}=Qn(e),{rtlClasses:h}=Hr(),g=ie(()=>e.dirty||e.active),m=ie(()=>!!(e.label||s.label)),y=ie(()=>!e.singleLine&&m.value),w=Vr(),b=M(()=>e.id||`input-${w}`),x=ie(()=>e.details?`${b.value}-messages`:void 0),_=K(),S=K(),P=K(),A=M(()=>["plain","underlined"].includes(e.variant)),E=M(()=>e.error||e.disabled?void 0:g.value&&l.value?e.color:e.baseColor),T=M(()=>{if(!(!e.iconColor||e.glow&&!l.value))return e.iconColor===!0?E.value:e.iconColor}),{backgroundColorClasses:R,backgroundColorStyles:I}=vr(()=>e.bgColor),{textColorClasses:O,textColorStyles:H}=Fs(E);Ee(g,W=>{if(y.value&&!Ka()){const U=_.value.$el,Q=S.value.$el;requestAnimationFrame(()=>{const V=l1(U),L=Q.getBoundingClientRect(),oe=L.x-V.x,j=L.y-V.y-(V.height/2-L.height/2),F=L.width/.75,re=Math.abs(F-V.width)>1?{maxWidth:Ne(F)}:void 0,ae=getComputedStyle(U),Se=getComputedStyle(Q),X=parseFloat(ae.transitionDuration)*1e3||150,le=parseFloat(Se.getPropertyValue("--v-field-label-scale")),ee=Se.getPropertyValue("color");U.style.visibility="visible",Q.style.visibility="hidden",mo(U,{transform:`translate(${oe}px, ${j}px) scale(${le})`,color:ee,...re},{duration:X,easing:rp,direction:W?"normal":"reverse"}).finished.then(()=>{U.style.removeProperty("visibility"),Q.style.removeProperty("visibility")})})}},{flush:"post"});const N=M(()=>({isActive:g,isFocused:l,controlRef:P,blur:c,focus:u}));function D(W){W.target!==document.activeElement&&W.preventDefault()}return Me(()=>{var oe,j,F;const W=e.variant==="outlined",U=!!(s["prepend-inner"]||e.prependInnerIcon),Q=!!(e.clearable||s.clear)&&!e.disabled,V=!!(s["append-inner"]||e.appendInnerIcon||Q),L=()=>s.label?s.label({...N.value,label:e.label,props:{for:b.value}}):e.label;return C("div",me({class:["v-field",{"v-field--active":g.value,"v-field--appended":V,"v-field--center-affix":e.centerAffix??!A.value,"v-field--disabled":e.disabled,"v-field--dirty":e.dirty,"v-field--error":e.error,"v-field--glow":e.glow,"v-field--flat":e.flat,"v-field--has-background":!!e.bgColor,"v-field--persistent-clear":e.persistentClear,"v-field--prepended":U,"v-field--reverse":e.reverse,"v-field--single-line":e.singleLine,"v-field--no-label":!L(),[`v-field--variant-${e.variant}`]:!0},i.value,R.value,a.value,o.value,f.value,h.value,e.class],style:[I.value,e.style],onClick:D},n),[C("div",{class:"v-field__overlay"},null),p(fm,{name:"v-field",active:!!e.loading,color:e.error?"error":typeof e.loading=="string"?e.loading:e.color},{default:s.loader}),U&&C("div",{key:"prepend",class:"v-field__prepend-inner"},[e.prependInnerIcon&&p(d,{key:"prepend-icon",name:"prependInner",color:T.value},null),(oe=s["prepend-inner"])==null?void 0:oe.call(s,N.value)]),C("div",{class:"v-field__field","data-no-activator":""},[["filled","solo","solo-inverted","solo-filled"].includes(e.variant)&&y.value&&p(Nf,{key:"floating-label",ref:S,class:Re([O.value]),floating:!0,for:b.value,"aria-hidden":!g.value,style:Be(H.value)},{default:()=>[L()]}),m.value&&p(Nf,{key:"label",ref:_,for:b.value},{default:()=>[L()]}),((j=s.default)==null?void 0:j.call(s,{...N.value,props:{id:b.value,class:"v-field__input","aria-describedby":x.value},focus:u,blur:c}))??C("div",{id:b.value,class:"v-field__input","aria-describedby":x.value},null)]),Q&&p(rR,{key:"clear"},{default:()=>[zt(C("div",{class:"v-field__clearable",onMousedown:re=>{re.preventDefault(),re.stopPropagation()}},[p($t,{defaults:{VIcon:{icon:e.clearIcon}}},{default:()=>[s.clear?s.clear({...N.value,props:{onFocus:u,onBlur:c,onClick:e["onClick:clear"],tabindex:-1}}):p(d,{name:"clear",onFocus:u,onBlur:c,tabindex:-1},null)]})]),[[ro,e.dirty]])]}),V&&C("div",{key:"append",class:"v-field__append-inner"},[(F=s["append-inner"])==null?void 0:F.call(s,N.value),e.appendInnerIcon&&p(d,{key:"append-icon",name:"appendInner",color:T.value},null)]),C("div",{class:Re(["v-field__outline",O.value]),style:Be(H.value)},[W&&C(Oe,null,[C("div",{class:"v-field__outline__start"},null),y.value&&C("div",{class:"v-field__outline__notch"},[p(Nf,{ref:S,floating:!0,for:b.value,"aria-hidden":!g.value},{default:()=>[L()]})]),C("div",{class:"v-field__outline__end"},null)]),A.value&&y.value&&p(Nf,{ref:S,floating:!0,for:b.value,"aria-hidden":!g.value},{default:()=>[L()]})])])}),{controlRef:P,fieldIconColor:T}}}),s9=he({active:Boolean,color:String,messages:{type:[Array,String],default:()=>[]},...Ge(),...Fu({transition:{component:tR,leaveAbsolute:!0,group:!0}})},"VMessages"),i9=xe()({name:"VMessages",props:s9(),setup(e,t){let{slots:n}=t;const r=M(()=>Fn(e.messages)),{textColorClasses:s,textColorStyles:i}=Fs(()=>e.color);return Me(()=>p(ui,{transition:e.transition,tag:"div",class:Re(["v-messages",s.value,e.class]),style:Be([i.value,e.style])},{default:()=>[e.active&&r.value.map((o,a)=>C("div",{class:"v-messages__message",key:`${a}-${r.value}`},[n.message?n.message({message:o}):o]))]})),{}}}),nM=Symbol.for("vuetify:form"),o9=he({disabled:Boolean,fastFail:Boolean,readonly:Boolean,modelValue:{type:Boolean,default:null},validateOn:{type:String,default:"input"}},"form");function a9(e){const t=lt(e,"modelValue"),n=ie(()=>e.disabled),r=ie(()=>e.readonly),s=Pe(!1),i=K([]),o=K([]);async function a(){const c=[];let d=!0;o.value=[],s.value=!0;for(const f of i.value){const h=await f.validate();if(h.length>0&&(d=!1,c.push({id:f.id,errorMessages:h})),!d&&e.fastFail)break}return o.value=c,s.value=!1,{valid:d,errors:o.value}}function l(){i.value.forEach(c=>c.reset())}function u(){i.value.forEach(c=>c.resetValidation())}return Ee(i,()=>{let c=0,d=0;const f=[];for(const h of i.value)h.isValid===!1?(d++,f.push({id:h.id,errorMessages:h.errorMessages})):h.isValid===!0&&c++;o.value=f,t.value=d>0?!1:c===i.value.length?!0:null},{deep:!0,flush:"post"}),Jt(nM,{register:c=>{let{id:d,vm:f,validate:h,reset:g,resetValidation:m}=c;i.value.some(y=>y.id===d),i.value.push({id:d,validate:h,reset:g,resetValidation:m,vm:tm(f),isValid:null,errorMessages:[]})},unregister:c=>{i.value=i.value.filter(d=>d.id!==c)},update:(c,d,f)=>{const h=i.value.find(g=>g.id===c);h&&(h.isValid=d,h.errorMessages=f)},isDisabled:n,isReadonly:r,isValidating:s,isValid:t,items:i,validateOn:ie(()=>e.validateOn)}),{errors:o,isDisabled:n,isReadonly:r,isValidating:s,isValid:t,items:i,validate:a,reset:l,resetValidation:u}}function rM(e){const t=Je(nM,null);return{...t,isReadonly:M(()=>!!((e==null?void 0:e.readonly)??(t==null?void 0:t.isReadonly.value))),isDisabled:M(()=>!!((e==null?void 0:e.disabled)??(t==null?void 0:t.isDisabled.value)))}}const l9=Symbol.for("vuetify:rules");function u9(e){const t=Je(l9,null);if(!e){if(!t)throw new Error("Could not find Vuetify rules injection");return t.aliases}return(t==null?void 0:t.resolve(e))??ie(e)}const c9=he({disabled:{type:Boolean,default:null},error:Boolean,errorMessages:{type:[Array,String],default:()=>[]},maxErrors:{type:[Number,String],default:1},name:String,label:String,readonly:{type:Boolean,default:null},rules:{type:Array,default:()=>[]},modelValue:null,validateOn:String,validationValue:null,...tM()},"validation");function d9(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:gi(),n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Vr();const r=lt(e,"modelValue"),s=M(()=>e.validationValue===void 0?r.value:e.validationValue),i=rM(e),o=u9(()=>e.rules),a=K([]),l=Pe(!0),u=M(()=>!!(Fn(r.value===""?null:r.value).length||Fn(s.value===""?null:s.value).length)),c=M(()=>{var _;return(_=e.errorMessages)!=null&&_.length?Fn(e.errorMessages).concat(a.value).slice(0,Math.max(0,Number(e.maxErrors))):a.value}),d=M(()=>{var P;let _=(e.validateOn??((P=i.validateOn)==null?void 0:P.value))||"input";_==="lazy"&&(_="input lazy"),_==="eager"&&(_="input eager");const S=new Set((_==null?void 0:_.split(" "))??[]);return{input:S.has("input"),blur:S.has("blur")||S.has("input")||S.has("invalid-input"),invalidInput:S.has("invalid-input"),lazy:S.has("lazy"),eager:S.has("eager")}}),f=M(()=>{var _;return e.error||(_=e.errorMessages)!=null&&_.length?!1:e.rules.length?l.value?a.value.length||d.value.lazy?null:!0:!a.value.length:!0}),h=Pe(!1),g=M(()=>({[`${t}--error`]:f.value===!1,[`${t}--dirty`]:u.value,[`${t}--disabled`]:i.isDisabled.value,[`${t}--readonly`]:i.isReadonly.value})),m=fn("validation"),y=M(()=>e.name??J(n));Pu(()=>{var _;(_=i.register)==null||_.call(i,{id:y.value,vm:m,validate:x,reset:w,resetValidation:b})}),Vn(()=>{var _;(_=i.unregister)==null||_.call(i,y.value)}),yt(async()=>{var _;d.value.lazy||await x(!d.value.eager),(_=i.update)==null||_.call(i,y.value,f.value,c.value)}),Lr(()=>d.value.input||d.value.invalidInput&&f.value===!1,()=>{Ee(s,()=>{if(s.value!=null)x();else if(e.focused){const _=Ee(()=>e.focused,S=>{S||x(),_()})}})}),Lr(()=>d.value.blur,()=>{Ee(()=>e.focused,_=>{_||x()})}),Ee([f,c],()=>{var _;(_=i.update)==null||_.call(i,y.value,f.value,c.value)});async function w(){r.value=null,await Pt(),await b()}async function b(){l.value=!0,d.value.lazy?a.value=[]:await x(!d.value.eager)}async function x(){let _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const S=[];h.value=!0;for(const P of o.value){if(S.length>=Number(e.maxErrors??1))break;const E=await(typeof P=="function"?P:()=>P)(s.value);if(E!==!0){if(E!==!1&&typeof E!="string"){console.warn(`${E} is not a valid value. Rule functions must return boolean true or a string.`);continue}S.push(E||"")}}return a.value=S,h.value=!1,l.value=_,a.value}return{errorMessages:c,isDirty:u,isDisabled:i.isDisabled,isReadonly:i.isReadonly,isPristine:l,isValid:f,isValidating:h,reset:w,resetValidation:b,validate:x,validationClasses:g}}const dl=he({id:String,appendIcon:He,baseColor:String,centerAffix:{type:Boolean,default:!0},color:String,glow:Boolean,iconColor:[Boolean,String],prependIcon:He,hideDetails:[Boolean,String],hideSpinButtons:Boolean,hint:String,persistentHint:Boolean,messages:{type:[Array,String],default:()=>[]},direction:{type:String,default:"horizontal",validator:e=>["horizontal","vertical"].includes(e)},"onClick:prepend":Gn(),"onClick:append":Gn(),...Ge(),...Xn(),...Vo(Sr(),["maxWidth","minWidth","width"]),...Nt(),...c9()},"VInput"),ys=xe()({name:"VInput",props:{...dl()},emits:{"update:modelValue":e=>!0},setup(e,t){let{attrs:n,slots:r,emit:s}=t;const{densityClasses:i}=ks(e),{dimensionStyles:o}=_r(e),{themeClasses:a}=tn(e),{rtlClasses:l}=Hr(),{InputIcon:u}=eM(e),c=Vr(),d=M(()=>e.id||`input-${c}`),{errorMessages:f,isDirty:h,isDisabled:g,isReadonly:m,isPristine:y,isValid:w,isValidating:b,reset:x,resetValidation:_,validate:S,validationClasses:P}=d9(e,"v-input",d),A=M(()=>{var N;return(N=e.errorMessages)!=null&&N.length||!y.value&&f.value.length?f.value:e.hint&&(e.persistentHint||e.focused)?e.hint:e.messages}),E=ie(()=>A.value.length>0),T=ie(()=>!e.hideDetails||e.hideDetails==="auto"&&(E.value||!!r.details)),R=M(()=>T.value?`${d.value}-messages`:void 0),I=M(()=>({id:d,messagesId:R,isDirty:h,isDisabled:g,isReadonly:m,isPristine:y,isValid:w,isValidating:b,hasDetails:T,reset:x,resetValidation:_,validate:S})),O=ie(()=>e.error||e.disabled?void 0:e.focused?e.color:e.baseColor),H=ie(()=>{if(e.iconColor)return e.iconColor===!0?O.value:e.iconColor});return Me(()=>{var W,U,Q,V;const N=!!(r.prepend||e.prependIcon),D=!!(r.append||e.appendIcon);return C("div",{class:Re(["v-input",`v-input--${e.direction}`,{"v-input--center-affix":e.centerAffix,"v-input--focused":e.focused,"v-input--glow":e.glow,"v-input--hide-spin-buttons":e.hideSpinButtons},i.value,a.value,l.value,P.value,e.class]),style:Be([o.value,e.style])},[N&&C("div",{key:"prepend",class:"v-input__prepend"},[(W=r.prepend)==null?void 0:W.call(r,I.value),e.prependIcon&&p(u,{key:"prepend-icon",name:"prepend",color:H.value},null)]),r.default&&C("div",{class:"v-input__control"},[(U=r.default)==null?void 0:U.call(r,I.value)]),D&&C("div",{key:"append",class:"v-input__append"},[e.appendIcon&&p(u,{key:"append-icon",name:"append",color:H.value},null),(Q=r.append)==null?void 0:Q.call(r,I.value)]),T.value&&C("div",{id:R.value,class:"v-input__details",role:"alert","aria-live":"polite"},[p(i9,{active:E.value,messages:A.value},{message:r.message}),(V=r.details)==null?void 0:V.call(r,I.value)])])}),{reset:x,resetValidation:_,validate:S,isValid:w,errorMessages:f}}}),sM=he({autocomplete:String},"autocomplete");function iM(e){const t=Vr(),n=Pe(0),r=ie(()=>e.autocomplete==="suppress"),s=ie(()=>r.value?`${e.name}-${t}-${n.value}`:e.name),i=ie(()=>r.value?"off":e.autocomplete);return{isSuppressing:r,fieldAutocomplete:i,fieldName:s,update:()=>n.value=new Date().getTime()}}function oM(e){function t(n,r){var s,i;!e.autofocus||!n||(i=(s=r[0].target)==null?void 0:s.focus)==null||i.call(s)}return{onIntersect:t}}const f9=["color","file","time","date","datetime-local","week","month"],aM=he({autofocus:Boolean,counter:[Boolean,Number,String],counterValue:[Number,Function],prefix:String,placeholder:String,persistentPlaceholder:Boolean,persistentCounter:Boolean,suffix:String,role:String,type:{type:String,default:"text"},modelModifiers:Object,...sM(),...dl(),...Fm()},"VTextField"),at=xe()({name:"VTextField",directives:{vIntersect:wu},inheritAttrs:!1,props:aM(),emits:{"click:control":e=>!0,"mousedown:control":e=>!0,"update:focused":e=>!0,"update:modelValue":e=>!0},setup(e,t){let{attrs:n,emit:r,slots:s}=t;const i=lt(e,"modelValue"),{isFocused:o,focus:a,blur:l}=Xu(e),{onIntersect:u}=oM(e),c=M(()=>typeof e.counterValue=="function"?e.counterValue(i.value):typeof e.counterValue=="number"?e.counterValue:(i.value??"").toString().length),d=M(()=>{if(n.maxlength)return n.maxlength;if(!(!e.counter||typeof e.counter!="number"&&typeof e.counter!="string"))return e.counter}),f=M(()=>["plain","underlined"].includes(e.variant)),h=K(),g=K(),m=K(),y=iM(e),w=M(()=>f9.includes(e.type)||e.persistentPlaceholder||o.value||e.active);function b(){y.isSuppressing.value&&y.update(),o.value||a(),Pt(()=>{var A;m.value!==document.activeElement&&((A=m.value)==null||A.focus())})}function x(A){r("mousedown:control",A),A.target!==m.value&&(b(),A.preventDefault())}function _(A){r("click:control",A)}function S(A,E){A.stopPropagation(),b(),Pt(()=>{i.value=null,E(),Ud(e["onClick:clear"],A)})}function P(A){var T;const E=A.target;if(i.value=E.value,(T=e.modelModifiers)!=null&&T.trim&&["text","search","password","tel","url"].includes(e.type)){const R=[E.selectionStart,E.selectionEnd];Pt(()=>{E.selectionStart=R[0],E.selectionEnd=R[1]})}}return Me(()=>{const A=!!(s.counter||e.counter!==!1&&e.counter!=null),E=!!(A||s.details),[T,R]=il(n),{modelValue:I,...O}=ys.filterProps(e),H=_u.filterProps(e);return p(ys,me({ref:h,modelValue:i.value,"onUpdate:modelValue":N=>i.value=N,class:["v-text-field",{"v-text-field--prefixed":e.prefix,"v-text-field--suffixed":e.suffix,"v-input--plain-underlined":f.value},e.class],style:e.style},T,O,{centerAffix:!f.value,focused:o.value}),{...s,default:N=>{let{id:D,isDisabled:W,isDirty:U,isReadonly:Q,isValid:V,hasDetails:L,reset:oe}=N;return p(_u,me({ref:g,onMousedown:x,onClick:_,"onClick:clear":j=>S(j,oe),"onClick:prependInner":e["onClick:prependInner"],"onClick:appendInner":e["onClick:appendInner"],role:e.role},Ur(H,["onClick:clear"]),{id:D.value,active:w.value||U.value,dirty:U.value||e.dirty,disabled:W.value,focused:o.value,details:L.value,error:V.value===!1}),{...s,default:j=>{let{props:{class:F,...re}}=j;const ae=zt(C("input",me({ref:m,value:i.value,onInput:P,autofocus:e.autofocus,readonly:Q.value,disabled:W.value,name:y.fieldName.value,autocomplete:y.fieldAutocomplete.value,placeholder:e.placeholder,size:1,role:e.role,type:e.type,onFocus:a,onBlur:l},re,R),null),[[wu,{handler:u},null,{once:!0}]]);return C(Oe,null,[e.prefix&&C("span",{class:"v-text-field__prefix"},[C("span",{class:"v-text-field__prefix__text"},[e.prefix])]),s.default?C("div",{class:Re(F),"data-no-activator":""},[s.default(),ae]):Ki(ae,{class:F}),e.suffix&&C("span",{class:"v-text-field__suffix"},[C("span",{class:"v-text-field__suffix__text"},[e.suffix])])])}})},details:E?N=>{var D;return C(Oe,null,[(D=s.details)==null?void 0:D.call(s,N),A&&C(Oe,null,[C("span",null,null),p(w0,{active:e.persistentCounter||o.value,value:c.value,max:d.value,disabled:e.disabled},s.counter)])])}:void 0})}),Es({},h,g,m)}}),h9=he({id:String,interactive:Boolean,text:String,...Ur(qd({closeOnBack:!1,location:"end",locationStrategy:"connected",eager:!0,minWidth:0,offset:10,openOnClick:!1,openOnHover:!0,origin:"auto",scrim:!1,scrollStrategy:"reposition",transition:null}),["absolute","persistent"])},"VTooltip"),ot=xe()({name:"VTooltip",props:h9(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=lt(e,"modelValue"),{scopeId:s}=$u(),i=Vr(),o=ie(()=>e.id||`v-tooltip-${i}`),a=K(),l=M(()=>e.location.split(" ").length>1?e.location:e.location+" center"),u=M(()=>e.origin==="auto"||e.origin==="overlap"||e.origin.split(" ").length>1||e.location.split(" ").length>1?e.origin:e.origin+" center"),c=ie(()=>e.transition!=null?e.transition:r.value?"scale-transition":"fade-transition"),d=M(()=>me({"aria-describedby":o.value},e.activatorProps));return Me(()=>{const f=Yi.filterProps(e);return p(Yi,me({ref:a,class:["v-tooltip",{"v-tooltip--interactive":e.interactive},e.class],style:e.style,id:o.value},f,{modelValue:r.value,"onUpdate:modelValue":h=>r.value=h,transition:c.value,absolute:!0,location:l.value,origin:u.value,persistent:!0,role:"tooltip",activatorProps:d.value,_disableGlobalStack:!0},s),{activator:n.activator,default:function(){var y;for(var h=arguments.length,g=new Array(h),m=0;m<h;m++)g[m]=arguments[m];return((y=n.default)==null?void 0:y.call(n,...g))??e.text}})}),Es({},a)}}),p9={key:0,class:"d-flex justify-center static-disabled"},m9={key:1,class:"pulsating-red d-flex justify-center"},g9={key:0,class:"d-flex justify-center"},v9={key:0},y9={key:1},b9={key:1},w9={key:2},S9={key:3},_9={key:0},k9={key:1},x9={key:0},E9={key:1},C9={key:0},T9={key:1},P9={key:2},R9=Fe({__name:"FileExplorerSideNav",setup(e){const t=Xt(),n=lr(),r=K(36),s=K(void 0),i=K(void 0),o=K(!1),a=K(!0),l=M(()=>t.sideNavPrinter),u=M(()=>{var ee;return(ee=l.value)==null?void 0:ee.id}),c=M(()=>u.value?n.isApiResponding(u.value):!1),d=M(()=>{var ee;return jO((ee=l.value)==null?void 0:ee.printerType)}),f=M(()=>{var ee;return Pp((ee=l.value)==null?void 0:ee.printerType)}),h=M(()=>{var ee;return Rp((ee=l.value)==null?void 0:ee.printerType)}),g=M(()=>{var ee;return zc((ee=l.value)==null?void 0:ee.printerType)}),m=M(()=>u.value?n.isPrinterOperational(u.value):!1),y=M(()=>{var ee;return(ee=l.value)==null?void 0:ee.enabled}),w=M(()=>{var ee,G;return!!((G=(ee=l.value)==null?void 0:ee.disabledReason)!=null&&G.length)}),b=M(()=>u.value?n.isPrinterPrinting(u.value):!1),x=M(()=>{var ee;return(ee=i.value)!=null&&ee.length?i.value.filter(G=>{var _e;return(_e=s.value)!=null&&_e.length?`${G.path}`.toLowerCase().includes(s.value):!0})||[]:[]}),_=M(()=>!l.value||!u.value?!1:n.isPrinterStoppable(u.value)),S=M(()=>!l.value||!u.value?!1:n.isPrinterPaused(u.value)),P=M(()=>{var ee;return u.value?((ee=i.value)==null?void 0:ee.length)&&n.isApiResponding(u.value):!1}),A=M(()=>{if(!u.value)throw new Error("Printer ID not set, cannot get current job");return n.printerJobsById[u.value]}),E=M(()=>{if(!u.value)throw new Error("Printer ID not set, cannot get current printing file name");return n.printingFilePathsByPrinterId[u.value]}),T=M(()=>{var B;if(!u.value||!l.value)return null;const ee=n.printerEventsById[u.value],G=n.socketStatesById[u.value],_e=cO(l.value,G,ee);return((B=js().frontendDebugSettings)==null?void 0:B.showInterpretedPrinterState)&&console.debug("[FileExplorerSideNav] rendered for printerId",u.value,_e==null?void 0:_e.text,_e==null?void 0:_e.color,_e==null?void 0:_e.rgb),_e}),R=async()=>{var G;a.value=!0;const ee=(G=l.value)==null?void 0:G.id;if(ee)try{n.isApiResponding(ee)?i.value=await t.loadPrinterFiles(ee):i.value=await Hi.getFileCache(ee)}finally{a.value=!1}},I=async ee=>{u.value&&await t.deletePrinterFile(u.value,ee.path)};Ee(l,async(ee,G)=>{o.value=!!ee;const _e=ee==null?void 0:ee.id;!ee||!_e||(!i.value||ee.id!==(G==null?void 0:G.id)||!G)&&await R()}),Ee(o,ee=>{ee||t.setSideNavPrinter(void 0)});function O(ee){return ee?ee==null?void 0:ee.toFixed(1):""}function H(ee){return u.value?n.printingFilePathsByPrinterId[u.value]===ee.path:!1}function N(){const ee=l.value;if(ee&&o.value)return Dm(ee.name)}function D(){l.value&&(en.openPrinterURL(l.value.printerURL),le())}function W(){if(!l.value)return;const ee=new URL(l.value.printerURL);ee.port="8080",en.openPrinterURL(ee.toString()),le()}async function U(){if(u.value){if(n.isPrinterOperational(u.value))return await en.sendPrinterDisconnectCommand(u.value);await en.sendPrinterConnectCommand(u.value)}}async function Q(){if(!u.value)throw new Error("Printer ID not set, cant toggle enabled");if(!l.value)throw new Error("Cant toggle enabled, sidenav printer unset");const ee=!l.value.enabled;await en.toggleEnabled(u.value,ee)}async function V(){if(!u.value)throw new Error("Printer ID not set, cant toggle maintenance");if(!l.value)throw new Error("Cant toggle enabled, sidenav printer unset");if(w.value){await en.updatePrinterMaintenance(u.value);return}t.setMaintenanceDialogPrinter(l.value),await rn(sn.PrinterMaintenanceDialog).openDialog(),le()}async function L(){u.value&&await en.refreshSocket(u.value)}async function oe(){u.value&&confirm("Are you sure to cancel the current print job?")&&await za.stopPrintJob(u.value)}async function j(){u.value&&await za.pausePrintJob(u.value)}async function F(){u.value&&await za.resumePrintJob(u.value)}async function re(){u.value&&confirm("Are you sure to delete all files for this printer?")&&(a.value=!0,await t.deletePrinterFiles(u.value),a.value=!1,i.value=t.printerFiles(u.value))}function ae(){l.value&&(t.setUpdateDialogPrinter(l.value),rn(sn.AddOrUpdatePrinterDialog).openDialog(),le())}async function Se(ee){u.value&&await n.selectAndPrintFile({printerId:u.value,fullPath:ee.path})}function X(ee){u.value&&Hi.downloadFile(u.value,ee)}function le(){t.setSideNavPrinter(void 0)}return(ee,G)=>{const _e=Zc("drop-upload");return $(),te(b0,{modelValue:o.value,"onUpdate:modelValue":G[14]||(G[14]=De=>o.value=De),absolute:"",loading:"true",location:"right",scrim:"white",temporary:"",width:"700",onClose:G[15]||(G[15]=De=>le())},{default:v(()=>{var De,B,z;return[l.value?($(),te(ze,{key:0,lines:"two"},{prepend:v(()=>[p(ot,{location:"left"},{activator:v(({props:q})=>[p(ne,me({size:r.value,class:"mr-4 mt-1",color:"primary",icon:""},q,{onClick:G[0]||(G[0]=ce=>D()),onMouseup:G[1]||(G[1]=Et(ce=>D(),["middle"]))}),{default:v(()=>[p(dt,{size:r.value,class:"font-weight-bold",color:"primary"},{default:v(()=>[k(se(N()),1)]),_:1},8,["size"])]),_:1},16,["size"])]),default:v(()=>[C("span",null," Visit the "+se(g.value)+" associated to this printer ",1)]),_:1})]),default:v(()=>[p(ft,{class:"font-weight-bold"},{default:v(()=>[k(se(l.value.name),1)]),_:1}),p(St),p(J7,null,{default:v(()=>{var q,ce,de,be;return[!y.value||!c.value?($(),ve("strong",p9,se(y.value?"Enabled":"Disabled")+" - "+se(c.value?(ce=(q=T.value)==null?void 0:q.text)==null?void 0:ce.toUpperCase():"Offline"),1)):pe("",!0),y.value&&((de=T.value)!=null&&de.text)&&m.value&&c.value?($(),ve("strong",m9," Enabled - "+se((be=T.value)==null?void 0:be.text),1)):pe("",!0)]}),_:1}),A.value?($(),te(St,{key:0},{default:v(()=>{var q,ce,de,be;return[(q=A.value)!=null&&q.progress?($(),ve("span",g9," Progress: "+se(O((ce=A.value)==null?void 0:ce.progress.completion))+"% ",1)):pe("",!0),(de=A.value)!=null&&de.progress?($(),te(uu,{key:1,"model-value":O((be=A.value.progress)==null?void 0:be.completion),class:"mt-1 mb-1",height:"8px"},null,8,["model-value"])):pe("",!0),p(ot,{location:"bottom"},{activator:v(({props:Ce})=>[p(ne,me({size:"small"},Ce,{variant:"outlined"}),{default:v(()=>[k(se(E.value),1)]),_:1},16)]),default:v(()=>[C("span",null,se(E.value),1)]),_:1})]}),_:1})):pe("",!0)]),_:1})):pe("",!0),!y.value||!c.value?($(),te(vn,{key:1,color:"primary"},{default:v(()=>[y.value?($(),ve("span",y9,[k(" This "+se(g.value)+" seems unreachable... Will keep trying for you ",1),p(Z,null,{default:v(()=>[...G[16]||(G[16]=[k("hourglass_top",-1)])]),_:1})])):($(),ve("span",v9," Disabled "+se(g.value)+", enable it first to get live updates ",1))]),_:1})):pe("",!0),!((De=l.value)!=null&&De.enabled)&&!((B=l.value)!=null&&B.disabledReason)?($(),te(vn,{key:2,color:"secondary"},{default:v(()=>[k(" This "+se(g.value)+" was disabled without reason. ",1)]),_:1})):pe("",!0),(z=l.value)!=null&&z.disabledReason?($(),te(vn,{key:3,color:"black"},{default:v(()=>{var q;return[k(" This "+se(g.value)+" was disabled for maintenance: ",1),G[17]||(G[17]=C("br",null,null,-1)),C("small",null," "+se((q=l.value)==null?void 0:q.disabledReason),1)]}),_:1})):pe("",!0),p(ln),zt(($(),te(Ht,{density:"compact"},{default:v(()=>[p(Nr,{inset:""},{default:v(()=>[...G[18]||(G[18]=[k(" Manage FDM Monster instance",-1)])]),_:1}),p(ot,{location:"left"},{activator:v(({props:q})=>[p(ze,me({class:"extra-dense-list-item",link:""},q,{onClick:G[2]||(G[2]=Et(ce=>D(),["prevent","stop"]))}),{prepend:v(()=>[p(dt,{size:r.value,class:"ml-3 mr-6 ma-5"},{default:v(()=>[d.value?($(),te(vs,{key:0,src:J(Gy)},null,8,["src"])):f.value?($(),ve("span",b9,"MR")):h.value?($(),ve("span",w9,"PL")):($(),ve("span",S9,"?"))]),_:1},8,["size"])]),default:v(()=>[C("span",null," Open "+se(g.value),1)]),_:1},16)]),default:v(()=>[C("span",null," Visit the "+se(g.value)+" associated to this printer ",1)]),_:1}),f.value?($(),te(ot,{key:0,location:"left"},{activator:v(({props:q})=>[p(ze,me({class:"extra-dense-list-item",link:""},q,{onClick:G[3]||(G[3]=Et(ce=>W(),["prevent","stop"]))}),{prepend:v(()=>[p(dt,{size:r.value,class:"ml-3 mr-6 ma-5"},{default:v(()=>[...G[19]||(G[19]=[C("span",null,"MA",-1)])]),_:1},8,["size"])]),default:v(()=>[G[20]||(G[20]=C("span",null," Open Mainsail ",-1))]),_:1},16)]),default:v(()=>[G[21]||(G[21]=C("span",null," Visit the Mainsail for this printer ",-1))]),_:1})):pe("",!0),p(ot,{location:"left"},{activator:v(({props:q})=>[p(ze,me({class:"extra-dense-list-item",link:""},q,{onClick:G[4]||(G[4]=Et(ce=>Q(),["prevent","stop"]))}),{prepend:v(()=>[p(dt,{size:r.value,color:"grey-lighten-1"},{default:v(()=>[p(Z,{color:y.value?"primary":"green"},{default:v(()=>[...G[22]||(G[22]=[k(" dns",-1)])]),_:1},8,["color"])]),_:1},8,["size"])]),default:v(()=>[y.value?($(),ve("span",_9," Disable Printer Location ")):y.value?pe("",!0):($(),ve("span",k9," Enable Printer Location "))]),_:1},16)]),default:v(()=>[G[23]||(G[23]=C("span",null," Deactivate connection, without impacting print ",-1))]),_:1}),p(ot,{location:"left"},{activator:v(({props:q})=>[p(ze,me({class:"extra-dense-list-item",link:""},q,{onClick:G[5]||(G[5]=Et(ce=>V(),["prevent","stop"]))}),{default:v(()=>[p(dt,{size:r.value,color:"grey-lighten-1"},{default:v(()=>[p(Z,{color:w.value?"green":"primary"},{default:v(()=>[...G[24]||(G[24]=[k(" construction ",-1)])]),_:1},8,["color"])]),_:1},8,["size"]),w.value?w.value?($(),ve("span",E9," Complete Maintenance ")):pe("",!0):($(),ve("span",x9," Enable Maintenance "))]),_:1},16)]),default:v(()=>[G[25]||(G[25]=C("span",null," Deactivate, set under repair, without impacting print ",-1))]),_:1}),p(ot,{location:"left"},{activator:v(({props:q})=>[p(ze,me({class:"extra-dense-list-item",link:""},q,{onClick:G[6]||(G[6]=Et(ce=>L(),["prevent","stop"]))}),{default:v(()=>[p(dt,{size:r.value},{default:v(()=>[p(Z,{color:w.value?"green":"primary",class:"grey-lighten-1"},{default:v(()=>[...G[26]||(G[26]=[k(" autorenew ",-1)])]),_:1},8,["color"])]),_:1},8,["size"]),G[27]||(G[27]=C("span",null,[k(" Refresh State "),C("small",null," - this does not affect the print! ")],-1))]),_:1},16)]),default:v(()=>[G[28]||(G[28]=C("span",null," Let FDM Monster know you are experiencing inconsistencies, reset all volatile states ",-1))]),_:1}),p(ln),p(Nr,{inset:""},{default:v(()=>[...G[29]||(G[29]=[k(" Commands",-1)])]),_:1}),p(ot,{location:"left"},{activator:v(({props:q})=>{var ce;return[p(ze,me({disabled:!((ce=l.value)!=null&&ce.enabled)||!c.value,class:"extra-dense-list-item",link:""},q,{onClick:G[7]||(G[7]=Et(de=>U(),["prevent","stop"]))}),{default:v(()=>[p(dt,{size:r.value},{default:v(()=>[p(Z,null,{default:v(()=>[...G[30]||(G[30]=[k(" usb",-1)])]),_:1})]),_:1},8,["size"]),_.value?($(),ve("span",C9," Disconnect USB & Stop Print ")):m.value?($(),ve("span",T9," Disconnect USB ")):($(),ve("span",P9," Connect USB "))]),_:1},16,["disabled"])]}),default:v(()=>[G[31]||(G[31]=C("span",null," Disconnect USB, disrupting any print ",-1))]),_:1}),p(ot,{location:"left"},{activator:v(({props:q})=>[p(ze,me({disabled:!c.value||!b.value,class:"extra-dense-list-item",link:""},q,{onClick:G[8]||(G[8]=Et(ce=>S.value?F():j(),["prevent","stop"]))}),{default:v(()=>[p(dt,{size:r.value},{default:v(()=>[S.value?pe("",!0):($(),te(Z,{key:0},{default:v(()=>[...G[32]||(G[32]=[k(" pause",-1)])]),_:1})),S.value?($(),te(Z,{key:1},{default:v(()=>[...G[33]||(G[33]=[k(" play_circle_outline",-1)])]),_:1})):pe("",!0)]),_:1},8,["size"]),k(" "+se(S.value?"Resume print":"Pause print"),1)]),_:1},16,["disabled"])]),default:v(()=>[G[34]||(G[34]=C("span",null," Send Pause or Resume command ",-1))]),_:1}),p(ot,{location:"left"},{activator:v(({props:q})=>[p(ze,me({disabled:!_.value,class:"extra-dense-list-item",link:""},q,{onClick:G[9]||(G[9]=Et(ce=>oe(),["prevent","stop"]))}),{default:v(()=>[p(dt,{size:r.value},{default:v(()=>[p(Z,null,{default:v(()=>[...G[35]||(G[35]=[k(" stop",-1)])]),_:1})]),_:1},8,["size"]),G[36]||(G[36]=k(" Cancel print ",-1))]),_:1},16,["disabled"])]),default:v(()=>[G[37]||(G[37]=C("span",null," Cancel print gracefully ",-1))]),_:1}),p(ot,{location:"left"},{activator:v(({props:q})=>[p(ze,me({disabled:!P.value,class:"extra-dense-list-item",link:""},q,{onClick:G[10]||(G[10]=Et(ce=>re(),["prevent","stop"]))}),{default:v(()=>[p(dt,{size:r.value},{default:v(()=>[p(Z,null,{default:v(()=>[...G[38]||(G[38]=[k(" delete",-1)])]),_:1})]),_:1},8,["size"]),G[39]||(G[39]=k(" Delete files ",-1))]),_:1},16,["disabled"])]),default:v(()=>[G[40]||(G[40]=C("span",null," Clear all files present on OctoPrint (local) ",-1))]),_:1}),p(ot,{location:"left"},{activator:v(({props:q})=>[p(ze,me({class:"extra-dense-list-item",link:""},q,{onClick:G[11]||(G[11]=Et(ce=>R(),["prevent","stop"]))}),{default:v(()=>[p(dt,{size:r.value},{default:v(()=>[p(Z,null,{default:v(()=>[...G[41]||(G[41]=[k(" refresh",-1)])]),_:1})]),_:1},8,["size"]),G[42]||(G[42]=k(" Refresh files ",-1))]),_:1},16)]),default:v(()=>[G[43]||(G[43]=C("span",null," Rebuild the file list on OctoPrint (local) ",-1))]),_:1}),p(ot,{location:"left"},{activator:v(({props:q})=>[p(ze,me({class:"extra-dense-list-item",link:""},q,{onClick:G[12]||(G[12]=Et(ce=>ae(),["prevent","stop"]))}),{default:v(()=>[p(dt,{size:r.value},{default:v(()=>[p(Z,null,{default:v(()=>[...G[44]||(G[44]=[k(" settings",-1)])]),_:1})]),_:1},8,["size"]),G[45]||(G[45]=k(" Settings ",-1))]),_:1},16)]),default:v(()=>[G[46]||(G[46]=C("span",null," Edit the printer settings ",-1))]),_:1})]),_:1})),[[_e,{printers:[l.value]}]]),p(ln),zt(($(),te(Ht,{density:"compact"},{default:v(()=>[p(Nr,{inset:""},{default:v(()=>[...G[47]||(G[47]=[k(" Files - drag 'n drop!",-1)])]),_:1}),p(at,{modelValue:s.value,"onUpdate:modelValue":G[13]||(G[13]=q=>s.value=q),class:"ml-5 mr-5",clearable:"",label:"Search files...","prepend-icon":"search"},null,8,["modelValue"]),x.value.length?pe("",!0):($(),te(ze,{key:0},{default:v(()=>[p(dt,{size:r.value},{default:v(()=>[p(Z,null,{default:v(()=>[...G[48]||(G[48]=[k(" clear",-1)])]),_:1})]),_:1},8,["size"]),p(ft,null,{default:v(()=>[...G[49]||(G[49]=[k(" No files to show",-1)])]),_:1})]),_:1})),a.value?($(),te(uu,{key:1,indeterminate:""})):pe("",!0),($(!0),ve(Oe,null,Qt(x.value,(q,ce)=>($(),te(ze,{key:ce,density:"compact",link:"",style:{"padding-top":"0"}},{default:v(()=>[p(dt,{size:r.value},{default:v(()=>[p(ot,{location:"left"},{activator:v(({props:de})=>[p(ne,me({ref_for:!0},de,{onClick:be=>X(q.path)}),{default:v(()=>[p(Z,null,{default:v(()=>[...G[50]||(G[50]=[k(" download",-1)])]),_:1})]),_:1},16,["onClick"])]),default:v(()=>[G[51]||(G[51]=C("span",null," Download GCode ",-1))]),_:2},1024)]),_:2},1032,["size"]),p(Su,null,{default:v(()=>[p(ot,{location:"left"},{activator:v(({props:de})=>[p(ne,me({disabled:H(q),icon:""},{ref_for:!0},de,{onClick:be=>Se(q)}),{default:v(()=>[p(Z,null,{default:v(()=>[...G[52]||(G[52]=[k(" play_arrow",-1)])]),_:1})]),_:1},16,["disabled","onClick"])]),default:v(()=>[G[53]||(G[53]=C("span",null," Select & Print ",-1))]),_:2},1024)]),_:2},1024),p(ot,{location:"left"},{activator:v(({props:de})=>[C("span",me({class:{"current-file-print":H(q)}},{ref_for:!0},de),se(q.path),17)]),default:v(()=>[C("span",null,[k(" File: "+se(q.path)+" ",1),G[54]||(G[54]=C("br",null,null,-1)),k(" Size: "+se(J(HO)(q.size))+" ",1),G[55]||(G[55]=C("br",null,null,-1)),C("strong",null,se(H(q)?"Printing":"Unused"),1)])]),_:2},1024),p(Su,null,{default:v(()=>[p(ot,{location:"left"},{activator:v(({props:de})=>[p(ne,me({disabled:H(q)},{ref_for:!0},de,{onClick:be=>I(q)}),{default:v(()=>[p(Z,{color:"grey-lighten-1"},{default:v(()=>[...G[56]||(G[56]=[k(" delete",-1)])]),_:1})]),_:1},16,["disabled","onClick"])]),default:v(()=>[G[57]||(G[57]=C("span",null," Delete file ",-1))]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))]),_:1})),[[_e,{printers:[l.value]}]])]}),_:1},8,["modelValue"])}}});class Mp extends kr{static async downloadYamlExport(t){const r=await(await nr()).request({method:"POST",url:"api/server/export-printers-floors-yaml",data:t,responseType:"arraybuffer"});Hy(r.data,"export-fdm-monster-"+Date.now()+".yaml")}static async uploadAndImportYaml(t){const n=new FormData;return n.append("file",t),await this.postUpload("api/server/import-printers-floors-yaml",n,{})}static async downloadLogDump(){const n=await(await nr()).request({method:"POST",url:"api/server/dump-fdm-monster-logs",responseType:"arraybuffer"});Hy(n.data,"logs-fdm-monster-"+Date.now()+".zip")}static async clearLogFilesOlderThanWeek(){return await this.delete("api/server/clear-outdated-fdm-monster-logs")}}class _a extends kr{static async updateClientDistGithub(t,n){return await this.post("/api/server/update-client-bundle-github",{downloadRelease:t,allowDowngrade:n})}static async getGithubRateLimit(){return await this.get("/api/server/github-rate-limit")}static async getClientReleases(){return await this.get("/api/server/client-releases")}static async getVersion(){return await this.get("/api/version")}static async getFeatures(){return await this.get("/api/features")}static async test(){return await(await nr(!1,!1)).get("/api/test")}}const Nm=Ss("Feature",{state:()=>({features:void 0}),getters:{getFeatures(){return this.features},getFeature:e=>t=>{if(!e.features){console.warn("Feature[getFeature] store not loaded");return}return e.features[t]},hasFeature:e=>t=>{if(!e.features)return console.warn("Feature[hasFeature] store not loaded"),!1;const n=e.features[t];return n?n==null?void 0:n.available:(console.debug(`Feature ${t} not defined. Options:`,Object.keys(e.features)),!1)}},actions:{async loadFeatures(){try{const e=await _a.getFeatures();this.setFeatures(e)}catch{this.features={}}},setFeatures(e){this.features=e}}}),lM=Symbol.for("vuetify:selection-control-group"),_0=he({color:String,disabled:{type:Boolean,default:null},defaultsTarget:String,error:Boolean,id:String,inline:Boolean,falseIcon:He,trueIcon:He,ripple:{type:[Boolean,Object],default:!0},multiple:{type:Boolean,default:null},name:String,readonly:{type:Boolean,default:null},modelValue:null,type:String,valueComparator:{type:Function,default:Dr},...Ge(),...Xn(),...Nt()},"SelectionControlGroup"),I9=he({..._0({defaultsTarget:"VSelectionControl"})},"VSelectionControlGroup"),A9=xe()({name:"VSelectionControlGroup",props:I9(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=lt(e,"modelValue"),s=Vr(),i=ie(()=>e.id||`v-selection-control-group-${s}`),o=ie(()=>e.name||i.value),a=new Set;return Jt(lM,{modelValue:r,forceUpdate:()=>{a.forEach(l=>l())},onForceUpdate:l=>{a.add(l),dn(()=>{a.delete(l)})}}),Br({[e.defaultsTarget]:{color:ie(()=>e.color),disabled:ie(()=>e.disabled),density:ie(()=>e.density),error:ie(()=>e.error),inline:ie(()=>e.inline),modelValue:r,multiple:ie(()=>!!e.multiple||e.multiple==null&&Array.isArray(r.value)),name:o,falseIcon:ie(()=>e.falseIcon),trueIcon:ie(()=>e.trueIcon),readonly:ie(()=>e.readonly),ripple:ie(()=>e.ripple),type:ie(()=>e.type),valueComparator:ie(()=>e.valueComparator)}}),Me(()=>{var l;return C("div",{class:Re(["v-selection-control-group",{"v-selection-control-group--inline":e.inline},e.class]),style:Be(e.style),role:e.type==="radio"?"radiogroup":void 0},[(l=n.default)==null?void 0:l.call(n)])}),{}}}),Bm=he({label:String,baseColor:String,trueValue:null,falseValue:null,value:null,...Ge(),..._0()},"VSelectionControl");function O9(e){const t=Je(lM,void 0),{densityClasses:n}=ks(e),r=lt(e,"modelValue"),s=M(()=>e.trueValue!==void 0?e.trueValue:e.value!==void 0?e.value:!0),i=M(()=>e.falseValue!==void 0?e.falseValue:!1),o=M(()=>!!e.multiple||e.multiple==null&&Array.isArray(r.value)),a=M({get(){const h=t?t.modelValue.value:r.value;return o.value?Fn(h).some(g=>e.valueComparator(g,s.value)):e.valueComparator(h,s.value)},set(h){if(e.readonly)return;const g=h?s.value:i.value;let m=g;o.value&&(m=h?[...Fn(r.value),g]:Fn(r.value).filter(y=>!e.valueComparator(y,s.value))),t?t.modelValue.value=m:r.value=m}}),{textColorClasses:l,textColorStyles:u}=Fs(()=>{if(!(e.error||e.disabled))return a.value?e.color:e.baseColor}),{backgroundColorClasses:c,backgroundColorStyles:d}=vr(()=>a.value&&!e.error&&!e.disabled?e.color:e.baseColor),f=M(()=>a.value?e.trueIcon:e.falseIcon);return{group:t,densityClasses:n,trueValue:s,falseValue:i,model:a,textColorClasses:l,textColorStyles:u,backgroundColorClasses:c,backgroundColorStyles:d,icon:f}}const el=xe()({name:"VSelectionControl",directives:{vRipple:Ns},inheritAttrs:!1,props:Bm(),emits:{"update:modelValue":e=>!0},setup(e,t){let{attrs:n,slots:r}=t;const{group:s,densityClasses:i,icon:o,model:a,textColorClasses:l,textColorStyles:u,backgroundColorClasses:c,backgroundColorStyles:d,trueValue:f}=O9(e),h=Vr(),g=Pe(!1),m=Pe(!1),y=K(),w=ie(()=>e.id||`input-${h}`),b=ie(()=>!e.disabled&&!e.readonly);s==null||s.onForceUpdate(()=>{y.value&&(y.value.checked=a.value)});function x(A){b.value&&(g.value=!0,tp(A.target,":focus-visible")!==!1&&(m.value=!0))}function _(){g.value=!1,m.value=!1}function S(A){A.stopPropagation()}function P(A){if(!b.value){y.value&&(y.value.checked=a.value);return}e.readonly&&s&&Pt(()=>s.forceUpdate()),a.value=A.target.checked}return Me(()=>{var I,O;const A=r.label?r.label({label:e.label,props:{for:w.value}}):e.label,[E,T]=il(n),R=C("input",me({ref:y,checked:a.value,disabled:!!e.disabled,id:w.value,onBlur:_,onFocus:x,onInput:P,"aria-disabled":!!e.disabled,"aria-label":e.label,type:e.type,value:f.value,name:e.name,"aria-checked":e.type==="checkbox"?a.value:void 0},T),null);return C("div",me({class:["v-selection-control",{"v-selection-control--dirty":a.value,"v-selection-control--disabled":e.disabled,"v-selection-control--error":e.error,"v-selection-control--focused":g.value,"v-selection-control--focus-visible":m.value,"v-selection-control--inline":e.inline},i.value,e.class]},E,{style:e.style}),[C("div",{class:Re(["v-selection-control__wrapper",l.value]),style:Be(u.value)},[(I=r.default)==null?void 0:I.call(r,{backgroundColorClasses:c,backgroundColorStyles:d}),zt(C("div",{class:Re(["v-selection-control__input"])},[((O=r.input)==null?void 0:O.call(r,{model:a,textColorClasses:l,textColorStyles:u,backgroundColorClasses:c,backgroundColorStyles:d,inputNode:R,icon:o.value,props:{onFocus:x,onBlur:_,id:w.value}}))??C(Oe,null,[o.value&&p(Z,{key:"icon",icon:o.value},null),R])]),[[Ns,!e.disabled&&!e.readonly&&e.ripple,null,{center:!0,circle:!0}]])]),A&&p(S0,{for:w.value,onClick:S},{default:()=>[A]})])}),{isFocused:g,input:y}}}),uM=he({indeterminate:Boolean,indeterminateIcon:{type:He,default:"$checkboxIndeterminate"},...Bm({falseIcon:"$checkboxOff",trueIcon:"$checkboxOn"})},"VCheckboxBtn"),ku=xe()({name:"VCheckboxBtn",props:uM(),emits:{"update:modelValue":e=>!0,"update:indeterminate":e=>!0},setup(e,t){let{slots:n}=t;const r=lt(e,"indeterminate"),s=lt(e,"modelValue");function i(l){r.value&&(r.value=!1)}const o=ie(()=>r.value?e.indeterminateIcon:e.falseIcon),a=ie(()=>r.value?e.indeterminateIcon:e.trueIcon);return Me(()=>{const l=Ur(el.filterProps(e),["modelValue"]);return p(el,me(l,{modelValue:s.value,"onUpdate:modelValue":[u=>s.value=u,i],class:["v-checkbox-btn",e.class],style:e.style,type:"checkbox",falseIcon:o.value,trueIcon:a.value,"aria-checked":r.value?"mixed":void 0}),n)}),{}}}),M9=he({...dl(),...Ur(uM(),["inline"])},"VCheckbox"),bn=xe()({name:"VCheckbox",inheritAttrs:!1,props:M9(),emits:{"update:modelValue":e=>!0,"update:focused":e=>!0},setup(e,t){let{attrs:n,slots:r}=t;const s=lt(e,"modelValue"),{isFocused:i,focus:o,blur:a}=Xu(e),l=K(),u=Vr();return Me(()=>{const[c,d]=il(n),f=ys.filterProps(e),h=ku.filterProps(e);return p(ys,me({ref:l,class:["v-checkbox",e.class]},c,f,{modelValue:s.value,"onUpdate:modelValue":g=>s.value=g,id:e.id||`checkbox-${u}`,focused:i.value,style:e.style}),{...r,default:g=>{let{id:m,messagesId:y,isDisabled:w,isReadonly:b,isValid:x}=g;return p(ku,me(h,{id:m.value,"aria-describedby":y.value,disabled:w.value,readonly:b.value},d,{error:x.value===!1,modelValue:s.value,"onUpdate:modelValue":_=>s.value=_,onFocus:o,onBlur:a}),r)}})}),Es({},l)}});function D9(){function e(n){var s,i;return[...((s=n.dataTransfer)==null?void 0:s.items)??[]].filter(o=>o.kind==="file").map(o=>o.webkitGetAsEntry()).filter(Boolean).length>0||[...((i=n.dataTransfer)==null?void 0:i.files)??[]].length>0}async function t(n){var i,o;const r=[],s=[...((i=n.dataTransfer)==null?void 0:i.items)??[]].filter(a=>a.kind==="file").map(a=>a.webkitGetAsEntry()).filter(Boolean);if(s.length)for(const a of s){const l=await cM(a,dM(".",a));r.push(...l.map(u=>u.file))}else r.push(...((o=n.dataTransfer)==null?void 0:o.files)??[]);return r}return{handleDrop:t,hasFilesOrFolders:e}}function cM(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return new Promise((n,r)=>{e.isFile?e.file(i=>n([{file:i,path:t}]),r):e.isDirectory&&e.createReader().readEntries(async i=>{const o=[];for(const a of i)o.push(...await cM(a,dM(t,a)));n(o)})})}function dM(e,t){return t.isDirectory?`${e}/${t.name}`:e}const L9=he({filterByType:String},"file-accept");function $9(e){const t=M(()=>e.filterByType?F9(e.filterByType):null);function n(r){if(t.value){const s=r.filter(t.value);return{accepted:s,rejected:r.filter(i=>!s.includes(i))}}return{accepted:r,rejected:[]}}return{filterAccepted:n}}function F9(e){const t=e.split(",").map(i=>i.trim().toLowerCase()),n=t.filter(i=>i.startsWith(".")),r=t.filter(i=>i.endsWith("/*")),s=t.filter(i=>!n.includes(i)&&!r.includes(i));return i=>{var l,u;const o=((l=i.name.split(".").at(-1))==null?void 0:l.toLowerCase())??"",a=((u=i.type.split("/").at(0))==null?void 0:u.toLowerCase())??"";return s.includes(i.type)||n.includes(`.${o}`)||r.includes(`${a}/*`)}}const N9=he({chips:Boolean,counter:Boolean,counterSizeString:{type:String,default:"$vuetify.fileInput.counterSize"},counterString:{type:String,default:"$vuetify.fileInput.counter"},hideInput:Boolean,multiple:Boolean,showSize:{type:[Boolean,Number,String],default:!1,validator:e=>typeof e=="boolean"||[1e3,1024].includes(Number(e))},truncateLength:{type:[Number,String],default:22},...dl({prependIcon:"$file"}),modelValue:{type:[Array,Object],default:e=>e.multiple?[]:null,validator:e=>Fn(e).every(t=>t!=null&&typeof t=="object")},...L9(),...Fm({clearable:!0})},"VFileInput"),fM=xe()({name:"VFileInput",inheritAttrs:!1,props:N9(),emits:{"click:control":e=>!0,"mousedown:control":e=>!0,"update:focused":e=>!0,"update:modelValue":e=>!0,rejected:e=>!0},setup(e,t){let{attrs:n,emit:r,slots:s}=t;const{t:i}=zr(),{filterAccepted:o}=$9(e),a=lt(e,"modelValue",e.modelValue,V=>Fn(V),V=>!e.multiple&&Array.isArray(V)?V[0]:V),{isFocused:l,focus:u,blur:c}=Xu(e),d=M(()=>typeof e.showSize!="boolean"?e.showSize:void 0),f=M(()=>(a.value??[]).reduce((V,L)=>{let{size:oe=0}=L;return V+oe},0)),h=M(()=>dS(f.value,d.value)),g=M(()=>(a.value??[]).map(V=>{const{name:L="",size:oe=0}=V,j=H(L);return e.showSize?`${j} (${dS(oe,d.value)})`:j})),m=M(()=>{var L;const V=((L=a.value)==null?void 0:L.length)??0;return e.showSize?i(e.counterSizeString,V,h.value):i(e.counterString,V)}),y=K(),w=K(),b=K(),x=ie(()=>l.value||e.active),_=M(()=>["plain","underlined"].includes(e.variant)),S=Pe(!1),{handleDrop:P,hasFilesOrFolders:A}=D9();function E(){var V;b.value!==document.activeElement&&((V=b.value)==null||V.focus()),l.value||u()}function T(V){var L;(L=b.value)==null||L.click()}function R(V){r("mousedown:control",V)}function I(V){var L;(L=b.value)==null||L.click(),r("click:control",V)}function O(V){V.stopPropagation(),E(),Pt(()=>{a.value=[],Ud(e["onClick:clear"],V)})}function H(V){if(V.length<Number(e.truncateLength))return V;const L=Math.floor((Number(e.truncateLength)-1)/2);return`${V.slice(0,L)}…${V.slice(V.length-L)}`}function N(V){V.preventDefault(),V.stopImmediatePropagation(),S.value=!0}function D(V){V.preventDefault(),S.value=!1}async function W(V){if(V.preventDefault(),V.stopImmediatePropagation(),S.value=!1,!b.value||!A(V))return;const L=await P(V);Q(L)}function U(V){if(!(!V.target||V.repack))if(e.filterByType)Q([...V.target.files]);else{const L=V.target;a.value=[...L.files??[]]}}function Q(V){const L=new DataTransfer,{accepted:oe,rejected:j}=o(V);j.length&&r("rejected",j);for(const re of oe)L.items.add(re);b.value.files=L.files,a.value=[...L.files];const F=new Event("change",{bubbles:!0});F.repack=!0,b.value.dispatchEvent(F)}return Ee(a,V=>{(!Array.isArray(V)||!V.length)&&b.value&&(b.value.value="")}),Me(()=>{const V=!!(s.counter||e.counter),L=!!(V||s.details),[oe,j]=il(n),{modelValue:F,...re}=ys.filterProps(e),ae={..._u.filterProps(e),"onClick:clear":O},Se=n.webkitdirectory!==void 0&&n.webkitdirectory!==!1,X=n.accept?String(n.accept):void 0,le=Se?void 0:e.filterByType??X;return p(ys,me({ref:y,modelValue:e.multiple?a.value:a.value[0],class:["v-file-input",{"v-file-input--chips":!!e.chips,"v-file-input--dragging":S.value,"v-file-input--hide":e.hideInput,"v-input--plain-underlined":_.value},e.class],style:e.style,"onClick:prepend":T},oe,re,{centerAffix:!_.value,focused:l.value}),{...s,default:ee=>{let{id:G,isDisabled:_e,isDirty:De,isReadonly:B,isValid:z,hasDetails:q}=ee;return p(_u,me({ref:w,prependIcon:e.prependIcon,onMousedown:R,onClick:I,"onClick:prependInner":e["onClick:prependInner"],"onClick:appendInner":e["onClick:appendInner"]},ae,{id:G.value,active:x.value||De.value,dirty:De.value||e.dirty,disabled:_e.value,focused:l.value,details:q.value,error:z.value===!1,onDragover:N,onDrop:W}),{...s,default:ce=>{var Ce;let{props:{class:de,...be}}=ce;return C(Oe,null,[C("input",me({ref:b,type:"file",accept:le,readonly:B.value,disabled:_e.value,multiple:e.multiple,name:e.name,onClick:ye=>{ye.stopPropagation(),B.value&&ye.preventDefault(),E()},onChange:U,onDragleave:D,onFocus:E,onBlur:c},be,j),null),C("div",{class:Re(de)},[!!((Ce=a.value)!=null&&Ce.length)&&!e.hideInput&&(s.selection?s.selection({fileNames:g.value,totalBytes:f.value,totalBytesReadable:h.value}):e.chips?g.value.map(ye=>p(In,{key:ye,size:"small",text:ye},null)):g.value.join(", "))])])}})},details:L?ee=>{var G,_e;return C(Oe,null,[(G=s.details)==null?void 0:G.call(s,ee),V&&C(Oe,null,[C("span",null,null),p(w0,{active:!!((_e=a.value)!=null&&_e.length),value:m.value,disabled:e.disabled},s.counter)])])}:void 0})}),Es({},y,w,b)}}),B9=he({...Bm({falseIcon:"$radioOff",trueIcon:"$radioOn"})},"VRadio"),Yy=xe()({name:"VRadio",props:B9(),setup(e,t){let{slots:n}=t;return Me(()=>{const r=el.filterProps(e);return p(el,me(r,{class:["v-radio",e.class],style:e.style,type:"radio"}),n)}),{}}}),V9=he({height:{type:[Number,String],default:"auto"},...dl(),...Ur(_0(),["multiple"]),trueIcon:{type:He,default:"$radioOn"},falseIcon:{type:He,default:"$radioOff"},type:{type:String,default:"radio"}},"VRadioGroup"),hM=xe()({name:"VRadioGroup",inheritAttrs:!1,props:V9(),emits:{"update:modelValue":e=>!0},setup(e,t){let{attrs:n,slots:r}=t;const s=Vr(),i=M(()=>e.id||`radio-group-${s}`),o=lt(e,"modelValue"),a=K();return Me(()=>{const[l,u]=il(n),c=ys.filterProps(e),d=el.filterProps(e),f=r.label?r.label({label:e.label,props:{for:i.value}}):e.label;return p(ys,me({ref:a,class:["v-radio-group",e.class],style:e.style},l,c,{modelValue:o.value,"onUpdate:modelValue":h=>o.value=h,id:i.value}),{...r,default:h=>{let{id:g,messagesId:m,isDisabled:y,isReadonly:w}=h;return C(Oe,null,[f&&p(S0,{id:g.value},{default:()=>[f]}),p(A9,me(d,{id:g.value,"aria-describedby":m.value,defaultsTarget:"VRadio",trueIcon:e.trueIcon,falseIcon:e.falseIcon,type:e.type,disabled:y.value,readonly:w.value,"aria-labelledby":f?g.value:void 0,multiple:!1},u,{modelValue:o.value,"onUpdate:modelValue":b=>o.value=b}),r)])}})}),Es({},a)}}),U9=he({autoGrow:Boolean,autofocus:Boolean,counter:[Boolean,Number,String],counterValue:Function,prefix:String,placeholder:String,persistentPlaceholder:Boolean,persistentCounter:Boolean,noResize:Boolean,rows:{type:[Number,String],default:5,validator:e=>!isNaN(parseFloat(e))},maxRows:{type:[Number,String],validator:e=>!isNaN(parseFloat(e))},suffix:String,modelModifiers:Object,...sM(),...dl(),...Fm()},"VTextarea"),pM=xe()({name:"VTextarea",directives:{vIntersect:wu},inheritAttrs:!1,props:U9(),emits:{"click:control":e=>!0,"mousedown:control":e=>!0,"update:focused":e=>!0,"update:modelValue":e=>!0,"update:rows":e=>!0},setup(e,t){let{attrs:n,emit:r,slots:s}=t;const i=lt(e,"modelValue"),{isFocused:o,focus:a,blur:l}=Xu(e),{onIntersect:u}=oM(e),c=M(()=>typeof e.counterValue=="function"?e.counterValue(i.value):(i.value||"").toString().length),d=M(()=>{if(n.maxlength)return n.maxlength;if(!(!e.counter||typeof e.counter!="number"&&typeof e.counter!="string"))return e.counter}),f=K(),h=K(),g=Pe(""),m=K(),y=iM(e),w=M(()=>e.persistentPlaceholder||o.value||e.active);function b(){var O;y.isSuppressing.value&&y.update(),m.value!==document.activeElement&&((O=m.value)==null||O.focus()),o.value||a()}function x(O){b(),r("click:control",O)}function _(O){r("mousedown:control",O)}function S(O){O.stopPropagation(),b(),Pt(()=>{i.value="",Ud(e["onClick:clear"],O)})}function P(O){var N;const H=O.target;if(i.value=H.value,(N=e.modelModifiers)!=null&&N.trim){const D=[H.selectionStart,H.selectionEnd];Pt(()=>{H.selectionStart=D[0],H.selectionEnd=D[1]})}}const A=K(),E=K(Number(e.rows)),T=M(()=>["plain","underlined"].includes(e.variant));Cn(()=>{e.autoGrow||(E.value=Number(e.rows))});function R(){e.autoGrow&&Pt(()=>{if(!A.value||!h.value)return;const O=getComputedStyle(A.value),H=getComputedStyle(h.value.$el),N=parseFloat(O.getPropertyValue("--v-field-padding-top"))+parseFloat(O.getPropertyValue("--v-input-padding-top"))+parseFloat(O.getPropertyValue("--v-field-padding-bottom")),D=A.value.scrollHeight,W=parseFloat(O.lineHeight),U=Math.max(parseFloat(e.rows)*W+N,parseFloat(H.getPropertyValue("--v-input-control-height"))),Q=parseFloat(e.maxRows)*W+N||1/0,V=Nn(D??0,U,Q);E.value=Math.floor((V-N)/W),g.value=Ne(V)})}yt(R),Ee(i,R),Ee(()=>e.rows,R),Ee(()=>e.maxRows,R),Ee(()=>e.density,R),Ee(E,O=>{r("update:rows",O)});let I;return Ee(A,O=>{O?(I=new ResizeObserver(R),I.observe(A.value)):I==null||I.disconnect()}),Vn(()=>{I==null||I.disconnect()}),Me(()=>{const O=!!(s.counter||e.counter||e.counterValue),H=!!(O||s.details),[N,D]=il(n),{modelValue:W,...U}=ys.filterProps(e),Q={..._u.filterProps(e),"onClick:clear":S};return p(ys,me({ref:f,modelValue:i.value,"onUpdate:modelValue":V=>i.value=V,class:["v-textarea v-text-field",{"v-textarea--prefixed":e.prefix,"v-textarea--suffixed":e.suffix,"v-text-field--prefixed":e.prefix,"v-text-field--suffixed":e.suffix,"v-textarea--auto-grow":e.autoGrow,"v-textarea--no-resize":e.noResize||e.autoGrow,"v-input--plain-underlined":T.value},e.class],style:e.style},N,U,{centerAffix:E.value===1&&!T.value,focused:o.value}),{...s,default:V=>{let{id:L,isDisabled:oe,isDirty:j,isReadonly:F,isValid:re,hasDetails:ae}=V;return p(_u,me({ref:h,style:{"--v-textarea-control-height":g.value},onClick:x,onMousedown:_,"onClick:prependInner":e["onClick:prependInner"],"onClick:appendInner":e["onClick:appendInner"]},Q,{id:L.value,active:w.value||j.value,centerAffix:E.value===1&&!T.value,dirty:j.value||e.dirty,disabled:oe.value,focused:o.value,details:ae.value,error:re.value===!1}),{...s,default:Se=>{let{props:{class:X,...le}}=Se;return C(Oe,null,[e.prefix&&C("span",{class:"v-text-field__prefix"},[e.prefix]),zt(C("textarea",me({ref:m,class:X,value:i.value,onInput:P,autofocus:e.autofocus,readonly:F.value,disabled:oe.value,placeholder:e.placeholder,rows:e.rows,name:y.fieldName.value,autocomplete:y.fieldAutocomplete.value,onFocus:b,onBlur:l},le,D),null),[[wu,{handler:u},null,{once:!0}]]),e.autoGrow&&zt(C("textarea",{class:Re([X,"v-textarea__sizer"]),id:`${le.id}-sizer`,"onUpdate:modelValue":ee=>i.value=ee,ref:A,readonly:!0,"aria-hidden":"true"},null),[[oF,i.value]]),e.suffix&&C("span",{class:"v-text-field__suffix"},[e.suffix])])}})},details:H?V=>{var L;return C(Oe,null,[(L=s.details)==null?void 0:L.call(s,V),O&&C(Oe,null,[C("span",null,null),p(w0,{active:e.persistentCounter||o.value,value:c.value,max:d.value,disabled:e.disabled},s.counter)])])}:void 0})}),Es({},f,h,m)}}),z9={key:0,class:"pl-2"},H9={key:1},j9=Fe({__name:"YamlImportExportDialog",setup(e){const t=Nm(),n=rn(sn.YamlImportExport),r=Ft(),s=K(""),i=K(""),o=K(0),a=K(!0),l=K(!0),u=K(!0),c=K(!0),d=K(void 0),f=K(""),h=M(()=>!t.hasFeature("printerGroupsApi")),g=M(()=>!!d.value),m=M(()=>o.value===0),y=async()=>{await t.loadFeatures(),u.value=t.hasFeature("printerGroupsApi")},w=async()=>{d.value=void 0,s.value="",i.value="",f.value=""},b=async()=>{l.value&&(c.value=!0),await Mp.downloadYamlExport({exportPrinters:c.value,exportGroups:u.value,exportFloorGrid:l.value,printerComparisonStrategiesByPriority:["name","url"],exportFloors:a.value,floorComparisonStrategiesByPriority:"floor",notes:f.value}),r.openInfoMessage({title:"Downloaded the YAML file"}),f.value=""},x=async()=>{if(s.value="",i.value="",!d.value){s.value="The import file was not specified";return}try{await Mp.uploadAndImportYaml(d.value),d.value=void 0,r.openInfoMessage({title:"Imported the YAML file"}),_()}catch(S){s.value="An error occurred uring import",i.value=S.message.toString(),d.value=void 0}},_=()=>{d.value=void 0,s.value="",i.value="",f.value="",n.closeDialog()};return(S,P)=>{const A=yi;return $(),te(A,{id:J(n).dialogId,"max-width":"700px",onEscape:P[10]||(P[10]=E=>_()),onOpened:w,onBeforeOpened:y},{default:v(()=>[p(kt,{class:"pa-4"},{default:v(()=>[p(an,null,{default:v(()=>[...P[11]||(P[11]=[C("span",{class:"text-h5"}," YAML export and import ",-1)])]),_:1}),p(nn,null,{default:v(()=>[P[18]||(P[18]=C("div",null,"Choose mode:",-1)),p(st,null,{default:v(()=>[P[12]||(P[12]=C("br",null,null,-1)),p(hM,{modelValue:J(o),"onUpdate:modelValue":P[0]||(P[0]=E=>rt(o)?o.value=E:null),class:"ml-3",inline:""},{default:v(()=>[p(Yy,{value:0,label:"Import YAML"}),p(Yy,{value:1,label:"Export YAML"})]),_:1},8,["modelValue"])]),_:1}),C("div",null,[J(m)?($(),ve("div",z9,[p(fM,{modelValue:J(d),"onUpdate:modelValue":P[1]||(P[1]=E=>rt(d)?d.value=E:null),accept:".yaml",label:"Select a YAML file for import *"},null,8,["modelValue"])])):($(),ve("div",H9,[p(bn,{modelValue:J(a),"onUpdate:modelValue":P[2]||(P[2]=E=>rt(a)?a.value=E:null),class:"pa-0 ma-0 mt-2 ml-2",label:"Include floors"},null,8,["modelValue"]),p(bn,{modelValue:J(u),"onUpdate:modelValue":P[3]||(P[3]=E=>rt(u)?u.value=E:null),disabled:J(h),class:"pa-0 ma-0 mt-2 ml-2",label:"Include groups"},null,8,["modelValue","disabled"]),p(bn,{modelValue:J(c),"onUpdate:modelValue":P[4]||(P[4]=E=>rt(c)?c.value=E:null),class:"pa-0 ma-0 ml-2",label:"Include printers"},null,8,["modelValue"]),p(bn,{modelValue:J(l),"onUpdate:modelValue":P[5]||(P[5]=E=>rt(l)?l.value=E:null),class:"pa-0 ma-0 ml-2",label:"Include grid positions (auto-includes printers)"},null,8,["modelValue"]),P[13]||(P[13]=k(" Include notes (for yourself): ",-1)),p(pM,{modelValue:J(f),"onUpdate:modelValue":P[6]||(P[6]=E=>rt(f)?f.value=E:null),rows:"1"},null,8,["modelValue"])])),J(m)?pe("",!0):($(),te(ne,{key:2,onClick:P[7]||(P[7]=E=>b())},{default:v(()=>[p(Z,null,{default:v(()=>[...P[14]||(P[14]=[k("download",-1)])]),_:1}),P[15]||(P[15]=k(" Export YAML file ",-1))]),_:1})),J(m)?($(),te(ne,{key:3,disabled:!J(g),onClick:P[8]||(P[8]=E=>x())},{default:v(()=>[p(Z,null,{default:v(()=>[...P[16]||(P[16]=[k("upload",-1)])]),_:1}),P[17]||(P[17]=k(" Import YAML data ",-1))]),_:1},8,["disabled"])):pe("",!0)])]),_:1}),p(Bn,null,{default:v(()=>[P[20]||(P[20]=C("em",{class:"text-red"}," * indicates required field ",-1)),p(Tn),p(ne,{variant:"text",onClick:P[9]||(P[9]=E=>_())},{default:v(()=>[...P[19]||(P[19]=[k(" Close ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}}),W9="/assets/octofarm-printer-export-Dw0Zh14I.gif",k0=Symbol.for("vuetify:v-stepper"),mM=he({color:String,disabled:{type:[Boolean,String],default:!1},prevText:{type:String,default:"$vuetify.stepper.prev"},nextText:{type:String,default:"$vuetify.stepper.next"}},"VStepperActions"),q9=xe()({name:"VStepperActions",props:mM(),emits:{"click:prev":()=>!0,"click:next":()=>!0},setup(e,t){let{emit:n,slots:r}=t;const{t:s}=zr();function i(){n("click:prev")}function o(){n("click:next")}return Me(()=>{const a={onClick:i},l={onClick:o};return C("div",{class:"v-stepper-actions"},[p($t,{defaults:{VBtn:{disabled:["prev",!0].includes(e.disabled),text:s(e.prevText),variant:"text"}}},{default:()=>{var u;return[((u=r.prev)==null?void 0:u.call(r,{props:a}))??p(ne,a,null)]}}),p($t,{defaults:{VBtn:{color:e.color,disabled:["next",!0].includes(e.disabled),text:s(e.nextText),variant:"tonal"}}},{default:()=>{var u;return[((u=r.next)==null?void 0:u.call(r,{props:l}))??p(ne,l,null)]}})])}),{}}}),x0=Au("v-stepper-header"),G9=he({color:String,title:String,subtitle:String,complete:Boolean,completeIcon:{type:He,default:"$complete"},editable:Boolean,editIcon:{type:He,default:"$edit"},error:Boolean,errorIcon:{type:He,default:"$error"},icon:He,ripple:{type:[Boolean,Object],default:!0},rules:{type:Array,default:()=>[]}},"StepperItem"),K9=he({...G9(),...Hd()},"VStepperItem"),Ph=xe()({name:"VStepperItem",directives:{vRipple:Ns},props:K9(),emits:{"group:selected":e=>!0},setup(e,t){let{slots:n}=t;const r=lu(e,k0,!0),s=M(()=>(r==null?void 0:r.value.value)??e.value),i=M(()=>e.rules.every(f=>f()===!0)),o=M(()=>!e.disabled&&e.editable),a=M(()=>!e.disabled&&e.editable),l=M(()=>e.error||!i.value),u=M(()=>e.complete||e.rules.length>0&&i.value),c=M(()=>l.value?e.errorIcon:u.value?e.completeIcon:r.isSelected.value&&e.editable?e.editIcon:e.icon),d=M(()=>({canEdit:a.value,hasError:l.value,hasCompleted:u.value,title:e.title,subtitle:e.subtitle,step:s.value,value:e.value}));return Me(()=>{var y,w,b;const f=(!r||r.isSelected.value||u.value||a.value)&&!l.value&&!e.disabled,h=!!(e.title!=null||n.title),g=!!(e.subtitle!=null||n.subtitle);function m(){r==null||r.toggle()}return zt(C("button",{class:Re(["v-stepper-item",{"v-stepper-item--complete":u.value,"v-stepper-item--disabled":e.disabled,"v-stepper-item--error":l.value},r==null?void 0:r.selectedClass.value]),disabled:!e.editable,type:"button",onClick:m},[o.value&&Yo(!0,"v-stepper-item"),p(dt,{key:"stepper-avatar",class:"v-stepper-item__avatar",color:f?e.color:void 0,size:24},{default:()=>{var x;return[((x=n.icon)==null?void 0:x.call(n,d.value))??(c.value?p(Z,{icon:c.value},null):s.value)]}}),C("div",{class:"v-stepper-item__content"},[h&&C("div",{key:"title",class:"v-stepper-item__title"},[((y=n.title)==null?void 0:y.call(n,d.value))??e.title]),g&&C("div",{key:"subtitle",class:"v-stepper-item__subtitle"},[((w=n.subtitle)==null?void 0:w.call(n,d.value))??e.subtitle]),(b=n.default)==null?void 0:b.call(n,d.value)])]),[[Ns,e.editable&&e.ripple,null]])}),{}}}),Y9=e=>{const{touchstartX:t,touchendX:n,touchstartY:r,touchendY:s}=e,i=.5,o=16;e.offsetX=n-t,e.offsetY=s-r,Math.abs(e.offsetY)<i*Math.abs(e.offsetX)&&(e.left&&n<t-o&&e.left(e),e.right&&n>t+o&&e.right(e)),Math.abs(e.offsetX)<i*Math.abs(e.offsetY)&&(e.up&&s<r-o&&e.up(e),e.down&&s>r+o&&e.down(e))};function X9(e,t){var r;const n=e.changedTouches[0];t.touchstartX=n.clientX,t.touchstartY=n.clientY,(r=t.start)==null||r.call(t,{originalEvent:e,...t})}function Q9(e,t){var r;const n=e.changedTouches[0];t.touchendX=n.clientX,t.touchendY=n.clientY,(r=t.end)==null||r.call(t,{originalEvent:e,...t}),Y9(t)}function J9(e,t){var r;const n=e.changedTouches[0];t.touchmoveX=n.clientX,t.touchmoveY=n.clientY,(r=t.move)==null||r.call(t,{originalEvent:e,...t})}function Z9(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t={touchstartX:0,touchstartY:0,touchendX:0,touchendY:0,touchmoveX:0,touchmoveY:0,offsetX:0,offsetY:0,left:e.left,right:e.right,up:e.up,down:e.down,start:e.start,move:e.move,end:e.end};return{touchstart:n=>X9(n,t),touchend:n=>Q9(n,t),touchmove:n=>J9(n,t)}}function eK(e,t){var a;const n=t.value,r=n!=null&&n.parent?e.parentElement:e,s=(n==null?void 0:n.options)??{passive:!0},i=(a=t.instance)==null?void 0:a.$.uid;if(!r||i===void 0)return;const o=Z9(t.value);r._touchHandlers=r._touchHandlers??Object.create(null),r._touchHandlers[i]=o,gP(o).forEach(l=>{r.addEventListener(l,o[l],s)})}function tK(e,t){var i,o;const n=(i=t.value)!=null&&i.parent?e.parentElement:e,r=(o=t.instance)==null?void 0:o.$.uid;if(!(n!=null&&n._touchHandlers)||r===void 0)return;const s=n._touchHandlers[r];gP(s).forEach(a=>{n.removeEventListener(a,s[a])}),delete n._touchHandlers[r]}const Xy={mounted:eK,unmounted:tK},gM=Symbol.for("vuetify:v-window"),vM=Symbol.for("vuetify:v-window-group"),yM=he({continuous:Boolean,nextIcon:{type:[Boolean,String,Function,Object],default:"$next"},prevIcon:{type:[Boolean,String,Function,Object],default:"$prev"},reverse:Boolean,showArrows:{type:[Boolean,String],validator:e=>typeof e=="boolean"||e==="hover"},verticalArrows:[Boolean,String],touch:{type:[Object,Boolean],default:void 0},direction:{type:String,default:"horizontal"},modelValue:null,disabled:Boolean,selectedClass:{type:String,default:"v-window-item--active"},mandatory:{type:[Boolean,String],default:"force"},crossfade:Boolean,transitionDuration:Number,...Ge(),...pt(),...Nt()},"VWindow"),ix=xe()({name:"VWindow",directives:{vTouch:Xy},props:yM(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{themeClasses:r}=tn(e),{isRtl:s}=Hr(),{t:i}=zr(),o=Ou(e,vM),a=K(),l=M(()=>s.value?!e.reverse:e.reverse),u=Pe(!1),c=M(()=>{if(e.crossfade)return"v-window-crossfade-transition";const _=e.direction==="vertical"?"y":"x",P=(l.value?!u.value:u.value)?"-reverse":"";return`v-window-${_}${P}-transition`}),d=Pe(0),f=K(void 0),h=M(()=>o.items.value.findIndex(_=>o.selected.value.includes(_.id)));Ee(h,(_,S)=>{const P=o.items.value.length,A=P-1;P<=2?u.value=_<S:_===A&&S===0?u.value=!0:_===0&&S===A?u.value=!1:u.value=_<S}),Jt(gM,{transition:c,isReversed:u,transitionCount:d,transitionHeight:f,rootRef:a});const g=ie(()=>e.continuous||h.value!==0),m=ie(()=>e.continuous||h.value!==o.items.value.length-1);function y(){g.value&&o.prev()}function w(){m.value&&o.next()}const b=M(()=>{const _=[],S={icon:s.value?e.nextIcon:e.prevIcon,class:`v-window__${l.value?"right":"left"}`,onClick:o.prev,"aria-label":i("$vuetify.carousel.prev")};_.push(g.value?n.prev?n.prev({props:S}):p(ne,S,null):C("div",null,null));const P={icon:s.value?e.prevIcon:e.nextIcon,class:`v-window__${l.value?"left":"right"}`,onClick:o.next,"aria-label":i("$vuetify.carousel.next")};return _.push(m.value?n.next?n.next({props:P}):p(ne,P,null):C("div",null,null)),_}),x=M(()=>e.touch===!1?e.touch:{...{left:()=>{l.value?y():w()},right:()=>{l.value?w():y()},start:S=>{let{originalEvent:P}=S;P.stopPropagation()}},...e.touch===!0?{}:e.touch});return Me(()=>zt(p(e.tag,{ref:a,class:Re(["v-window",{"v-window--show-arrows-on-hover":e.showArrows==="hover","v-window--vertical-arrows":!!e.verticalArrows,"v-window--crossfade":!!e.crossfade},r.value,e.class]),style:Be([e.style,e.transitionDuration&&!Ka?{"--v-window-transition-duration":Ne(e.transitionDuration,"ms")}:void 0])},{default:()=>{var _,S;return[C("div",{class:"v-window__container",style:{height:f.value}},[(_=n.default)==null?void 0:_.call(n,{group:o}),e.showArrows!==!1&&C("div",{class:Re(["v-window__controls",{"v-window__controls--left":e.verticalArrows==="left"||e.verticalArrows===!0},{"v-window__controls--right":e.verticalArrows==="right"}])},[b.value])]),(S=n.additional)==null?void 0:S.call(n,{group:o})]}}),[[Xy,x.value]])),{group:o}}}),nK=he({...Ur(yM(),["continuous","nextIcon","prevIcon","showArrows","touch","mandatory"])},"VStepperWindow"),bM=xe()({name:"VStepperWindow",props:nK(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=Je(k0,null),s=lt(e,"modelValue"),i=M({get(){var o;return s.value!=null||!r?s.value:(o=r.items.value.find(a=>r.selected.value.includes(a.id)))==null?void 0:o.value},set(o){s.value=o}});return Me(()=>{const o=ix.filterProps(e);return p(ix,me({_as:"VStepperWindow"},o,{modelValue:i.value,"onUpdate:modelValue":a=>i.value=a,class:["v-stepper-window",e.class],style:e.style,mandatory:!1,touch:!1}),n)}),{}}}),wM=he({reverseTransition:{type:[Boolean,String],default:void 0},transition:{type:[Boolean,String],default:void 0},...Ge(),...Hd(),...aR()},"VWindowItem"),ox=xe()({name:"VWindowItem",directives:{vTouch:Xy},props:wM(),emits:{"group:selected":e=>!0},setup(e,t){let{slots:n}=t;const r=Je(gM),s=lu(e,vM),{isBooted:i}=uf();if(!r||!s)throw new Error("[Vuetify] VWindowItem must be used inside VWindow");const o=Pe(!1),a=M(()=>i.value&&(r.isReversed.value?e.reverseTransition!==!1:e.transition!==!1));function l(){!o.value||!r||(o.value=!1,r.transitionCount.value>0&&(r.transitionCount.value-=1,r.transitionCount.value===0&&(r.transitionHeight.value=void 0)))}function u(){var g;o.value||!r||(o.value=!0,r.transitionCount.value===0&&(r.transitionHeight.value=Ne((g=r.rootRef.value)==null?void 0:g.clientHeight)),r.transitionCount.value+=1)}function c(){l()}function d(g){o.value&&Pt(()=>{!a.value||!o.value||!r||(r.transitionHeight.value=Ne(g.clientHeight))})}const f=M(()=>{const g=r.isReversed.value?e.reverseTransition:e.transition;return a.value?{name:typeof g!="string"?r.transition.value:g,onBeforeEnter:u,onAfterEnter:l,onEnterCancelled:c,onBeforeLeave:u,onAfterLeave:l,onLeaveCancelled:c,onEnter:d}:!1}),{hasContent:h}=lR(e,s.isSelected);return Me(()=>p(ui,{transition:f.value,disabled:!i.value},{default:()=>{var g;return[zt(C("div",{class:Re(["v-window-item",s.selectedClass.value,e.class]),style:Be(e.style)},[h.value&&((g=n.default)==null?void 0:g.call(n))]),[[ro,s.isSelected.value]])]}})),{groupItem:s}}}),rK=he({...wM()},"VStepperWindowItem"),Rh=xe()({name:"VStepperWindowItem",props:rK(),setup(e,t){let{slots:n}=t;return Me(()=>{const r=ox.filterProps(e);return p(ox,me({_as:"VStepperWindowItem"},r,{class:["v-stepper-window-item",e.class],style:e.style}),n)}),{}}}),SM=he({color:String,..._s(),...Ge(),...Sr(),...xs(),...Xo(),...Du(),...Un(),...pt(),...Nt()},"VSheet"),Sd=xe()({name:"VSheet",props:SM(),setup(e,t){let{slots:n}=t;const{themeClasses:r}=tn(e),{backgroundColorClasses:s,backgroundColorStyles:i}=vr(()=>e.color),{borderClasses:o}=Vs(e),{dimensionStyles:a}=_r(e),{elevationClasses:l}=Us(e),{locationStyles:u}=al(e),{positionClasses:c}=Lu(e),{roundedClasses:d}=Qn(e);return Me(()=>p(e.tag,{class:Re(["v-sheet",r.value,s.value,o.value,l.value,c.value,d.value,e.class]),style:Be([i.value,a.value,u.value,e.style])},n)),{}}}),sK=he({altLabels:Boolean,bgColor:String,completeIcon:He,editIcon:He,editable:Boolean,errorIcon:He,hideActions:Boolean,items:{type:Array,default:()=>[]},itemTitle:{type:String,default:"title"},itemValue:{type:String,default:"value"},nonLinear:Boolean,flat:Boolean,...ll()},"Stepper"),iK=he({...sK(),...zd({mandatory:"force",selectedClass:"v-stepper-item--selected"}),...SM(),...Vo(mM(),["prevText","nextText"])},"VStepper"),_M=xe()({name:"VStepper",props:iK(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{items:r,next:s,prev:i,selected:o}=Ou(e,k0),{displayClasses:a,mobile:l}=vi(e),{completeIcon:u,editIcon:c,errorIcon:d,color:f,editable:h,prevText:g,nextText:m}=sl(e),y=M(()=>e.items.map((x,_)=>{const S=Ln(x,e.itemTitle,x),P=Ln(x,e.itemValue,_+1);return{title:S,value:P,raw:x}})),w=M(()=>r.value.findIndex(x=>o.value.includes(x.id))),b=M(()=>e.disabled?e.disabled:w.value===0?"prev":w.value===r.value.length-1?"next":!1);return Br({VStepperItem:{editable:h,errorIcon:d,completeIcon:u,editIcon:c,prevText:g,nextText:m},VStepperActions:{color:f,disabled:b,prevText:g,nextText:m}}),Me(()=>{const x=Sd.filterProps(e),_=!!(n.header||e.items.length),S=e.items.length>0,P=!e.hideActions&&!!(S||n.actions);return p(Sd,me(x,{color:e.bgColor,class:["v-stepper",{"v-stepper--alt-labels":e.altLabels,"v-stepper--flat":e.flat,"v-stepper--non-linear":e.nonLinear,"v-stepper--mobile":l.value},a.value,e.class],style:e.style}),{default:()=>{var A,E;return[_&&p(x0,{key:"stepper-header"},{default:()=>[y.value.map((T,R)=>{let{raw:I,...O}=T;return C(Oe,null,[!!R&&p(ln,null,null),p(Ph,O,{default:n[`header-item.${O.value}`]??n.header,icon:n.icon,title:n.title,subtitle:n.subtitle})])})]}),S&&p(bM,{key:"stepper-window"},{default:()=>[y.value.map(T=>p(Rh,{value:T.value},{default:()=>{var R,I;return((R=n[`item.${T.value}`])==null?void 0:R.call(n,T))??((I=n.item)==null?void 0:I.call(n,T))}}))]}),(A=n.default)==null?void 0:A.call(n,{prev:i,next:s}),P&&(((E=n.actions)==null?void 0:E.call(n,{next:s,prev:i}))??p(q9,{key:"stepper-actions","onClick:prev":i,"onClick:next":s},n))]}})}),{prev:i,next:s}}}),oK={class:"my-3"},aK={key:0},lK={key:1},uK={class:"my-2"},cK={key:0},dK={class:"mr-4"},fK={class:"mr-4"},hK={class:"mr-4"},pK={class:"my-3"},mK={key:0,class:"mb-5 mt-10"},gK={key:1},vK={class:"ml-5 mt-2"},yK={key:0,class:"ml-5 mt-2"},bK=Fe({__name:"OctoFarmImportDialog",setup(e){const t=K(),n=K(!1),r=K(!1),s=K(""),i=K(""),o=K(),a=K(0),l=K([]),u=K([]),c=K(!1),d=rn(sn.ImportOctoFarmDialog);function f(){}async function h(){}const g=async()=>{if(!o.value){n.value=!1;return}const _=JSON.parse(await o.value.text());if(!_||!Array.isArray(_))return[];if(!(_!=null&&_.length))return[];let S=_;_.length===1&&Array.isArray(_[0])&&(S=_[0]),S=S.map(E=>{var T,R;return E._id&&delete E._id,E.apikey&&(E.apiKey=E.apikey,delete E.apikey),E.settingsApperance&&(E.settingsAppearance=E.settingsApperance,delete E.settingsApperance),(T=E.settingsAppearance)!=null&&T.name?(E.name=(R=E.settingsAppearance)==null?void 0:R.name,delete E.settingsAppearance):E.name=E.printerURL,{enabled:!E.disabled,apiKey:E.apiKey,printerURL:E.printerURL,name:E.name}});let P=!1;const A=[];s.value="",i.value="";for(const E of S){const T=Object.keys(E);T.includes("enabled")&&(E.enabled===!1||E.enabled===!0)&&T.includes("apiKey")&&E.apiKey.length&&T.includes("printerURL")&&E.printerURL.length&&T.includes("name")&&E.name||(A.push(E.name||E.printerURL||"No name known for printer"),P||(P=!0))}return n.value=!P,P&&(s.value="Imported file failed the validation step",i.value="These printers failed validation: "+A.join(", ")),S},m=async()=>{const _=await g();_!=null&&_.length&&(u.value=[...Array(_.length)].map((S,P)=>P),l.value=_||[],t.value=2)},y=()=>{u.value.length?u.value=[]:u.value=[...Array(l.value.length)].map((S,P)=>P)},w=async()=>{var _;a.value=((_=await g())==null?void 0:_.length)||0},b=async()=>{t.value=3;const _=l.value.filter((S,P)=>u.value.includes(P));if(_!=null&&_.length)try{await en.batchImportPrinters(_),c.value=!0}catch(S){c.value=!1,o.value=void 0,s.value="An error occurred",i.value=S.message.toString()}},x=()=>{o.value=void 0,d.closeDialog(),t.value=1};return(_,S)=>{const P=$n("v-subheader"),A=$n("v-list-item-content"),E=$n("v-list-item-group"),T=yi;return $(),te(T,{id:J(d).dialogId,"max-width":"700px",onBeforeOpened:S[8]||(S[8]=R=>void 0),onEscape:S[9]||(S[9]=R=>x()),onOpened:S[10]||(S[10]=R=>h())},{default:v(()=>[p(kt,{class:"pa-4"},{default:v(()=>[p(an,null,{default:v(()=>[...S[11]||(S[11]=[C("span",{class:"text-h5"}," Import OctoFarm Printers ",-1)])]),_:1}),p(nn,null,{default:v(()=>[p(st,null,{default:v(()=>[p(We,{cols:"12"},{default:v(()=>[p(_M,{modelValue:J(t),"onUpdate:modelValue":S[6]||(S[6]=R=>rt(t)?t.value=R:null),"non-linear":""},{default:v(()=>[p(x0,null,{default:v(()=>[p(Ph,{complete:J(t)>1,value:"1",editable:""},{default:v(()=>[...S[12]||(S[12]=[k(" Export PrintersDB from OctoFarm ",-1)])]),_:1},8,["complete"]),p(Ph,{complete:J(t)>2,value:"2",editable:""},{default:v(()=>[...S[13]||(S[13]=[k(" Show printers & decide ",-1)])]),_:1},8,["complete"]),p(Ph,{complete:J(t)>3,value:"3",editable:""},{default:v(()=>[...S[14]||(S[14]=[k(" Import printers into FDM Monster ",-1)])]),_:1},8,["complete"])]),_:1}),p(bM,null,{default:v(()=>[p(Rh,{value:"1"},{default:v(()=>[p(fM,{class:"mt-2",style:{"max-width":"400px"},modelValue:J(o),"onUpdate:modelValue":S[0]||(S[0]=R=>rt(o)?o.value=R:null),filled:"",accept:".json",clearable:"",label:"Upload PrintersDB.json file",onChange:S[1]||(S[1]=R=>w())},null,8,["modelValue"]),C("ol",null,[C("li",null,[C("h4",null,[p(Z,null,{default:v(()=>[...S[15]||(S[15]=[k("navigation",-1)])]),_:1}),S[16]||(S[16]=k(" Go to your OctoFarm System page ",-1))])]),C("li",null,[C("h4",null,[p(Z,null,{default:v(()=>[...S[17]||(S[17]=[k("mouse",-1)])]),_:1}),S[18]||(S[18]=k(" Click 'Database' ",-1))])]),C("li",null,[C("h4",null,[p(Z,null,{default:v(()=>[...S[19]||(S[19]=[k("mouse",-1)])]),_:1}),S[20]||(S[20]=k(" Click the button 'Export Printers' ",-1))])]),C("li",null,[C("h4",null,[p(Z,null,{default:v(()=>[...S[21]||(S[21]=[k("upload",-1)])]),_:1}),S[22]||(S[22]=k(" Upload 'PrintersDB.json' above ",-1))])])]),C("div",oK,[p(Z,{class:"pr-2"},{default:v(()=>[...S[23]||(S[23]=[k("info",-1)])]),_:1}),S[25]||(S[25]=k(' OctoFarm printers should be exported as a JSON file. Please upload the correct "PrintersDB.json" database file using the steps provided. ',-1)),p(ne,{small:"",class:"ml-2",color:"success",onClick:S[2]||(S[2]=R=>r.value=!J(r))},{default:v(()=>[p(Z,{class:"pr-2"},{default:v(()=>[...S[24]||(S[24]=[k("gif",-1)])]),_:1}),J(r)?($(),ve("span",lK,"Hide GIF")):($(),ve("span",aK,"Show GIF"))]),_:1})]),J(r)?($(),te(vs,{key:0,class:"my-4",src:J(W9),style:{border:"3px solid dimgray","max-width":"800px"},elevation:"10"},null,8,["src"])):pe("",!0),S[27]||(S[27]=C("br",null,null,-1)),p(ne,{color:"primary",onClick:S[3]||(S[3]=R=>m()),disabled:!J(o)},{default:v(()=>[...S[26]||(S[26]=[k(" Validate ",-1)])]),_:1},8,["disabled"])]),_:1}),p(Rh,{value:"2"},{default:v(()=>{var R;return[C("div",uK,[p(Z,{class:"pr-2"},{default:v(()=>[...S[28]||(S[28]=[k("info",-1)])]),_:1}),k(" Import state: "+se(J(n)?"success":"failed")+" - "+se(J(a))+" printer(s) found ",1)]),J(s)?($(),te(vn,{key:0,class:"my-2",type:"error"},{default:v(()=>{var I,O;return[k(se(J(s))+" ",1),S[29]||(S[29]=C("br",null,null,-1)),k(" Details: "+se((I=J(i))==null?void 0:I.slice(0,75))+" ",1),((O=J(i))==null?void 0:O.length)>75?($(),ve("span",cK,"...")):pe("",!0)]}),_:1})):pe("",!0),p(ln,{class:"mt-2"}),p(Ht,{"two-line":"",flat:"",subheader:"",dense:"",class:"mt-2"},{default:v(()=>[p(P,null,{default:v(()=>[...S[30]||(S[30]=[k("Found printers",-1)])]),_:1}),p(E,{modelValue:J(u),"onUpdate:modelValue":S[4]||(S[4]=I=>rt(u)?u.value=I:null),multiple:""},{default:v(()=>[($(!0),ve(Oe,null,Qt(J(l),I=>($(),te(ze,{dense:"",key:I.name,title:I.name},{default:v(({isActive:O})=>[p(Su,null,{default:v(()=>[p(bn,{"input-value":O},null,8,["input-value"])]),_:2},1024),p(A,null,{default:v(()=>[p(ft,null,{default:v(()=>[k(se(I.name),1)]),_:2},1024),p(St,null,{default:v(()=>[C("span",dK,"URL: "+se(I.printerURL),1),C("span",fK,"Enabled: "+se(I.enabled),1),C("span",hK,"API Key: "+se(I.apiKey),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["title"]))),128))]),_:1},8,["modelValue"]),p(P,null,{default:v(()=>[p(ne,{onClick:y,class:"my-2",small:""},{default:v(()=>[p(Z,{class:"mr-2"},{default:v(()=>[...S[31]||(S[31]=[k("check",-1)])]),_:1}),S[32]||(S[32]=k(" Toggle selection ",-1))]),_:1})]),_:1})]),_:1}),C("div",pK,[p(Z,{class:"pr-2"},{default:v(()=>[...S[33]||(S[33]=[k("info",-1)])]),_:1}),S[34]||(S[34]=k(" At this moment, the following properties will be imported: enabled, name, printerURL and apiKey ",-1))]),p(ne,{class:"my-2",color:"primary",onClick:S[5]||(S[5]=I=>b()),disabled:!((R=J(u))!=null&&R.length)},{default:v(()=>{var I;return[k(" Submit "+se((I=J(u))==null?void 0:I.length)+" printers ",1)]}),_:1},8,["disabled"])]}),_:1}),p(Rh,{value:"3"},{default:v(()=>{var R,I;return[J(c)?($(),ve("div",mK,[p(Z,{size:"100",class:"mr-5",color:"green circle"},{default:v(()=>[...S[35]||(S[35]=[k("check_circle",-1)])]),_:1}),S[36]||(S[36]=k(" Import Completed ",-1))])):($(),ve("div",gK,[p(Z,{size:"100",class:"mr-5",color:"red circle"},{default:v(()=>[...S[37]||(S[37]=[k("error",-1)])]),_:1}),k(" Something went wrong: "+se(J(s))+" ",1),S[38]||(S[38]=C("br",null,null,-1)),C("span",vK," Details: "+se((R=J(i))==null?void 0:R.slice(0,75)),1),((I=J(i))==null?void 0:I.length)>75?($(),ve("span",yK,"...")):pe("",!0)]))]}),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1}),p(ne,{class:"mt-2"},{default:v(()=>[...S[39]||(S[39]=[k(" Validate printers ",-1)])]),_:1})]),_:1}),p(Bn,null,{default:v(()=>[p(Tn),p(ne,{onClick:S[7]||(S[7]=R=>x())},{default:v(()=>[p(Z,{class:"mr-2"},{default:v(()=>[...S[40]||(S[40]=[k("close",-1)])]),_:1}),S[41]||(S[41]=k(" Close ",-1))]),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}}),wK=he({id:String,submenu:Boolean,disableInitialFocus:Boolean,...Ur(qd({closeDelay:250,closeOnContentClick:!0,locationStrategy:"connected",location:void 0,openDelay:300,scrim:!1,scrollStrategy:"reposition",transition:{component:p1}}),["absolute"])},"VMenu"),Vm=xe()({name:"VMenu",props:wK(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=lt(e,"modelValue"),{scopeId:s}=$u(),{isRtl:i}=Hr(),o=Vr(),a=ie(()=>e.id||`v-menu-${o}`),l=K(),u=Je(ly,null),c=Pe(new Set);Jt(ly,{register(){c.value.add(o)},unregister(){c.value.delete(o)},closeParents(y){setTimeout(()=>{var w;!c.value.size&&!e.persistent&&(y==null||(w=l.value)!=null&&w.contentEl&&!DF(y,l.value.contentEl))&&(r.value=!1,u==null||u.closeParents())},40)}}),Vn(()=>{u==null||u.unregister(),document.removeEventListener("focusin",d)}),qb(()=>r.value=!1);async function d(y){var x,_,S;const w=y.relatedTarget,b=y.target;await Pt(),r.value&&w!==b&&((x=l.value)!=null&&x.contentEl)&&((_=l.value)!=null&&_.globalTop)&&![document,l.value.contentEl].includes(b)&&!l.value.contentEl.contains(b)&&((S=ou(l.value.contentEl)[0])==null||S.focus())}Ee(r,y=>{y?(u==null||u.register(),Ot&&!e.disableInitialFocus&&document.addEventListener("focusin",d,{once:!0})):(u==null||u.unregister(),Ot&&document.removeEventListener("focusin",d))},{immediate:!0});function f(y){u==null||u.closeParents(y)}function h(y){var w,b,x,_,S;if(!e.disabled)if(y.key==="Tab"||y.key==="Enter"&&!e.closeOnContentClick){if(y.key==="Enter"&&(y.target instanceof HTMLTextAreaElement||y.target instanceof HTMLInputElement&&y.target.closest("form")))return;y.key==="Enter"&&y.preventDefault(),SP(ou((w=l.value)==null?void 0:w.contentEl,!1),y.shiftKey?"prev":"next",A=>A.tabIndex>=0)||(r.value=!1,(x=(b=l.value)==null?void 0:b.activatorEl)==null||x.focus())}else e.submenu&&y.key===(i.value?"ArrowRight":"ArrowLeft")&&(r.value=!1,(S=(_=l.value)==null?void 0:_.activatorEl)==null||S.focus())}function g(y){var b;if(e.disabled)return;const w=(b=l.value)==null?void 0:b.contentEl;w&&r.value?y.key==="ArrowDown"?(y.preventDefault(),y.stopImmediatePropagation(),Lc(w,"next")):y.key==="ArrowUp"?(y.preventDefault(),y.stopImmediatePropagation(),Lc(w,"prev")):e.submenu&&(y.key===(i.value?"ArrowRight":"ArrowLeft")?r.value=!1:y.key===(i.value?"ArrowLeft":"ArrowRight")&&(y.preventDefault(),Lc(w,"first"))):(e.submenu?y.key===(i.value?"ArrowLeft":"ArrowRight"):["ArrowDown","ArrowUp"].includes(y.key))&&(r.value=!0,y.preventDefault(),setTimeout(()=>setTimeout(()=>g(y))))}const m=M(()=>me({"aria-haspopup":"menu","aria-expanded":String(r.value),"aria-controls":a.value,onKeydown:g},e.activatorProps));return Me(()=>{const y=Yi.filterProps(e);return p(Yi,me({ref:l,id:a.value,class:["v-menu",e.class],style:e.style},y,{modelValue:r.value,"onUpdate:modelValue":w=>r.value=w,absolute:!0,activatorProps:m.value,location:e.location??(e.submenu?"end":"bottom"),"onClick:outside":f,onKeydown:h},s),{activator:n.activator,default:function(){for(var w=arguments.length,b=new Array(w),x=0;x<w;x++)b[x]=arguments[x];return p($t,{root:"VMenu"},{default:()=>{var _;return[(_=n.default)==null?void 0:_.call(n,...b)]}})}})}),Es({id:a,ΨopenChildren:c},l)}}),SK=he({renderless:Boolean,...Ge()},"VVirtualScrollItem"),_K=xe()({name:"VVirtualScrollItem",inheritAttrs:!1,props:SK(),emits:{"update:height":e=>!0},setup(e,t){let{attrs:n,emit:r,slots:s}=t;const{resizeRef:i,contentRect:o}=Uo(void 0,"border");Ee(()=>{var a;return(a=o.value)==null?void 0:a.height},a=>{a!=null&&r("update:height",a)}),Me(()=>{var a,l;return e.renderless?C(Oe,null,[(a=s.default)==null?void 0:a.call(s,{itemRef:i})]):C("div",me({ref:i,class:["v-virtual-scroll__item",e.class],style:e.style},n),[(l=s.default)==null?void 0:l.call(s)])})}}),kK=-1,xK=1,rv=100,EK=he({itemHeight:{type:[Number,String],default:null},itemKey:{type:[String,Array,Function],default:null},height:[Number,String]},"virtual");function CK(e,t){const n=vi(),r=Pe(0);Cn(()=>{r.value=parseFloat(e.itemHeight||0)});const s=Pe(0),i=Pe(Math.ceil((parseInt(e.height)||n.height.value)/(r.value||16))||1),o=Pe(0),a=Pe(0),l=K(),u=K();let c=0;const{resizeRef:d,contentRect:f}=Uo();Cn(()=>{d.value=l.value});const h=M(()=>{var L;return l.value===document.documentElement?n.height.value:((L=f.value)==null?void 0:L.height)||parseInt(e.height)||0}),g=M(()=>!!(l.value&&u.value&&h.value&&r.value));let m=Array.from({length:t.value.length}),y=Array.from({length:t.value.length});const w=Pe(0);let b=-1;function x(L){return m[L]||r.value}const _=AF(()=>{const L=performance.now();y[0]=0;const oe=t.value.length;for(let j=1;j<=oe-1;j++)y[j]=(y[j-1]||0)+x(j-1);w.value=Math.max(w.value,performance.now()-L)},w),S=Ee(g,L=>{L&&(S(),c=u.value.offsetTop,_.immediate(),W(),~b&&Pt(()=>{Ot&&window.requestAnimationFrame(()=>{Q(b),b=-1})}))});dn(()=>{_.clear()});function P(L,oe){const j=m[L],F=r.value;r.value=F?Math.min(r.value,oe):oe,(j!==oe||F!==r.value)&&(m[L]=oe,_())}function A(L){L=Nn(L,0,t.value.length-1);const oe=Math.floor(L),j=L%1,F=oe+1,re=y[oe]||0,ae=y[F]||re;return re+(ae-re)*j}function E(L){return TK(y,L)}let T=0,R=0,I=0;Ee(h,(L,oe)=>{oe&&(W(),L<oe&&requestAnimationFrame(()=>{R=0,W()}))});let O=-1;function H(){if(!l.value||!u.value)return;const L=l.value.scrollTop,oe=performance.now();oe-I>500?(R=Math.sign(L-T),c=u.value.offsetTop):R=L-T,T=L,I=oe,window.clearTimeout(O),O=window.setTimeout(N,500),W()}function N(){!l.value||!u.value||(R=0,I=0,window.clearTimeout(O),W())}let D=-1;function W(){cancelAnimationFrame(D),D=requestAnimationFrame(U)}function U(){if(!l.value||!h.value||!r.value)return;const L=T-c,oe=Math.sign(R),j=Math.max(0,L-rv),F=Nn(E(j),0,t.value.length),re=L+h.value+rv,ae=Nn(E(re)+1,F+1,t.value.length);if((oe!==kK||F<s.value)&&(oe!==xK||ae>i.value)){const Se=A(s.value)-A(F),X=A(ae)-A(i.value);Math.max(Se,X)>rv?(s.value=F,i.value=ae):(F<=0&&(s.value=F),ae>=t.value.length&&(i.value=ae))}o.value=A(s.value),a.value=A(t.value.length)-A(i.value)}function Q(L){const oe=A(L);!l.value||L&&!oe?b=L:l.value.scrollTop=oe}const V=M(()=>t.value.slice(s.value,i.value).map((L,oe)=>{const j=oe+s.value;return{raw:L,index:j,key:Ln(L,e.itemKey,j)}}));return Ee(t,()=>{m=Array.from({length:t.value.length}),y=Array.from({length:t.value.length}),_.immediate(),W()},{deep:1}),{calculateVisibleItems:W,containerRef:l,markerRef:u,computedItems:V,paddingTop:o,paddingBottom:a,scrollToIndex:Q,handleScroll:H,handleScrollend:N,handleItemResize:P}}function TK(e,t){let n=e.length-1,r=0,s=0,i=null,o=-1;if(e[n]<t)return n;for(;r<=n;)if(s=r+n>>1,i=e[s],i>t)n=s-1;else if(i<t)o=s,r=s+1;else return i===t?s:r;return o}const PK=he({items:{type:Array,default:()=>[]},renderless:Boolean,...EK(),...Ge(),...Sr()},"VVirtualScroll"),RK=xe()({name:"VVirtualScroll",props:PK(),setup(e,t){let{slots:n}=t;const r=fn("VVirtualScroll"),{dimensionStyles:s}=_r(e),{calculateVisibleItems:i,containerRef:o,markerRef:a,handleScroll:l,handleScrollend:u,handleItemResize:c,scrollToIndex:d,paddingTop:f,paddingBottom:h,computedItems:g}=CK(e,ie(()=>e.items));return Lr(()=>e.renderless,()=>{function m(){var b,x;const w=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)?"addEventListener":"removeEventListener";o.value===document.documentElement?(document[w]("scroll",l,{passive:!0}),document[w]("scrollend",u)):((b=o.value)==null||b[w]("scroll",l,{passive:!0}),(x=o.value)==null||x[w]("scrollend",u))}yt(()=>{o.value=OP(r.vnode.el,!0),m(!0)}),dn(m)}),Me(()=>{const m=g.value.map(y=>p(_K,{key:y.key,renderless:e.renderless,"onUpdate:height":w=>c(y.index,w)},{default:w=>{var b;return(b=n.default)==null?void 0:b.call(n,{item:y.raw,index:y.index,...w})}}));return e.renderless?C(Oe,null,[C("div",{ref:a,class:"v-virtual-scroll__spacer",style:{paddingTop:Ne(f.value)}},null),m,C("div",{class:"v-virtual-scroll__spacer",style:{paddingBottom:Ne(h.value)}},null)]):C("div",{ref:o,class:Re(["v-virtual-scroll",e.class]),onScrollPassive:l,onScrollend:u,style:Be([s.value,e.style])},[C("div",{ref:a,class:"v-virtual-scroll__container",style:{paddingTop:Ne(f.value),paddingBottom:Ne(h.value)}},[m])])}),{calculateVisibleItems:i,scrollToIndex:d}}});function IK(e,t){const n=Pe(!1);let r;function s(a){cancelAnimationFrame(r),n.value=!0,r=requestAnimationFrame(()=>{r=requestAnimationFrame(()=>{n.value=!1})})}async function i(){await new Promise(a=>requestAnimationFrame(a)),await new Promise(a=>requestAnimationFrame(a)),await new Promise(a=>requestAnimationFrame(a)),await new Promise(a=>{if(n.value){const l=Ee(n,()=>{l(),a()})}else a()})}async function o(a){var c,d;if(a.key==="Tab"&&((c=t.value)==null||c.focus()),!["PageDown","PageUp","Home","End"].includes(a.key))return;const l=(d=e.value)==null?void 0:d.$el;if(!l)return;(a.key==="Home"||a.key==="End")&&l.scrollTo({top:a.key==="Home"?0:l.scrollHeight,behavior:"smooth"}),await i();const u=l.querySelectorAll(":scope > :not(.v-virtual-scroll__spacer)");if(a.key==="PageDown"||a.key==="Home"){const f=l.getBoundingClientRect().top;for(const h of u)if(h.getBoundingClientRect().top>=f){h.focus();break}}else{const f=l.getBoundingClientRect().bottom;for(const h of[...u].reverse())if(h.getBoundingClientRect().bottom<=f){h.focus();break}}}return{onScrollPassive:s,onKeydown:o}}const AK=he({closeText:{type:String,default:"$vuetify.close"},openText:{type:String,default:"$vuetify.open"}},"autocomplete");function OK(e,t){const{t:n}=zr(),r=Vr(),s=M(()=>`menu-${r}`),i=ie(()=>un(t)),o=ie(()=>s.value),a=ie(()=>n(un(t)?e.closeText:e.openText));return{menuId:s,ariaExpanded:i,ariaControls:o,ariaLabel:a}}const MK=he({chips:Boolean,closableChips:Boolean,eager:Boolean,hideNoData:Boolean,hideSelected:Boolean,listProps:{type:Object},menu:Boolean,menuIcon:{type:He,default:"$dropdown"},menuProps:{type:Object},multiple:Boolean,noDataText:{type:String,default:"$vuetify.noDataText"},openOnClear:Boolean,itemColor:String,noAutoScroll:Boolean,...AK(),...VO({itemChildren:!1})},"Select"),DK=he({...MK(),...Ur(aM({modelValue:null,role:"combobox"}),["validationValue","dirty","appendInnerIcon"]),...Fu({transition:{component:p1}})},"VSelect"),qo=xe()({name:"VSelect",props:DK(),emits:{"update:focused":e=>!0,"update:modelValue":e=>!0,"update:menu":e=>!0},setup(e,t){let{slots:n}=t;const{t:r}=zr(),s=K(),i=K(),o=K(),{items:a,transformIn:l,transformOut:u}=W7(e),c=lt(e,"modelValue",[],F=>l(F===null?[null]:Fn(F)),F=>{const re=u(F);return e.multiple?re:re[0]??null}),d=M(()=>typeof e.counterValue=="function"?e.counterValue(c.value):typeof e.counterValue=="number"?e.counterValue:c.value.length),f=rM(e),h=M(()=>c.value.map(F=>F.value)),g=Pe(!1);let m="",y=-1,w;const b=M(()=>e.hideSelected?a.value.filter(F=>!c.value.some(re=>(e.valueComparator||Dr)(re,F))):a.value),x=M(()=>e.hideNoData&&!b.value.length||f.isReadonly.value||f.isDisabled.value),_=lt(e,"menu"),S=M({get:()=>_.value,set:F=>{var re;_.value&&!F&&((re=i.value)!=null&&re.ΨopenChildren.size)||F&&x.value||(_.value=F)}}),{menuId:P,ariaExpanded:A,ariaControls:E,ariaLabel:T}=OK(e,S),R=M(()=>{var F;return{...e.menuProps,activatorProps:{...((F=e.menuProps)==null?void 0:F.activatorProps)||{},"aria-haspopup":"listbox"}}}),I=K(),O=IK(I,s);function H(F){e.openOnClear&&(S.value=!0)}function N(){x.value||(S.value=!S.value)}function D(F){hS(F)&&W(F)}function W(F){var De,B,z;if(!F.key||f.isReadonly.value)return;["Enter"," ","ArrowDown","ArrowUp","Home","End"].includes(F.key)&&F.preventDefault(),["Enter","ArrowDown"," "].includes(F.key)&&(S.value=!0),["Escape","Tab"].includes(F.key)&&(S.value=!1),F.key==="Home"?(De=I.value)==null||De.focus("first"):F.key==="End"&&((B=I.value)==null||B.focus("last"));const re=1e3;if(!hS(F))return;const ae=performance.now();ae-w>re&&(m="",y=-1),m+=F.key.toLowerCase(),w=ae;const Se=b.value;function X(){let q=le();return q||m.at(-1)===m.at(-2)&&(m=m.slice(0,-1),q=le(),q)||(y=-1,q=le(),q)?q:(m=F.key.toLowerCase(),le())}function le(){for(let q=y+1;q<Se.length;q++){const ce=Se[q];if(ce.title.toLowerCase().startsWith(m))return[ce,q]}}const ee=X();if(!ee)return;const[G,_e]=ee;y=_e,(z=I.value)==null||z.focus(_e),e.multiple||(c.value=[G])}function U(F){let re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!F.props.disabled)if(e.multiple){const ae=c.value.findIndex(X=>(e.valueComparator||Dr)(X.value,F.value)),Se=re??!~ae;if(~ae){const X=Se?[...c.value,F]:[...c.value];X.splice(ae,1),c.value=X}else Se&&(c.value=[...c.value,F])}else{const ae=re!==!1;c.value=ae?[F]:[],Pt(()=>{S.value=!1})}}function Q(F){var re;(re=I.value)!=null&&re.$el.contains(F.relatedTarget)||(S.value=!1)}function V(){var F;e.eager&&((F=o.value)==null||F.calculateVisibleItems())}function L(){var F;g.value&&((F=s.value)==null||F.focus())}function oe(F){g.value=!0}function j(F){if(F==null)c.value=[];else if(tp(s.value,":autofill")||tp(s.value,":-webkit-autofill")){const re=a.value.find(ae=>ae.title===F);re&&U(re)}else s.value&&(s.value.value="")}return Ee(S,()=>{if(!e.hideSelected&&S.value&&c.value.length){const F=b.value.findIndex(re=>c.value.some(ae=>(e.valueComparator||Dr)(ae.value,re.value)));Ot&&!e.noAutoScroll&&window.requestAnimationFrame(()=>{var re;F>=0&&((re=o.value)==null||re.scrollToIndex(F))})}}),Ee(a,(F,re)=>{S.value||g.value&&e.hideNoData&&!re.length&&F.length&&(S.value=!0)}),Me(()=>{const F=!!(e.chips||n.chip),re=!!(!e.hideNoData||b.value.length||n["prepend-item"]||n["append-item"]||n["no-data"]),ae=c.value.length>0,Se=at.filterProps(e),X=ae||!g.value&&e.label&&!e.persistentPlaceholder?void 0:e.placeholder;return p(at,me({ref:s},Se,{modelValue:c.value.map(le=>le.props.value).join(", "),"onUpdate:modelValue":j,focused:g.value,"onUpdate:focused":le=>g.value=le,validationValue:c.externalValue,counterValue:d.value,dirty:ae,class:["v-select",{"v-select--active-menu":S.value,"v-select--chips":!!e.chips,[`v-select--${e.multiple?"multiple":"single"}`]:!0,"v-select--selected":c.value.length,"v-select--selection-slot":!!n.selection},e.class],style:e.style,inputmode:"none",placeholder:X,"onClick:clear":H,"onMousedown:control":N,onBlur:Q,onKeydown:W,"aria-expanded":A.value,"aria-controls":E.value,"aria-label":T.value,title:T.value}),{...n,default:()=>C(Oe,null,[p(Vm,me({id:P.value,ref:i,modelValue:S.value,"onUpdate:modelValue":le=>S.value=le,activator:"parent",contentClass:"v-select__content",disabled:x.value,eager:e.eager,maxHeight:310,openOnClick:!1,closeOnContentClick:!1,transition:e.transition,onAfterEnter:V,onAfterLeave:L},R.value),{default:()=>[re&&p(Ht,me({ref:I,selected:h.value,selectStrategy:e.multiple?"independent":"single-independent",onMousedown:le=>le.preventDefault(),onKeydown:D,onFocusin:oe,tabindex:"-1",selectable:!0,"aria-live":"polite","aria-label":`${e.label}-list`,color:e.itemColor??e.color},O,e.listProps),{default:()=>{var le,ee,G;return[(le=n["prepend-item"])==null?void 0:le.call(n),!b.value.length&&!e.hideNoData&&(((ee=n["no-data"])==null?void 0:ee.call(n))??p(ze,{key:"no-data",title:r(e.noDataText)},null)),p(RK,{ref:o,renderless:!0,items:b.value,itemKey:"value"},{default:_e=>{var de,be,Ce;let{item:De,index:B,itemRef:z}=_e;const q=LF(De.props),ce=me(De.props,{ref:z,key:De.value,onClick:()=>U(De,null)});return De.type==="divider"?((de=n.divider)==null?void 0:de.call(n,{props:De.raw,index:B}))??p(ln,me(De.props,{key:`divider-${B}`}),null):De.type==="subheader"?((be=n.subheader)==null?void 0:be.call(n,{props:De.raw,index:B}))??p(Nr,me(De.props,{key:`subheader-${B}`}),null):((Ce=n.item)==null?void 0:Ce.call(n,{item:De,index:B,props:ce}))??p(ze,me(ce,{role:"option"}),{prepend:ye=>{let{isSelected:ke}=ye;return C(Oe,null,[e.multiple&&!e.hideSelected?p(ku,{key:De.value,modelValue:ke,ripple:!1,tabindex:"-1"},null):void 0,q.prependAvatar&&p(dt,{image:q.prependAvatar},null),q.prependIcon&&p(Z,{icon:q.prependIcon},null)])}})}}),(G=n["append-item"])==null?void 0:G.call(n)]}})]}),c.value.map((le,ee)=>{function G(z){z.stopPropagation(),z.preventDefault(),U(le,!1)}const _e={"onClick:close":G,onKeydown(z){z.key!=="Enter"&&z.key!==" "||(z.preventDefault(),z.stopPropagation(),G(z))},onMousedown(z){z.preventDefault(),z.stopPropagation()},modelValue:!0,"onUpdate:modelValue":void 0},De=F?!!n.chip:!!n.selection,B=De?_P(F?n.chip({item:le,index:ee,props:_e}):n.selection({item:le,index:ee})):void 0;if(!(De&&!B))return C("div",{key:le.value,class:"v-select__selection"},[F?n.chip?p($t,{key:"chip-defaults",defaults:{VChip:{closable:e.closableChips,size:"small",text:le.title}}},{default:()=>[B]}):p(In,me({key:"chip",closable:e.closableChips,size:"small",text:le.title,disabled:le.props.disabled},_e),null):B??C("span",{class:"v-select__selection-text"},[le.title,e.multiple&&ee<c.value.length-1&&C("span",{class:"v-select__selection-comma"},[k(",")])])])})]),"append-inner":function(){var _e,De;for(var le=arguments.length,ee=new Array(le),G=0;G<le;G++)ee[G]=arguments[G];return C(Oe,null,[(_e=n["append-inner"])==null?void 0:_e.call(n,...ee),e.menuIcon?p(Z,{class:"v-select__menu-icon",color:(De=s.value)==null?void 0:De.fieldIconColor,icon:e.menuIcon},null):void 0])}})}),Es({isFocused:g,menu:S,select:U},s)}}),LK={class:"text-h5"},$K=Fe({__name:"PrinterMaintenanceDialog",setup(e){const t=K([]),n=["Broken part","Blob","Maxtemp","Preheat error","Cable USB ","Bed thermal runaway","Thermistor Heatbed","Thermistor Heatblock","Thermal Runaway","Mintemp Nozzle","Mintemp Heatbed","Nozzle","Nozzle Clog","Fan Hotend","Fan Part cooling","Extruder rattle","Extruder","Z Axis","X Axis","Y Axis","Rented","Motherboard","Other","Clean"],r=K({}),s=Xt(),i=rn(sn.PrinterMaintenanceDialog),o=M(()=>s.maintenanceDialogPrinter),a=()=>{r.value.disabledReason=t.value.join(", ")},l=async()=>{var f;const c=(f=o.value)==null?void 0:f.id;if(!c){r.value={},u();return}const d=r.value.disabledReason;await en.updatePrinterMaintenance(c,d),r.value={},u()},u=()=>{t.value=[],i.closeDialog(),s.setMaintenanceDialogPrinter()};return(c,d)=>{const f=yi;return $(),te(f,{id:J(i).dialogId,"max-width":"700px",onEscape:d[5]||(d[5]=h=>u())},{default:v(()=>[p(kt,{class:"pa-4"},{default:v(()=>[p(an,null,{default:v(()=>{var h;return[C("span",LK," Mark '"+se((h=o.value)==null?void 0:h.name)+"' for maintenance ",1)]}),_:1}),p(vn,{color:"secondary"},{default:v(()=>[...d[6]||(d[6]=[k(" Keep this info clear and stick to convention ",-1)])]),_:1}),p(nn,null,{default:v(()=>[p(st,null,{default:v(()=>[p(We,{cols:"12"},{default:v(()=>[p(qo,{modelValue:t.value,"onUpdate:modelValue":[d[0]||(d[0]=h=>t.value=h),d[1]||(d[1]=h=>a())],chips:!0,items:n,"menu-props":{closeOnBack:!0,closeOnContentClick:!0},clearable:"",color:"primary",multiple:"",placeholder:"Quick select reason"},null,8,["modelValue"]),p(pM,{modelValue:r.value.disabledReason,"onUpdate:modelValue":d[2]||(d[2]=h=>r.value.disabledReason=h),"data-vv-validate-on":"change|blur"},{label:v(()=>[...d[7]||(d[7]=[C("div",null,"Type the reason*",-1)])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),p(Bn,null,{default:v(()=>[d[10]||(d[10]=C("em",{class:"text-red"}," * indicates required field ",-1)),p(Tn),p(ne,{variant:"text",onClick:d[3]||(d[3]=h=>u())},{default:v(()=>[...d[8]||(d[8]=[k(" Close ",-1)])]),_:1}),p(ne,{color:"blue-darken-1",variant:"text",onClick:d[4]||(d[4]=h=>l())},{default:v(()=>[...d[9]||(d[9]=[k(" Save ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}}),FK=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],NK=[1,2,3,4,5,6,7,8,9,10,11,12],kM=Fe({__name:"GridSettingsList",setup(e){const t=js(),n=Ft(),r=M(()=>t.largeTiles),s=M(()=>t.preferCancelOverQuickStop);async function i(u){if(u)return l(u,t.gridRows)}async function o(u){if(u)return l(t.gridCols,u)}async function a(){return l(t.gridCols,t.gridRows)}async function l(u,c){await t.updateFrontendSettings({gridCols:c,gridRows:u,largeTiles:r.value,tilePreferCancelOverQuickStop:s.value}),n.info("Grid settings updated")}return(u,c)=>($(),ve("div",null,[p(nn,null,{default:v(()=>[p(Ht,{subheader:"",lines:"three"},{default:v(()=>{var d;return[p(Nr,null,{default:v(()=>[...c[2]||(c[2]=[k(" Grid Rows and Columns ",-1)])]),_:1}),(d=J(t).settings)!=null&&d.frontend?($(),te(ze,{key:0},{default:v(()=>[p(st,null,{default:v(()=>[p(We,{cols:"3"},{default:v(()=>[p(qo,{type:"number","onUpdate:modelValue":o,value:J(t).settings.frontend.gridRows,items:J(FK),label:"Set the grid rows"},null,8,["value","items"])]),_:1}),p(We,{cols:"3"},{default:v(()=>[p(qo,{type:"number","onUpdate:modelValue":i,value:J(t).settings.frontend.gridCols,items:J(NK),label:"Set the grid columns"},null,8,["value","items"])]),_:1})]),_:1})]),_:1})):pe("",!0)]}),_:1}),p(ln),p(Ht,{subheader:"",lines:"three"},{default:v(()=>[p(Nr,null,{default:v(()=>[...c[3]||(c[3]=[k(" Large or Compact Tiles ",-1)])]),_:1}),p(ze,null,{default:v(()=>{var d;return[(d=J(t).settings)!=null&&d.frontend?($(),te(st,{key:0},{default:v(()=>[p(We,{cols:"5"},{default:v(()=>[p(bn,{onChange:a,modelValue:J(t).settings.frontend.largeTiles,"onUpdate:modelValue":c[0]||(c[0]=f=>J(t).settings.frontend.largeTiles=f),label:"Large tiles"},null,8,["modelValue"])]),_:1})]),_:1})):pe("",!0)]}),_:1})]),_:1}),p(ln),p(Ht,{subheader:"","three-line":""},{default:v(()=>[p(Nr,null,{default:v(()=>[...c[4]||(c[4]=[k("Large or Compact Tiles",-1)])]),_:1}),p(ze,null,{default:v(()=>{var d;return[(d=J(t).settings)!=null&&d.frontend?($(),te(st,{key:0},{default:v(()=>[p(We,{cols:"5"},{default:v(()=>[p(bn,{onChange:a,modelValue:J(t).settings.frontend.tilePreferCancelOverQuickStop,"onUpdate:modelValue":c[1]||(c[1]=f=>J(t).settings.frontend.tilePreferCancelOverQuickStop=f),label:"Print tile - show cancel instead of quick stop"},null,8,["modelValue"])]),_:1})]),_:1})):pe("",!0)]}),_:1})]),_:1})]),_:1})]))}}),BK={class:"text-h5"},VK=Fe({__name:"GridSettingsDialog",setup(e){const t=rn(sn.GridSettingsDialog);function n(){t.closeDialog(t.context())}return(r,s)=>{const i=yi;return $(),te(i,{id:J(t).dialogId,"max-width":"1000px",onEscape:s[1]||(s[1]=o=>n())},{default:v(()=>[p(kt,{class:"pa-4"},{default:v(()=>[p(an,null,{default:v(()=>[C("span",BK,[s[4]||(s[4]=k(" Grid Settings ",-1)),p(ot,{top:""},{activator:v(({props:o})=>[p(ne,me(o,{class:"ma-2",fab:"","x-small":""}),{default:v(()=>[p(Z,null,{default:v(()=>[...s[2]||(s[2]=[k("question_mark",-1)])]),_:1})]),_:1},16)]),default:v(()=>[...s[3]||(s[3]=[k(" Change your grid rows, columns and tile settings. ",-1)])]),_:1})])]),_:1}),p(kM),p(Bn,null,{default:v(()=>[p(Tn),p(ne,{onClick:s[0]||(s[0]=o=>J(t).closeDialog())},{default:v(()=>[...s[5]||(s[5]=[k("Close",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}});class is extends kr{static async createUser(t){const n=$e.userRoute;return await this.post(n,t)}static async listUsers(){const t=$e.userRoute;return await this.get(t)}static async listRoles(){const t=$e.rolesRoute;return await this.get(t)}static async getProfile(){const t=$e.userProfileRoute;return await this.get(t)}static async changePassword(t,n,r){const s=$e.userChangePasswordRoute(t);return await this.post(s,{oldPassword:n,newPassword:r})}static async changeUsername(t,n){const r=$e.userChangeUsernameRoute(t);return await this.post(r,{username:n})}static async deleteUser(t){const n=$e.userDeleteRoute(t);return await this.delete(n)}static async setUserVerified(t,n){const r=$e.userSetVerifiedRoute(t);return await this.post(r,{isVerified:n})}static async setRootUser(t,n){const r=$e.userSetRootUserRoute(t);return await this.post(r,{isRootUser:n})}static async setUserRoles(t,n){const r=$e.userSetUserRolesRoute(t);return await this.post(r,{roleIds:n})}}const UK={class:"text-h5"},zK={class:"pl-5"},HK=Fe({__name:"CreateUserDialog",setup(e){const t=rn(sn.CreateUserDialog),n=Je("appConstants"),r=Ft(),s=K({username:"",password:"",roleIds:[]}),i=K(""),o=K([]),a=M(()=>{var f,h;return(h=(f=s.value)==null?void 0:f.username)!=null&&h.length?Dm(s.value.username):"??"}),l={required:f=>!!f||"Required field",minLength:f=>f.length>=n.minUsernameLength||`Minimum ${n.minUsernameLength} characters`,password:f=>f.length>=8?!0:"Password must be at least 8 characters",passwordMatch:f=>f===s.value.password||"Passwords must match"},u=()=>!s.value.username||s.value.username.length<n.minUsernameLength?(r.openErrorMessage({title:"Invalid username"}),!1):!s.value.password||l.password(s.value.password)!==!0?(r.openErrorMessage({title:"Invalid password"}),!1):s.value.password!==i.value?(r.openErrorMessage({title:"Passwords do not match"}),!1):s.value.roleIds.length?!0:(r.openErrorMessage({title:"Please select a role"}),!1),c=async()=>{if(u())try{await is.createUser(s.value),r.openInfoMessage({title:`User ${s.value.username} created successfully`}),d()}catch(f){r.openErrorMessage({title:"Failed to create user",subtitle:f instanceof Error?f.message:"Unknown error"})}},d=()=>{s.value={username:"",password:"",roleIds:[]},i.value="",t.closeDialog()};return yt(async()=>{try{o.value=await is.listRoles()}catch(f){r.openErrorMessage({title:"Failed to load roles",subtitle:f instanceof Error?f.message:"Unknown error"})}}),(f,h)=>{const g=yi;return $(),te(g,{id:J(t).dialogId,"max-width":"700px",onEscape:d},{default:v(()=>[p(kt,{class:"pa-4"},{default:v(()=>[p(an,null,{default:v(()=>[C("span",UK,[p(dt,{color:"primary",size:"56"},{default:v(()=>[k(se(a.value),1)]),_:1}),C("span",zK,[h[6]||(h[6]=k("New verified User ",-1)),p(ot,{top:""},{activator:v(({props:m})=>[p(ne,me({class:"ma-2",fab:""},m,{"x-small":""}),{default:v(()=>[p(Z,null,{default:v(()=>[...h[4]||(h[4]=[k("question_mark",-1)])]),_:1})]),_:1},16)]),default:v(()=>[...h[5]||(h[5]=[k(" The user will be set to verified and assigned roles. Please share the username and password with them manually. ",-1)])]),_:1})])])]),_:1}),p(nn,null,{default:v(()=>[p(st,null,{default:v(()=>[p(We,{cols:12},{default:v(()=>[p(Yn,null,{default:v(()=>[p(st,null,{default:v(()=>[p(We,{cols:"12",md:"6"},{default:v(()=>[p(at,{modelValue:s.value.username,"onUpdate:modelValue":h[0]||(h[0]=m=>s.value.username=m),rules:[l.required,l.minLength],autofocus:"",label:"Username*","prepend-icon":"person",required:""},null,8,["modelValue","rules"]),p(at,{modelValue:s.value.password,"onUpdate:modelValue":h[1]||(h[1]=m=>s.value.password=m),rules:[l.required,l.password],label:"Password*","prepend-icon":"lock",required:"",type:"password"},null,8,["modelValue","rules"]),p(at,{modelValue:i.value,"onUpdate:modelValue":h[2]||(h[2]=m=>i.value=m),rules:[l.required,l.passwordMatch],label:"Confirm Password*","prepend-icon":"lock",required:"",type:"password"},null,8,["modelValue","rules"]),p(qo,{modelValue:s.value.roleIds,"onUpdate:modelValue":h[3]||(h[3]=m=>s.value.roleIds=m),items:o.value.map(m=>({text:m.name,value:m.id})),rules:[l.required],label:"Roles*",multiple:"","prepend-icon":"shield",required:""},null,8,["modelValue","items","rules"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),p(Bn,null,{default:v(()=>[h[9]||(h[9]=C("em",{class:"text-red"}," * indicates required field ",-1)),p(Tn),p(ne,{variant:"text",onClick:d},{default:v(()=>[...h[7]||(h[7]=[k("Close",-1)])]),_:1}),p(ne,{color:"blue-darken-1",variant:"text",onClick:c},{default:v(()=>[...h[8]||(h[8]=[k("Create",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}}),xM=()=>({id:void 0,name:Yu(),floor:"1",printers:[]});class os extends kr{static convertPrinterFloorToCreateForm(t){const n=xM();return n.id=t==null?void 0:t.id,n.name=(t==null?void 0:t.name)||Yu(),n.printers=[],n.floor=((t==null?void 0:t.floor)||1).toString(),n}static convertCreateFormToFloor(t){const n={...t};if(n.floor=parseInt(n.floor),Number.isNaN(n.floor))throw new Error("Floor number did not convert to number.");return n}static async getFloors(){const t=`${$e.floorRoute}/`;return await this.get(t)}static async createFloor(t){const n=`${$e.floorRoute}/`;return await this.post(n,t)}static async updateFloorName(t,n){const r=`${$e.updatePrinterFloorNameRoute(t)}/`;return await this.patch(r,{name:n})}static async updateFloorNumber(t,n){const r=`${$e.updatePrinterFloorNumberRoute(t)}/`;return await this.patch(r,{floor:n})}static async deleteFloor(t){const n=`${$e.getFloorRoute(t)}/`;return await this.delete(n)}static async addPrinterToFloor(t,n){const r=`${$e.addOrRemovePrinterFromFloorRoute(t)}/`;return await this.post(r,n)}static async deletePrinterFromFloor(t,n){const r=`${$e.addOrRemovePrinterFromFloorRoute(t)}/`;return await this.delete(r,{printerId:n})}}const io=Ss("Floors",{state:()=>({floors:[],selectedFloorIndex:0}),getters:{selectedFloor(e){return e.floors.length<=e.selectedFloorIndex?null:e.floors[e.selectedFloorIndex]},sortedFloors(e){return e.floors.sort((t,n)=>t.floor-n.floor)},floor(e){return t=>e.floors.find(n=>n.id===t)},floorNames(e){return e.floors.map(t=>t.name)},floorOfPrinter(){return e=>this.floors.find(t=>t.printers.map(n=>n.printerId).includes(e))},floorlessPrinters(e){return Xt().printers.filter(n=>!e.floors.find(r=>r.printers.find(s=>s.printerId===n.id)))},gridSortedPrinters(){const e=js(),t=e.gridCols,n=e.gridRows,s=Xt().printers;if(!s.length)return[];if(!this.selectedFloor)return[];const i=this.selectedFloor.printers,o=[];for(let a=0;a<t;a++){const l=[];o.push(l);for(let u=0;u<n;u++){const c=i.find(d=>d.x===a&&d.y===u);if(!c)l.push(void 0);else{const d=s.find(f=>f.id===c.printerId);l.push(d)}}}return o}},actions:{async loadFloors(){const e=await os.getFloors();return this.saveFloors(e),e},async createFloor(e){const t=await os.createFloor(e);return this.floors.push(t),t},saveFloors(e){var r;if(!(e!=null&&e.length))return;this.floors=e.sort((s,i)=>s.floor-i.floor);const t=(r=this.selectedFloor)==null?void 0:r.id,n=this.floors.findIndex(s=>s.id===t);this.selectedFloorIndex=n===-1?0:n},async deleteFloor(e){await os.deleteFloor(e),this._popPrinterFloor(e)},async updateFloorName({floorId:e,name:t}){const n=await os.updateFloorName(e,t);return this._replaceFloor(n),n},async updateFloorNumber({floorId:e,floorNumber:t}){const n=await os.updateFloorNumber(e,t);return this._replaceFloor(n),n},async addPrinterToFloor({floorId:e,printerId:t,x:n,y:r}){const s=await os.addPrinterToFloor(e,{printerId:t,x:n,y:r});this._replaceFloor(s)},async changeSelectedFloorByIndex(e){var n;if(!((n=this.floors)!=null&&n.length))return;if(this.floors.length<=e){console.warn("Selected floor index exceeds floors array"),this.selectedFloorIndex=0;return}if(!this.floors[e]){console.warn("Selected floor index did not exist in floors array"),this.selectedFloorIndex=0;return}this.selectedFloorIndex=e},async deletePrinterFromFloor({floorId:e,printerId:t}){const n=await os.deletePrinterFromFloor(e,t);this._replaceFloor(n)},_popPrinterFloor(e){const t=this.floors.findIndex(n=>n.id===e);t!==-1&&this.floors.splice(t,1)},_replaceFloor(e){const t=this.floors.findIndex(n=>n.id===e.id);t!==-1&&(this.floors[t]=e)}}}),jK={class:"text-h5"},WK=Fe({__name:"AddOrUpdateFloorDialog",setup(e){const t=rn(sn.AddOrUpdateFloorDialog),n=io(),r=Je("appConstants"),s=Ft(),i=K(xM()),o=M(()=>{var d;return(d=t.context())==null?void 0:d.printerFloorId}),a=M(()=>i.value?Dm(i.value.name):""),l=()=>!i.value.name||i.value.name.length<r.minPrinterFloorNameLength?(s.openErrorMessage({title:"Invalid floor name"}),!1):Number.isInteger(Number(i.value.floor))?!0:(s.openErrorMessage({title:"Floor number must be an integer"}),!1),u=async()=>{if(!l())return;const d=os.convertCreateFormToFloor(i.value);await n.createFloor(d),s.openInfoMessage({title:`Floor ${d.name} created`}),i.value.name=Yu();const f=Math.max(...n.floors.map(h=>h.floor))+1;i.value.floor=f.toString(),c()},c=()=>{t.closeDialog()};return Ee(o,d=>{if(d){const f=n.floor(d);i.value=os.convertPrinterFloorToCreateForm(f)}}),yt(()=>{var d;if(o.value){const f=n.floor(o.value);i.value=os.convertPrinterFloorToCreateForm(f)}else if((d=n.floors)!=null&&d.length){const f=Math.max(...n.floors.map(h=>h.floor))+1;i.value.floor=f.toString()}}),(d,f)=>{const h=yi;return $(),te(h,{id:J(t).dialogId,"max-width":"700px",onEscape:c},{default:v(()=>[p(kt,null,{default:v(()=>[p(an,null,{default:v(()=>[C("span",jK,[p(dt,{color:"primary",size:"56"},{default:v(()=>[k(se(a.value),1)]),_:1}),f[2]||(f[2]=k(" New Floor ",-1))])]),_:1}),p(nn,null,{default:v(()=>[p(st,null,{default:v(()=>[p(We,{cols:12},{default:v(()=>[p(Yn,null,{default:v(()=>[p(st,null,{default:v(()=>[i.value?($(),te(We,{key:0,cols:"12",md:"6"},{default:v(()=>[p(at,{modelValue:i.value.name,"onUpdate:modelValue":f[0]||(f[0]=g=>i.value.name=g),autofocus:"",label:"Floor name*",required:""},null,8,["modelValue"]),p(at,{modelValue:i.value.floor,"onUpdate:modelValue":f[1]||(f[1]=g=>i.value.floor=g),label:"Floor number",required:"",type:"number"},null,8,["modelValue"])]),_:1})):pe("",!0)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),p(Bn,null,{default:v(()=>[f[5]||(f[5]=C("em",{class:"text-red"}," * indicates required field ",-1)),p(Tn),p(ne,{variant:"text",onClick:c},{default:v(()=>[...f[3]||(f[3]=[k("Close",-1)])]),_:1}),p(ne,{color:"blue-darken-1",variant:"text",onClick:u},{default:v(()=>[...f[4]||(f[4]=[k("Create",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}});class Dp extends kr{static async listCameraStreams(){return await this.get("/api/camera-stream/")}static async createCameraStream(t){return await this.post("/api/camera-stream/",t)}static async getCameraStream(t){return await this.get(`/api/camera-stream/${t}`)}static async updateCameraStream(t,n){return await this.put(`/api/camera-stream/${t}`,n)}static async deleteCameraStream(t){return await this.delete(`/api/camera-stream/${t}`)}}var Qu=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},qK={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},bo,Db,CC,GK=(CC=class{constructor(){qe(this,bo,qK);qe(this,Db,!1)}setTimeoutProvider(e){Le(this,bo,e)}setTimeout(e,t){return Y(this,bo).setTimeout(e,t)}clearTimeout(e){Y(this,bo).clearTimeout(e)}setInterval(e,t){return Y(this,bo).setInterval(e,t)}clearInterval(e){Y(this,bo).clearInterval(e)}},bo=new WeakMap,Db=new WeakMap,CC),ka=new GK;function KK(e){setTimeout(e,0)}var tl=typeof window>"u"||"Deno"in globalThis;function ss(){}function YK(e,t){return typeof e=="function"?e(t):e}function Qy(e){return typeof e=="number"&&e>=0&&e!==1/0}function EM(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Mo(e,t){return typeof e=="function"?e(t):e}function as(e,t){return typeof e=="function"?e(t):e}function ax(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==E0(o,t.options))return!1}else if(!_d(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||s&&s!==t.state.fetchStatus||i&&!i(t))}function lx(e,t){const{exact:n,status:r,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(nl(t.options.mutationKey)!==nl(i))return!1}else if(!_d(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function E0(e,t){return((t==null?void 0:t.queryKeyHashFn)||nl)(e)}function nl(e){return JSON.stringify(e,(t,n)=>Jy(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function _d(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>_d(e[n],t[n])):!1}var XK=Object.prototype.hasOwnProperty;function CM(e,t){if(e===t)return e;const n=ux(e)&&ux(t);if(!n&&!(Jy(e)&&Jy(t)))return t;const s=(n?e:Object.keys(e)).length,i=n?t:Object.keys(t),o=i.length,a=n?new Array(o):{};let l=0;for(let u=0;u<o;u++){const c=n?u:i[u],d=e[c],f=t[c];if(d===f){a[c]=d,(n?u<s:XK.call(e,c))&&l++;continue}if(d===null||f===null||typeof d!="object"||typeof f!="object"){a[c]=f;continue}const h=CM(d,f);a[c]=h,h===d&&l++}return s===o&&l===s?e:a}function Lp(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function ux(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Jy(e){if(!cx(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!cx(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function cx(e){return Object.prototype.toString.call(e)==="[object Object]"}function QK(e){return new Promise(t=>{ka.setTimeout(t,e)})}function Zy(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?CM(e,t):t}function JK(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function ZK(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var C0=Symbol();function TM(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===C0?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function eb(e,t){return typeof e=="function"?e(...t):!!e}var Ea,wo,ql,TC,eY=(TC=class extends Qu{constructor(){super();qe(this,Ea);qe(this,wo);qe(this,ql);Le(this,ql,t=>{if(!tl&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){Y(this,wo)||this.setEventListener(Y(this,ql))}onUnsubscribe(){var t;this.hasListeners()||((t=Y(this,wo))==null||t.call(this),Le(this,wo,void 0))}setEventListener(t){var n;Le(this,ql,t),(n=Y(this,wo))==null||n.call(this),Le(this,wo,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){Y(this,Ea)!==t&&(Le(this,Ea,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof Y(this,Ea)=="boolean"?Y(this,Ea):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ea=new WeakMap,wo=new WeakMap,ql=new WeakMap,TC),T0=new eY;function tb(){let e,t;const n=new Promise((s,i)=>{e=s,t=i});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}var tY=KK;function nY(){let e=[],t=0,n=a=>{a()},r=a=>{a()},s=tY;const i=a=>{t?e.push(a):s(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&s(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{s=a}}}var jn=nY(),Gl,So,Kl,PC,rY=(PC=class extends Qu{constructor(){super();qe(this,Gl,!0);qe(this,So);qe(this,Kl);Le(this,Kl,t=>{if(!tl&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){Y(this,So)||this.setEventListener(Y(this,Kl))}onUnsubscribe(){var t;this.hasListeners()||((t=Y(this,So))==null||t.call(this),Le(this,So,void 0))}setEventListener(t){var n;Le(this,Kl,t),(n=Y(this,So))==null||n.call(this),Le(this,So,t(this.setOnline.bind(this)))}setOnline(t){Y(this,Gl)!==t&&(Le(this,Gl,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return Y(this,Gl)}},Gl=new WeakMap,So=new WeakMap,Kl=new WeakMap,PC),$p=new rY;function sY(e){return Math.min(1e3*2**e,3e4)}function PM(e){return(e??"online")==="online"?$p.isOnline():!0}var nb=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function RM(e){let t=!1,n=0,r;const s=tb(),i=()=>s.status!=="pending",o=m=>{var y;if(!i()){const w=new nb(m);f(w),(y=e.onCancel)==null||y.call(e,w)}},a=()=>{t=!0},l=()=>{t=!1},u=()=>T0.isFocused()&&(e.networkMode==="always"||$p.isOnline())&&e.canRun(),c=()=>PM(e.networkMode)&&e.canRun(),d=m=>{i()||(r==null||r(),s.resolve(m))},f=m=>{i()||(r==null||r(),s.reject(m))},h=()=>new Promise(m=>{var y;r=w=>{(i()||u())&&m(w)},(y=e.onPause)==null||y.call(e)}).then(()=>{var m;r=void 0,i()||(m=e.onContinue)==null||m.call(e)}),g=()=>{if(i())return;let m;const y=n===0?e.initialPromise:void 0;try{m=y??e.fn()}catch(w){m=Promise.reject(w)}Promise.resolve(m).then(d).catch(w=>{var P;if(i())return;const b=e.retry??(tl?0:3),x=e.retryDelay??sY,_=typeof x=="function"?x(n,w):x,S=b===!0||typeof b=="number"&&n<b||typeof b=="function"&&b(n,w);if(t||!S){f(w);return}n++,(P=e.onFail)==null||P.call(e,n,w),QK(_).then(()=>u()?void 0:h()).then(()=>{t?f(w):g()})})};return{promise:s,status:()=>s.status,cancel:o,continue:()=>(r==null||r(),s),cancelRetry:a,continueRetry:l,canStart:c,start:()=>(c()?g():h().then(g),s)}}var Ca,RC,IM=(RC=class{constructor(){qe(this,Ca)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Qy(this.gcTime)&&Le(this,Ca,ka.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(tl?1/0:5*60*1e3))}clearGcTimeout(){Y(this,Ca)&&(ka.clearTimeout(Y(this,Ca)),Le(this,Ca,void 0))}},Ca=new WeakMap,RC),Ta,Yl,rs,Pa,Mn,Ad,Ra,Ps,Ti,IC,iY=(IC=class extends IM{constructor(t){super();qe(this,Ps);qe(this,Ta);qe(this,Yl);qe(this,rs);qe(this,Pa);qe(this,Mn);qe(this,Ad);qe(this,Ra);Le(this,Ra,!1),Le(this,Ad,t.defaultOptions),this.setOptions(t.options),this.observers=[],Le(this,Pa,t.client),Le(this,rs,Y(this,Pa).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Le(this,Ta,dx(this.options)),this.state=t.state??Y(this,Ta),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=Y(this,Mn))==null?void 0:t.promise}setOptions(t){if(this.options={...Y(this,Ad),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=dx(this.options);n.data!==void 0&&(this.setData(n.data,{updatedAt:n.dataUpdatedAt,manual:!0}),Le(this,Ta,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&Y(this,rs).remove(this)}setData(t,n){const r=Zy(this.state.data,t,this.options);return it(this,Ps,Ti).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){it(this,Ps,Ti).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=Y(this,Mn))==null?void 0:r.promise;return(s=Y(this,Mn))==null||s.cancel(t),n?n.then(ss).catch(ss):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(Y(this,Ta))}isActive(){return this.observers.some(t=>as(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===C0||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Mo(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!EM(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=Y(this,Mn))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=Y(this,Mn))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),Y(this,rs).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(Y(this,Mn)&&(Y(this,Ra)?Y(this,Mn).cancel({revert:!0}):Y(this,Mn).cancelRetry()),this.scheduleGc()),Y(this,rs).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||it(this,Ps,Ti).call(this,{type:"invalidate"})}async fetch(t,n){var l,u,c,d,f,h,g,m,y,w,b,x;if(this.state.fetchStatus!=="idle"&&((l=Y(this,Mn))==null?void 0:l.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(Y(this,Mn))return Y(this,Mn).continueRetry(),Y(this,Mn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const _=this.observers.find(S=>S.options.queryFn);_&&this.setOptions(_.options)}const r=new AbortController,s=_=>{Object.defineProperty(_,"signal",{enumerable:!0,get:()=>(Le(this,Ra,!0),r.signal)})},i=()=>{const _=TM(this.options,n),P=(()=>{const A={client:Y(this,Pa),queryKey:this.queryKey,meta:this.meta};return s(A),A})();return Le(this,Ra,!1),this.options.persister?this.options.persister(_,P,this):_(P)},a=(()=>{const _={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:Y(this,Pa),state:this.state,fetchFn:i};return s(_),_})();(u=this.options.behavior)==null||u.onFetch(a,this),Le(this,Yl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=a.fetchOptions)==null?void 0:c.meta))&&it(this,Ps,Ti).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta}),Le(this,Mn,RM({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,onCancel:_=>{_ instanceof nb&&_.revert&&this.setState({...Y(this,Yl),fetchStatus:"idle"}),r.abort()},onFail:(_,S)=>{it(this,Ps,Ti).call(this,{type:"failed",failureCount:_,error:S})},onPause:()=>{it(this,Ps,Ti).call(this,{type:"pause"})},onContinue:()=>{it(this,Ps,Ti).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}));try{const _=await Y(this,Mn).start();if(_===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(_),(h=(f=Y(this,rs).config).onSuccess)==null||h.call(f,_,this),(m=(g=Y(this,rs).config).onSettled)==null||m.call(g,_,this.state.error,this),_}catch(_){if(_ instanceof nb){if(_.silent)return Y(this,Mn).promise;if(_.revert){if(this.state.data===void 0)throw _;return this.state.data}}throw it(this,Ps,Ti).call(this,{type:"error",error:_}),(w=(y=Y(this,rs).config).onError)==null||w.call(y,_,this),(x=(b=Y(this,rs).config).onSettled)==null||x.call(b,this.state.data,_,this),_}finally{this.scheduleGc()}}},Ta=new WeakMap,Yl=new WeakMap,rs=new WeakMap,Pa=new WeakMap,Mn=new WeakMap,Ad=new WeakMap,Ra=new WeakMap,Ps=new WeakSet,Ti=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...AM(r.data,this.options),fetchMeta:t.meta??null};case"success":const s={...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Le(this,Yl,t.manual?s:void 0),s;case"error":const i=t.error;return{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),jn.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),Y(this,rs).notify({query:this,type:"updated",action:t})})},IC);function AM(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:PM(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function dx(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Pr,mt,Od,fr,Ia,Xl,Mi,_o,Md,Ql,Jl,Aa,Oa,ko,Zl,At,_c,rb,sb,ib,ob,ab,lb,ub,OM,AC,oY=(AC=class extends Qu{constructor(t,n){super();qe(this,At);qe(this,Pr);qe(this,mt);qe(this,Od);qe(this,fr);qe(this,Ia);qe(this,Xl);qe(this,Mi);qe(this,_o);qe(this,Md);qe(this,Ql);qe(this,Jl);qe(this,Aa);qe(this,Oa);qe(this,ko);qe(this,Zl,new Set);this.options=n,Le(this,Pr,t),Le(this,_o,null),Le(this,Mi,tb()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(Y(this,mt).addObserver(this),fx(Y(this,mt),this.options)?it(this,At,_c).call(this):this.updateResult(),it(this,At,ob).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return cb(Y(this,mt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return cb(Y(this,mt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,it(this,At,ab).call(this),it(this,At,lb).call(this),Y(this,mt).removeObserver(this)}setOptions(t){const n=this.options,r=Y(this,mt);if(this.options=Y(this,Pr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof as(this.options.enabled,Y(this,mt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");it(this,At,ub).call(this),Y(this,mt).setOptions(this.options),n._defaulted&&!Lp(this.options,n)&&Y(this,Pr).getQueryCache().notify({type:"observerOptionsUpdated",query:Y(this,mt),observer:this});const s=this.hasListeners();s&&hx(Y(this,mt),r,this.options,n)&&it(this,At,_c).call(this),this.updateResult(),s&&(Y(this,mt)!==r||as(this.options.enabled,Y(this,mt))!==as(n.enabled,Y(this,mt))||Mo(this.options.staleTime,Y(this,mt))!==Mo(n.staleTime,Y(this,mt)))&&it(this,At,rb).call(this);const i=it(this,At,sb).call(this);s&&(Y(this,mt)!==r||as(this.options.enabled,Y(this,mt))!==as(n.enabled,Y(this,mt))||i!==Y(this,ko))&&it(this,At,ib).call(this,i)}getOptimisticResult(t){const n=Y(this,Pr).getQueryCache().build(Y(this,Pr),t),r=this.createResult(n,t);return lY(this,r)&&(Le(this,fr,r),Le(this,Xl,this.options),Le(this,Ia,Y(this,mt).state)),r}getCurrentResult(){return Y(this,fr)}trackResult(t,n){return new Proxy(t,{get:(r,s)=>(this.trackProp(s),n==null||n(s),s==="promise"&&!this.options.experimental_prefetchInRender&&Y(this,Mi).status==="pending"&&Y(this,Mi).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),Reflect.get(r,s))})}trackProp(t){Y(this,Zl).add(t)}getCurrentQuery(){return Y(this,mt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=Y(this,Pr).defaultQueryOptions(t),r=Y(this,Pr).getQueryCache().build(Y(this,Pr),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return it(this,At,_c).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),Y(this,fr)))}createResult(t,n){var T;const r=Y(this,mt),s=this.options,i=Y(this,fr),o=Y(this,Ia),a=Y(this,Xl),u=t!==r?t.state:Y(this,Od),{state:c}=t;let d={...c},f=!1,h;if(n._optimisticResults){const R=this.hasListeners(),I=!R&&fx(t,n),O=R&&hx(t,r,n,s);(I||O)&&(d={...d,...AM(c.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:g,errorUpdatedAt:m,status:y}=d;h=d.data;let w=!1;if(n.placeholderData!==void 0&&h===void 0&&y==="pending"){let R;i!=null&&i.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData)?(R=i.data,w=!0):R=typeof n.placeholderData=="function"?n.placeholderData((T=Y(this,Jl))==null?void 0:T.state.data,Y(this,Jl)):n.placeholderData,R!==void 0&&(y="success",h=Zy(i==null?void 0:i.data,R,n),f=!0)}if(n.select&&h!==void 0&&!w)if(i&&h===(o==null?void 0:o.data)&&n.select===Y(this,Md))h=Y(this,Ql);else try{Le(this,Md,n.select),h=n.select(h),h=Zy(i==null?void 0:i.data,h,n),Le(this,Ql,h),Le(this,_o,null)}catch(R){Le(this,_o,R)}Y(this,_o)&&(g=Y(this,_o),h=Y(this,Ql),m=Date.now(),y="error");const b=d.fetchStatus==="fetching",x=y==="pending",_=y==="error",S=x&&b,P=h!==void 0,E={status:y,fetchStatus:d.fetchStatus,isPending:x,isSuccess:y==="success",isError:_,isInitialLoading:S,isLoading:S,data:h,dataUpdatedAt:d.dataUpdatedAt,error:g,errorUpdatedAt:m,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>u.dataUpdateCount||d.errorUpdateCount>u.errorUpdateCount,isFetching:b,isRefetching:b&&!x,isLoadingError:_&&!P,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:_&&P,isStale:P0(t,n),refetch:this.refetch,promise:Y(this,Mi),isEnabled:as(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const R=H=>{E.status==="error"?H.reject(E.error):E.data!==void 0&&H.resolve(E.data)},I=()=>{const H=Le(this,Mi,E.promise=tb());R(H)},O=Y(this,Mi);switch(O.status){case"pending":t.queryHash===r.queryHash&&R(O);break;case"fulfilled":(E.status==="error"||E.data!==O.value)&&I();break;case"rejected":(E.status!=="error"||E.error!==O.reason)&&I();break}}return E}updateResult(){const t=Y(this,fr),n=this.createResult(Y(this,mt),this.options);if(Le(this,Ia,Y(this,mt).state),Le(this,Xl,this.options),Y(this,Ia).data!==void 0&&Le(this,Jl,Y(this,mt)),Lp(n,t))return;Le(this,fr,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,i=typeof s=="function"?s():s;if(i==="all"||!i&&!Y(this,Zl).size)return!0;const o=new Set(i??Y(this,Zl));return this.options.throwOnError&&o.add("error"),Object.keys(Y(this,fr)).some(a=>{const l=a;return Y(this,fr)[l]!==t[l]&&o.has(l)})};it(this,At,OM).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&it(this,At,ob).call(this)}},Pr=new WeakMap,mt=new WeakMap,Od=new WeakMap,fr=new WeakMap,Ia=new WeakMap,Xl=new WeakMap,Mi=new WeakMap,_o=new WeakMap,Md=new WeakMap,Ql=new WeakMap,Jl=new WeakMap,Aa=new WeakMap,Oa=new WeakMap,ko=new WeakMap,Zl=new WeakMap,At=new WeakSet,_c=function(t){it(this,At,ub).call(this);let n=Y(this,mt).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(ss)),n},rb=function(){it(this,At,ab).call(this);const t=Mo(this.options.staleTime,Y(this,mt));if(tl||Y(this,fr).isStale||!Qy(t))return;const r=EM(Y(this,fr).dataUpdatedAt,t)+1;Le(this,Aa,ka.setTimeout(()=>{Y(this,fr).isStale||this.updateResult()},r))},sb=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(Y(this,mt)):this.options.refetchInterval)??!1},ib=function(t){it(this,At,lb).call(this),Le(this,ko,t),!(tl||as(this.options.enabled,Y(this,mt))===!1||!Qy(Y(this,ko))||Y(this,ko)===0)&&Le(this,Oa,ka.setInterval(()=>{(this.options.refetchIntervalInBackground||T0.isFocused())&&it(this,At,_c).call(this)},Y(this,ko)))},ob=function(){it(this,At,rb).call(this),it(this,At,ib).call(this,it(this,At,sb).call(this))},ab=function(){Y(this,Aa)&&(ka.clearTimeout(Y(this,Aa)),Le(this,Aa,void 0))},lb=function(){Y(this,Oa)&&(ka.clearInterval(Y(this,Oa)),Le(this,Oa,void 0))},ub=function(){const t=Y(this,Pr).getQueryCache().build(Y(this,Pr),this.options);if(t===Y(this,mt))return;const n=Y(this,mt);Le(this,mt,t),Le(this,Od,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},OM=function(t){jn.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(Y(this,fr))}),Y(this,Pr).getQueryCache().notify({query:Y(this,mt),type:"observerResultsUpdated"})})},AC);function aY(e,t){return as(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function fx(e,t){return aY(e,t)||e.state.data!==void 0&&cb(e,t,t.refetchOnMount)}function cb(e,t,n){if(as(t.enabled,e)!==!1&&Mo(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&P0(e,t)}return!1}function hx(e,t,n,r){return(e!==t||as(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&P0(e,n)}function P0(e,t){return as(t.enabled,e)!==!1&&e.isStaleByTime(Mo(t.staleTime,e))}function lY(e,t){return!Lp(e.getCurrentResult(),t)}function px(e){return{onFetch:(t,n)=>{var c,d,f,h,g;const r=t.options,s=(f=(d=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,i=((h=t.state.data)==null?void 0:h.pages)||[],o=((g=t.state.data)==null?void 0:g.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let m=!1;const y=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},w=TM(t.options,t.fetchOptions),b=async(x,_,S)=>{if(m)return Promise.reject();if(_==null&&x.pages.length)return Promise.resolve(x);const A=(()=>{const I={client:t.client,queryKey:t.queryKey,pageParam:_,direction:S?"backward":"forward",meta:t.options.meta};return y(I),I})(),E=await w(A),{maxPages:T}=t.options,R=S?ZK:JK;return{pages:R(x.pages,E,T),pageParams:R(x.pageParams,_,T)}};if(s&&i.length){const x=s==="backward",_=x?uY:mx,S={pages:i,pageParams:o},P=_(r,S);a=await b(S,P,x)}else{const x=e??i.length;do{const _=l===0?o[0]??r.initialPageParam:mx(r,a);if(l>0&&_==null)break;a=await b(a,_),l++}while(l<x)}return a};t.options.persister?t.fetchFn=()=>{var m,y;return(y=(m=t.options).persister)==null?void 0:y.call(m,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function mx(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function uY(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Dd,ri,hr,Ma,si,fo,OC,cY=(OC=class extends IM{constructor(t){super();qe(this,si);qe(this,Dd);qe(this,ri);qe(this,hr);qe(this,Ma);Le(this,Dd,t.client),this.mutationId=t.mutationId,Le(this,hr,t.mutationCache),Le(this,ri,[]),this.state=t.state||MM(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){Y(this,ri).includes(t)||(Y(this,ri).push(t),this.clearGcTimeout(),Y(this,hr).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Le(this,ri,Y(this,ri).filter(n=>n!==t)),this.scheduleGc(),Y(this,hr).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){Y(this,ri).length||(this.state.status==="pending"?this.scheduleGc():Y(this,hr).remove(this))}continue(){var t;return((t=Y(this,Ma))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,a,l,u,c,d,f,h,g,m,y,w,b,x,_,S,P,A,E,T;const n=()=>{it(this,si,fo).call(this,{type:"continue"})},r={client:Y(this,Dd),meta:this.options.meta,mutationKey:this.options.mutationKey};Le(this,Ma,RM({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(R,I)=>{it(this,si,fo).call(this,{type:"failed",failureCount:R,error:I})},onPause:()=>{it(this,si,fo).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>Y(this,hr).canRun(this)}));const s=this.state.status==="pending",i=!Y(this,Ma).canStart();try{if(s)n();else{it(this,si,fo).call(this,{type:"pending",variables:t,isPaused:i}),await((a=(o=Y(this,hr).config).onMutate)==null?void 0:a.call(o,t,this,r));const I=await((u=(l=this.options).onMutate)==null?void 0:u.call(l,t,r));I!==this.state.context&&it(this,si,fo).call(this,{type:"pending",context:I,variables:t,isPaused:i})}const R=await Y(this,Ma).start();return await((d=(c=Y(this,hr).config).onSuccess)==null?void 0:d.call(c,R,t,this.state.context,this,r)),await((h=(f=this.options).onSuccess)==null?void 0:h.call(f,R,t,this.state.context,r)),await((m=(g=Y(this,hr).config).onSettled)==null?void 0:m.call(g,R,null,this.state.variables,this.state.context,this,r)),await((w=(y=this.options).onSettled)==null?void 0:w.call(y,R,null,t,this.state.context,r)),it(this,si,fo).call(this,{type:"success",data:R}),R}catch(R){try{throw await((x=(b=Y(this,hr).config).onError)==null?void 0:x.call(b,R,t,this.state.context,this,r)),await((S=(_=this.options).onError)==null?void 0:S.call(_,R,t,this.state.context,r)),await((A=(P=Y(this,hr).config).onSettled)==null?void 0:A.call(P,void 0,R,this.state.variables,this.state.context,this,r)),await((T=(E=this.options).onSettled)==null?void 0:T.call(E,void 0,R,t,this.state.context,r)),R}finally{it(this,si,fo).call(this,{type:"error",error:R})}}finally{Y(this,hr).runNext(this)}}},Dd=new WeakMap,ri=new WeakMap,hr=new WeakMap,Ma=new WeakMap,si=new WeakSet,fo=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),jn.batch(()=>{Y(this,ri).forEach(r=>{r.onMutationUpdate(t)}),Y(this,hr).notify({mutation:this,type:"updated",action:t})})},OC);function MM(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Di,Rs,Ld,MC,DM=(MC=class extends Qu{constructor(n={}){super();qe(this,Di);qe(this,Rs);qe(this,Ld);this.config=n,Le(this,Di,new Set),Le(this,Rs,new Map),Le(this,Ld,0)}build(n,r,s){const i=new cY({client:n,mutationCache:this,mutationId:++pf(this,Ld)._,options:n.defaultMutationOptions(r),state:s});return this.add(i),i}add(n){Y(this,Di).add(n);const r=Bf(n);if(typeof r=="string"){const s=Y(this,Rs).get(r);s?s.push(n):Y(this,Rs).set(r,[n])}this.notify({type:"added",mutation:n})}remove(n){if(Y(this,Di).delete(n)){const r=Bf(n);if(typeof r=="string"){const s=Y(this,Rs).get(r);if(s)if(s.length>1){const i=s.indexOf(n);i!==-1&&s.splice(i,1)}else s[0]===n&&Y(this,Rs).delete(r)}}this.notify({type:"removed",mutation:n})}canRun(n){const r=Bf(n);if(typeof r=="string"){const s=Y(this,Rs).get(r),i=s==null?void 0:s.find(o=>o.state.status==="pending");return!i||i===n}else return!0}runNext(n){var s;const r=Bf(n);if(typeof r=="string"){const i=(s=Y(this,Rs).get(r))==null?void 0:s.find(o=>o!==n&&o.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){jn.batch(()=>{Y(this,Di).forEach(n=>{this.notify({type:"removed",mutation:n})}),Y(this,Di).clear(),Y(this,Rs).clear()})}getAll(){return Array.from(Y(this,Di))}find(n){const r={exact:!0,...n};return this.getAll().find(s=>lx(r,s))}findAll(n={}){return this.getAll().filter(r=>lx(n,r))}notify(n){jn.batch(()=>{this.listeners.forEach(r=>{r(n)})})}resumePausedMutations(){const n=this.getAll().filter(r=>r.state.isPaused);return jn.batch(()=>Promise.all(n.map(r=>r.continue().catch(ss))))}},Di=new WeakMap,Rs=new WeakMap,Ld=new WeakMap,MC);function Bf(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Li,xo,Rr,$i,ji,Ih,db,DC,dY=(DC=class extends Qu{constructor(n,r){super();qe(this,ji);qe(this,Li);qe(this,xo);qe(this,Rr);qe(this,$i);Le(this,Li,n),this.setOptions(r),this.bindMethods(),it(this,ji,Ih).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var s;const r=this.options;this.options=Y(this,Li).defaultMutationOptions(n),Lp(this.options,r)||Y(this,Li).getMutationCache().notify({type:"observerOptionsUpdated",mutation:Y(this,Rr),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&nl(r.mutationKey)!==nl(this.options.mutationKey)?this.reset():((s=Y(this,Rr))==null?void 0:s.state.status)==="pending"&&Y(this,Rr).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=Y(this,Rr))==null||n.removeObserver(this)}onMutationUpdate(n){it(this,ji,Ih).call(this),it(this,ji,db).call(this,n)}getCurrentResult(){return Y(this,xo)}reset(){var n;(n=Y(this,Rr))==null||n.removeObserver(this),Le(this,Rr,void 0),it(this,ji,Ih).call(this),it(this,ji,db).call(this)}mutate(n,r){var s;return Le(this,$i,r),(s=Y(this,Rr))==null||s.removeObserver(this),Le(this,Rr,Y(this,Li).getMutationCache().build(Y(this,Li),this.options)),Y(this,Rr).addObserver(this),Y(this,Rr).execute(n)}},Li=new WeakMap,xo=new WeakMap,Rr=new WeakMap,$i=new WeakMap,ji=new WeakSet,Ih=function(){var r;const n=((r=Y(this,Rr))==null?void 0:r.state)??MM();Le(this,xo,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},db=function(n){jn.batch(()=>{var r,s,i,o,a,l,u,c;if(Y(this,$i)&&this.hasListeners()){const d=Y(this,xo).variables,f=Y(this,xo).context,h={client:Y(this,Li),meta:this.options.meta,mutationKey:this.options.mutationKey};(n==null?void 0:n.type)==="success"?((s=(r=Y(this,$i)).onSuccess)==null||s.call(r,n.data,d,f,h),(o=(i=Y(this,$i)).onSettled)==null||o.call(i,n.data,null,d,f,h)):(n==null?void 0:n.type)==="error"&&((l=(a=Y(this,$i)).onError)==null||l.call(a,n.error,d,f,h),(c=(u=Y(this,$i)).onSettled)==null||c.call(u,void 0,n.error,d,f,h))}this.listeners.forEach(d=>{d(Y(this,xo))})})},DC),ii,LC,LM=(LC=class extends Qu{constructor(n={}){super();qe(this,ii);this.config=n,Le(this,ii,new Map)}build(n,r,s){const i=r.queryKey,o=r.queryHash??E0(i,r);let a=this.get(o);return a||(a=new iY({client:n,queryKey:i,queryHash:o,options:n.defaultQueryOptions(r),state:s,defaultOptions:n.getQueryDefaults(i)}),this.add(a)),a}add(n){Y(this,ii).has(n.queryHash)||(Y(this,ii).set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const r=Y(this,ii).get(n.queryHash);r&&(n.destroy(),r===n&&Y(this,ii).delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){jn.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return Y(this,ii).get(n)}getAll(){return[...Y(this,ii).values()]}find(n){const r={exact:!0,...n};return this.getAll().find(s=>ax(r,s))}findAll(n={}){const r=this.getAll();return Object.keys(n).length>0?r.filter(s=>ax(n,s)):r}notify(n){jn.batch(()=>{this.listeners.forEach(r=>{r(n)})})}onFocus(){jn.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){jn.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},ii=new WeakMap,LC),pn,Eo,Co,eu,tu,To,nu,ru,$C,fY=($C=class{constructor(t={}){qe(this,pn);qe(this,Eo);qe(this,Co);qe(this,eu);qe(this,tu);qe(this,To);qe(this,nu);qe(this,ru);Le(this,pn,t.queryCache||new LM),Le(this,Eo,t.mutationCache||new DM),Le(this,Co,t.defaultOptions||{}),Le(this,eu,new Map),Le(this,tu,new Map),Le(this,To,0)}mount(){pf(this,To)._++,Y(this,To)===1&&(Le(this,nu,T0.subscribe(async t=>{t&&(await this.resumePausedMutations(),Y(this,pn).onFocus())})),Le(this,ru,$p.subscribe(async t=>{t&&(await this.resumePausedMutations(),Y(this,pn).onOnline())})))}unmount(){var t,n;pf(this,To)._--,Y(this,To)===0&&((t=Y(this,nu))==null||t.call(this),Le(this,nu,void 0),(n=Y(this,ru))==null||n.call(this),Le(this,ru,void 0))}isFetching(t){return Y(this,pn).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return Y(this,Eo).findAll({...t,status:"pending"}).length}getQueryData(t){var r;const n=this.defaultQueryOptions({queryKey:t});return(r=Y(this,pn).get(n.queryHash))==null?void 0:r.state.data}ensureQueryData(t){const n=this.defaultQueryOptions(t),r=Y(this,pn).build(this,n),s=r.state.data;return s===void 0?this.fetchQuery(t):(t.revalidateIfStale&&r.isStaleByTime(Mo(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(s))}getQueriesData(t){return Y(this,pn).findAll(t).map(({queryKey:n,state:r})=>{const s=r.data;return[n,s]})}setQueryData(t,n,r){const s=this.defaultQueryOptions({queryKey:t}),i=Y(this,pn).get(s.queryHash),o=i==null?void 0:i.state.data,a=YK(n,o);if(a!==void 0)return Y(this,pn).build(this,s).setData(a,{...r,manual:!0})}setQueriesData(t,n,r){return jn.batch(()=>Y(this,pn).findAll(t).map(({queryKey:s})=>[s,this.setQueryData(s,n,r)]))}getQueryState(t){var r;const n=this.defaultQueryOptions({queryKey:t});return(r=Y(this,pn).get(n.queryHash))==null?void 0:r.state}removeQueries(t){const n=Y(this,pn);jn.batch(()=>{n.findAll(t).forEach(r=>{n.remove(r)})})}resetQueries(t,n){const r=Y(this,pn);return jn.batch(()=>(r.findAll(t).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...t},n)))}cancelQueries(t,n={}){const r={revert:!0,...n},s=jn.batch(()=>Y(this,pn).findAll(t).map(i=>i.cancel(r)));return Promise.all(s).then(ss).catch(ss)}invalidateQueries(t,n={}){return jn.batch(()=>(Y(this,pn).findAll(t).forEach(r=>{r.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},n)))}refetchQueries(t,n={}){const r={...n,cancelRefetch:n.cancelRefetch??!0},s=jn.batch(()=>Y(this,pn).findAll(t).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,r);return r.throwOnError||(o=o.catch(ss)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(s).then(ss)}fetchQuery(t){const n=this.defaultQueryOptions(t);n.retry===void 0&&(n.retry=!1);const r=Y(this,pn).build(this,n);return r.isStaleByTime(Mo(n.staleTime,r))?r.fetch(n):Promise.resolve(r.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(ss).catch(ss)}fetchInfiniteQuery(t){return t.behavior=px(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(ss).catch(ss)}ensureInfiniteQueryData(t){return t.behavior=px(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return $p.isOnline()?Y(this,Eo).resumePausedMutations():Promise.resolve()}getQueryCache(){return Y(this,pn)}getMutationCache(){return Y(this,Eo)}getDefaultOptions(){return Y(this,Co)}setDefaultOptions(t){Le(this,Co,t)}setQueryDefaults(t,n){Y(this,eu).set(nl(t),{queryKey:t,defaultOptions:n})}getQueryDefaults(t){const n=[...Y(this,eu).values()],r={};return n.forEach(s=>{_d(t,s.queryKey)&&Object.assign(r,s.defaultOptions)}),r}setMutationDefaults(t,n){Y(this,tu).set(nl(t),{mutationKey:t,defaultOptions:n})}getMutationDefaults(t){const n=[...Y(this,tu).values()],r={};return n.forEach(s=>{_d(t,s.mutationKey)&&Object.assign(r,s.defaultOptions)}),r}defaultQueryOptions(t){if(t._defaulted)return t;const n={...Y(this,Co).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return n.queryHash||(n.queryHash=E0(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===C0&&(n.enabled=!1),n}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...Y(this,Co).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){Y(this,pn).clear(),Y(this,Eo).clear()}},pn=new WeakMap,Eo=new WeakMap,Co=new WeakMap,eu=new WeakMap,tu=new WeakMap,To=new WeakMap,nu=new WeakMap,ru=new WeakMap,$C),hY="VUE_QUERY_CLIENT";function $M(e){const t=e?`:${e}`:"";return`${hY}${t}`}function fb(e,t){Object.keys(e).forEach(n=>{e[n]=t[n]})}function hb(e,t,n="",r=0){if(t){const s=t(e,n,r);if(s===void 0&&rt(e)||s!==void 0)return s}if(Array.isArray(e))return e.map((s,i)=>hb(s,t,String(i),r+1));if(typeof e=="object"&&mY(e)){const s=Object.entries(e).map(([i,o])=>[i,hb(o,t,i,r+1)]);return Object.fromEntries(s)}return e}function pY(e,t){return hb(e,t)}function ut(e,t=!1){return pY(e,(n,r,s)=>{if(s===1&&r==="queryKey")return ut(n,!0);if(t&&gY(n))return ut(n(),t);if(rt(n))return ut(J(n),t)})}function mY(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function gY(e){return typeof e=="function"}function R0(e=""){if(!DT())throw new Error("vue-query hooks can only be used inside setup() function or functions that support injection context.");const t=$M(e),n=Je(t);if(!n)throw new Error("No 'queryClient' found in Vue context, use 'VueQueryPlugin' to properly initialize the library.");return n}var vY=class extends LM{find(e){return super.find(ut(e))}findAll(e={}){return super.findAll(ut(e))}},yY=class extends DM{find(e){return super.find(ut(e))}findAll(e={}){return super.findAll(ut(e))}},bY=class extends fY{constructor(e={}){const t={defaultOptions:e.defaultOptions,queryCache:e.queryCache||new vY,mutationCache:e.mutationCache||new yY};super(t),this.isRestoring=K(!1)}isFetching(e={}){return super.isFetching(ut(e))}isMutating(e={}){return super.isMutating(ut(e))}getQueryData(e){return super.getQueryData(ut(e))}ensureQueryData(e){return super.ensureQueryData(ut(e))}getQueriesData(e){return super.getQueriesData(ut(e))}setQueryData(e,t,n={}){return super.setQueryData(ut(e),t,ut(n))}setQueriesData(e,t,n={}){return super.setQueriesData(ut(e),t,ut(n))}getQueryState(e){return super.getQueryState(ut(e))}removeQueries(e={}){return super.removeQueries(ut(e))}resetQueries(e={},t={}){return super.resetQueries(ut(e),ut(t))}cancelQueries(e={},t={}){return super.cancelQueries(ut(e),ut(t))}invalidateQueries(e={},t={}){const n=ut(e),r=ut(t);if(super.invalidateQueries({...n,refetchType:"none"},r),n.refetchType==="none")return Promise.resolve();const s={...n,type:n.refetchType??n.type??"active"};return Pt().then(()=>super.refetchQueries(s,r))}refetchQueries(e={},t={}){return super.refetchQueries(ut(e),ut(t))}fetchQuery(e){return super.fetchQuery(ut(e))}prefetchQuery(e){return super.prefetchQuery(ut(e))}fetchInfiniteQuery(e){return super.fetchInfiniteQuery(ut(e))}prefetchInfiniteQuery(e){return super.prefetchInfiniteQuery(ut(e))}setDefaultOptions(e){super.setDefaultOptions(ut(e))}setQueryDefaults(e,t){super.setQueryDefaults(ut(e),ut(t))}getQueryDefaults(e){return super.getQueryDefaults(ut(e))}setMutationDefaults(e,t){super.setMutationDefaults(ut(e),ut(t))}getMutationDefaults(e){return super.getMutationDefaults(ut(e))}},wY={install:(e,t={})=>{const n=$M(t.queryClientKey);let r;if("queryClient"in t&&t.queryClient)r=t.queryClient;else{const o="queryClientConfig"in t?t.queryClientConfig:void 0;r=new bY(o)}tl||r.mount();let s=()=>{};if(t.clientPersister){r.isRestoring&&(r.isRestoring.value=!0);const[o,a]=t.clientPersister(r);s=o,a.then(()=>{var l;r.isRestoring&&(r.isRestoring.value=!1),(l=t.clientPersisterOnSuccess)==null||l.call(t,r)})}const i=()=>{r.unmount(),s()};if(e.onUnmount)e.onUnmount(i);else{const o=e.unmount;e.unmount=function(){i(),o()}}e.provide(n,r)}};function SY(e,t,n){const r=R0(),s=M(()=>{var m;const h=ut(t);typeof h.enabled=="function"&&(h.enabled=h.enabled());const g=r.defaultQueryOptions(h);return g._optimisticResults=(m=r.isRestoring)!=null&&m.value?"isRestoring":"optimistic",g}),i=new e(r,s.value),o=s.value.shallow?Zp(i.getCurrentResult()):mn(i.getCurrentResult());let a=()=>{};r.isRestoring&&Ee(r.isRestoring,h=>{h||(a(),a=i.subscribe(g=>{fb(o,g)}))},{immediate:!0});const l=()=>{i.setOptions(s.value),fb(o,i.getCurrentResult())};Ee(s,l),dn(()=>{a()});const u=(...h)=>(l(),o.refetch(...h)),c=()=>new Promise((h,g)=>{let m=()=>{};const y=()=>{if(s.value.enabled!==!1){i.setOptions(s.value);const w=i.getOptimisticResult(s.value);w.isStale?(m(),i.fetchOptimistic(s.value).then(h,b=>{eb(s.value.throwOnError,[b,i.getCurrentQuery()])?g(b):h(i.getCurrentResult())})):(m(),h(w))}};y(),m=Ee(s,y)});Ee(()=>o.error,h=>{if(o.isError&&!o.isFetching&&eb(s.value.throwOnError,[h,i.getCurrentQuery()]))throw h});const d=s.value.shallow?Hb(o):Gi(o),f=sl(d);for(const h in o)typeof o[h]=="function"&&(f[h]=o[h]);return f.suspense=c,f.refetch=u,f}function Um(e,t){return SY(oY,e)}function _Y(e,t){const n=R0(),r=M(()=>n.defaultMutationOptions(ut(e))),s=new dY(n,r.value),i=r.value.shallow?Zp(s.getCurrentResult()):mn(s.getCurrentResult()),o=s.subscribe(c=>{fb(i,c)}),a=(c,d)=>{s.mutate(c,d).catch(()=>{})};Ee(r,()=>{s.setOptions(r.value)}),dn(()=>{o()});const l=r.value.shallow?Hb(i):Gi(i),u=sl(l);return Ee(()=>i.error,c=>{if(c&&eb(r.value.throwOnError,[c]))throw c}),{...u,mutate:a,mutateAsync:i.mutate,reset:i.reset}}const kY=he({...Ge(),...Sr(),...YO()},"VLayout"),zm=xe()({name:"VLayout",props:kY(),setup(e,t){let{slots:n}=t;const{layoutClasses:r,layoutStyles:s,getLayoutItem:i,items:o,layoutRef:a}=ZO(e),{dimensionStyles:l}=_r(e);return Me(()=>{var u;return C("div",{ref:a,class:Re([r.value,e.class]),style:Be([l.value,s.value,e.style])},[(u=n.default)==null?void 0:u.call(n)])}),{getLayoutItem:i,items:o}}}),xY={class:"text-h5"},EY={key:0},CY={key:1},TY=Fe({__name:"AddOrUpdateCameraStreamDialog",setup(e){const t=R0(),n=rn(sn.AddOrUpdateCameraDialog),r=M(()=>"C"),s=K({name:"",streamURL:""}),i=()=>{var d;return((d=n.context())==null?void 0:d.addOrUpdate)==="update"},o=M(()=>i());Ee(()=>n.context(),d=>{var h;if(!d||(d==null?void 0:d.addOrUpdate)!=="update"){s.value.streamURL="",s.value.name="";return}const f=(h=t.getQueryData(["cameraStream"]))==null?void 0:h.find(g=>g.cameraStream.id===d.cameraId);s.value.name=f==null?void 0:f.cameraStream.name,s.value.streamURL=(f==null?void 0:f.cameraStream.streamURL)||""});function a(){n.closeDialog()}async function l(){await Dp.createCameraStream({streamURL:s.value.streamURL,name:s.value.name}),await t.refetchQueries({queryKey:["cameraStream"]}),n.closeDialog()}async function u(){var d;await Dp.updateCameraStream((d=n.context())==null?void 0:d.cameraId,{streamURL:s.value.streamURL,name:s.value.name}),await t.refetchQueries({queryKey:["cameraStream"]}),n.closeDialog()}function c(){n.closeDialog()}return(d,f)=>{const h=yi;return $(),te(h,{id:J(n).dialogId,"max-width":"800px",onEscape:f[3]||(f[3]=g=>a())},{default:v(()=>[p(kt,null,{default:v(()=>[p(an,null,{default:v(()=>[C("span",xY,[p(dt,{class:"mr-2",color:"primary",size:"56"},{default:v(()=>[k(se(r.value),1)]),_:1}),o.value?($(),ve("span",EY," Updating Camera ")):($(),ve("span",CY," New Camera "))])]),_:1}),p(nn,null,{default:v(()=>[p(Yn,{"grid-list-md":""},{default:v(()=>[p(zm,{wrap:""},{default:v(()=>[p(at,{modelValue:s.value.name,"onUpdate:modelValue":f[0]||(f[0]=g=>s.value.name=g),label:"Name",required:""},null,8,["modelValue"]),p(at,{modelValue:s.value.streamURL,"onUpdate:modelValue":f[1]||(f[1]=g=>s.value.streamURL=g),label:"Url (MJPEG)",required:""},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),p(Bn,null,{default:v(()=>[p(Tn),p(ne,{color:"primary-darken-2",onClick:c},{default:v(()=>[...f[4]||(f[4]=[k(" Cancel ",-1)])]),_:1}),p(ne,{color:"primary",onClick:f[2]||(f[2]=g=>o.value?u():l())},{default:v(()=>[k(se(o.value?"Update":"Create"),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}}),I0=Ss("TestPrinter",{state:()=>({currentCorrelationToken:void 0,testPrinter:void 0,testPrinterEvents:[]}),getters:{getEvents(){return()=>{var e;return(((e=this.testPrinterEvents)==null?void 0:e.filter(t=>t.correlationToken===this.currentCorrelationToken))||[]).filter(t=>(t.event!=="API_STATE_UPDATED"||t.payload!=="unset")&&(t.event!=="WS_STATE_UPDATED"||t.payload!=="unopened")).map(t=>{var r,s,i;return{event:t.event.startsWith("WS_")?"Socket":"API",payload:(s=(r=t.payload)==null?void 0:r.toString())==null?void 0:s.replace("noResponse","unreachable").replace("authFail","authentication failure"),failure:["authFail","noResponse","aborted","globalKey","error","connection error","closed","connection closed"].includes((i=t.payload)==null?void 0:i.toString())}})}}},actions:{clearEvents(){this.testPrinterEvents=[]},async createTestPrinter(e){return this.testPrinter=e,await en.testConnection(e)},saveEvent(e){var t;(t=this.testPrinterEvents)==null||t.push(e)}}}),PY="error",RY="success",IY=Fe({__name:"PrinterChecksPanel",setup(e){const t=I0(),n=K(4);function r(){return t.getEvents().map(s=>({label:s.event,text:s.payload,color:s.failure?PY:RY}))}return(s,i)=>($(),te(We,{cols:J(n)},{default:v(()=>[i[0]||(i[0]=C("strong",null," Checks: ",-1)),($(!0),ve(Oe,null,Qt(r(),(o,a)=>($(),te(vn,{key:a,type:o.color,density:"compact"},{default:v(()=>[C("small",null,se(o.label)+" "+se(o.text),1)]),_:2},1032,["type"]))),128))]),_:1},8,["cols"]))}}),AY="/assets/klipper-logo-B1Hu-a1R.svg",OY="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3c!--%20Creator:%20CorelDRAW%202017%20--%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml:space='preserve'%20width='76.1823mm'%20height='18.3444mm'%20version='1.1'%20style='shape-rendering:geometricPrecision;%20text-rendering:geometricPrecision;%20image-rendering:optimizeQuality;%20fill-rule:evenodd;%20clip-rule:evenodd'%20viewBox='0%200%205483.86%201320.49'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cdefs%3e%3cstyle%20type='text/css'%3e%3c![CDATA[%20.fil0%20{fill:%23FEFEFE}%20.fil2%20{fill:%23FA6831}%20.fil3%20{fill:%23FEFEFE;fill-rule:nonzero}%20.fil1%20{fill:%232B2A29;fill-rule:nonzero}%20]]%3e%3c/style%3e%3c/defs%3e%3cg%20id='Layer_x0020_1'%3e%3cmetadata%20id='CorelCorpID_0Corel-Layer'/%3e%3cpath%20class='fil0'%20d='M-0%20385.77l3064.43%200%200%20934.72%20-3064.43%200%200%20-934.72zm5417.22%200l-2227.07%200%200%20934.72%202227.07%200%200%20-934.72z'/%3e%3cpath%20class='fil1'%20d='M3381.47%201144.22l426.16%200%200%20-131.38%20-273.43%200%200%20-454.89%20-152.73%200%200%20586.27zm-3073.6%20-463.92l102.63%200c46.8,0%2082.11,21.34%2082.11,77.18%200,53.37%20-33.66,73.08%20-82.11,73.08l-102.63%200%200%20-150.26zm-152.73%20463.92l152.73%200%200%20-195.42%20125.63%200c128.92,0%20211.85,-56.66%20211.85,-201.99%200,-138.76%20-102.64,-188.86%20-211.85,-188.86l-278.35%200%200%20586.27zm689.32%20-463.92l121.52%200c42.7,0%2077.18,19.7%2077.18,63.22%200,45.16%20-24.63,68.97%20-70.61,68.97l-128.09%200%200%20-132.2zm-152.73%20463.92l152.73%200%200%20-213.49%20115.78%200c72.26,0%2081.28,60.76%2085.39,119.88%202.46,17.25%204.1,73.08%2017.24,93.61l151.09%200c-20.53,-22.99%20-22.17,-106.74%20-24.63,-132.2%20-4.11,-55.84%20-23.81,-124.8%20-85.4,-140.41l0%20-1.64c62.41,-23.81%2091.97,-83.75%2091.97,-146.98%200,-118.24%20-102.63,-165.04%20-205.27,-165.04l-298.88%200%200%20586.27zm1073.59%20-586.27l-152.72%200%200%20353.08c0,75.54%20-27.1,114.13%20-102.64,114.13%20-75.54,0%20-102.63,-38.59%20-102.63,-114.13l0%20-353.08%20-152.73%200%200%20344.04c0,169.97%2078,254.54%20255.36,254.54%20177.36,0%20255.36,-84.57%20255.36,-254.54l0%20-344.04zm42.29%20389.21c0,150.26%20120.7,209.38%20254.54,209.38%20128.91,0%20255.36,-47.62%20255.36,-196.24%200,-105.92%20-85.39,-145.33%20-169.97,-169.15%20-85.39,-23.81%20-169.97,-31.2%20-169.97,-77.19%200,-38.59%2041.05,-50.09%2073.9,-50.09%2045.98,0%2096.89,18.07%2094.43,70.62l152.72%200c0,-131.38%20-119.06,-188.86%20-234.83,-188.86%20-110.03,0%20-238.94,50.09%20-238.94,178.18%200,108.39%2088.68,145.33%20171.61,169.15%2084.57,23.81%20168.33,32.85%20168.33,85.39%200,43.52%20-47.62,59.94%20-93.61,59.94%20-65.68,0%20-107.56,-22.17%20-110.85,-91.14l-152.72%200zm495.53%20197.06l156.83%200%2036.95%20-105.1%20204.45%200%2036.13%20105.1%20159.3%200%20-219.24%20-586.27%20-155.18%200%20-219.24%20586.27zm295.6%20-423.69l1.64%200%2064.86%20205.27%20-133.02%200%2066.51%20-205.27zm1258.56%20423.69l152.73%200%200%20-586.27%20-152.73%200%200%20586.27zm231.14%200l143.69%200%200%20-365.39%201.64%200%20203.63%20365.39%20156.83%200%200%20-586.27%20-143.69%200%200%20361.28%20-1.64%200%20-203.63%20-361.28%20-156.83%200%200%20586.27zm584.21%200l152.73%200%200%20-180.64%2062.4%20-65.68%20157.65%20246.33%20189.68%200%20-243.87%20-355.53%20216.77%20-230.74%20-189.68%200%20-192.96%20224.98%200%20-224.98%20-152.73%200%200%20586.27z'/%3e%3cpolygon%20class='fil2'%20points='5483.86,0%204170.36,0%204170.36,486.71%205483.86,486.71%20'/%3e%3cpath%20class='fil3'%20d='M4377.66%20154.79l62.68%200c16.97,0%2033.08,7.4%2033.08,30.03%200,22.2%20-19.15,29.6%20-33.08,29.6l-62.68%200%200%20-59.63zm-80.96%20248.1l149.29%200c66.6,0%20121,-22.63%20121,-96.63%200,-35.26%20-20.46,-63.55%20-53.54,-73.56%2024.38,-12.19%2040.92,-34.82%2040.92,-62.68%200,-64.42%20-58.76,-79.22%20-112.29,-77.91l-145.38%200%200%20310.77zm80.96%20-136.24l64.85%200c24.37,0%2043.53,9.14%2043.53,36.56%200,25.68%20-17.84,34.82%20-43.53,34.82l-64.85%200%200%20-71.38zm219.59%20136.24l252.01%200%200%20-69.64%20-171.05%200%200%20-59.19%20152.34%200%200%20-62.68%20-152.34%200%200%20-54.41%20166.71%200%200%20-64.85%20-247.67%200%200%20310.77zm530.8%20-310.77l-266.38%200%200%2069.64%2092.71%200%200%20241.14%2080.96%200%200%20-241.14%2092.71%200%200%20-69.64zm-49.83%20310.77l83.13%200%2019.59%20-55.72%20108.38%200%2019.15%2055.72%2084.44%200%20-116.21%20-310.77%20-82.27%200%20-116.21%20310.77zm156.69%20-224.6l0.87%200%2034.39%20108.82%20-70.51%200%2035.26%20-108.82z'/%3e%3c/g%3e%3c/svg%3e",FM=Symbol.for("vuetify:v-item-group"),MY=he({...Ge(),...zd({selectedClass:"v-item--selected"}),...pt(),...Nt()},"VItemGroup"),DY=xe()({name:"VItemGroup",props:MY(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{themeClasses:r}=tn(e),{isSelected:s,select:i,next:o,prev:a,selected:l}=Ou(e,FM);return()=>p(e.tag,{class:Re(["v-item-group",r.value,e.class]),style:Be(e.style)},{default:()=>{var u;return[(u=n.default)==null?void 0:u.call(n,{isSelected:s,select:i,next:o,prev:a,selected:l.value})]}})}}),LY=xe()({name:"VItem",props:Hd(),emits:{"group:selected":e=>!0},setup(e,t){let{slots:n}=t;const{isSelected:r,select:s,toggle:i,selectedClass:o,value:a,disabled:l}=lu(e,FM);return()=>{var u;return(u=n.default)==null?void 0:u.call(n,{isSelected:r.value,selectedClass:o.value,select:s,toggle:i,value:a.value,disabled:l.value})}}}),$Y={class:"text-h5"},FY={key:0},NY={key:1},BY={class:"ml-3 align-center"},VY=Fe({__name:"AddOrUpdatePrinterDialog",setup(e){const t=rn(sn.AddOrUpdatePrinterDialog),n=Xt(),r=I0(),s=Nm(),i=Je("appConstants"),o=Ft(),a=K(null),l=K(!1),u=K(!1),c=K(!1),d=K(""),f=K(jy()),h=M(()=>{var N,D,W,U;if(s.hasFeature("multiplePrinterServices")){const Q=s.getFeature("multiplePrinterServices"),V=(D=(N=Q==null?void 0:Q.subFeatures)==null?void 0:N.types)==null?void 0:D.includes("klipper"),L=(U=(W=Q==null?void 0:Q.subFeatures)==null?void 0:W.types)==null?void 0:U.includes("prusaLink");return[{name:zc(Ch),logo:Gy,height:"60px"},...V?[{name:zc(Ky),logo:AY,height:"60px"}]:[],...L?[{name:zc(Th),logo:OY,height:"20px"}]:[]]}return[{name:"OctoPrint",logo:Gy,height:"75px"}]}),g=M(()=>{var N;return(N=n.updateDialogPrinter)==null?void 0:N.id});yt(async()=>{if(g.value){const N=n.printer(g.value);f.value=en.convertPrinterToCreateForm(N)}}),Ee(g,N=>{if(!N)return;const D=n.printer(N);f.value=en.convertPrinterToCreateForm(D)});const m=M(()=>n.updateDialogPrinter),y=M(()=>!!m.value),w=M(()=>y?"Save":"Create"),b=M(()=>{var N;return f?Dm((N=f.value)==null?void 0:N.name):"?"}),x=M(()=>({required:!0,max:i.maxPrinterNameLength})),_=M(()=>({required:!0,length:i.apiKeyLength,alpha_num:!0}));function S(){f.value=jy()}function P(){c.value=!0}async function A(){if(!E())return;r.clearEvents(),P();const{correlationToken:N}=await r.createTestPrinter(f.value);r.currentCorrelationToken=N}const E=()=>{var D,W,U,Q,V,L,oe,j,F;const N=f.value;return N?Pp(N.printerType)?((D=N.printerURL)==null?void 0:D.length)&&((W=N.name)==null?void 0:W.length):Rp(N.printerType)?((U=N.printerURL)==null?void 0:U.length)&&((Q=N.name)==null?void 0:Q.length)&&((V=N.username)==null?void 0:V.length)&&((L=N.password)==null?void 0:L.length):((oe=N.printerURL)==null?void 0:oe.length)&&((j=N.name)==null?void 0:j.length)&&((F=N.apiKey)==null?void 0:F.length):!1};async function T(N){await n.createPrinter(N,u.value),o.openInfoMessage({title:`Printer ${N.name} created`})}async function R(N){const D=N.id;await n.updatePrinter({printerId:D,updatedPrinter:N},u.value),o.openInfoMessage({title:`Printer ${N.name} updated`})}async function I(){var D,W,U,Q,V;if(!E())return;a.value=null,l.value=!0,(D=f.value.printerURL)!=null&&D.length&&!((W=f.value.printerURL)!=null&&W.startsWith("http://"))&&!((U=f.value.printerURL)!=null&&U.startsWith("https://"))&&(f.value.printerURL+="https://");const N=f.value;(Pp(N.printerType)||Rp(N.printerType))&&(N.apiKey="");try{y.value?await R(N):await T(N),H()}catch(L){L instanceof $R?(a.value=((V=(Q=L.response)==null?void 0:Q.data)==null?void 0:V.error)||L.message,o.error("Validation Failed",L.message)):(a.value=L.message,o.error("Error",L.message))}finally{l.value=!1,u.value=!1}}async function O(){f.value.name=Yu(),n.updateDialogPrinter=void 0,a.value=null,u.value=!1,a.value=null}function H(){t.closeDialog(),u.value=!1,a.value=null,c.value=!1,r.clearEvents(),S(),n.updateDialogPrinter=void 0,d.value=""}return(N,D)=>{const W=IY,U=yi;return $(),te(U,{id:J(t).dialogId,"max-width":J(c)?"900px":"700px",onEscape:D[13]||(D[13]=Q=>H())},{default:v(()=>[p(kt,{class:"pa-4"},{default:v(()=>[p(an,null,{default:v(()=>[C("span",$Y,[p(dt,{color:"primary",size:"56"},{default:v(()=>[k(se(J(b)),1)]),_:1}),J(y)?($(),ve("span",FY," Updating Printer ")):($(),ve("span",NY," New Printer "))])]),_:1}),p(nn,null,{default:v(()=>{var Q;return[D[16]||(D[16]=C("h4",null,"Printer type",-1)),p(DY,{modelValue:J(f).printerType,"onUpdate:modelValue":D[0]||(D[0]=V=>J(f).printerType=V),mandatory:""},{default:v(()=>[p(Yn,null,{default:v(()=>[p(st,null,{default:v(()=>[($(!0),ve(Oe,null,Qt(J(h),V=>($(),te(We,{key:V.name,cols:"4",md:"4"},{default:v(()=>[p(LY,null,{default:v(({isSelected:L,toggle:oe})=>[p(kt,{color:L?"primary":"blue-grey darken-4",class:"d-flex align-center justify-center elevation-8",height:"60px",width:"225px",onClick:oe},{default:v(()=>[p(vs,{height:V.height,src:V.logo,"max-width":"100px",width:"125px"},null,8,["height","src"]),p(aB,null,{default:v(()=>[C("h3",BY,se(V.name),1)]),_:2},1024)]),_:2},1032,["color","onClick"])]),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"]),p(st,null,{default:v(()=>[p(We,{cols:J(c)?8:12},{default:v(()=>[J(f)?($(),te(st,{key:0},{default:v(()=>[p(We,null,{default:v(()=>[p(at,{modelValue:J(f).name,"onUpdate:modelValue":D[1]||(D[1]=V=>J(f).name=V),counter:J(x).max,autofocus:"",class:"ma-1",label:"Printer name*",required:""},null,8,["modelValue","counter"])]),_:1}),p(We,null,{default:v(()=>[p(bn,{modelValue:J(f).enabled,"onUpdate:modelValue":D[2]||(D[2]=V=>J(f).enabled=V),hint:"Disabling makes the printer passive",label:"Enabled*","persistent-hint":"",required:""},null,8,["modelValue"])]),_:1})]),_:1})):pe("",!0),p(at,{modelValue:J(f).printerURL,"onUpdate:modelValue":D[3]||(D[3]=V=>J(f).printerURL=V),class:"ma-1",hint:"F.e. 'octopi.local' or 'https://my.printer.com'",label:"Printer URL*"},null,8,["modelValue"]),J(f).printerType===J(Ch)?($(),te(at,{key:1,modelValue:J(f).apiKey,"onUpdate:modelValue":D[4]||(D[4]=V=>J(f).apiKey=V),counter:J(_).length,class:"ma-1",hint:"User or Application Key with 32 or 43 characters (Global API key will fail)",label:J(f).printerType===J(Ch)||J(f).printerType===J(Ky)?"API Key (unsupported)":"API Key (required)*","persistent-hint":"",required:""},null,8,["modelValue","counter","label"])):pe("",!0),J(f).printerType===J(Th)?($(),te(at,{key:2,modelValue:J(f).username,"onUpdate:modelValue":D[5]||(D[5]=V=>J(f).username=V),class:"ma-1",hint:"Username (often 'maker')",label:"Username","persistent-hint":"",required:""},null,8,["modelValue"])):pe("",!0),J(f).printerType===J(Th)?($(),te(at,{key:3,modelValue:J(f).password,"onUpdate:modelValue":D[6]||(D[6]=V=>J(f).password=V),class:"ma-1",hint:"Password (visit your printer settings)",label:"Password","persistent-hint":"",required:""},null,8,["modelValue"])):pe("",!0)]),_:1},8,["cols"]),J(c)?($(),te(W,{key:0,cols:4},{default:v(()=>[p(ne,{onClick:D[7]||(D[7]=V=>c.value=!1)},{default:v(()=>[...D[14]||(D[14]=[k(" Hide checks",-1)])]),_:1})]),_:1})):pe("",!0)]),_:1}),(Q=J(a))!=null&&Q.length?($(),te(vn,{key:0,class:"my-3",color:"primary"},{default:v(()=>[k(se(J(a))+" ",1),p(bn,{modelValue:J(u),"onUpdate:modelValue":D[8]||(D[8]=V=>rt(u)?u.value=V:null),color:"warning",label:"Force save"},null,8,["modelValue"])]),_:1})):pe("",!0),J(l)?($(),te(vn,{key:1,class:"my-3"},{default:v(()=>[D[15]||(D[15]=k(" Validating printer ",-1)),p(ai,{indeterminate:""})]),_:1})):pe("",!0)]}),_:1}),p(Bn,null,{default:v(()=>[D[20]||(D[20]=C("em",{class:"text-red"}," * indicates required field ",-1)),p(Tn),p(ne,{variant:"text",onClick:D[9]||(D[9]=Q=>H())},{default:v(()=>[...D[17]||(D[17]=[k(" Close ",-1)])]),_:1}),J(y)?($(),te(ne,{key:0,color:"gray",variant:"text",onClick:D[10]||(D[10]=Q=>O())},{default:v(()=>[...D[18]||(D[18]=[k(" Duplicate ",-1)])]),_:1})):pe("",!0),p(ne,{color:"warning",variant:"text",onClick:D[11]||(D[11]=Q=>A())},{default:v(()=>[...D[19]||(D[19]=[k(" Test connection ",-1)])]),_:1}),p(ne,{color:"blue-darken-1",variant:"text",onClick:D[12]||(D[12]=Q=>I())},{default:v(()=>[k(se(J(w)),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["id","max-width"])}}}),UY=he({text:String,...Ge(),...pt()},"VToolbarTitle"),On=xe()({name:"VToolbarTitle",props:UY(),setup(e,t){let{slots:n}=t;return Me(()=>{const r=!!(n.default||n.text||e.text);return p(e.tag,{class:Re(["v-toolbar-title",e.class]),style:Be(e.style)},{default:()=>{var s;return[r&&C("div",{class:"v-toolbar-title__placeholder"},[n.text?n.text():e.text,(s=n.default)==null?void 0:s.call(n)])]}})}),{}}}),zY=[null,"prominent","default","comfortable","compact"],NM=he({absolute:Boolean,collapse:Boolean,color:String,density:{type:String,default:"default",validator:e=>zY.includes(e)},extended:{type:Boolean,default:null},extensionHeight:{type:[Number,String],default:48},flat:Boolean,floating:Boolean,height:{type:[Number,String],default:64},image:String,title:String,..._s(),...Ge(),...xs(),...Un(),...pt({tag:"header"}),...Nt()},"VToolbar"),wr=xe()({name:"VToolbar",props:NM(),setup(e,t){var h;let{slots:n}=t;const{backgroundColorClasses:r,backgroundColorStyles:s}=vr(()=>e.color),{borderClasses:i}=Vs(e),{elevationClasses:o}=Us(e),{roundedClasses:a}=Qn(e),{themeClasses:l}=tn(e),{rtlClasses:u}=Hr(),c=Pe(e.extended===null?!!((h=n.extension)!=null&&h.call(n)):e.extended),d=M(()=>parseInt(Number(e.height)+(e.density==="prominent"?Number(e.height):0)-(e.density==="comfortable"?8:0)-(e.density==="compact"?16:0),10)),f=M(()=>c.value?parseInt(Number(e.extensionHeight)+(e.density==="prominent"?Number(e.extensionHeight):0)-(e.density==="comfortable"?4:0)-(e.density==="compact"?8:0),10):0);return Br({VBtn:{variant:"text"}}),Me(()=>{var w;const g=!!(e.title||n.title),m=!!(n.image||e.image),y=(w=n.extension)==null?void 0:w.call(n);return c.value=e.extended===null?!!y:e.extended,p(e.tag,{class:Re(["v-toolbar",{"v-toolbar--absolute":e.absolute,"v-toolbar--collapse":e.collapse,"v-toolbar--flat":e.flat,"v-toolbar--floating":e.floating,[`v-toolbar--density-${e.density}`]:!0},r.value,i.value,o.value,a.value,l.value,u.value,e.class]),style:Be([s.value,e.style])},{default:()=>[m&&C("div",{key:"image",class:"v-toolbar__image"},[n.image?p($t,{key:"image-defaults",disabled:!e.image,defaults:{VImg:{cover:!0,src:e.image}}},n.image):p(vs,{key:"image-img",cover:!0,src:e.image},null)]),p($t,{defaults:{VTabs:{height:Ne(d.value)}}},{default:()=>{var b,x,_;return[C("div",{class:"v-toolbar__content",style:{height:Ne(d.value)}},[n.prepend&&C("div",{class:"v-toolbar__prepend"},[(b=n.prepend)==null?void 0:b.call(n)]),g&&p(On,{key:"title",text:e.title},{text:n.title}),(x=n.default)==null?void 0:x.call(n),n.append&&C("div",{class:"v-toolbar__append"},[(_=n.append)==null?void 0:_.call(n)])])]}}),p($t,{defaults:{VTabs:{height:Ne(f.value)}}},{default:()=>[p(nR,null,{default:()=>[c.value&&C("div",{class:"v-toolbar__extension",style:{height:Ne(f.value)}},[y])]})]})]})}),{contentHeight:d,extensionHeight:f}}}),HY=Fe({__name:"HelpOverlay",setup(e){const t=K(!1);return(n,r)=>($(),te(dR,{modelValue:J(t),"onUpdate:modelValue":r[0]||(r[0]=s=>rt(t)?t.value=s:null),fullscreen:"",eager:"",transition:"dialog-bottom-transition",width:"100%"},{activator:v(({props:s})=>[p(ot,{location:"top"},{activator:v(({props:i})=>[p(ne,me({icon:"help"},{...s,...i}),{default:v(()=>[p(Z,null,{default:v(()=>[...r[1]||(r[1]=[k("help",-1)])]),_:1})]),_:1},16)]),default:v(()=>[r[2]||(r[2]=C("span",null," Load the online documentation webpage ",-1))]),_:2},1024)]),default:v(({isActive:s})=>[p(kt,{height:"100%",width:"100%"},{default:v(()=>[p(wr,{color:"primary"},{default:v(()=>[p(Z,{class:"ml-5"},{default:v(()=>[...r[3]||(r[3]=[k("help",-1)])]),_:1}),r[6]||(r[6]=C("h2",{class:"ml-10"},"FDM Monster Documentation",-1)),p(Tn),r[7]||(r[7]=C("span",{class:"mr-10"}," docs.fdm-monster.net ",-1)),p(ne,{variant:"flat",onClick:i=>s.value=!1},{default:v(()=>[p(Z,{class:"mr-2"},{default:v(()=>[...r[4]||(r[4]=[k("close",-1)])]),_:1}),r[5]||(r[5]=k(" Close help ",-1))]),_:1},8,["onClick"])]),_:2},1024),r[8]||(r[8]=C("iframe",{height:"100%",src:"https://docs.fdm-monster.net",style:{"background-color":"black","border-width":"0"},width:"100%"},null,-1))]),_:2},1024)]),_:1},8,["modelValue"]))}}),jY=Fe({__name:"TooltipButton",props:{tooltip:{},color:{default:"white"},icon:{default:""},iconClass:{default:""},text:{default:""},location:{default:"bottom"}},emits:["click"],setup(e){const t=e;return(n,r)=>($(),te(ot,{location:t.location},{activator:v(({props:s})=>[p(ne,me(s,{variant:"outlined",class:"ml-2",color:e.color,onClick:r[0]||(r[0]=i=>n.$emit("click"))}),{default:v(()=>[om(n.$slots,"default",{},()=>{var i;return[(i=t.icon)!=null&&i.length?($(),te(Z,{key:0,class:Re("mr-2 "+t.iconClass)},{default:v(()=>[k(se(t.icon),1)]),_:1},8,["class"])):pe("",!0),k(" "+se(t.text),1)]})]),_:3},16,["color"])]),default:v(()=>[C("span",null,se(t.tooltip),1)]),_:3},8,["location"]))}});/*!
|
|
67
|
+
* vue-router v4.5.1
|
|
68
|
+
* (c) 2025 Eduardo San Martin Morote
|
|
69
|
+
* @license MIT
|
|
70
|
+
*/const Pl=typeof document<"u";function BM(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function WY(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&BM(e.default)}const Rt=Object.assign;function sv(e,t){const n={};for(const r in t){const s=t[r];n[r]=Bs(s)?s.map(e):e(s)}return n}const Hc=()=>{},Bs=Array.isArray,VM=/#/g,qY=/&/g,GY=/\//g,KY=/=/g,YY=/\?/g,UM=/\+/g,XY=/%5B/g,QY=/%5D/g,zM=/%5E/g,JY=/%60/g,HM=/%7B/g,ZY=/%7C/g,jM=/%7D/g,eX=/%20/g;function A0(e){return encodeURI(""+e).replace(ZY,"|").replace(XY,"[").replace(QY,"]")}function tX(e){return A0(e).replace(HM,"{").replace(jM,"}").replace(zM,"^")}function pb(e){return A0(e).replace(UM,"%2B").replace(eX,"+").replace(VM,"%23").replace(qY,"%26").replace(JY,"`").replace(HM,"{").replace(jM,"}").replace(zM,"^")}function nX(e){return pb(e).replace(KY,"%3D")}function rX(e){return A0(e).replace(VM,"%23").replace(YY,"%3F")}function sX(e){return e==null?"":rX(e).replace(GY,"%2F")}function kd(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const iX=/\/$/,oX=e=>e.replace(iX,"");function iv(e,t,n="/"){let r,s={},i="",o="";const a=t.indexOf("#");let l=t.indexOf("?");return a<l&&a>=0&&(l=-1),l>-1&&(r=t.slice(0,l),i=t.slice(l+1,a>-1?a:t.length),s=e(i)),a>-1&&(r=r||t.slice(0,a),o=t.slice(a,t.length)),r=cX(r??t,n),{fullPath:r+(i&&"?")+i+o,path:r,query:s,hash:kd(o)}}function aX(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function gx(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function lX(e,t,n){const r=t.matched.length-1,s=n.matched.length-1;return r>-1&&r===s&&xu(t.matched[r],n.matched[s])&&WM(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function xu(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function WM(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!uX(e[n],t[n]))return!1;return!0}function uX(e,t){return Bs(e)?vx(e,t):Bs(t)?vx(t,e):e===t}function vx(e,t){return Bs(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function cX(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/"),s=r[r.length-1];(s===".."||s===".")&&r.push("");let i=n.length-1,o,a;for(o=0;o<r.length;o++)if(a=r[o],a!==".")if(a==="..")i>1&&i--;else break;return n.slice(0,i).join("/")+"/"+r.slice(o).join("/")}const ao={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var xd;(function(e){e.pop="pop",e.push="push"})(xd||(xd={}));var jc;(function(e){e.back="back",e.forward="forward",e.unknown=""})(jc||(jc={}));function dX(e){if(!e)if(Pl){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),oX(e)}const fX=/^[^#]+#/;function hX(e,t){return e.replace(fX,"#")+t}function pX(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const Hm=()=>({left:window.scrollX,top:window.scrollY});function mX(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),s=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!s)return;t=pX(s,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 yx(e,t){return(history.state?history.state.position-t:-1)+e}const mb=new Map;function gX(e,t){mb.set(e,t)}function vX(e){const t=mb.get(e);return mb.delete(e),t}let yX=()=>location.protocol+"//"+location.host;function qM(e,t){const{pathname:n,search:r,hash:s}=t,i=e.indexOf("#");if(i>-1){let a=s.includes(e.slice(i))?e.slice(i).length:1,l=s.slice(a);return l[0]!=="/"&&(l="/"+l),gx(l,"")}return gx(n,e)+r+s}function bX(e,t,n,r){let s=[],i=[],o=null;const a=({state:f})=>{const h=qM(e,location),g=n.value,m=t.value;let y=0;if(f){if(n.value=h,t.value=f,o&&o===g){o=null;return}y=m?f.position-m.position:0}else r(h);s.forEach(w=>{w(n.value,g,{delta:y,type:xd.pop,direction:y?y>0?jc.forward:jc.back:jc.unknown})})};function l(){o=n.value}function u(f){s.push(f);const h=()=>{const g=s.indexOf(f);g>-1&&s.splice(g,1)};return i.push(h),h}function c(){const{history:f}=window;f.state&&f.replaceState(Rt({},f.state,{scroll:Hm()}),"")}function d(){for(const f of i)f();i=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",c)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",c,{passive:!0}),{pauseListeners:l,listen:u,destroy:d}}function bx(e,t,n,r=!1,s=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:s?Hm():null}}function wX(e){const{history:t,location:n}=window,r={value:qM(e,n)},s={value:t.state};s.value||i(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(l,u,c){const d=e.indexOf("#"),f=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+l:yX()+e+l;try{t[c?"replaceState":"pushState"](u,"",f),s.value=u}catch(h){console.error(h),n[c?"replace":"assign"](f)}}function o(l,u){const c=Rt({},t.state,bx(s.value.back,l,s.value.forward,!0),u,{position:s.value.position});i(l,c,!0),r.value=l}function a(l,u){const c=Rt({},s.value,t.state,{forward:l,scroll:Hm()});i(c.current,c,!0);const d=Rt({},bx(r.value,l,null),{position:c.position+1},u);i(l,d,!1),r.value=l}return{location:r,state:s,push:a,replace:o}}function SX(e){e=dX(e);const t=wX(e),n=bX(e,t.state,t.location,t.replace);function r(i,o=!0){o||n.pauseListeners(),history.go(i)}const s=Rt({location:"",base:e,go:r,createHref:hX.bind(null,e)},t,n);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>t.state.value}),s}function _X(e){return typeof e=="string"||e&&typeof e=="object"}function GM(e){return typeof e=="string"||typeof e=="symbol"}const KM=Symbol("");var wx;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(wx||(wx={}));function Eu(e,t){return Rt(new Error,{type:e,[KM]:!0},t)}function xi(e,t){return e instanceof Error&&KM in e&&(t==null||!!(e.type&t))}const Sx="[^/]+?",kX={sensitive:!1,strict:!1,start:!0,end:!0},xX=/[.+*?^${}()[\]/\\]/g;function EX(e,t){const n=Rt({},kX,t),r=[];let s=n.start?"^":"";const i=[];for(const u of e){const c=u.length?[]:[90];n.strict&&!u.length&&(s+="/");for(let d=0;d<u.length;d++){const f=u[d];let h=40+(n.sensitive?.25:0);if(f.type===0)d||(s+="/"),s+=f.value.replace(xX,"\\$&"),h+=40;else if(f.type===1){const{value:g,repeatable:m,optional:y,regexp:w}=f;i.push({name:g,repeatable:m,optional:y});const b=w||Sx;if(b!==Sx){h+=10;try{new RegExp(`(${b})`)}catch(_){throw new Error(`Invalid custom RegExp for param "${g}" (${b}): `+_.message)}}let x=m?`((?:${b})(?:/(?:${b}))*)`:`(${b})`;d||(x=y&&u.length<2?`(?:/${x})`:"/"+x),y&&(x+="?"),s+=x,h+=20,y&&(h+=-8),m&&(h+=-20),b===".*"&&(h+=-50)}c.push(h)}r.push(c)}if(n.strict&&n.end){const u=r.length-1;r[u][r[u].length-1]+=.7000000000000001}n.strict||(s+="/?"),n.end?s+="$":n.strict&&!s.endsWith("/")&&(s+="(?:/|$)");const o=new RegExp(s,n.sensitive?"":"i");function a(u){const c=u.match(o),d={};if(!c)return null;for(let f=1;f<c.length;f++){const h=c[f]||"",g=i[f-1];d[g.name]=h&&g.repeatable?h.split("/"):h}return d}function l(u){let c="",d=!1;for(const f of e){(!d||!c.endsWith("/"))&&(c+="/"),d=!1;for(const h of f)if(h.type===0)c+=h.value;else if(h.type===1){const{value:g,repeatable:m,optional:y}=h,w=g in u?u[g]:"";if(Bs(w)&&!m)throw new Error(`Provided param "${g}" is an array but it is not repeatable (* or + modifiers)`);const b=Bs(w)?w.join("/"):w;if(!b)if(y)f.length<2&&(c.endsWith("/")?c=c.slice(0,-1):d=!0);else throw new Error(`Missing required param "${g}"`);c+=b}}return c||"/"}return{re:o,score:r,keys:i,parse:a,stringify:l}}function CX(e,t){let n=0;for(;n<e.length&&n<t.length;){const r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===80?-1:1:e.length>t.length?t.length===1&&t[0]===80?1:-1:0}function YM(e,t){let n=0;const r=e.score,s=t.score;for(;n<r.length&&n<s.length;){const i=CX(r[n],s[n]);if(i)return i;n++}if(Math.abs(s.length-r.length)===1){if(_x(r))return 1;if(_x(s))return-1}return s.length-r.length}function _x(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const TX={type:0,value:""},PX=/[a-zA-Z0-9_]/;function RX(e){if(!e)return[[]];if(e==="/")return[[TX]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(h){throw new Error(`ERR (${n})/"${u}": ${h}`)}let n=0,r=n;const s=[];let i;function o(){i&&s.push(i),i=[]}let a=0,l,u="",c="";function d(){u&&(n===0?i.push({type:0,value:u}):n===1||n===2||n===3?(i.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),i.push({type:1,value:u,regexp:c,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),u="")}function f(){u+=l}for(;a<e.length;){if(l=e[a++],l==="\\"&&n!==2){r=n,n=4;continue}switch(n){case 0:l==="/"?(u&&d(),o()):l===":"?(d(),n=1):f();break;case 4:f(),n=r;break;case 1:l==="("?n=2:PX.test(l)?f():(d(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--);break;case 2:l===")"?c[c.length-1]=="\\"?c=c.slice(0,-1)+l:n=3:c+=l;break;case 3:d(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--,c="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${u}"`),d(),o(),s}function IX(e,t,n){const r=EX(RX(e.path),n),s=Rt(r,{record:e,parent:t,children:[],alias:[]});return t&&!s.record.aliasOf==!t.record.aliasOf&&t.children.push(s),s}function AX(e,t){const n=[],r=new Map;t=Cx({strict:!1,end:!0,sensitive:!1},t);function s(d){return r.get(d)}function i(d,f,h){const g=!h,m=xx(d);m.aliasOf=h&&h.record;const y=Cx(t,d),w=[m];if("alias"in d){const _=typeof d.alias=="string"?[d.alias]:d.alias;for(const S of _)w.push(xx(Rt({},m,{components:h?h.record.components:m.components,path:S,aliasOf:h?h.record:m})))}let b,x;for(const _ of w){const{path:S}=_;if(f&&S[0]!=="/"){const P=f.record.path,A=P[P.length-1]==="/"?"":"/";_.path=f.record.path+(S&&A+S)}if(b=IX(_,f,y),h?h.alias.push(b):(x=x||b,x!==b&&x.alias.push(b),g&&d.name&&!Ex(b)&&o(d.name)),XM(b)&&l(b),m.children){const P=m.children;for(let A=0;A<P.length;A++)i(P[A],b,h&&h.children[A])}h=h||b}return x?()=>{o(x)}:Hc}function o(d){if(GM(d)){const f=r.get(d);f&&(r.delete(d),n.splice(n.indexOf(f),1),f.children.forEach(o),f.alias.forEach(o))}else{const f=n.indexOf(d);f>-1&&(n.splice(f,1),d.record.name&&r.delete(d.record.name),d.children.forEach(o),d.alias.forEach(o))}}function a(){return n}function l(d){const f=DX(d,n);n.splice(f,0,d),d.record.name&&!Ex(d)&&r.set(d.record.name,d)}function u(d,f){let h,g={},m,y;if("name"in d&&d.name){if(h=r.get(d.name),!h)throw Eu(1,{location:d});y=h.record.name,g=Rt(kx(f.params,h.keys.filter(x=>!x.optional).concat(h.parent?h.parent.keys.filter(x=>x.optional):[]).map(x=>x.name)),d.params&&kx(d.params,h.keys.map(x=>x.name))),m=h.stringify(g)}else if(d.path!=null)m=d.path,h=n.find(x=>x.re.test(m)),h&&(g=h.parse(m),y=h.record.name);else{if(h=f.name?r.get(f.name):n.find(x=>x.re.test(f.path)),!h)throw Eu(1,{location:d,currentLocation:f});y=h.record.name,g=Rt({},f.params,d.params),m=h.stringify(g)}const w=[];let b=h;for(;b;)w.unshift(b.record),b=b.parent;return{name:y,path:m,params:g,matched:w,meta:MX(w)}}e.forEach(d=>i(d));function c(){n.length=0,r.clear()}return{addRoute:i,resolve:u,removeRoute:o,clearRoutes:c,getRoutes:a,getRecordMatcher:s}}function kx(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function xx(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:OX(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 OX(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function Ex(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function MX(e){return e.reduce((t,n)=>Rt(t,n.meta),{})}function Cx(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function DX(e,t){let n=0,r=t.length;for(;n!==r;){const i=n+r>>1;YM(e,t[i])<0?r=i:n=i+1}const s=LX(e);return s&&(r=t.lastIndexOf(s,r-1)),r}function LX(e){let t=e;for(;t=t.parent;)if(XM(t)&&YM(e,t)===0)return t}function XM({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function $X(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;s<r.length;++s){const i=r[s].replace(UM," "),o=i.indexOf("="),a=kd(o<0?i:i.slice(0,o)),l=o<0?null:kd(i.slice(o+1));if(a in t){let u=t[a];Bs(u)||(u=t[a]=[u]),u.push(l)}else t[a]=l}return t}function Tx(e){let t="";for(let n in e){const r=e[n];if(n=nX(n),r==null){r!==void 0&&(t+=(t.length?"&":"")+n);continue}(Bs(r)?r.map(i=>i&&pb(i)):[r&&pb(r)]).forEach(i=>{i!==void 0&&(t+=(t.length?"&":"")+n,i!=null&&(t+="="+i))})}return t}function FX(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=Bs(r)?r.map(s=>s==null?null:""+s):r==null?r:""+r)}return t}const NX=Symbol(""),Px=Symbol(""),jm=Symbol(""),O0=Symbol(""),gb=Symbol("");function dc(){let e=[];function t(r){return e.push(r),()=>{const s=e.indexOf(r);s>-1&&e.splice(s,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function yo(e,t,n,r,s,i=o=>o()){const o=r&&(r.enterCallbacks[s]=r.enterCallbacks[s]||[]);return()=>new Promise((a,l)=>{const u=f=>{f===!1?l(Eu(4,{from:n,to:t})):f instanceof Error?l(f):_X(f)?l(Eu(2,{from:t,to:f})):(o&&r.enterCallbacks[s]===o&&typeof f=="function"&&o.push(f),a())},c=i(()=>e.call(r&&r.instances[s],t,n,u));let d=Promise.resolve(c);e.length<3&&(d=d.then(u)),d.catch(f=>l(f))})}function ov(e,t,n,r,s=i=>i()){const i=[];for(const o of e)for(const a in o.components){let l=o.components[a];if(!(t!=="beforeRouteEnter"&&!o.instances[a]))if(BM(l)){const c=(l.__vccOpts||l)[t];c&&i.push(yo(c,n,r,o,a,s))}else{let u=l();i.push(()=>u.then(c=>{if(!c)throw new Error(`Couldn't resolve component "${a}" at "${o.path}"`);const d=WY(c)?c.default:c;o.mods[a]=c,o.components[a]=d;const h=(d.__vccOpts||d)[t];return h&&yo(h,n,r,o,a,s)()}))}}return i}function Rx(e){const t=Je(jm),n=Je(O0),r=M(()=>{const l=J(e.to);return t.resolve(l)}),s=M(()=>{const{matched:l}=r.value,{length:u}=l,c=l[u-1],d=n.matched;if(!c||!d.length)return-1;const f=d.findIndex(xu.bind(null,c));if(f>-1)return f;const h=Ix(l[u-2]);return u>1&&Ix(c)===h&&d[d.length-1].path!==h?d.findIndex(xu.bind(null,l[u-2])):f}),i=M(()=>s.value>-1&&HX(n.params,r.value.params)),o=M(()=>s.value>-1&&s.value===n.matched.length-1&&WM(n.params,r.value.params));function a(l={}){if(zX(l)){const u=t[J(e.replace)?"replace":"push"](J(e.to)).catch(Hc);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>u),u}return Promise.resolve()}return{route:r,href:M(()=>r.value.href),isActive:i,isExactActive:o,navigate:a}}function BX(e){return e.length===1?e[0]:e}const VX=Fe({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:Rx,setup(e,{slots:t}){const n=mn(Rx(e)),{options:r}=Je(jm),s=M(()=>({[Ax(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[Ax(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&BX(t.default(n));return e.custom?i:br("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},i)}}}),UX=VX;function zX(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 HX(e,t){for(const n in t){const r=t[n],s=e[n];if(typeof r=="string"){if(r!==s)return!1}else if(!Bs(s)||s.length!==r.length||r.some((i,o)=>i!==s[o]))return!1}return!0}function Ix(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Ax=(e,t,n)=>e??t??n,jX=Fe({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=Je(gb),s=M(()=>e.route||r.value),i=Je(Px,0),o=M(()=>{let u=J(i);const{matched:c}=s.value;let d;for(;(d=c[u])&&!d.components;)u++;return u}),a=M(()=>s.value.matched[o.value]);Jt(Px,M(()=>o.value+1)),Jt(NX,a),Jt(gb,s);const l=K();return Ee(()=>[l.value,a.value,e.name],([u,c,d],[f,h,g])=>{c&&(c.instances[d]=u,h&&h!==c&&u&&u===f&&(c.leaveGuards.size||(c.leaveGuards=h.leaveGuards),c.updateGuards.size||(c.updateGuards=h.updateGuards))),u&&c&&(!h||!xu(c,h)||!f)&&(c.enterCallbacks[d]||[]).forEach(m=>m(u))},{flush:"post"}),()=>{const u=s.value,c=e.name,d=a.value,f=d&&d.components[c];if(!f)return Ox(n.default,{Component:f,route:u});const h=d.props[c],g=h?h===!0?u.params:typeof h=="function"?h(u):h:null,y=br(f,Rt({},g,t,{onVnodeUnmounted:w=>{w.component.isUnmounted&&(d.instances[c]=null)},ref:l}));return Ox(n.default,{Component:y,route:u})||y}}});function Ox(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const WX=jX;function qX(e){const t=AX(e.routes,e),n=e.parseQuery||$X,r=e.stringifyQuery||Tx,s=e.history,i=dc(),o=dc(),a=dc(),l=Pe(ao);let u=ao;Pl&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=sv.bind(null,X=>""+X),d=sv.bind(null,sX),f=sv.bind(null,kd);function h(X,le){let ee,G;return GM(X)?(ee=t.getRecordMatcher(X),G=le):G=X,t.addRoute(G,ee)}function g(X){const le=t.getRecordMatcher(X);le&&t.removeRoute(le)}function m(){return t.getRoutes().map(X=>X.record)}function y(X){return!!t.getRecordMatcher(X)}function w(X,le){if(le=Rt({},le||l.value),typeof X=="string"){const z=iv(n,X,le.path),q=t.resolve({path:z.path},le),ce=s.createHref(z.fullPath);return Rt(z,q,{params:f(q.params),hash:kd(z.hash),redirectedFrom:void 0,href:ce})}let ee;if(X.path!=null)ee=Rt({},X,{path:iv(n,X.path,le.path).path});else{const z=Rt({},X.params);for(const q in z)z[q]==null&&delete z[q];ee=Rt({},X,{params:d(z)}),le.params=d(le.params)}const G=t.resolve(ee,le),_e=X.hash||"";G.params=c(f(G.params));const De=aX(r,Rt({},X,{hash:tX(_e),path:G.path})),B=s.createHref(De);return Rt({fullPath:De,hash:_e,query:r===Tx?FX(X.query):X.query||{}},G,{redirectedFrom:void 0,href:B})}function b(X){return typeof X=="string"?iv(n,X,l.value.path):Rt({},X)}function x(X,le){if(u!==X)return Eu(8,{from:le,to:X})}function _(X){return A(X)}function S(X){return _(Rt(b(X),{replace:!0}))}function P(X){const le=X.matched[X.matched.length-1];if(le&&le.redirect){const{redirect:ee}=le;let G=typeof ee=="function"?ee(X):ee;return typeof G=="string"&&(G=G.includes("?")||G.includes("#")?G=b(G):{path:G},G.params={}),Rt({query:X.query,hash:X.hash,params:G.path!=null?{}:X.params},G)}}function A(X,le){const ee=u=w(X),G=l.value,_e=X.state,De=X.force,B=X.replace===!0,z=P(ee);if(z)return A(Rt(b(z),{state:typeof z=="object"?Rt({},_e,z.state):_e,force:De,replace:B}),le||ee);const q=ee;q.redirectedFrom=le;let ce;return!De&&lX(r,G,ee)&&(ce=Eu(16,{to:q,from:G}),oe(G,G,!0,!1)),(ce?Promise.resolve(ce):R(q,G)).catch(de=>xi(de)?xi(de,2)?de:L(de):Q(de,q,G)).then(de=>{if(de){if(xi(de,2))return A(Rt({replace:B},b(de.to),{state:typeof de.to=="object"?Rt({},_e,de.to.state):_e,force:De}),le||q)}else de=O(q,G,!0,B,_e);return I(q,G,de),de})}function E(X,le){const ee=x(X,le);return ee?Promise.reject(ee):Promise.resolve()}function T(X){const le=re.values().next().value;return le&&typeof le.runWithContext=="function"?le.runWithContext(X):X()}function R(X,le){let ee;const[G,_e,De]=GX(X,le);ee=ov(G.reverse(),"beforeRouteLeave",X,le);for(const z of G)z.leaveGuards.forEach(q=>{ee.push(yo(q,X,le))});const B=E.bind(null,X,le);return ee.push(B),Se(ee).then(()=>{ee=[];for(const z of i.list())ee.push(yo(z,X,le));return ee.push(B),Se(ee)}).then(()=>{ee=ov(_e,"beforeRouteUpdate",X,le);for(const z of _e)z.updateGuards.forEach(q=>{ee.push(yo(q,X,le))});return ee.push(B),Se(ee)}).then(()=>{ee=[];for(const z of De)if(z.beforeEnter)if(Bs(z.beforeEnter))for(const q of z.beforeEnter)ee.push(yo(q,X,le));else ee.push(yo(z.beforeEnter,X,le));return ee.push(B),Se(ee)}).then(()=>(X.matched.forEach(z=>z.enterCallbacks={}),ee=ov(De,"beforeRouteEnter",X,le,T),ee.push(B),Se(ee))).then(()=>{ee=[];for(const z of o.list())ee.push(yo(z,X,le));return ee.push(B),Se(ee)}).catch(z=>xi(z,8)?z:Promise.reject(z))}function I(X,le,ee){a.list().forEach(G=>T(()=>G(X,le,ee)))}function O(X,le,ee,G,_e){const De=x(X,le);if(De)return De;const B=le===ao,z=Pl?history.state:{};ee&&(G||B?s.replace(X.fullPath,Rt({scroll:B&&z&&z.scroll},_e)):s.push(X.fullPath,_e)),l.value=X,oe(X,le,ee,B),L()}let H;function N(){H||(H=s.listen((X,le,ee)=>{if(!ae.listening)return;const G=w(X),_e=P(G);if(_e){A(Rt(_e,{replace:!0,force:!0}),G).catch(Hc);return}u=G;const De=l.value;Pl&&gX(yx(De.fullPath,ee.delta),Hm()),R(G,De).catch(B=>xi(B,12)?B:xi(B,2)?(A(Rt(b(B.to),{force:!0}),G).then(z=>{xi(z,20)&&!ee.delta&&ee.type===xd.pop&&s.go(-1,!1)}).catch(Hc),Promise.reject()):(ee.delta&&s.go(-ee.delta,!1),Q(B,G,De))).then(B=>{B=B||O(G,De,!1),B&&(ee.delta&&!xi(B,8)?s.go(-ee.delta,!1):ee.type===xd.pop&&xi(B,20)&&s.go(-1,!1)),I(G,De,B)}).catch(Hc)}))}let D=dc(),W=dc(),U;function Q(X,le,ee){L(X);const G=W.list();return G.length?G.forEach(_e=>_e(X,le,ee)):console.error(X),Promise.reject(X)}function V(){return U&&l.value!==ao?Promise.resolve():new Promise((X,le)=>{D.add([X,le])})}function L(X){return U||(U=!X,N(),D.list().forEach(([le,ee])=>X?ee(X):le()),D.reset()),X}function oe(X,le,ee,G){const{scrollBehavior:_e}=e;if(!Pl||!_e)return Promise.resolve();const De=!ee&&vX(yx(X.fullPath,0))||(G||!ee)&&history.state&&history.state.scroll||null;return Pt().then(()=>_e(X,le,De)).then(B=>B&&mX(B)).catch(B=>Q(B,X,le))}const j=X=>s.go(X);let F;const re=new Set,ae={currentRoute:l,listening:!0,addRoute:h,removeRoute:g,clearRoutes:t.clearRoutes,hasRoute:y,getRoutes:m,resolve:w,options:e,push:_,replace:S,go:j,back:()=>j(-1),forward:()=>j(1),beforeEach:i.add,beforeResolve:o.add,afterEach:a.add,onError:W.add,isReady:V,install(X){const le=this;X.component("RouterLink",UX),X.component("RouterView",WX),X.config.globalProperties.$router=le,Object.defineProperty(X.config.globalProperties,"$route",{enumerable:!0,get:()=>J(l)}),Pl&&!F&&l.value===ao&&(F=!0,_(s.location).catch(_e=>{}));const ee={};for(const _e in ao)Object.defineProperty(ee,_e,{get:()=>l.value[_e],enumerable:!0});X.provide(jm,le),X.provide(O0,Zp(ee)),X.provide(gb,l);const G=X.unmount;re.add(X),X.unmount=function(){re.delete(X),re.size<1&&(u=ao,H&&H(),H=null,l.value=ao,F=!1,U=!1),G()}}};function Se(X){return X.reduce((le,ee)=>le.then(()=>T(ee)),Promise.resolve())}return ae}function GX(e,t){const n=[],r=[],s=[],i=Math.max(t.matched.length,e.matched.length);for(let o=0;o<i;o++){const a=t.matched[o];a&&(e.matched.find(u=>xu(u,a))?r.push(a):n.push(a));const l=e.matched[o];l&&(t.matched.find(u=>xu(u,l))||s.push(l))}return[n,r,s]}function ta(){return Je(jm)}function QM(e){return Je(O0)}const KX={class:"text-center"},YX={class:"float-end"},XX=Fe({__name:"PrintJobsMenu",setup(e){const t=lr(),n=K(""),r=K(!1),s=M(()=>t.printersWithJob.filter(a=>{var h,g,m,y;const l=(g=(h=a.job)==null?void 0:h.job)==null?void 0:g.file.name,u=(l==null?void 0:l.toLowerCase())||"",c=((m=a.printer.printerURL)==null?void 0:m.toLowerCase())||"",d=((y=a.printer.name)==null?void 0:y.toLowerCase())||"",f=`${u} ${c} ${d}`;return!n.value||f.includes(n.value.toLowerCase())})),i=M(()=>s.value.length||0);function o(a){return a?a==null?void 0:a.toFixed(0):""}return Ee(r,()=>{n.value=""}),(a,l)=>($(),ve("div",KX,[p(Vm,{modelValue:J(r),"onUpdate:modelValue":l[3]||(l[3]=u=>rt(r)?r.value=u:null),"close-on-content-click":!1,"nudge-width":400,location:"bottom right","offset-x":"","offset-y":"",transition:"slide-x-transition"},{activator:v(({props:u})=>[p(ne,me({color:J(i)?"green":"secondary",dark:""},u),{default:v(()=>[C("span",null," Print jobs "+se(J(i)?`(${J(i)})`:""),1),p(Z,{end:""},{default:v(()=>[...l[4]||(l[4]=[k(" work ",-1)])]),_:1})]),_:1},16,["color"])]),default:v(()=>[p(kt,{class:"d-flex flex-column","min-width":"300"},{default:v(()=>[p(Ht,{style:{"overflow-y":"hidden","flex-shrink":"0"}},{default:v(()=>[p(ze,null,{prepend:v(()=>[p(dt,{class:"font-weight-bold",color:"primary",size:"44"},{default:v(()=>[k(se(J(i)),1)]),_:1})]),default:v(()=>[p(ft,null,{default:v(()=>[l[7]||(l[7]=k(" Print Jobs ",-1)),C("span",YX,[p(ne,{variant:"tonal",onClick:l[0]||(l[0]=u=>r.value=!1)},{default:v(()=>[p(Z,null,{default:v(()=>[...l[5]||(l[5]=[k("close",-1)])]),_:1}),l[6]||(l[6]=k("Close ",-1))]),_:1})])]),_:1}),p(Su,{class:"mt-2"},{default:v(()=>[p(at,{modelValue:J(n),"onUpdate:modelValue":l[1]||(l[1]=u=>rt(n)?n.value=u:null),autofocus:"",class:"p-2",clearable:"",label:"Search jobs or printers","persistent-placeholder":"",placeholder:"Type part of a filename or printer name to search","prepend-icon":"search",style:{"min-width":"900px"}},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),p(ln),p(Ht,{style:{"overflow-y":"auto","flex-shrink":"1"}},{default:v(()=>[J(i)?pe("",!0):($(),te(ze,{key:0},{default:v(()=>[...l[8]||(l[8]=[k(" No active prints ",-1)])]),_:1})),($(!0),ve(Oe,null,Qt(J(s),({printer:u,job:c})=>($(),te(ze,{key:u.id,lines:"two"},{prepend:v(()=>[p(dt,{size:"70"},{default:v(()=>{var d;return[p(ai,{"model-value":(d=c==null?void 0:c.progress)==null?void 0:d.completion,width:5,color:"green",size:"50"},{default:v(()=>{var f;return[k(se(o((f=c.progress)==null?void 0:f.completion)+"%"||""),1)]}),_:2},1032,["model-value"])]}),_:2},1024)]),default:v(()=>[p(ft,null,{default:v(()=>{var d,f;return[k(se((f=(d=c.job)==null?void 0:d.file)==null?void 0:f.name),1)]}),_:2},1024),p(St,null,{default:v(()=>[k(" Elapsed: "+se(Math.round((c==null?void 0:c.progress.printTime)??0/60))+" minutes ",1),l[9]||(l[9]=C("br",null,null,-1)),k(" Printer: "+se(u.name),1)]),_:2},1024)]),_:2},1024))),128))]),_:1}),p(Bn,null,{default:v(()=>[p(Tn),p(ne,{onClick:l[2]||(l[2]=u=>r.value=!1)},{default:v(()=>[...l[10]||(l[10]=[k(" Close ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])]))}}),M0=Ss("profile",{state:()=>({username:null,isDemoUser:null,userId:null}),actions:{async getProfile(){return await is.getProfile().then(e=>{this.username=e.username,this.userId=e.id,this.isDemoUser=e.isDemoUser})}}}),Yt={Home:"Home",Login:"Login",Registration:"Registration",PrintersView:"PrintersView",Settings:"Settings",CameraGridView:"CameraGridView",PrintStatistics:"Print Statistics",About:"About",PermissionDenied:"PermissionDenied",NotFound:"NotFound",FirstTimeSetup:"FirstTimeSetup",ServerProtection:"ServerProtection"};async function QX(e,t){return e.push({name:t})}async function JM(e){if(e.currentRoute.value.path==="/login"){console.log("routeToLogin: already at login page");return}return QX(e,Yt.Login)}const Mx=!0,JX=()=>Object.freeze({apiKeyLength:43,maxPort:65535,maxPrinterNameLength:25,maxPrinterGroupNameLength:30,maxPrinterGroupLocationX:4,maxPrinterGroupLocationY:4,minPrinterFloorNameLength:3,minUsernameLength:3}),ZX=Ss("tracked-uploads",()=>{const e=K([]),t=M(()=>e.value.filter(r=>!r.completed));function n(r){e.value.splice(0),e.value.push(...r)}return{current:e,setUploads:n,activeUploads:t}}),pi=Object.create(null);pi.open="0";pi.close="1";pi.ping="2";pi.pong="3";pi.message="4";pi.upgrade="5";pi.noop="6";const Ah=Object.create(null);Object.keys(pi).forEach(e=>{Ah[pi[e]]=e});const vb={type:"error",data:"parser error"},ZM=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",eD=typeof ArrayBuffer=="function",tD=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,D0=({type:e,data:t},n,r)=>ZM&&t instanceof Blob?n?r(t):Dx(t,r):eD&&(t instanceof ArrayBuffer||tD(t))?n?r(t):Dx(new Blob([t]),r):r(pi[e]+(t||"")),Dx=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Lx(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let av;function eQ(e,t){if(ZM&&e.data instanceof Blob)return e.data.arrayBuffer().then(Lx).then(t);if(eD&&(e.data instanceof ArrayBuffer||tD(e.data)))return t(Lx(e.data));D0(e,!1,n=>{av||(av=new TextEncoder),t(av.encode(n))})}const $x="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",kc=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<$x.length;e++)kc[$x.charCodeAt(e)]=e;const tQ=e=>{let t=e.length*.75,n=e.length,r,s=0,i,o,a,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),c=new Uint8Array(u);for(r=0;r<n;r+=4)i=kc[e.charCodeAt(r)],o=kc[e.charCodeAt(r+1)],a=kc[e.charCodeAt(r+2)],l=kc[e.charCodeAt(r+3)],c[s++]=i<<2|o>>4,c[s++]=(o&15)<<4|a>>2,c[s++]=(a&3)<<6|l&63;return u},nQ=typeof ArrayBuffer=="function",L0=(e,t)=>{if(typeof e!="string")return{type:"message",data:nD(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:rQ(e.substring(1),t)}:Ah[n]?e.length>1?{type:Ah[n],data:e.substring(1)}:{type:Ah[n]}:vb},rQ=(e,t)=>{if(nQ){const n=tQ(e);return nD(n,t)}else return{base64:!0,data:e}},nD=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},rD="",sQ=(e,t)=>{const n=e.length,r=new Array(n);let s=0;e.forEach((i,o)=>{D0(i,!1,a=>{r[o]=a,++s===n&&t(r.join(rD))})})},iQ=(e,t)=>{const n=e.split(rD),r=[];for(let s=0;s<n.length;s++){const i=L0(n[s],t);if(r.push(i),i.type==="error")break}return r};function oQ(){return new TransformStream({transform(e,t){eQ(e,n=>{const r=n.length;let s;if(r<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,r);else if(r<65536){s=new Uint8Array(3);const i=new DataView(s.buffer);i.setUint8(0,126),i.setUint16(1,r)}else{s=new Uint8Array(9);const i=new DataView(s.buffer);i.setUint8(0,127),i.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(s[0]|=128),t.enqueue(s),t.enqueue(n)})}})}let lv;function Vf(e){return e.reduce((t,n)=>t+n.length,0)}function Uf(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let s=0;s<t;s++)n[s]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function aQ(e,t){lv||(lv=new TextDecoder);const n=[];let r=0,s=-1,i=!1;return new TransformStream({transform(o,a){for(n.push(o);;){if(r===0){if(Vf(n)<1)break;const l=Uf(n,1);i=(l[0]&128)===128,s=l[0]&127,s<126?r=3:s===126?r=1:r=2}else if(r===1){if(Vf(n)<2)break;const l=Uf(n,2);s=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(Vf(n)<8)break;const l=Uf(n,8),u=new DataView(l.buffer,l.byteOffset,l.length),c=u.getUint32(0);if(c>Math.pow(2,21)-1){a.enqueue(vb);break}s=c*Math.pow(2,32)+u.getUint32(4),r=3}else{if(Vf(n)<s)break;const l=Uf(n,s);a.enqueue(L0(i?l:lv.decode(l),t)),r=0}if(s===0||s>e){a.enqueue(vb);break}}}})}const sD=4;function En(e){if(e)return lQ(e)}function lQ(e){for(var t in En.prototype)e[t]=En.prototype[t];return e}En.prototype.on=En.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};En.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};En.prototype.off=En.prototype.removeListener=En.prototype.removeAllListeners=En.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,s=0;s<n.length;s++)if(r=n[s],r===t||r.fn===t){n.splice(s,1);break}return n.length===0&&delete this._callbacks["$"+e],this};En.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,s=n.length;r<s;++r)n[r].apply(this,t)}return this};En.prototype.emitReserved=En.prototype.emit;En.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};En.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Wm=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),ls=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),uQ="arraybuffer";function iD(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const cQ=ls.setTimeout,dQ=ls.clearTimeout;function qm(e,t){t.useNativeTimers?(e.setTimeoutFn=cQ.bind(ls),e.clearTimeoutFn=dQ.bind(ls)):(e.setTimeoutFn=ls.setTimeout.bind(ls),e.clearTimeoutFn=ls.clearTimeout.bind(ls))}const fQ=1.33;function hQ(e){return typeof e=="string"?pQ(e):Math.ceil((e.byteLength||e.size)*fQ)}function pQ(e){let t=0,n=0;for(let r=0,s=e.length;r<s;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function oD(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function mQ(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function gQ(e){let t={},n=e.split("&");for(let r=0,s=n.length;r<s;r++){let i=n[r].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return t}class vQ extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class $0 extends En{constructor(t){super(),this.writable=!1,qm(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new vQ(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=L0(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=mQ(t);return n.length?"?"+n:""}}class yQ extends $0{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};iQ(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,sQ(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=oD()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let aD=!1;try{aD=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const bQ=aD;function wQ(){}class SQ extends yQ{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(s,i)=>{this.onError("xhr post error",s,i)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}let Hl=class Oh extends En{constructor(t,n,r){super(),this.createRequest=t,qm(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=iD(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let s in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(s)&&r.setRequestHeader(s,this._opts.extraHeaders[s])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var s;r.readyState===3&&((s=this._opts.cookieJar)===null||s===void 0||s.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(s){this.setTimeoutFn(()=>{this._onError(s)},0);return}typeof document<"u"&&(this._index=Oh.requestsCount++,Oh.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=wQ,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Oh.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};Hl.requestsCount=0;Hl.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Fx);else if(typeof addEventListener=="function"){const e="onpagehide"in ls?"pagehide":"unload";addEventListener(e,Fx,!1)}}function Fx(){for(let e in Hl.requests)Hl.requests.hasOwnProperty(e)&&Hl.requests[e].abort()}const _Q=function(){const e=lD({xdomain:!1});return e&&e.responseType!==null}();class kQ extends SQ{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=_Q&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Hl(lD,this.uri(),t)}}function lD(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||bQ))return new XMLHttpRequest}catch{}if(!t)try{return new ls[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const uD=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class xQ extends $0{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=uD?{}:iD(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(s){return this.emitReserved("error",s)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],s=n===t.length-1;D0(r,this.supportsBinary,i=>{try{this.doWrite(r,i)}catch{}s&&Wm(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=oD()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const uv=ls.WebSocket||ls.MozWebSocket;class EQ extends xQ{createSocket(t,n,r){return uD?new uv(t,n,r):n?new uv(t,n):new uv(t)}doWrite(t,n){this.ws.send(n)}}class CQ extends $0{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=aQ(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),s=oQ();s.readable.pipeTo(t.writable),this._writer=s.writable.getWriter();const i=()=>{r.read().then(({done:a,value:l})=>{a||(this.onPacket(l),i())}).catch(a=>{})};i();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],s=n===t.length-1;this._writer.write(r).then(()=>{s&&Wm(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const TQ={websocket:EQ,webtransport:CQ,polling:kQ},PQ=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,RQ=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function yb(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let s=PQ.exec(e||""),i={},o=14;for(;o--;)i[RQ[o]]=s[o]||"";return n!=-1&&r!=-1&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=IQ(i,i.path),i.queryKey=AQ(i,i.query),i}function IQ(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function AQ(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,i){s&&(n[s]=i)}),n}const bb=typeof addEventListener=="function"&&typeof removeEventListener=="function",Mh=[];bb&&addEventListener("offline",()=>{Mh.forEach(e=>e())},!1);class Do extends En{constructor(t,n){if(super(),this.binaryType=uQ,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=yb(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=yb(n.host).host);qm(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const s=r.prototype.name;this.transports.push(s),this._transportsByName[s]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=gQ(this.opts.query)),bb&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Mh.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=sD,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Do.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Do.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const s=this.writeBuffer[r].data;if(s&&(n+=hQ(s)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Wm(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,s){if(typeof n=="function"&&(s=n,n=void 0),typeof r=="function"&&(s=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const i={type:t,data:n,options:r};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),s&&this.once("flush",s),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(Do.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),bb&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Mh.indexOf(this._offlineEventListener);r!==-1&&Mh.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Do.protocol=sD;class OQ extends Do{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;Do.priorWebsocketSuccess=!1;const s=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",d=>{if(!r)if(d.type==="pong"&&d.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Do.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(c(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const f=new Error("probe error");f.transport=n.name,this.emitReserved("upgradeError",f)}}))};function i(){r||(r=!0,c(),n.close(),n=null)}const o=d=>{const f=new Error("probe error: "+d);f.transport=n.name,i(),this.emitReserved("upgradeError",f)};function a(){o("transport closed")}function l(){o("socket closed")}function u(d){n&&d.name!==n.name&&i()}const c=()=>{n.removeListener("open",s),n.removeListener("error",o),n.removeListener("close",a),this.off("close",l),this.off("upgrading",u)};n.once("open",s),n.once("error",o),n.once("close",a),this.once("close",l),this.once("upgrading",u),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let MQ=class extends OQ{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(s=>TQ[s]).filter(s=>!!s)),super(t,r)}};function DQ(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=yb(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const i=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+i+":"+r.port+t,r.href=r.protocol+"://"+i+(n&&n.port===r.port?"":":"+r.port),r}const LQ=typeof ArrayBuffer=="function",$Q=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,cD=Object.prototype.toString,FQ=typeof Blob=="function"||typeof Blob<"u"&&cD.call(Blob)==="[object BlobConstructor]",NQ=typeof File=="function"||typeof File<"u"&&cD.call(File)==="[object FileConstructor]";function F0(e){return LQ&&(e instanceof ArrayBuffer||$Q(e))||FQ&&e instanceof Blob||NQ&&e instanceof File}function Dh(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Dh(e[n]))return!0;return!1}if(F0(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Dh(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Dh(e[n]))return!0;return!1}function BQ(e){const t=[],n=e.data,r=e;return r.data=wb(n,t),r.attachments=t.length,{packet:r,buffers:t}}function wb(e,t){if(!e)return e;if(F0(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=wb(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=wb(e[r],t));return n}return e}function VQ(e,t){return e.data=Sb(e.data,t),delete e.attachments,e}function Sb(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Sb(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Sb(e[n],t));return e}const UQ=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],zQ=5;var gt;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(gt||(gt={}));class HQ{constructor(t){this.replacer=t}encode(t){return(t.type===gt.EVENT||t.type===gt.ACK)&&Dh(t)?this.encodeAsBinary({type:t.type===gt.EVENT?gt.BINARY_EVENT:gt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===gt.BINARY_EVENT||t.type===gt.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=BQ(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}function Nx(e){return Object.prototype.toString.call(e)==="[object Object]"}class N0 extends En{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===gt.BINARY_EVENT;r||n.type===gt.BINARY_ACK?(n.type=r?gt.EVENT:gt.ACK,this.reconstructor=new jQ(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(F0(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(gt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===gt.BINARY_EVENT||r.type===gt.BINARY_ACK){const i=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const o=t.substring(i,n);if(o!=Number(o)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(o)}if(t.charAt(n+1)==="/"){const i=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(i,n)}else r.nsp="/";const s=t.charAt(n+1);if(s!==""&&Number(s)==s){const i=n+1;for(;++n;){const o=t.charAt(n);if(o==null||Number(o)!=o){--n;break}if(n===t.length)break}r.id=Number(t.substring(i,n+1))}if(t.charAt(++n)){const i=this.tryParse(t.substr(n));if(N0.isPayloadValid(r.type,i))r.data=i;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case gt.CONNECT:return Nx(n);case gt.DISCONNECT:return n===void 0;case gt.CONNECT_ERROR:return typeof n=="string"||Nx(n);case gt.EVENT:case gt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&UQ.indexOf(n[0])===-1);case gt.ACK:case gt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class jQ{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=VQ(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const WQ=Object.freeze(Object.defineProperty({__proto__:null,Decoder:N0,Encoder:HQ,get PacketType(){return gt},protocol:zQ},Symbol.toStringTag,{value:"Module"}));function Os(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const qQ=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class dD extends En{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Os(t,"open",this.onopen.bind(this)),Os(t,"packet",this.onpacket.bind(this)),Os(t,"error",this.onerror.bind(this)),Os(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,s,i;if(qQ.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const o={type:gt.EVENT,data:n};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const c=this.ids++,d=n.pop();this._registerAckCallback(c,d),o.id=c}const a=(s=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||s===void 0?void 0:s.writable,l=this.connected&&!(!((i=this.io.engine)===null||i===void 0)&&i._hasPingExpired());return this.flags.volatile&&!a||(l?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(t,n){var r;const s=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(s===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&this.sendBuffer.splice(a,1);n.call(this,new Error("operation has timed out"))},s),o=(...a)=>{this.io.clearTimeoutFn(i),n.apply(this,a)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...n){return new Promise((r,s)=>{const i=(o,a)=>o?s(o):r(a);i.withError=!0,n.push(i),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((s,...i)=>r!==this._queue[0]?void 0:(s!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(s)):(this._queue.shift(),n&&n(null,...i)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:gt.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case gt.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case gt.EVENT:case gt.BINARY_EVENT:this.onevent(t);break;case gt.ACK:case gt.BINARY_ACK:this.onack(t);break;case gt.DISCONNECT:this.ondisconnect();break;case gt.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...s){r||(r=!0,n.packet({type:gt.ACK,id:t,data:s}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:gt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Ju(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Ju.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};Ju.prototype.reset=function(){this.attempts=0};Ju.prototype.setMin=function(e){this.ms=e};Ju.prototype.setMax=function(e){this.max=e};Ju.prototype.setJitter=function(e){this.jitter=e};class _b extends En{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,qm(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Ju({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const s=n.parser||WQ;this.encoder=new s.Encoder,this.decoder=new s.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new MQ(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const s=Os(n,"open",function(){r.onopen(),t&&t()}),i=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},o=Os(n,"error",i);if(this._timeout!==!1){const a=this._timeout,l=this.setTimeoutFn(()=>{s(),i(new Error("timeout")),n.close()},a);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(s),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Os(t,"ping",this.onping.bind(this)),Os(t,"data",this.ondata.bind(this)),Os(t,"error",this.onerror.bind(this)),Os(t,"close",this.onclose.bind(this)),Os(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Wm(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new dD(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(s=>{s?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",s)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const fc={};function Lh(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=DQ(e,t.path||"/socket.io"),r=n.source,s=n.id,i=n.path,o=fc[s]&&i in fc[s].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return a?l=new _b(r,t):(fc[s]||(fc[s]=new _b(r,t)),l=fc[s]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(Lh,{Manager:_b,Socket:dD,io:Lh,connect:Lh});let Bt=null;const Pn=mn({connected:!1,setup:!1,id:"",active:!1});class GQ{constructor(){we(this,"printerStore",Xt());we(this,"floorStore",io());we(this,"printerStateStore",lr());we(this,"testPrinterStore",I0());we(this,"trackedUploadsStore",ZX());we(this,"snackbar",Ft());we(this,"authStore",ps())}socketState(){return Bt?{setup:!0,connected:Bt.connected,active:Bt.active,id:Bt.id}:(console.debug("Returning default socket state, socket was not set up"),{setup:!1})}async setupSocketConnection(){if(console.debug("Setting up socket.io client"),Pn.setup)throw new Error("Cant setup socket, socket already created");Pn.setup=!1;const t=await uO();this.authStore.loadTokens(),Bt=Lh(t,{auth:async n=>{if(!this.authStore.loginRequired)return n({});try{this.authStore.isLoginExpired&&(console.warn("Login expired, attempting to refresh token"),await this.authStore.refreshLoginToken()),this.authStore.token?n({token:this.authStore.token}):(console.error("No token available after refresh"),n({}))}catch(r){console.error("Token refresh failed:",r),n({})}}}),this.setupConnectionHandlers(),this.registerMessageHandlers(),Pn.setup=!0}disconnect(){if(!Bt)throw new Error("Cant disconnect socket, socket not created");Bt.close(),Bt=null,Pn.setup=!1,Pn.connected=!1,Pn.active=!1,Pn.id=""}reconnect(){if(!Bt)throw new Error("Cant reconnect socket, socket not created");console.debug("Resetting socket connection. Previous state:",{connected:Bt.connected,active:Bt.active,id:Bt.id}),Bt.close(),Bt.connect()}onMessage(t){var n,r,s;(n=t.trackedUploads.current)!=null&&n.length&&(this.trackedUploadsStore.setUploads(t==null?void 0:t.trackedUploads.current),this.trackedUploadsStore.activeUploads.forEach(i=>{this.snackbar.openProgressMessage(i.correlationToken,i.multerFile.originalname,(i.progress||0)*100,i.completed)})),(r=t.floors)!=null&&r.length&&this.floorStore.saveFloors(t.floors),(s=t.printers)!=null&&s.length&&this.printerStore.setPrinters(t.printers),t.socketStates&&this.printerStateStore.setSocketStates(t.socketStates),t.printerEvents&&this.printerStateStore.setPrinterEvents(t.printerEvents)}setupConnectionHandlers(){if(!Bt)throw new Error("Cant bind socket events, socket not created");Bt.on("connect",()=>{Pn.id=(Bt==null?void 0:Bt.id)??"",Pn.connected=!0,Pn.active=(Bt==null?void 0:Bt.active)??!1,console.debug("Socket connected:",Pn.id,"Active:",Pn.active),Dn("server:connected").emit({})}),Bt.on("disconnect",()=>{Pn.id="",Pn.connected=!1,Pn.active=!1,console.debug("Socket disconnected"),Dn("server:disconnected").emit({})}),Bt.on("connect_error",async t=>{if(console.error("Socket connection error:",t.message),t.message.includes("Authentication")||t.message.includes("jwt")||t.message.includes("token")||t.message.includes("auth")){console.warn("Possible JWT authentication issue detected");try{await this.authStore.refreshLoginToken(),this.reconnect()}catch{console.error("Error refreshing token"),this.disconnect(),await this.authStore.logout()}}else Dn("server:disconnected").emit({})})}registerMessageHandlers(){if(!Bt)throw new Error("Cant bind socket app events, socket not created");Bt.on("legacy-update",t=>this.onMessage(t)),Bt.on("test-printer-state",t=>{this.testPrinterStore.saveEvent(t)})}}const KQ=he({scrollTarget:{type:String},scrollThreshold:{type:[String,Number],default:300}},"scroll");function YQ(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{canScroll:n}=t;let r=0,s=0;const i=K(null),o=Pe(0),a=Pe(0),l=Pe(0),u=Pe(!1),c=Pe(!1),d=M(()=>Number(e.scrollThreshold)),f=M(()=>Nn((d.value-o.value)/d.value||0)),h=()=>{const g=i.value;if(!g||n&&!n.value)return;r=o.value,o.value="window"in g?g.pageYOffset:g.scrollTop;const m=g instanceof Window?document.documentElement.scrollHeight:g.scrollHeight;if(s!==m){s=m;return}c.value=o.value<r,l.value=Math.abs(o.value-d.value)};return Ee(c,()=>{a.value=a.value||o.value}),Ee(u,()=>{a.value=0}),yt(()=>{Ee(()=>e.scrollTarget,g=>{var y;const m=g?document.querySelector(g):window;m&&m!==i.value&&((y=i.value)==null||y.removeEventListener("scroll",h),i.value=m,i.value.addEventListener("scroll",h,{passive:!0}))},{immediate:!0})}),Vn(()=>{var g;(g=i.value)==null||g.removeEventListener("scroll",h)}),n&&Ee(n,h,{immediate:!0}),{scrollThreshold:d,currentScroll:o,currentThreshold:l,isScrollActive:u,scrollRatio:f,isScrollingUp:c,savedScroll:a}}const XQ=he({scrollBehavior:String,modelValue:{type:Boolean,default:!0},location:{type:String,default:"top",validator:e=>["top","bottom"].includes(e)},...NM(),...XO(),...KQ(),height:{type:[Number,String],default:64}},"VAppBar"),fD=xe()({name:"VAppBar",props:XQ(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=K(),s=lt(e,"modelValue"),i=M(()=>{var x;const b=new Set(((x=e.scrollBehavior)==null?void 0:x.split(" "))??[]);return{hide:b.has("hide"),fullyHide:b.has("fully-hide"),inverted:b.has("inverted"),collapse:b.has("collapse"),elevate:b.has("elevate"),fadeImage:b.has("fade-image")}}),o=M(()=>{const b=i.value;return b.hide||b.fullyHide||b.inverted||b.collapse||b.elevate||b.fadeImage||!s.value}),{currentScroll:a,scrollThreshold:l,isScrollingUp:u,scrollRatio:c}=YQ(e,{canScroll:o}),d=ie(()=>i.value.hide||i.value.fullyHide),f=M(()=>e.collapse||i.value.collapse&&(i.value.inverted?c.value>0:c.value===0)),h=M(()=>e.flat||i.value.fullyHide&&!s.value||i.value.elevate&&(i.value.inverted?a.value>0:a.value===0)),g=M(()=>i.value.fadeImage?i.value.inverted?1-c.value:c.value:void 0),m=M(()=>{var _,S;if(i.value.hide&&i.value.inverted)return 0;const b=((_=r.value)==null?void 0:_.contentHeight)??0,x=((S=r.value)==null?void 0:S.extensionHeight)??0;return d.value?a.value<l.value||i.value.fullyHide?b+x:b:b+x});Lr(()=>!!e.scrollBehavior,()=>{Cn(()=>{d.value?i.value.inverted?s.value=a.value>l.value:s.value=u.value||a.value<l.value:s.value=!0})});const{ssrBootStyles:y}=uf(),{layoutItemStyles:w}=JO({id:e.name,order:M(()=>parseInt(e.order,10)),position:ie(()=>e.location),layoutSize:m,elementSize:Pe(void 0),active:s,absolute:ie(()=>e.absolute)});return Me(()=>{const b=wr.filterProps(e);return p(wr,me({ref:r,class:["v-app-bar",{"v-app-bar--bottom":e.location==="bottom"},e.class],style:[{...w.value,"--v-toolbar-image-opacity":g.value,height:void 0,...y.value},e.style]},b,{collapse:f.value,flat:h.value}),n)}),{}}}),QQ=he({...Ur(JP({icon:"$menu",variant:"text"}),["spaced"])},"VAppBarNavIcon"),JQ=xe()({name:"VAppBarNavIcon",props:QQ(),setup(e,t){let{slots:n}=t;return Me(()=>p(ne,me(e,{class:["v-app-bar-nav-icon"]}),n)),{}}}),ZQ={key:1,class:"text-uppercase text--white"},eJ={key:3,class:"ml-2"},tJ={key:4,class:"ml-2"},nJ=Fe({__name:"TopBar",setup(e){const t=M0(),n=ps(),r=ta(),s=[{title:"Open Profile",icon:"person",path:"/settings/account"}],i=K(Date.now());_F(()=>{i.value=Date.now()},1e3);const o=M(()=>{var d;if(!((d=n.tokenClaims)!=null&&d.exp))return"";const c=n.tokenClaims.exp-i.value/1e3;return`${Math.round(c)}s`}),a=M(()=>t.username),l=M(()=>n.isDemoMode);async function u(){await n.logout(!0),await JM(r)}return(c,d)=>{const f=jY,h=HY;return $(),te(fD,{elevation:"0"},{default:v(()=>[p(On,{class:"text-uppercase text-white"},{default:v(()=>[...d[1]||(d[1]=[C("span",{class:"font-weight-light"}," FDM ",-1),C("strong",null," Monster ",-1)])]),_:1}),l.value?($(),te(Tn,{key:0})):pe("",!0),l.value?($(),ve("h2",ZQ," DEMO MODE ")):pe("",!0),p(Tn),p(XX),J(n).hasAuthToken&&!J(n).isLoginExpired?($(),te(Vm,{key:2,"close-on-content-click":!1,location:"bottom right","open-on-hover":"",transition:"slide-y-transition"},{activator:v(({props:g})=>[p(ne,me({class:"ml-2",color:"secondary",theme:"dark"},g),{default:v(()=>[p(Z,{class:"mr-2"},{default:v(()=>[...d[2]||(d[2]=[k("person",-1)])]),_:1}),k(" "+se(a.value),1)]),_:1},16)]),default:v(()=>[p(Ht,null,{default:v(()=>[($(),ve(Oe,null,Qt(s,(g,m)=>p(ze,{key:m,to:g.path,title:g.title,"prepend-avatar":g.icon,link:""},null,8,["to","title","prepend-avatar"])),64))]),_:1})]),_:1})):pe("",!0),J(Mx)&&o.value?($(),ve("span",eJ," AuthExp "+se(o.value),1)):pe("",!0),J(Mx)?($(),ve("span",tJ,[C("small",null," S"+se(J(Pn).setup?1:0)+" C"+se(J(Pn).connected?1:0)+" A"+se(J(Pn).active?1:0)+" "+se(J(Pn).id),1)])):pe("",!0),J(n).loginRequired===!0?($(),te(f,{key:5,tooltip:"Go back to login",text:"Logout",color:"secondary",icon:"logout",onClick:d[0]||(d[0]=g=>u())})):pe("",!0),J(n).loginRequired===!0?($(),te(ne,{key:6,class:"ml-2"},{default:v(()=>[p(Z,{class:"mr-2"},{default:v(()=>[...d[3]||(d[3]=[k("logout",-1)])]),_:1}),d[4]||(d[4]=k(" Logout ",-1))]),_:1})):pe("",!0),p(h)]),_:1})}}}),B0="/assets/logo-CJVdjy51.png",rJ=Fe({__name:"NavigationBar",setup(e){const t=[["home","Devices","/"],["print","Printers","/printers"],["camera_alt","CameraGridView","/cameras"],["settings","Settings","/settings"],["timeline","PrintStatistics","/statistics"],["contact_support","About","/about"]];return(n,r)=>($(),te(b0,{permanent:"",rail:""},{default:v(()=>[p(JQ,{class:"ml-1 mt-2"},{default:v(()=>[p(vs,{alt:"FDM Monster Logo",src:J(B0),class:"shrink mr-1 pt-3 ml-1",transition:"scale-transition",width:"40"},null,8,["src"])]),_:1}),p(ln),p(Ht,{density:"compact",nav:""},{default:v(()=>[($(),ve(Oe,null,Qt(t,([s,i,o],a)=>p(ze,{key:a,to:o,"prepend-icon":s,title:i,density:"comfortable","router-link":""},null,8,["to","prepend-icon","title"])),64))]),_:1})]),_:1}))}});function sJ(e){const t=Pe(e());let n=-1;function r(){clearInterval(n)}function s(){r(),Pt(()=>t.value=e())}function i(o){const a=o?getComputedStyle(o):{transitionDuration:.2},l=parseFloat(a.transitionDuration)*1e3||200;if(r(),t.value<=0)return;const u=performance.now();n=window.setInterval(()=>{const c=performance.now()-u+l;t.value=Math.max(e()-c,0),t.value<=0&&r()},l)}return dn(r),{clear:r,time:t,start:i,reset:s}}const iJ=he({multiLine:Boolean,text:String,timer:[Boolean,String],timeout:{type:[Number,String],default:5e3},vertical:Boolean,...Xo({location:"bottom"}),...Du(),...Un(),...zs(),...Nt(),...Ur(qd({transition:"v-snackbar-transition"}),["persistent","noClickAnimation","scrim","scrollStrategy","stickToTarget"])},"VSnackbar"),V0=xe()({name:"VSnackbar",props:iJ(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=lt(e,"modelValue"),{positionClasses:s}=Lu(e),{scopeId:i}=$u(),{themeClasses:o}=tn(e),{colorClasses:a,colorStyles:l,variantClasses:u}=ol(e),{roundedClasses:c}=Qn(e),d=sJ(()=>Number(e.timeout)),f=K(),h=K(),g=Pe(!1),m=Pe(0),y=K(),w=Je(wd,void 0);Lr(()=>!!w,()=>{const I=QO();Cn(()=>{y.value=I.mainStyles.value})}),Ee(r,x),Ee(()=>e.timeout,x),yt(()=>{r.value&&x()});let b=-1;function x(){d.reset(),window.clearTimeout(b);const I=Number(e.timeout);if(!r.value||I===-1)return;const O=i1(h.value);d.start(O),b=window.setTimeout(()=>{r.value=!1},I)}function _(){d.reset(),window.clearTimeout(b)}function S(){g.value=!0,_()}function P(){g.value=!1,x()}function A(I){m.value=I.touches[0].clientY}function E(I){Math.abs(m.value-I.changedTouches[0].clientY)>50&&(r.value=!1)}function T(){g.value&&P()}const R=M(()=>e.location.split(" ").reduce((I,O)=>(I[`v-snackbar--${O}`]=!0,I),{}));return Me(()=>{const I=Yi.filterProps(e),O=!!(n.default||n.text||e.text);return p(Yi,me({ref:f,class:["v-snackbar",{"v-snackbar--active":r.value,"v-snackbar--multi-line":e.multiLine&&!e.vertical,"v-snackbar--timer":!!e.timer,"v-snackbar--vertical":e.vertical},R.value,s.value,e.class],style:[y.value,e.style]},I,{modelValue:r.value,"onUpdate:modelValue":H=>r.value=H,contentProps:me({class:["v-snackbar__wrapper",o.value,a.value,c.value,u.value],style:[l.value],onPointerenter:S,onPointerleave:P},I.contentProps),persistent:!0,noClickAnimation:!0,scrim:!1,scrollStrategy:"none",_disableGlobalStack:!0,onTouchstartPassive:A,onTouchend:E,onAfterLeave:T},i),{default:()=>{var H,N;return[Yo(!1,"v-snackbar"),e.timer&&!g.value&&C("div",{key:"timer",class:"v-snackbar__timer"},[p(uu,{ref:h,color:typeof e.timer=="string"?e.timer:"info",max:e.timeout,modelValue:d.time.value},null)]),O&&C("div",{key:"content",class:"v-snackbar__content",role:"status","aria-live":"polite"},[((H=n.text)==null?void 0:H.call(n))??e.text,(N=n.default)==null?void 0:N.call(n)]),n.actions&&p($t,{defaults:{VBtn:{variant:"text",ripple:!1,slim:!0}}},{default:()=>[C("div",{class:"v-snackbar__actions"},[n.actions({isActive:r})])]})]},activator:n.activator})}),Es({},f)}}),oJ={style:{width:"100%"}},aJ={class:"font-weight-bold text-button"},lJ=Fe({__name:"AppProgressSnackbar",setup(e){const t=Ft(),n=K(!1),r=K(""),s=K([]),i=K(100);function o(u){return s.value.find(c=>c.key===u)}function a(u,c,d=0,f=!1,h=Date.now()+1500){console.log(`[AppProgressSnackbar] Adding ${u} tracker with progress ${d}`),s.value.push({key:u,title:c,value:d,completed:f,startedAt:Date.now(),expiresAt:h,timeoutAt:void 0})}function l(u){s.value=s.value.filter(c=>c.key!==u)}return yt(()=>{setInterval(()=>{if(s.value.length){for(const u of s.value){const{value:c,completed:d,expiresAt:f,key:h}=u;(d||c>=100)&&f<Date.now()||u.timeoutAt&&u.timeoutAt<Date.now()?l(h):!u.timeoutAt&&f<Date.now()&&(u.timeoutAt=Date.now()+5e3)}s.value.length?(i.value=-1,n.value=!0):(i.value=2e3,r.value="Upload ended",console.debug(`[AppSnackbars] Setting timeout to ${i.value}`))}},1e3),t.onProgressMessage(u=>{const{key:c,value:d,title:f,completed:h}=u,g=o(c);if(g)Math.min(100,d)>=g.value&&(g.expiresAt=Date.now()+1500,g.value=d,g.completed=h);else{if(d>=100)return;a(c,f,d,!1,Date.now()+1500)}r.value="Uploading files"})}),(u,c)=>($(),te(V0,{modelValue:n.value,"onUpdate:modelValue":c[1]||(c[1]=d=>n.value=d),timeout:i.value,absolute:"",location:"bottom right",class:"ma-3 elevation-24","min-width":"450px","multi-line":"",rounded:"pill",style:{"z-index":"1000"}},{default:v(()=>[p(st,null,{default:v(()=>[p(We,{cols:"2"},{default:v(()=>[p(ne,{icon:"file_upload",size:"large"})]),_:1}),p(We,{class:"d-flex align-center flex-row",cols:"8"},{default:v(()=>[C("div",oJ,[C("span",aJ,se(r.value),1),($(!0),ve(Oe,null,Qt(s.value,(d,f)=>($(),ve("div",{key:f,class:"mb-2"},[d.completed?($(),te(Z,{key:0},{default:v(()=>[...c[2]||(c[2]=[k("check",-1)])]),_:1})):d.timeoutAt?($(),te(Z,{key:1},{default:v(()=>[...c[3]||(c[3]=[k("pause",-1)])]),_:1})):($(),te(Z,{key:2},{default:v(()=>[...c[4]||(c[4]=[k("hourglass_bottom",-1)])]),_:1})),k(" "+se(d.title)+" "+se((d.completed?100:d.value).toFixed(1))+"% ",1),c[5]||(c[5]=C("br",null,null,-1)),($(),te(uu,{key:d.key,"model-value":d.completed?100:d.value,color:d.timeoutAt?"red":"success"},null,8,["model-value","color"]))]))),128))])]),_:1}),p(We,{cols:"1"},{default:v(()=>[p(ne,{icon:"close",size:"large",onClick:c[0]||(c[0]=d=>n.value=!1)})]),_:1})]),_:1})]),_:1},8,["modelValue","timeout"]))}}),uJ={class:"font-weight-bold text-button"},cJ={key:0},dJ=Fe({__name:"AppErrorSnackbar",setup(e){const t=Ft(),n=K(-1),r=K(!1),s=K(""),i=K("");return yt(()=>{t.onErrorMessage(o=>{s.value=o.title,i.value=o.subtitle??"",r.value=!0,n.value=o.timeout??1e4})}),(o,a)=>($(),te(V0,{modelValue:r.value,"onUpdate:modelValue":a[1]||(a[1]=l=>r.value=l),timeout:n.value,absolute:"",location:"bottom",class:"ml-16 mb-16 ma-3 elevation-24",color:"error-darken-1",rounded:"pill","multi-line":"",style:{"z-index":"1000"},width:"450"},{default:v(()=>[p(st,null,{default:v(()=>[p(We,{cols:"2"},{default:v(()=>[p(ne,{icon:"error"})]),_:1}),p(We,{class:"d-flex align-center flex-row",cols:"8"},{default:v(()=>{var l;return[C("div",null,[C("span",uJ,se(s.value),1),(l=i.value)!=null&&l.length?($(),ve("div",cJ,se(i.value),1)):pe("",!0)])]}),_:1}),p(We,{cols:"1"},{default:v(()=>[p(ne,{icon:"close",onClick:a[0]||(a[0]=l=>r.value=!1)})]),_:1})]),_:1})]),_:1},8,["modelValue","timeout"]))}}),fJ={class:"font-weight-bold text-button"},hJ={key:0},pJ=Fe({__name:"AppInfoSnackbar",setup(e){const t=Ft(),n=K(!1),r=K(""),s=K(""),i=K(2e3),o=K(!1);return yt(()=>{t.onInfoMessage(a=>{r.value=a.title,s.value=a.subtitle??"",o.value=a.warning??!1,i.value=a.timeout??2e3,n.value=!0})}),(a,l)=>($(),te(V0,{modelValue:n.value,"onUpdate:modelValue":l[1]||(l[1]=u=>n.value=u),absolute:"",location:"bottom",color:o.value?"warning darken-2":"success",class:"ma-3 elevation-24",rounded:"pill",timeout:i.value,style:{"z-index":"1000"},"multi-line":""},{default:v(()=>[p(st,null,{default:v(()=>[p(We,{cols:"2"},{default:v(()=>[p(ne,{icon:"info"})]),_:1}),p(We,{cols:"8",class:"d-flex align-center flex-row"},{default:v(()=>{var u;return[C("div",null,[C("span",fJ,se(r.value),1),(u=s.value)!=null&&u.length?($(),ve("div",hJ,se(s.value),1)):pe("",!0)])]}),_:1}),p(We,{cols:"2"},{default:v(()=>[p(ne,{icon:"close",onClick:l[0]||(l[0]=u=>n.value=!1)})]),_:1})]),_:1})]),_:1},8,["modelValue","color","timeout"]))}}),U0=Ss("Uploads",{state:()=>({queuedUploads:[],failedUploads:[],uploadingNow:!1}),getters:{hasPendingUploads(e){var t;return((t=e.queuedUploads)==null?void 0:t.length)>0},isUploadingNow(e){return e.uploadingNow},nextUpload(e){return e.queuedUploads[0]}},actions:{queueUploads(e){this.failedUploads=[],this.queuedUploads.push(...e)},cancelUploads(){this.queuedUploads=[],this.failedUploads=[]},async handleNextUpload(){var s;const e=Ft();if(!((s=this.queuedUploads)!=null&&s.length))return;this.uploadingNow=!0;const{file:t,printer:n,startPrint:r}=this.nextUpload;this.queuedUploads.splice(0,1);try{await Hi.uploadFile(n,t,r)}catch(i){if(i.isAxiosError){const o={file:t,printer:n,error:i,startPrint:!1};this.failedUploads.push(o),e.openErrorMessage({title:"Upload failure",subtitle:`File ${t.name}Upload failed for to printer ${n.name}`})}else e.openErrorMessage({title:"Upload failure",subtitle:"Unknown upload error occurred"})}this.uploadingNow=!1}}}),Bx="/img/OIG.JYDC2RaWdz7g9.jpg",fl=(e,t)=>{const n=e.__vccOpts||e;for(const[r,s]of t)n[r]=s;return n},mJ=e=>Math.random()*e,gJ={name:"GridLoader",props:{loading:{type:Boolean,default:!0},color:{type:String,default:"#000000"},size:{type:Number,default:15},margin:{type:String,default:"2px"},sizeUnit:{type:String,default:"px"}},methods:{random:mJ,getWrapperStyle(){return{width:`${parseFloat(this.size)*3+parseFloat(this.margin)*6}${this.sizeUnit}`,fontSize:0}},getCircleStyle(e){const t=`grid ${e/100+.6}s ${e/100-.2}s infinite ease`;return{display:"inline-block",backgroundColor:this.color,width:`${this.size}${this.sizeUnit}`,height:`${this.size}${this.sizeUnit}`,margin:this.margin,borderRadius:"100%",animationFillMode:"both",animation:t}}}};function vJ(e,t,n,r,s,i){return n.loading?($(),ve("div",{key:0,style:Be(i.getWrapperStyle())},[($(),ve(Oe,null,Qt(9,o=>C("div",{key:o,style:Be(i.getCircleStyle(i.random(100)))},null,4)),64))],4)):pe("",!0)}const hD=fl(gJ,[["render",vJ]]);function pD(e){const t=ht();t.getOptions().enabled=e,console.warn("Sentry enabled:",e)}const yJ=e=>new Promise(t=>setTimeout(t,e)),bJ={key:1},wJ={key:2,style:{margin:"50px"}},SJ={class:"mt-2 mb-2"},_J={key:0,class:"mt-2 mb-2"},kJ={key:1,class:"mt-2 mb-2"},xJ={key:3,style:{animation:"fadeIn 0.75s"}},EJ=Fe({__name:"AppLoader",setup(e){const t=ps(),n=js(),r=Nm(),s=M0(),i=K(!1),o=ta(),a=K(""),l=K(!0),u=K(),c=K(),d=K(),f=K(),h=Ft(),g=new GQ;function m(){window.location.reload()}function y(){navigator.clipboard.writeText(JSON.stringify(u.value)),h.openInfoMessage({title:"Copied",subtitle:"Error copied to clipboard"})}function w(R,I=""){R?(a.value=I,u.value=null,d.value=null,f.value=null):a.value="",i.value=R}async function b(){var R;try{await n.loadSettings(),await r.loadFeatures(),await s.getProfile();const I=(R=n.serverSettings)==null?void 0:R.sentryDiagnosticsEnabled;pD(!!I)}catch(I){console.log("Error when loading settings.",I),h.openErrorMessage({title:"Error",subtitle:"Error when loading settings, features and/or profile."}),fi(I)}g.socketState().setup?g.reconnect():await g.setupSocketConnection(),l.value=!1,w(!1)}return Dn("auth:permission-denied").on(async R=>{console.log("[AppLoader] Permission denied, going to permission denied page"),w(!0,"Permission denied"),await o.push({name:Yt.PermissionDenied,query:{roles:R==null?void 0:R.roles,page:String(o.currentRoute.value.name),permissions:R==null?void 0:R.permissions,error:R==null?void 0:R.error,url:R==null?void 0:R.url}}),w(!1)}),Dn("auth:failure").on(async R=>{console.debug(`[AppLoader] Event received: 'auth:failure', going back to login, context: ${R}`),w(!0,"Authentication failed, going back to login"),o.currentRoute.value.name!==Yt.Login&&await o.push({name:Yt.Login}),w(!1)}),Dn("auth:login").on(async()=>{console.debug("[AppLoader] Event received: 'auth:login', loading app"),w(!0,"Loading app"),await b()}),Dn(`auth:${Ir.AccountNotVerified}`).on(async()=>{console.debug(`[AppLoader] Event received: 'auth:${Ir.AccountNotVerified}', going to login`),h.error("Account not verified, please ask an administrator to verify your account."),w(!0,"Account not verified, please ask an administrator to verify your account."),o.currentRoute.value.name!==Yt.Login&&await o.push({name:Yt.Login}),w(!1)}),Dn(`auth:${Ir.PasswordChangeRequired}`).on(async()=>{console.debug(`[AppLoader] Event received: 'auth:${Ir.PasswordChangeRequired}', going to login`),h.error("Password change required, please change your password."),w(!0,"Password change required, please change your password."),o.currentRoute.value.name!==Yt.Login&&await o.push({name:Yt.Login}),w(!1)}),Dn("server:disconnected").on(async R=>{w(!0),c.value=!0,l.value=!0}),Dn("server:connected").on(async R=>{w(!1),c.value=!1,l.value=!1}),im(()=>{g.socketState().setup&&g.disconnect()}),Pu(async()=>{var N,D;l.value=!0;const R=["Loading FDM Monster","Loading it all","Loading features","Loading what needs to be loaded","Farming potatoes","Wiping the floor","Cleaning cobwebs","Loading filament.dll","Loading 3D_printer.exe","Loading spools"],I=R[Math.floor(Math.random()*R.length)];w(!0,I);try{await _a.test()}catch(W){l.value=!1,c.value=!0,fi(W);return}const{loginRequired:O,wizardState:H}=await t.checkAuthenticationRequirements();if(!H.wizardCompleted){console.debug("[AppLoader] Wizard not completed, going to wizard"),await t.logout(!1),o.currentRoute.value.name!==Yt.FirstTimeSetup&&await o.replace({name:Yt.FirstTimeSetup}),w(!1);return}if(!O)return console.debug("[AppLoader] Login not required, loading app"),await b();if(console.debug("[AppLoader] Checking if tokens are present"),!t.hasAuthToken&&!t.hasRefreshToken)return console.debug("[AppLoader] No tokens present, hiding overlay as router will have handled it"),w(!1);w(!0,"Refreshing login"),console.debug("[AppLoader] Verifying or refreshing login once");try{const{success:W,handled:U}=await t.verifyOrRefreshLoginOnceOrLogout();if(U){console.debug("[AppLoader] received handled event, hiding overlay");return}if(!W){console.debug("[AppLoader] No success refreshing"),w(!0,"Login expired, going back to login"),await yJ(500),o.currentRoute.value.name!==Yt.Login&&await o.push({name:Yt.Login}),w(!1);return}}catch(W){console.log("[AppLoader] Error when refreshing login",W),l.value=!1,u.value=W.message,d.value=(N=W.config)==null?void 0:N.url,f.value=(D=W.response)==null?void 0:D.data,fi(W);return}console.debug("[AppLoader] Loading app"),await b()}),(R,I)=>($(),ve(Oe,null,[p(Yi,{modelValue:i.value,"onUpdate:modelValue":I[3]||(I[3]=O=>i.value=O),opacity:"0.98",style:{"z-index":"7"}},{default:v(()=>[l.value?($(),te(hD,{key:0,size:20,class:"ma-auto",color:"#a70015"})):pe("",!0),I[31]||(I[31]=C("br",null,null,-1)),c.value?($(),ve("div",bJ,[I[13]||(I[13]=C("h1",null,"FDM Monster Server Disconnected",-1)),I[14]||(I[14]=C("p",null,"Did not receive an answer from the server. Please ensure the server is started and reload the page.",-1)),p(Sd,{class:"pa-4 rounded",color:"grey darken-3",width:"100%"},{default:v(()=>[p(st,null,{default:v(()=>[p(We,null,{default:v(()=>[...I[4]||(I[4]=[C("img",{class:"justify-center align-center align-content-center rounded-pill mt-8 ma-4",src:Bx,style:{opacity:"0.9"},width:"200"},null,-1)])]),_:1}),p(We,{class:"justify-center align-center align-content-center"},{default:v(()=>[p(ne,{color:"primary mb-2",onClick:I[0]||(I[0]=O=>m())},{default:v(()=>[p(Z,{class:"mr-2"},{default:v(()=>[...I[5]||(I[5]=[k("refresh",-1)])]),_:1}),I[6]||(I[6]=k(" reload the page ",-1))]),_:1}),I[11]||(I[11]=C("br",null,null,-1)),p(ne,{color:"darken-2 mb-2",href:"https://docs.fdm-monster.net",style:{color:"white"},target:"_blank"},{default:v(()=>[p(Z,{class:"mr-2"},{default:v(()=>[...I[7]||(I[7]=[k("menu_book",-1)])]),_:1}),I[8]||(I[8]=k(" view documentation ",-1))]),_:1}),I[12]||(I[12]=C("br",null,null,-1)),p(ne,{color:"purple darken-4",href:"https://discord.gg/mwA8uP8CMc",style:{color:"white"},target:"_blank"},{default:v(()=>[p(Z,{class:"mr-2"},{default:v(()=>[...I[9]||(I[9]=[k("chat",-1)])]),_:1}),I[10]||(I[10]=k(" join our Discord ",-1))]),_:1})]),_:1})]),_:1})]),_:1})])):pe("",!0),u.value?($(),ve("div",wJ,[I[28]||(I[28]=C("h1",null,"FDM Monster Server Error",-1)),I[29]||(I[29]=C("p",null," Did not expect this answer from the server. Please check your configuration and logs. ",-1)),p(Sd,{class:"pa-4 rounded",color:"grey-darken-2",width:"80%"},{default:v(()=>[I[23]||(I[23]=k(" Details: ",-1)),C("div",SJ,se(JSON.stringify(u.value,null,4)),1),d.value?($(),ve("div",_J," Original URL: "+se(d.value),1)):pe("",!0),f.value?($(),ve("div",kJ," Response body: "+se(f.value),1)):pe("",!0),I[24]||(I[24]=C("br",null,null,-1)),p(ne,{class:"mb-2",color:"secondary",onClick:I[1]||(I[1]=O=>y())},{default:v(()=>[p(Z,{class:"mr-2"},{default:v(()=>[...I[15]||(I[15]=[k("content_copy",-1)])]),_:1}),I[16]||(I[16]=k(" Copy error details ",-1))]),_:1}),I[25]||(I[25]=C("br",null,null,-1)),p(ne,{color:"primary mb-2",onClick:I[2]||(I[2]=O=>m())},{default:v(()=>[p(Z,{class:"mr-2"},{default:v(()=>[...I[17]||(I[17]=[k("refresh",-1)])]),_:1}),I[18]||(I[18]=k(" reload the page ",-1))]),_:1}),I[26]||(I[26]=C("br",null,null,-1)),p(ne,{color:"darken-2 mb-2",href:"https://docs.fdm-monster.net",style:{color:"white"},target:"_blank"},{default:v(()=>[p(Z,{class:"mr-2"},{default:v(()=>[...I[19]||(I[19]=[k("menu_book",-1)])]),_:1}),I[20]||(I[20]=k(" view documentation ",-1))]),_:1}),I[27]||(I[27]=C("br",null,null,-1)),p(ne,{color:"purple-darken-4",href:"https://discord.gg/mwA8uP8CMc",style:{color:"white"},target:"_blank"},{default:v(()=>[p(Z,{class:"mr-2"},{default:v(()=>[...I[21]||(I[21]=[k("chat",-1)])]),_:1}),I[22]||(I[22]=k(" join our Discord ",-1))]),_:1})]),_:1}),I[30]||(I[30]=C("img",{class:"justify-center align-center align-content-center rounded-pill mt-8 ma-4",src:Bx,style:{opacity:"0.9"},width:"400"},null,-1))])):pe("",!0),l.value?($(),ve("div",xJ,se(a.value),1)):pe("",!0)]),_:1},8,["modelValue"]),i.value?pe("",!0):om(R.$slots,"default",{key:0})],64))}});async function CJ(){const e="vpss",t=document.getElementById(e),n=document.getElementById(`${e}-style`);if(!t||!n){console.error("Splash screen not found. Did you forget to add the `vite-plugin-splash-screen` plugin?");return}const r=window.__VPSS__||{};if(t.addEventListener("animationend",s=>{s.animationName==="vpss-hide"&&(t.remove(),n.remove())}),"minDurationMs"in r&&"renderedAt"in r){const s=new Date().getTime()-r.renderedAt,i=Math.max(r.minDurationMs-s,0);await new Promise(o=>setTimeout(o,i))}t.classList.add(`${e}-hidden`)}const TJ=he({...Ge(),...Ur(YO(),["fullHeight"]),...Nt()},"VApp"),PJ=xe()({name:"VApp",props:TJ(),setup(e,t){let{slots:n}=t;const r=tn(e),{layoutClasses:s,getLayoutItem:i,items:o,layoutRef:a}=ZO({...e,fullHeight:!0}),{rtlClasses:l}=Hr();return Me(()=>{var u;return C("div",{ref:a,class:Re(["v-application",r.themeClasses.value,s.value,l.value,e.class]),style:Be([e.style])},[C("div",{class:"v-application__wrap"},[(u=n.default)==null?void 0:u.call(n)])])}),{getLayoutItem:i,items:o,theme:r}}}),RJ=he({scrollable:Boolean,...Ge(),...Sr(),...pt({tag:"main"})},"VMain"),IJ=xe()({name:"VMain",props:RJ(),setup(e,t){let{slots:n}=t;const{dimensionStyles:r}=_r(e),{mainStyles:s}=QO(),{ssrBootStyles:i}=uf();return Me(()=>p(e.tag,{class:Re(["v-main",{"v-main--scrollable":e.scrollable},e.class]),style:Be([s.value,i.value,r.value,e.style])},{default:()=>{var o,a;return[e.scrollable?C("div",{class:"v-main__scroller"},[(o=n.default)==null?void 0:o.call(n)]):(a=n.default)==null?void 0:a.call(n)]}})),{}}}),AJ=Fe({__name:"App",setup(e){const t=U0(),n=ps(),r=t.queuedUploads;return Ee(r,async()=>{await t.handleNextUpload()}),yt(()=>{CJ(),console.debug(`App.vue mounted. Logged in: ${n.hasAuthToken}, Expired: ${n.isLoginExpired}`)}),(s,i)=>{const o=pJ,a=dJ,l=lJ,u=rJ,c=nJ,d=$n("router-view"),f=VY,h=TY,g=WK,m=HK,y=VK,w=$K,b=bK,x=j9,_=R9,S=iG,P=w7;return $(),te(PJ,null,{default:v(()=>[p(o),p(a),p(l),J(n).hasAuthToken&&!J(n).isLoginExpired||!J(n).loginRequired?($(),te(u,{key:0})):pe("",!0),J(n).hasAuthToken&&!J(n).isLoginExpired||!J(n).loginRequired?($(),te(c,{key:1})):pe("",!0),p(EJ,null,{default:v(()=>[p(IJ,null,{default:v(()=>[p(d)]),_:1})]),_:1}),p(f),p(h),p(g),p(m),p(y),p(w),p(b),p(x),p(_),p(S),p(P)]),_:1})}}}),z0="/img/logo.svg",mD=Fe({__name:"PrinterCreateAction",props:{floorId:{},floorX:{},floorY:{}},setup(e){const t=e,n=rn(sn.AddOrUpdatePrinterDialog);function r(){n.openDialog(t)}return(s,i)=>($(),te(ne,{class:"ma-2",color:"primary",size:"small",rounded:"",onClickCapture:i[0]||(i[0]=Et(o=>r(),["stop"]))},{default:v(()=>[p(Z,null,{default:v(()=>[...i[1]||(i[1]=[k("add",-1)])]),_:1}),i[2]||(i[2]=k(" New printer ",-1))]),_:1}))}});class gD extends kr{static async postQuickStopM112Command(t){const n=$e.sendQuickStopM112Route(t);return await this.post(n)}}const Gm=Ss("GridStore",{state:()=>({gridEditMode:!1})}),OJ="thumbnail",MJ=(e,t)=>Um({queryKey:[OJ,e],queryFn:async()=>e.value?Hi.getThumbnail(e.value).then(n=>n.thumbnailBase64||""):"",enabled:!!e&&!!t}),DJ={class:"d-flex flex flex-column justify-center",style:{height:"100%"}},LJ={key:1,class:"printer-file-or-stream-viewer"},$J={key:2,class:"printer-file-or-stream-viewer"},FJ={key:3,class:"printer-menu"},NJ={class:"file-name"},BJ={key:5,class:"centered-controls"},VJ={key:0},UJ={key:1},Vx="rgba(100,100,100,0.1)",zJ=Fe({__name:"PrinterGridTile",props:{printer:{type:Object,required:!1},x:{type:Number,required:!0},y:{type:Number,required:!0}},setup(e){const t=e,n=Xt(),r=lr(),s=io(),i=js(),o=Gm(),a=rn(sn.PrinterControlDialog),l=rn(sn.AddOrUpdatePrinterDialog),u=Ft(),c=M(()=>{var V;return(V=t.printer)==null?void 0:V.id}),d=M(()=>i.largeTiles),f=M(()=>d.value?"80px":"40px"),{data:h}=MJ(c,i.thumbnailsEnabled),g=M(()=>c.value?r.isApiResponding(c.value):!1),m=M(()=>c.value?r.isPrinterOperational(c.value):!1),y=M(()=>c.value?r.isPrinterPrinting(c.value):!1),w=M(()=>c.value?r.isPrinterPaused(c.value):!1),b=M(()=>c.value?n.isSelectedPrinter(c.value):!1),x=M(()=>{var V;return((V=n.selectedPrinters)==null?void 0:V.length)&&!b.value}),_=M(()=>i.preferCancelOverQuickStop),S=M(()=>{if(!c.value)return;const V=n.printer(c.value);if(!V)return;const L=r.printerEventsById[c.value],oe=r.socketStatesById[c.value];return cO(V,oe,L)}),P=M(()=>{const V=S.value;return V&&V.rgb||Vx}),A=M(()=>{if(c.value)return r.printerJobsById[c.value]}),E=M(()=>{if(c.value)return r.printingFilePathsByPrinterId[c.value]}),T=async()=>{c.value&&confirm("Are you sure to cancel the current print job?")&&await za.stopPrintJob(c.value)},R=async()=>{c.value&&await za.pausePrintJob(c.value)},I=async()=>{c.value&&await za.resumePrintJob(c.value)},O=()=>{n.setSideNavPrinter(t.printer)},H=async()=>{c.value&&(await en.refreshSocket(c.value),u.openInfoMessage({title:"Refreshing connection state"}))},N=()=>{n.setUpdateDialogPrinter(t.printer),l.openDialog()},D=async()=>{if(!c.value)throw new Error("PrinterId not set, cant open dialog");await a.openDialog({printerId:c})},W=async()=>{c.value&&confirm("Are you sure to abort the print in Quick Stop mode? Please reconnect after.")&&await gD.postQuickStopM112Command(c.value)},U=async()=>{c.value&&await en.sendPrinterConnectCommand(c.value)},Q=async()=>{var V;if(!(!t.printer||!c.value)){if(o.gridEditMode){const L=(V=s.selectedFloor)==null?void 0:V.id;if(!L)throw new Error("Cant clear printer, floor not selected");await os.deletePrinterFromFloor(L,c.value);return}n.toggleSelectedPrinter(t.printer)}};return(V,L)=>{const oe=mD,j=Zc("drop-upload"),F=Zc("drop-printer-position");return zt(($(),ve("div",null,[zt(($(),te(kt,{class:Re([{"tile-large":d.value,"tile-selected":b.value,"tile-unselected":x.value,"tile-no-printer":!e.printer},"tile colored-tile rounded-lg"]),elevation:"5",onClick:L[8]||(L[8]=re=>Q())},{default:v(()=>{var re,ae,Se,X,le,ee,G;return[zt(C("div",{class:"printer-title"},se(((re=e.printer)==null?void 0:re.name)??" "),513),[[ro,e.printer]]),!e.printer||J(o).gridEditMode?($(),ve("div",{key:0,style:Be([{height:d.value?"calc(120px - 20px)":"calc(84px - 20px)"},{position:"absolute"}]),class:"plus-hover-icon"},[C("div",DJ,[e.printer?pe("",!0):($(),te(oe,{key:0,"floor-id":(ae=J(s).selectedFloor)==null?void 0:ae.id,"floor-x":e.x,"floor-y":e.y},null,8,["floor-id","floor-x","floor-y"])),e.printer?($(),te(ne,{key:1,color:"error",rounded:"",small:"",onClickCapture:L[0]||(L[0]=Et(_e=>Q(),["stop"]))},{default:v(()=>[p(Z,null,{default:v(()=>[...L[9]||(L[9]=[k("clear",-1)])]),_:1}),L[10]||(L[10]=k(" Clear position ",-1))]),_:1})):pe("",!0)])],4)):pe("",!0),e.printer&&g.value?($(),ve("div",LJ,[(Se=J(h))!=null&&Se.length?($(),te(vs,{key:1,src:"data:image/png;base64,"+(J(h)??""),width:f.value},null,8,["src","width"])):($(),te(vs,{key:0,src:J(B0),width:f.value,alt:"No thumbnail was found in GCode",style:{opacity:"0.3",filter:"grayscale(100%)"}},null,8,["src","width"]))])):e.printer?($(),ve("div",$J,[(X=S.value)!=null&&X.text.includes("API")?($(),te(Z,{key:0,size:f.value,color:"secondary"},{default:v(()=>[...L[11]||(L[11]=[k(" wifi_off ",-1)])]),_:1},8,["size"])):pe("",!0),e.printer.enabled?pe("",!0):($(),te(Z,{key:1,size:f.value,color:"secondary"},{default:v(()=>[...L[12]||(L[12]=[k(" disabled_by_default ",-1)])]),_:1},8,["size"])),(le=S.value)!=null&&le.text.includes("unset")?($(),te(Z,{key:2,size:f.value,color:"secondary"},{default:v(()=>[...L[13]||(L[13]=[k(" question_mark ",-1)])]),_:1},8,["size"])):pe("",!0)])):pe("",!0),e.printer&&!J(o).gridEditMode?($(),ve("div",FJ,[p(ot,{top:""},{activator:v(({props:_e})=>[p(ne,me({color:"darkgray",elevation:"0",small:"",style:{"border-radius":"7px"}},_e,{onClick:L[1]||(L[1]=Et(De=>O(),["prevent","stop"]))}),{default:v(()=>[p(Z,{dark:""},{default:v(()=>[...L[14]||(L[14]=[k("menu",-1)])]),_:1})]),_:1},16)]),default:v(()=>[...L[15]||(L[15]=[k("Open printer details",-1)])]),_:1})])):pe("",!0),e.printer&&!J(o).gridEditMode?($(),ve("div",{key:4,style:Be([{position:d.value?"inherit":"absolute",top:d.value?"inherit":"30px"},{overflow:"clip"}]),class:"printer-controls"},[C("small",NJ,se(E.value??" "),1)],4)):pe("",!0),e.printer&&!J(o).gridEditMode?($(),ve("div",BJ,[p(ot,{top:""},{activator:v(({props:_e})=>[p(ne,me({disabled:!g.value||!m.value,size:d.value?"small":"x-small",color:"darkgray",elevation:"0",style:{"border-radius":"7px"}},_e,{onClick:L[2]||(L[2]=Et(De=>D(),["prevent","stop"]))}),{default:v(()=>[p(Z,null,{default:v(()=>[...L[16]||(L[16]=[k("open_with",-1)])]),_:1})]),_:1},16,["disabled","size"])]),default:v(()=>[...L[17]||(L[17]=[k("Move and home printer",-1)])]),_:1}),p(ot,{top:""},{activator:v(({props:_e})=>[!m.value&&g.value?($(),te(ne,me({key:0,size:d.value?"small":"x-small",color:"darkgray",elevation:"0",style:{"border-radius":"7px"}},_e,{onClick:L[3]||(L[3]=Et(De=>U(),["prevent","stop"]))}),{default:v(()=>[p(Z,null,{default:v(()=>[...L[18]||(L[18]=[k("usb",-1)])]),_:1})]),_:1},16,["size"])):pe("",!0)]),default:v(()=>[...L[19]||(L[19]=[k("Connect USB (only for OctoPrint)",-1)])]),_:1}),p(ot,{top:""},{activator:v(({props:_e})=>[p(ne,me({size:d.value?"small":"x-small",color:"darkgray",elevation:"0",style:{"border-radius":"7px"}},_e,{onClick:L[4]||(L[4]=Et(De=>H(),["prevent","stop"]))}),{default:v(()=>[p(Z,null,{default:v(()=>[...L[20]||(L[20]=[k("refresh",-1)])]),_:1})]),_:1},16,["size"])]),default:v(()=>[...L[21]||(L[21]=[k("Reload printer websocket and refresh all states ",-1)])]),_:1}),p(ot,{top:""},{activator:v(({props:_e})=>[p(ne,me({disabled:!g.value||!w.value&&!y.value,size:d.value?"small":"x-small",color:"darkgray",elevation:"0",style:{"border-radius":"7px"}},_e,{onClick:L[5]||(L[5]=Et(De=>w.value?I():R(),["prevent","stop"]))}),{default:v(()=>[w.value?pe("",!0):($(),te(Z,{key:0},{default:v(()=>[...L[22]||(L[22]=[k("pause",-1)])]),_:1})),w.value?($(),te(Z,{key:1},{default:v(()=>[...L[23]||(L[23]=[k("play_arrow",-1)])]),_:1})):pe("",!0)]),_:1},16,["disabled","size"])]),default:v(()=>[k(se(w.value?"Resume print":"Pause print"),1)]),_:1}),p(ot,{top:""},{activator:v(({props:_e})=>[p(ne,me({disabled:!g.value||_.value&&!y.value&&!w.value,size:d.value?"small":"x-small",color:"darkgray",elevation:"0",style:{"border-radius":"7px"}},_e,{onClick:L[6]||(L[6]=Et(De=>_.value?T():W(),["prevent","stop"]))}),{default:v(()=>[p(Z,null,{default:v(()=>[k(se(_.value?"stop":"dangerous"),1)]),_:1})]),_:1},16,["disabled","size"])]),default:v(()=>[k(se(_.value?"Cancel current print gracefully":"Perform quick stop of printer"),1)]),_:1}),p(ot,{top:""},{activator:v(({props:_e})=>[p(ne,me({size:d.value?"small":"x-small",color:"darkgray",elevation:"0",style:{"border-radius":"7px"}},_e,{onClick:L[7]||(L[7]=Et(De=>N(),["prevent","stop"]))}),{default:v(()=>[p(Z,null,{default:v(()=>[...L[24]||(L[24]=[k("settings",-1)])]),_:1})]),_:1},16,["size"])]),default:v(()=>[...L[25]||(L[25]=[k("Open printer settings",-1)])]),_:1})])):pe("",!0),e.printer&&!J(o).gridEditMode?($(),te(uu,{key:6,value:(G=(ee=A.value)==null?void 0:ee.progress)==null?void 0:G.completion,"background-color":"dark-gray",class:"progress-bar",height:"14"},{default:v(({value:_e})=>{var De;return[C("strong",null,se((_e==null?void 0:_e.toFixed(1))+"%"),1),p(ot,{disabled:(De=e.printer)==null?void 0:De.enabled,"close-delay":"100",color:"danger","open-delay":"0",top:""},{activator:v(({props:B})=>{var z,q,ce;return[C("span",me({class:"xsmall-resized-font text--secondary ml-sm-2"},B),[(z=e.printer)!=null&&z.disabledReason?($(),ve("span",VJ,[L[27]||(L[27]=C("small",null," MAINTENANCE",-1)),p(Z,{class:"d-none d-xl-inline",color:"primary",small:""},{default:v(()=>[...L[26]||(L[26]=[k("info",-1)])]),_:1})])):($(),ve("span",UJ,[C("small",{style:Be({"background-color":P.value+"99","border-left":"5px solid "+P.value+"ff",padding:"5px"})},se((ce=(q=S.value)==null?void 0:q.text)==null?void 0:ce.toUpperCase()),5)]))],16)]}),default:v(()=>{var B;return[C("span",null,se(((B=e.printer)==null?void 0:B.disabledReason)??"Printer disabled"),1)]}),_:1},8,["disabled"])]}),_:1},8,["value"])):pe("",!0)]}),_:1},8,["class"])),[[j,{printers:[e.printer]}]])])),[[F,{x:e.x,y:e.y,printerSet:e.printer}]])}}}),vD="FDM-Monster-Client-Vue2";var yD=(e=>(e.PRINTER_PLACE="PRINTER_PLACE",e))(yD||{});function HJ(e){var t,n;return!((t=e==null?void 0:e.appId)!=null&&t.length)||!((n=e==null?void 0:e.intent)!=null&&n.length)?!1:e.appId===vD&&e.intent==="PRINTER_PLACE"}const jJ=he({color:String,density:String,...Ge()},"VBannerActions"),WJ=xe()({name:"VBannerActions",props:jJ(),setup(e,t){let{slots:n}=t;return Br({VBtn:{color:e.color,density:e.density,slim:!0,variant:"text"}}),Me(()=>{var r;return C("div",{class:Re(["v-banner-actions",e.class]),style:Be(e.style)},[(r=n.default)==null?void 0:r.call(n)])}),{}}}),qJ=Au("v-banner-text"),GJ=he({avatar:String,bgColor:String,color:String,icon:He,lines:String,stacked:Boolean,sticky:Boolean,text:String,..._s(),...Ge(),...Xn(),...Sr(),...ll({mobile:null}),...xs(),...Xo(),...Du(),...Un(),...pt(),...Nt()},"VBanner"),bD=xe()({name:"VBanner",props:GJ(),setup(e,t){let{slots:n}=t;const{backgroundColorClasses:r,backgroundColorStyles:s}=vr(()=>e.bgColor),{borderClasses:i}=Vs(e),{densityClasses:o}=ks(e),{displayClasses:a,mobile:l}=vi(e),{dimensionStyles:u}=_r(e),{elevationClasses:c}=Us(e),{locationStyles:d}=al(e),{positionClasses:f}=Lu(e),{roundedClasses:h}=Qn(e),{themeClasses:g}=tn(e),m=ie(()=>e.color),y=ie(()=>e.density);Br({VBannerActions:{color:m,density:y}}),Me(()=>{const w=!!(e.text||n.text),b=!!(e.avatar||e.icon),x=!!(b||n.prepend);return p(e.tag,{class:Re(["v-banner",{"v-banner--stacked":e.stacked||l.value,"v-banner--sticky":e.sticky,[`v-banner--${e.lines}-line`]:!!e.lines},g.value,r.value,i.value,o.value,a.value,c.value,f.value,h.value,e.class]),style:Be([s.value,u.value,d.value,e.style]),role:"banner"},{default:()=>{var _;return[x&&C("div",{key:"prepend",class:"v-banner__prepend"},[n.prepend?p($t,{key:"prepend-defaults",disabled:!b,defaults:{VAvatar:{color:m.value,density:y.value,icon:e.icon,image:e.avatar}}},n.prepend):p(dt,{key:"prepend-avatar",color:m.value,density:y.value,icon:e.icon,image:e.avatar},null)]),C("div",{class:"v-banner__content"},[w&&p(qJ,{key:"text"},{default:()=>{var S;return[((S=n.text)==null?void 0:S.call(n))??e.text]}}),(_=n.default)==null?void 0:_.call(n)]),n.actions&&p(WJ,{key:"actions"},n.actions)]}})})}}),KJ={class:"printer-grid-container"},YJ={key:0,class:"d-flex flex-row justify-start",style:{gap:"10px",width:"100%"}},XJ={key:0,class:"d-flex flex-column justify-start",style:{gap:"10px","margin-top":"10px"}},QJ=Fe({__name:"PrinterGrid",props:{gap:{type:String,default:"4px"}},setup(e){const t=Xt(),n=io(),r=js(),s=Gm();yt(async()=>{await t.loadPrinters(),await n.loadFloors()});const i=e,o=M(()=>n.gridSortedPrinters),a=M(()=>r.gridCols),l=M(()=>r.gridRows),u=M(()=>r.largeTiles),c=M(()=>l.value*a.value),d=M(()=>({display:"grid",gridTemplateColumns:`repeat(${a.value}, 1fr)`,gap:i.gap})),f=_=>_%a.value,h=_=>Math.floor(_/a.value);function g(_,S){S.dataTransfer&&_.id&&S.dataTransfer.setData("text",JSON.stringify({appId:vD,intent:yD.PRINTER_PLACE,printerId:_.id}))}function m(_,S){var E;const P=_,A=S;if(!(!((E=o.value)!=null&&E.length)||!o.value[P]))return o.value[P][A]}async function y(){!s.gridEditMode||!r.frontendSettings||r.frontendSettings.gridRows>=16||(r.frontendSettings.gridRows++,await r.saveFrontendSettings())}async function w(){!s.gridEditMode||!r.frontendSettings||r.frontendSettings.gridCols>=12||(r.frontendSettings.gridCols++,await r.saveFrontendSettings())}async function b(){!s.gridEditMode||!r.frontendSettings||r.frontendSettings.gridRows!=1&&(r.frontendSettings.gridRows--,await r.saveFrontendSettings())}async function x(){!s.gridEditMode||!r.frontendSettings||r.frontendSettings.gridCols!=1&&(r.frontendSettings.gridCols--,await r.saveFrontendSettings())}return(_,S)=>($(),ve("div",null,[J(s).gridEditMode?($(),te(bD,{key:0},{default:v(()=>[p(st,{style:{"margin-bottom":"-5px"}},{default:v(()=>[p(We,null,{default:v(()=>[C("span",null," Drag "+se(J(n).floorlessPrinters.length)+" unplaced printer(s) from here to place it on the grid. ",1),p(Tp,null,{default:v(()=>[($(!0),ve(Oe,null,Qt(J(n).floorlessPrinters,P=>($(),te(In,{key:P.id,draggable:"",size:"small",style:{cursor:"move"},onDragstart:A=>g(P,A)},{default:v(()=>[k(se(P.name),1)]),_:2},1032,["onDragstart"]))),128))]),_:1})]),_:1}),p(We,null,{default:v(()=>[C("div",null,[S[6]||(S[6]=k(" Clear printers by clicking on ",-1)),C("strong",null,[p(Z,null,{default:v(()=>[...S[4]||(S[4]=[k("disabled_visible",-1)])]),_:1}),S[5]||(S[5]=k(" Click to clear ",-1))])])]),_:1})]),_:1})]),_:1})):pe("",!0),C("div",KJ,[C("div",{class:"printer-grid",style:Be(d.value)},[($(!0),ve(Oe,null,Qt(c.value,P=>($(),ve("div",{key:`printer-${f(P-1)}-${h(P-1)}`,class:Re(["printer-cell",{"printer-cell-large":u.value}])},[p(zJ,{printer:m(f(P-1),h(P-1)),x:f(P-1),y:h(P-1)},null,8,["printer","x","y"])],2))),128)),J(s).gridEditMode?($(),ve("div",YJ,[S[9]||(S[9]=k(" Columns ",-1)),p(ne,{"x-small":"",rounded:"",disabled:J(r).gridCols<=1,onClick:S[0]||(S[0]=P=>x())},{default:v(()=>[p(Z,null,{default:v(()=>[...S[7]||(S[7]=[k("remove",-1)])]),_:1})]),_:1},8,["disabled"]),p(ne,{"x-small":"",rounded:"",disabled:J(r).gridCols>=12,onClick:S[1]||(S[1]=P=>w())},{default:v(()=>[p(Z,null,{default:v(()=>[...S[8]||(S[8]=[k("add",-1)])]),_:1})]),_:1},8,["disabled"])])):pe("",!0)],4),J(s).gridEditMode?($(),ve("div",XJ,[S[12]||(S[12]=k(" Rows ",-1)),p(ne,{"x-small":"",rounded:"",disabled:J(r).gridRows<=1,onClick:S[2]||(S[2]=P=>b())},{default:v(()=>[p(Z,null,{default:v(()=>[...S[10]||(S[10]=[k("remove",-1)])]),_:1})]),_:1},8,["disabled"]),p(ne,{"x-small":"",rounded:"",disabled:J(r).gridRows>=16,onClick:S[3]||(S[3]=P=>y())},{default:v(()=>[p(Z,null,{default:v(()=>[...S[11]||(S[11]=[k("add",-1)])]),_:1})]),_:1},8,["disabled"])])):pe("",!0)]),S[13]||(S[13]=C("img",{alt:"FDM Monster Background",class:"grid-bg-img align-content-center",src:z0,style:{opacity:"0.08","pointer-events":"none"}},null,-1))]))}}),JJ=fl(QJ,[["__scopeId","data-v-0a20edf3"]]);function ZJ(e,t,n=!0){return e?t.map(r=>({file:r,printer:e,startPrint:n})):[]}function wD(e,t,n=!0){return!(e!=null&&e.length)||!t?[]:e.map(r=>({file:t,printer:r,startPrint:n}))}const eZ=he({indeterminate:Boolean,inset:Boolean,flat:Boolean,loading:{type:[Boolean,String],default:!1},...dl(),...Bm()},"VSwitch"),Fp=xe()({name:"VSwitch",inheritAttrs:!1,props:eZ(),emits:{"update:focused":e=>!0,"update:modelValue":e=>!0,"update:indeterminate":e=>!0},setup(e,t){let{attrs:n,slots:r}=t;const s=lt(e,"indeterminate"),i=lt(e,"modelValue"),{loaderClasses:o}=Wd(e),{isFocused:a,focus:l,blur:u}=Xu(e),c=K(),d=K(),f=s1&&window.matchMedia("(forced-colors: active)").matches,h=ie(()=>typeof e.loading=="string"&&e.loading!==""?e.loading:e.color),g=Vr(),m=ie(()=>e.id||`switch-${g}`);function y(){s.value&&(s.value=!1)}function w(b){var x,_;b.stopPropagation(),b.preventDefault(),(_=(x=c.value)==null?void 0:x.input)==null||_.click()}return Me(()=>{const[b,x]=il(n),_=ys.filterProps(e),S=el.filterProps(e);return p(ys,me({ref:d,class:["v-switch",{"v-switch--flat":e.flat},{"v-switch--inset":e.inset},{"v-switch--indeterminate":s.value},o.value,e.class]},b,_,{modelValue:i.value,"onUpdate:modelValue":P=>i.value=P,id:m.value,focused:a.value,style:e.style}),{...r,default:P=>{let{id:A,messagesId:E,isDisabled:T,isReadonly:R,isValid:I}=P;const O={model:i,isValid:I};return p(el,me({ref:c},S,{modelValue:i.value,"onUpdate:modelValue":[H=>i.value=H,y],id:A.value,"aria-describedby":E.value,type:"checkbox","aria-checked":s.value?"mixed":void 0,disabled:T.value,readonly:R.value,onFocus:l,onBlur:u},x),{...r,default:H=>{let{backgroundColorClasses:N,backgroundColorStyles:D}=H;return C("div",{class:Re(["v-switch__track",f?void 0:N.value]),style:Be(D.value),onClick:w},[r["track-true"]&&C("div",{key:"prepend",class:"v-switch__track-true"},[r["track-true"](O)]),r["track-false"]&&C("div",{key:"append",class:"v-switch__track-false"},[r["track-false"](O)])])},input:H=>{let{inputNode:N,icon:D,backgroundColorClasses:W,backgroundColorStyles:U}=H;return C(Oe,null,[N,C("div",{class:Re(["v-switch__thumb",{"v-switch__thumb--filled":D||e.loading},e.inset||f?void 0:W.value]),style:Be(e.inset?void 0:U.value)},[r.thumb?p($t,{defaults:{VIcon:{icon:D,size:"x-small"}}},{default:()=>[r.thumb({...O,icon:D})]}):p(oB,null,{default:()=>[e.loading?p(fm,{name:"v-switch",active:!0,color:I.value===!1?void 0:h.value},{default:Q=>r.loader?r.loader(Q):p(ai,{active:Q.isActive,color:Q.color,indeterminate:!0,size:"16",width:"2"},null)}):D&&p(Z,{key:String(D),icon:D,size:"x-small"},null)]})])])}})}})}),Es({},d)}}),tZ={class:"d-flex flex-wrap gap-2"},nZ={class:"pr-2"},rZ={class:"pr-2"},sZ={class:"pr-2"},iZ={class:"pr-2"},oZ={class:"pr-2"},aZ={class:"ma-4 pt-6"},lZ=Fe({__name:"HomeToolbar",setup(e){const t=Xt(),n=lr(),r=io(),s=Gm(),i=M(()=>r.selectedFloorIndex),o=M(()=>r.floors);function a(l){r.changeSelectedFloorByIndex(l)}return(l,u)=>($(),te(wr,{flat:""},{default:v(()=>{var c;return[p(FP,{"model-value":i.value,class:"ml-7",mandatory:"",rounded:"","onUpdate:modelValue":a},{default:v(()=>[($(!0),ve(Oe,null,Qt(o.value,d=>($(),te(ne,{key:d.id,size:"small"},{default:v(()=>[p(Z,null,{default:v(()=>[...u[2]||(u[2]=[k("layers",-1)])]),_:1}),k(" "+se(d.name),1)]),_:2},1024))),128))]),_:1},8,["model-value"]),(c=J(t).printers)!=null&&c.length?pe("",!0):($(),te(ne,{key:0,class:"mt-0 ml-6",color:"primary",to:"/printers"},{default:v(()=>[...u[3]||(u[3]=[k(" You have no printers. Click here to start! ",-1)])]),_:1})),J(r).floorlessPrinters.length?($(),te(vn,{key:1,class:"ml-4"},{default:v(()=>[p(Z,null,{default:v(()=>[...u[4]||(u[4]=[k("warning",-1)])]),_:1}),k(" "+se(J(r).floorlessPrinters.length)+" unplaced printer(s)! ",1)]),_:1})):pe("",!0),p(Tn),C("span",tZ,[C("span",nZ,[p(Z,null,{default:v(()=>[...u[5]||(u[5]=[k("print",-1)])]),_:1}),k(" "+se(J(n).printingCount),1)]),C("span",rZ,[p(Z,null,{default:v(()=>[...u[6]||(u[6]=[k("ac_unit",-1)])]),_:1}),k(" "+se(J(n).operationalNotPrintingCount),1)]),C("span",sZ,[p(Z,null,{default:v(()=>[...u[7]||(u[7]=[k("handyman",-1)])]),_:1}),k(" "+se(J(t).maintenanceCount),1)]),C("span",iZ,[p(Z,null,{default:v(()=>[...u[8]||(u[8]=[k("usb_off",-1)])]),_:1}),k(" "+se(J(t).disconnectedCount),1)]),C("span",oZ,[p(Z,null,{default:v(()=>[...u[9]||(u[9]=[k("print_disabled",-1)])]),_:1}),k(" "+se(J(t).disabledCount),1)])]),p(ne,{elevation:"2",small:"",class:"ml-6",icon:"",onClick:u[0]||(u[0]=d=>J(rn)(J(sn).GridSettingsDialog).openDialog())},{default:v(()=>[p(Z,null,{default:v(()=>[...u[10]||(u[10]=[k("settings",-1)])]),_:1})]),_:1}),C("div",aZ,[p(Fp,{modelValue:J(s).gridEditMode,"onUpdate:modelValue":u[1]||(u[1]=d=>J(s).gridEditMode=d),label:"Grid Edit Mode"},null,8,["modelValue"])])]}),_:1}))}}),uZ={class:"pl-1"},cZ=Fe({__name:"PrinterGridView",setup(e){const t=Gm(),n=Xt(),r=lr(),s=U0(),i=Ft(),o=K(void 0),a=M(()=>n.selectedPrinters.length>0),l=M(()=>n.selectedPrinters),u=K(null),c=()=>{u.value&&(u.value.value="",o.value=void 0)},d=()=>{n.clearSelectedPrinters()},f=async()=>{var b;const w=await rn(sn.BatchReprintDialog).handleAsync((b=n.selectedPrinters)==null?void 0:b.map(x=>x.id));console.log("[PrinterGridView] Dialog completed",w)},h=w=>{const b=l.value,x=b.filter(P=>r.isApiResponding(P.id));if(!o.value)return;const _=b.length-x.length;_>0&&i.openInfoMessage({title:`${_} printers inaccessible`,subtitle:"These were skipped from uploading."});const S=wD(x,o.value,w);s.queueUploads(S),u.value&&(u.value.value=""),d()},g=()=>{u.value&&u.value.files?o.value=u.value.files[0]:o.value=void 0},m=w=>{n.toggleSelectedPrinter(w)},y=w=>{en.openPrinterURL(w.printerURL)};return(w,b)=>{const x=Zc("drop-upload");return $(),ve("div",null,[p(lZ),J(t).gridEditMode?pe("",!0):zt(($(),te(bD,{key:0},{default:v(()=>[p(st,{style:{"margin-bottom":"-5px"}},{default:v(()=>[p(We,{style:{padding:"5px 0 0 15px"}},{default:v(()=>[p(Tp,{class:"d-inline-block"},{default:v(()=>[l.value.length===0?($(),te(In,{key:0,size:"small"},{default:v(()=>[...b[7]||(b[7]=[k(" No selected printers ",-1)])]),_:1})):pe("",!0),($(!0),ve(Oe,null,Qt(l.value,_=>($(),te(In,{key:_.id,closable:"",color:"primary",size:"small",onClick:S=>y(_),"onClick:close":S=>m(_)},{default:v(()=>[k(se(_.name),1)]),_:2},1032,["onClick","onClick:close"]))),128))]),_:1})]),_:1}),p(We,{align:"right",style:{padding:"0"}},{default:v(()=>[o.value?($(),te(Tp,{key:0,class:"float-end"},{default:v(()=>[p(In,{closable:"","onClick:close":b[0]||(b[0]=_=>c())},{default:v(()=>[k(se(o.value.name)+" ",1),C("strong",uZ,se(J(HO)(o.value.size)),1)]),_:1})]),_:1})):pe("",!0),b[14]||(b[14]=C("br",null,null,-1)),p(ne,{disabled:!a.value,color:"primary",size:"x-small",onClick:b[1]||(b[1]=_=>f())},{default:v(()=>[p(Z,{class:"pr-2",size:"small"},{default:v(()=>[...b[8]||(b[8]=[k(" refresh ",-1)])]),_:1}),b[9]||(b[9]=k(" Batch reprint ",-1))]),_:1},8,["disabled"]),p(ne,{color:a.value?"primary":"secondary",class:"ml-2",size:"x-small",onClick:b[2]||(b[2]=_=>d())},{default:v(()=>[p(Z,{class:"pr-2",size:"small"},{default:v(()=>[...b[10]||(b[10]=[k(" delete ",-1)])]),_:1}),k(" Clear all ("+se(l.value.length)+") ",1)]),_:1},8,["color"]),p(ne,{class:"ml-2",color:"primary",size:"x-small",onClick:b[3]||(b[3]=_=>{var S;return(S=u.value)==null?void 0:S.click()})},{default:v(()=>[...b[11]||(b[11]=[k(" Select gcode file ",-1)])]),_:1}),p(ne,{disabled:!o.value,class:"ml-2 mr-5",color:"green",size:"x-small",onClick:b[4]||(b[4]=_=>h(!1))},{default:v(()=>[...b[12]||(b[12]=[k(" Upload only ",-1)])]),_:1},8,["disabled"]),p(ne,{disabled:!o.value,class:"ml-2 mr-5",color:"green",size:"x-small",onClick:b[5]||(b[5]=_=>h(!0))},{default:v(()=>[...b[13]||(b[13]=[k(" Upload and print ",-1)])]),_:1},8,["disabled"]),C("input",{ref_key:"fileUpload",ref:u,multiple:!1,accept:".gcode",style:{display:"none"},type:"file",onChange:b[6]||(b[6]=_=>g())},null,544)]),_:1})]),_:1})]),_:1})),[[x,{printers:l.value}]]),p(JJ,{class:"ma-2"})])}}}),dZ=Fe({name:"RefreshFilesAction",components:{},props:{printer:Object},setup:()=>({printersStore:Xt()}),methods:{async getFiles(){this.printer&&await this.printersStore.loadPrinterFiles(this.printer.id)}}});function fZ(e,t,n,r,s,i){return $(),te(ne,{color:"secondary",onClick:t[0]||(t[0]=o=>e.getFiles())},{default:v(()=>[p(Z,null,{default:v(()=>[...t[1]||(t[1]=[k("refresh",-1)])]),_:1}),t[2]||(t[2]=C("span",{class:"d-none d-lg-inline"}," Refresh files ",-1))]),_:1})}const SD=fl(dZ,[["render",fZ]]),hZ=Fe({name:"PrinterDetails",components:{RefreshFilesAction:SD},props:{printer:Object},setup:()=>({printersStore:Xt(),printerStateStore:lr()}),data:()=>({dragging:!1}),computed:{printerId(){var e;return(e=this.printer)==null?void 0:e.id},socketState(){var e;if(this.printerId)return(e=this.printerStateStore.socketStatesById[this.printerId])==null?void 0:e.socket},apiState(){var e;if(this.printerId)return(e=this.printerStateStore.socketStatesById[this.printerId])==null?void 0:e.api},printerTextState(){var e,t,n;if(this.printerId)return(n=(t=(e=this.printerStateStore.printerEventsById[this.printerId])==null?void 0:e.current)==null?void 0:t.payload)==null?void 0:n.state.text}}});function pZ(e,t,n,r,s,i){const o=SD,a=Zc("drop-upload");return e.printer?zt(($(),te(Yn,{key:0,style:Be(e.dragging?"background-color:red":""),transition:"scale-transition"},{default:v(()=>[p(st,null,{default:v(()=>[p(We,null,{default:v(()=>[k(" Name: "+se(e.printer.name)+" ",1),t[0]||(t[0]=C("br",null,null,-1)),k(" URL: "+se(e.printer.printerURL)+" ",1),t[1]||(t[1]=C("br",null,null,-1)),t[2]||(t[2]=k(" Host: ",-1)),p(In,{size:"small"},{default:v(()=>[k(se(e.apiState),1)]),_:1}),t[3]||(t[3]=C("br",null,null,-1)),t[4]||(t[4]=k(" WebSocket: ",-1)),p(In,{size:"small"},{default:v(()=>[k(se(e.socketState),1)]),_:1}),t[5]||(t[5]=C("br",null,null,-1)),t[6]||(t[6]=k(" Printer: ",-1)),p(In,{size:"small"},{default:v(()=>[k(se(e.printerTextState),1)]),_:1})]),_:1}),p(We,null,{default:v(()=>[p(o,{printer:e.printer,class:"d-flex justify-end"},null,8,["printer"])]),_:1})]),_:1})]),_:1},8,["style"])),[[a,{printers:[e.printer]}]]):pe("",!0)}const mZ=fl(hZ,[["render",pZ]]),gZ=Fe({__name:"PrinterUrlAction",props:{printer:{}},setup(e){const t=e;async function n(){en.openPrinterURL(t.printer.printerURL)}return(r,s)=>($(),te(ot,{location:"top"},{activator:v(({props:i})=>[p(ne,me(i,{color:"secondary",rounded:"",size:"small",onClickCapture:s[0]||(s[0]=Et(o=>n(),["stop"]))}),{default:v(()=>[p(Z,null,{default:v(()=>[...s[1]||(s[1]=[k("directions",-1)])]),_:1})]),_:1},16)]),default:v(()=>[...s[2]||(s[2]=[k("Visit printer service",-1)])]),_:1}))}}),vZ=Fe({name:"PrinterSettingsAction",props:{printer:Object},computed:{printerId(){return this.printer.id}},methods:{openSettings(){this.$emit("update:show",this.printer.id)}}});function yZ(e,t,n,r,s,i){return $(),te(ot,{location:"top"},{activator:v(({props:o})=>[p(ne,me(o,{color:"secondary",class:"ma-2",size:"small",rounded:"",onClickCapture:t[0]||(t[0]=Et(a=>e.openSettings(),["stop"]))}),{default:v(()=>[p(Z,null,{default:v(()=>[...t[1]||(t[1]=[k("settings",-1)])]),_:1})]),_:1},16)]),default:v(()=>[...t[2]||(t[2]=[k("Update printer settings",-1)])]),_:1})}const bZ=fl(vZ,[["render",yZ]]),wZ=he({bordered:Boolean,color:String,content:[Number,String],dot:Boolean,floating:Boolean,icon:He,inline:Boolean,label:{type:String,default:"$vuetify.badge"},max:[Number,String],modelValue:{type:Boolean,default:!0},offsetX:[Number,String],offsetY:[Number,String],textColor:String,...Ge(),...Xo({location:"top end"}),...Un(),...pt(),...Nt(),...Fu({transition:"scale-rotate-transition"}),...Sr()},"VBadge"),_D=xe()({name:"VBadge",inheritAttrs:!1,props:wZ(),setup(e,t){const{backgroundColorClasses:n,backgroundColorStyles:r}=vr(()=>e.color),{roundedClasses:s}=Qn(e),{t:i}=zr(),{textColorClasses:o,textColorStyles:a}=Fs(()=>e.textColor),{themeClasses:l}=MP(),{locationStyles:u}=al(e,!0,d=>(e.floating?e.dot?2:4:e.dot?8:12)+(["top","bottom"].includes(d)?Number(e.offsetY??0):["left","right"].includes(d)?Number(e.offsetX??0):0)),{dimensionStyles:c}=_r(e);return Me(()=>{const d=Number(e.content),f=!e.max||isNaN(d)?e.content:d<=Number(e.max)?d:`${e.max}+`,[h,g]=Qv(t.attrs,["aria-atomic","aria-label","aria-live","role","title"]);return p(e.tag,me({class:["v-badge",{"v-badge--bordered":e.bordered,"v-badge--dot":e.dot,"v-badge--floating":e.floating,"v-badge--inline":e.inline},e.class]},g,{style:e.style}),{default:()=>{var m,y;return[C("div",{class:"v-badge__wrapper"},[(y=(m=t.slots).default)==null?void 0:y.call(m),p(ui,{transition:e.transition},{default:()=>{var w,b;return[zt(C("span",me({class:["v-badge__badge",l.value,n.value,s.value,o.value],style:[r.value,a.value,c.value,e.inline?{}:u.value],"aria-atomic":"true","aria-label":i(e.label,d),"aria-live":"polite",role:"status"},h),[e.dot?void 0:t.slots.badge?(b=(w=t.slots).badge)==null?void 0:b.call(w):e.icon?p(Z,{icon:e.icon},null):f]),[[ro,e.modelValue]])]}})])]}})}),{}}}),SZ=Fe({__name:"PrinterConnectionAction",props:{printer:{}},setup(e){const t=e,n=lr();function r(){return t.printer.id?n.isPrinterOperational(t.printer.id):!1}function s(){return t.printer.id?n.isPrinterPrinting(t.printer.id):!1}async function i(){if(r())return en.sendPrinterDisconnectCommand(t.printer.id);await en.sendPrinterConnectCommand(t.printer.id)}return(o,a)=>($(),te(ot,{location:"top"},{activator:v(({props:l})=>[e.printer.enabled?($(),te(_D,{key:0,color:r()?"green":"red",class:"pa-2"},{badge:v(()=>[r()?($(),te(Z,{key:0},{default:v(()=>[...a[0]||(a[0]=[k("check",-1)])]),_:1})):($(),te(Z,{key:1},{default:v(()=>[...a[1]||(a[1]=[k("close",-1)])]),_:1}))]),default:v(()=>[p(ne,me({disabled:s()},l,{color:"secondary",rounded:"",size:"small",onClick:Et(i,["stop"])}),{default:v(()=>[p(Z,null,{default:v(()=>[...a[2]||(a[2]=[k("usb",-1)])]),_:1})]),_:1},16,["disabled"])]),_:2},1032,["color"])):pe("",!0)]),default:v(()=>[...a[3]||(a[3]=[k("Connect USB (OctoPrint only)",-1)])]),_:1}))}}),_Z=Fe({__name:"PrinterQuickStopAction",props:{printer:{}},setup(e){const t=e;async function n(){confirm("Are you sure to quick stop this printer?")&&await gD.postQuickStopM112Command(t.printer.id)}return(r,s)=>($(),te(ot,{location:"top"},{activator:v(({props:i})=>[e.printer.enabled?($(),te(_D,{key:0,class:"ma-2"},{badge:v(()=>[p(Z,null,{default:v(()=>[...s[0]||(s[0]=[k("bolt",-1)])]),_:1})]),default:v(()=>[p(ne,me(i,{color:"secondary",size:"small",rounded:"",onClick:Et(n,["stop"])}),{default:v(()=>[p(Z,null,{default:v(()=>[...s[1]||(s[1]=[k("dangerous",-1)])]),_:1})]),_:1},16)]),_:2},1024)):pe("",!0)]),default:v(()=>[...s[2]||(s[2]=[k("Perform quick stop of printer",-1)])]),_:1}))}});class kD extends kr{static async getSettings(t){const n=`${$e.getPrinterSettingsRoute(t)}`;return await this.get(n)}static async setGCodeAnalysis(t,n=!1){const r=`${$e.setPrinterSettingsGCodeAnalysisRoute(t)}`;return await this.post(r,{enabled:n})}static async syncPrinterName(t){const n=`${$e.syncPrinterNameSettingRoute(t)}`;return await this.post(n)}}const kZ=Fe({__name:"SyncPrinterNameAction",props:{printer:{}},setup(e){const t=e,n=Ft();async function r(){await kD.syncPrinterName(t.printer.id),n.openInfoMessage({title:"Synced printer name to OctoPrint"})}return(s,i)=>($(),te(ot,{location:"top"},{activator:v(({props:o})=>[p(ne,me(o,{color:"secondary",size:"small",rounded:"",onClickCapture:i[0]||(i[0]=Et(a=>r(),["stop"]))}),{default:v(()=>[p(Z,null,{default:v(()=>[...i[1]||(i[1]=[k("badge",-1)])]),_:1})]),_:1},16)]),default:v(()=>[...i[2]||(i[2]=[k(" Set OctoPrints name to the FDM Monster Name ",-1)])]),_:1}))}}),xZ=Fe({__name:"PrinterDeleteAction",props:{printer:{}},setup(e){const t=e,n=Xt(),r=lr();async function s(){confirm("Are you sure to delete this printer?")&&(await n.deletePrinter(t.printer.id),r.deletePrinterEvents(t.printer.id))}return(i,o)=>($(),te(ot,{location:"top"},{activator:v(({props:a})=>[p(ne,me(a,{class:"ms-4",color:"secondary",size:"small",rounded:"",onClick:Et(s,["prevent","stop"])}),{default:v(()=>[p(Z,null,{default:v(()=>[...o[0]||(o[0]=[k("delete",-1)])]),_:1})]),_:1},16)]),default:v(()=>[...o[1]||(o[1]=[k("Delete printer",-1)])]),_:1}))}});class wl extends kr{static async createGroup(t){const n=`${$e.createGroupRoute}`,r={name:t};return await this.post(n,r)}static async deleteGroup(t){const n=`${$e.deleteGroupRoute(t)}`;return await this.delete(n)}static async getGroupsWithPrinters(){const t=`${$e.printerGroupRoute}`;return await this.get(t)}static async addPrinterToGroup(t,n){const r=`${$e.addPrinterToGroupRoute(t)}`,s={printerId:n};return await this.post(r,s)}static async deletePrinterFromGroup(t,n){const r=`${$e.deletePrinterFromGroupRoute(t)}`,s={printerId:n};return await this.delete(r,s)}static async updateGroupName(t,n){const r=`${$e.updateGroupNameRoute(t)}`,s={name:n};return await this.patch(r,s)}}const EZ=(e,t,n)=>{if(e==null||t==null)return-1;if(!t.length)return 0;e=e.toString().toLocaleLowerCase(),t=t.toString().toLocaleLowerCase();const r=[];let s=e.indexOf(t);for(;~s;)r.push([s,s+t.length]),s=e.indexOf(t,s+t.length);return r.length?r:-1};function cv(e,t){if(!(e==null||typeof e=="boolean"||e===-1))return typeof e=="number"?[[e,e+t.length]]:Array.isArray(e[0])?e:[e]}const CZ=he({customFilter:Function,customKeyFilter:Object,filterKeys:[Array,String],filterMode:{type:String,default:"intersection"},noFilter:Boolean},"filter");function TZ(e,t,n){var l;const r=[],s=(n==null?void 0:n.default)??EZ,i=n!=null&&n.filterKeys?Fn(n.filterKeys):!1,o=Object.keys((n==null?void 0:n.customKeyFilter)??{}).length;if(!(e!=null&&e.length))return r;let a=null;e:for(let u=0;u<e.length;u++){const[c,d=c]=Fn(e[u]),f={},h={};let g=-1;if((t||o>0)&&!(n!=null&&n.noFilter)){let m=!1;if(typeof c=="object"){if(c.type==="divider"||c.type==="subheader"){(a==null?void 0:a.type)==="divider"&&c.type==="subheader"&&r.push(a),a={index:u,matches:{},type:c.type};continue}const b=i||Object.keys(d);m=b.length===o;for(const x of b){const _=Ln(d,x),S=(l=n==null?void 0:n.customKeyFilter)==null?void 0:l[x];if(g=S?S(_,t,c):s(_,t,c),g!==-1&&g!==!1)S?f[x]=cv(g,t):h[x]=cv(g,t);else if((n==null?void 0:n.filterMode)==="every")continue e}}else g=s(c,t,c),g!==-1&&g!==!1&&(h.title=cv(g,t));const y=Object.keys(h).length,w=Object.keys(f).length;if(!y&&!w||(n==null?void 0:n.filterMode)==="union"&&w!==o&&!y||(n==null?void 0:n.filterMode)==="intersection"&&(w!==o||!y&&o>0&&!m))continue}a&&(r.push(a),a=null),r.push({index:u,matches:{...h,...f}})}return r}function PZ(e,t,n,r){const s=Pe([]),i=Pe(new Map),o=M(()=>r!=null&&r.transform?J(t).map(l=>[l,r.transform(l)]):J(t));Cn(()=>{const l=typeof n=="function"?n():J(n),u=typeof l!="string"&&typeof l!="number"?"":String(l),c=TZ(o.value,u,{customKeyFilter:{...e.customKeyFilter,...J(r==null?void 0:r.customKeyFilter)},default:e.customFilter,filterKeys:e.filterKeys,filterMode:e.filterMode,noFilter:e.noFilter}),d=J(t),f=[],h=new Map;c.forEach(g=>{let{index:m,matches:y}=g;const w=d[m];f.push(w),h.set(w.value,y)}),s.value=f,i.value=h});function a(l){return i.value.get(l.value)}return{filteredItems:s,filteredMatches:i,getMatches:a}}const RZ=he({expandOnClick:Boolean,showExpand:Boolean,expanded:{type:Array,default:()=>[]}},"DataTable-expand"),xD=Symbol.for("vuetify:datatable:expanded");function IZ(e){const t=ie(()=>e.expandOnClick),n=lt(e,"expanded",e.expanded,a=>new Set(a),a=>[...a.values()]);function r(a,l){const u=new Set(n.value),c=Ue(a.value);if(l)u.add(c);else{const d=[...n.value].find(f=>Ue(f)===c);u.delete(d)}n.value=u}function s(a){const l=Ue(a.value);return[...n.value].some(u=>Ue(u)===l)}function i(a){r(a,!s(a))}const o={expand:r,expanded:n,expandOnClick:t,isExpanded:s,toggleExpand:i};return Jt(xD,o),o}function ED(){const e=Je(xD);if(!e)throw new Error("foo");return e}const AZ=he({groupBy:{type:Array,default:()=>[]}},"DataTable-group"),CD=Symbol.for("vuetify:data-table-group");function OZ(e){return{groupBy:lt(e,"groupBy")}}function MZ(e){const{disableSort:t,groupBy:n,sortBy:r}=e,s=K(new Set),i=M(()=>n.value.map(c=>({...c,order:c.order??!1})).concat(t!=null&&t.value?[]:r.value));function o(c){return s.value.has(c.id)}function a(c){const d=new Set(s.value);o(c)?d.delete(c.id):d.add(c.id),s.value=d}function l(c){function d(f){const h=[];for(const g of f.items)"type"in g&&g.type==="group"?h.push(...d(g)):h.push(g);return[...new Set(h)]}return d({type:"group",items:c,id:"dummy",key:"dummy",value:"dummy",depth:0})}const u={sortByWithGroups:i,toggleGroup:a,opened:s,groupBy:n,extractRows:l,isGroupOpen:o};return Jt(CD,u),u}function TD(){const e=Je(CD);if(!e)throw new Error("Missing group!");return e}function DZ(e,t){if(!e.length)return[];const n=new Map;for(const r of e){const s=Ya(r.raw,t);n.has(s)||n.set(s,[]),n.get(s).push(r)}return n}function PD(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"root";if(!t.length)return[];const s=DZ(e,t[0]),i=[],o=t.slice(1);return s.forEach((a,l)=>{const u=t[0],c=`${r}_${u}_${l}`;i.push({depth:n,id:c,key:u,value:l,items:o.length?PD(a,o,n+1,c):a,type:"group"})}),i}function RD(e,t,n){const r=[];for(const s of e)"type"in s&&s.type==="group"?(s.value!=null&&r.push(s),(t.has(s.id)||s.value==null)&&(r.push(...RD(s.items,t,n)),n&&r.push({...s,type:"group-summary"}))):r.push(s);return r}function LZ(e,t,n,r){return{flatItems:M(()=>{if(!t.value.length)return e.value;const i=PD(e.value,t.value.map(o=>o.key));return RD(i,n.value,un(r))})}}function $Z(e){let{page:t,itemsPerPage:n,sortBy:r,groupBy:s,search:i}=e;const o=fn("VDataTable"),a=()=>({page:t.value,itemsPerPage:n.value,sortBy:r.value,groupBy:s.value,search:i.value});let l=null;Ee(a,u=>{Dr(l,u)||(l&&l.search!==u.search&&(t.value=1),o.emit("update:options",u),l=u)},{deep:!0,immediate:!0})}const FZ=he({page:{type:[Number,String],default:1},itemsPerPage:{type:[Number,String],default:10}},"DataTable-paginate"),ID=Symbol.for("vuetify:data-table-pagination");function NZ(e){const t=lt(e,"page",void 0,r=>Number(r??1)),n=lt(e,"itemsPerPage",void 0,r=>Number(r??10));return{page:t,itemsPerPage:n}}function BZ(e){const{page:t,itemsPerPage:n,itemsLength:r}=e,s=M(()=>n.value===-1?0:n.value*(t.value-1)),i=M(()=>n.value===-1?r.value:Math.min(r.value,s.value+n.value)),o=M(()=>n.value===-1||r.value===0?1:Math.ceil(r.value/n.value));Ee([t,o],()=>{t.value>o.value&&(t.value=o.value)});function a(f){n.value=f,t.value=1}function l(){t.value=Nn(t.value+1,1,o.value)}function u(){t.value=Nn(t.value-1,1,o.value)}function c(f){t.value=Nn(f,1,o.value)}const d={page:t,itemsPerPage:n,startIndex:s,stopIndex:i,pageCount:o,itemsLength:r,nextPage:l,prevPage:u,setPage:c,setItemsPerPage:a};return Jt(ID,d),d}function VZ(){const e=Je(ID);if(!e)throw new Error("Missing pagination!");return e}function UZ(e){const t=fn("usePaginatedItems"),{items:n,startIndex:r,stopIndex:s,itemsPerPage:i}=e,o=M(()=>i.value<=0?n.value:n.value.slice(r.value,s.value));return Ee(o,a=>{t.emit("update:currentItems",a)},{immediate:!0}),{paginatedItems:o}}const zZ={showSelectAll:!1,allSelected:()=>[],select:e=>{var r;let{items:t,value:n}=e;return new Set(n?[(r=t[0])==null?void 0:r.value]:[])},selectAll:e=>{let{selected:t}=e;return t}},AD={showSelectAll:!0,allSelected:e=>{let{currentPage:t}=e;return t},select:e=>{let{items:t,value:n,selected:r}=e;for(const s of t)n?r.add(s.value):r.delete(s.value);return r},selectAll:e=>{let{value:t,currentPage:n,selected:r}=e;return AD.select({items:n,value:t,selected:r})}},OD={showSelectAll:!0,allSelected:e=>{let{allItems:t}=e;return t},select:e=>{let{items:t,value:n,selected:r}=e;for(const s of t)n?r.add(s.value):r.delete(s.value);return r},selectAll:e=>{let{value:t,allItems:n,selected:r}=e;return OD.select({items:n,value:t,selected:r})}},HZ=he({showSelect:Boolean,selectStrategy:{type:[String,Object],default:"page"},modelValue:{type:Array,default:()=>[]},valueComparator:{type:Function,default:Dr}},"DataTable-select"),MD=Symbol.for("vuetify:data-table-selection");function jZ(e,t){let{allItems:n,currentPage:r}=t;const s=lt(e,"modelValue",e.modelValue,b=>new Set(Fn(b).map(x=>{var _;return((_=n.value.find(S=>e.valueComparator(x,S.value)))==null?void 0:_.value)??x})),b=>[...b.values()]),i=M(()=>n.value.filter(b=>b.selectable)),o=M(()=>r.value.filter(b=>b.selectable)),a=M(()=>{if(typeof e.selectStrategy=="object")return e.selectStrategy;switch(e.selectStrategy){case"single":return zZ;case"all":return OD;case"page":default:return AD}}),l=Pe(null);function u(b){return Fn(b).every(x=>s.value.has(x.value))}function c(b){return Fn(b).some(x=>s.value.has(x.value))}function d(b,x){const _=a.value.select({items:b,value:x,selected:new Set(s.value)});s.value=_}function f(b,x,_){const S=[];if(x=x??r.value.findIndex(P=>P.value===b.value),e.selectStrategy!=="single"&&(_!=null&&_.shiftKey)&&l.value!==null){const[P,A]=[l.value,x].sort((E,T)=>E-T);S.push(...r.value.slice(P,A+1).filter(E=>E.selectable))}else S.push(b),l.value=x;d(S,!u([b]))}function h(b){const x=a.value.selectAll({value:b,allItems:i.value,currentPage:o.value,selected:new Set(s.value)});s.value=x}const g=M(()=>s.value.size>0),m=M(()=>{const b=a.value.allSelected({allItems:i.value,currentPage:o.value});return!!b.length&&u(b)}),y=ie(()=>a.value.showSelectAll),w={toggleSelect:f,select:d,selectAll:h,isSelected:u,isSomeSelected:c,someSelected:g,allSelected:m,showSelectAll:y,lastSelectedIndex:l,selectStrategy:a};return Jt(MD,w),w}function Km(){const e=Je(MD);if(!e)throw new Error("Missing selection!");return e}const WZ=he({sortBy:{type:Array,default:()=>[]},customKeySort:Object,multiSort:Boolean,mustSort:Boolean},"DataTable-sort"),DD=Symbol.for("vuetify:data-table-sort");function qZ(e){const t=lt(e,"sortBy"),n=ie(()=>e.mustSort),r=ie(()=>e.multiSort);return{sortBy:t,mustSort:n,multiSort:r}}function GZ(e){const{sortBy:t,mustSort:n,multiSort:r,page:s}=e,i=l=>{if(l.key==null)return;let u=t.value.map(d=>({...d}))??[];const c=u.find(d=>d.key===l.key);c?c.order==="desc"?n.value&&u.length===1?c.order="asc":u=u.filter(d=>d.key!==l.key):c.order="desc":r.value?u.push({key:l.key,order:"asc"}):u=[{key:l.key,order:"asc"}],t.value=u,s&&(s.value=1)};function o(l){return!!t.value.find(u=>u.key===l.key)}const a={sortBy:t,toggleSort:i,isSorted:o};return Jt(DD,a),a}function LD(){const e=Je(DD);if(!e)throw new Error("Missing sort!");return e}function KZ(e,t,n,r){const s=zr();return{sortedItems:M(()=>{var o,a;return n.value.length?YZ(t.value,n.value,s.current.value,{transform:r==null?void 0:r.transform,sortFunctions:{...e.customKeySort,...(o=r==null?void 0:r.sortFunctions)==null?void 0:o.value},sortRawFunctions:(a=r==null?void 0:r.sortRawFunctions)==null?void 0:a.value}):t.value})}}function YZ(e,t,n,r){const s=new Intl.Collator(n,{sensitivity:"accent",usage:"sort"});return e.map(o=>[o,r!=null&&r.transform?r.transform(o):o]).sort((o,a)=>{var l,u;for(let c=0;c<t.length;c++){let d=!1;const f=t[c].key,h=t[c].order??"asc";if(h===!1)continue;let g=Ya(o[1],f),m=Ya(a[1],f),y=o[0].raw,w=a[0].raw;if(h==="desc"&&([g,m]=[m,g],[y,w]=[w,y]),(l=r==null?void 0:r.sortRawFunctions)!=null&&l[f]){const b=r.sortRawFunctions[f](y,w);if(b==null)continue;if(d=!0,b)return b}if((u=r==null?void 0:r.sortFunctions)!=null&&u[f]){const b=r.sortFunctions[f](g,m);if(b==null)continue;if(d=!0,b)return b}if(!d&&(g instanceof Date&&m instanceof Date&&(g=g.getTime(),m=m.getTime()),[g,m]=[g,m].map(b=>b!=null?b.toString().toLocaleLowerCase():b),g!==m))return wf(g)&&wf(m)?0:wf(g)?-1:wf(m)?1:!isNaN(g)&&!isNaN(m)?Number(g)-Number(m):s.compare(g,m)}return 0}).map(o=>{let[a]=o;return a})}function XZ(){const e=K([]);RT(()=>e.value=[]);function t(n,r){e.value[r]=n}return{refs:e,updateRef:t}}const QZ=he({activeColor:String,start:{type:[Number,String],default:1},modelValue:{type:Number,default:e=>e.start},disabled:Boolean,length:{type:[Number,String],default:1,validator:e=>e%1===0},totalVisible:[Number,String],firstIcon:{type:He,default:"$first"},prevIcon:{type:He,default:"$prev"},nextIcon:{type:He,default:"$next"},lastIcon:{type:He,default:"$last"},ariaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.root"},pageAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.page"},currentPageAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.currentPage"},firstAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.first"},previousAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.previous"},nextAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.next"},lastAriaLabel:{type:String,default:"$vuetify.pagination.ariaLabel.last"},ellipsis:{type:String,default:"..."},showFirstLastPage:Boolean,..._s(),...Ge(),...Xn(),...xs(),...Un(),...Mu(),...pt({tag:"nav"}),...Nt(),...zs({variant:"text"})},"VPagination"),Ux=xe()({name:"VPagination",props:QZ(),emits:{"update:modelValue":e=>!0,first:e=>!0,prev:e=>!0,next:e=>!0,last:e=>!0},setup(e,t){let{slots:n,emit:r}=t;const s=lt(e,"modelValue"),{t:i,n:o}=zr(),{isRtl:a}=Hr(),{themeClasses:l}=tn(e),{width:u}=vi(),c=Pe(-1);Br(void 0,{scoped:!0});const{resizeRef:d}=Uo(E=>{if(!E.length)return;const{target:T,contentRect:R}=E[0],I=T.querySelector(".v-pagination__list > *");if(!I)return;const O=R.width,H=I.offsetWidth+parseFloat(getComputedStyle(I).marginRight)*2;c.value=m(O,H)}),f=M(()=>parseInt(e.length,10)),h=M(()=>parseInt(e.start,10)),g=M(()=>e.totalVisible!=null?parseInt(e.totalVisible,10):c.value>=0?c.value:m(u.value,58));function m(E,T){const R=e.showFirstLastPage?5:3;return Math.max(0,Math.floor(Number(((E-T*R)/T).toFixed(2))))}const y=M(()=>{if(f.value<=0||isNaN(f.value)||f.value>Number.MAX_SAFE_INTEGER)return[];if(g.value<=0)return[];if(g.value===1)return[s.value];if(f.value<=g.value)return Rl(f.value,h.value);const E=g.value%2===0,T=E?g.value/2:Math.floor(g.value/2),R=E?T:T+1,I=f.value-T;if(R-s.value>=0)return[...Rl(Math.max(1,g.value-1),h.value),e.ellipsis,f.value];if(s.value-I>=(E?1:0)){const O=g.value-1,H=f.value-O+h.value;return[h.value,e.ellipsis,...Rl(O,H)]}else{const O=Math.max(1,g.value-2),H=O===1?s.value:s.value-Math.ceil(O/2)+h.value;return[h.value,e.ellipsis,...Rl(O,H),e.ellipsis,f.value]}});function w(E,T,R){E.preventDefault(),s.value=T,R&&r(R,T)}const{refs:b,updateRef:x}=XZ();Br({VPaginationBtn:{color:ie(()=>e.color),border:ie(()=>e.border),density:ie(()=>e.density),size:ie(()=>e.size),variant:ie(()=>e.variant),rounded:ie(()=>e.rounded),elevation:ie(()=>e.elevation)}});const _=M(()=>y.value.map((E,T)=>{const R=I=>x(I,T);if(typeof E=="string")return{isActive:!1,key:`ellipsis-${T}`,page:E,props:{ref:R,ellipsis:!0,icon:!0,disabled:!0}};{const I=E===s.value;return{isActive:I,key:E,page:o(E),props:{ref:R,ellipsis:!1,icon:!0,disabled:!!e.disabled||Number(e.length)<2,color:I?e.activeColor:e.color,"aria-current":I,"aria-label":i(I?e.currentPageAriaLabel:e.pageAriaLabel,E),onClick:O=>w(O,E)}}}})),S=M(()=>{const E=!!e.disabled||s.value<=h.value,T=!!e.disabled||s.value>=h.value+f.value-1;return{first:e.showFirstLastPage?{icon:a.value?e.lastIcon:e.firstIcon,onClick:R=>w(R,h.value,"first"),disabled:E,"aria-label":i(e.firstAriaLabel),"aria-disabled":E}:void 0,prev:{icon:a.value?e.nextIcon:e.prevIcon,onClick:R=>w(R,s.value-1,"prev"),disabled:E,"aria-label":i(e.previousAriaLabel),"aria-disabled":E},next:{icon:a.value?e.prevIcon:e.nextIcon,onClick:R=>w(R,s.value+1,"next"),disabled:T,"aria-label":i(e.nextAriaLabel),"aria-disabled":T},last:e.showFirstLastPage?{icon:a.value?e.firstIcon:e.lastIcon,onClick:R=>w(R,h.value+f.value-1,"last"),disabled:T,"aria-label":i(e.lastAriaLabel),"aria-disabled":T}:void 0}});function P(){var T;const E=s.value-h.value;(T=b.value[E])==null||T.$el.focus()}function A(E){E.key===lS.left&&!e.disabled&&s.value>Number(e.start)?(s.value=s.value-1,Pt(P)):E.key===lS.right&&!e.disabled&&s.value<h.value+f.value-1&&(s.value=s.value+1,Pt(P))}return Me(()=>p(e.tag,{ref:d,class:Re(["v-pagination",l.value,e.class]),style:Be(e.style),role:"navigation","aria-label":i(e.ariaLabel),onKeydown:A,"data-test":"v-pagination-root"},{default:()=>[C("ul",{class:"v-pagination__list"},[e.showFirstLastPage&&C("li",{key:"first",class:"v-pagination__first","data-test":"v-pagination-first"},[n.first?n.first(S.value.first):p(ne,me({_as:"VPaginationBtn"},S.value.first),null)]),C("li",{key:"prev",class:"v-pagination__prev","data-test":"v-pagination-prev"},[n.prev?n.prev(S.value.prev):p(ne,me({_as:"VPaginationBtn"},S.value.prev),null)]),_.value.map((E,T)=>C("li",{key:E.key,class:Re(["v-pagination__item",{"v-pagination__item--is-active":E.isActive}]),"data-test":"v-pagination-item"},[n.item?n.item(E):p(ne,me({_as:"VPaginationBtn"},E.props),{default:()=>[E.page]})])),C("li",{key:"next",class:"v-pagination__next","data-test":"v-pagination-next"},[n.next?n.next(S.value.next):p(ne,me({_as:"VPaginationBtn"},S.value.next),null)]),e.showFirstLastPage&&C("li",{key:"last",class:"v-pagination__last","data-test":"v-pagination-last"},[n.last?n.last(S.value.last):p(ne,me({_as:"VPaginationBtn"},S.value.last),null)])])]})),{}}}),$D=he({prevIcon:{type:He,default:"$prev"},nextIcon:{type:He,default:"$next"},firstIcon:{type:He,default:"$first"},lastIcon:{type:He,default:"$last"},itemsPerPageText:{type:String,default:"$vuetify.dataFooter.itemsPerPageText"},pageText:{type:String,default:"$vuetify.dataFooter.pageText"},firstPageLabel:{type:String,default:"$vuetify.dataFooter.firstPage"},prevPageLabel:{type:String,default:"$vuetify.dataFooter.prevPage"},nextPageLabel:{type:String,default:"$vuetify.dataFooter.nextPage"},lastPageLabel:{type:String,default:"$vuetify.dataFooter.lastPage"},itemsPerPageOptions:{type:Array,default:()=>[{value:10,title:"10"},{value:25,title:"25"},{value:50,title:"50"},{value:100,title:"100"},{value:-1,title:"$vuetify.dataFooter.itemsPerPageAll"}]},showCurrentPage:Boolean},"VDataTableFooter"),zx=xe()({name:"VDataTableFooter",props:$D(),setup(e,t){let{slots:n}=t;const{t:r}=zr(),{page:s,pageCount:i,startIndex:o,stopIndex:a,itemsLength:l,itemsPerPage:u,setItemsPerPage:c}=VZ(),d=M(()=>e.itemsPerPageOptions.map(f=>typeof f=="number"?{value:f,title:f===-1?r("$vuetify.dataFooter.itemsPerPageAll"):String(f)}:{...f,title:isNaN(Number(f.title))?r(f.title):f.title}));return Me(()=>{var h;const f=Ux.filterProps(e);return C("div",{class:"v-data-table-footer"},[(h=n.prepend)==null?void 0:h.call(n),C("div",{class:"v-data-table-footer__items-per-page"},[C("span",{"aria-label":r(e.itemsPerPageText)},[r(e.itemsPerPageText)]),p(qo,{items:d.value,modelValue:u.value,"onUpdate:modelValue":g=>c(Number(g)),density:"compact",variant:"outlined",hideDetails:!0},null)]),C("div",{class:"v-data-table-footer__info"},[C("div",null,[r(e.pageText,l.value?o.value+1:0,a.value,l.value)])]),C("div",{class:"v-data-table-footer__pagination"},[p(Ux,me({modelValue:s.value,"onUpdate:modelValue":g=>s.value=g,density:"comfortable",firstAriaLabel:e.firstPageLabel,lastAriaLabel:e.lastPageLabel,length:i.value,nextAriaLabel:e.nextPageLabel,previousAriaLabel:e.prevPageLabel,rounded:!0,showFirstLastPage:!0,totalVisible:e.showCurrentPage?1:0,variant:"plain"},f),null)])])}),{}}}),Ed=fN({align:{type:String,default:"start"},fixed:{type:[Boolean,String],default:!1},fixedOffset:[Number,String],fixedEndOffset:[Number,String],height:[Number,String],lastFixed:Boolean,firstFixedEnd:Boolean,noPadding:Boolean,indent:[Number,String],empty:Boolean,tag:String,width:[Number,String],maxWidth:[Number,String],nowrap:Boolean},(e,t)=>{let{slots:n}=t;const r=e.tag??"td",s=typeof e.fixed=="string"?e.fixed:e.fixed?"start":"none";return p(r,{class:Re(["v-data-table__td",{"v-data-table-column--fixed":s==="start","v-data-table-column--fixed-end":s==="end","v-data-table-column--last-fixed":e.lastFixed,"v-data-table-column--first-fixed-end":e.firstFixedEnd,"v-data-table-column--no-padding":e.noPadding,"v-data-table-column--nowrap":e.nowrap,"v-data-table-column--empty":e.empty},`v-data-table-column--align-${e.align}`]),style:{height:Ne(e.height),width:Ne(e.width),maxWidth:Ne(e.maxWidth),left:s==="start"?Ne(e.fixedOffset||null):void 0,right:s==="end"?Ne(e.fixedEndOffset||null):void 0,paddingInlineStart:e.indent?Ne(e.indent):void 0}},{default:()=>{var i;return[(i=n.default)==null?void 0:i.call(n)]}})}),JZ=he({headers:Array},"DataTable-header"),FD=Symbol.for("vuetify:data-table-headers"),ND={title:"",sortable:!1},ZZ={...ND,width:48};function eee(){const t=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).map(n=>({element:n,priority:0}));return{enqueue:(n,r)=>{let s=!1;for(let i=0;i<t.length;i++)if(t[i].priority>r){t.splice(i,0,{element:n,priority:r}),s=!0;break}s||t.push({element:n,priority:r})},size:()=>t.length,count:()=>{let n=0;if(!t.length)return 0;const r=Math.floor(t[0].priority);for(let s=0;s<t.length;s++)Math.floor(t[s].priority)===r&&(n+=1);return n},dequeue:()=>t.shift()}}function kb(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];if(!e.children)t.push(e);else for(const n of e.children)kb(n,t);return t}function BD(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new Set;for(const n of e)n.key&&t.add(n.key),n.children&&BD(n.children,t);return t}function tee(e){if(e.key){if(e.key==="data-table-group")return ND;if(["data-table-expand","data-table-select"].includes(e.key))return ZZ}}function H0(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.children?Math.max(t,...e.children.map(n=>H0(n,t+1))):t}function nee(e){let t=!1;function n(i,o){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"none";if(i)if(a!=="none"&&(i.fixed=a),i.fixed===!0&&(i.fixed="start"),i.fixed===o)if(i.children)if(o==="start")for(let l=i.children.length-1;l>=0;l--)n(i.children[l],o,o);else for(let l=0;l<i.children.length;l++)n(i.children[l],o,o);else!t&&o==="start"?i.lastFixed=!0:!t&&o==="end"?i.firstFixedEnd=!0:isNaN(Number(i.width))?(`${i.key}`,void 0):i.minWidth=Math.max(Number(i.width)||0,Number(i.minWidth)||0),t=!0;else if(i.children)if(o==="start")for(let l=i.children.length-1;l>=0;l--)n(i.children[l],o);else for(let l=0;l<i.children.length;l++)n(i.children[l],o);else t=!1}for(let i=e.length-1;i>=0;i--)n(e[i],"start");for(let i=0;i<e.length;i++)n(e[i],"end");let r=0;for(let i=0;i<e.length;i++)r=VD(e[i],r);let s=0;for(let i=e.length-1;i>=0;i--)s=UD(e[i],s)}function VD(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(!e)return t;if(e.children){e.fixedOffset=t;for(const n of e.children)t=VD(n,t)}else e.fixed&&e.fixed!=="end"&&(e.fixedOffset=t,t+=parseFloat(e.width||"0")||0);return t}function UD(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(!e)return t;if(e.children){e.fixedEndOffset=t;for(const n of e.children)t=UD(n,t)}else e.fixed==="end"&&(e.fixedEndOffset=t,t+=parseFloat(e.width||"0")||0);return t}function ree(e,t){const n=[];let r=0;const s=eee(e);for(;s.size()>0;){let o=s.count();const a=[];let l=1;for(;o>0;){const{element:u,priority:c}=s.dequeue(),d=t-r-H0(u);if(a.push({...u,rowspan:d??1,colspan:u.children?kb(u).length:1}),u.children)for(const f of u.children){const h=c%1+l/Math.pow(10,r+2);s.enqueue(f,r+d+h)}l+=1,o-=1}r+=1,n.push(a)}return{columns:e.map(o=>kb(o)).flat(),headers:n}}function zD(e){const t=[];for(const n of e){const r={...tee(n),...n},s=r.key??(typeof r.value=="string"?r.value:null),i=r.value??s??null,o={...r,key:s,value:i,sortable:r.sortable??(r.key!=null||!!r.sort),children:r.children?zD(r.children):void 0};t.push(o)}return t}function see(e,t){const n=K([]),r=K([]),s=K({}),i=K({}),o=K({});Cn(()=>{var m,y,w;const u=(e.headers||Object.keys(e.items[0]??{}).map(b=>({key:b,title:mi(b)}))).slice(),c=BD(u);(m=t==null?void 0:t.groupBy)!=null&&m.value.length&&!c.has("data-table-group")&&u.unshift({key:"data-table-group",title:"Group"}),(y=t==null?void 0:t.showSelect)!=null&&y.value&&!c.has("data-table-select")&&u.unshift({key:"data-table-select"}),(w=t==null?void 0:t.showExpand)!=null&&w.value&&!c.has("data-table-expand")&&u.push({key:"data-table-expand"});const d=zD(u);nee(d);const f=Math.max(...d.map(b=>H0(b)))+1,h=ree(d,f);n.value=h.headers,r.value=h.columns;const g=h.headers.flat(1);for(const b of g)b.key&&(b.sortable&&(b.sort&&(s.value[b.key]=b.sort),b.sortRaw&&(i.value[b.key]=b.sortRaw)),b.filter&&(o.value[b.key]=b.filter))});const a={headers:n,columns:r,sortFunctions:s,sortRawFunctions:i,filterFunctions:o};return Jt(FD,a),a}function Ym(){const e=Je(FD);if(!e)throw new Error("Missing headers!");return e}const HD=he({color:String,disableSort:Boolean,fixedHeader:Boolean,multiSort:Boolean,sortAscIcon:{type:He,default:"$sortAsc"},sortDescIcon:{type:He,default:"$sortDesc"},headerProps:{type:Object},sticky:Boolean,...Xn(),...ll(),...dm()},"VDataTableHeaders"),Hx=xe()({name:"VDataTableHeaders",props:HD(),setup(e,t){let{slots:n}=t;const{t:r}=zr(),{toggleSort:s,sortBy:i,isSorted:o}=LD(),{someSelected:a,allSelected:l,selectAll:u,showSelectAll:c}=Km(),{columns:d,headers:f}=Ym(),{loaderClasses:h}=Wd(e);function g(T,R){if(!(e.sticky||e.fixedHeader)&&!T.fixed)return;const I=typeof T.fixed=="string"?T.fixed:T.fixed?"start":"none";return{position:"sticky",left:I==="start"?Ne(T.fixedOffset):void 0,right:I==="end"?Ne(T.fixedEndOffset):void 0,top:e.sticky||e.fixedHeader?`calc(var(--v-table-header-height) * ${R})`:void 0}}function m(T,R){T.key==="Enter"&&!e.disableSort&&s(R)}function y(T){const R=i.value.find(I=>I.key===T.key);return R?R.order==="asc"?e.sortAscIcon:e.sortDescIcon:e.sortAscIcon}const{backgroundColorClasses:w,backgroundColorStyles:b}=vr(()=>e.color),{displayClasses:x,mobile:_}=vi(e),S=M(()=>({headers:f.value,columns:d.value,toggleSort:s,isSorted:o,sortBy:i.value,someSelected:a.value,allSelected:l.value,selectAll:u,getSortIcon:y})),P=M(()=>["v-data-table__th",{"v-data-table__th--sticky":e.sticky||e.fixedHeader},x.value,h.value]),A=T=>{let{column:R,x:I,y:O}=T;const H=R.key==="data-table-select"||R.key==="data-table-expand",N=R.key==="data-table-group"&&R.width===0&&!R.title,D=me(e.headerProps??{},R.headerProps??{});return p(Ed,me({tag:"th",align:R.align,class:[{"v-data-table__th--sortable":R.sortable&&!e.disableSort,"v-data-table__th--sorted":o(R),"v-data-table__th--fixed":R.fixed},...P.value],style:{width:Ne(R.width),minWidth:Ne(R.minWidth),maxWidth:Ne(R.maxWidth),...g(R,O)},colspan:R.colspan,rowspan:R.rowspan,fixed:R.fixed,nowrap:R.nowrap,lastFixed:R.lastFixed,firstFixedEnd:R.firstFixedEnd,noPadding:H,empty:N,tabindex:R.sortable?0:void 0,onClick:R.sortable?()=>s(R):void 0,onKeydown:R.sortable?W=>m(W,R):void 0},D),{default:()=>{var Q;const W=`header.${R.key}`,U={column:R,selectAll:u,isSorted:o,toggleSort:s,sortBy:i.value,someSelected:a.value,allSelected:l.value,getSortIcon:y};return n[W]?n[W](U):N?"":R.key==="data-table-select"?((Q=n["header.data-table-select"])==null?void 0:Q.call(n,U))??(c.value&&p(ku,{density:e.density,modelValue:l.value,indeterminate:a.value&&!l.value,"onUpdate:modelValue":u},null)):C("div",{class:"v-data-table-header__content"},[C("span",null,[R.title]),R.sortable&&!e.disableSort&&p(Z,{key:"icon",class:"v-data-table-header__sort-icon",icon:y(R)},null),e.multiSort&&o(R)&&C("div",{key:"badge",class:Re(["v-data-table-header__sort-badge",...w.value]),style:Be(b.value)},[i.value.findIndex(V=>V.key===R.key)+1])])}})},E=()=>{const T=M(()=>d.value.filter(I=>(I==null?void 0:I.sortable)&&!e.disableSort)),R=M(()=>{if(d.value.find(O=>O.key==="data-table-select")!=null)return l.value?"$checkboxOn":a.value?"$checkboxIndeterminate":"$checkboxOff"});return p(Ed,me({tag:"th",class:[...P.value],colspan:f.value.length+1},e.headerProps),{default:()=>[C("div",{class:"v-data-table-header__content"},[p(qo,{chips:!0,class:"v-data-table__td-sort-select",clearable:!0,density:"default",items:T.value,label:r("$vuetify.dataTable.sortBy"),multiple:e.multiSort,variant:"underlined","onClick:clear":()=>i.value=[],appendIcon:R.value,"onClick:append":()=>u(!l.value)},{chip:I=>{var O;return p(In,{onClick:(O=I.item.raw)!=null&&O.sortable?()=>s(I.item.raw):void 0,onMousedown:H=>{H.preventDefault(),H.stopPropagation()}},{default:()=>[I.item.title,p(Z,{class:Re(["v-data-table__td-sort-icon",o(I.item.raw)&&"v-data-table__td-sort-icon-active"]),icon:y(I.item.raw),size:"small"},null)]})}})])]})};Me(()=>_.value?C("tr",null,[p(E,null,null)]):C(Oe,null,[n.headers?n.headers(S.value):f.value.map((T,R)=>C("tr",null,[T.map((I,O)=>p(A,{column:I,x:O,y:R},null))])),e.loading&&C("tr",{class:"v-data-table-progress"},[C("th",{colspan:d.value.length},[p(fm,{name:"v-data-table-progress",absolute:!0,active:!0,color:typeof e.loading=="boolean"?void 0:e.loading,indeterminate:!0},{default:n.loader})])])]))}}),jD=he({item:{type:Object,required:!0},groupCollapseIcon:{type:He,default:"$tableGroupCollapse"},groupExpandIcon:{type:He,default:"$tableGroupExpand"},...Xn()},"VDataTableGroupHeaderRow"),iee=xe()({name:"VDataTableGroupHeaderRow",props:jD(),setup(e,t){let{slots:n}=t;const{isGroupOpen:r,toggleGroup:s,extractRows:i}=TD(),{isSelected:o,isSomeSelected:a,select:l}=Km(),{columns:u}=Ym(),c=M(()=>i([e.item])),d=ie(()=>u.value.length-(u.value.some(f=>f.key==="data-table-select")?1:0));return()=>C("tr",{class:"v-data-table-group-header-row",style:{"--v-data-table-group-header-row-depth":e.item.depth}},[u.value.map(f=>{var h,g;if(f.key==="data-table-group"){const m=r(e.item)?e.groupCollapseIcon:e.groupExpandIcon,y=()=>s(e.item);return((h=n["data-table-group"])==null?void 0:h.call(n,{item:e.item,count:c.value.length,props:{icon:m,onClick:y}}))??p(Ed,{class:"v-data-table-group-header-row__column",colspan:d.value},{default:()=>[p(ne,{size:"small",variant:"text",icon:m,onClick:y},null),C("span",null,[e.item.value]),C("span",null,[k("("),c.value.length,k(")")])]})}else if(f.key==="data-table-select"){const m=o(c.value),y=a(c.value)&&!m,w=b=>l(c.value,b);return((g=n["data-table-select"])==null?void 0:g.call(n,{props:{modelValue:m,indeterminate:y,"onUpdate:modelValue":w}}))??p(Ed,{class:"v-data-table__td--select-row",noPadding:!0},{default:()=>[p(ku,{density:e.density,modelValue:m,indeterminate:y,"onUpdate:modelValue":w},null)]})}return""})])}}),WD=he({index:Number,item:Object,cellProps:[Object,Function],collapseIcon:{type:He,default:"$collapse"},expandIcon:{type:He,default:"$expand"},onClick:Gn(),onContextmenu:Gn(),onDblclick:Gn(),...Xn(),...ll()},"VDataTableRow"),oee=xe()({name:"VDataTableRow",props:WD(),setup(e,t){let{slots:n}=t;const{displayClasses:r,mobile:s}=vi(e,"v-data-table__tr"),{isSelected:i,toggleSelect:o,someSelected:a,allSelected:l,selectAll:u}=Km(),{isExpanded:c,toggleExpand:d}=ED(),{toggleSort:f,sortBy:h,isSorted:g}=LD(),{columns:m}=Ym();Me(()=>C("tr",{class:Re(["v-data-table__tr",{"v-data-table__tr--clickable":!!(e.onClick||e.onContextmenu||e.onDblclick)},r.value]),onClick:e.onClick,onContextmenu:e.onContextmenu,onDblclick:e.onDblclick},[e.item&&m.value.map((y,w)=>{const b=e.item,x=`item.${y.key}`,_=`header.${y.key}`,S={index:e.index,item:b.raw,internalItem:b,value:Ya(b.columns,y.key),column:y,isSelected:i,toggleSelect:o,isExpanded:c,toggleExpand:d},P={column:y,selectAll:u,isSorted:g,toggleSort:f,sortBy:h.value,someSelected:a.value,allSelected:l.value,getSortIcon:()=>""},A=typeof e.cellProps=="function"?e.cellProps({index:S.index,item:S.item,internalItem:S.internalItem,value:S.value,column:y}):e.cellProps,E=typeof y.cellProps=="function"?y.cellProps({index:S.index,item:S.item,internalItem:S.internalItem,value:S.value}):y.cellProps,T=y.key==="data-table-select"||y.key==="data-table-expand",R=y.key==="data-table-group"&&y.width===0&&!y.title;return p(Ed,me({align:y.align,indent:y.intent,class:{"v-data-table__td--expanded-row":y.key==="data-table-expand","v-data-table__td--select-row":y.key==="data-table-select"},fixed:y.fixed,fixedOffset:y.fixedOffset,fixedEndOffset:y.fixedEndOffset,lastFixed:y.lastFixed,firstFixedEnd:y.firstFixedEnd,maxWidth:s.value?void 0:y.maxWidth,noPadding:T,empty:R,nowrap:y.nowrap,width:s.value?void 0:y.width},A,E),{default:()=>{var O,H,N,D;if(y.key==="data-table-select")return((O=n["item.data-table-select"])==null?void 0:O.call(n,{...S,props:{disabled:!b.selectable,modelValue:i([b]),onClick:Et(()=>o(b),["stop"])}}))??p(ku,{disabled:!b.selectable,density:e.density,modelValue:i([b]),onClick:Et(W=>o(b,e.index,W),["stop"])},null);if(y.key==="data-table-expand")return((H=n["item.data-table-expand"])==null?void 0:H.call(n,{...S,props:{icon:c(b)?e.collapseIcon:e.expandIcon,size:"small",variant:"text",onClick:Et(()=>d(b),["stop"])}}))??p(ne,{icon:c(b)?e.collapseIcon:e.expandIcon,size:"small",variant:"text",onClick:Et(()=>d(b),["stop"])},null);if(n[x]&&!s.value)return n[x](S);const I=se(S.value);return s.value?C(Oe,null,[C("div",{class:"v-data-table__td-title"},[((N=n[_])==null?void 0:N.call(n,P))??y.title]),C("div",{class:"v-data-table__td-value"},[((D=n[x])==null?void 0:D.call(n,S))??I])]):I}})})]))}}),qD=he({loading:[Boolean,String],loadingText:{type:String,default:"$vuetify.dataIterator.loadingText"},hideNoData:Boolean,items:{type:Array,default:()=>[]},noDataText:{type:String,default:"$vuetify.noDataText"},rowProps:[Object,Function],cellProps:[Object,Function],...Vo(WD(),["collapseIcon","expandIcon","density"]),...Vo(jD(),["groupCollapseIcon","groupExpandIcon","density"]),...ll()},"VDataTableRows"),jx=xe()({name:"VDataTableRows",inheritAttrs:!1,props:qD(),setup(e,t){let{attrs:n,slots:r}=t;const{columns:s}=Ym(),{expandOnClick:i,toggleExpand:o,isExpanded:a}=ED(),{isSelected:l,toggleSelect:u}=Km(),{toggleGroup:c,isGroupOpen:d}=TD(),{t:f}=zr(),{mobile:h}=vi(e);return Me(()=>{var m,y;const g=Vo(e,["groupCollapseIcon","groupExpandIcon","density"]);return e.loading&&(!e.items.length||r.loading)?C("tr",{class:"v-data-table-rows-loading",key:"loading"},[C("td",{colspan:s.value.length},[((m=r.loading)==null?void 0:m.call(r))??f(e.loadingText)])]):!e.loading&&!e.items.length&&!e.hideNoData?C("tr",{class:"v-data-table-rows-no-data",key:"no-data"},[C("td",{colspan:s.value.length},[((y=r["no-data"])==null?void 0:y.call(r))??f(e.noDataText)])]):C(Oe,null,[e.items.map((w,b)=>{var S,P;if(w.type==="group"){const A={index:b,item:w,columns:s.value,isExpanded:a,toggleExpand:o,isSelected:l,toggleSelect:u,toggleGroup:c,isGroupOpen:d};return r["group-header"]?r["group-header"](A):p(iee,me({key:`group-header_${w.id}`,item:w},RS(n,":groupHeader",()=>A),g),r)}if(w.type==="group-summary"){const A={index:b,item:w,columns:s.value,toggleGroup:c};return((S=r["group-summary"])==null?void 0:S.call(r,A))??""}const x={index:b,item:w.raw,internalItem:w,columns:s.value,isExpanded:a,toggleExpand:o,isSelected:l,toggleSelect:u},_={...x,props:me({key:`item_${w.key??w.index}`,onClick:i.value?()=>{o(w)}:void 0,index:b,item:w,cellProps:e.cellProps,collapseIcon:e.collapseIcon,expandIcon:e.expandIcon,density:e.density,mobile:h.value},RS(n,":row",()=>x),typeof e.rowProps=="function"?e.rowProps({item:x.item,index:x.index,internalItem:x.internalItem}):e.rowProps)};return C(Oe,{key:_.props.key},[r.item?r.item(_):p(oee,_.props,r),a(w)&&((P=r["expanded-row"])==null?void 0:P.call(r,x))])})])}),{}}}),GD=he({fixedHeader:Boolean,fixedFooter:Boolean,height:[Number,String],hover:Boolean,striped:{type:String,default:null,validator:e=>["even","odd"].includes(e)},...Ge(),...Xn(),...pt(),...Nt()},"VTable"),xb=xe()({name:"VTable",props:GD(),setup(e,t){let{slots:n,emit:r}=t;const{themeClasses:s}=tn(e),{densityClasses:i}=ks(e);return Me(()=>p(e.tag,{class:Re(["v-table",{"v-table--fixed-height":!!e.height,"v-table--fixed-header":e.fixedHeader,"v-table--fixed-footer":e.fixedFooter,"v-table--has-top":!!n.top,"v-table--has-bottom":!!n.bottom,"v-table--hover":e.hover,"v-table--striped-even":e.striped==="even","v-table--striped-odd":e.striped==="odd"},s.value,i.value,e.class]),style:Be(e.style)},{default:()=>{var o,a,l;return[(o=n.top)==null?void 0:o.call(n),n.default?C("div",{class:"v-table__wrapper",style:{height:Ne(e.height)}},[C("table",null,[n.default()])]):(a=n.wrapper)==null?void 0:a.call(n),(l=n.bottom)==null?void 0:l.call(n)]}})),{}}}),aee=he({items:{type:Array,default:()=>[]},itemValue:{type:[String,Array,Function],default:"id"},itemSelectable:{type:[String,Array,Function],default:null},rowProps:[Object,Function],cellProps:[Object,Function],returnObject:Boolean},"DataTable-items");function lee(e,t,n,r){const s=e.returnObject?t:Ln(t,e.itemValue),i=Ln(t,e.itemSelectable,!0),o=r.reduce((a,l)=>(l.key!=null&&(a[l.key]=Ln(t,l.value)),a),{});return{type:"item",key:e.returnObject?Ln(t,e.itemValue):s,index:n,value:s,selectable:i,columns:o,raw:t}}function uee(e,t,n){return t.map((r,s)=>lee(e,r,s,n))}function cee(e,t){return{items:M(()=>uee(e,e.items,t.value))}}const dee=he({...qD(),hideDefaultBody:Boolean,hideDefaultFooter:Boolean,hideDefaultHeader:Boolean,width:[String,Number],search:String,...RZ(),...AZ(),...JZ(),...aee(),...HZ(),...WZ(),...HD(),...GD()},"DataTable"),fee=he({...FZ(),...dee(),...CZ(),...$D()},"VDataTable"),hee=xe()({name:"VDataTable",props:fee(),emits:{"update:modelValue":e=>!0,"update:page":e=>!0,"update:itemsPerPage":e=>!0,"update:sortBy":e=>!0,"update:options":e=>!0,"update:groupBy":e=>!0,"update:expanded":e=>!0,"update:currentItems":e=>!0},setup(e,t){let{attrs:n,slots:r}=t;const{groupBy:s}=OZ(e),{sortBy:i,multiSort:o,mustSort:a}=qZ(e),{page:l,itemsPerPage:u}=NZ(e),{disableSort:c}=sl(e),{columns:d,headers:f,sortFunctions:h,sortRawFunctions:g,filterFunctions:m}=see(e,{groupBy:s,showSelect:ie(()=>e.showSelect),showExpand:ie(()=>e.showExpand)}),{items:y}=cee(e,d),w=ie(()=>e.search),{filteredItems:b}=PZ(e,y,w,{transform:X=>X.columns,customKeyFilter:m}),{toggleSort:x}=GZ({sortBy:i,multiSort:o,mustSort:a,page:l}),{sortByWithGroups:_,opened:S,extractRows:P,isGroupOpen:A,toggleGroup:E}=MZ({groupBy:s,sortBy:i,disableSort:c}),{sortedItems:T}=KZ(e,b,_,{transform:X=>({...X.raw,...X.columns}),sortFunctions:h,sortRawFunctions:g}),{flatItems:R}=LZ(T,s,S,()=>!!r["group-summary"]),I=M(()=>R.value.length),{startIndex:O,stopIndex:H,pageCount:N,setItemsPerPage:D}=BZ({page:l,itemsPerPage:u,itemsLength:I}),{paginatedItems:W}=UZ({items:R,startIndex:O,stopIndex:H,itemsPerPage:u}),U=M(()=>P(W.value)),{isSelected:Q,select:V,selectAll:L,toggleSelect:oe,someSelected:j,allSelected:F}=jZ(e,{allItems:y,currentPage:U}),{isExpanded:re,toggleExpand:ae}=IZ(e);$Z({page:l,itemsPerPage:u,sortBy:i,groupBy:s,search:w}),Br({VDataTableRows:{hideNoData:ie(()=>e.hideNoData),noDataText:ie(()=>e.noDataText),loading:ie(()=>e.loading),loadingText:ie(()=>e.loadingText)}});const Se=M(()=>({page:l.value,itemsPerPage:u.value,sortBy:i.value,pageCount:N.value,toggleSort:x,setItemsPerPage:D,someSelected:j.value,allSelected:F.value,isSelected:Q,select:V,selectAll:L,toggleSelect:oe,isExpanded:re,toggleExpand:ae,isGroupOpen:A,toggleGroup:E,items:U.value.map(X=>X.raw),internalItems:U.value,groupedItems:W.value,columns:d.value,headers:f.value}));return Me(()=>{const X=zx.filterProps(e),le=Hx.filterProps(e),ee=jx.filterProps(e),G=xb.filterProps(e);return p(xb,me({class:["v-data-table",{"v-data-table--show-select":e.showSelect,"v-data-table--loading":e.loading},e.class],style:e.style},G,{fixedHeader:e.fixedHeader||e.sticky}),{top:()=>{var _e;return(_e=r.top)==null?void 0:_e.call(r,Se.value)},default:()=>{var _e,De,B,z,q,ce;return r.default?r.default(Se.value):C(Oe,null,[(_e=r.colgroup)==null?void 0:_e.call(r,Se.value),!e.hideDefaultHeader&&C("thead",{key:"thead"},[p(Hx,le,r)]),(De=r.thead)==null?void 0:De.call(r,Se.value),!e.hideDefaultBody&&C("tbody",null,[(B=r["body.prepend"])==null?void 0:B.call(r,Se.value),r.body?r.body(Se.value):p(jx,me(n,ee,{items:W.value}),r),(z=r["body.append"])==null?void 0:z.call(r,Se.value)]),(q=r.tbody)==null?void 0:q.call(r,Se.value),(ce=r.tfoot)==null?void 0:ce.call(r,Se.value)])},bottom:()=>r.bottom?r.bottom(Se.value):!e.hideDefaultFooter&&C(Oe,null,[p(ln,null,null),p(zx,X,{prepend:r["footer.prepend"]})])})}),{}}}),pee=he({...Ge(),...o9()},"VForm"),j0=xe()({name:"VForm",props:pee(),emits:{"update:modelValue":e=>!0,submit:e=>!0},setup(e,t){let{slots:n,emit:r}=t;const s=a9(e),i=K();function o(l){l.preventDefault(),s.reset()}function a(l){const u=l,c=s.validate();u.then=c.then.bind(c),u.catch=c.catch.bind(c),u.finally=c.finally.bind(c),r("submit",u),u.defaultPrevented||c.then(d=>{var h;let{valid:f}=d;f&&((h=i.value)==null||h.submit())}),u.preventDefault()}return Me(()=>{var l;return C("form",{ref:i,class:Re(["v-form",e.class]),style:Be(e.style),novalidate:!0,onReset:o,onSubmit:a},[(l=n.default)==null?void 0:l.call(n,s)])}),Es(s,i)}}),mee=he({disabled:Boolean,modelValue:{type:Boolean,default:null},...g1()},"VHover"),Wx=xe()({name:"VHover",props:mee(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=lt(e,"modelValue"),{runOpenDelay:s,runCloseDelay:i}=v1(e,o=>!e.disabled&&(r.value=o));return()=>{var o;return(o=n.default)==null?void 0:o.call(n,{isHovering:r.value,props:{onMouseenter:s,onMouseleave:i}})}}}),gee={class:"mt-4 mb-4"},vee={key:0},yee={key:1},bee={key:0},wee={key:1},See=["colspan"],_ee=Fe({__name:"PrintersView",setup(e){const t=Ft(),n=Xt(),r=K(!1),s=lr(),i=io(),o=Nm(),a=rn(sn.AddOrUpdatePrinterDialog),l=K([]),u=K([]),c=K(""),d=K(""),f=K(),h=K(""),g=K([]),m=M(()=>o.hasFeature("printerGroupsApi")),y=M(()=>[{title:"Enabled",key:"enabled"},{title:"Type",key:"printerType"},{title:"Printer Name",align:"start",sortable:!0,key:"name"},{title:"Floor",key:"floor",sortable:!1},...o.hasFeature("printerGroupsApi")?[{title:"Group(s)",key:"group",sortable:!0}]:[],{title:"Actions",key:"actions",sortable:!1},{title:"Socket Update",key:"socketupdate",sortable:!1},{title:"",key:"data-table-expand"}]);async function w(){return r.value=!0,await o.loadFeatures(),o.hasFeature("printerGroupsApi")&&(l.value=await wl.getGroupsWithPrinters()),r.value=!1,l}const b=Um({queryKey:["printerGroups"],queryFn:w}),x=M(()=>{var F;if(!o.hasFeature("printerGroupsApi")||!((F=u.value)!=null&&F.length))return n.printers;const j=u.value.flatMap(re=>re.printers.map(ae=>ae.printerId))||[];return n.printers.filter(re=>j.includes(re.id))}),_=M(()=>s.printerCurrentEventReceivedAtById),S=M(()=>{if(!(!f.value&&f.value!==0))return l.value[f.value]}),P=j=>j?(Date.now()-j)/1e3:void 0,A=j=>l.value.filter(F=>F.printers.find(re=>re.printerId===j)),E=j=>l.value.filter(F=>!F.printers.find(re=>re.printerId===j)),T=j=>i.floorOfPrinter(j),R=j=>{n.setUpdateDialogPrinter(j),a.openDialog(j)},I=()=>{a.openDialog()},O=(j,F)=>{if(console.log(j,F),F.isExpanded){const re=g.value.findIndex(ae=>ae===j.id);g.value.splice(re,1)}else g.value.push(j.id.toString())},H=()=>{rn(sn.ImportOctoFarmDialog).openDialog()},N=()=>{rn(sn.YamlImportExport).openDialog()},D=async()=>{var j,F;if(!((F=(j=c.value)==null?void 0:j.trim())!=null&&F.length))throw new Error("Please set a non-empty group name");await wl.createGroup(c.value.trim()),await b.refetch(),c.value="",t.info("Created group")},W=()=>{var j;S.value&&(d.value=(j=S.value)==null?void 0:j.name)},U=async j=>{var re,ae;if(!(j!=null&&j.id))throw new Error("Group id was not defined");if(!l.value.find(Se=>Se.id===j.id))throw new Error("Group was not found, please reload the page");if(!((ae=(re=d.value)==null?void 0:re.trim())!=null&&ae.length))throw new Error("Please set a non-empty group name");await wl.updateGroupName(j.id,d.value.trim()),await b.refetch()},Q=async j=>{const F=l.value.find(ae=>ae.id===j);if(!F)throw new Error("Group was not found, please reload the page");const re=F.printers.length;re>0&&!confirm(`This group contains ${re} printers, are you sure to delete it?`)||(await wl.deleteGroup(j),await b.refetch(),t.info("Deleted group"))},V=async(j,F)=>{await wl.addPrinterToGroup(j,F),await b.refetch(),t.info("Added printer to group")},L=async(j,F)=>{await wl.deletePrinterFromGroup(j,F),await b.refetch(),t.info("Removed printer from group")},oe=async j=>{if(!j.id)throw new Error("Printer ID not set, cant toggle enabled");j.enabled=!j.enabled,await en.toggleEnabled(j.id,j.enabled)};return(j,F)=>{const re=$n("v-list-item-group");return $(),ve("div",null,[p(kt,null,{default:v(()=>[p(an,null,{default:v(()=>[F[11]||(F[11]=k(" Printers ",-1)),p(Tn),m.value&&l.value.length?($(),te(qo,{key:0,modelValue:u.value,"onUpdate:modelValue":F[0]||(F[0]=ae=>u.value=ae),items:l.value,"return-object":!0,"item-title":"name",label:"Filter by groups",multiple:"",placeholder:"Select group to filter by","prepend-icon":"filter_list"},null,8,["modelValue","items"])):pe("",!0),p(at,{modelValue:h.value,"onUpdate:modelValue":F[1]||(F[1]=ae=>h.value=ae),class:"p-2",clearable:"",label:"Printer search","prepend-icon":"search","single-line":""},null,8,["modelValue"])]),_:1}),p(J(hee),{expanded:g.value,headers:y.value,items:x.value,search:h.value,class:"elevation-1","item-key":"id","show-expand":"","single-expand":"","onClick:row":O},IT({"no-data":v(()=>[C("div",gee,[x.value.length===0?($(),ve("h3",vee," No printer has been created yet. Create one here: ")):($(),ve("h3",yee," No printer has been found. Adjust your filters or search criteria. ")),p(mD)])]),top:v(()=>[p(wr,{flat:""},{default:v(()=>[p(On,null,{default:v(()=>[k(" Showing "+se(x.value.length||0)+" printers ",1)]),_:1}),p(ne,{class:"ml-3",type:"button",variant:"outlined",onClick:F[2]||(F[2]=ae=>H())},{default:v(()=>[p(Z,null,{default:v(()=>[...F[12]||(F[12]=[k("publish",-1)])]),_:1}),F[13]||(F[13]=k(" Import OctoFarm Printers ",-1))]),_:1}),p(ne,{class:"ml-3",type:"button",variant:"outlined",onClick:F[3]||(F[3]=ae=>I())},{default:v(()=>[p(Z,null,{default:v(()=>[...F[14]||(F[14]=[k("add",-1)])]),_:1}),F[15]||(F[15]=k(" Create Printer ",-1))]),_:1}),p(ne,{class:"ml-3",color:"primary",type:"button",onClick:F[4]||(F[4]=ae=>N())},{default:v(()=>[p(Z,null,{default:v(()=>[...F[16]||(F[16]=[k("publish",-1)])]),_:1}),F[17]||(F[17]=k(" Import/Export YAML ",-1))]),_:1}),p(Tn)]),_:1})]),"item.enabled":v(({item:ae})=>[p(Fp,{modelValue:ae.enabled,"onUpdate:modelValue":Se=>ae.enabled=Se,color:"primary",inset:"",onClickCapture:Et(Se=>oe(ae),["stop"])},{default:v(()=>[k(se(ae.enabled),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onClickCapture"])]),"item.printerType":v(({item:ae})=>[k(se(J(zc)(ae.printerType)),1)]),"item.name":v(({item:ae})=>[p(In,null,{default:v(()=>[k(se(ae.name||ae.printerURL),1)]),_:2},1024)]),"item.floor":v(({item:ae})=>[ae.id?($(),te(In,{key:0},{default:v(()=>{var Se;return[k(se((Se=T(ae.id))==null?void 0:Se.name),1)]}),_:2},1024)):pe("",!0)]),"item.actions":v(({item:ae})=>[p(gZ,{printer:ae},null,8,["printer"]),p(SZ,{printer:ae},null,8,["printer"]),p(_Z,{printer:ae},null,8,["printer"]),p(kZ,{printer:ae},null,8,["printer"]),p(xZ,{printer:ae},null,8,["printer"]),p(bZ,{printer:ae,"onUpdate:show":Se=>R(ae)},null,8,["printer","onUpdate:show"])]),"item.socketupdate":v(({item:ae})=>[_.value[ae.id]?($(),ve("span",bee," Updated "+se(P(_.value[ae.id]))+" seconds ago ",1)):($(),ve("span",wee," No update received (silence) "))]),"expanded-row":v(({item:ae,columns:Se})=>[C("td",{colspan:Se.length},[p(mZ,{printer:ae},null,8,["printer"])],8,See)]),_:2},[m.value?{name:"item.group",fn:v(({item:ae})=>[($(!0),ve(Oe,null,Qt(A(ae.id),Se=>($(),te(In,{key:Se.id,class:"ml-2",closable:"",size:"small","onClick:close":X=>L(Se.id,ae.id)},{default:v(()=>[k(se(Se.name),1)]),_:2},1032,["onClick:close"]))),128)),p(Vm,{"offset-y":""},{activator:v(({props:Se})=>[p(In,me({disabled:!l.value.length,class:"ml-2",size:"small"},Se),{default:v(()=>[p(Z,{size:"small"},{default:v(()=>[...F[18]||(F[18]=[k("add",-1)])]),_:1})]),_:1},16,["disabled"])]),default:v(()=>[p(Ht,{density:"compact",style:{border:"1px solid dimgray"}},{default:v(()=>[p(Nr,null,{default:v(()=>[...F[19]||(F[19]=[k(" ADD TO GROUP",-1)])]),_:1}),p(re,null,{default:v(()=>[($(!0),ve(Oe,null,Qt(E(ae.id),(Se,X)=>($(),te(ze,{key:X,onClick:le=>V(Se.id,ae.id)},{default:v(()=>[p(ft,null,{default:v(()=>[k(se(Se.name),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:2},1024)]),_:2},1024)]),_:2},1024)]),key:"0"}:void 0]),1032,["expanded","headers","items","search"])]),_:1}),m.value?($(),te(kt,{key:0,class:"mt-4"},{default:v(()=>[p(an,null,{default:v(()=>[...F[20]||(F[20]=[k(" Printer Groups ",-1)])]),_:1}),p(nn,null,{default:v(()=>[F[26]||(F[26]=C("h3",null,"Existing groups:",-1)),p(Yn,null,{default:v(()=>[p(Tp,{modelValue:f.value,"onUpdate:modelValue":[F[5]||(F[5]=ae=>f.value=ae),F[6]||(F[6]=ae=>W())],column:"","selected-class":"primary--text"},{default:v(()=>[($(!0),ve(Oe,null,Qt(l.value,ae=>($(),te(In,{key:ae.id,class:"mr-3",closable:"",size:"small","onClick:close":Se=>Q(ae.id)},{default:v(()=>[k(se(ae.name),1)]),_:2},1032,["onClick:close"]))),128))]),_:1},8,["modelValue"])]),_:1}),F[27]||(F[27]=C("h3",{class:"mt-3"},"Update group name",-1)),p(Yn,null,{default:v(()=>[S.value?pe("",!0):($(),te(vn,{key:0},{default:v(()=>[...F[21]||(F[21]=[k(" Select a group to update its name. ",-1)])]),_:1})),p(at,{modelValue:d.value,"onUpdate:modelValue":F[7]||(F[7]=ae=>d.value=ae),disabled:!S.value,label:"Group Name",placeholder:"Type group name here"},{default:v(()=>[...F[22]||(F[22]=[k(" Name ",-1)])]),_:1},8,["modelValue","disabled"]),p(ne,{onClick:F[8]||(F[8]=ae=>U(S.value))},{default:v(()=>[...F[23]||(F[23]=[k(" Update name ",-1)])]),_:1})]),_:1}),F[28]||(F[28]=C("h3",{class:"mt-3"},"Add group",-1)),p(Yn,null,{default:v(()=>[p(at,{modelValue:c.value,"onUpdate:modelValue":F[9]||(F[9]=ae=>c.value=ae),label:"Group Name",placeholder:"Type group name here"},{default:v(()=>[...F[24]||(F[24]=[k(" Name ",-1)])]),_:1},8,["modelValue"]),p(ne,{onClick:F[10]||(F[10]=ae=>D())},{default:v(()=>[...F[25]||(F[25]=[k(" Create new group",-1)])]),_:1})]),_:1})]),_:1})]),_:1})):pe("",!0)])}}}),Xs={grid:"grid",floors:"floors",printer:"printer",emergencyCommands:"emergencyCommands",users:"users",account:"account",serverProtection:"serverProtection",softwareUpgrade:"softwareUpgrade",diagnostics:"diagnostics",experimental:"experimental"},kee={[Xs.grid]:{title:"Grid",icon:"grid_on",path:"/settings/grid",divider:!1},[Xs.floors]:{title:"Floors",icon:"house_siding",path:"/settings/floors",divider:!0},[Xs.printer]:{title:"Printer",icon:"local_print_shop",path:"/settings/printer",divider:!1},[Xs.emergencyCommands]:{title:"Emergency Commands",icon:"warning",path:"/settings/emergency-commands",divider:!0},[Xs.users]:{title:"Users",icon:"group",path:"/settings/user-management",divider:!1},[Xs.account]:{title:"Account",icon:"account_circle",path:"/settings/account",divider:!1},[Xs.serverProtection]:{title:"Server Protection",icon:"security",path:"/settings/server-protection",divider:!0},[Xs.softwareUpgrade]:{title:"Software Upgrade",icon:"upgrade",path:"/settings/software-upgrade",divider:!1},[Xs.diagnostics]:{title:"Diagnostics",icon:"bug_report",path:"/settings/diagnostics",divider:!1},[Xs.experimental]:{title:"Experimental",icon:"settings_applications",path:"/settings/experimental",divider:!1}},xee=Fe({__name:"SettingsView",setup(e){const t=K(kee);return(n,r)=>{const s=$n("router-view");return $(),ve("div",null,[p(st,{"no-gutters":""},{default:v(()=>[p(b0,{permanent:!0},{default:v(()=>[p(ze,null,{default:v(()=>[p(ft,{class:"text-h6"},{default:v(()=>[...r[0]||(r[0]=[k(" Settings ",-1)])]),_:1}),p(St,null,{default:v(()=>[...r[1]||(r[1]=[k(" Adjust your FDM Monster ",-1)])]),_:1})]),_:1}),p(ln),p(Ht,{density:"compact",nav:""},{default:v(()=>[($(!0),ve(Oe,null,Qt(J(t),i=>($(),te(ze,{key:i.title,to:i.path,link:"","prepend-icon":i.icon,title:i.title,"router-link":"",style:Be(i.divider?"border-bottom: 1px solid gray":"")},null,8,["to","prepend-icon","title","style"]))),128))]),_:1})]),_:1}),p(We,null,{default:v(()=>[p(s)]),_:1})]),_:1})])}}});function Eee(e){const t=new Date(e);return new Intl.DateTimeFormat("default",{dateStyle:"long"}).format(t)}const Cee={key:0,class:"text--primary float-end mr-5 mt-2"},Tee={class:"text-grey-darken-4"},Pee={key:0,class:"text-success"},Ree={key:1,class:"text-error"},Iee={key:0},Aee={key:0},Oee={key:0},Mee={key:1},Dee={key:0},Lee={key:1},$ee=Fe({__name:"UserManagementSettings",setup(e){const t=Ft(),n=K(!1),r=K(),s=K([]),i=K([]);async function o(){n.value=!0;try{r.value=await is.getProfile(),i.value=await is.listRoles(),s.value=await is.listUsers()}catch(m){throw n.value=!1,console.error(m),m}return n.value=!1,{users:s,roles:i,profile:r}}const a=Um({queryKey:["userRolesProfile"],queryFn:o});function l(m){return m.map(y=>{var w;return(w=i.value.find(b=>b.id==y))==null?void 0:w.name})}function u(m){var y;return m.id==((y=r.value)==null?void 0:y.id)}async function c(m){if(confirm(`Are you sure you want to delete ${m.username}?`)){try{n.value=!0,await is.deleteUser(m.id),await a.refetch()}catch(y){throw n.value=!1,console.error(y),y}n.value=!1,t.info(`User ${m.username} deleted`)}}async function d(m,y=!0){if(m.isRootUser){t.error("You are not allowed to do perform this action on an owner");return}if(confirm(`Are you sure you want to ${y?"verify":"unverify"} ${m.username}?`)){try{n.value=!0,await is.setUserVerified(m.id,y),await a.refetch()}catch(w){throw n.value=!1,console.error(w),w}n.value=!1,t.info(y?`User ${m.username} verified`:`User ${m.username} unverified`)}}async function f(m,y=!0){var w;if((w=r.value)!=null&&w.isRootUser||t.error("You are not allowed to do perform this action as you're not an owner"),!!confirm(`You are about to ${y?"set":"remove"} owner rights on ${m.username}. Are you sure?`)){try{n.value=!0,await is.setRootUser(m.id,y),await a.refetch()}catch(b){throw n.value=!1,console.error(b),b}n.value=!1,t.info(y?`User ${m.username} set to owner`:`User ${m.username} is no longer owner`)}}async function h(m){try{n.value=!0,console.log(m.roles),console.log(m.roles.map(y=>typeof y)),await is.setUserRoles(m.id,m.roles),await a.refetch(),t.info(`Roles updated for ${m.username}`)}catch(y){throw n.value=!1,console.error(y),t.error(`Failed to update roles for ${m.username}`),y}n.value=!1}async function g(){await rn(sn.CreateUserDialog).openDialog()}return(m,y)=>{const w=$n("v-list-item-content");return $(),te(kt,null,{default:v(()=>[p(wr,{color:"primary"},{default:v(()=>{var b;return[p(dt,null,{default:v(()=>[p(Z,null,{default:v(()=>[...y[1]||(y[1]=[k("settings",-1)])]),_:1})]),_:1}),p(On,null,{default:v(()=>[...y[2]||(y[2]=[k(" Users ",-1)])]),_:1}),p(Tn),p(ne,{disabled:!((b=r.value)!=null&&b.isRootUser),class:"mt-2",color:"primary",onClick:y[0]||(y[0]=x=>g())},{default:v(()=>[p(Z,{class:"mr-2"},{default:v(()=>[...y[3]||(y[3]=[k("verified_user",-1)])]),_:1}),y[4]||(y[4]=C("span",null,"Create verified user",-1))]),_:1},8,["disabled"])]}),_:1}),n.value?($(),te(hD,{key:0,size:20,color:"#a70015",style:{margin:"250px",position:"absolute"}})):pe("",!0),p(Ht,{lines:"three"},{default:v(()=>[p(Nr,null,{default:v(()=>[...y[5]||(y[5]=[k(" Showing all users ",-1)])]),_:1}),($(!0),ve(Oe,null,Qt(s.value,(b,x)=>($(),te(ze,{key:x,class:"pl-6",style:{"max-width":"800px","border-top":"1px solid grey","border-bottom":"1px solid grey"}},{default:v(()=>[p(w,{class:Re(u(b)?"pl-6 grey darken-3":"pl-6 grey darken-4")},{default:v(()=>[p(ft,null,{default:v(()=>[k(" User '"+se(b.username)+"' ",1),u(b)?($(),ve("strong",Cee," Your account ")):pe("",!0)]),_:2},1024),p(St),C("span",Tee,[C("ul",null,[C("li",null,[b.isVerified?($(),ve("span",Pee," Account verified ")):($(),ve("span",Ree," Account not verified "))]),C("li",null,"Created at "+se(J(Eee)(b.createdAt)),1),b.isDemoUser?($(),ve("li",Iee,"Demo user account")):pe("",!0),C("li",null,[y[7]||(y[7]=k(" Role(s) ",-1)),C("ul",null,[b.isRootUser?($(),ve("li",Aee,[p(In,{class:"mb-2 mt-2",size:"small"},{default:v(()=>[...y[6]||(y[6]=[k(" OWNER ",-1)])]),_:1})])):pe("",!0),($(!0),ve(Oe,null,Qt(l(b.roles),_=>($(),ve("li",{key:_},[p(In,{class:"mb-2 mt-2",size:"small"},{default:v(()=>[k(se(_),1)]),_:2},1024)]))),128))])])])])]),_:2},1032,["class"]),p(Su,null,{default:v(()=>{var _,S;return[p(ne,{disabled:u(b)||b.isRootUser,color:b.isVerified?"error darken-4":"success",onClick:P=>d(b,!b.isVerified)},{default:v(()=>[p(Z,{class:"mr-2"},{default:v(()=>[...y[8]||(y[8]=[k("shield",-1)])]),_:1}),b.isVerified?pe("",!0):($(),ve("span",Oee," Verify account ")),b.isVerified?($(),ve("span",Mee," Un-verify account ")):pe("",!0)]),_:2},1032,["disabled","color","onClick"]),p(ne,{color:b.isRootUser?"error darken-4":"success",disabled:u(b)||!((_=r.value)!=null&&_.isRootUser),class:"mt-2",onClick:P=>f(b,!b.isRootUser)},{default:v(()=>[p(Z,{class:"mr-2"},{default:v(()=>[...y[9]||(y[9]=[k("key",-1)])]),_:1}),b.isRootUser?($(),ve("span",Dee," Remove owner ")):pe("",!0),b.isRootUser?pe("",!0):($(),ve("span",Lee," Set owner "))]),_:2},1032,["color","disabled","onClick"]),(S=r.value)!=null&&S.isRootUser?($(),te(qo,{key:0,items:i.value.map(P=>({text:P.name,value:P.id})),modelValue:b.roles,"onUpdate:modelValue":P=>b.roles=P,multiple:"",label:"Select roles",onChange:P=>h(b),class:"pt-6",style:{width:"15rem"}},null,8,["items","modelValue","onUpdate:modelValue","onChange"])):pe("",!0),p(ne,{disabled:u(b)||b.isRootUser,class:"mt-2",color:"error-darken-2",onClick:P=>c(b)},{default:v(()=>[p(Z,{class:"mr-2"},{default:v(()=>[...y[10]||(y[10]=[k("delete",-1)])]),_:1}),y[11]||(y[11]=k(" Delete ",-1))]),_:1},8,["disabled","onClick"])]}),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1})}}}),Fee=Fe({__name:"PrinterSettings",setup(e){const t=js(),n=lr(),r=Ft(),s=K({autoRemoveOldFilesBeforeUpload:!1,autoRemoveOldFilesAtBoot:!1,autoRemoveOldFilesCriteriumDays:7}),i=K({fileCleanSettings:!1,timeoutSettings:!1,purgeFiles:!1,bulkDisableGCodeAnalysis:!1});yt(async()=>{const c=await xn.getSettings();s.value=c.printerFileClean});async function o(){var c,d;if(t.settings.timeout.apiTimeout=parseInt(t.settings.timeout.apiTimeout.toString()),t.settings.timeout.apiUploadTimeout=parseInt(t.settings.timeout.apiUploadTimeout.toString()),!((d=(c=t.settings)==null?void 0:c.timeout)!=null&&d.apiTimeout)){r.error("Timeout not set");return}if(t.settings.timeout.apiTimeout<1e3&&(r.error("Timeout is too low - please set it to at least 1000 milliseconds"),t.settings.timeout.apiTimeout=1e3),t.settings.timeout.apiUploadTimeout<1e4)r.error("Upload timeout is too low - please set it to at least 10000 milliseconds"),t.settings.timeout.apiUploadTimeout=1e4;else{i.value.timeoutSettings=!0;try{await t.updateTimeoutSettings(t.settings.timeout),r.info("Timeout settings updated")}finally{i.value.timeoutSettings=!1}}}async function a(){i.value.fileCleanSettings=!0;try{const c=await xn.setFileCleanSettings(s.value);s.value=c.printerFileClean,r.openInfoMessage({title:"Successfully saved file cleanup settings"})}finally{i.value.fileCleanSettings=!1}}async function l(){i.value.purgeFiles=!0;try{await Hi.purgeFiles(),r.openInfoMessage({title:"Successfully purged all references to printer files!"})}finally{i.value.purgeFiles=!1}}async function u(){i.value.bulkDisableGCodeAnalysis=!0;try{const c=n.onlinePrinters;for(const d of Object.values(c))await kD.setGCodeAnalysis(d.id,!1);r.openInfoMessage({title:`Finished disabling GCode analysis for ${c.length} online printers.`})}finally{i.value.bulkDisableGCodeAnalysis=!1}}return(c,d)=>($(),te(kt,null,{default:v(()=>[p(wr,{color:"primary"},{default:v(()=>[p(dt,null,{default:v(()=>[p(Z,null,{default:v(()=>[...d[10]||(d[10]=[k("settings",-1)])]),_:1})]),_:1}),p(On,null,{default:v(()=>[...d[11]||(d[11]=[k(" Printer Settings ",-1)])]),_:1})]),_:1}),p(Ht,{lines:"three"},{default:v(()=>[p(ze,null,{default:v(()=>[p(ft,null,{default:v(()=>[...d[12]||(d[12]=[k(" Pre-upload file cleanup ",-1)])]),_:1}),p(St,null,{default:v(()=>[d[14]||(d[14]=k(" Automatically cleanup old files to ensure the SD card has enough space. ",-1)),d[15]||(d[15]=C("br",null,null,-1)),p(bn,{modelValue:s.value.autoRemoveOldFilesBeforeUpload,"onUpdate:modelValue":d[0]||(d[0]=f=>s.value.autoRemoveOldFilesBeforeUpload=f),label:"Remove old file before upload"},null,8,["modelValue"]),p(at,{modelValue:s.value.autoRemoveOldFilesCriteriumDays,"onUpdate:modelValue":d[1]||(d[1]=f=>s.value.autoRemoveOldFilesCriteriumDays=f),disabled:!s.value.autoRemoveOldFilesBeforeUpload,label:"Amount of days to keep files",min:"0",variant:"outlined",type:"number"},null,8,["modelValue","disabled"]),p(bn,{modelValue:s.value.autoRemoveOldFilesAtBoot,"onUpdate:modelValue":d[2]||(d[2]=f=>s.value.autoRemoveOldFilesAtBoot=f),label:"Remove old files when (re)booting the server"},null,8,["modelValue"]),p(ne,{color:"primary",onClick:d[3]||(d[3]=f=>a())},{default:v(()=>[...d[13]||(d[13]=[k(" save file clean settings ",-1)])]),_:1})]),_:1})]),_:1}),p(ze,null,{default:v(()=>{var f;return[p(ft,null,{default:v(()=>[...d[16]||(d[16]=[k(" Connection Timeout ",-1)])]),_:1}),(f=J(t).settings)!=null&&f.timeout?($(),te(St,{key:0},{default:v(()=>[d[18]||(d[18]=k(" Set the server default REST API timeout in milliseconds. ",-1)),p(at,{modelValue:J(t).settings.timeout.apiTimeout,"onUpdate:modelValue":d[4]||(d[4]=h=>J(t).settings.timeout.apiTimeout=h),label:"Connection Timeout",min:"0",variant:"outlined",type:"number"},null,8,["modelValue"]),p(ne,{color:"primary",onClick:d[5]||(d[5]=h=>o())},{default:v(()=>[...d[17]||(d[17]=[k(" save connection timeout ",-1)])]),_:1})]),_:1})):pe("",!0)]}),_:1}),p(ze,null,{default:v(()=>{var f;return[p(ft,null,{default:v(()=>[...d[19]||(d[19]=[k(" Upload Timeout ",-1)])]),_:1}),(f=J(t).settings)!=null&&f.timeout?($(),te(St,{key:0},{default:v(()=>[d[21]||(d[21]=k(" Set the server REST API file upload timeout in milliseconds. ",-1)),p(at,{modelValue:J(t).settings.timeout.apiUploadTimeout,"onUpdate:modelValue":d[6]||(d[6]=h=>J(t).settings.timeout.apiUploadTimeout=h),label:"Upload Timeout",min:"0",variant:"outlined",type:"number"},null,8,["modelValue"]),p(ne,{color:"primary",onClick:d[7]||(d[7]=h=>o())},{default:v(()=>[...d[20]||(d[20]=[k(" save upload timeout ",-1)])]),_:1})]),_:1})):pe("",!0)]}),_:1}),p(ze,null,{default:v(()=>[p(ft,null,{default:v(()=>[...d[22]||(d[22]=[k(" Clean file references ",-1)])]),_:1}),p(St,null,{default:v(()=>[d[24]||(d[24]=k(" Clear out the file references for all printers - this does not remove them from OctoPrint! ",-1)),d[25]||(d[25]=C("br",null,null,-1)),p(ne,{color:"primary",onClick:d[8]||(d[8]=f=>l())},{default:v(()=>[...d[23]||(d[23]=[k(" Purge file references ",-1)])]),_:1})]),_:1})]),_:1}),p(ze,null,{default:v(()=>[p(ft,null,{default:v(()=>[...d[26]||(d[26]=[k(" Disable inefficient GCode analysis ",-1)])]),_:1}),p(St,null,{default:v(()=>[d[28]||(d[28]=k(" Disable GCode analysis on all printers at once, preventing CPU intensive and inaccurate time/size estimates. ",-1)),d[29]||(d[29]=C("br",null,null,-1)),p(ne,{color:"primary",onClick:d[9]||(d[9]=f=>u())},{default:v(()=>[...d[27]||(d[27]=[k(" Bulk disable GCode Analysis ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}))}}),KD=Fe({__name:"SettingsToolbar",props:["icon","title"],setup(e){const t=e;return(n,r)=>($(),te(wr,null,{default:v(()=>[p(dt,null,{default:v(()=>[p(Z,null,{default:v(()=>[k(se(t.icon),1)]),_:1})]),_:1}),p(On,null,{default:v(()=>[k(se(t.title),1)]),_:1}),om(n.$slots,"default")]),_:3}))}}),Nee=Fe({name:"FloorSettings",props:{},setup:()=>({printersStore:Xt(),floorStore:io(),addOrUpdateFloorDialog:rn(sn.AddOrUpdateFloorDialog),snackbar:Ft()}),data:()=>({selectedItem:0,editedFloorName:"",editedFloorNumber:0}),computed:{floors(){return this.floorStore.floors},selectedFloor(){return this.floorStore.floors[this.selectedItem]},showAddedPrinters(){var e;return((e=this.selectedFloor.printers)==null?void 0:e.length)+1}},methods:{printerInFloor(e,t){if(!(e!=null&&e.printers))return;const n=e.printers[t-1];if(n)return this.printersStore.printer(n.printerId)},async createFloor(){await this.addOrUpdateFloorDialog.openDialog()},setEditedPrinterFloorName(){this.editedFloorName=this.selectedFloor.name},setEditedPrinterFloorNumber(){this.editedFloorNumber=this.selectedFloor.floor},async updatePrinterFloorName(){var t;if(!((t=this.selectedFloor)!=null&&t.id))return;const{id:e}=this.selectedFloor;await this.floorStore.updateFloorName({floorId:e,name:this.editedFloorName}),this.snackbar.info("Floor name updated")},async updatePrinterFloorNumber(){var t;if(!((t=this.selectedFloor)!=null&&t.id))return;const{id:e}=this.selectedFloor;await this.floorStore.updateFloorNumber({floorId:e,floorNumber:this.editedFloorNumber}),this.snackbar.info("Floor level updated"),this.selectedItem=-1},async clickDeleteFloor(){var e;(e=this.selectedFloor)!=null&&e.id&&(await this.floorStore.deleteFloor(this.selectedFloor.id),this.snackbar.info("Floor deleted"))},async deletePrinterFromFloor(e,t){const n=this.printerInFloor(e,t);!(e!=null&&e.id)||!(n!=null&&n.id)||(await this.floorStore.deletePrinterFromFloor({floorId:e.id,printerId:n.id}),this.snackbar.info("Printer removed from floor"))}}}),Bee={key:1};function Vee(e,t,n,r,s,i){const o=KD,a=$n("v-list-item-action-text"),l=$n("v-list-item-group"),u=$n("v-edit-dialog"),c=$n("v-list-item-content");return $(),te(kt,null,{default:v(()=>[p(o,{icon:"house_siding",title:"Floors"}),p(Ht,{subheader:"",lines:"three"},{default:v(()=>[p(Nr,null,{default:v(()=>[...t[7]||(t[7]=[k("Floors",-1)])]),_:1}),p(ze,null,{default:v(()=>[p(ft,null,{default:v(()=>[...t[8]||(t[8]=[k(" Create new floor ",-1)])]),_:1}),p(St,null,{default:v(()=>[t[10]||(t[10]=k(" Creates an empty department/floor to view printer groups ",-1)),t[11]||(t[11]=C("br",null,null,-1)),p(ne,{color:"primary",onClick:t[0]||(t[0]=d=>e.createFloor())},{default:v(()=>[...t[9]||(t[9]=[k(" Create floor ",-1)])]),_:1})]),_:1})]),_:1})]),_:1}),p(ln),p(st,{"no-gutters":""},{default:v(()=>[p(We,null,{default:v(()=>[p(Ht,{density:"compact"},{default:v(()=>[p(l,{modelValue:e.selectedItem,"onUpdate:modelValue":t[1]||(t[1]=d=>e.selectedItem=d)},{default:v(()=>[($(!0),ve(Oe,null,Qt(e.floors,d=>($(),te(ze,{key:d.id},{default:v(()=>[p(ft,null,{default:v(()=>[k(se(d.name),1)]),_:2},1024),p(St,null,{default:v(()=>[k(se(d.printers.length||0)+" assigned ",1)]),_:2},1024),p(a,null,{default:v(()=>[k(" Floor number: "+se(d.floor),1)]),_:2},1024)]),_:2},1024))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),p(We,null,{default:v(()=>[p(wr,null,{default:v(()=>[p(Wx,null,{default:v(({isHovering:d,props:f})=>[p(On,Dv(Yh(f)),{default:v(()=>[e.selectedFloor?($(),te(u,{key:0,onOpen:e.setEditedPrinterFloorName,onSave:e.updatePrinterFloorName},{input:v(()=>[p(at,{modelValue:e.editedFloorName,"onUpdate:modelValue":t[2]||(t[2]=h=>e.editedFloorName=h),"return-value":e.editedFloorName,"onUpdate:returnValue":t[3]||(t[3]=h=>e.editedFloorName=h),counter:"",label:"Edit","single-line":""},null,8,["modelValue","return-value"])]),default:v(()=>[p(ne,{color:"secondary"},{default:v(()=>[d?($(),te(Z,{key:0,size:"small"},{default:v(()=>[...t[12]||(t[12]=[k(" edit ",-1)])]),_:1})):pe("",!0),k(" "+se(e.selectedFloor.name),1)]),_:2},1024)]),_:2},1032,["onOpen","onSave"])):($(),ve("span",Bee," Select a floor on the left "))]),_:2},1040)]),_:1}),p(Wx,null,{default:v(({isHovering:d,props:f})=>[p(On,Dv(Yh(f)),{default:v(()=>[e.selectedFloor?($(),te(u,{key:0,onOpen:e.setEditedPrinterFloorNumber,onSave:e.updatePrinterFloorNumber},{input:v(()=>[p(at,{modelValue:e.editedFloorNumber,"onUpdate:modelValue":t[4]||(t[4]=h=>e.editedFloorNumber=h),"return-value":e.editedFloorNumber,"onUpdate:returnValue":t[5]||(t[5]=h=>e.editedFloorNumber=h),label:"Edit","single-line":"",type:"number"},null,8,["modelValue","return-value"])]),default:v(()=>[p(ne,{color:"secondary"},{default:v(()=>[d?($(),te(Z,{key:0,size:"small"},{default:v(()=>[...t[13]||(t[13]=[k(" edit ",-1)])]),_:1})):pe("",!0),k(" "+se(e.selectedFloor.floor),1)]),_:2},1024)]),_:2},1032,["onOpen","onSave"])):pe("",!0)]),_:2},1040)]),_:1}),p(Tn),e.selectedFloor?($(),te(ne,{key:0,color:"primary",onClick:t[6]||(t[6]=d=>e.clickDeleteFloor())},{default:v(()=>[p(Z,null,{default:v(()=>[...t[14]||(t[14]=[k("delete",-1)])]),_:1}),t[15]||(t[15]=k(" Delete floor ",-1))]),_:1})):pe("",!0)]),_:1}),e.selectedFloor?($(),te(Ht,{key:0},{default:v(()=>[($(!0),ve(Oe,null,Qt(e.showAddedPrinters,d=>($(),te(ze,{key:d},{default:v(()=>[e.printerInFloor(e.selectedFloor,d)?($(),te(c,{key:0},{default:v(()=>[p(ft,null,{default:v(()=>{var f;return[k(se((f=e.printerInFloor(e.selectedFloor,d))==null?void 0:f.name),1)]}),_:2},1024)]),_:2},1024)):pe("",!0),e.printerInFloor(e.selectedFloor,d)?($(),te(Su,{key:1},{default:v(()=>[p(ne,{onClick:f=>e.deletePrinterFromFloor(e.selectedFloor,d)},{default:v(()=>[p(Z,null,{default:v(()=>[...t[16]||(t[16]=[k("close",-1)])]),_:1}),t[17]||(t[17]=k(" Clear ",-1))]),_:1},8,["onClick"])]),_:2},1024)):pe("",!0)]),_:2},1024))),128))]),_:1})):pe("",!0)]),_:1})]),_:1})]),_:1})}const Uee=fl(Nee,[["render",Vee]]),zee="/img/DavidZwart.jpg",YD="0.0.22",Hee={key:0},jee={key:1},Wee=Fe({__name:"AboutView",setup(e){const t=K(""),n=K(""),r=K(YD);return yt(async()=>{const s=await _a.getVersion();t.value=s.version,n.value=s.monsterPi}),(s,i)=>($(),te(kt,null,{default:v(()=>[p(an,null,{default:v(()=>[...i[0]||(i[0]=[k(" About FDM Monster",-1),C("strong",null," © ",-1)])]),_:1}),p(nn,null,{default:v(()=>[...i[1]||(i[1]=[k(" The first prototype of FDM Monster",-1),C("strong",null," © ",-1),k(" was created by David Zwart in 2021 in collaboration with ",-1),C("strong",null,[C("a",{href:"https://mtb3d.com"}," MTB3D ")],-1),k(". This open-source prototype proved a strong factor in process and logistics optimization for a 3D Printing company with 100+ printers. Due to it's success, we decided to keep it open-source and free! ",-1)])]),_:1}),p(nn,null,{default:v(()=>[i[4]||(i[4]=k(" The latest 3D Printing Farm server named FDM Monster has been tested for 2 years using a custom image for running 4 OctoPrint images on a Raspberry Pi. ",-1)),i[5]||(i[5]=C("br",null,null,-1)),i[6]||(i[6]=k(" This version uses the famous ",-1)),i[7]||(i[7]=C("a",{href:"https://nodejs.org/en",target:"_blank"},[C("strong",null," Node.js framework ")],-1)),i[8]||(i[8]=k(" together with Awilix and ExpressJS for its server, and ",-1)),i[9]||(i[9]=C("a",{href:"https://vuejs.org/",target:"_blank"},[C("strong",null," Vue 2 ")],-1)),i[10]||(i[10]=k(" and ",-1)),i[11]||(i[11]=C("a",{href:"https://next.vuetifyjs.com/",target:"_blank"},[C("strong",null," Vuetify 2 ")],-1)),i[12]||(i[12]=k(" to set a base for FDM Monster Client",-1)),i[13]||(i[13]=C("strong",null," © ",-1)),i[14]||(i[14]=k(" - the webapp. ",-1)),i[15]||(i[15]=C("br",null,null,-1)),i[16]||(i[16]=C("br",null,null,-1)),C("strong",null," Your server's version is: "+se(t.value),1),i[17]||(i[17]=C("br",null,null,-1)),C("strong",null," Your clients's version is: "+se(r.value),1),i[18]||(i[18]=C("br",null,null,-1)),n.value?($(),ve("strong",Hee,[k(" Your MonsterPi version is: "+se(n.value),1),i[2]||(i[2]=C("br",null,null,-1))])):($(),ve("strong",jee," No MonsterPi distro detected. ")),i[19]||(i[19]=C("br",null,null,-1)),p(ne,{class:"mt-3",variant:"outlined",to:"/settings/software-upgrade"},{default:v(()=>[...i[3]||(i[3]=[k(" Visit Upgrade Settings ",-1)])]),_:1})]),_:1}),p(an,null,{default:v(()=>[...i[20]||(i[20]=[k(" Documentation ",-1)])]),_:1}),p(nn,null,{default:v(()=>[C("strong",null,[p(ne,{color:"primary",href:"https://docs.fdm-monster.net",style:{color:"white"},target:"_blank"},{default:v(()=>[p(Z,{class:"mr-2"},{default:v(()=>[...i[21]||(i[21]=[k("menu_book",-1)])]),_:1}),i[22]||(i[22]=k(" FDM Monster documentation site ",-1))]),_:1})]),i[23]||(i[23]=C("br",null,null,-1))]),_:1}),p(an,null,{default:v(()=>[i[25]||(i[25]=k(" Bug reports ",-1)),p(Z,null,{default:v(()=>[...i[24]||(i[24]=[k("bug",-1)])]),_:1})]),_:1}),p(nn,null,{default:v(()=>[...i[26]||(i[26]=[k(" Did you find a bug, or a feature that needs work? We would love to hear about it! ",-1),C("br",null,null,-1),C("strong",null," We have multiple ways to report it: ",-1),C("h3",null,[C("ul",{class:"ml-5"},[C("li",null,"Mail to davidzwa@gmail.com"),C("li",null,[C("a",{href:"https://discord.gg/mwA8uP8CMc",style:{color:"white"},target:"_blank"}," Discord server ")]),C("li",null,[C("strong",null,[C("a",{href:"https://github.com/fdm-monster/fdm-monster/issues",style:{color:"white"},target:"_blank"},[k(" FDM Monster "),C("strong",null," © "),k(" Github Issues ")])])]),C("li",null,[C("a",{href:"https://fdm-monster.net",style:{color:"white"},target:"_blank"}," Website ")])])],-1)])]),_:1}),p(an,null,{default:v(()=>[...i[27]||(i[27]=[k(" About me ",-1)])]),_:1}),p(nn,null,{default:v(()=>[...i[28]||(i[28]=[C("img",{src:zee,width:"150px"},null,-1),C("h4",{class:"mt-2"},[C("a",{href:"https://www.linkedin.com/in/david-zwart-88514083/",style:{color:"white"},target:"_blank"}," LinkedIn "),C("a",{class:"ml-2",href:"https://github.com/davidzwa",style:{color:"white"},target:"_blank"}," Github Profile ")],-1),k(" David Zwart MSc., post-graduate from the TU Delft (Embedded Systems), author of FDM Monster",-1),C("strong",null," © ",-1)])]),_:1})]),_:1}))}});/*!
|
|
71
|
+
* @kurkle/color v0.3.2
|
|
72
|
+
* https://github.com/kurkle/color#readme
|
|
73
|
+
* (c) 2023 Jukka Kurkela
|
|
74
|
+
* Released under the MIT License
|
|
75
|
+
*/function df(e){return e+.5|0}const Po=(e,t,n)=>Math.max(Math.min(e,n),t);function xc(e){return Po(df(e*2.55),0,255)}function Lo(e){return Po(df(e*255),0,255)}function Oi(e){return Po(df(e/2.55)/100,0,1)}function qx(e){return Po(df(e*100),0,100)}const ns={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Eb=[..."0123456789ABCDEF"],qee=e=>Eb[e&15],Gee=e=>Eb[(e&240)>>4]+Eb[e&15],zf=e=>(e&240)>>4===(e&15),Kee=e=>zf(e.r)&&zf(e.g)&&zf(e.b)&&zf(e.a);function Yee(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&ns[e[1]]*17,g:255&ns[e[2]]*17,b:255&ns[e[3]]*17,a:t===5?ns[e[4]]*17:255}:(t===7||t===9)&&(n={r:ns[e[1]]<<4|ns[e[2]],g:ns[e[3]]<<4|ns[e[4]],b:ns[e[5]]<<4|ns[e[6]],a:t===9?ns[e[7]]<<4|ns[e[8]]:255})),n}const Xee=(e,t)=>e<255?t(e):"";function Qee(e){var t=Kee(e)?qee:Gee;return e?"#"+t(e.r)+t(e.g)+t(e.b)+Xee(e.a,t):void 0}const Jee=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function XD(e,t,n){const r=t*Math.min(n,1-n),s=(i,o=(i+e/30)%12)=>n-r*Math.max(Math.min(o-3,9-o,1),-1);return[s(0),s(8),s(4)]}function Zee(e,t,n){const r=(s,i=(s+e/60)%6)=>n-n*t*Math.max(Math.min(i,4-i,1),0);return[r(5),r(3),r(1)]}function ete(e,t,n){const r=XD(e,1,.5);let s;for(t+n>1&&(s=1/(t+n),t*=s,n*=s),s=0;s<3;s++)r[s]*=1-t-n,r[s]+=t;return r}function tte(e,t,n,r,s){return e===s?(t-n)/r+(t<n?6:0):t===s?(n-e)/r+2:(e-t)/r+4}function W0(e){const n=e.r/255,r=e.g/255,s=e.b/255,i=Math.max(n,r,s),o=Math.min(n,r,s),a=(i+o)/2;let l,u,c;return i!==o&&(c=i-o,u=a>.5?c/(2-i-o):c/(i+o),l=tte(n,r,s,c,i),l=l*60+.5),[l|0,u||0,a]}function q0(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(Lo)}function G0(e,t,n){return q0(XD,e,t,n)}function nte(e,t,n){return q0(ete,e,t,n)}function rte(e,t,n){return q0(Zee,e,t,n)}function QD(e){return(e%360+360)%360}function ste(e){const t=Jee.exec(e);let n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?xc(+t[5]):Lo(+t[5]));const s=QD(+t[2]),i=+t[3]/100,o=+t[4]/100;return t[1]==="hwb"?r=nte(s,i,o):t[1]==="hsv"?r=rte(s,i,o):r=G0(s,i,o),{r:r[0],g:r[1],b:r[2],a:n}}function ite(e,t){var n=W0(e);n[0]=QD(n[0]+t),n=G0(n),e.r=n[0],e.g=n[1],e.b=n[2]}function ote(e){if(!e)return;const t=W0(e),n=t[0],r=qx(t[1]),s=qx(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${s}%, ${Oi(e.a)})`:`hsl(${n}, ${r}%, ${s}%)`}const Gx={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Kx={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function ate(){const e={},t=Object.keys(Kx),n=Object.keys(Gx);let r,s,i,o,a;for(r=0;r<t.length;r++){for(o=a=t[r],s=0;s<n.length;s++)i=n[s],a=a.replace(i,Gx[i]);i=parseInt(Kx[o],16),e[a]=[i>>16&255,i>>8&255,i&255]}return e}let Hf;function lte(e){Hf||(Hf=ate(),Hf.transparent=[0,0,0,0]);const t=Hf[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const ute=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function cte(e){const t=ute.exec(e);let n=255,r,s,i;if(t){if(t[7]!==r){const o=+t[7];n=t[8]?xc(o):Po(o*255,0,255)}return r=+t[1],s=+t[3],i=+t[5],r=255&(t[2]?xc(r):Po(r,0,255)),s=255&(t[4]?xc(s):Po(s,0,255)),i=255&(t[6]?xc(i):Po(i,0,255)),{r,g:s,b:i,a:n}}}function dte(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${Oi(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const dv=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,Sl=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function fte(e,t,n){const r=Sl(Oi(e.r)),s=Sl(Oi(e.g)),i=Sl(Oi(e.b));return{r:Lo(dv(r+n*(Sl(Oi(t.r))-r))),g:Lo(dv(s+n*(Sl(Oi(t.g))-s))),b:Lo(dv(i+n*(Sl(Oi(t.b))-i))),a:e.a+n*(t.a-e.a)}}function jf(e,t,n){if(e){let r=W0(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=G0(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function JD(e,t){return e&&Object.assign(t||{},e)}function Yx(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=Lo(e[3]))):(t=JD(e,{r:0,g:0,b:0,a:1}),t.a=Lo(t.a)),t}function hte(e){return e.charAt(0)==="r"?cte(e):ste(e)}class Cd{constructor(t){if(t instanceof Cd)return t;const n=typeof t;let r;n==="object"?r=Yx(t):n==="string"&&(r=Yee(t)||lte(t)||hte(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=JD(this._rgb);return t&&(t.a=Oi(t.a)),t}set rgb(t){this._rgb=Yx(t)}rgbString(){return this._valid?dte(this._rgb):void 0}hexString(){return this._valid?Qee(this._rgb):void 0}hslString(){return this._valid?ote(this._rgb):void 0}mix(t,n){if(t){const r=this.rgb,s=t.rgb;let i;const o=n===i?.5:n,a=2*o-1,l=r.a-s.a,u=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;i=1-u,r.r=255&u*r.r+i*s.r+.5,r.g=255&u*r.g+i*s.g+.5,r.b=255&u*r.b+i*s.b+.5,r.a=o*r.a+(1-o)*s.a,this.rgb=r}return this}interpolate(t,n){return t&&(this._rgb=fte(this._rgb,t._rgb,n)),this}clone(){return new Cd(this.rgb)}alpha(t){return this._rgb.a=Lo(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=df(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return jf(this._rgb,2,t),this}darken(t){return jf(this._rgb,2,-t),this}saturate(t){return jf(this._rgb,1,t),this}desaturate(t){return jf(this._rgb,1,-t),this}rotate(t){return ite(this._rgb,t),this}}/*!
|
|
76
|
+
* Chart.js v4.5.0
|
|
77
|
+
* https://www.chartjs.org
|
|
78
|
+
* (c) 2025 Chart.js Contributors
|
|
79
|
+
* Released under the MIT License
|
|
80
|
+
*/function Ei(){}const pte=(()=>{let e=0;return()=>e++})();function Ut(e){return e==null}function An(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function Ct(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function bs(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Qs(e,t){return bs(e)?e:t}function Tt(e,t){return typeof e>"u"?t:e}const mte=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function Zt(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function Lt(e,t,n,r){let s,i,o;if(An(e))for(i=e.length,s=0;s<i;s++)t.call(n,e[s],s);else if(Ct(e))for(o=Object.keys(e),i=o.length,s=0;s<i;s++)t.call(n,e[o[s]],o[s])}function Np(e,t){let n,r,s,i;if(!e||!t||e.length!==t.length)return!1;for(n=0,r=e.length;n<r;++n)if(s=e[n],i=t[n],s.datasetIndex!==i.datasetIndex||s.index!==i.index)return!1;return!0}function Bp(e){if(An(e))return e.map(Bp);if(Ct(e)){const t=Object.create(null),n=Object.keys(e),r=n.length;let s=0;for(;s<r;++s)t[n[s]]=Bp(e[n[s]]);return t}return e}function ZD(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function gte(e,t,n,r){if(!ZD(e))return;const s=t[e],i=n[e];Ct(s)&&Ct(i)?Td(s,i,r):t[e]=Bp(i)}function Td(e,t,n){const r=An(t)?t:[t],s=r.length;if(!Ct(e))return e;n=n||{};const i=n.merger||gte;let o;for(let a=0;a<s;++a){if(o=r[a],!Ct(o))continue;const l=Object.keys(o);for(let u=0,c=l.length;u<c;++u)i(l[u],e,o,n)}return e}function Wc(e,t){return Td(e,t,{merger:vte})}function vte(e,t,n){if(!ZD(e))return;const r=t[e],s=n[e];Ct(r)&&Ct(s)?Wc(r,s):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=Bp(s))}const Xx={"":e=>e,x:e=>e.x,y:e=>e.y};function yte(e){const t=e.split("."),n=[];let r="";for(const s of t)r+=s,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function bte(e){const t=yte(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function Cu(e,t){return(Xx[t]||(Xx[t]=bte(t)))(e)}function K0(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Pd=e=>typeof e<"u",Go=e=>typeof e=="function",Qx=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function wte(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const ur=Math.PI,$o=2*ur,Vp=Number.POSITIVE_INFINITY,Ste=ur/180,Ms=ur/2,la=ur/4,Jx=ur*2/3,Cb=Math.log10,Fo=Math.sign;function $h(e,t,n){return Math.abs(e-t)<n}function Zx(e){const t=Math.round(e);e=$h(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(Cb(e))),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function _te(e){const t=[],n=Math.sqrt(e);let r;for(r=1;r<n;r++)e%r===0&&(t.push(r),t.push(e/r));return n===(n|0)&&t.push(n),t.sort((s,i)=>s-i).pop(),t}function kte(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function Up(e){return!kte(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function xte(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function Ete(e,t,n){let r,s,i;for(r=0,s=e.length;r<s;r++)i=e[r][n],isNaN(i)||(t.min=Math.min(t.min,i),t.max=Math.max(t.max,i))}function xa(e){return e*(ur/180)}function Cte(e){return e*(180/ur)}function eE(e){if(!bs(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function Tte(e,t){const n=t.x-e.x,r=t.y-e.y,s=Math.sqrt(n*n+r*r);let i=Math.atan2(r,n);return i<-.5*ur&&(i+=$o),{angle:i,distance:s}}function Pte(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function ua(e){return(e%$o+$o)%$o}function Rte(e,t,n,r){const s=ua(e),i=ua(t),o=ua(n),a=ua(i-s),l=ua(o-s),u=ua(s-i),c=ua(s-o);return s===i||s===o||r&&i===o||a>l&&u<c}function Ds(e,t,n){return Math.max(t,Math.min(n,e))}function Ite(e){return Ds(e,-32768,32767)}function Fl(e,t,n,r=1e-6){return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function Y0(e,t,n){n=n||(o=>e[o]<t);let r=e.length-1,s=0,i;for(;r-s>1;)i=s+r>>1,n(i)?s=i:r=i;return{lo:s,hi:r}}const Tb=(e,t,n,r)=>Y0(e,n,r?s=>{const i=e[s][t];return i<n||i===n&&e[s+1][t]===n}:s=>e[s][t]<n),Ate=(e,t,n)=>Y0(e,n,r=>e[r][t]>=n);function Ote(e,t,n){let r=0,s=e.length;for(;r<s&&e[r]<t;)r++;for(;s>r&&e[s-1]>n;)s--;return r>0||s<e.length?e.slice(r,s):e}const e2=["push","pop","shift","splice","unshift"];function Mte(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),e2.forEach(n=>{const r="_onData"+K0(n),s=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...i){const o=s.apply(this,i);return e._chartjs.listeners.forEach(a=>{typeof a[r]=="function"&&a[r](...i)}),o}})})}function tE(e,t){const n=e._chartjs;if(!n)return;const r=n.listeners,s=r.indexOf(t);s!==-1&&r.splice(s,1),!(r.length>0)&&(e2.forEach(i=>{delete e[i]}),delete e._chartjs)}function t2(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const n2=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function r2(e,t){let n=[],r=!1;return function(...s){n=s,r||(r=!0,n2.call(window,()=>{r=!1,e.apply(t,n)}))}}function Dte(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}const X0=e=>e==="start"?"left":e==="end"?"right":"center",er=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,Lte=(e,t,n,r)=>e===(r?"left":"right")?n:e==="center"?(t+n)/2:t,Wf=e=>e===0||e===1,nE=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*$o/n)),rE=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*$o/n)+1,qc={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*Ms)+1,easeOutSine:e=>Math.sin(e*Ms),easeInOutSine:e=>-.5*(Math.cos(ur*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>Wf(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>Wf(e)?e:nE(e,.075,.3),easeOutElastic:e=>Wf(e)?e:rE(e,.075,.3),easeInOutElastic(e){return Wf(e)?e:e<.5?.5*nE(e*2,.1125,.45):.5+.5*rE(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-qc.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?qc.easeInBounce(e*2)*.5:qc.easeOutBounce(e*2-1)*.5+.5};function s2(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function sE(e){return s2(e)?e:new Cd(e)}function fv(e){return s2(e)?e:new Cd(e).saturate(.5).darken(.1).hexString()}const $te=["x","y","borderWidth","radius","tension"],Fte=["color","borderColor","backgroundColor"];function Nte(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:Fte},numbers:{type:"number",properties:$te}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function Bte(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const iE=new Map;function Vte(e,t){t=t||{};const n=e+JSON.stringify(t);let r=iE.get(n);return r||(r=new Intl.NumberFormat(e,t),iE.set(n,r)),r}function i2(e,t,n){return Vte(t,n).format(e)}const o2={values(e){return An(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const r=this.chart.options.locale;let s,i=e;if(n.length>1){const u=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(u<1e-4||u>1e15)&&(s="scientific"),i=Ute(e,n)}const o=Cb(Math.abs(i)),a=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:s,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),i2(e,r,l)},logarithmic(e,t,n){if(e===0)return"0";const r=n[t].significand||e/Math.pow(10,Math.floor(Cb(e)));return[1,2,3,5,10,15].includes(r)||t>.8*n.length?o2.numeric.call(this,e,t,n):""}};function Ute(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var a2={formatters:o2};function zte(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:a2.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const rl=Object.create(null),Pb=Object.create(null);function Gc(e,t){if(!t)return e;const n=t.split(".");for(let r=0,s=n.length;r<s;++r){const i=n[r];e=e[i]||(e[i]=Object.create(null))}return e}function hv(e,t,n){return typeof t=="string"?Td(Gc(e,t),n):Td(Gc(e,""),t)}class Hte{constructor(t,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=r=>r.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(r,s)=>fv(s.backgroundColor),this.hoverBorderColor=(r,s)=>fv(s.borderColor),this.hoverColor=(r,s)=>fv(s.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(n)}set(t,n){return hv(this,t,n)}get(t){return Gc(this,t)}describe(t,n){return hv(Pb,t,n)}override(t,n){return hv(rl,t,n)}route(t,n,r,s){const i=Gc(this,t),o=Gc(this,r),a="_"+n;Object.defineProperties(i,{[a]:{value:i[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[a],u=o[s];return Ct(l)?Object.assign({},u,l):Tt(l,u)},set(l){this[a]=l}}})}apply(t){t.forEach(n=>n(this))}}var wn=new Hte({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Nte,Bte,zte]);function jte(e){return!e||Ut(e.size)||Ut(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function oE(e,t,n,r,s){let i=t[s];return i||(i=t[s]=e.measureText(s).width,n.push(s)),i>r&&(r=i),r}function ca(e,t,n){const r=e.currentDevicePixelRatio,s=n!==0?Math.max(n/2,.5):0;return Math.round((t-s)*r)/r+s}function aE(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function lE(e,t,n,r){l2(e,t,n,r,null)}function l2(e,t,n,r,s){let i,o,a,l,u,c,d,f;const h=t.pointStyle,g=t.rotation,m=t.radius;let y=(g||0)*Ste;if(h&&typeof h=="object"&&(i=h.toString(),i==="[object HTMLImageElement]"||i==="[object HTMLCanvasElement]")){e.save(),e.translate(n,r),e.rotate(y),e.drawImage(h,-h.width/2,-h.height/2,h.width,h.height),e.restore();return}if(!(isNaN(m)||m<=0)){switch(e.beginPath(),h){default:s?e.ellipse(n,r,s/2,m,0,0,$o):e.arc(n,r,m,0,$o),e.closePath();break;case"triangle":c=s?s/2:m,e.moveTo(n+Math.sin(y)*c,r-Math.cos(y)*m),y+=Jx,e.lineTo(n+Math.sin(y)*c,r-Math.cos(y)*m),y+=Jx,e.lineTo(n+Math.sin(y)*c,r-Math.cos(y)*m),e.closePath();break;case"rectRounded":u=m*.516,l=m-u,o=Math.cos(y+la)*l,d=Math.cos(y+la)*(s?s/2-u:l),a=Math.sin(y+la)*l,f=Math.sin(y+la)*(s?s/2-u:l),e.arc(n-d,r-a,u,y-ur,y-Ms),e.arc(n+f,r-o,u,y-Ms,y),e.arc(n+d,r+a,u,y,y+Ms),e.arc(n-f,r+o,u,y+Ms,y+ur),e.closePath();break;case"rect":if(!g){l=Math.SQRT1_2*m,c=s?s/2:l,e.rect(n-c,r-l,2*c,2*l);break}y+=la;case"rectRot":d=Math.cos(y)*(s?s/2:m),o=Math.cos(y)*m,a=Math.sin(y)*m,f=Math.sin(y)*(s?s/2:m),e.moveTo(n-d,r-a),e.lineTo(n+f,r-o),e.lineTo(n+d,r+a),e.lineTo(n-f,r+o),e.closePath();break;case"crossRot":y+=la;case"cross":d=Math.cos(y)*(s?s/2:m),o=Math.cos(y)*m,a=Math.sin(y)*m,f=Math.sin(y)*(s?s/2:m),e.moveTo(n-d,r-a),e.lineTo(n+d,r+a),e.moveTo(n+f,r-o),e.lineTo(n-f,r+o);break;case"star":d=Math.cos(y)*(s?s/2:m),o=Math.cos(y)*m,a=Math.sin(y)*m,f=Math.sin(y)*(s?s/2:m),e.moveTo(n-d,r-a),e.lineTo(n+d,r+a),e.moveTo(n+f,r-o),e.lineTo(n-f,r+o),y+=la,d=Math.cos(y)*(s?s/2:m),o=Math.cos(y)*m,a=Math.sin(y)*m,f=Math.sin(y)*(s?s/2:m),e.moveTo(n-d,r-a),e.lineTo(n+d,r+a),e.moveTo(n+f,r-o),e.lineTo(n-f,r+o);break;case"line":o=s?s/2:Math.cos(y)*m,a=Math.sin(y)*m,e.moveTo(n-o,r-a),e.lineTo(n+o,r+a);break;case"dash":e.moveTo(n,r),e.lineTo(n+Math.cos(y)*(s?s/2:m),r+Math.sin(y)*m);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function u2(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function Q0(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function J0(e){e.restore()}function Wte(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),Ut(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function qte(e,t,n,r,s){if(s.strikethrough||s.underline){const i=e.measureText(r),o=t-i.actualBoundingBoxLeft,a=t+i.actualBoundingBoxRight,l=n-i.actualBoundingBoxAscent,u=n+i.actualBoundingBoxDescent,c=s.strikethrough?(l+u)/2:u;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=s.decorationWidth||2,e.moveTo(o,c),e.lineTo(a,c),e.stroke()}}function Gte(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function Rd(e,t,n,r,s,i={}){const o=An(t)?t:[t],a=i.strokeWidth>0&&i.strokeColor!=="";let l,u;for(e.save(),e.font=s.string,Wte(e,i),l=0;l<o.length;++l)u=o[l],i.backdrop&&Gte(e,i.backdrop),a&&(i.strokeColor&&(e.strokeStyle=i.strokeColor),Ut(i.strokeWidth)||(e.lineWidth=i.strokeWidth),e.strokeText(u,n,r,i.maxWidth)),e.fillText(u,n,r,i.maxWidth),qte(e,n,r,u,i),r+=Number(s.lineHeight);e.restore()}function zp(e,t){const{x:n,y:r,w:s,h:i,radius:o}=t;e.arc(n+o.topLeft,r+o.topLeft,o.topLeft,1.5*ur,ur,!0),e.lineTo(n,r+i-o.bottomLeft),e.arc(n+o.bottomLeft,r+i-o.bottomLeft,o.bottomLeft,ur,Ms,!0),e.lineTo(n+s-o.bottomRight,r+i),e.arc(n+s-o.bottomRight,r+i-o.bottomRight,o.bottomRight,Ms,0,!0),e.lineTo(n+s,r+o.topRight),e.arc(n+s-o.topRight,r+o.topRight,o.topRight,0,-Ms,!0),e.lineTo(n+o.topLeft,r)}const Kte=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Yte=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Xte(e,t){const n=(""+e).match(Kte);if(!n||n[1]==="normal")return t*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return t*e}const Qte=e=>+e||0;function c2(e,t){const n={},r=Ct(t),s=r?Object.keys(t):t,i=Ct(e)?r?o=>Tt(e[o],e[t[o]]):o=>e[o]:()=>e;for(const o of s)n[o]=Qte(i(o));return n}function d2(e){return c2(e,{top:"y",right:"x",bottom:"y",left:"x"})}function jl(e){return c2(e,["topLeft","topRight","bottomLeft","bottomRight"])}function ws(e){const t=d2(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function ar(e,t){e=e||{},t=t||wn.font;let n=Tt(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let r=Tt(e.style,t.style);r&&!(""+r).match(Yte)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const s={family:Tt(e.family,t.family),lineHeight:Xte(Tt(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:Tt(e.weight,t.weight),string:""};return s.string=jte(s),s}function qf(e,t,n,r){let s,i,o;for(s=0,i=e.length;s<i;++s)if(o=e[s],o!==void 0&&o!==void 0)return o}function Jte(e,t,n){const{min:r,max:s}=e,i=mte(t,(s-r)/2),o=(a,l)=>n&&a===0?0:a+l;return{min:o(r,-Math.abs(i)),max:o(s,i)}}function Zu(e,t){return Object.assign(Object.create(e),t)}function Z0(e,t=[""],n,r,s=()=>e[0]){const i=n||e;typeof r>"u"&&(r=m2("_fallback",e));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:i,_fallback:r,_getTarget:s,override:a=>Z0([a,...e],t,i,r)};return new Proxy(o,{deleteProperty(a,l){return delete a[l],delete a._keys,delete e[0][l],!0},get(a,l){return h2(a,l,()=>one(l,t,e,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(a,l){return cE(a).includes(l)},ownKeys(a){return cE(a)},set(a,l,u){const c=a._storage||(a._storage=s());return a[l]=c[l]=u,delete a._keys,!0}})}function Tu(e,t,n,r){const s={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:f2(e,r),setContext:i=>Tu(e,i,n,r),override:i=>Tu(e.override(i),t,n,r)};return new Proxy(s,{deleteProperty(i,o){return delete i[o],delete e[o],!0},get(i,o,a){return h2(i,o,()=>ene(i,o,a))},getOwnPropertyDescriptor(i,o){return i._descriptors.allKeys?Reflect.has(e,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,o)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(i,o){return Reflect.has(e,o)},ownKeys(){return Reflect.ownKeys(e)},set(i,o,a){return e[o]=a,delete i[o],!0}})}function f2(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:s=t.allKeys}=e;return{allKeys:s,scriptable:n,indexable:r,isScriptable:Go(n)?n:()=>n,isIndexable:Go(r)?r:()=>r}}const Zte=(e,t)=>e?e+K0(t):t,ew=(e,t)=>Ct(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function h2(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const r=n();return e[t]=r,r}function ene(e,t,n){const{_proxy:r,_context:s,_subProxy:i,_descriptors:o}=e;let a=r[t];return Go(a)&&o.isScriptable(t)&&(a=tne(t,a,e,n)),An(a)&&a.length&&(a=nne(t,a,e,o.isIndexable)),ew(t,a)&&(a=Tu(a,s,i&&i[t],o)),a}function tne(e,t,n,r){const{_proxy:s,_context:i,_subProxy:o,_stack:a}=n;if(a.has(e))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+e);a.add(e);let l=t(i,o||r);return a.delete(e),ew(e,l)&&(l=tw(s._scopes,s,e,l)),l}function nne(e,t,n,r){const{_proxy:s,_context:i,_subProxy:o,_descriptors:a}=n;if(typeof i.index<"u"&&r(e))return t[i.index%t.length];if(Ct(t[0])){const l=t,u=s._scopes.filter(c=>c!==l);t=[];for(const c of l){const d=tw(u,s,e,c);t.push(Tu(d,i,o&&o[e],a))}}return t}function p2(e,t,n){return Go(e)?e(t,n):e}const rne=(e,t)=>e===!0?t:typeof e=="string"?Cu(t,e):void 0;function sne(e,t,n,r,s){for(const i of t){const o=rne(n,i);if(o){e.add(o);const a=p2(o._fallback,n,s);if(typeof a<"u"&&a!==n&&a!==r)return a}else if(o===!1&&typeof r<"u"&&n!==r)return null}return!1}function tw(e,t,n,r){const s=t._rootScopes,i=p2(t._fallback,n,r),o=[...e,...s],a=new Set;a.add(r);let l=uE(a,o,n,i||n,r);return l===null||typeof i<"u"&&i!==n&&(l=uE(a,o,i,l,r),l===null)?!1:Z0(Array.from(a),[""],s,i,()=>ine(t,n,r))}function uE(e,t,n,r,s){for(;n;)n=sne(e,t,n,r,s);return n}function ine(e,t,n){const r=e._getTarget();t in r||(r[t]={});const s=r[t];return An(s)&&Ct(n)?n:s||{}}function one(e,t,n,r){let s;for(const i of t)if(s=m2(Zte(i,e),n),typeof s<"u")return ew(e,s)?tw(n,r,e,s):s}function m2(e,t){for(const n of t){if(!n)continue;const r=n[e];if(typeof r<"u")return r}}function cE(e){let t=e._keys;return t||(t=e._keys=ane(e._scopes)),t}function ane(e){const t=new Set;for(const n of e)for(const r of Object.keys(n).filter(s=>!s.startsWith("_")))t.add(r);return Array.from(t)}function nw(){return typeof window<"u"&&typeof document<"u"}function rw(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function Hp(e,t,n){let r;return typeof e=="string"?(r=parseInt(e,10),e.indexOf("%")!==-1&&(r=r/100*t.parentNode[n])):r=e,r}const Xm=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function lne(e,t){return Xm(e).getPropertyValue(t)}const une=["top","right","bottom","left"];function Wa(e,t,n){const r={};n=n?"-"+n:"";for(let s=0;s<4;s++){const i=une[s];r[i]=parseFloat(e[t+"-"+i+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const cne=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function dne(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:s,offsetY:i}=r;let o=!1,a,l;if(cne(s,i,e.target))a=s,l=i;else{const u=t.getBoundingClientRect();a=r.clientX-u.left,l=r.clientY-u.top,o=!0}return{x:a,y:l,box:o}}function ma(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,s=Xm(n),i=s.boxSizing==="border-box",o=Wa(s,"padding"),a=Wa(s,"border","width"),{x:l,y:u,box:c}=dne(e,n),d=o.left+(c&&a.left),f=o.top+(c&&a.top);let{width:h,height:g}=t;return i&&(h-=o.width+a.width,g-=o.height+a.height),{x:Math.round((l-d)/h*n.width/r),y:Math.round((u-f)/g*n.height/r)}}function fne(e,t,n){let r,s;if(t===void 0||n===void 0){const i=e&&rw(e);if(!i)t=e.clientWidth,n=e.clientHeight;else{const o=i.getBoundingClientRect(),a=Xm(i),l=Wa(a,"border","width"),u=Wa(a,"padding");t=o.width-u.width-l.width,n=o.height-u.height-l.height,r=Hp(a.maxWidth,i,"clientWidth"),s=Hp(a.maxHeight,i,"clientHeight")}}return{width:t,height:n,maxWidth:r||Vp,maxHeight:s||Vp}}const Gf=e=>Math.round(e*10)/10;function hne(e,t,n,r){const s=Xm(e),i=Wa(s,"margin"),o=Hp(s.maxWidth,e,"clientWidth")||Vp,a=Hp(s.maxHeight,e,"clientHeight")||Vp,l=fne(e,t,n);let{width:u,height:c}=l;if(s.boxSizing==="content-box"){const f=Wa(s,"border","width"),h=Wa(s,"padding");u-=h.width+f.width,c-=h.height+f.height}return u=Math.max(0,u-i.width),c=Math.max(0,r?u/r:c-i.height),u=Gf(Math.min(u,o,l.maxWidth)),c=Gf(Math.min(c,a,l.maxHeight)),u&&!c&&(c=Gf(u/2)),(t!==void 0||n!==void 0)&&r&&l.height&&c>l.height&&(c=l.height,u=Gf(Math.floor(c*r))),{width:u,height:c}}function dE(e,t,n){const r=t||1,s=Math.floor(e.height*r),i=Math.floor(e.width*r);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const o=e.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${e.height}px`,o.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||o.height!==s||o.width!==i?(e.currentDevicePixelRatio=r,o.height=s,o.width=i,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}const pne=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};nw()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e}();function fE(e,t){const n=lne(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}const mne=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},gne=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function Wl(e,t,n){return e?mne(t,n):gne()}function g2(e,t){let n,r;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)}function v2(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function Kf(e,t,n){return e.options.clip?e[n]:t[n]}function vne(e,t){const{xScale:n,yScale:r}=e;return n&&r?{left:Kf(n,t,"left"),right:Kf(n,t,"right"),top:Kf(r,t,"top"),bottom:Kf(r,t,"bottom")}:t}function yne(e,t){const n=t._clip;if(n.disabled)return!1;const r=vne(t,e.chartArea);return{left:n.left===!1?0:r.left-(n.left===!0?0:n.left),right:n.right===!1?e.width:r.right+(n.right===!0?0:n.right),top:n.top===!1?0:r.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?e.height:r.bottom+(n.bottom===!0?0:n.bottom)}}/*!
|
|
81
|
+
* Chart.js v4.5.0
|
|
82
|
+
* https://www.chartjs.org
|
|
83
|
+
* (c) 2025 Chart.js Contributors
|
|
84
|
+
* Released under the MIT License
|
|
85
|
+
*/class bne{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,r,s){const i=n.listeners[s],o=n.duration;i.forEach(a=>a({chart:t,initial:n.initial,numSteps:o,currentStep:Math.min(r-n.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=n2.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,s)=>{if(!r.running||!r.items.length)return;const i=r.items;let o=i.length-1,a=!1,l;for(;o>=0;--o)l=i[o],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),a=!0):(i[o]=i[i.length-1],i.pop());a&&(s.draw(),this._notify(s,r,t,"progress")),i.length||(r.running=!1,this._notify(s,r,t,"complete"),r.initial=!1),n+=i.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,s)=>Math.max(r,s._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const r=n.items;let s=r.length-1;for(;s>=0;--s)r[s].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Pi=new bne;const hE="transparent",wne={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=sE(e||hE),s=r.valid&&sE(t||hE);return s&&s.valid?s.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class Sne{constructor(t,n,r,s){const i=n[r];s=qf([t.to,s,i,t.from]);const o=qf([t.from,i,s]);this._active=!0,this._fn=t.fn||wne[t.type||typeof o],this._easing=qc[t.easing]||qc.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=o,this._to=s,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const s=this._target[this._prop],i=r-this._start,o=this._duration-i;this._start=r,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=i,this._loop=!!t.loop,this._to=qf([t.to,n,s,t.from]),this._from=qf([t.from,s,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,s=this._prop,i=this._from,o=this._loop,a=this._to;let l;if(this._active=i!==a&&(o||n<r),!this._active){this._target[s]=a,this._notify(!0);return}if(n<0){this._target[s]=i;return}l=n/r%2,l=o&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[s]=this._fn(i,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let s=0;s<r.length;s++)r[s][n]()}}class y2{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!Ct(t))return;const n=Object.keys(wn.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(s=>{const i=t[s];if(!Ct(i))return;const o={};for(const a of n)o[a]=i[a];(An(i.properties)&&i.properties||[s]).forEach(a=>{(a===s||!r.has(a))&&r.set(a,o)})})}_animateOptions(t,n){const r=n.options,s=kne(t,r);if(!s)return[];const i=this._createAnimations(s,r);return r.$shared&&_ne(t.options.$animations,r).then(()=>{t.options=r},()=>{}),i}_createAnimations(t,n){const r=this._properties,s=[],i=t.$animations||(t.$animations={}),o=Object.keys(n),a=Date.now();let l;for(l=o.length-1;l>=0;--l){const u=o[l];if(u.charAt(0)==="$")continue;if(u==="options"){s.push(...this._animateOptions(t,n));continue}const c=n[u];let d=i[u];const f=r.get(u);if(d)if(f&&d.active()){d.update(f,c,a);continue}else d.cancel();if(!f||!f.duration){t[u]=c;continue}i[u]=d=new Sne(f,t,u,c),s.push(d)}return s}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return Pi.add(this._chart,r),!0}}function _ne(e,t){const n=[],r=Object.keys(t);for(let s=0;s<r.length;s++){const i=e[r[s]];i&&i.active()&&n.push(i.wait())}return Promise.all(n)}function kne(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function pE(e,t){const n=e&&e.options||{},r=n.reverse,s=n.min===void 0?t:0,i=n.max===void 0?t:0;return{start:r?i:s,end:r?s:i}}function xne(e,t,n){if(n===!1)return!1;const r=pE(e,n),s=pE(t,n);return{top:s.end,right:r.end,bottom:s.start,left:r.start}}function Ene(e){let t,n,r,s;return Ct(e)?(t=e.top,n=e.right,r=e.bottom,s=e.left):t=n=r=s=e,{top:t,right:n,bottom:r,left:s,disabled:e===!1}}function b2(e,t){const n=[],r=e._getSortedDatasetMetas(t);let s,i;for(s=0,i=r.length;s<i;++s)n.push(r[s].index);return n}function mE(e,t,n,r={}){const s=e.keys,i=r.mode==="single";let o,a,l,u;if(t===null)return;let c=!1;for(o=0,a=s.length;o<a;++o){if(l=+s[o],l===n){if(c=!0,r.all)continue;break}u=e.values[l],bs(u)&&(i||t===0||Fo(t)===Fo(u))&&(t+=u)}return!c&&!r.all?0:t}function Cne(e,t){const{iScale:n,vScale:r}=t,s=n.axis==="x"?"x":"y",i=r.axis==="x"?"x":"y",o=Object.keys(e),a=new Array(o.length);let l,u,c;for(l=0,u=o.length;l<u;++l)c=o[l],a[l]={[s]:c,[i]:e[c]};return a}function pv(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function Tne(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function Pne(e){const{min:t,max:n,minDefined:r,maxDefined:s}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:s?n:Number.POSITIVE_INFINITY}}function Rne(e,t,n){const r=e[t]||(e[t]={});return r[n]||(r[n]={})}function gE(e,t,n,r){for(const s of t.getMatchingVisibleMetas(r).reverse()){const i=e[s.index];if(n&&i>0||!n&&i<0)return s.index}return null}function vE(e,t){const{chart:n,_cachedMeta:r}=e,s=n._stacks||(n._stacks={}),{iScale:i,vScale:o,index:a}=r,l=i.axis,u=o.axis,c=Tne(i,o,r),d=t.length;let f;for(let h=0;h<d;++h){const g=t[h],{[l]:m,[u]:y}=g,w=g._stacks||(g._stacks={});f=w[u]=Rne(s,c,m),f[a]=y,f._top=gE(f,o,!0,r.type),f._bottom=gE(f,o,!1,r.type);const b=f._visualValues||(f._visualValues={});b[a]=y}}function mv(e,t){const n=e.scales;return Object.keys(n).filter(r=>n[r].axis===t).shift()}function Ine(e,t){return Zu(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Ane(e,t,n){return Zu(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function hc(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const s of t){const i=s._stacks;if(!i||i[r]===void 0||i[r][n]===void 0)return;delete i[r][n],i[r]._visualValues!==void 0&&i[r]._visualValues[n]!==void 0&&delete i[r]._visualValues[n]}}}const gv=e=>e==="reset"||e==="none",yE=(e,t)=>t?e:Object.assign({},e),One=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:b2(n,!0),values:null};class Kc{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=pv(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&hc(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),s=(d,f,h,g)=>d==="x"?f:d==="r"?g:h,i=n.xAxisID=Tt(r.xAxisID,mv(t,"x")),o=n.yAxisID=Tt(r.yAxisID,mv(t,"y")),a=n.rAxisID=Tt(r.rAxisID,mv(t,"r")),l=n.indexAxis,u=n.iAxisID=s(l,i,o,a),c=n.vAxisID=s(l,o,i,a);n.xScale=this.getScaleForId(i),n.yScale=this.getScaleForId(o),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(u),n.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&tE(this._data,this),t._stacked&&hc(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(Ct(n)){const s=this._cachedMeta;this._data=Cne(n,s)}else if(r!==n){if(r){tE(r,this);const s=this._cachedMeta;hc(s),s._parsed=[]}n&&Object.isExtensible(n)&&Mte(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,r=this.getDataset();let s=!1;this._dataCheck();const i=n._stacked;n._stacked=pv(n.vScale,n),n.stack!==r.stack&&(s=!0,hc(n),n.stack=r.stack),this._resyncElements(t),(s||i!==n._stacked)&&(vE(this,n._parsed),n._stacked=pv(n.vScale,n))}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:s}=this,{iScale:i,_stacked:o}=r,a=i.axis;let l=t===0&&n===s.length?!0:r._sorted,u=t>0&&r._parsed[t-1],c,d,f;if(this._parsing===!1)r._parsed=s,r._sorted=!0,f=s;else{An(s[t])?f=this.parseArrayData(r,s,t,n):Ct(s[t])?f=this.parseObjectData(r,s,t,n):f=this.parsePrimitiveData(r,s,t,n);const h=()=>d[a]===null||u&&d[a]<u[a];for(c=0;c<n;++c)r._parsed[c+t]=d=f[c],l&&(h()&&(l=!1),u=d);r._sorted=l}o&&vE(this,f)}parsePrimitiveData(t,n,r,s){const{iScale:i,vScale:o}=t,a=i.axis,l=o.axis,u=i.getLabels(),c=i===o,d=new Array(s);let f,h,g;for(f=0,h=s;f<h;++f)g=f+r,d[f]={[a]:c||i.parse(u[g],g),[l]:o.parse(n[g],g)};return d}parseArrayData(t,n,r,s){const{xScale:i,yScale:o}=t,a=new Array(s);let l,u,c,d;for(l=0,u=s;l<u;++l)c=l+r,d=n[c],a[l]={x:i.parse(d[0],c),y:o.parse(d[1],c)};return a}parseObjectData(t,n,r,s){const{xScale:i,yScale:o}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,u=new Array(s);let c,d,f,h;for(c=0,d=s;c<d;++c)f=c+r,h=n[f],u[c]={x:i.parse(Cu(h,a),f),y:o.parse(Cu(h,l),f)};return u}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,r){const s=this.chart,i=this._cachedMeta,o=n[t.axis],a={keys:b2(s,!0),values:n._stacks[t.axis]._visualValues};return mE(a,o,i.index,{mode:r})}updateRangeFromParsed(t,n,r,s){const i=r[n.axis];let o=i===null?NaN:i;const a=s&&r._stacks[n.axis];s&&a&&(s.values=a,o=mE(s,i,this._cachedMeta.index)),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,n){const r=this._cachedMeta,s=r._parsed,i=r._sorted&&t===r.iScale,o=s.length,a=this._getOtherScale(t),l=One(n,r,this.chart),u={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:d}=Pne(a);let f,h;function g(){h=s[f];const m=h[a.axis];return!bs(h[t.axis])||c>m||d<m}for(f=0;f<o&&!(!g()&&(this.updateRangeFromParsed(u,t,h,l),i));++f);if(i){for(f=o-1;f>=0;--f)if(!g()){this.updateRangeFromParsed(u,t,h,l);break}}return u}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let s,i,o;for(s=0,i=n.length;s<i;++s)o=n[s][t.axis],bs(o)&&r.push(o);return r}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,r=n.iScale,s=n.vScale,i=this.getParsed(t);return{label:r?""+r.getLabelForValue(i[r.axis]):"",value:s?""+s.getLabelForValue(i[s.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=Ene(Tt(this.options.clip,xne(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,r=this._cachedMeta,s=r.data||[],i=n.chartArea,o=[],a=this._drawStart||0,l=this._drawCount||s.length-a,u=this.options.drawActiveElementsOnTop;let c;for(r.dataset&&r.dataset.draw(t,i,a,l),c=a;c<a+l;++c){const d=s[c];d.hidden||(d.active&&u?o.push(d):d.draw(t,i))}for(c=0;c<o.length;++c)o[c].draw(t,i)}getStyle(t,n){const r=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(t||0,r)}getContext(t,n,r){const s=this.getDataset();let i;if(t>=0&&t<this._cachedMeta.data.length){const o=this._cachedMeta.data[t];i=o.$context||(o.$context=Ane(this.getContext(),t,o)),i.parsed=this.getParsed(t),i.raw=s.data[t],i.index=i.dataIndex=t}else i=this.$context||(this.$context=Ine(this.chart.getContext(),this.index)),i.dataset=s,i.index=i.datasetIndex=this.index;return i.active=!!n,i.mode=r,i}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",r){const s=n==="active",i=this._cachedDataOpts,o=t+"-"+n,a=i[o],l=this.enableOptionSharing&&Pd(r);if(a)return yE(a,l);const u=this.chart.config,c=u.datasetElementScopeKeys(this._type,t),d=s?[`${t}Hover`,"hover",t,""]:[t,""],f=u.getOptionScopes(this.getDataset(),c),h=Object.keys(wn.elements[t]),g=()=>this.getContext(r,s,n),m=u.resolveNamedOptions(f,h,g,d);return m.$shared&&(m.$shared=l,i[o]=Object.freeze(yE(m,l))),m}_resolveAnimations(t,n,r){const s=this.chart,i=this._cachedDataOpts,o=`animation-${n}`,a=i[o];if(a)return a;let l;if(s.options.animation!==!1){const c=this.chart.config,d=c.datasetAnimationScopeKeys(this._type,n),f=c.getOptionScopes(this.getDataset(),d);l=c.createResolver(f,this.getContext(t,r,n))}const u=new y2(s,l&&l.animations);return l&&l._cacheable&&(i[o]=Object.freeze(u)),u}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||gv(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),s=this._sharedOptions,i=this.getSharedOptions(r),o=this.includeOptions(n,i)||i!==s;return this.updateSharedOptions(i,n,r),{sharedOptions:i,includeOptions:o}}updateElement(t,n,r,s){gv(s)?Object.assign(t,r):this._resolveAnimations(n,s).update(t,r)}updateSharedOptions(t,n,r){t&&!gv(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,s){t.active=s;const i=this.getStyle(n,s);this._resolveAnimations(n,r,s).update(t,{options:!s&&this.getSharedOptions(i)||i})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,r=this._cachedMeta.data;for(const[a,l,u]of this._syncList)this[a](l,u);this._syncList=[];const s=r.length,i=n.length,o=Math.min(i,s);o&&this.parse(0,o),i>s?this._insertElements(s,i-s,t):i<s&&this._removeElements(i,s-i)}_insertElements(t,n,r=!0){const s=this._cachedMeta,i=s.data,o=t+n;let a;const l=u=>{for(u.length+=n,a=u.length-1;a>=o;a--)u[a]=u[a-n]};for(l(i),a=t;a<o;++a)i[a]=new this.dataElementType;this._parsing&&l(s._parsed),this.parse(t,n),r&&this.updateElements(i,t,n,"reset")}updateElements(t,n,r,s){}_removeElements(t,n){const r=this._cachedMeta;if(this._parsing){const s=r._parsed.splice(t,n);r._stacked&&hc(r,s)}r.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,r,s]=t;this[n](r,s)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);const r=arguments.length-2;r&&this._sync(["_insertElements",t,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}we(Kc,"defaults",{}),we(Kc,"datasetElementType",null),we(Kc,"dataElementType",null);function Mne(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let r=[];for(let s=0,i=n.length;s<i;s++)r=r.concat(n[s].controller.getAllParsedValues(e));e._cache.$bar=t2(r.sort((s,i)=>s-i))}return e._cache.$bar}function Dne(e){const t=e.iScale,n=Mne(t,e.type);let r=t._length,s,i,o,a;const l=()=>{o===32767||o===-32768||(Pd(a)&&(r=Math.min(r,Math.abs(o-a)||r)),a=o)};for(s=0,i=n.length;s<i;++s)o=t.getPixelForValue(n[s]),l();for(a=void 0,s=0,i=t.ticks.length;s<i;++s)o=t.getPixelForTick(s),l();return r}function Lne(e,t,n,r){const s=n.barThickness;let i,o;return Ut(s)?(i=t.min*n.categoryPercentage,o=n.barPercentage):(i=s*r,o=1),{chunk:i/r,ratio:o,start:t.pixels[e]-i/2}}function $ne(e,t,n,r){const s=t.pixels,i=s[e];let o=e>0?s[e-1]:null,a=e<s.length-1?s[e+1]:null;const l=n.categoryPercentage;o===null&&(o=i-(a===null?t.end-t.start:a-i)),a===null&&(a=i+i-o);const u=i-(i-Math.min(o,a))/2*l;return{chunk:Math.abs(a-o)/2*l/r,ratio:n.barPercentage,start:u}}function Fne(e,t,n,r){const s=n.parse(e[0],r),i=n.parse(e[1],r),o=Math.min(s,i),a=Math.max(s,i);let l=o,u=a;Math.abs(o)>Math.abs(a)&&(l=a,u=o),t[n.axis]=u,t._custom={barStart:l,barEnd:u,start:s,end:i,min:o,max:a}}function w2(e,t,n,r){return An(e)?Fne(e,t,n,r):t[n.axis]=n.parse(e,r),t}function bE(e,t,n,r){const s=e.iScale,i=e.vScale,o=s.getLabels(),a=s===i,l=[];let u,c,d,f;for(u=n,c=n+r;u<c;++u)f=t[u],d={},d[s.axis]=a||s.parse(o[u],u),l.push(w2(f,d,i,u));return l}function vv(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function Nne(e,t,n){return e!==0?Fo(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function Bne(e){let t,n,r,s,i;return e.horizontal?(t=e.base>e.x,n="left",r="right"):(t=e.base<e.y,n="bottom",r="top"),t?(s="end",i="start"):(s="start",i="end"),{start:n,end:r,reverse:t,top:s,bottom:i}}function Vne(e,t,n,r){let s=t.borderSkipped;const i={};if(!s){e.borderSkipped=i;return}if(s===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:o,end:a,reverse:l,top:u,bottom:c}=Bne(e);s==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===r?s=u:(n._bottom||0)===r?s=c:(i[wE(c,o,a,l)]=!0,s=u)),i[wE(s,o,a,l)]=!0,e.borderSkipped=i}function wE(e,t,n,r){return r?(e=Une(e,t,n),e=SE(e,n,t)):e=SE(e,t,n),e}function Une(e,t,n){return e===t?n:e===n?t:e}function SE(e,t,n){return e==="start"?t:e==="end"?n:e}function zne(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class Fh extends Kc{parsePrimitiveData(t,n,r,s){return bE(t,n,r,s)}parseArrayData(t,n,r,s){return bE(t,n,r,s)}parseObjectData(t,n,r,s){const{iScale:i,vScale:o}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,u=i.axis==="x"?a:l,c=o.axis==="x"?a:l,d=[];let f,h,g,m;for(f=r,h=r+s;f<h;++f)m=n[f],g={},g[i.axis]=i.parse(Cu(m,u),f),d.push(w2(Cu(m,c),g,o,f));return d}updateRangeFromParsed(t,n,r,s){super.updateRangeFromParsed(t,n,r,s);const i=r._custom;i&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,i.min),t.max=Math.max(t.max,i.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:r,vScale:s}=n,i=this.getParsed(t),o=i._custom,a=vv(o)?"["+o.start+", "+o.end+"]":""+s.getLabelForValue(i[s.axis]);return{label:""+r.getLabelForValue(i[r.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,r,s){const i=s==="reset",{index:o,_cachedMeta:{vScale:a}}=this,l=a.getBasePixel(),u=a.isHorizontal(),c=this._getRuler(),{sharedOptions:d,includeOptions:f}=this._getSharedOptions(n,s);for(let h=n;h<n+r;h++){const g=this.getParsed(h),m=i||Ut(g[a.axis])?{base:l,head:l}:this._calculateBarValuePixels(h),y=this._calculateBarIndexPixels(h,c),w=(g._stacks||{})[a.axis],b={horizontal:u,base:m.base,enableBorderRadius:!w||vv(g._custom)||o===w._top||o===w._bottom,x:u?m.head:y.center,y:u?y.center:m.head,height:u?y.size:Math.abs(m.size),width:u?Math.abs(m.size):y.size};f&&(b.options=d||this.resolveDataElementOptions(h,t[h].active?"active":s));const x=b.options||t[h].options;Vne(b,x,w,o),zne(b,x,c.ratio),this.updateElement(t[h],h,b,s)}}_getStacks(t,n){const{iScale:r}=this._cachedMeta,s=r.getMatchingVisibleMetas(this._type).filter(c=>c.controller.options.grouped),i=r.options.stacked,o=[],a=this._cachedMeta.controller.getParsed(n),l=a&&a[r.axis],u=c=>{const d=c._parsed.find(h=>h[r.axis]===l),f=d&&d[c.vScale.axis];if(Ut(f)||isNaN(f))return!0};for(const c of s)if(!(n!==void 0&&u(c))&&((i===!1||o.indexOf(c.stack)===-1||i===void 0&&c.stack===void 0)&&o.push(c.stack),c.index===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,n=this.chart.options.indexAxis;return Object.keys(t).filter(r=>t[r].axis===n).shift()}_getAxis(){const t={},n=this.getFirstScaleIdForIndexAxis();for(const r of this.chart.data.datasets)t[Tt(this.chart.options.indexAxis==="x"?r.xAxisID:r.yAxisID,n)]=!0;return Object.keys(t)}_getStackIndex(t,n,r){const s=this._getStacks(t,r),i=n!==void 0?s.indexOf(n):-1;return i===-1?s.length-1:i}_getRuler(){const t=this.options,n=this._cachedMeta,r=n.iScale,s=[];let i,o;for(i=0,o=n.data.length;i<o;++i)s.push(r.getPixelForValue(this.getParsed(i)[r.axis],i));const a=t.barThickness;return{min:a||Dne(n),pixels:s,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:t.grouped,ratio:a?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:r,index:s},options:{base:i,minBarLength:o}}=this,a=i||0,l=this.getParsed(t),u=l._custom,c=vv(u);let d=l[n.axis],f=0,h=r?this.applyStack(n,l,r):d,g,m;h!==d&&(f=h-d,h=d),c&&(d=u.barStart,h=u.barEnd-u.barStart,d!==0&&Fo(d)!==Fo(u.barEnd)&&(f=0),f+=d);const y=!Ut(i)&&!c?i:f;let w=n.getPixelForValue(y);if(this.chart.getDataVisibility(t)?g=n.getPixelForValue(f+h):g=w,m=g-w,Math.abs(m)<o){m=Nne(m,n,a)*o,d===a&&(w-=m/2);const b=n.getPixelForDecimal(0),x=n.getPixelForDecimal(1),_=Math.min(b,x),S=Math.max(b,x);w=Math.max(Math.min(w,S),_),g=w+m,r&&!c&&(l._stacks[n.axis]._visualValues[s]=n.getValueForPixel(g)-n.getValueForPixel(w))}if(w===n.getPixelForValue(a)){const b=Fo(m)*n.getLineWidthForValue(a)/2;w+=b,m-=b}return{size:m,base:w,head:g,center:g+m/2}}_calculateBarIndexPixels(t,n){const r=n.scale,s=this.options,i=s.skipNull,o=Tt(s.maxBarThickness,1/0);let a,l;const u=this._getAxisCount();if(n.grouped){const c=i?this._getStackCount(t):n.stackCount,d=s.barThickness==="flex"?$ne(t,n,s,c*u):Lne(t,n,s,c*u),f=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,h=this._getAxis().indexOf(Tt(f,this.getFirstScaleIdForIndexAxis())),g=this._getStackIndex(this.index,this._cachedMeta.stack,i?t:void 0)+h;a=d.start+d.chunk*g+d.chunk/2,l=Math.min(o,d.chunk*d.ratio)}else a=r.getPixelForValue(this.getParsed(t)[r.axis],t),l=Math.min(o,n.min*n.ratio);return{base:a-l/2,head:a+l/2,center:a,size:l}}draw(){const t=this._cachedMeta,n=t.vScale,r=t.data,s=r.length;let i=0;for(;i<s;++i)this.getParsed(i)[n.axis]!==null&&!r[i].hidden&&r[i].draw(this._ctx)}}we(Fh,"id","bar"),we(Fh,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),we(Fh,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});function da(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class sw{constructor(t){we(this,"options");this.options=t||{}}static override(t){Object.assign(sw.prototype,t)}init(){}formats(){return da()}parse(){return da()}format(){return da()}add(){return da()}diff(){return da()}startOf(){return da()}endOf(){return da()}}var Hne={_date:sw};function jne(e,t,n,r){const{controller:s,data:i,_sorted:o}=e,a=s._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(a&&t===a.axis&&t!=="r"&&o&&i.length){const u=a._reversePixels?Ate:Tb;if(r){if(s._sharedOptions){const c=i[0],d=typeof c.getRange=="function"&&c.getRange(t);if(d){const f=u(i,t,n-d),h=u(i,t,n+d);return{lo:f.lo,hi:h.hi}}}}else{const c=u(i,t,n);if(l){const{vScale:d}=s._cachedMeta,{_parsed:f}=e,h=f.slice(0,c.lo+1).reverse().findIndex(m=>!Ut(m[d.axis]));c.lo-=Math.max(0,h);const g=f.slice(c.hi).findIndex(m=>!Ut(m[d.axis]));c.hi+=Math.max(0,g)}return c}}return{lo:0,hi:i.length-1}}function ff(e,t,n,r,s){const i=e.getSortedVisibleDatasetMetas(),o=n[t];for(let a=0,l=i.length;a<l;++a){const{index:u,data:c}=i[a],{lo:d,hi:f}=jne(i[a],t,o,s);for(let h=d;h<=f;++h){const g=c[h];g.skip||r(g,u,h)}}}function Wne(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(r,s){const i=t?Math.abs(r.x-s.x):0,o=n?Math.abs(r.y-s.y):0;return Math.sqrt(Math.pow(i,2)+Math.pow(o,2))}}function yv(e,t,n,r,s){const i=[];return!s&&!e.isPointInArea(t)||ff(e,n,t,function(a,l,u){!s&&!u2(a,e.chartArea,0)||a.inRange(t.x,t.y,r)&&i.push({element:a,datasetIndex:l,index:u})},!0),i}function qne(e,t,n,r){let s=[];function i(o,a,l){const{startAngle:u,endAngle:c}=o.getProps(["startAngle","endAngle"],r),{angle:d}=Tte(o,{x:t.x,y:t.y});Rte(d,u,c)&&s.push({element:o,datasetIndex:a,index:l})}return ff(e,n,t,i),s}function Gne(e,t,n,r,s,i){let o=[];const a=Wne(n);let l=Number.POSITIVE_INFINITY;function u(c,d,f){const h=c.inRange(t.x,t.y,s);if(r&&!h)return;const g=c.getCenterPoint(s);if(!(!!i||e.isPointInArea(g))&&!h)return;const y=a(t,g);y<l?(o=[{element:c,datasetIndex:d,index:f}],l=y):y===l&&o.push({element:c,datasetIndex:d,index:f})}return ff(e,n,t,u),o}function bv(e,t,n,r,s,i){return!i&&!e.isPointInArea(t)?[]:n==="r"&&!r?qne(e,t,n,s):Gne(e,t,n,r,s,i)}function _E(e,t,n,r,s){const i=[],o=n==="x"?"inXRange":"inYRange";let a=!1;return ff(e,n,t,(l,u,c)=>{l[o]&&l[o](t[n],s)&&(i.push({element:l,datasetIndex:u,index:c}),a=a||l.inRange(t.x,t.y,s))}),r&&!a?[]:i}var Kne={evaluateInteractionItems:ff,modes:{index(e,t,n,r){const s=ma(t,e),i=n.axis||"x",o=n.includeInvisible||!1,a=n.intersect?yv(e,s,i,r,o):bv(e,s,i,!1,r,o),l=[];return a.length?(e.getSortedVisibleDatasetMetas().forEach(u=>{const c=a[0].index,d=u.data[c];d&&!d.skip&&l.push({element:d,datasetIndex:u.index,index:c})}),l):[]},dataset(e,t,n,r){const s=ma(t,e),i=n.axis||"xy",o=n.includeInvisible||!1;let a=n.intersect?yv(e,s,i,r,o):bv(e,s,i,!1,r,o);if(a.length>0){const l=a[0].datasetIndex,u=e.getDatasetMeta(l).data;a=[];for(let c=0;c<u.length;++c)a.push({element:u[c],datasetIndex:l,index:c})}return a},point(e,t,n,r){const s=ma(t,e),i=n.axis||"xy",o=n.includeInvisible||!1;return yv(e,s,i,r,o)},nearest(e,t,n,r){const s=ma(t,e),i=n.axis||"xy",o=n.includeInvisible||!1;return bv(e,s,i,n.intersect,r,o)},x(e,t,n,r){const s=ma(t,e);return _E(e,s,"x",n.intersect,r)},y(e,t,n,r){const s=ma(t,e);return _E(e,s,"y",n.intersect,r)}}};const S2=["left","top","right","bottom"];function pc(e,t){return e.filter(n=>n.pos===t)}function kE(e,t){return e.filter(n=>S2.indexOf(n.pos)===-1&&n.box.axis===t)}function mc(e,t){return e.sort((n,r)=>{const s=t?r:n,i=t?n:r;return s.weight===i.weight?s.index-i.index:s.weight-i.weight})}function Yne(e){const t=[];let n,r,s,i,o,a;for(n=0,r=(e||[]).length;n<r;++n)s=e[n],{position:i,options:{stack:o,stackWeight:a=1}}=s,t.push({index:n,box:s,pos:i,horizontal:s.isHorizontal(),weight:s.weight,stack:o&&i+o,stackWeight:a});return t}function Xne(e){const t={};for(const n of e){const{stack:r,pos:s,stackWeight:i}=n;if(!r||!S2.includes(s))continue;const o=t[r]||(t[r]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=i}return t}function Qne(e,t){const n=Xne(e),{vBoxMaxWidth:r,hBoxMaxHeight:s}=t;let i,o,a;for(i=0,o=e.length;i<o;++i){a=e[i];const{fullSize:l}=a.box,u=n[a.stack],c=u&&a.stackWeight/u.weight;a.horizontal?(a.width=c?c*r:l&&t.availableWidth,a.height=s):(a.width=r,a.height=c?c*s:l&&t.availableHeight)}return n}function Jne(e){const t=Yne(e),n=mc(t.filter(u=>u.box.fullSize),!0),r=mc(pc(t,"left"),!0),s=mc(pc(t,"right")),i=mc(pc(t,"top"),!0),o=mc(pc(t,"bottom")),a=kE(t,"x"),l=kE(t,"y");return{fullSize:n,leftAndTop:r.concat(i),rightAndBottom:s.concat(l).concat(o).concat(a),chartArea:pc(t,"chartArea"),vertical:r.concat(s).concat(l),horizontal:i.concat(o).concat(a)}}function xE(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function _2(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function Zne(e,t,n,r){const{pos:s,box:i}=n,o=e.maxPadding;if(!Ct(s)){n.size&&(e[s]-=n.size);const d=r[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?i.height:i.width),n.size=d.size/d.count,e[s]+=n.size}i.getPadding&&_2(o,i.getPadding());const a=Math.max(0,t.outerWidth-xE(o,e,"left","right")),l=Math.max(0,t.outerHeight-xE(o,e,"top","bottom")),u=a!==e.w,c=l!==e.h;return e.w=a,e.h=l,n.horizontal?{same:u,other:c}:{same:c,other:u}}function ere(e){const t=e.maxPadding;function n(r){const s=Math.max(t[r]-e[r],0);return e[r]+=s,s}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function tre(e,t){const n=t.maxPadding;function r(s){const i={left:0,top:0,right:0,bottom:0};return s.forEach(o=>{i[o]=Math.max(t[o],n[o])}),i}return r(e?["left","right"]:["top","bottom"])}function Ec(e,t,n,r){const s=[];let i,o,a,l,u,c;for(i=0,o=e.length,u=0;i<o;++i){a=e[i],l=a.box,l.update(a.width||t.w,a.height||t.h,tre(a.horizontal,t));const{same:d,other:f}=Zne(t,n,a,r);u|=d&&s.length,c=c||f,l.fullSize||s.push(a)}return u&&Ec(s,t,n,r)||c}function Yf(e,t,n,r,s){e.top=n,e.left=t,e.right=t+r,e.bottom=n+s,e.width=r,e.height=s}function EE(e,t,n,r){const s=n.padding;let{x:i,y:o}=t;for(const a of e){const l=a.box,u=r[a.stack]||{count:1,placed:0,weight:1},c=a.stackWeight/u.weight||1;if(a.horizontal){const d=t.w*c,f=u.size||l.height;Pd(u.start)&&(o=u.start),l.fullSize?Yf(l,s.left,o,n.outerWidth-s.right-s.left,f):Yf(l,t.left+u.placed,o,d,f),u.start=o,u.placed+=d,o=l.bottom}else{const d=t.h*c,f=u.size||l.width;Pd(u.start)&&(i=u.start),l.fullSize?Yf(l,i,s.top,f,n.outerHeight-s.bottom-s.top):Yf(l,i,t.top+u.placed,f,d),u.start=i,u.placed+=d,i=l.right}}t.x=i,t.y=o}var cs={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,r){if(!e)return;const s=ws(e.options.layout.padding),i=Math.max(t-s.width,0),o=Math.max(n-s.height,0),a=Jne(e.boxes),l=a.vertical,u=a.horizontal;Lt(e.boxes,m=>{typeof m.beforeLayout=="function"&&m.beforeLayout()});const c=l.reduce((m,y)=>y.box.options&&y.box.options.display===!1?m:m+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:s,availableWidth:i,availableHeight:o,vBoxMaxWidth:i/2/c,hBoxMaxHeight:o/2}),f=Object.assign({},s);_2(f,ws(r));const h=Object.assign({maxPadding:f,w:i,h:o,x:s.left,y:s.top},s),g=Qne(l.concat(u),d);Ec(a.fullSize,h,d,g),Ec(l,h,d,g),Ec(u,h,d,g)&&Ec(l,h,d,g),ere(h),EE(a.leftAndTop,h,d,g),h.x+=h.w,h.y+=h.h,EE(a.rightAndBottom,h,d,g),e.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h,height:h.h,width:h.w},Lt(a.chartArea,m=>{const y=m.box;Object.assign(y,e.chartArea),y.update(h.w,h.h,{left:0,top:0,right:0,bottom:0})})}};class k2{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,r){}removeEventListener(t,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,r,s){return n=Math.max(0,n||t.width),r=r||t.height,{width:n,height:Math.max(0,s?Math.floor(n/s):r)}}isAttached(t){return!0}updateConfig(t){}}class nre extends k2{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Nh="$chartjs",rre={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},CE=e=>e===null||e==="";function sre(e,t){const n=e.style,r=e.getAttribute("height"),s=e.getAttribute("width");if(e[Nh]={initial:{height:r,width:s,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",CE(s)){const i=fE(e,"width");i!==void 0&&(e.width=i)}if(CE(r))if(e.style.height==="")e.height=e.width/(t||2);else{const i=fE(e,"height");i!==void 0&&(e.height=i)}return e}const x2=pne?{passive:!0}:!1;function ire(e,t,n){e&&e.addEventListener(t,n,x2)}function ore(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,x2)}function are(e,t){const n=rre[e.type]||e.type,{x:r,y:s}=ma(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:s!==void 0?s:null}}function jp(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function lre(e,t,n){const r=e.canvas,s=new MutationObserver(i=>{let o=!1;for(const a of i)o=o||jp(a.addedNodes,r),o=o&&!jp(a.removedNodes,r);o&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}function ure(e,t,n){const r=e.canvas,s=new MutationObserver(i=>{let o=!1;for(const a of i)o=o||jp(a.removedNodes,r),o=o&&!jp(a.addedNodes,r);o&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}const Id=new Map;let TE=0;function E2(){const e=window.devicePixelRatio;e!==TE&&(TE=e,Id.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function cre(e,t){Id.size||window.addEventListener("resize",E2),Id.set(e,t)}function dre(e){Id.delete(e),Id.size||window.removeEventListener("resize",E2)}function fre(e,t,n){const r=e.canvas,s=r&&rw(r);if(!s)return;const i=r2((a,l)=>{const u=s.clientWidth;n(a,l),u<s.clientWidth&&n()},window),o=new ResizeObserver(a=>{const l=a[0],u=l.contentRect.width,c=l.contentRect.height;u===0&&c===0||i(u,c)});return o.observe(s),cre(e,i),o}function wv(e,t,n){n&&n.disconnect(),t==="resize"&&dre(e)}function hre(e,t,n){const r=e.canvas,s=r2(i=>{e.ctx!==null&&n(are(i,e))},e);return ire(r,t,s),s}class pre extends k2{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(sre(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[Nh])return!1;const r=n[Nh].initial;["height","width"].forEach(i=>{const o=r[i];Ut(o)?n.removeAttribute(i):n.setAttribute(i,o)});const s=r.style||{};return Object.keys(s).forEach(i=>{n.style[i]=s[i]}),n.width=n.width,delete n[Nh],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const s=t.$proxies||(t.$proxies={}),o={attach:lre,detach:ure,resize:fre}[n]||hre;s[n]=o(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),s=r[n];if(!s)return;({attach:wv,detach:wv,resize:wv}[n]||ore)(t,n,s),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,s){return hne(t,n,r,s)}isAttached(t){const n=t&&rw(t);return!!(n&&n.isConnected)}}function mre(e){return!nw()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?nre:pre}var ah;let ec=(ah=class{constructor(){we(this,"x");we(this,"y");we(this,"active",!1);we(this,"options");we(this,"$animations")}tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return Up(this.x)&&Up(this.y)}getProps(t,n){const r=this.$animations;if(!n||!r)return this;const s={};return t.forEach(i=>{s[i]=r[i]&&r[i].active()?r[i]._to:this[i]}),s}},we(ah,"defaults",{}),we(ah,"defaultRoutes"),ah);function gre(e,t){const n=e.options.ticks,r=vre(e),s=Math.min(n.maxTicksLimit||r,r),i=n.major.enabled?bre(t):[],o=i.length,a=i[0],l=i[o-1],u=[];if(o>s)return wre(t,u,i,o/s),u;const c=yre(i,t,s);if(o>0){let d,f;const h=o>1?Math.round((l-a)/(o-1)):null;for(Xf(t,u,c,Ut(h)?0:a-h,a),d=0,f=o-1;d<f;d++)Xf(t,u,c,i[d],i[d+1]);return Xf(t,u,c,l,Ut(h)?t.length:l+h),u}return Xf(t,u,c),u}function vre(e){const t=e.options.offset,n=e._tickSize(),r=e._length/n+(t?0:1),s=e._maxLength/n;return Math.floor(Math.min(r,s))}function yre(e,t,n){const r=Sre(e),s=t.length/n;if(!r)return Math.max(s,1);const i=_te(r);for(let o=0,a=i.length-1;o<a;o++){const l=i[o];if(l>s)return l}return Math.max(s,1)}function bre(e){const t=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}function wre(e,t,n,r){let s=0,i=n[0],o;for(r=Math.ceil(r),o=0;o<e.length;o++)o===i&&(t.push(e[o]),s++,i=n[s*r])}function Xf(e,t,n,r,s){const i=Tt(r,0),o=Math.min(Tt(s,e.length),e.length);let a=0,l,u,c;for(n=Math.ceil(n),s&&(l=s-r,n=l/Math.floor(l/n)),c=i;c<0;)a++,c=Math.round(i+a*n);for(u=Math.max(i,0);u<o;u++)u===c&&(t.push(e[u]),a++,c=Math.round(i+a*n))}function Sre(e){const t=e.length;let n,r;if(t<2)return!1;for(r=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==r)return!1;return r}const _re=e=>e==="left"?"right":e==="right"?"left":e,PE=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,RE=(e,t)=>Math.min(t||e,e);function IE(e,t){const n=[],r=e.length/t,s=e.length;let i=0;for(;i<s;i+=r)n.push(e[Math.floor(i)]);return n}function kre(e,t,n){const r=e.ticks.length,s=Math.min(t,r-1),i=e._startPixel,o=e._endPixel,a=1e-6;let l=e.getPixelForTick(s),u;if(!(n&&(r===1?u=Math.max(l-i,o-l):t===0?u=(e.getPixelForTick(1)-l)/2:u=(l-e.getPixelForTick(s-1))/2,l+=s<t?u:-u,l<i-a||l>o+a)))return l}function xre(e,t){Lt(e,n=>{const r=n.gc,s=r.length/2;let i;if(s>t){for(i=0;i<s;++i)delete n.data[r[i]];r.splice(0,s)}})}function gc(e){return e.drawTicks?e.tickLength:0}function AE(e,t){if(!e.display)return 0;const n=ar(e.font,t),r=ws(e.padding);return(An(e.text)?e.text.length:1)*n.lineHeight+r.height}function Ere(e,t){return Zu(e,{scale:t,type:"scale"})}function Cre(e,t,n){return Zu(e,{tick:n,index:t,type:"tick"})}function Tre(e,t,n){let r=X0(e);return(n&&t!=="right"||!n&&t==="right")&&(r=_re(r)),r}function Pre(e,t,n,r){const{top:s,left:i,bottom:o,right:a,chart:l}=e,{chartArea:u,scales:c}=l;let d=0,f,h,g;const m=o-s,y=a-i;if(e.isHorizontal()){if(h=er(r,i,a),Ct(n)){const w=Object.keys(n)[0],b=n[w];g=c[w].getPixelForValue(b)+m-t}else n==="center"?g=(u.bottom+u.top)/2+m-t:g=PE(e,n,t);f=a-i}else{if(Ct(n)){const w=Object.keys(n)[0],b=n[w];h=c[w].getPixelForValue(b)-y+t}else n==="center"?h=(u.left+u.right)/2-y+t:h=PE(e,n,t);g=er(r,o,s),d=n==="left"?-Ms:Ms}return{titleX:h,titleY:g,maxWidth:f,rotation:d}}class tc extends ec{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:r,_suggestedMax:s}=this;return t=Qs(t,Number.POSITIVE_INFINITY),n=Qs(n,Number.NEGATIVE_INFINITY),r=Qs(r,Number.POSITIVE_INFINITY),s=Qs(s,Number.NEGATIVE_INFINITY),{min:Qs(t,r),max:Qs(n,s),minDefined:bs(t),maxDefined:bs(n)}}getMinMax(t){let{min:n,max:r,minDefined:s,maxDefined:i}=this.getUserBounds(),o;if(s&&i)return{min:n,max:r};const a=this.getMatchingVisibleMetas();for(let l=0,u=a.length;l<u;++l)o=a[l].controller.getMinMax(this,t),s||(n=Math.min(n,o.min)),i||(r=Math.max(r,o.max));return n=i&&n>r?r:n,r=s&&n>r?n:r,{min:Qs(n,Qs(r,n)),max:Qs(r,Qs(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Zt(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:s,grace:i,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Jte(this,i,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?IE(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=gre(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,t=!t),this._startPixel=n,this._endPixel=r,this._reversePixels=t,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Zt(this.options.afterUpdate,[this])}beforeSetDimensions(){Zt(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){Zt(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),Zt(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Zt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let r,s,i;for(r=0,s=t.length;r<s;r++)i=t[r],i.label=Zt(n.callback,[i.value,r,t],this)}afterTickToLabelConversion(){Zt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Zt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,r=RE(this.ticks.length,t.ticks.maxTicksLimit),s=n.minRotation||0,i=n.maxRotation;let o=s,a,l,u;if(!this._isVisible()||!n.display||s>=i||r<=1||!this.isHorizontal()){this.labelRotation=s;return}const c=this._getLabelSizes(),d=c.widest.width,f=c.highest.height,h=Ds(this.chart.width-d,0,this.maxWidth);a=t.offset?this.maxWidth/r:h/(r-1),d+6>a&&(a=h/(r-(t.offset?.5:1)),l=this.maxHeight-gc(t.grid)-n.padding-AE(t.title,this.chart.options.font),u=Math.sqrt(d*d+f*f),o=Cte(Math.min(Math.asin(Ds((c.highest.height+6)/a,-1,1)),Math.asin(Ds(l/u,-1,1))-Math.asin(Ds(f/u,-1,1)))),o=Math.max(s,Math.min(i,o))),this.labelRotation=o}afterCalculateLabelRotation(){Zt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Zt(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:s,grid:i}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const l=AE(s,n.options.font);if(a?(t.width=this.maxWidth,t.height=gc(i)+l):(t.height=this.maxHeight,t.width=gc(i)+l),r.display&&this.ticks.length){const{first:u,last:c,widest:d,highest:f}=this._getLabelSizes(),h=r.padding*2,g=xa(this.labelRotation),m=Math.cos(g),y=Math.sin(g);if(a){const w=r.mirror?0:y*d.width+m*f.height;t.height=Math.min(this.maxHeight,t.height+w+h)}else{const w=r.mirror?0:m*d.width+y*f.height;t.width=Math.min(this.maxWidth,t.width+w+h)}this._calculatePadding(u,c,y,m)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,s){const{ticks:{align:i,padding:o},position:a}=this.options,l=this.labelRotation!==0,u=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const c=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,h=0;l?u?(f=s*t.width,h=r*n.height):(f=r*t.height,h=s*n.width):i==="start"?h=n.width:i==="end"?f=t.width:i!=="inner"&&(f=t.width/2,h=n.width/2),this.paddingLeft=Math.max((f-c+o)*this.width/(this.width-c),0),this.paddingRight=Math.max((h-d+o)*this.width/(this.width-d),0)}else{let c=n.height/2,d=t.height/2;i==="start"?(c=0,d=t.height):i==="end"&&(c=n.height,d=0),this.paddingTop=c+o,this.paddingBottom=d+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Zt(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n<r;n++)Ut(t[n].label)&&(t.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let r=this.ticks;n<r.length&&(r=IE(r,n)),this._labelSizes=t=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,r){const{ctx:s,_longestTextCache:i}=this,o=[],a=[],l=Math.floor(n/RE(n,r));let u=0,c=0,d,f,h,g,m,y,w,b,x,_,S;for(d=0;d<n;d+=l){if(g=t[d].label,m=this._resolveTickFontOptions(d),s.font=y=m.string,w=i[y]=i[y]||{data:{},gc:[]},b=m.lineHeight,x=_=0,!Ut(g)&&!An(g))x=oE(s,w.data,w.gc,x,g),_=b;else if(An(g))for(f=0,h=g.length;f<h;++f)S=g[f],!Ut(S)&&!An(S)&&(x=oE(s,w.data,w.gc,x,S),_+=b);o.push(x),a.push(_),u=Math.max(x,u),c=Math.max(_,c)}xre(i,n);const P=o.indexOf(u),A=a.indexOf(c),E=T=>({width:o[T]||0,height:a[T]||0});return{first:E(0),last:E(n-1),widest:E(P),highest:E(A),widths:o,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return Ite(this._alignToPixels?ca(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const r=n[t];return r.$context||(r.$context=Cre(this.getContext(),t,r))}return this.$context||(this.$context=Ere(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=xa(this.labelRotation),r=Math.abs(Math.cos(n)),s=Math.abs(Math.sin(n)),i=this._getLabelSizes(),o=t.autoSkipPadding||0,a=i?i.widest.width+o:0,l=i?i.highest.height+o:0;return this.isHorizontal()?l*r>a*s?a/r:l/s:l*s<a*r?l/r:a/s}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,r=this.chart,s=this.options,{grid:i,position:o,border:a}=s,l=i.offset,u=this.isHorizontal(),d=this.ticks.length+(l?1:0),f=gc(i),h=[],g=a.setContext(this.getContext()),m=g.display?g.width:0,y=m/2,w=function(W){return ca(r,W,m)};let b,x,_,S,P,A,E,T,R,I,O,H;if(o==="top")b=w(this.bottom),A=this.bottom-f,T=b-y,I=w(t.top)+y,H=t.bottom;else if(o==="bottom")b=w(this.top),I=t.top,H=w(t.bottom)-y,A=b+y,T=this.top+f;else if(o==="left")b=w(this.right),P=this.right-f,E=b-y,R=w(t.left)+y,O=t.right;else if(o==="right")b=w(this.left),R=t.left,O=w(t.right)-y,P=b+y,E=this.left+f;else if(n==="x"){if(o==="center")b=w((t.top+t.bottom)/2+.5);else if(Ct(o)){const W=Object.keys(o)[0],U=o[W];b=w(this.chart.scales[W].getPixelForValue(U))}I=t.top,H=t.bottom,A=b+y,T=A+f}else if(n==="y"){if(o==="center")b=w((t.left+t.right)/2);else if(Ct(o)){const W=Object.keys(o)[0],U=o[W];b=w(this.chart.scales[W].getPixelForValue(U))}P=b-y,E=P-f,R=t.left,O=t.right}const N=Tt(s.ticks.maxTicksLimit,d),D=Math.max(1,Math.ceil(d/N));for(x=0;x<d;x+=D){const W=this.getContext(x),U=i.setContext(W),Q=a.setContext(W),V=U.lineWidth,L=U.color,oe=Q.dash||[],j=Q.dashOffset,F=U.tickWidth,re=U.tickColor,ae=U.tickBorderDash||[],Se=U.tickBorderDashOffset;_=kre(this,x,l),_!==void 0&&(S=ca(r,_,V),u?P=E=R=O=S:A=T=I=H=S,h.push({tx1:P,ty1:A,tx2:E,ty2:T,x1:R,y1:I,x2:O,y2:H,width:V,color:L,borderDash:oe,borderDashOffset:j,tickWidth:F,tickColor:re,tickBorderDash:ae,tickBorderDashOffset:Se}))}return this._ticksLength=d,this._borderValue=b,h}_computeLabelItems(t){const n=this.axis,r=this.options,{position:s,ticks:i}=r,o=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:u,padding:c,mirror:d}=i,f=gc(r.grid),h=f+c,g=d?-c:h,m=-xa(this.labelRotation),y=[];let w,b,x,_,S,P,A,E,T,R,I,O,H="middle";if(s==="top")P=this.bottom-g,A=this._getXAxisLabelAlignment();else if(s==="bottom")P=this.top+g,A=this._getXAxisLabelAlignment();else if(s==="left"){const D=this._getYAxisLabelAlignment(f);A=D.textAlign,S=D.x}else if(s==="right"){const D=this._getYAxisLabelAlignment(f);A=D.textAlign,S=D.x}else if(n==="x"){if(s==="center")P=(t.top+t.bottom)/2+h;else if(Ct(s)){const D=Object.keys(s)[0],W=s[D];P=this.chart.scales[D].getPixelForValue(W)+h}A=this._getXAxisLabelAlignment()}else if(n==="y"){if(s==="center")S=(t.left+t.right)/2-h;else if(Ct(s)){const D=Object.keys(s)[0],W=s[D];S=this.chart.scales[D].getPixelForValue(W)}A=this._getYAxisLabelAlignment(f).textAlign}n==="y"&&(l==="start"?H="top":l==="end"&&(H="bottom"));const N=this._getLabelSizes();for(w=0,b=a.length;w<b;++w){x=a[w],_=x.label;const D=i.setContext(this.getContext(w));E=this.getPixelForTick(w)+i.labelOffset,T=this._resolveTickFontOptions(w),R=T.lineHeight,I=An(_)?_.length:1;const W=I/2,U=D.color,Q=D.textStrokeColor,V=D.textStrokeWidth;let L=A;o?(S=E,A==="inner"&&(w===b-1?L=this.options.reverse?"left":"right":w===0?L=this.options.reverse?"right":"left":L="center"),s==="top"?u==="near"||m!==0?O=-I*R+R/2:u==="center"?O=-N.highest.height/2-W*R+R:O=-N.highest.height+R/2:u==="near"||m!==0?O=R/2:u==="center"?O=N.highest.height/2-W*R:O=N.highest.height-I*R,d&&(O*=-1),m!==0&&!D.showLabelBackdrop&&(S+=R/2*Math.sin(m))):(P=E,O=(1-I)*R/2);let oe;if(D.showLabelBackdrop){const j=ws(D.backdropPadding),F=N.heights[w],re=N.widths[w];let ae=O-j.top,Se=0-j.left;switch(H){case"middle":ae-=F/2;break;case"bottom":ae-=F;break}switch(A){case"center":Se-=re/2;break;case"right":Se-=re;break;case"inner":w===b-1?Se-=re:w>0&&(Se-=re/2);break}oe={left:Se,top:ae,width:re+j.width,height:F+j.height,color:D.backdropColor}}y.push({label:_,font:T,textOffset:O,options:{rotation:m,color:U,strokeColor:Q,strokeWidth:V,textAlign:L,textBaseline:H,translation:[S,P],backdrop:oe}})}return y}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-xa(this.labelRotation))return t==="top"?"left":"right";let s="center";return n.align==="start"?s="left":n.align==="end"?s="right":n.align==="inner"&&(s="inner"),s}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:r,mirror:s,padding:i}}=this.options,o=this._getLabelSizes(),a=t+i,l=o.widest.width;let u,c;return n==="left"?s?(c=this.right+i,r==="near"?u="left":r==="center"?(u="center",c+=l/2):(u="right",c+=l)):(c=this.right-a,r==="near"?u="right":r==="center"?(u="center",c-=l/2):(u="left",c=this.left)):n==="right"?s?(c=this.left+i,r==="near"?u="right":r==="center"?(u="center",c-=l/2):(u="left",c-=l)):(c=this.left+a,r==="near"?u="left":r==="center"?(u="center",c+=l/2):(u="right",c=this.right)):u="right",{textAlign:u,x:c}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:r,top:s,width:i,height:o}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(r,s,i,o),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const s=this.ticks.findIndex(i=>i.value===t);return s>=0?n.setContext(this.getContext(s)).lineWidth:0}drawGrid(t){const n=this.options.grid,r=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let i,o;const a=(l,u,c)=>{!c.width||!c.color||(r.save(),r.lineWidth=c.width,r.strokeStyle=c.color,r.setLineDash(c.borderDash||[]),r.lineDashOffset=c.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(u.x,u.y),r.stroke(),r.restore())};if(n.display)for(i=0,o=s.length;i<o;++i){const l=s[i];n.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&a({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:n,options:{border:r,grid:s}}=this,i=r.setContext(this.getContext()),o=r.display?i.width:0;if(!o)return;const a=s.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let u,c,d,f;this.isHorizontal()?(u=ca(t,this.left,o)-o/2,c=ca(t,this.right,a)+a/2,d=f=l):(d=ca(t,this.top,o)-o/2,f=ca(t,this.bottom,a)+a/2,u=c=l),n.save(),n.lineWidth=i.width,n.strokeStyle=i.color,n.beginPath(),n.moveTo(u,d),n.lineTo(c,f),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const r=this.ctx,s=this._computeLabelArea();s&&Q0(r,s);const i=this.getLabelItems(t);for(const o of i){const a=o.options,l=o.font,u=o.label,c=o.textOffset;Rd(r,u,0,c,l,a)}s&&J0(r)}drawTitle(){const{ctx:t,options:{position:n,title:r,reverse:s}}=this;if(!r.display)return;const i=ar(r.font),o=ws(r.padding),a=r.align;let l=i.lineHeight/2;n==="bottom"||n==="center"||Ct(n)?(l+=o.bottom,An(r.text)&&(l+=i.lineHeight*(r.text.length-1))):l+=o.top;const{titleX:u,titleY:c,maxWidth:d,rotation:f}=Pre(this,l,n,a);Rd(t,r.text,0,0,i,{color:r.color,maxWidth:d,rotation:f,textAlign:Tre(a,n,s),textBaseline:"middle",translation:[u,c]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,n=t.ticks&&t.ticks.z||0,r=Tt(t.grid&&t.grid.z,-1),s=Tt(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==tc.prototype.draw?[{z:n,draw:i=>{this.draw(i)}}]:[{z:r,draw:i=>{this.drawBackground(),this.drawGrid(i),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:n,draw:i=>{this.drawLabels(i)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",s=[];let i,o;for(i=0,o=n.length;i<o;++i){const a=n[i];a[r]===this.id&&(!t||a.type===t)&&s.push(a)}return s}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return ar(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Qf{constructor(t,n,r){this.type=t,this.scope=n,this.override=r,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let r;Are(n)&&(r=this.register(n));const s=this.items,i=t.id,o=this.scope+"."+i;if(!i)throw new Error("class does not have id: "+t);return i in s||(s[i]=t,Rre(t,o,r),this.override&&wn.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const n=this.items,r=t.id,s=this.scope;r in n&&delete n[r],s&&r in wn[s]&&(delete wn[s][r],this.override&&delete rl[r])}}function Rre(e,t,n){const r=Td(Object.create(null),[n?wn.get(n):{},wn.get(t),e.defaults]);wn.set(t,r),e.defaultRoutes&&Ire(t,e.defaultRoutes),e.descriptors&&wn.describe(t,e.descriptors)}function Ire(e,t){Object.keys(t).forEach(n=>{const r=n.split("."),s=r.pop(),i=[e].concat(r).join("."),o=t[n].split("."),a=o.pop(),l=o.join(".");wn.route(i,s,l,a)})}function Are(e){return"id"in e&&"defaults"in e}class Ore{constructor(){this.controllers=new Qf(Kc,"datasets",!0),this.elements=new Qf(ec,"elements"),this.plugins=new Qf(Object,"plugins"),this.scales=new Qf(tc,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,r){[...n].forEach(s=>{const i=r||this._getRegistryForType(s);r||i.isForType(s)||i===this.plugins&&s.id?this._exec(t,i,s):Lt(s,o=>{const a=r||this._getRegistryForType(o);this._exec(t,a,o)})})}_exec(t,n,r){const s=K0(t);Zt(r["before"+s],[],r),n[t](r),Zt(r["after"+s],[],r)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const r=this._typedRegistries[n];if(r.isForType(t))return r}return this.plugins}_get(t,n,r){const s=n.get(t);if(s===void 0)throw new Error('"'+t+'" is not a registered '+r+".");return s}}var ni=new Ore;class Mre{constructor(){this._init=[]}notify(t,n,r,s){n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const i=s?this._descriptors(t).filter(s):this._descriptors(t),o=this._notify(i,t,n,r);return n==="afterDestroy"&&(this._notify(i,t,"stop"),this._notify(this._init,t,"uninstall")),o}_notify(t,n,r,s){s=s||{};for(const i of t){const o=i.plugin,a=o[r],l=[n,s,i.options];if(Zt(a,l,o)===!1&&s.cancelable)return!1}return!0}invalidate(){Ut(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const r=t&&t.config,s=Tt(r.options&&r.options.plugins,{}),i=Dre(r);return s===!1&&!n?[]:$re(t,i,s,n)}_notifyStateChanges(t){const n=this._oldCache||[],r=this._cache,s=(i,o)=>i.filter(a=>!o.some(l=>a.plugin.id===l.plugin.id));this._notify(s(n,r),t,"stop"),this._notify(s(r,n),t,"start")}}function Dre(e){const t={},n=[],r=Object.keys(ni.plugins.items);for(let i=0;i<r.length;i++)n.push(ni.getPlugin(r[i]));const s=e.plugins||[];for(let i=0;i<s.length;i++){const o=s[i];n.indexOf(o)===-1&&(n.push(o),t[o.id]=!0)}return{plugins:n,localIds:t}}function Lre(e,t){return!t&&e===!1?null:e===!0?{}:e}function $re(e,{plugins:t,localIds:n},r,s){const i=[],o=e.getContext();for(const a of t){const l=a.id,u=Lre(r[l],s);u!==null&&i.push({plugin:a,options:Fre(e.config,{plugin:a,local:n[l]},u,o)})}return i}function Fre(e,{plugin:t,local:n},r,s){const i=e.pluginScopeKeys(t),o=e.getOptionScopes(r,i);return n&&t.defaults&&o.push(t.defaults),e.createResolver(o,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Rb(e,t){const n=wn.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function Nre(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function Bre(e,t){return e===t?"_index_":"_value_"}function OE(e){if(e==="x"||e==="y"||e==="r")return e}function Vre(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function Ib(e,...t){if(OE(e))return e;for(const n of t){const r=n.axis||Vre(n.position)||e.length>1&&OE(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function ME(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function Ure(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(r=>r.xAxisID===e||r.yAxisID===e);if(n.length)return ME(e,"x",n[0])||ME(e,"y",n[0])}return{}}function zre(e,t){const n=rl[e.type]||{scales:{}},r=t.scales||{},s=Rb(e.type,t),i=Object.create(null);return Object.keys(r).forEach(o=>{const a=r[o];if(!Ct(a))return console.error(`Invalid scale configuration for scale: ${o}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const l=Ib(o,a,Ure(o,e),wn.scales[a.type]),u=Bre(l,s),c=n.scales||{};i[o]=Wc(Object.create(null),[{axis:l},a,c[l],c[u]])}),e.data.datasets.forEach(o=>{const a=o.type||e.type,l=o.indexAxis||Rb(a,t),c=(rl[a]||{}).scales||{};Object.keys(c).forEach(d=>{const f=Nre(d,l),h=o[f+"AxisID"]||f;i[h]=i[h]||Object.create(null),Wc(i[h],[{axis:f},r[h],c[d]])})}),Object.keys(i).forEach(o=>{const a=i[o];Wc(a,[wn.scales[a.type],wn.scale])}),i}function C2(e){const t=e.options||(e.options={});t.plugins=Tt(t.plugins,{}),t.scales=zre(e,t)}function T2(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function Hre(e){return e=e||{},e.data=T2(e.data),C2(e),e}const DE=new Map,P2=new Set;function Jf(e,t){let n=DE.get(e);return n||(n=t(),DE.set(e,n),P2.add(n)),n}const vc=(e,t,n)=>{const r=Cu(t,n);r!==void 0&&e.add(r)};class jre{constructor(t){this._config=Hre(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=T2(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),C2(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Jf(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return Jf(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return Jf(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return Jf(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const r=this._scopeCache;let s=r.get(t);return(!s||n)&&(s=new Map,r.set(t,s)),s}getOptionScopes(t,n,r){const{options:s,type:i}=this,o=this._cachedScopes(t,r),a=o.get(n);if(a)return a;const l=new Set;n.forEach(c=>{t&&(l.add(t),c.forEach(d=>vc(l,t,d))),c.forEach(d=>vc(l,s,d)),c.forEach(d=>vc(l,rl[i]||{},d)),c.forEach(d=>vc(l,wn,d)),c.forEach(d=>vc(l,Pb,d))});const u=Array.from(l);return u.length===0&&u.push(Object.create(null)),P2.has(n)&&o.set(n,u),u}chartOptionScopes(){const{options:t,type:n}=this;return[t,rl[n]||{},wn.datasets[n]||{},{type:n},wn,Pb]}resolveNamedOptions(t,n,r,s=[""]){const i={$shared:!0},{resolver:o,subPrefixes:a}=LE(this._resolverCache,t,s);let l=o;if(qre(o,n)){i.$shared=!1,r=Go(r)?r():r;const u=this.createResolver(t,r,a);l=Tu(o,r,u)}for(const u of n)i[u]=l[u];return i}createResolver(t,n,r=[""],s){const{resolver:i}=LE(this._resolverCache,t,r);return Ct(n)?Tu(i,n,void 0,s):i}}function LE(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const s=n.join();let i=r.get(s);return i||(i={resolver:Z0(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},r.set(s,i)),i}const Wre=e=>Ct(e)&&Object.getOwnPropertyNames(e).some(t=>Go(e[t]));function qre(e,t){const{isScriptable:n,isIndexable:r}=f2(e);for(const s of t){const i=n(s),o=r(s),a=(o||i)&&e[s];if(i&&(Go(a)||Wre(a))||o&&An(a))return!0}return!1}var Gre="4.5.0";const Kre=["top","bottom","left","right","chartArea"];function $E(e,t){return e==="top"||e==="bottom"||Kre.indexOf(e)===-1&&t==="x"}function FE(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function NE(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),Zt(n&&n.onComplete,[e],t)}function Yre(e){const t=e.chart,n=t.options.animation;Zt(n&&n.onProgress,[e],t)}function R2(e){return nw()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const Bh={},BE=e=>{const t=R2(e);return Object.values(Bh).filter(n=>n.canvas===t).pop()};function Xre(e,t,n){const r=Object.keys(e);for(const s of r){const i=+s;if(i>=t){const o=e[s];delete e[s],(n>0||i>t)&&(e[i+n]=o)}}}function Qre(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}var lo;let Qm=(lo=class{static register(...t){ni.add(...t),VE()}static unregister(...t){ni.remove(...t),VE()}constructor(t,n){const r=this.config=new jre(n),s=R2(t),i=BE(s);if(i)throw new Error("Canvas is already in use. Chart with ID '"+i.id+"' must be destroyed before the canvas with ID '"+i.canvas.id+"' can be reused.");const o=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||mre(s)),this.platform.updateConfig(r);const a=this.platform.acquireContext(s,o.aspectRatio),l=a&&a.canvas,u=l&&l.height,c=l&&l.width;if(this.id=pte(),this.ctx=a,this.canvas=l,this.width=c,this.height=u,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Mre,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Dte(d=>this.update(d),o.resizeDelay||0),this._dataChanges=[],Bh[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Pi.listen(this,"complete",NE),Pi.listen(this,"progress",Yre),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:s,_aspectRatio:i}=this;return Ut(t)?n&&i?i:s?r/s:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return ni}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():dE(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return aE(this.canvas,this.ctx),this}stop(){return Pi.stop(this),this}resize(t,n){Pi.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,s=this.canvas,i=r.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(s,t,n,i),a=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,dE(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),Zt(r.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Lt(n,(r,s)=>{r.id=s})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,s=Object.keys(r).reduce((o,a)=>(o[a]=!1,o),{});let i=[];n&&(i=i.concat(Object.keys(n).map(o=>{const a=n[o],l=Ib(o,a),u=l==="r",c=l==="x";return{options:a,dposition:u?"chartArea":c?"bottom":"left",dtype:u?"radialLinear":c?"category":"linear"}}))),Lt(i,o=>{const a=o.options,l=a.id,u=Ib(l,a),c=Tt(a.type,o.dtype);(a.position===void 0||$E(a.position,u)!==$E(o.dposition))&&(a.position=o.dposition),s[l]=!0;let d=null;if(l in r&&r[l].type===c)d=r[l];else{const f=ni.getScale(c);d=new f({id:l,type:c,ctx:this.ctx,chart:this}),r[d.id]=d}d.init(a,t)}),Lt(s,(o,a)=>{o||delete r[a]}),Lt(r,o=>{cs.configure(this,o,o.options),cs.addBox(this,o)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((s,i)=>s.index-i.index),r>n){for(let s=n;s<r;++s)this._destroyDatasetMeta(s);t.splice(n,r-n)}this._sortedMetasets=t.slice(0).sort(FE("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((r,s)=>{n.filter(i=>i===r._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,s;for(this._removeUnreferencedMetasets(),r=0,s=n.length;r<s;r++){const i=n[r];let o=this.getDatasetMeta(r);const a=i.type||this.config.type;if(o.type&&o.type!==a&&(this._destroyDatasetMeta(r),o=this.getDatasetMeta(r)),o.type=a,o.indexAxis=i.indexAxis||Rb(a,this.options),o.order=i.order||0,o.index=r,o.label=""+i.label,o.visible=this.isDatasetVisible(r),o.controller)o.controller.updateIndex(r),o.controller.linkScales();else{const l=ni.getController(a),{datasetElementType:u,dataElementType:c}=wn.datasets[a];Object.assign(l,{dataElementType:ni.getElement(c),datasetElementType:u&&ni.getElement(u)}),o.controller=new l(this,r),t.push(o.controller)}}return this._updateMetasets(),t}_resetElements(){Lt(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const i=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let u=0,c=this.data.datasets.length;u<c;u++){const{controller:d}=this.getDatasetMeta(u),f=!s&&i.indexOf(d)===-1;d.buildOrUpdateElements(f),o=Math.max(+d.getMaxOverflow(),o)}o=this._minPadding=r.layout.autoPadding?o:0,this._updateLayout(o),s||Lt(i,u=>{u.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(FE("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){Lt(this.scales,t=>{cs.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!Qx(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:s,count:i}of n){const o=r==="_removeElements"?-i:i;Xre(t,s,o)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=i=>new Set(t.filter(o=>o[0]===i).map((o,a)=>a+","+o.splice(1).join(","))),s=r(0);for(let i=1;i<n;i++)if(!Qx(s,r(i)))return;return Array.from(s).map(i=>i.split(",")).map(i=>({method:i[1],start:+i[2],count:+i[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;cs.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],Lt(this.boxes,s=>{r&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,i)=>{s._idx=i}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,Go(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const r=this.getDatasetMeta(t),s={meta:r,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",s)!==!1&&(r.controller._update(n),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Pi.has(this)?this.attached&&!Pi.running(this)&&Pi.start(this):(this.draw(),NE({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:r,height:s}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(r,s)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,r=[];let s,i;for(s=0,i=n.length;s<i;++s){const o=n[s];(!t||o.visible)&&r.push(o)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,r={meta:t,index:t.index,cancelable:!0},s=yne(this,t);this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(s&&Q0(n,s),t.controller.draw(),s&&J0(n),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return u2(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,s){const i=Kne.modes[n];return typeof i=="function"?i(this,t,r,s):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let s=r.filter(i=>i&&i._dataset===n).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(s)),s}getContext(){return this.$context||(this.$context=Zu(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(t,n){const r=this.getDatasetMeta(t);r.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){const s=r?"show":"hide",i=this.getDatasetMeta(t),o=i.controller._resolveAnimations(void 0,s);Pd(n)?(i.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),o.update(i,{visible:r}),this.update(a=>a.datasetIndex===t?s:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),Pi.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),aE(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete Bh[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,n=this.platform,r=(i,o)=>{n.addEventListener(this,i,o),t[i]=o},s=(i,o,a)=>{i.offsetX=o,i.offsetY=a,this._eventHandler(i)};Lt(this.options.events,i=>r(i,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(l,u)=>{n.addEventListener(this,l,u),t[l]=u},s=(l,u)=>{t[l]&&(n.removeEventListener(this,l,u),delete t[l])},i=(l,u)=>{this.canvas&&this.resize(l,u)};let o;const a=()=>{s("attach",a),this.attached=!0,this.resize(),r("resize",i),r("detach",o)};o=()=>{this.attached=!1,s("resize",i),this._stop(),this._resize(0,0),r("attach",a)},n.isAttached(this.canvas)?a():o()}unbindEvents(){Lt(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},Lt(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const s=r?"set":"remove";let i,o,a,l;for(n==="dataset"&&(i=this.getDatasetMeta(t[0].datasetIndex),i.controller["_"+s+"DatasetHoverStyle"]()),a=0,l=t.length;a<l;++a){o=t[a];const u=o&&this.getDatasetMeta(o.datasetIndex).controller;u&&u[s+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],r=t.map(({datasetIndex:i,index:o})=>{const a=this.getDatasetMeta(i);if(!a)throw new Error("No dataset found at index "+i);return{datasetIndex:i,element:a.data[o],index:o}});!Np(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,r){const s=this.options.hover,i=(l,u)=>l.filter(c=>!u.some(d=>c.datasetIndex===d.datasetIndex&&c.index===d.index)),o=i(n,t),a=r?t:i(t,n);o.length&&this.updateHoverStyle(o,s.mode,!1),a.length&&s.mode&&this.updateHoverStyle(a,s.mode,!0)}_eventHandler(t,n){const r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},s=o=>(o.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,s)===!1)return;const i=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,s),(i||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:s=[],options:i}=this,o=n,a=this._getActiveElements(t,s,r,o),l=wte(t),u=Qre(t,this._lastEvent,r,l);r&&(this._lastEvent=null,Zt(i.onHover,[t,a,this],this),l&&Zt(i.onClick,[t,a,this],this));const c=!Np(a,s);return(c||n)&&(this._active=a,this._updateHoverStyles(a,s,n)),this._lastEvent=u,c}_getActiveElements(t,n,r,s){if(t.type==="mouseout")return[];if(!r)return n;const i=this.options.hover;return this.getElementsAtEventForMode(t,i.mode,i,s)}},we(lo,"defaults",wn),we(lo,"instances",Bh),we(lo,"overrides",rl),we(lo,"registry",ni),we(lo,"version",Gre),we(lo,"getChart",BE),lo);function VE(){return Lt(Qm.instances,e=>e._plugins.invalidate())}function I2(e,t){const{x:n,y:r,base:s,width:i,height:o}=e.getProps(["x","y","base","width","height"],t);let a,l,u,c,d;return e.horizontal?(d=o/2,a=Math.min(n,s),l=Math.max(n,s),u=r-d,c=r+d):(d=i/2,a=n-d,l=n+d,u=Math.min(r,s),c=Math.max(r,s)),{left:a,top:u,right:l,bottom:c}}function Ro(e,t,n,r){return e?0:Ds(t,n,r)}function Jre(e,t,n){const r=e.options.borderWidth,s=e.borderSkipped,i=d2(r);return{t:Ro(s.top,i.top,0,n),r:Ro(s.right,i.right,0,t),b:Ro(s.bottom,i.bottom,0,n),l:Ro(s.left,i.left,0,t)}}function Zre(e,t,n){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),s=e.options.borderRadius,i=jl(s),o=Math.min(t,n),a=e.borderSkipped,l=r||Ct(s);return{topLeft:Ro(!l||a.top||a.left,i.topLeft,0,o),topRight:Ro(!l||a.top||a.right,i.topRight,0,o),bottomLeft:Ro(!l||a.bottom||a.left,i.bottomLeft,0,o),bottomRight:Ro(!l||a.bottom||a.right,i.bottomRight,0,o)}}function ese(e){const t=I2(e),n=t.right-t.left,r=t.bottom-t.top,s=Jre(e,n/2,r/2),i=Zre(e,n/2,r/2);return{outer:{x:t.left,y:t.top,w:n,h:r,radius:i},inner:{x:t.left+s.l,y:t.top+s.t,w:n-s.l-s.r,h:r-s.t-s.b,radius:{topLeft:Math.max(0,i.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,i.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,i.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,i.bottomRight-Math.max(s.b,s.r))}}}}function Sv(e,t,n,r){const s=t===null,i=n===null,a=e&&!(s&&i)&&I2(e,r);return a&&(s||Fl(t,a.left,a.right))&&(i||Fl(n,a.top,a.bottom))}function tse(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function nse(e,t){e.rect(t.x,t.y,t.w,t.h)}function _v(e,t,n={}){const r=e.x!==n.x?-t:0,s=e.y!==n.y?-t:0,i=(e.x+e.w!==n.x+n.w?t:0)-r,o=(e.y+e.h!==n.y+n.h?t:0)-s;return{x:e.x+r,y:e.y+s,w:e.w+i,h:e.h+o,radius:e.radius}}class Vh extends ec{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:n,options:{borderColor:r,backgroundColor:s}}=this,{inner:i,outer:o}=ese(this),a=tse(o.radius)?zp:nse;t.save(),(o.w!==i.w||o.h!==i.h)&&(t.beginPath(),a(t,_v(o,n,i)),t.clip(),a(t,_v(i,-n,o)),t.fillStyle=r,t.fill("evenodd")),t.beginPath(),a(t,_v(i,n)),t.fillStyle=s,t.fill(),t.restore()}inRange(t,n,r){return Sv(this,t,n,r)}inXRange(t,n){return Sv(this,t,null,n)}inYRange(t,n){return Sv(this,null,t,n)}getCenterPoint(t){const{x:n,y:r,base:s,horizontal:i}=this.getProps(["x","y","base","horizontal"],t);return{x:i?(n+s)/2:n,y:i?r:(r+s)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}we(Vh,"id","bar"),we(Vh,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),we(Vh,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});const UE=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}},rse=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class zE extends ec{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n,r){this.maxWidth=t,this.maxHeight=n,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let n=Zt(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(r=>t.filter(r,this.chart.data))),t.sort&&(n=n.sort((r,s)=>t.sort(r,s,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const r=t.labels,s=ar(r.font),i=s.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=UE(r,i);let u,c;n.font=s.string,this.isHorizontal()?(u=this.maxWidth,c=this._fitRows(o,i,a,l)+10):(c=this.maxHeight,u=this._fitCols(o,s,a,l)+10),this.width=Math.min(u,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,s){const{ctx:i,maxWidth:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],u=this.lineWidths=[0],c=s+a;let d=t;i.textAlign="left",i.textBaseline="middle";let f=-1,h=-c;return this.legendItems.forEach((g,m)=>{const y=r+n/2+i.measureText(g.text).width;(m===0||u[u.length-1]+y+2*a>o)&&(d+=c,u[u.length-(m>0?0:1)]=0,h+=c,f++),l[m]={left:0,top:h,row:f,width:y,height:s},u[u.length-1]+=y+a}),d}_fitCols(t,n,r,s){const{ctx:i,maxHeight:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],u=this.columnSizes=[],c=o-t;let d=a,f=0,h=0,g=0,m=0;return this.legendItems.forEach((y,w)=>{const{itemWidth:b,itemHeight:x}=sse(r,n,i,y,s);w>0&&h+x+2*a>c&&(d+=f+a,u.push({width:f,height:h}),g+=f+a,m++,f=h=0),l[w]={left:g,top:h,col:m,width:b,height:x},f=Math.max(f,b),h+=x+a}),d+=f,u.push({width:f,height:h}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:s},rtl:i}}=this,o=Wl(i,this.left,this.width);if(this.isHorizontal()){let a=0,l=er(r,this.left+s,this.right-this.lineWidths[a]);for(const u of n)a!==u.row&&(a=u.row,l=er(r,this.left+s,this.right-this.lineWidths[a])),u.top+=this.top+t+s,u.left=o.leftForLtr(o.x(l),u.width),l+=u.width+s}else{let a=0,l=er(r,this.top+t+s,this.bottom-this.columnSizes[a].height);for(const u of n)u.col!==a&&(a=u.col,l=er(r,this.top+t+s,this.bottom-this.columnSizes[a].height)),u.top=l,u.left+=this.left+s,u.left=o.leftForLtr(o.x(u.left),u.width),l+=u.height+s}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Q0(t,this),this._draw(),J0(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:s}=this,{align:i,labels:o}=t,a=wn.color,l=Wl(t.rtl,this.left,this.width),u=ar(o.font),{padding:c}=o,d=u.size,f=d/2;let h;this.drawTitle(),s.textAlign=l.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=u.string;const{boxWidth:g,boxHeight:m,itemHeight:y}=UE(o,d),w=function(P,A,E){if(isNaN(g)||g<=0||isNaN(m)||m<0)return;s.save();const T=Tt(E.lineWidth,1);if(s.fillStyle=Tt(E.fillStyle,a),s.lineCap=Tt(E.lineCap,"butt"),s.lineDashOffset=Tt(E.lineDashOffset,0),s.lineJoin=Tt(E.lineJoin,"miter"),s.lineWidth=T,s.strokeStyle=Tt(E.strokeStyle,a),s.setLineDash(Tt(E.lineDash,[])),o.usePointStyle){const R={radius:m*Math.SQRT2/2,pointStyle:E.pointStyle,rotation:E.rotation,borderWidth:T},I=l.xPlus(P,g/2),O=A+f;l2(s,R,I,O,o.pointStyleWidth&&g)}else{const R=A+Math.max((d-m)/2,0),I=l.leftForLtr(P,g),O=jl(E.borderRadius);s.beginPath(),Object.values(O).some(H=>H!==0)?zp(s,{x:I,y:R,w:g,h:m,radius:O}):s.rect(I,R,g,m),s.fill(),T!==0&&s.stroke()}s.restore()},b=function(P,A,E){Rd(s,E.text,P,A+y/2,u,{strikethrough:E.hidden,textAlign:l.textAlign(E.textAlign)})},x=this.isHorizontal(),_=this._computeTitleHeight();x?h={x:er(i,this.left+c,this.right-r[0]),y:this.top+c+_,line:0}:h={x:this.left+c,y:er(i,this.top+_+c,this.bottom-n[0].height),line:0},g2(this.ctx,t.textDirection);const S=y+c;this.legendItems.forEach((P,A)=>{s.strokeStyle=P.fontColor,s.fillStyle=P.fontColor;const E=s.measureText(P.text).width,T=l.textAlign(P.textAlign||(P.textAlign=o.textAlign)),R=g+f+E;let I=h.x,O=h.y;l.setWidth(this.width),x?A>0&&I+R+c>this.right&&(O=h.y+=S,h.line++,I=h.x=er(i,this.left+c,this.right-r[h.line])):A>0&&O+S>this.bottom&&(I=h.x=I+n[h.line].width+c,h.line++,O=h.y=er(i,this.top+_+c,this.bottom-n[h.line].height));const H=l.x(I);if(w(H,O,P),I=Lte(T,I+g+f,x?I+R:this.right,t.rtl),b(l.x(I),O,P),x)h.x+=R+c;else if(typeof P.text!="string"){const N=u.lineHeight;h.y+=A2(P,N)+c}else h.y+=S}),v2(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=ar(n.font),s=ws(n.padding);if(!n.display)return;const i=Wl(t.rtl,this.left,this.width),o=this.ctx,a=n.position,l=r.size/2,u=s.top+l;let c,d=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),c=this.top+u,d=er(t.align,d,this.right-f);else{const g=this.columnSizes.reduce((m,y)=>Math.max(m,y.height),0);c=u+er(t.align,this.top,this.bottom-g-t.labels.padding-this._computeTitleHeight())}const h=er(a,d,d+f);o.textAlign=i.textAlign(X0(a)),o.textBaseline="middle",o.strokeStyle=n.color,o.fillStyle=n.color,o.font=r.string,Rd(o,n.text,h,c,r)}_computeTitleHeight(){const t=this.options.title,n=ar(t.font),r=ws(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,s,i;if(Fl(t,this.left,this.right)&&Fl(n,this.top,this.bottom)){for(i=this.legendHitBoxes,r=0;r<i.length;++r)if(s=i[r],Fl(t,s.left,s.left+s.width)&&Fl(n,s.top,s.top+s.height))return this.legendItems[r]}return null}handleEvent(t){const n=this.options;if(!ase(t.type,n))return;const r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const s=this._hoveredItem,i=rse(s,r);s&&!i&&Zt(n.onLeave,[t,s,this],this),this._hoveredItem=r,r&&!i&&Zt(n.onHover,[t,r,this],this)}else r&&Zt(n.onClick,[t,r,this],this)}}function sse(e,t,n,r,s){const i=ise(r,e,t,n),o=ose(s,r,t.lineHeight);return{itemWidth:i,itemHeight:o}}function ise(e,t,n,r){let s=e.text;return s&&typeof s!="string"&&(s=s.reduce((i,o)=>i.length>o.length?i:o)),t+n.size/2+r.measureText(s).width}function ose(e,t,n){let r=e;return typeof t.text!="string"&&(r=A2(t,n)),r}function A2(e,t){const n=e.text?e.text.length:0;return t*n}function ase(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var lse={id:"legend",_element:zE,start(e,t,n){const r=e.legend=new zE({ctx:e.ctx,options:n,chart:e});cs.configure(e,r,n),cs.addBox(e,r)},stop(e){cs.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;cs.configure(e,r,n),r.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const r=t.datasetIndex,s=n.chart;s.isDatasetVisible(r)?(s.hide(r),t.hidden=!0):(s.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:s,color:i,useBorderRadius:o,borderRadius:a}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const u=l.controller.getStyle(n?0:void 0),c=ws(u.borderWidth);return{text:t[l.index].label,fillStyle:u.backgroundColor,fontColor:i,hidden:!l.visible,lineCap:u.borderCapStyle,lineDash:u.borderDash,lineDashOffset:u.borderDashOffset,lineJoin:u.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:u.borderColor,pointStyle:r||u.pointStyle,rotation:u.rotation,textAlign:s||u.textAlign,borderRadius:o&&(a||u.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class O2 extends ec{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;const s=An(r.text)?r.text.length:1;this._padding=ws(r.padding);const i=s*ar(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=i:this.width=i}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:r,bottom:s,right:i,options:o}=this,a=o.align;let l=0,u,c,d;return this.isHorizontal()?(c=er(a,r,i),d=n+t,u=i-r):(o.position==="left"?(c=r+t,d=er(a,s,n),l=ur*-.5):(c=i-t,d=er(a,n,s),l=ur*.5),u=s-n),{titleX:c,titleY:d,maxWidth:u,rotation:l}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const r=ar(n.font),i=r.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:l,rotation:u}=this._drawArgs(i);Rd(t,n.text,0,0,r,{color:n.color,maxWidth:l,rotation:u,textAlign:X0(n.align),textBaseline:"middle",translation:[o,a]})}}function use(e,t){const n=new O2({ctx:e.ctx,options:t,chart:e});cs.configure(e,n,t),cs.addBox(e,n),e.titleBlock=n}var cse={id:"title",_element:O2,start(e,t,n){use(e,n)},stop(e){const t=e.titleBlock;cs.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;cs.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Cc={average(e){if(!e.length)return!1;let t,n,r=new Set,s=0,i=0;for(t=0,n=e.length;t<n;++t){const a=e[t].element;if(a&&a.hasValue()){const l=a.tooltipPosition();r.add(l.x),s+=l.y,++i}}return i===0||r.size===0?!1:{x:[...r].reduce((a,l)=>a+l)/r.size,y:s/i}},nearest(e,t){if(!e.length)return!1;let n=t.x,r=t.y,s=Number.POSITIVE_INFINITY,i,o,a;for(i=0,o=e.length;i<o;++i){const l=e[i].element;if(l&&l.hasValue()){const u=l.getCenterPoint(),c=Pte(t,u);c<s&&(s=c,a=l)}}if(a){const l=a.tooltipPosition();n=l.x,r=l.y}return{x:n,y:r}}};function Zs(e,t){return t&&(An(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Ri(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
|
|
86
|
+
`)>-1?e.split(`
|
|
87
|
+
`):e}function dse(e,t){const{element:n,datasetIndex:r,index:s}=t,i=e.getDatasetMeta(r).controller,{label:o,value:a}=i.getLabelAndValue(s);return{chart:e,label:o,parsed:i.getParsed(s),raw:e.data.datasets[r].data[s],formattedValue:a,dataset:i.getDataset(),dataIndex:s,datasetIndex:r,element:n}}function HE(e,t){const n=e.chart.ctx,{body:r,footer:s,title:i}=e,{boxWidth:o,boxHeight:a}=t,l=ar(t.bodyFont),u=ar(t.titleFont),c=ar(t.footerFont),d=i.length,f=s.length,h=r.length,g=ws(t.padding);let m=g.height,y=0,w=r.reduce((_,S)=>_+S.before.length+S.lines.length+S.after.length,0);if(w+=e.beforeBody.length+e.afterBody.length,d&&(m+=d*u.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),w){const _=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;m+=h*_+(w-h)*l.lineHeight+(w-1)*t.bodySpacing}f&&(m+=t.footerMarginTop+f*c.lineHeight+(f-1)*t.footerSpacing);let b=0;const x=function(_){y=Math.max(y,n.measureText(_).width+b)};return n.save(),n.font=u.string,Lt(e.title,x),n.font=l.string,Lt(e.beforeBody.concat(e.afterBody),x),b=t.displayColors?o+2+t.boxPadding:0,Lt(r,_=>{Lt(_.before,x),Lt(_.lines,x),Lt(_.after,x)}),b=0,n.font=c.string,Lt(e.footer,x),n.restore(),y+=g.width,{width:y,height:m}}function fse(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function hse(e,t,n,r){const{x:s,width:i}=r,o=n.caretSize+n.caretPadding;if(e==="left"&&s+i+o>t.width||e==="right"&&s-i-o<0)return!0}function pse(e,t,n,r){const{x:s,width:i}=n,{width:o,chartArea:{left:a,right:l}}=e;let u="center";return r==="center"?u=s<=(a+l)/2?"left":"right":s<=i/2?u="left":s>=o-i/2&&(u="right"),hse(u,e,t,n)&&(u="center"),u}function jE(e,t,n){const r=n.yAlign||t.yAlign||fse(e,n);return{xAlign:n.xAlign||t.xAlign||pse(e,t,n,r),yAlign:r}}function mse(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function gse(e,t,n){let{y:r,height:s}=e;return t==="top"?r+=n:t==="bottom"?r-=s+n:r-=s/2,r}function WE(e,t,n,r){const{caretSize:s,caretPadding:i,cornerRadius:o}=e,{xAlign:a,yAlign:l}=n,u=s+i,{topLeft:c,topRight:d,bottomLeft:f,bottomRight:h}=jl(o);let g=mse(t,a);const m=gse(t,l,u);return l==="center"?a==="left"?g+=u:a==="right"&&(g-=u):a==="left"?g-=Math.max(c,f)+s:a==="right"&&(g+=Math.max(d,h)+s),{x:Ds(g,0,r.width-t.width),y:Ds(m,0,r.height-t.height)}}function Zf(e,t,n){const r=ws(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function qE(e){return Zs([],Ri(e))}function vse(e,t,n){return Zu(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function GE(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const M2={beforeTitle:Ei,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return n[t.dataIndex]}return""},afterTitle:Ei,beforeBody:Ei,beforeLabel:Ei,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return Ut(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Ei,afterBody:Ei,beforeFooter:Ei,footer:Ei,afterFooter:Ei};function Cr(e,t,n,r){const s=e[t].call(n,r);return typeof s>"u"?M2[t].call(n,r):s}var Ov;let KE=(Ov=class extends ec{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,r=this.options.setContext(this.getContext()),s=r.enabled&&n.options.animation&&r.animations,i=new y2(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(i)),i}getContext(){return this.$context||(this.$context=vse(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,s=Cr(r,"beforeTitle",this,t),i=Cr(r,"title",this,t),o=Cr(r,"afterTitle",this,t);let a=[];return a=Zs(a,Ri(s)),a=Zs(a,Ri(i)),a=Zs(a,Ri(o)),a}getBeforeBody(t,n){return qE(Cr(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,s=[];return Lt(t,i=>{const o={before:[],lines:[],after:[]},a=GE(r,i);Zs(o.before,Ri(Cr(a,"beforeLabel",this,i))),Zs(o.lines,Cr(a,"label",this,i)),Zs(o.after,Ri(Cr(a,"afterLabel",this,i))),s.push(o)}),s}getAfterBody(t,n){return qE(Cr(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,s=Cr(r,"beforeFooter",this,t),i=Cr(r,"footer",this,t),o=Cr(r,"afterFooter",this,t);let a=[];return a=Zs(a,Ri(s)),a=Zs(a,Ri(i)),a=Zs(a,Ri(o)),a}_createItems(t){const n=this._active,r=this.chart.data,s=[],i=[],o=[];let a=[],l,u;for(l=0,u=n.length;l<u;++l)a.push(dse(this.chart,n[l]));return t.filter&&(a=a.filter((c,d,f)=>t.filter(c,d,f,r))),t.itemSort&&(a=a.sort((c,d)=>t.itemSort(c,d,r))),Lt(a,c=>{const d=GE(t.callbacks,c);s.push(Cr(d,"labelColor",this,c)),i.push(Cr(d,"labelPointStyle",this,c)),o.push(Cr(d,"labelTextColor",this,c))}),this.labelColors=s,this.labelPointStyles=i,this.labelTextColors=o,this.dataPoints=a,a}update(t,n){const r=this.options.setContext(this.getContext()),s=this._active;let i,o=[];if(!s.length)this.opacity!==0&&(i={opacity:0});else{const a=Cc[r.position].call(this,s,this._eventPosition);o=this._createItems(r),this.title=this.getTitle(o,r),this.beforeBody=this.getBeforeBody(o,r),this.body=this.getBody(o,r),this.afterBody=this.getAfterBody(o,r),this.footer=this.getFooter(o,r);const l=this._size=HE(this,r),u=Object.assign({},a,l),c=jE(this.chart,r,u),d=WE(r,u,c,this.chart);this.xAlign=c.xAlign,this.yAlign=c.yAlign,i={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=o,this.$context=void 0,i&&this._resolveAnimations().update(this,i),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,s){const i=this.getCaretPosition(t,r,s);n.lineTo(i.x1,i.y1),n.lineTo(i.x2,i.y2),n.lineTo(i.x3,i.y3)}getCaretPosition(t,n,r){const{xAlign:s,yAlign:i}=this,{caretSize:o,cornerRadius:a}=r,{topLeft:l,topRight:u,bottomLeft:c,bottomRight:d}=jl(a),{x:f,y:h}=t,{width:g,height:m}=n;let y,w,b,x,_,S;return i==="center"?(_=h+m/2,s==="left"?(y=f,w=y-o,x=_+o,S=_-o):(y=f+g,w=y+o,x=_-o,S=_+o),b=y):(s==="left"?w=f+Math.max(l,c)+o:s==="right"?w=f+g-Math.max(u,d)-o:w=this.caretX,i==="top"?(x=h,_=x-o,y=w-o,b=w+o):(x=h+m,_=x+o,y=w+o,b=w-o),S=x),{x1:y,x2:w,x3:b,y1:x,y2:_,y3:S}}drawTitle(t,n,r){const s=this.title,i=s.length;let o,a,l;if(i){const u=Wl(r.rtl,this.x,this.width);for(t.x=Zf(this,r.titleAlign,r),n.textAlign=u.textAlign(r.titleAlign),n.textBaseline="middle",o=ar(r.titleFont),a=r.titleSpacing,n.fillStyle=r.titleColor,n.font=o.string,l=0;l<i;++l)n.fillText(s[l],u.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+a,l+1===i&&(t.y+=r.titleMarginBottom-a)}}_drawColorBox(t,n,r,s,i){const o=this.labelColors[r],a=this.labelPointStyles[r],{boxHeight:l,boxWidth:u}=i,c=ar(i.bodyFont),d=Zf(this,"left",i),f=s.x(d),h=l<c.lineHeight?(c.lineHeight-l)/2:0,g=n.y+h;if(i.usePointStyle){const m={radius:Math.min(u,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},y=s.leftForLtr(f,u)+u/2,w=g+l/2;t.strokeStyle=i.multiKeyBackground,t.fillStyle=i.multiKeyBackground,lE(t,m,y,w),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,lE(t,m,y,w)}else{t.lineWidth=Ct(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,t.strokeStyle=o.borderColor,t.setLineDash(o.borderDash||[]),t.lineDashOffset=o.borderDashOffset||0;const m=s.leftForLtr(f,u),y=s.leftForLtr(s.xPlus(f,1),u-2),w=jl(o.borderRadius);Object.values(w).some(b=>b!==0)?(t.beginPath(),t.fillStyle=i.multiKeyBackground,zp(t,{x:m,y:g,w:u,h:l,radius:w}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),zp(t,{x:y,y:g+1,w:u-2,h:l-2,radius:w}),t.fill()):(t.fillStyle=i.multiKeyBackground,t.fillRect(m,g,u,l),t.strokeRect(m,g,u,l),t.fillStyle=o.backgroundColor,t.fillRect(y,g+1,u-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:s}=this,{bodySpacing:i,bodyAlign:o,displayColors:a,boxHeight:l,boxWidth:u,boxPadding:c}=r,d=ar(r.bodyFont);let f=d.lineHeight,h=0;const g=Wl(r.rtl,this.x,this.width),m=function(E){n.fillText(E,g.x(t.x+h),t.y+f/2),t.y+=f+i},y=g.textAlign(o);let w,b,x,_,S,P,A;for(n.textAlign=o,n.textBaseline="middle",n.font=d.string,t.x=Zf(this,y,r),n.fillStyle=r.bodyColor,Lt(this.beforeBody,m),h=a&&y!=="right"?o==="center"?u/2+c:u+2+c:0,_=0,P=s.length;_<P;++_){for(w=s[_],b=this.labelTextColors[_],n.fillStyle=b,Lt(w.before,m),x=w.lines,a&&x.length&&(this._drawColorBox(n,t,_,g,r),f=Math.max(d.lineHeight,l)),S=0,A=x.length;S<A;++S)m(x[S]),f=d.lineHeight;Lt(w.after,m)}h=0,f=d.lineHeight,Lt(this.afterBody,m),t.y-=i}drawFooter(t,n,r){const s=this.footer,i=s.length;let o,a;if(i){const l=Wl(r.rtl,this.x,this.width);for(t.x=Zf(this,r.footerAlign,r),t.y+=r.footerMarginTop,n.textAlign=l.textAlign(r.footerAlign),n.textBaseline="middle",o=ar(r.footerFont),n.fillStyle=r.footerColor,n.font=o.string,a=0;a<i;++a)n.fillText(s[a],l.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+r.footerSpacing}}drawBackground(t,n,r,s){const{xAlign:i,yAlign:o}=this,{x:a,y:l}=t,{width:u,height:c}=r,{topLeft:d,topRight:f,bottomLeft:h,bottomRight:g}=jl(s.cornerRadius);n.fillStyle=s.backgroundColor,n.strokeStyle=s.borderColor,n.lineWidth=s.borderWidth,n.beginPath(),n.moveTo(a+d,l),o==="top"&&this.drawCaret(t,n,r,s),n.lineTo(a+u-f,l),n.quadraticCurveTo(a+u,l,a+u,l+f),o==="center"&&i==="right"&&this.drawCaret(t,n,r,s),n.lineTo(a+u,l+c-g),n.quadraticCurveTo(a+u,l+c,a+u-g,l+c),o==="bottom"&&this.drawCaret(t,n,r,s),n.lineTo(a+h,l+c),n.quadraticCurveTo(a,l+c,a,l+c-h),o==="center"&&i==="left"&&this.drawCaret(t,n,r,s),n.lineTo(a,l+d),n.quadraticCurveTo(a,l,a+d,l),n.closePath(),n.fill(),s.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,s=r&&r.x,i=r&&r.y;if(s||i){const o=Cc[t.position].call(this,this._active,this._eventPosition);if(!o)return;const a=this._size=HE(this,t),l=Object.assign({},o,this._size),u=jE(n,t,l),c=WE(t,l,u,n);(s._to!==c.x||i._to!==c.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=a.width,this.height=a.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,c))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const s={width:this.width,height:this.height},i={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const o=ws(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(t.save(),t.globalAlpha=r,this.drawBackground(i,t,s,n),g2(t,n.textDirection),i.y+=o.top,this.drawTitle(i,t,n),this.drawBody(i,t,n),this.drawFooter(i,t,n),v2(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,s=t.map(({datasetIndex:a,index:l})=>{const u=this.chart.getDatasetMeta(a);if(!u)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:u.data[l],index:l}}),i=!Np(r,s),o=this._positionChanged(s,n);(i||o)&&(this._active=s,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,i=this._active||[],o=this._getActiveElements(t,i,n,r),a=this._positionChanged(o,t),l=n||!Np(o,i)||a;return l&&(this._active=o,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,r,s){const i=this.options;if(t.type==="mouseout")return[];if(!s)return n.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const o=this.chart.getElementsAtEventForMode(t,i.mode,i,r);return i.reverse&&o.reverse(),o}_positionChanged(t,n){const{caretX:r,caretY:s,options:i}=this,o=Cc[i.position].call(this,t,n);return o!==!1&&(r!==o.x||s!==o.y)}},we(Ov,"positioners",Cc),Ov);var yse={id:"tooltip",_element:KE,positioners:Cc,afterInit(e,t,n){n&&(e.tooltip=new KE({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:M2},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const bse=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function wse(e,t,n,r){const s=e.indexOf(t);if(s===-1)return bse(e,t,n,r);const i=e.lastIndexOf(t);return s!==i?n:s}const Sse=(e,t)=>e===null?null:Ds(Math.round(e),0,t);function YE(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class Ab extends tc{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:s,label:i}of n)r[s]===i&&r.splice(s,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(Ut(t))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===t?n:wse(r,t,Tt(n,t),this._addedLabels),Sse(n,r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),n||(s=this.getLabels().length-1)),this.min=r,this.max=s}buildTicks(){const t=this.min,n=this.max,r=this.options.offset,s=[];let i=this.getLabels();i=t===0&&n===i.length-1?i:i.slice(t,n+1),this._valueRange=Math.max(i.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let o=t;o<=n;o++)s.push({value:o});return s}getLabelForValue(t){return YE.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}we(Ab,"id","category"),we(Ab,"defaults",{ticks:{callback:YE}});function _se(e,t){const n=[],{bounds:s,step:i,min:o,max:a,precision:l,count:u,maxTicks:c,maxDigits:d,includeBounds:f}=e,h=i||1,g=c-1,{min:m,max:y}=t,w=!Ut(o),b=!Ut(a),x=!Ut(u),_=(y-m)/(d+1);let S=Zx((y-m)/g/h)*h,P,A,E,T;if(S<1e-14&&!w&&!b)return[{value:m},{value:y}];T=Math.ceil(y/S)-Math.floor(m/S),T>g&&(S=Zx(T*S/g/h)*h),Ut(l)||(P=Math.pow(10,l),S=Math.ceil(S*P)/P),s==="ticks"?(A=Math.floor(m/S)*S,E=Math.ceil(y/S)*S):(A=m,E=y),w&&b&&i&&xte((a-o)/i,S/1e3)?(T=Math.round(Math.min((a-o)/S,c)),S=(a-o)/T,A=o,E=a):x?(A=w?o:A,E=b?a:E,T=u-1,S=(E-A)/T):(T=(E-A)/S,$h(T,Math.round(T),S/1e3)?T=Math.round(T):T=Math.ceil(T));const R=Math.max(eE(S),eE(A));P=Math.pow(10,Ut(l)?R:l),A=Math.round(A*P)/P,E=Math.round(E*P)/P;let I=0;for(w&&(f&&A!==o?(n.push({value:o}),A<o&&I++,$h(Math.round((A+I*S)*P)/P,o,XE(o,_,e))&&I++):A<o&&I++);I<T;++I){const O=Math.round((A+I*S)*P)/P;if(b&&O>a)break;n.push({value:O})}return b&&f&&E!==a?n.length&&$h(n[n.length-1].value,a,XE(a,_,e))?n[n.length-1].value=a:n.push({value:a}):(!b||E===a)&&n.push({value:E}),n}function XE(e,t,{horizontal:n,minRotation:r}){const s=xa(r),i=(n?Math.sin(s):Math.cos(s))||.001,o=.75*t*(""+e).length;return Math.min(t/i,o)}class kse extends tc{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return Ut(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:s,max:i}=this;const o=l=>s=n?s:l,a=l=>i=r?i:l;if(t){const l=Fo(s),u=Fo(i);l<0&&u<0?a(0):l>0&&u>0&&o(0)}if(s===i){let l=i===0?1:Math.abs(i*.05);a(i+l),t||o(s-l)}this.min=s,this.max=i}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,s;return r?(s=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),n=n||11),n&&(s=Math.min(n,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const s={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},i=this._range||this,o=_se(s,i);return t.bounds==="ticks"&&Ete(o,this,"value"),t.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const s=(r-n)/Math.max(t.length-1,1)/2;n-=s,r+=s}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return i2(t,this.chart.options.locale,this.options.ticks.format)}}class Ob extends kse{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=bs(t)?t:0,this.max=bs(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=xa(this.options.ticks.minRotation),s=(t?Math.sin(r):Math.cos(r))||.001,i=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,i.lineHeight/s))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}we(Ob,"id","linear"),we(Ob,"defaults",{ticks:{callback:a2.formatters.numeric}});const Jm={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Ar=Object.keys(Jm);function QE(e,t){return e-t}function JE(e,t){if(Ut(t))return null;const n=e._adapter,{parser:r,round:s,isoWeekday:i}=e._parseOpts;let o=t;return typeof r=="function"&&(o=r(o)),bs(o)||(o=typeof r=="string"?n.parse(o,r):n.parse(o)),o===null?null:(s&&(o=s==="week"&&(Up(i)||i===!0)?n.startOf(o,"isoWeek",i):n.startOf(o,s)),+o)}function ZE(e,t,n,r){const s=Ar.length;for(let i=Ar.indexOf(e);i<s-1;++i){const o=Jm[Ar[i]],a=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((n-t)/(a*o.size))<=r)return Ar[i]}return Ar[s-1]}function xse(e,t,n,r,s){for(let i=Ar.length-1;i>=Ar.indexOf(n);i--){const o=Ar[i];if(Jm[o].common&&e._adapter.diff(s,r,o)>=t-1)return o}return Ar[n?Ar.indexOf(n):0]}function Ese(e){for(let t=Ar.indexOf(e)+1,n=Ar.length;t<n;++t)if(Jm[Ar[t]].common)return Ar[t]}function eC(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:r,hi:s}=Y0(n,t),i=n[r]>=t?n[r]:n[s];e[i]=!0}}function Cse(e,t,n,r){const s=e._adapter,i=+s.startOf(t[0].value,r),o=t[t.length-1].value;let a,l;for(a=i;a<=o;a=+s.add(a,1,r))l=n[a],l>=0&&(t[l].major=!0);return t}function tC(e,t,n){const r=[],s={},i=t.length;let o,a;for(o=0;o<i;++o)a=t[o],s[a]=o,r.push({value:a,major:!1});return i===0||!n?r:Cse(e,r,s,n)}class Wp extends tc{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){const r=t.time||(t.time={}),s=this._adapter=new Hne._date(t.adapters.date);s.init(n),Wc(r.displayFormats,s.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:JE(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,r=t.time.unit||"day";let{min:s,max:i,minDefined:o,maxDefined:a}=this.getUserBounds();function l(u){!o&&!isNaN(u.min)&&(s=Math.min(s,u.min)),!a&&!isNaN(u.max)&&(i=Math.max(i,u.max))}(!o||!a)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),s=bs(s)&&!isNaN(s)?s:+n.startOf(Date.now(),r),i=bs(i)&&!isNaN(i)?i:+n.endOf(Date.now(),r)+1,this.min=Math.min(s,i-1),this.max=Math.max(s+1,i)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],r=t[t.length-1]),{min:n,max:r}}buildTicks(){const t=this.options,n=t.time,r=t.ticks,s=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const i=this.min,o=this.max,a=Ote(s,i,o);return this._unit=n.unit||(r.autoSkip?ZE(n.minUnit,this.min,this.max,this._getLabelCapacity(i)):xse(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:Ese(this._unit),this.initOffsets(s),t.reverse&&a.reverse(),tC(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,r=0,s,i;this.options.offset&&t.length&&(s=this.getDecimalForValue(t[0]),t.length===1?n=1-s:n=(this.getDecimalForValue(t[1])-s)/2,i=this.getDecimalForValue(t[t.length-1]),t.length===1?r=i:r=(i-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;n=Ds(n,0,o),r=Ds(r,0,o),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,s=this.options,i=s.time,o=i.unit||ZE(i.minUnit,n,r,this._getLabelCapacity(n)),a=Tt(s.ticks.stepSize,1),l=o==="week"?i.isoWeekday:!1,u=Up(l)||l===!0,c={};let d=n,f,h;if(u&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,u?"day":o),t.diff(r,n,o)>1e5*a)throw new Error(n+" and "+r+" are too far apart with stepSize of "+a+" "+o);const g=s.ticks.source==="data"&&this.getDataTimestamps();for(f=d,h=0;f<r;f=+t.add(f,a,o),h++)eC(c,f,g);return(f===r||s.bounds==="ticks"||h===1)&&eC(c,f,g),Object.keys(c).sort(QE).map(m=>+m)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}format(t,n){const s=this.options.time.displayFormats,i=this._unit,o=n||s[i];return this._adapter.format(t,o)}_tickFormatFunction(t,n,r,s){const i=this.options,o=i.ticks.callback;if(o)return Zt(o,[t,n,r],this);const a=i.time.displayFormats,l=this._unit,u=this._majorUnit,c=l&&a[l],d=u&&a[u],f=r[n],h=u&&d&&f&&f.major;return this._adapter.format(t,s||(h?d:c))}generateTickLabels(t){let n,r,s;for(n=0,r=t.length;n<r;++n)s=t[n],s.label=this._tickFormatFunction(s.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,r=this.ctx.measureText(t).width,s=xa(this.isHorizontal()?n.maxRotation:n.minRotation),i=Math.cos(s),o=Math.sin(s),a=this._resolveTickFontOptions(0).size;return{w:r*i+a*o,h:r*o+a*i}}_getLabelCapacity(t){const n=this.options.time,r=n.displayFormats,s=r[n.unit]||r.millisecond,i=this._tickFormatFunction(t,0,tC(this,[t],this._majorUnit),s),o=this._getLabelSize(i),a=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return a>0?a:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(n=0,r=s.length;n<r;++n)t=t.concat(s[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,r;if(t.length)return t;const s=this.getLabels();for(n=0,r=s.length;n<r;++n)t.push(JE(this,s[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return t2(t.sort(QE))}}we(Wp,"id","time"),we(Wp,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function eh(e,t,n){let r=0,s=e.length-1,i,o,a,l;n?(t>=e[r].pos&&t<=e[s].pos&&({lo:r,hi:s}=Tb(e,"pos",t)),{pos:i,time:a}=e[r],{pos:o,time:l}=e[s]):(t>=e[r].time&&t<=e[s].time&&({lo:r,hi:s}=Tb(e,"time",t)),{time:i,pos:a}=e[r],{time:o,pos:l}=e[s]);const u=o-i;return u?a+(l-a)*(t-i)/u:a}class nC extends Wp{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=eh(n,this.min),this._tableRange=eh(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,s=[],i=[];let o,a,l,u,c;for(o=0,a=t.length;o<a;++o)u=t[o],u>=n&&u<=r&&s.push(u);if(s.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(o=0,a=s.length;o<a;++o)c=s[o+1],l=s[o-1],u=s[o],Math.round((c+l)/2)!==u&&i.push({time:u,pos:o/(a-1)});return i}_generate(){const t=this.min,n=this.max;let r=super.getDataTimestamps();return(!r.includes(t)||!r.length)&&r.splice(0,0,t),(!r.includes(n)||r.length===1)&&r.push(n),r.sort((s,i)=>s-i)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return(eh(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return eh(this._table,r*this._tableRange+this._minPos,!0)}}we(nC,"id","timeseries"),we(nC,"defaults",Wp.defaults);const D2={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},Tse={ariaLabel:{type:String},ariaDescribedby:{type:String}},Pse={type:{type:String,required:!0},destroyDelay:{type:Number,default:0},...D2,...Tse},Rse=QT[0]==="2"?(e,t)=>Object.assign(e,{attrs:t}):(e,t)=>Object.assign(e,t);function _l(e){return Fd(e)?Ue(e):e}function Ise(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e;return Fd(t)?new Proxy(e,{}):e}function Ase(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function L2(e,t){e.labels=t}function $2(e,t,n){const r=[];e.datasets=t.map(s=>{const i=e.datasets.find(o=>o[n]===s[n]);return!i||!s.data||r.includes(i)?{...s}:(r.push(i),Object.assign(i,s),i)})}function Ose(e,t){const n={labels:[],datasets:[]};return L2(n,e.labels),$2(n,e.datasets,t),n}const Mse=Fe({props:Pse,setup(e,t){let{expose:n,slots:r}=t;const s=K(null),i=Pe(null);n({chart:i});const o=()=>{if(!s.value)return;const{type:u,data:c,options:d,plugins:f,datasetIdKey:h}=e,g=Ose(c,h),m=Ise(g,c);i.value=new Qm(s.value,{type:u,data:m,options:{...d},plugins:f})},a=()=>{const u=Ue(i.value);u&&(e.destroyDelay>0?setTimeout(()=>{u.destroy(),i.value=null},e.destroyDelay):(u.destroy(),i.value=null))},l=u=>{u.update(e.updateMode)};return yt(o),im(a),Ee([()=>e.options,()=>e.data],(u,c)=>{let[d,f]=u,[h,g]=c;const m=Ue(i.value);if(!m)return;let y=!1;if(d){const w=_l(d),b=_l(h);w&&w!==b&&(Ase(m,w),y=!0)}if(f){const w=_l(f.labels),b=_l(g.labels),x=_l(f.datasets),_=_l(g.datasets);w!==b&&(L2(m.config.data,w),y=!0),x&&x!==_&&($2(m.config.data,x,e.datasetIdKey),y=!0)}y&&Pt(()=>{l(m)})},{deep:!0}),()=>br("canvas",{role:"img",ariaLabel:e.ariaLabel,ariaDescribedby:e.ariaDescribedby,ref:s},[br("p",{},[r.default?r.default():""])])}});function Dse(e,t){return Qm.register(t),Fe({props:D2,setup(n,r){let{expose:s}=r;const i=Pe(null),o=a=>{i.value=a==null?void 0:a.chart};return s({chart:i}),()=>br(Mse,Rse({ref:o},{type:e,...n}))}})}const Lse=Dse("bar",Fh);function $se(e,t){const n=typeof e=="string"?$n(e):e,r=Fse(n,t);return{mounted:r,updated:r,unmounted(s){aP(null,s)}}}function Fse(e,t){return function(n,r,s){var d,f,h;const i=typeof t=="function"?t(r):t,o=((d=r.value)==null?void 0:d.text)??r.value??(i==null?void 0:i.text),a=Zh(r.value)?r.value:{},l=()=>o??n.textContent,u=(s.ctx===r.instance.$?(f=Nse(s,r.instance.$))==null?void 0:f.provides:(h=s.ctx)==null?void 0:h.provides)??r.instance.$.provides,c=br(e,me(i,a),l);c.appContext=Object.assign(Object.create(null),r.instance.$.appContext,{provides:u}),aP(c,n)}}function Nse(e,t){const n=new Set,r=i=>{var o,a;for(const l of i){if(!l)continue;if(l===e||l.el&&e.el&&l.el===e.el)return!0;n.add(l);let u;if(l.suspense?u=r([l.ssContent]):Array.isArray(l.children)?u=r(l.children):(o=l.component)!=null&&o.vnode&&(u=r([(a=l.component)==null?void 0:a.subTree])),u)return u;n.delete(l)}return!1};if(!r([t.subTree]))return t;const s=Array.from(n).reverse();for(const i of s)if(i.component)return i.component;return t}const Bse=$se(ot,e=>{var t;return{activator:"parent",location:(t=e.arg)==null?void 0:t.replace("-"," "),text:typeof e.value=="boolean"?void 0:e.value}}),Vse={class:"ma-3"},Use={class:"ml-6"},zse={class:"ml-7 mt-3"},Hse={key:0},jse={key:2},Wse=Fe({__name:"EmergencyCommands",setup(e){Qm.register(Ab,Ob,Vh,cse,yse,lse);const t=Xt(),n=K(!1),r=K(!1),s=K([]),i=K([]),o=K(NaN),a=K(NaN),l=K(NaN),u=K({labels:[],datasets:[{label:"OctoPrint Settings response times (ms)",data:[],borderColor:"#FF6384",backgroundColor:"#ffffff"}]}),c={color:"white",plugins:{title:{color:"red",text:"Response times (ms)",display:!0}},responsive:!0},d=M(()=>t.printers.length===0||t.printers.every(w=>!w.enabled)),f=M(()=>t.printers.length===0||t.printers.every(w=>!!w.enabled));async function h(){try{n.value=!0;const w=t.printers.map(P=>P.id),b=await $l.batchSettingsGet(w),x=b.map(P=>{var A,E;return((E=(A=P.value)==null?void 0:A.appearance)==null?void 0:E.name)||"ERROR"});i.value=b.filter(P=>!P.success).map(P=>({message:P.error}));const _=b.map(P=>P.time),S=b.map(P=>{var A,E;return((E=(A=P.value)==null?void 0:A.appearance)==null?void 0:E.name)??""});o.value=_.reduce((P,A)=>P+A,0)/_.length,l.value=Math.min(..._),a.value=Math.max(..._),u.value={labels:S,datasets:[{label:"OctoPrint Settings response times (ms)",data:_,borderColor:"#FF6384",backgroundColor:"#ffffff"}]},r.value=!0,s.value=x}finally{n.value=!1}}async function g(w){if(confirm("Are you sure you want to toggle all printers?")){n.value=!0;try{await $l.batchToggleEnabled(t.printers.map(b=>b.id),w)}finally{n.value=!1}}}async function m(){if(confirm("Are you sure you want to connect all USBs?"))try{await $l.batchConnectUsb(t.printers.map(w=>w.id))}finally{n.value=!1}}async function y(){confirm("Are you sure you want to connect all sockets?")&&(n.value=!0,await $l.batchConnectSocket(t.printers.map(w=>w.id)),n.value=!1)}return(w,b)=>($(),te(kt,null,{default:v(()=>[p(wr,{color:"primary"},{default:v(()=>[p(dt,null,{default:v(()=>[p(Z,null,{default:v(()=>[...b[3]||(b[3]=[k("settings",-1)])]),_:1})]),_:1}),p(On,null,{default:v(()=>[...b[4]||(b[4]=[k(" Emergency Commands",-1)])]),_:1})]),_:1}),p(Ht,{lines:"three",subheader:""},{default:v(()=>[p(Nr,null,{default:v(()=>[...b[5]||(b[5]=[k(" Emergency Commands to rectify problematic situations ",-1)])]),_:1}),p(ze,null,{default:v(()=>[p(ft,null,{default:v(()=>[...b[6]||(b[6]=[k(" Batch disabling",-1)])]),_:1}),p(St,null,{default:v(()=>[b[9]||(b[9]=k(" Disable all printers in batch (will not affect print) ",-1)),b[10]||(b[10]=C("br",null,null,-1)),p(ne,{disabled:n.value||d.value,class:"ml-4",color:"primary",onClick:b[0]||(b[0]=x=>g(!1))},{default:v(()=>[...b[7]||(b[7]=[k(" Batch disable ",-1)])]),_:1},8,["disabled"]),n.value?($(),te(ai,{key:0,class:"ml-2",indeterminate:"",size:"30",width:"4"})):pe("",!0),d.value?($(),te(Z,{key:1,class:"ml-2",color:"warning"},{default:v(()=>[...b[8]||(b[8]=[k(" warning ",-1)])]),_:1})):pe("",!0)]),_:1})]),_:1}),p(ze,null,{default:v(()=>[p(ft,null,{default:v(()=>[...b[11]||(b[11]=[k(" Batch enabling",-1)])]),_:1}),p(St,null,{default:v(()=>[b[14]||(b[14]=k(" Enabling all printers in batch (will not affect print and it will skip printers in maintenance mode) ",-1)),b[15]||(b[15]=C("br",null,null,-1)),p(ne,{disabled:n.value||f.value,class:"ml-4",color:"primary",onClick:b[1]||(b[1]=x=>g(!0))},{default:v(()=>[...b[12]||(b[12]=[k(" Batch enable ",-1)])]),_:1},8,["disabled"]),n.value?($(),te(ai,{key:0,class:"ml-2",indeterminate:"",size:"30",width:"4"})):pe("",!0),f.value?zt(($(),te(Z,{key:1,class:"ml-2",color:"warning"},{default:v(()=>[...b[13]||(b[13]=[k("warning ",-1)])]),_:1})),[[Bse,"No printers available",void 0,{bottom:!0}]]):pe("",!0)]),_:1})]),_:1}),p(ze,null,{default:v(()=>[p(ft,null,{default:v(()=>[...b[16]||(b[16]=[k(" Batch USB connect",-1)])]),_:1}),p(St,null,{default:v(()=>[b[19]||(b[19]=k(" Connect all USB devices ",-1)),b[20]||(b[20]=C("br",null,null,-1)),p(ne,{disabled:n.value||d.value,class:"ml-4",color:"primary",onClick:m},{default:v(()=>[p(Z,{class:"mr-2"},{default:v(()=>[...b[17]||(b[17]=[k("usb",-1)])]),_:1}),b[18]||(b[18]=k(" Connect USBs ",-1))]),_:1},8,["disabled"]),n.value?($(),te(ai,{key:0,class:"ml-2",indeterminate:"",size:"30",width:"4"})):pe("",!0)]),_:1}),p(St,{class:"mt-2"},{default:v(()=>[b[23]||(b[23]=k(" Connect all Sockets ",-1)),b[24]||(b[24]=C("br",null,null,-1)),p(ne,{disabled:n.value||d.value,class:"ml-4",color:"primary",onClick:y},{default:v(()=>[p(Z,{class:"mr-2"},{default:v(()=>[...b[21]||(b[21]=[k("hub",-1)])]),_:1}),b[22]||(b[22]=k(" Connect Sockets ",-1))]),_:1},8,["disabled"])]),_:1}),n.value?($(),te(ai,{key:0,class:"ml-2",indeterminate:"",size:"30",width:"4"})):pe("",!0)]),_:1})]),_:1}),C("div",Vse,[p(vn,null,{default:v(()=>[...b[25]||(b[25]=[k(" Test all OctoPrint response times",-1)])]),_:1}),C("div",Use,[p(ne,{loading:n.value,color:"primary",onClick:b[2]||(b[2]=x=>h())},{default:v(()=>[...b[26]||(b[26]=[k(" Measure network response times ",-1)])]),_:1},8,["loading"])]),C("div",zse,[r.value?($(),ve("span",Hse," Response times: ")):pe("",!0),r.value?($(),te(J(Lse),{key:1,data:u.value,options:c,height:"100",style:{"background-color":"#272727"}},null,8,["data"])):($(),ve("span",jse,"A graph will be shown, presenting the times in milliseconds (ms)")),n.value?($(),te(ai,{key:3,class:"ml-2",indeterminate:"",size:"30",width:"4"})):pe("",!0)])])]),_:1}))}}),qse={class:"text-center"},Gse=Fe({__name:"NotFoundView",setup(e){const t=ta(),n=()=>{t.go(-1)};return(r,s)=>($(),te(Yn,null,{default:v(()=>[s[6]||(s[6]=C("h2",{class:"text-center mt-lg-12"},"This page was not found.",-1)),s[7]||(s[7]=C("h1",{class:"text-center"},": (",-1)),s[8]||(s[8]=C("br",null,null,-1)),C("h4",qse,[p(ne,{class:"align-center",color:"primary",to:"/",variant:"elevated"},{default:v(()=>[p(Z,{class:"mr-2"},{default:v(()=>[...s[1]||(s[1]=[k("home",-1)])]),_:1}),s[2]||(s[2]=k(" Go home ",-1))]),_:1}),s[5]||(s[5]=C("span",{class:"pa-5"}," or ",-1)),p(ne,{class:"align-center",variant:"elevated",onClick:s[0]||(s[0]=i=>n())},{default:v(()=>[p(Z,{class:"mr-2"},{default:v(()=>[...s[3]||(s[3]=[k("arrow_left",-1)])]),_:1}),s[4]||(s[4]=k(" Go back ",-1))]),_:1})])]),_:1}))}}),Kse={key:0},Yse={key:1},Xse={key:2},Qse={key:3},Jse={key:4},Zse=Fe({__name:"PermissionDenied",setup(e){const t=QM(),n=M(()=>t.query);return(r,s)=>($(),te(Yn,{"fill-height":"",fluid:""},{default:v(()=>[p(fD,{color:"primary"},{default:v(()=>[p(On,{class:"text-uppercase text-white"},{default:v(()=>[...s[0]||(s[0]=[C("span",{class:"font-weight-light"}," FDM ",-1),C("strong",null," Monster ",-1)])]),_:1})]),_:1}),s[11]||(s[11]=C("img",{alt:"FDM Monster Background",class:"grid-bg-img align-content-center",src:z0,style:{opacity:"0.06"}},null,-1)),p(zm,{"align-center":"",column:"","justify-center":""},{default:v(()=>[p(kt,{class:"flex align-center justify-center pa-lg-16 pa-sm-10",style:{width:"80%"}},{default:v(()=>[p(an,null,{default:v(()=>[p(Z,{class:"mr-4",size:"50"},{default:v(()=>[...s[1]||(s[1]=[k(" lock ",-1)])]),_:1}),s[2]||(s[2]=C("h3",null,"Permission Denied",-1))]),_:1}),p($m,{class:"mt-1"},{default:v(()=>[...s[3]||(s[3]=[k(" You do not have permission to access a specific resource on this page. ",-1)])]),_:1}),n.value?($(),te(nn,{key:0},{default:v(()=>{var i,o;return[n.value.page?($(),ve("div",Kse,[s[4]||(s[4]=k(" Page: ",-1)),C("strong",null,se((i=n.value)==null?void 0:i.page),1)])):pe("",!0),n.value.permissions?($(),ve("div",Yse,[s[5]||(s[5]=k(" Required permission(s): ",-1)),($(!0),ve(Oe,null,Qt(n.value.permissions,a=>($(),ve("strong",{key:a},se(a),1))),128))])):pe("",!0),n.value.roles?($(),ve("div",Xse,[s[6]||(s[6]=k(" Usable roles: ",-1)),C("strong",null,se((o=n.value.roles)==null?void 0:o.join(", ")),1)])):pe("",!0),n.value.url?($(),ve("div",Qse,[s[7]||(s[7]=k(" Problematic API path: ",-1)),C("strong",null,se(n.value.url),1)])):pe("",!0),n.value.error?($(),ve("div",Jse,[s[8]||(s[8]=k(" Error: ",-1)),C("strong",null,se(n.value.error),1)])):pe("",!0)]}),_:1})):pe("",!0),p(Bn,{class:"mt-6"},{default:v(()=>[p(ne,{class:"align-center",color:"primary",to:"/",variant:"elevated"},{default:v(()=>[p(Z,{class:"mr-2"},{default:v(()=>[...s[9]||(s[9]=[k("home",-1)])]),_:1}),s[10]||(s[10]=k(" Go home ",-1))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}))}}),eie=Fe({__name:"Logo",setup(e){return(t,n)=>($(),te(vs,{src:J(B0),class:"shrink mr-1 pt-3 ml-1",contain:"",style:{opacity:"0.85"},width:"150"},null,8,["src"]))}}),tie=Fe({__name:"LoginForm",setup(e){const t=ps(),n=K(""),r=K(""),s=K(!1),i=K(""),o=ta(),a=QM(),l=K(!1),u=Dn("auth:login"),c=Ft(),d=M(()=>{var m;return((m=r.value??"")==null?void 0:m.length)<3||(i.value??"").length<3});yt(async()=>{if(t.loadTokens(),await t.checkAuthenticationRequirements(),t.loginRequired===!1)return console.debug("LoginView, no login required, redirecting to",a.query.redirect,"or home"),u.emit(!0),await g();if(!t.hasRefreshToken)return;await t.verifyOrRefreshLoginOnceOrLogout()&&await g()});async function f(){return await o.push({name:Yt.Registration})}async function h(){var m,y,w,b;try{l.value=!0,await t.login(r.value,i.value),t.lastLogoutReason=null,i.value="",l.value=!1}catch(x){if(l.value=!1,((m=x==null?void 0:x.response)==null?void 0:m.status)===401){i.value="";const _=(w=(y=x==null?void 0:x.response)==null?void 0:y.data)==null?void 0:w.reasonCode,S=S1(_);_===Ir.AccountNotVerified?c.error(S,"Please ask your administrator to verify your account and try again."):_===Ir.PasswordChangeRequired&&c.error(S,"Your password needs to be changed. This feature is sadly not finished"),n.value=S;return}c.openErrorMessage({title:"Error logging in",subtitle:"Please test your connection and try again."}),n.value="Error logging in - status code "+((b=x==null?void 0:x.response)==null?void 0:b.status),i.value="";return}return n.value="",u.emit(!0),await g()}async function g(){const m=a.query.redirect;if(m){console.debug("[LoginForm] Redirecting to ",m),await o.push({path:m});return}else{console.debug("[LoginForm] Redirecting to home"),await o.push({name:Yt.Home});return}}return(m,y)=>($(),te(kt,{class:"pa-4",elevation:"10",style:{"border-radius":"10px"}},{default:v(()=>[p(nn,null,{default:v(()=>[p(j0,null,{default:v(()=>[y[7]||(y[7]=C("label",null," Username ",-1)),p(at,{modelValue:r.value,"onUpdate:modelValue":y[0]||(y[0]=w=>r.value=w),"prepend-icon":"person",autofocus:"",label:"Username",name:"login",type:"text",variant:"underlined",onKeyup:y[1]||(y[1]=qv(w=>d.value||h(),["enter"]))},null,8,["modelValue"]),p(at,{modelValue:i.value,"onUpdate:modelValue":y[2]||(y[2]=w=>i.value=w),"append-inner-icon":s.value?"visibility_off":"visibility","onClick:appendInner":y[3]||(y[3]=w=>s.value=!s.value),type:s.value?"text":"password",label:"Password",name:"password",password:"","prepend-icon":"lock",variant:"underlined",onKeyup:y[4]||(y[4]=qv(w=>d.value||h(),["enter"]))},null,8,["modelValue","append-inner-icon","type"]),n.value?($(),te(vn,{key:0,class:"mt-6",color:"error",density:"compact",variant:"outlined"},{default:v(()=>[k(se(n.value),1)]),_:1})):pe("",!0),J(t).lastLogoutReason?($(),te(vn,{key:1,class:"mt-6",color:"error-darken-1",density:"compact",variant:"outlined"},{default:v(()=>[k(" Reason for automatic logout: "+se(J(t).lastLogoutReason),1)]),_:1})):pe("",!0)]),_:1})]),_:1}),p(Bn,null,{default:v(()=>[p(ne,{loading:l.value,class:"pa-4",color:"primary",size:"lg",variant:"flat",style:{width:"100%"},onClick:y[5]||(y[5]=w=>h())},{default:v(()=>[...y[8]||(y[8]=[k(" Login ",-1)])]),_:1},8,["loading"])]),_:1}),p(Bn,null,{default:v(()=>[p(ne,{disabled:!J(t).registration,class:"pa-4",size:"lg",variant:"flat",style:{width:"100%"},onClick:y[6]||(y[6]=w=>f())},{default:v(()=>[k(" Register new account "+se(J(t).registration?"":"(not enabled)")+" ",1),p(Z,{class:"pl-5",icon:"right"})]),_:1},8,["disabled"])]),_:1})]),_:1}))}}),nie={class:"d-flex align-center",style:{"min-height":"calc(100vh - 148px)"}},rie={class:"pt-6 pl-6 d-flex flex-column align-center"},sie=Fe({__name:"LoginView",setup(e){return(t,n)=>{const r=eie;return $(),te(st,{class:"position-relative","no-gutters":""},{default:v(()=>[p(We,{cols:"12",lg:"12"},{default:v(()=>[p(Yn,null,{default:v(()=>[C("div",nie,[p(st,{justify:"center",class:"align-content-center"},{default:v(()=>[C("div",rie,[p(r),p(On,{class:"text-uppercase text-red"},{default:v(()=>[...n[0]||(n[0]=[C("strong",null," FDM ",-1),C("strong",null," Monster ",-1)])]),_:1}),p(On,{class:"mt-lg-6 mt-sm-5 mb-md-5"},{default:v(()=>[...n[1]||(n[1]=[k(" Login to your account ",-1)])]),_:1}),p($m,{class:"text-grey mb-md-5"},{default:v(()=>[...n[2]||(n[2]=[k(" Welcome back! Please enter your details ",-1)])]),_:1})]),p(We,{cols:"12",md:"12"},{default:v(()=>[p(tie,{class:"login-card"})]),_:1})]),_:1})])]),_:1})]),_:1})]),_:1})}}}),iie={class:"d-flex flex-column align-center"},oie=Fe({__name:"RegistrationForm",setup(e){const t=ps(),n=ta(),r=K(""),s=K(""),i=K(!1),o=K(!1),a=K(""),l=K(""),u=K(!1),c=Ft();async function d(){return await n.push({name:Yt.Login})}const f=M(()=>{var g;return((g=s.value??"")==null?void 0:g.length)<3||(a.value??"").length<3||a.value!=l.value});yt(async()=>{await t.logout(),await t.checkAuthenticationRequirements(),t.registration||(c.info("Registration is disabled, please contact your administrator"),await n.push({name:Yt.Login}))});async function h(){var g;try{u.value=!0,await ha.registerAccount(s.value,a.value),u.value=!1}catch(m){if(u.value=!1,((g=m==null?void 0:m.response)==null?void 0:g.status)===401){r.value="Invalid credentials";return}c.openErrorMessage({title:"Error logging in",subtitle:"Please test your connection and try again."});return}r.value="",c.info("Account created, please login"),await d()}return(g,m)=>{const y=$n("v-flex");return $(),te(Yn,{"fill-height":"",fluid:""},{default:v(()=>[p(zm,{"align-content-center":"","justify-center":""},{default:v(()=>[p(y,{class:"d-flex flex-column align-content-center",md4:"",sm8:"",style:{"max-width":"450px","margin-top":"10%"},xs12:""},{default:v(()=>[C("div",iie,[p(vs,{src:require("@/assets/logo.png"),class:"shrink mr-1 pt-3 ml-1",contain:"",style:{opacity:"0.85"},width:"150"},null,8,["src"]),p(On,{class:"text-uppercase text-red"},{default:v(()=>[...m[8]||(m[8]=[C("strong",null," FDM ",-1),C("strong",null," Monster ",-1)])]),_:1}),p(On,{class:"mt-lg-6 mt-sm-5"},{default:v(()=>[...m[9]||(m[9]=[k(" Register new account ",-1)])]),_:1}),p($m,{class:"text-grey"},{default:v(()=>[...m[10]||(m[10]=[k(" Welcome! Please register your guest account ",-1)])]),_:1})]),p(kt,{class:"elevation-4 pa-4",style:{"border-radius":"10px"}},{default:v(()=>[p(nn,null,{default:v(()=>[p(j0,null,{default:v(()=>[m[11]||(m[11]=C("label",null," Username ",-1)),p(at,{modelValue:s.value,"onUpdate:modelValue":m[0]||(m[0]=w=>s.value=w),rules:[w=>!!w||"Username is required",w=>((w==null?void 0:w.length)??0)>=3||"Username must be of length 3 or greater",w=>!w.toLowerCase().includes("admin")||"Username may not contain the word admin",w=>!w.toLowerCase().includes("root")||"Username may not contain the word root",w=>w.toLowerCase()!=="demo"||"Username may not equal the word demo"],autofocus:"",name:"login",label:"Username","prepend-icon":"person",type:"text"},null,8,["modelValue","rules"]),p(at,{id:"password",modelValue:a.value,"onUpdate:modelValue":m[1]||(m[1]=w=>a.value=w),"append-icon":i.value?"visibility":"visibility_off",type:i.value?"text":"password",label:"Password",name:"password",rules:[w=>!!w||"Password is required",w=>!!w&&(w==null?void 0:w.length)>=8||"Password must be of length 8 or greater"],password:"","prepend-icon":"lock","onClick:append":m[2]||(m[2]=w=>i.value=!i.value)},null,8,["modelValue","append-icon","type","rules"]),p(at,{id:"password",modelValue:l.value,"onUpdate:modelValue":m[3]||(m[3]=w=>l.value=w),"append-icon":o.value?"visibility":"visibility_off",type:o.value?"text":"password",rules:[w=>!!w||"Repeated password is required",w=>w===a.value||"Passwords are not equal"],label:"Repeated Password",name:"password",password:"","prepend-icon":"lock","onClick:append":m[4]||(m[4]=w=>o.value=!o.value),onKeyup:m[5]||(m[5]=qv(w=>f.value||h(),["enter"]))},null,8,["modelValue","append-icon","type","rules"]),r.value?($(),te(vn,{key:0,class:"mt-6",color:"error",density:"compact",variant:"outlined"},{default:v(()=>[k(se(r.value),1)]),_:1})):pe("",!0)]),_:1})]),_:1}),p(Bn,null,{default:v(()=>[p(ne,{loading:u.value,class:"pa-4",color:"primary",size:"large",style:{width:"100%"},onClick:m[6]||(m[6]=w=>h())},{default:v(()=>[...m[12]||(m[12]=[k(" Register account ",-1)])]),_:1},8,["loading"])]),_:1}),p(Bn,null,{default:v(()=>[p(ne,{style:{width:"100%"},class:"pa-4",size:"large",onClick:m[7]||(m[7]=w=>d())},{default:v(()=>[p(Z,{class:"mr-2"},{default:v(()=>[...m[13]||(m[13]=[k("arrow_left",-1)])]),_:1}),m[14]||(m[14]=k("Back to Login ",-1))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})}}}),aie=Fe({__name:"RegistrationView",setup(e){return(t,n)=>($(),te(Yn,{"fill-height":"",fluid:""},{default:v(()=>[p(zm,{"align-center":"","justify-center":""},{default:v(()=>[p(oie)]),_:1})]),_:1}))}}),lie=["src"],uie=Fe({__name:"CameraGridView",setup(e){const t=Xt(),n=rn(sn.AddOrUpdateCameraDialog),s=Um({queryKey:["cameraStream"],queryFn:async()=>(await Dp.listCameraStreams()).map(c=>({printer:t.printers.find(d=>d.id===c.printerId),cameraStream:c}))}),i=_Y({mutationFn:u=>Dp.deleteCameraStream(u),onSuccess:()=>s.refetch()});function o(){n.openDialog({addOrUpdate:"add"})}function a(u){u&&n.openDialog({addOrUpdate:"update",cameraId:u})}function l(u){u&&i.mutateAsync(u)}return(u,c)=>($(),ve("div",null,[p(wr,null,{default:v(()=>[p(On,{class:"mr-4"},{default:v(()=>[...c[1]||(c[1]=[k(" Camera Overview ",-1)])]),_:1}),p(ne,{color:"primary",onClick:c[0]||(c[0]=d=>o())},{default:v(()=>[p(Z,{class:"mr-2"},{default:v(()=>[...c[2]||(c[2]=[k("add",-1)])]),_:1}),c[3]||(c[3]=k(" Add camera ",-1))]),_:1})]),_:1}),p(st,{class:"ma-0"},{default:v(()=>[($(!0),ve(Oe,null,Qt(J(s).data.value,d=>($(),ve("div",{key:d.cameraStream.id,class:"ma-4",style:{border:"1px solid grey",margin:"0"},width:"300"},[p(kt,{class:"pb-2 pl-2 pr-2",width:"300"},{default:v(()=>{var f;return[p(an,null,{default:v(()=>{var h;return[d.cameraStream.printerId?($(),te(Z,{key:0,class:"mr-2",size:"small"},{default:v(()=>[...c[4]||(c[4]=[k(" print ",-1)])]),_:1})):($(),te(Z,{key:1,class:"mr-2",size:"small"},{default:v(()=>[...c[5]||(c[5]=[k(" camera_alt ",-1)])]),_:1})),k(" "+se((d==null?void 0:d.cameraStream.name)??((h=d==null?void 0:d.printer)==null?void 0:h.name)??"Camera"),1)]}),_:2},1024),C("img",{src:(f=d.cameraStream)==null?void 0:f.streamURL,width:"100%"},null,8,lie),c[10]||(c[10]=C("br",null,null,-1)),p(ne,{class:"mr-1",size:"small",onClick:h=>a(d.cameraStream.id)},{default:v(()=>[p(Z,{class:"mr-2"},{default:v(()=>[...c[6]||(c[6]=[k("edit",-1)])]),_:1}),c[7]||(c[7]=k(" Update ",-1))]),_:1},8,["onClick"]),p(ne,{size:"small",onClick:h=>l(d.cameraStream.id)},{default:v(()=>[p(Z,{class:"mr-2"},{default:v(()=>[...c[8]||(c[8]=[k("delete",-1)])]),_:1}),c[9]||(c[9]=k(" Delete ",-1))]),_:1},8,["onClick"])]}),_:2},1024)]))),128))]),_:1})]))}}),cie="/img/OIG.jpg";class die extends kr{static async postFirstTimeSetup(t){const n=$e.completeFirstTimeSetupRoute;return await this.post(n,t)}}const fie={class:"mt-6 border_all"},hie={class:"d-flex flex-row align-center"},pie={class:"d-flex flex-row align-center"},mie={class:"d-flex flex-row align-center"},gie={class:"d-flex flex-row align-center"},vie={class:"mt-4"},yie={class:"mt-4"},bie={class:"mt-14"},wie={class:"mb-5 mt-10"},Sie={class:"mt-14"},_ie=Fe({__name:"FirstTimeSetupView",setup(e){const t=ta(),n=Ft(),r=K(!1),s=ps(),i=K({loginRequired:!0,registration:!1}),o=K({rootUsername:"admin",rootPassword:"",rootPassword2:""}),a=K(1);yt(async()=>{var c;await s.checkAuthenticationRequirements(),(c=s.wizardState)!=null&&c.wizardCompleted&&(n.info("Setup already completed."),s.loginRequired?await t.push({name:"Login"}):await t.push({name:"Home"}))});async function l(){if(!r.value){n.error("Please fill out all required fields.");return}const c=i.value,d=o.value;await die.postFirstTimeSetup({loginRequired:c.loginRequired,registration:c.registration,rootUsername:d.rootUsername,rootPassword:d.rootPassword}),n.openInfoMessage({title:"Setup completed"}),a.value=3}async function u(){await t.push({name:"Login"})}return(c,d)=>{const f=$n("v-stepper-step"),h=$n("v-stepper-content"),g=$n("v-stepper-items");return $(),te(Yn,null,{default:v(()=>[d[46]||(d[46]=C("img",{alt:"FDM Monster Background",class:"grid-bg-img align-content-center",src:z0,style:{opacity:"0.08"}},null,-1)),p(_M,{modelValue:a.value,"onUpdate:modelValue":d[10]||(d[10]=m=>a.value=m),class:"bg-grey-darken-4"},{default:v(()=>[p(x0,null,{default:v(()=>[p(f,{complete:a.value>1,step:"1"},{default:v(()=>[...d[11]||(d[11]=[k(" Introduction ",-1)])]),_:1},8,["complete"]),p(ln),p(f,{complete:a.value>2,step:"2"},{default:v(()=>[...d[12]||(d[12]=[k(" Login and registration ",-1)])]),_:1},8,["complete"]),p(ln),p(f,{step:"3"},{default:v(()=>[...d[13]||(d[13]=[k(" Summary ",-1)])]),_:1})]),_:1}),p(g,null,{default:v(()=>[p(h,{class:"align-content-center align-center text-center",step:"1"},{default:v(()=>[d[17]||(d[17]=C("div",{class:"align-content-center align-center text-center"},[C("img",{class:"rounded-pill ma-4",src:cie,style:{opacity:"0.7"},width:"400"}),k(" /> "),C("h1",null,"FDM Monster"),C("small",null," This server is still unconfigured. ")],-1)),p(ne,{class:"mt-14 mb-14",color:"primary",onClick:d[0]||(d[0]=m=>a.value=2)},{default:v(()=>[...d[14]||(d[14]=[k(" Start Setup ",-1)])]),_:1}),C("div",fie,[p(Z,{class:"mr-6"},{default:v(()=>[...d[15]||(d[15]=[k("question_mark",-1)])]),_:1}),d[16]||(d[16]=C("small",null,[k(" If you have questions at any point, reach out on "),C("a",{href:"https://github.com/fdm-monster/fdm-monster/issues"}," Github "),k(" or on "),C("a",{href:"https://discord.gg/mwA8uP8CMc"}," Discord "),k(". ")],-1))])]),_:1}),p(h,{class:"align-content-center align-center text-center",step:"2"},{default:v(()=>[C("h4",null,[p(Z,{class:"mr-2"},{default:v(()=>[...d[18]||(d[18]=[k("settings",-1)])]),_:1}),d[19]||(d[19]=k(" Login",-1))]),p(j0,{modelValue:r.value,"onUpdate:modelValue":d[6]||(d[6]=m=>r.value=m)},{default:v(()=>[p(Fp,{modelValue:i.value.loginRequired,"onUpdate:modelValue":d[1]||(d[1]=m=>i.value.loginRequired=m),class:"mt-5"},{message:v(()=>[C("span",hie,[p(Z,{color:i.value.loginRequired?"success":"",disabled:!i.value.loginRequired,class:"ml-3 mr-3"},{default:v(()=>[...d[20]||(d[20]=[k(" check ",-1)])]),_:1},8,["color","disabled"]),d[21]||(d[21]=k(" Login is required. ",-1))]),C("span",pie,[p(Z,{color:i.value.loginRequired?"":"error",disabled:i.value.loginRequired,class:"ml-3 mr-3"},{default:v(()=>[...d[22]||(d[22]=[k(" close ",-1)])]),_:1},8,["color","disabled"]),d[23]||(d[23]=k(" No login is required. The admin role is assumed. ",-1))])]),label:v(()=>[...d[24]||(d[24]=[k(" Enable Login ",-1)])]),_:1},8,["modelValue"]),i.value.loginRequired?pe("",!0):($(),te(vn,{key:0,color:"error-darken-4"},{default:v(()=>[...d[25]||(d[25]=[k(" You might be exposing your FDM Monster server publicly. Please take care evaluating the ",-1),C("strong",null," Enable Login ",-1),k(" option. ",-1)])]),_:1})),p(Fp,{modelValue:i.value.registration,"onUpdate:modelValue":d[2]||(d[2]=m=>i.value.registration=m),class:"mt-10 mb-10"},{message:v(()=>[C("span",mie,[p(Z,{color:i.value.registration?"success":"",disabled:!i.value.registration,class:"ml-3 mr-3"},{default:v(()=>[...d[26]||(d[26]=[k(" check ",-1)])]),_:1},8,["color","disabled"]),d[27]||(d[27]=k(" Accounts can be registered with a guest role. ",-1))]),C("span",gie,[p(Z,{color:i.value.registration?"":"error",disabled:i.value.registration,class:"ml-3 mr-3"},{default:v(()=>[...d[28]||(d[28]=[k(" close ",-1)])]),_:1},8,["color","disabled"]),d[29]||(d[29]=k(" No other accounts can be registered. ",-1))])]),label:v(()=>[...d[30]||(d[30]=[k(" Enable Registration ",-1)])]),_:1},8,["modelValue"]),p(ln),C("h4",vie,[p(Z,{class:"mr-2"},{default:v(()=>[...d[31]||(d[31]=[k("shield",-1)])]),_:1}),d[32]||(d[32]=k(" Admin account ",-1))]),p(at,{modelValue:o.value.rootUsername,"onUpdate:modelValue":d[3]||(d[3]=m=>o.value.rootUsername=m),rules:[m=>!!m||"Username is required"],class:"mt-5",label:"Username","prepend-icon":"person"},{prepend:v(()=>[p(Z,null,{default:v(()=>[...d[33]||(d[33]=[k("person",-1)])]),_:1})]),_:1},8,["modelValue","rules"]),p(at,{modelValue:o.value.rootPassword,"onUpdate:modelValue":d[4]||(d[4]=m=>o.value.rootPassword=m),type:"password","prepend-icon":"lock",rules:[m=>!!m||"Password is required",m=>!!m&&(m==null?void 0:m.length)>=8||"Password must be of length 8 or greater"],class:"mt-5",label:"Password"},{prepend:v(()=>[p(Z,null,{default:v(()=>[...d[34]||(d[34]=[k("password",-1)])]),_:1})]),_:1},8,["modelValue","rules"]),p(at,{modelValue:o.value.rootPassword2,"onUpdate:modelValue":d[5]||(d[5]=m=>o.value.rootPassword2=m),type:"password","prepend-icon":"lock",rules:[m=>!!m||"Repeated password is required",m=>m===o.value.rootPassword||"Passwords are not equal"],class:"mt-5",label:"Repeated Password"},{prepend:v(()=>[p(Z,null,{default:v(()=>[...d[35]||(d[35]=[k("password",-1)])]),_:1})]),_:1},8,["modelValue","rules"])]),_:1},8,["modelValue"]),C("div",yie,[p(ne,{class:"mr-4",onClick:d[7]||(d[7]=m=>a.value=1)},{default:v(()=>[...d[36]||(d[36]=[k(" Back ",-1)])]),_:1}),p(ne,{disabled:!r.value,color:"primary",onClick:d[8]||(d[8]=m=>l())},{default:v(()=>[...d[37]||(d[37]=[k(" Verify & Submit ",-1)])]),_:1},8,["disabled"])]),p(ln,{class:"mt-4"}),C("div",bie,[p(Z,{class:"mr-6"},{default:v(()=>[...d[38]||(d[38]=[k("question_mark",-1)])]),_:1}),d[39]||(d[39]=C("small",null,[k(" If you have questions at any point, reach out on "),C("a",{href:"https://github.com/fdm-monster/fdm-monster/issues"}," Github "),k(" or on "),C("a",{href:"https://discord.gg/mwA8uP8CMc"}," Discord "),k(". ")],-1))])]),_:1}),p(h,{class:"align-content-center align-center text-center",step:"3"},{default:v(()=>[C("div",wie,[p(Z,{size:"100",class:"mr-5",color:"green circle"},{default:v(()=>[...d[40]||(d[40]=[k(" check_circle ",-1)])]),_:1}),d[41]||(d[41]=k(" Setup Completed ",-1))]),d[45]||(d[45]=C("br",null,null,-1)),p(ne,{color:"primary",class:"mr-4",onClick:d[9]||(d[9]=m=>u())},{default:v(()=>[...d[42]||(d[42]=[k(" Let's continue ",-1)])]),_:1}),C("div",Sie,[p(Z,{class:"mr-6"},{default:v(()=>[...d[43]||(d[43]=[k("question_mark",-1)])]),_:1}),d[44]||(d[44]=C("small",null,[k(" If you have questions at any point, reach out on "),C("a",{href:"https://github.com/fdm-monster/fdm-monster/issues"}," Github "),k(" or on "),C("a",{href:"https://discord.gg/mwA8uP8CMc"}," Discord "),k(". ")],-1))])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})}}}),kie={class:"ml-4 mb-4"},xie={class:"ml-4 mb-4"},Eie=Fe({__name:"AccountSettings",setup(e){const t=js(),n=M0(),r=ps(),s=ta(),i=Ft(),o=K(),a=K(""),l=K({username:"",newPassword:"",oldPassword:"",repeatPassword:""});yt(async()=>{var d;await t.loadSettings(),o.value=(d=t.settings)==null?void 0:d.server.loginRequired,await n.getProfile(),l.value.username=n.username,a.value=n.userId});async function u(){var d,f;if(!((f=(d=a.value)==null?void 0:d.toString())!=null&&f.length)){i.openErrorMessage({title:"User not loaded"});return}await is.changeUsername(a.value,l.value.username),await n.getProfile(),l.value.username=n.username,i.openInfoMessage({title:"Username changed"})}async function c(){var d,f;if(!((f=(d=a.value)==null?void 0:d.toString())!=null&&f.length)){i.openErrorMessage({title:"User not loaded"});return}if(l.value.newPassword!==l.value.repeatPassword){i.openErrorMessage({title:"Passwords do not match"});return}await is.changePassword(a.value,l.value.oldPassword,l.value.newPassword),l.value.oldPassword="",l.value.newPassword="",l.value.repeatPassword="",i.openInfoMessage({title:"Password changed"}),await r.logout(!0),await JM(s)}return(d,f)=>{const h=$n("v-list-item-content"),g=$n("v-list-item-action-text");return $(),te(kt,null,{default:v(()=>[p(wr,{color:"primary"},{default:v(()=>[p(dt,null,{default:v(()=>[p(Z,null,{default:v(()=>[...f[6]||(f[6]=[k("account_circle",-1)])]),_:1})]),_:1}),p(On,null,{default:v(()=>[...f[7]||(f[7]=[k(" Account Settings ",-1)])]),_:1})]),_:1}),p(Ht,{subheader:"",lines:"three"},{default:v(()=>[p(ze,null,{default:v(()=>[o.value?pe("",!0):($(),te(h,{key:0},{default:v(()=>[p(vn,{color:"primary"},{default:v(()=>[...f[8]||(f[8]=[k(" Login is currently disabled. To adjust your username and password, please enable that setting at the Server Protection settings page. Then log in and visit this page. ",-1)])]),_:1})]),_:1}))]),_:1})]),_:1}),p(Ht,{subheader:"",lines:"three"},{default:v(()=>[p(ze,null,{default:v(()=>[p(ft,null,{default:v(()=>[...f[9]||(f[9]=[k(" Username ",-1)])]),_:1}),p(g,null,{default:v(()=>[p(at,{modelValue:l.value.username,"onUpdate:modelValue":f[0]||(f[0]=m=>l.value.username=m),disabled:!o.value,label:"Fill in your username"},null,8,["modelValue","disabled"])]),_:1})]),_:1}),C("div",kie,[p(ne,{disabled:!o.value,color:"primary",onClick:f[1]||(f[1]=m=>u())},{default:v(()=>[...f[10]||(f[10]=[k(" Change username ",-1)])]),_:1},8,["disabled"])]),p(ln),f[14]||(f[14]=C("br",null,null,-1)),p(ze,null,{default:v(()=>[p(ft,null,{default:v(()=>[...f[11]||(f[11]=[k(" Old Password ",-1)])]),_:1}),p(g,null,{default:v(()=>[p(at,{modelValue:l.value.oldPassword,"onUpdate:modelValue":f[2]||(f[2]=m=>l.value.oldPassword=m),disabled:!o.value,placeholder:"Old password",type:"password"},null,8,["modelValue","disabled"])]),_:1})]),_:1}),p(ze,null,{default:v(()=>[p(ft,null,{default:v(()=>[...f[12]||(f[12]=[k(" New Password ",-1)])]),_:1}),p(g,null,{default:v(()=>[p(at,{modelValue:l.value.newPassword,"onUpdate:modelValue":f[3]||(f[3]=m=>l.value.newPassword=m),disabled:!o.value,placeholder:"New password",type:"password"},null,8,["modelValue","disabled"])]),_:1})]),_:1}),p(ze,null,{default:v(()=>[p(ft,null,{default:v(()=>[...f[13]||(f[13]=[k(" Repeat New Password ",-1)])]),_:1}),p(g,null,{default:v(()=>[p(at,{modelValue:l.value.repeatPassword,"onUpdate:modelValue":f[4]||(f[4]=m=>l.value.repeatPassword=m),disabled:!o.value,placeholder:"Repeat new password",type:"password"},null,8,["modelValue","disabled"])]),_:1})]),_:1})]),_:1}),C("div",xie,[p(ne,{disabled:!o.value,color:"primary",onClick:f[5]||(f[5]=m=>c())},{default:v(()=>[...f[15]||(f[15]=[k(" Change password ",-1)])]),_:1},8,["disabled"])]),p(ln)]),_:1})}}}),Cie=Fe({__name:"GridSettings",setup(e){return(t,n)=>($(),te(st,null,{default:v(()=>[p(We,{cols:"12"},{default:v(()=>[p(kt,null,{default:v(()=>[p(KD,{icon:"grid_on",title:"Grid"}),p(kM)]),_:1})]),_:1})]),_:1}))}}),Tie=Fe({__name:"ServerProtectionSettings",setup(e){const t=ta(),n=Ft(),r=ps(),s=K(""),i=K(!1),o=K(!1),a=K(3200),l=K(!1),u=K(-1),c=K(14);async function d(){var x;const w=await xn.getSettings();i.value=w.server.loginRequired,o.value=w.server.registration,s.value=((x=w.connection)==null?void 0:x.clientIp)??"127.0.0.1";const b=await xn.getSettingsSensitive();a.value=b.credentials.jwtExpiresIn/60,l.value=b.credentials.refreshTokenAttempts!==-1,u.value=b.credentials.refreshTokenAttempts,c.value=b.credentials.refreshTokenExpiry/24/3600}yt(async()=>{await d()});function f(){l.value||(u.value=-1)}async function h(){const w=i.value;!w&&!confirm("Disabling login will expose your server. Continue?")||(await xn.updateLoginRequiredSettings(w),await r.logout(!0),await r.checkAuthenticationRequirements(),w?await t.push({name:Yt.Login}):await t.push({name:Yt.Home}),n.info("Login Required settings updated"))}async function g(){await xn.updateRegistrationEnabledSettings(o.value),await r.checkAuthenticationRequirements(),n.info("Registration settings updated")}async function m(){a.value=120,l.value=!1,u.value=-1,c.value=14,await y(),n.info("Login expiry settings reset to default")}async function y(){if(a.value<2||a.value>120)throw new Error("JWT Expiry must be between 2 and 120 minutes");if(l.value&&(u.value<1||u.value>50))throw new Error("Refresh Token Attempts must be between 1 and 50");if(c.value<1||c.value>30)throw new Error("Refresh Token Expiry must be between 1 and 30 days");await xn.updateCredentialSettings(a.value*60,u.value,c.value*24*3600),n.info("Login expiry settings updated")}return(w,b)=>($(),te(kt,null,{default:v(()=>[p(wr,{color:"primary"},{default:v(()=>[p(dt,null,{default:v(()=>[p(Z,null,{default:v(()=>[...b[11]||(b[11]=[k("settings",-1)])]),_:1})]),_:1}),p(On,null,{default:v(()=>[...b[12]||(b[12]=[k(" Server Protection Settings ",-1)])]),_:1})]),_:1}),p(Ht,{lines:"three"},{default:v(()=>[p(ze,null,{default:v(()=>[p(ft,null,{default:v(()=>[...b[13]||(b[13]=[k(" Login Required ",-1)])]),_:1}),p(St,null,{default:v(()=>[p(st,null,{default:v(()=>[p(We,{cols:"12",md:"2"},{default:v(()=>[p(bn,{modelValue:i.value,"onUpdate:modelValue":b[0]||(b[0]=x=>i.value=x),label:"Require Login"},null,8,["modelValue"])]),_:1})]),_:1}),p(st,null,{default:v(()=>[p(We,null,{default:v(()=>[p(ne,{color:"primary",onClick:b[1]||(b[1]=x=>h())},{default:v(()=>[...b[14]||(b[14]=[k(" save login required setting ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),p(ze,null,{default:v(()=>[p(ft,null,{default:v(()=>[...b[15]||(b[15]=[k(" Registration Enabled ",-1)])]),_:1}),p(St,null,{default:v(()=>[p(st,null,{default:v(()=>[p(We,{cols:"12",md:"2"},{default:v(()=>[p(bn,{modelValue:o.value,"onUpdate:modelValue":b[2]||(b[2]=x=>o.value=x),label:"Enable Registration"},null,8,["modelValue"])]),_:1})]),_:1}),p(st,null,{default:v(()=>[p(We,null,{default:v(()=>[p(ne,{color:"primary",onClick:b[3]||(b[3]=x=>g())},{default:v(()=>[...b[16]||(b[16]=[k(" save registration enabled setting ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),p(ze,null,{default:v(()=>[p(ft,null,{default:v(()=>[...b[17]||(b[17]=[k(" Login Expiry Settings (advanced) ",-1)])]),_:1}),p(St,null,{default:v(()=>[p(st,null,{default:v(()=>[p(We,{cols:"12",md:"2"},{default:v(()=>[p(at,{modelValue:a.value,"onUpdate:modelValue":b[4]||(b[4]=x=>a.value=x),rules:[x=>!!x&&x>=2&&x<=120],label:"JWT Expiry (minutes)"},null,8,["modelValue","rules"])]),_:1})]),_:1}),p(st,null,{default:v(()=>[p(We,{cols:"12",md:"2"},{default:v(()=>[p(bn,{modelValue:l.value,"onUpdate:modelValue":[b[5]||(b[5]=x=>l.value=x),b[6]||(b[6]=x=>f())],label:"Enable Refresh Token Attempts"},null,8,["modelValue"])]),_:1})]),_:1}),p(st,null,{default:v(()=>[p(We,{cols:"12",md:"2"},{default:v(()=>[p(at,{modelValue:u.value,"onUpdate:modelValue":b[7]||(b[7]=x=>u.value=x),disabled:!l.value,rules:[x=>!!x&&x>=1],label:"Refresh Token Attempts (disabled: -1, range: 1 to 50)",type:"number"},null,8,["modelValue","disabled","rules"])]),_:1})]),_:1}),p(st,null,{default:v(()=>[p(We,{cols:"12",md:"2"},{default:v(()=>[p(at,{modelValue:c.value,"onUpdate:modelValue":b[8]||(b[8]=x=>c.value=x),rules:[x=>!!x&&x>=1&&x<=30],label:"Refresh Token Expiry (days)"},null,8,["modelValue","rules"])]),_:1})]),_:1}),p(vn,{color:"secondary"},{default:v(()=>[p(Z,null,{default:v(()=>[...b[18]||(b[18]=[k("info",-1)])]),_:1}),b[19]||(b[19]=k(" Be cautious, setting the wrong expiry could make you lose access to the server or make your user experience highly degraded! ",-1))]),_:1}),p(st,null,{default:v(()=>[p(We,null,{default:v(()=>[p(ne,{color:"primary",onClick:b[9]||(b[9]=x=>y())},{default:v(()=>[...b[20]||(b[20]=[k(" save login expiry settings ",-1)])]),_:1}),p(ne,{color:"default",onClick:b[10]||(b[10]=x=>m())},{default:v(()=>[...b[21]||(b[21]=[k(" reset to default ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}))}});var Mb={exports:{}};const Pie="2.0.0",F2=256,Rie=Number.MAX_SAFE_INTEGER||9007199254740991,Iie=16,Aie=F2-6,Oie=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var Zm={MAX_LENGTH:F2,MAX_SAFE_COMPONENT_LENGTH:Iie,MAX_SAFE_BUILD_LENGTH:Aie,MAX_SAFE_INTEGER:Rie,RELEASE_TYPES:Oie,SEMVER_SPEC_VERSION:Pie,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},kv={};const Mie=typeof process=="object"&&kv&&kv.NODE_DEBUG&&/\bsemver\b/i.test(kv.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var eg=Mie;(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:s}=Zm,i=eg;t=e.exports={};const o=t.re=[],a=t.safeRe=[],l=t.src=[],u=t.safeSrc=[],c=t.t={};let d=0;const f="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",s],[f,r]],g=y=>{for(const[w,b]of h)y=y.split(`${w}*`).join(`${w}{0,${b}}`).split(`${w}+`).join(`${w}{1,${b}}`);return y},m=(y,w,b)=>{const x=g(w),_=d++;i(y,_,w),c[y]=_,l[_]=w,u[_]=x,o[_]=new RegExp(w,b?"g":void 0),a[_]=new RegExp(x,b?"g":void 0)};m("NUMERICIDENTIFIER","0|[1-9]\\d*"),m("NUMERICIDENTIFIERLOOSE","\\d+"),m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${f}*`),m("MAINVERSION",`(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})`),m("MAINVERSIONLOOSE",`(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASEIDENTIFIER",`(?:${l[c.NONNUMERICIDENTIFIER]}|${l[c.NUMERICIDENTIFIER]})`),m("PRERELEASEIDENTIFIERLOOSE",`(?:${l[c.NONNUMERICIDENTIFIER]}|${l[c.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASE",`(?:-(${l[c.PRERELEASEIDENTIFIER]}(?:\\.${l[c.PRERELEASEIDENTIFIER]})*))`),m("PRERELEASELOOSE",`(?:-?(${l[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[c.PRERELEASEIDENTIFIERLOOSE]})*))`),m("BUILDIDENTIFIER",`${f}+`),m("BUILD",`(?:\\+(${l[c.BUILDIDENTIFIER]}(?:\\.${l[c.BUILDIDENTIFIER]})*))`),m("FULLPLAIN",`v?${l[c.MAINVERSION]}${l[c.PRERELEASE]}?${l[c.BUILD]}?`),m("FULL",`^${l[c.FULLPLAIN]}$`),m("LOOSEPLAIN",`[v=\\s]*${l[c.MAINVERSIONLOOSE]}${l[c.PRERELEASELOOSE]}?${l[c.BUILD]}?`),m("LOOSE",`^${l[c.LOOSEPLAIN]}$`),m("GTLT","((?:<|>)?=?)"),m("XRANGEIDENTIFIERLOOSE",`${l[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),m("XRANGEIDENTIFIER",`${l[c.NUMERICIDENTIFIER]}|x|X|\\*`),m("XRANGEPLAIN",`[v=\\s]*(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:${l[c.PRERELEASE]})?${l[c.BUILD]}?)?)?`),m("XRANGEPLAINLOOSE",`[v=\\s]*(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:${l[c.PRERELEASELOOSE]})?${l[c.BUILD]}?)?)?`),m("XRANGE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAIN]}$`),m("XRANGELOOSE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAINLOOSE]}$`),m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),m("COERCE",`${l[c.COERCEPLAIN]}(?:$|[^\\d])`),m("COERCEFULL",l[c.COERCEPLAIN]+`(?:${l[c.PRERELEASE]})?(?:${l[c.BUILD]})?(?:$|[^\\d])`),m("COERCERTL",l[c.COERCE],!0),m("COERCERTLFULL",l[c.COERCEFULL],!0),m("LONETILDE","(?:~>?)"),m("TILDETRIM",`(\\s*)${l[c.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",m("TILDE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAIN]}$`),m("TILDELOOSE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAINLOOSE]}$`),m("LONECARET","(?:\\^)"),m("CARETTRIM",`(\\s*)${l[c.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",m("CARET",`^${l[c.LONECARET]}${l[c.XRANGEPLAIN]}$`),m("CARETLOOSE",`^${l[c.LONECARET]}${l[c.XRANGEPLAINLOOSE]}$`),m("COMPARATORLOOSE",`^${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]})$|^$`),m("COMPARATOR",`^${l[c.GTLT]}\\s*(${l[c.FULLPLAIN]})$|^$`),m("COMPARATORTRIM",`(\\s*)${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]}|${l[c.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",m("HYPHENRANGE",`^\\s*(${l[c.XRANGEPLAIN]})\\s+-\\s+(${l[c.XRANGEPLAIN]})\\s*$`),m("HYPHENRANGELOOSE",`^\\s*(${l[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[c.XRANGEPLAINLOOSE]})\\s*$`),m("STAR","(<|>)?=?\\s*\\*"),m("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),m("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(Mb,Mb.exports);var hf=Mb.exports;const Die=Object.freeze({loose:!0}),Lie=Object.freeze({}),$ie=e=>e?typeof e!="object"?Die:e:Lie;var iw=$ie;const rC=/^[0-9]+$/,N2=(e,t)=>{if(typeof e=="number"&&typeof t=="number")return e===t?0:e<t?-1:1;const n=rC.test(e),r=rC.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1},Fie=(e,t)=>N2(t,e);var B2={compareIdentifiers:N2,rcompareIdentifiers:Fie};const th=eg,{MAX_LENGTH:sC,MAX_SAFE_INTEGER:nh}=Zm,{safeRe:rh,t:sh}=hf,Nie=iw,{compareIdentifiers:xv}=B2;let Bie=class ei{constructor(t,n){if(n=Nie(n),t instanceof ei){if(t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>sC)throw new TypeError(`version is longer than ${sC} characters`);th("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;const r=t.trim().match(n.loose?rh[sh.LOOSE]:rh[sh.FULL]);if(!r)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>nh||this.major<0)throw new TypeError("Invalid major version");if(this.minor>nh||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>nh||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){const i=+s;if(i>=0&&i<nh)return i}return s}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(th("SemVer.compare",this.version,this.options,t),!(t instanceof ei)){if(typeof t=="string"&&t===this.version)return 0;t=new ei(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof ei||(t=new ei(t,this.options)),this.major<t.major?-1:this.major>t.major?1:this.minor<t.minor?-1:this.minor>t.minor?1:this.patch<t.patch?-1:this.patch>t.patch?1:0}comparePre(t){if(t instanceof ei||(t=new ei(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let n=0;do{const r=this.prerelease[n],s=t.prerelease[n];if(th("prerelease compare",n,r,s),r===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(r===void 0)return-1;if(r===s)continue;return xv(r,s)}while(++n)}compareBuild(t){t instanceof ei||(t=new ei(t,this.options));let n=0;do{const r=this.build[n],s=t.build[n];if(th("build compare",n,r,s),r===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(r===void 0)return-1;if(r===s)continue;return xv(r,s)}while(++n)}inc(t,n,r){if(t.startsWith("pre")){if(!n&&r===!1)throw new Error("invalid increment argument: identifier is empty");if(n){const s=`-${n}`.match(this.options.loose?rh[sh.PRERELEASELOOSE]:rh[sh.PRERELEASE]);if(!s||s[1]!==n)throw new Error(`invalid identifier: ${n}`)}}switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,r),this.inc("pre",n,r);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,r),this.inc("pre",n,r);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const s=Number(r)?1:0;if(this.prerelease.length===0)this.prerelease=[s];else{let i=this.prerelease.length;for(;--i>=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(n===this.prerelease.join(".")&&r===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(s)}}if(n){let i=[n,s];r===!1&&(i=[n]),xv(this.prerelease[0],n)===0?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var xr=Bie;const iC=xr,Vie=(e,t,n=!1)=>{if(e instanceof iC)return e;try{return new iC(e,t)}catch(r){if(!n)return null;throw r}};var nc=Vie;const Uie=nc,zie=(e,t)=>{const n=Uie(e,t);return n?n.version:null};var Hie=zie;const jie=nc,Wie=(e,t)=>{const n=jie(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null};var qie=Wie;const oC=xr,Gie=(e,t,n,r,s)=>{typeof n=="string"&&(s=r,r=n,n=void 0);try{return new oC(e instanceof oC?e.version:e,n).inc(t,r,s).version}catch{return null}};var Kie=Gie;const aC=nc,Yie=(e,t)=>{const n=aC(e,null,!0),r=aC(t,null,!0),s=n.compare(r);if(s===0)return null;const i=s>0,o=i?n:r,a=i?r:n,l=!!o.prerelease.length;if(!!a.prerelease.length&&!l){if(!a.patch&&!a.minor)return"major";if(a.compareMain(o)===0)return a.minor&&!a.patch?"minor":"patch"}const c=l?"pre":"";return n.major!==r.major?c+"major":n.minor!==r.minor?c+"minor":n.patch!==r.patch?c+"patch":"prerelease"};var Xie=Yie;const Qie=xr,Jie=(e,t)=>new Qie(e,t).major;var Zie=Jie;const eoe=xr,toe=(e,t)=>new eoe(e,t).minor;var noe=toe;const roe=xr,soe=(e,t)=>new roe(e,t).patch;var ioe=soe;const ooe=nc,aoe=(e,t)=>{const n=ooe(e,t);return n&&n.prerelease.length?n.prerelease:null};var loe=aoe;const lC=xr,uoe=(e,t,n)=>new lC(e,n).compare(new lC(t,n));var Ws=uoe;const coe=Ws,doe=(e,t,n)=>coe(t,e,n);var foe=doe;const hoe=Ws,poe=(e,t)=>hoe(e,t,!0);var moe=poe;const uC=xr,goe=(e,t,n)=>{const r=new uC(e,n),s=new uC(t,n);return r.compare(s)||r.compareBuild(s)};var ow=goe;const voe=ow,yoe=(e,t)=>e.sort((n,r)=>voe(n,r,t));var boe=yoe;const woe=ow,Soe=(e,t)=>e.sort((n,r)=>woe(r,n,t));var _oe=Soe;const koe=Ws,xoe=(e,t,n)=>koe(e,t,n)>0;var tg=xoe;const Eoe=Ws,Coe=(e,t,n)=>Eoe(e,t,n)<0;var aw=Coe;const Toe=Ws,Poe=(e,t,n)=>Toe(e,t,n)===0;var V2=Poe;const Roe=Ws,Ioe=(e,t,n)=>Roe(e,t,n)!==0;var U2=Ioe;const Aoe=Ws,Ooe=(e,t,n)=>Aoe(e,t,n)>=0;var lw=Ooe;const Moe=Ws,Doe=(e,t,n)=>Moe(e,t,n)<=0;var uw=Doe;const Loe=V2,$oe=U2,Foe=tg,Noe=lw,Boe=aw,Voe=uw,Uoe=(e,t,n,r)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof n=="object"&&(n=n.version),e===n;case"!==":return typeof e=="object"&&(e=e.version),typeof n=="object"&&(n=n.version),e!==n;case"":case"=":case"==":return Loe(e,n,r);case"!=":return $oe(e,n,r);case">":return Foe(e,n,r);case">=":return Noe(e,n,r);case"<":return Boe(e,n,r);case"<=":return Voe(e,n,r);default:throw new TypeError(`Invalid operator: ${t}`)}};var z2=Uoe;const zoe=xr,Hoe=nc,{safeRe:ih,t:oh}=hf,joe=(e,t)=>{if(e instanceof zoe)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;t=t||{};let n=null;if(!t.rtl)n=e.match(t.includePrerelease?ih[oh.COERCEFULL]:ih[oh.COERCE]);else{const l=t.includePrerelease?ih[oh.COERCERTLFULL]:ih[oh.COERCERTL];let u;for(;(u=l.exec(e))&&(!n||n.index+n[0].length!==e.length);)(!n||u.index+u[0].length!==n.index+n[0].length)&&(n=u),l.lastIndex=u.index+u[1].length+u[2].length;l.lastIndex=-1}if(n===null)return null;const r=n[2],s=n[3]||"0",i=n[4]||"0",o=t.includePrerelease&&n[5]?`-${n[5]}`:"",a=t.includePrerelease&&n[6]?`+${n[6]}`:"";return Hoe(`${r}.${s}.${i}${o}${a}`,t)};var Woe=joe;class qoe{constructor(){this.max=1e3,this.map=new Map}get(t){const n=this.map.get(t);if(n!==void 0)return this.map.delete(t),this.map.set(t,n),n}delete(t){return this.map.delete(t)}set(t,n){if(!this.delete(t)&&n!==void 0){if(this.map.size>=this.max){const s=this.map.keys().next().value;this.delete(s)}this.map.set(t,n)}return this}}var Goe=qoe,Ev,cC;function qs(){if(cC)return Ev;cC=1;const e=/\s+/g;class t{constructor(D,W){if(W=s(W),D instanceof t)return D.loose===!!W.loose&&D.includePrerelease===!!W.includePrerelease?D:new t(D.raw,W);if(D instanceof i)return this.raw=D.value,this.set=[[D]],this.formatted=void 0,this;if(this.options=W,this.loose=!!W.loose,this.includePrerelease=!!W.includePrerelease,this.raw=D.trim().replace(e," "),this.set=this.raw.split("||").map(U=>this.parseRange(U.trim())).filter(U=>U.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const U=this.set[0];if(this.set=this.set.filter(Q=>!m(Q[0])),this.set.length===0)this.set=[U];else if(this.set.length>1){for(const Q of this.set)if(Q.length===1&&y(Q[0])){this.set=[Q];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let D=0;D<this.set.length;D++){D>0&&(this.formatted+="||");const W=this.set[D];for(let U=0;U<W.length;U++)U>0&&(this.formatted+=" "),this.formatted+=W[U].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(D){const U=((this.options.includePrerelease&&h)|(this.options.loose&&g))+":"+D,Q=r.get(U);if(Q)return Q;const V=this.options.loose,L=V?l[u.HYPHENRANGELOOSE]:l[u.HYPHENRANGE];D=D.replace(L,O(this.options.includePrerelease)),o("hyphen replace",D),D=D.replace(l[u.COMPARATORTRIM],c),o("comparator trim",D),D=D.replace(l[u.TILDETRIM],d),o("tilde trim",D),D=D.replace(l[u.CARETTRIM],f),o("caret trim",D);let oe=D.split(" ").map(ae=>b(ae,this.options)).join(" ").split(/\s+/).map(ae=>I(ae,this.options));V&&(oe=oe.filter(ae=>(o("loose invalid filter",ae,this.options),!!ae.match(l[u.COMPARATORLOOSE])))),o("range list",oe);const j=new Map,F=oe.map(ae=>new i(ae,this.options));for(const ae of F){if(m(ae))return[ae];j.set(ae.value,ae)}j.size>1&&j.has("")&&j.delete("");const re=[...j.values()];return r.set(U,re),re}intersects(D,W){if(!(D instanceof t))throw new TypeError("a Range is required");return this.set.some(U=>w(U,W)&&D.set.some(Q=>w(Q,W)&&U.every(V=>Q.every(L=>V.intersects(L,W)))))}test(D){if(!D)return!1;if(typeof D=="string")try{D=new a(D,this.options)}catch{return!1}for(let W=0;W<this.set.length;W++)if(H(this.set[W],D,this.options))return!0;return!1}}Ev=t;const n=Goe,r=new n,s=iw,i=ng(),o=eg,a=xr,{safeRe:l,t:u,comparatorTrimReplace:c,tildeTrimReplace:d,caretTrimReplace:f}=hf,{FLAG_INCLUDE_PRERELEASE:h,FLAG_LOOSE:g}=Zm,m=N=>N.value==="<0.0.0-0",y=N=>N.value==="",w=(N,D)=>{let W=!0;const U=N.slice();let Q=U.pop();for(;W&&U.length;)W=U.every(V=>Q.intersects(V,D)),Q=U.pop();return W},b=(N,D)=>(N=N.replace(l[u.BUILD],""),o("comp",N,D),N=P(N,D),o("caret",N),N=_(N,D),o("tildes",N),N=E(N,D),o("xrange",N),N=R(N,D),o("stars",N),N),x=N=>!N||N.toLowerCase()==="x"||N==="*",_=(N,D)=>N.trim().split(/\s+/).map(W=>S(W,D)).join(" "),S=(N,D)=>{const W=D.loose?l[u.TILDELOOSE]:l[u.TILDE];return N.replace(W,(U,Q,V,L,oe)=>{o("tilde",N,U,Q,V,L,oe);let j;return x(Q)?j="":x(V)?j=`>=${Q}.0.0 <${+Q+1}.0.0-0`:x(L)?j=`>=${Q}.${V}.0 <${Q}.${+V+1}.0-0`:oe?(o("replaceTilde pr",oe),j=`>=${Q}.${V}.${L}-${oe} <${Q}.${+V+1}.0-0`):j=`>=${Q}.${V}.${L} <${Q}.${+V+1}.0-0`,o("tilde return",j),j})},P=(N,D)=>N.trim().split(/\s+/).map(W=>A(W,D)).join(" "),A=(N,D)=>{o("caret",N,D);const W=D.loose?l[u.CARETLOOSE]:l[u.CARET],U=D.includePrerelease?"-0":"";return N.replace(W,(Q,V,L,oe,j)=>{o("caret",N,Q,V,L,oe,j);let F;return x(V)?F="":x(L)?F=`>=${V}.0.0${U} <${+V+1}.0.0-0`:x(oe)?V==="0"?F=`>=${V}.${L}.0${U} <${V}.${+L+1}.0-0`:F=`>=${V}.${L}.0${U} <${+V+1}.0.0-0`:j?(o("replaceCaret pr",j),V==="0"?L==="0"?F=`>=${V}.${L}.${oe}-${j} <${V}.${L}.${+oe+1}-0`:F=`>=${V}.${L}.${oe}-${j} <${V}.${+L+1}.0-0`:F=`>=${V}.${L}.${oe}-${j} <${+V+1}.0.0-0`):(o("no pr"),V==="0"?L==="0"?F=`>=${V}.${L}.${oe}${U} <${V}.${L}.${+oe+1}-0`:F=`>=${V}.${L}.${oe}${U} <${V}.${+L+1}.0-0`:F=`>=${V}.${L}.${oe} <${+V+1}.0.0-0`),o("caret return",F),F})},E=(N,D)=>(o("replaceXRanges",N,D),N.split(/\s+/).map(W=>T(W,D)).join(" ")),T=(N,D)=>{N=N.trim();const W=D.loose?l[u.XRANGELOOSE]:l[u.XRANGE];return N.replace(W,(U,Q,V,L,oe,j)=>{o("xRange",N,U,Q,V,L,oe,j);const F=x(V),re=F||x(L),ae=re||x(oe),Se=ae;return Q==="="&&Se&&(Q=""),j=D.includePrerelease?"-0":"",F?Q===">"||Q==="<"?U="<0.0.0-0":U="*":Q&&Se?(re&&(L=0),oe=0,Q===">"?(Q=">=",re?(V=+V+1,L=0,oe=0):(L=+L+1,oe=0)):Q==="<="&&(Q="<",re?V=+V+1:L=+L+1),Q==="<"&&(j="-0"),U=`${Q+V}.${L}.${oe}${j}`):re?U=`>=${V}.0.0${j} <${+V+1}.0.0-0`:ae&&(U=`>=${V}.${L}.0${j} <${V}.${+L+1}.0-0`),o("xRange return",U),U})},R=(N,D)=>(o("replaceStars",N,D),N.trim().replace(l[u.STAR],"")),I=(N,D)=>(o("replaceGTE0",N,D),N.trim().replace(l[D.includePrerelease?u.GTE0PRE:u.GTE0],"")),O=N=>(D,W,U,Q,V,L,oe,j,F,re,ae,Se)=>(x(U)?W="":x(Q)?W=`>=${U}.0.0${N?"-0":""}`:x(V)?W=`>=${U}.${Q}.0${N?"-0":""}`:L?W=`>=${W}`:W=`>=${W}${N?"-0":""}`,x(F)?j="":x(re)?j=`<${+F+1}.0.0-0`:x(ae)?j=`<${F}.${+re+1}.0-0`:Se?j=`<=${F}.${re}.${ae}-${Se}`:N?j=`<${F}.${re}.${+ae+1}-0`:j=`<=${j}`,`${W} ${j}`.trim()),H=(N,D,W)=>{for(let U=0;U<N.length;U++)if(!N[U].test(D))return!1;if(D.prerelease.length&&!W.includePrerelease){for(let U=0;U<N.length;U++)if(o(N[U].semver),N[U].semver!==i.ANY&&N[U].semver.prerelease.length>0){const Q=N[U].semver;if(Q.major===D.major&&Q.minor===D.minor&&Q.patch===D.patch)return!0}return!1}return!0};return Ev}var Cv,dC;function ng(){if(dC)return Cv;dC=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(c,d){if(d=n(d),c instanceof t){if(c.loose===!!d.loose)return c;c=c.value}c=c.trim().split(/\s+/).join(" "),o("comparator",c,d),this.options=d,this.loose=!!d.loose,this.parse(c),this.semver===e?this.value="":this.value=this.operator+this.semver.version,o("comp",this)}parse(c){const d=this.options.loose?r[s.COMPARATORLOOSE]:r[s.COMPARATOR],f=c.match(d);if(!f)throw new TypeError(`Invalid comparator: ${c}`);this.operator=f[1]!==void 0?f[1]:"",this.operator==="="&&(this.operator=""),f[2]?this.semver=new a(f[2],this.options.loose):this.semver=e}toString(){return this.value}test(c){if(o("Comparator.test",c,this.options.loose),this.semver===e||c===e)return!0;if(typeof c=="string")try{c=new a(c,this.options)}catch{return!1}return i(c,this.operator,this.semver,this.options)}intersects(c,d){if(!(c instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new l(c.value,d).test(this.value):c.operator===""?c.value===""?!0:new l(this.value,d).test(c.semver):(d=n(d),d.includePrerelease&&(this.value==="<0.0.0-0"||c.value==="<0.0.0-0")||!d.includePrerelease&&(this.value.startsWith("<0.0.0")||c.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&c.operator.startsWith(">")||this.operator.startsWith("<")&&c.operator.startsWith("<")||this.semver.version===c.semver.version&&this.operator.includes("=")&&c.operator.includes("=")||i(this.semver,"<",c.semver,d)&&this.operator.startsWith(">")&&c.operator.startsWith("<")||i(this.semver,">",c.semver,d)&&this.operator.startsWith("<")&&c.operator.startsWith(">")))}}Cv=t;const n=iw,{safeRe:r,t:s}=hf,i=z2,o=eg,a=xr,l=qs();return Cv}const Koe=qs(),Yoe=(e,t,n)=>{try{t=new Koe(t,n)}catch{return!1}return t.test(e)};var rg=Yoe;const Xoe=qs(),Qoe=(e,t)=>new Xoe(e,t).set.map(n=>n.map(r=>r.value).join(" ").trim().split(" "));var Joe=Qoe;const Zoe=xr,eae=qs(),tae=(e,t,n)=>{let r=null,s=null,i=null;try{i=new eae(t,n)}catch{return null}return e.forEach(o=>{i.test(o)&&(!r||s.compare(o)===-1)&&(r=o,s=new Zoe(r,n))}),r};var nae=tae;const rae=xr,sae=qs(),iae=(e,t,n)=>{let r=null,s=null,i=null;try{i=new sae(t,n)}catch{return null}return e.forEach(o=>{i.test(o)&&(!r||s.compare(o)===1)&&(r=o,s=new rae(r,n))}),r};var oae=iae;const Tv=xr,aae=qs(),fC=tg,lae=(e,t)=>{e=new aae(e,t);let n=new Tv("0.0.0");if(e.test(n)||(n=new Tv("0.0.0-0"),e.test(n)))return n;n=null;for(let r=0;r<e.set.length;++r){const s=e.set[r];let i=null;s.forEach(o=>{const a=new Tv(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!i||fC(a,i))&&(i=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),i&&(!n||fC(n,i))&&(n=i)}return n&&e.test(n)?n:null};var uae=lae;const cae=qs(),dae=(e,t)=>{try{return new cae(e,t).range||"*"}catch{return null}};var fae=dae;const hae=xr,H2=ng(),{ANY:pae}=H2,mae=qs(),gae=rg,hC=tg,pC=aw,vae=uw,yae=lw,bae=(e,t,n,r)=>{e=new hae(e,r),t=new mae(t,r);let s,i,o,a,l;switch(n){case">":s=hC,i=vae,o=pC,a=">",l=">=";break;case"<":s=pC,i=yae,o=hC,a="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(gae(e,t,r))return!1;for(let u=0;u<t.set.length;++u){const c=t.set[u];let d=null,f=null;if(c.forEach(h=>{h.semver===pae&&(h=new H2(">=0.0.0")),d=d||h,f=f||h,s(h.semver,d.semver,r)?d=h:o(h.semver,f.semver,r)&&(f=h)}),d.operator===a||d.operator===l||(!f.operator||f.operator===a)&&i(e,f.semver))return!1;if(f.operator===l&&o(e,f.semver))return!1}return!0};var cw=bae;const wae=cw,Sae=(e,t,n)=>wae(e,t,">",n);var _ae=Sae;const kae=cw,xae=(e,t,n)=>kae(e,t,"<",n);var Eae=xae;const mC=qs(),Cae=(e,t,n)=>(e=new mC(e,n),t=new mC(t,n),e.intersects(t,n));var Tae=Cae;const Pae=rg,Rae=Ws;var Iae=(e,t,n)=>{const r=[];let s=null,i=null;const o=e.sort((c,d)=>Rae(c,d,n));for(const c of o)Pae(c,t,n)?(i=c,s||(s=c)):(i&&r.push([s,i]),i=null,s=null);s&&r.push([s,null]);const a=[];for(const[c,d]of r)c===d?a.push(c):!d&&c===o[0]?a.push("*"):d?c===o[0]?a.push(`<=${d}`):a.push(`${c} - ${d}`):a.push(`>=${c}`);const l=a.join(" || "),u=typeof t.raw=="string"?t.raw:String(t);return l.length<u.length?l:t};const gC=qs(),dw=ng(),{ANY:Pv}=dw,yc=rg,fw=Ws,Aae=(e,t,n={})=>{if(e===t)return!0;e=new gC(e,n),t=new gC(t,n);let r=!1;e:for(const s of e.set){for(const i of t.set){const o=Mae(s,i,n);if(r=r||o!==null,o)continue e}if(r)return!1}return!0},Oae=[new dw(">=0.0.0-0")],vC=[new dw(">=0.0.0")],Mae=(e,t,n)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===Pv){if(t.length===1&&t[0].semver===Pv)return!0;n.includePrerelease?e=Oae:e=vC}if(t.length===1&&t[0].semver===Pv){if(n.includePrerelease)return!0;t=vC}const r=new Set;let s,i;for(const h of e)h.operator===">"||h.operator===">="?s=yC(s,h,n):h.operator==="<"||h.operator==="<="?i=bC(i,h,n):r.add(h.semver);if(r.size>1)return null;let o;if(s&&i){if(o=fw(s.semver,i.semver,n),o>0)return null;if(o===0&&(s.operator!==">="||i.operator!=="<="))return null}for(const h of r){if(s&&!yc(h,String(s),n)||i&&!yc(h,String(i),n))return null;for(const g of t)if(!yc(h,String(g),n))return!1;return!0}let a,l,u,c,d=i&&!n.includePrerelease&&i.semver.prerelease.length?i.semver:!1,f=s&&!n.includePrerelease&&s.semver.prerelease.length?s.semver:!1;d&&d.prerelease.length===1&&i.operator==="<"&&d.prerelease[0]===0&&(d=!1);for(const h of t){if(c=c||h.operator===">"||h.operator===">=",u=u||h.operator==="<"||h.operator==="<=",s){if(f&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===f.major&&h.semver.minor===f.minor&&h.semver.patch===f.patch&&(f=!1),h.operator===">"||h.operator===">="){if(a=yC(s,h,n),a===h&&a!==s)return!1}else if(s.operator===">="&&!yc(s.semver,String(h),n))return!1}if(i){if(d&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===d.major&&h.semver.minor===d.minor&&h.semver.patch===d.patch&&(d=!1),h.operator==="<"||h.operator==="<="){if(l=bC(i,h,n),l===h&&l!==i)return!1}else if(i.operator==="<="&&!yc(i.semver,String(h),n))return!1}if(!h.operator&&(i||s)&&o!==0)return!1}return!(s&&u&&!i&&o!==0||i&&c&&!s&&o!==0||f||d)},yC=(e,t,n)=>{if(!e)return t;const r=fw(e.semver,t.semver,n);return r>0?e:r<0||t.operator===">"&&e.operator===">="?t:e},bC=(e,t,n)=>{if(!e)return t;const r=fw(e.semver,t.semver,n);return r<0?e:r>0||t.operator==="<"&&e.operator==="<="?t:e};var Dae=Aae;const Rv=hf,wC=Zm,Lae=xr,SC=B2,$ae=nc,Fae=Hie,Nae=qie,Bae=Kie,Vae=Xie,Uae=Zie,zae=noe,Hae=ioe,jae=loe,Wae=Ws,qae=foe,Gae=moe,Kae=ow,Yae=boe,Xae=_oe,Qae=tg,Jae=aw,Zae=V2,ele=U2,tle=lw,nle=uw,rle=z2,sle=Woe,ile=ng(),ole=qs(),ale=rg,lle=Joe,ule=nae,cle=oae,dle=uae,fle=fae,hle=cw,ple=_ae,mle=Eae,gle=Tae,vle=Iae,yle=Dae;var bc={parse:$ae,valid:Fae,clean:Nae,inc:Bae,diff:Vae,major:Uae,minor:zae,patch:Hae,prerelease:jae,compare:Wae,rcompare:qae,compareLoose:Gae,compareBuild:Kae,sort:Yae,rsort:Xae,gt:Qae,lt:Jae,eq:Zae,neq:ele,gte:tle,lte:nle,cmp:rle,coerce:sle,Comparator:ile,Range:ole,satisfies:ale,toComparators:lle,maxSatisfying:ule,minSatisfying:cle,minVersion:dle,validRange:fle,outside:hle,gtr:ple,ltr:mle,intersects:gle,simplifyRange:vle,subset:yle,SemVer:Lae,re:Rv.re,src:Rv.src,tokens:Rv.t,SEMVER_SPEC_VERSION:wC.SEMVER_SPEC_VERSION,RELEASE_TYPES:wC.RELEASE_TYPES,compareIdentifiers:SC.compareIdentifiers,rcompareIdentifiers:SC.rcompareIdentifiers};const ble={key:0},wle={key:1},Sle={key:0},_le=Fe({__name:"SoftwareUpgradeSettings",setup(e){const t=K(""),n=K(!0),r=K(!1),s=K(!1),i=K(""),o=K(""),a=K(YD),l=K(),u=K(),c=K(),d=K(!1),f=K([]);yt(async()=>{var T;await h();const E=await _a.getVersion();i.value=E.version,o.value=((T=E.monsterPi)==null?void 0:T.trim())||""});async function h(){n.value=!0,t.value="",r.value=!1;try{const E=await _a.getGithubRateLimit();if(E.rate.remaining===0){const R=new Date(E.rate.reset).toLocaleTimeString(),I=E.rate.reset*1e3-Date.now(),O=Math.ceil(I/6e4);t.value=`Server has reached a rate limit of the Github API. This limit will be reset at ${R} (in ${O} minutes)`,n.value=!1,r.value=!0;return}}catch{n.value=!1;return}try{const E=await _a.getClientReleases();l.value=E.current,u.value=E.minimum,f.value=E.releases}catch(E){t.value="An error occurred loading the releases: "+E.message}finally{n.value=!1}}const g=M(()=>f.value.filter(E=>{const T=bc.minor(E.tag_name)===bc.minor(u.value.tag_name),R=x(E),I=E.draft;return T&&(y()||d.value||!R)&&!I})),m=M(()=>y());function y(){const E=l.value;return x(E)}function w(E){return P(E)||!S(E,l.value)||_(E)}function b(E){const T=x(E)?`${E.tag_name}, unstable`:E.tag_name;return P(E)?`${T}, currently installed`:_(E)?`${T}, below minimum`:S(E,l.value)?T:`${T}, downgrade not allowed`}function x(E){var T;return(T=E==null?void 0:E.tag_name)!=null&&T.length?E.prerelease||E.tag_name.includes("rc")||E.tag_name.includes("unstable"):!1}function _(E){return bc.compare(E.tag_name,u.value.tag_name)===-1}function S(E,T){if(!T)throw new Error("No current release is known, cannot compare.");return s.value?!0:bc.compare(E.tag_name,T.tag_name)!==-1&&bc.compare(E.tag_name,u.value.tag_name)!==-1}function P(E){var T;return E.tag_name===((T=l.value)==null?void 0:T.tag_name)}async function A(E){confirm("Are you sure? This might cause breaking changes, if the server is outdated")&&(await _a.updateClientDistGithub(E,s.value),location.reload())}return(E,T)=>($(),te(kt,null,{default:v(()=>[p(wr,{color:"primary"},{default:v(()=>[p(dt,null,{default:v(()=>[p(Z,null,{default:v(()=>[...T[5]||(T[5]=[k("upgrade",-1)])]),_:1})]),_:1}),p(On,null,{default:v(()=>[...T[6]||(T[6]=[k(" Software Upgrade",-1)])]),_:1})]),_:1}),p(Ht,{lines:"three"},{default:v(()=>[p(ze,null,{default:v(()=>[p(ft,null,{default:v(()=>[...T[7]||(T[7]=[k(" Current versions in use:",-1)])]),_:1}),p(St,null,{default:v(()=>[k(" Your server's version is: "+se(i.value),1)]),_:1}),p(St,null,{default:v(()=>[k(" Your client's version is: "+se(a.value),1)]),_:1}),p(St,null,{default:v(()=>[o.value?($(),ve("div",ble,[T[8]||(T[8]=k(" MonsterPi: ",-1)),T[9]||(T[9]=C("div",null,"Your MonsterPi version is:",-1)),k(" "+se(o.value),1)])):($(),ve("div",wle,[...T[10]||(T[10]=[k(" MonsterPi: ",-1),C("div",null,"No MonsterPi distro was detected.",-1)])]))]),_:1})]),_:1})]),_:1}),p(ln),p(Ht,{lines:"three",subheader:""},{default:v(()=>[p(ze,null,{default:v(()=>[p(ft,null,{default:v(()=>[...T[11]||(T[11]=[k(" Server upgrade",-1)])]),_:1}),p(St,null,{default:v(()=>[...T[12]||(T[12]=[k(" Please visit ",-1),C("a",{href:"https://docs.fdm-monster.net/docs/installing/"}," the installation documentation ",-1),k(" for instructions on how to upgrade the server. ",-1)])]),_:1})]),_:1})]),_:1}),p(ln),p(Ht,{lines:"three"},{default:v(()=>[p(ze,null,{default:v(()=>[p(ft,null,{default:v(()=>[...T[13]||(T[13]=[k(" Client upgrade",-1)])]),_:1}),p(St,null,{default:v(()=>[...T[14]||(T[14]=[k(" Please visit ",-1),C("a",{href:"https://docs.fdm-monster.net/docs/configuration/updating_client_bundle"}," the installation documentation ",-1),k(" for instructions on how to upgrade the client bundle. ",-1)])]),_:1}),p(St,null,{default:v(()=>[...T[15]||(T[15]=[k(" Upgrade the client webapp for quickly retrieving small fixes and features ",-1)])]),_:1})]),_:1}),p(ze,null,{default:v(()=>{var R,I,O;return[p(ft,null,{default:v(()=>[...T[16]||(T[16]=[k(" Select a release to upgrade to:",-1)])]),_:1}),p(St,{class:"mt-2"},{default:v(()=>{var H;return[k(" Minimum required version: "+se((H=u.value)==null?void 0:H.tag_name),1)]}),_:1}),n.value?($(),ve("span",Sle,[p(vn,null,{default:v(()=>[...T[17]||(T[17]=[k(" Loading releases... ",-1)])]),_:1})])):pe("",!0),!n.value&&!((R=g.value)!=null&&R.length)?($(),te(vn,{key:1},{default:v(()=>[...T[18]||(T[18]=[k(" No releases to show. ",-1)])]),_:1})):pe("",!0),p(hM,{modelValue:c.value,"onUpdate:modelValue":T[0]||(T[0]=H=>c.value=H)},{default:v(()=>[($(!0),ve(Oe,null,Qt(g.value,H=>($(),te(Yy,{key:H.tag_name,disabled:w(H),label:b(H),value:H.tag_name},null,8,["disabled","label","value"]))),128))]),_:1},8,["modelValue"]),C("div",null,[d.value?($(),te(vn,{key:0,color:"primary","max-width":"500px"},{default:v(()=>[...T[19]||(T[19]=[k(" You are viewing prereleases, please install such versions at your own risk! ",-1)])]),_:1})):pe("",!0)]),C("div",null,[p(bn,{modelValue:s.value,"onUpdate:modelValue":T[1]||(T[1]=H=>s.value=H),label:"Allow downgrade"},null,8,["modelValue"]),p(bn,{modelValue:d.value,"onUpdate:modelValue":T[2]||(T[2]=H=>d.value=H),disabled:m.value,label:m.value?"Show prerelease versions (Currently already on prerelease version)":"Show prerelease versions"},null,8,["modelValue","disabled","label"])]),p(ne,{class:"mt-2 mr-4",color:"secondary",onClick:T[3]||(T[3]=H=>h())},{default:v(()=>[...T[20]||(T[20]=[k(" Reload release version list ",-1)])]),_:1}),p(ne,{disabled:!((I=c.value)!=null&&I.length)||c.value===((O=l.value)==null?void 0:O.tag_name),class:"mt-2",color:"primary",variant:"flat",onClick:T[4]||(T[4]=H=>A(c.value))},{default:v(()=>[p(Z,null,{default:v(()=>[...T[21]||(T[21]=[k("upgrade",-1)])]),_:1}),T[22]||(T[22]=k(" Upgrade/downgrade client ",-1))]),_:1},8,["disabled"])]}),_:1})]),_:1})]),_:1}))}}),kle=Fe({__name:"DiagnosticsSettings",setup(e){const t=Ft(),n=js(),r=K(!1);yt(async()=>{var l;await n.loadSettings(),r.value=((l=n.serverSettings)==null?void 0:l.sentryDiagnosticsEnabled)||!1});async function s(){await xn.setSentryDiagnosticsSettings(r.value),pD(r.value)}async function i(){const l=`Test Error ${Date.now()} Sentry enabled: ${r.value}`;try{throw new Error(l)}catch(u){fi(u),t.openInfoMessage({title:"Test report was sent",subtitle:`Content: ${l}`})}}async function o(){await Mp.downloadLogDump()}async function a(){await Mp.clearLogFilesOlderThanWeek(),t.openInfoMessage({title:"Action success",subtitle:"Log files older than a week have been deleted"})}return(l,u)=>($(),te(kt,null,{default:v(()=>[p(wr,{color:"primary"},{default:v(()=>[p(dt,null,{default:v(()=>[p(Z,null,{default:v(()=>[...u[5]||(u[5]=[k("bug_report",-1)])]),_:1})]),_:1}),p(On,null,{default:v(()=>[...u[6]||(u[6]=[k(" Diagnostics",-1)])]),_:1})]),_:1}),p(Ht,{lines:"three",subheader:""},{default:v(()=>[p(Nr,null,{default:v(()=>[...u[7]||(u[7]=[k(" Diagnostics to provide bug reports to the developers of this software ",-1)])]),_:1}),p(ze,null,{default:v(()=>[p(ft,null,{default:v(()=>[...u[8]||(u[8]=[k(" Remote Sentry diagnostic reports: ",-1)])]),_:1}),p(St,null,{default:v(()=>[p(bn,{modelValue:r.value,"onUpdate:modelValue":u[0]||(u[0]=c=>r.value=c),label:"Enable remote Sentry diagnostic reports"},null,8,["modelValue"])]),_:1}),p(St,null,{default:v(()=>[p(ne,{color:"primary",onClick:u[1]||(u[1]=c=>s())},{default:v(()=>[p(Z,{class:"pr-2"},{default:v(()=>[...u[9]||(u[9]=[k("save",-1)])]),_:1}),u[10]||(u[10]=k(" Save ",-1))]),_:1}),p(ne,{color:"secondary",onClick:u[2]||(u[2]=c=>i())},{default:v(()=>[p(Z,{class:"pr-2"},{default:v(()=>[...u[11]||(u[11]=[k("bug_report",-1)])]),_:1}),u[12]||(u[12]=k(" Test Error ",-1))]),_:1})]),_:1})]),_:1}),p(ln),p(ze,null,{default:v(()=>[p(ft,null,{default:v(()=>[...u[13]||(u[13]=[k(" Logs Dump",-1)])]),_:1}),p(St,null,{default:v(()=>[...u[14]||(u[14]=[k(" Download a .zip file containing all logs from the server ",-1)])]),_:1}),p(St,null,{default:v(()=>[u[17]||(u[17]=C("br",null,null,-1)),p(ne,{color:"primary",onClick:u[3]||(u[3]=c=>o())},{default:v(()=>[p(Z,null,{default:v(()=>[...u[15]||(u[15]=[k("download",-1)])]),_:1}),u[16]||(u[16]=k(" Download Log Files (.zip) ",-1))]),_:1})]),_:1})]),_:1}),p(ze,null,{default:v(()=>[p(ft,null,{default:v(()=>[...u[18]||(u[18]=[k(" Clear log files",-1)])]),_:1}),p(St,null,{default:v(()=>[u[21]||(u[21]=C("br",null,null,-1)),p(ne,{color:"default",onClick:u[4]||(u[4]=c=>a())},{default:v(()=>[p(Z,null,{default:v(()=>[...u[19]||(u[19]=[k("download",-1)])]),_:1}),u[20]||(u[20]=k(" Clear log files older than a week ",-1))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}))}});class xle extends kr{static async getCompletions(){const t=`${$e.printCompletionRoute}`;return await this.get(t)}}const j2=Fe({__name:"PrintStatistics",setup(e){const t=K([]),n=K([]),r=K(""),s=Xt(),i=io();yt(async()=>{await o()}),Ee([()=>r.value],()=>{u()});const o=async()=>{t.value=[],n.value=[],t.value=await xle.getCompletions(),u()},a=c=>s.printer(c),l=c=>i.floorOfPrinter(c),u=()=>{var h;const c=s.printers.map(g=>g.id),d=c.length?t.value.filter(g=>c.includes(g.printerId)):t.value,f=(h=r.value)!=null&&h.length?d.filter(g=>{const m=s.printers.find(y=>y.id===g.printerId);return m?(m.name+m.printerURL).toLowerCase().includes(r.value.toLowerCase()):!1}):d;n.value=f.sort((g,m)=>g.failureCount===m.failureCount?g.printCount>m.printCount?-1:1:g.failureCount>m.failureCount?-1:1)};return(c,d)=>($(),te(Sd,{height:"100%",width:"100%"},{default:v(()=>[p(Yn,null,{default:v(()=>[p(st,null,{default:v(()=>[p(We,null,{default:v(()=>[p(Z,null,{default:v(()=>[...d[2]||(d[2]=[k("filter_list",-1)])]),_:1}),d[3]||(d[3]=k(" Filter by printer name (optional) ",-1))]),_:1}),p(We,null,{default:v(()=>[p(at,{modelValue:r.value,"onUpdate:modelValue":d[0]||(d[0]=f=>r.value=f),class:"p-2",clearable:"",label:"Search","prepend-icon":"search","single-line":""},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),p(vn,null,{default:v(()=>[d[5]||(d[5]=k(" Please reload here if you want updated results: ",-1)),p(ne,{color:"primary",size:"x-small",onClick:d[1]||(d[1]=f=>o())},{default:v(()=>[...d[4]||(d[4]=[k(" Reload ",-1)])]),_:1})]),_:1}),p(xb,{dark:""},{default:v(()=>[d[11]||(d[11]=C("thead",null,[C("tr",null,[C("th",{class:"text-left"},"Printer name"),C("th",{class:"text-left"},"Floor"),C("th",{class:"text-left"},"Fail/ Success/ Total"),C("th",{class:"text-left"},"Last success"),C("th",{class:"text-left"},"Last failure"),C("th",{class:"text-left"},"Successes (week/48H/24H)"),C("th",{class:"text-left"},"Failures (week/48H/24H)")])],-1)),C("tbody",null,[($(!0),ve(Oe,null,Qt(n.value,f=>{var h,g,m,y;return $(),ve("tr",{key:f.printerId},[C("td",null,se(((h=a(f.printerId))==null?void 0:h.name)??"?"),1),C("td",null,se(((g=l(f.printerId))==null?void 0:g.name)??"?"),1),C("td",null,[k(" × "+se(f.failureCount)+" / 🗸 "+se(f.successCount)+" ",1),C("strong",null," ~"+se(f.printCount),1)]),C("td",null,se(Date.now()-((m=f.lastSuccess)==null?void 0:m.createdAt)||"-"),1),C("td",null,[p(ot,{location:"bottom"},IT({default:v(()=>{var w,b,x,_;return[C("span",null,[k(se(((w=f.lastFailure)==null?void 0:w.status)||"-")+" ",1),d[7]||(d[7]=C("br",null,null,-1)),k(" "+se((b=f.lastFailure)==null?void 0:b.createdAt)+" ",1),d[8]||(d[8]=C("br",null,null,-1)),C("small",null,se((x=f.lastFailure)==null?void 0:x.fileName),1),d[9]||(d[9]=C("br",null,null,-1)),C("strong",null,se((_=f.lastFailure)==null?void 0:_.completionLog),1),d[10]||(d[10]=C("br",null,null,-1))])]}),_:2},[(y=f.lastFailure)!=null&&y.status?{name:"activator",fn:v(({props:w})=>[p(Z,me({ref_for:!0},w),{default:v(()=>[...d[6]||(d[6]=[k("info",-1)])]),_:1},16)]),key:"0"}:void 0]),1024)]),C("td",null,se(f.successEventsLastWeek)+" "+se(f.successEventsLast48H)+" "+se(f.successEventsLast24H),1),C("td",null,se(f.failureEventsLastWeek)+" "+se(f.failureEventsLast48H)+" "+se(f.failureEventsLast24H),1)])}),128))])]),_:1})]),_:1}))}}),Ele=Fe({name:"PrintStatisticsView",components:{PrintStatistics:j2}});function Cle(e,t,n,r,s,i){const o=j2;return $(),te(Yn,null,{default:v(()=>[p(o)]),_:1})}const Tle=fl(Ele,[["render",Cle]]),Ple=Fe({__name:"ExperimentalSettings",setup(e){const t=K(!1),n=K(!1),r=K(!1),s=K(!1);async function i(){const u=await xn.getSettings();t.value=u.server.experimentalMoonrakerSupport,n.value=u.server.experimentalPrusaLinkSupport,r.value=u.server.experimentalTypeormSupport,s.value=u.server.experimentalClientSupport}yt(async()=>{await i()});const o=async()=>{await xn.updateExperimentalMoonrakerSupport(t.value),await xn.updateExperimentalPrusaLinkSupport(n.value),await xn.updateExperimentalClientSupport(s.value),await i()},a=async()=>{await xn.updateExperimentalMoonrakerSupport(!1),await xn.updateExperimentalPrusaLinkSupport(!1),await xn.updateExperimentalClientSupport(!1),await i()},l=async()=>{await xn.updateExperimentalClientSupport(s.value),window.location.reload()};return(u,c)=>($(),te(st,null,{default:v(()=>[p(We,{cols:"12"},{default:v(()=>[p(kt,null,{default:v(()=>[p(an,null,{default:v(()=>[...c[4]||(c[4]=[C("h2",null,"Settings",-1)])]),_:1}),p(nn,null,{default:v(()=>[p(st,null,{default:v(()=>[p(We,{cols:"12",md:"6"},{default:v(()=>[p(kt,null,{default:v(()=>[p(an,null,{default:v(()=>[C("h3",null,[c[7]||(c[7]=k(" Experimental Features ",-1)),p(ot,{bottom:""},{activator:v(({props:d})=>[p(Z,me({class:"help-icon"},d),{default:v(()=>[...c[5]||(c[5]=[k("help_outline",-1)])]),_:1},16)]),default:v(()=>[c[6]||(c[6]=C("span",{class:"tooltip-content"}," Moonraker support is currently in beta, use at your own risk. ",-1))]),_:1})])]),_:1}),p(nn,null,{default:v(()=>[p(bn,{modelValue:t.value,"onUpdate:modelValue":c[0]||(c[0]=d=>t.value=d),label:"Enable Experimental Moonraker Support","hide-details":""},{label:v(()=>[...c[8]||(c[8]=[C("span",null,"Enable Experimental Moonraker Support",-1)])]),_:1},8,["modelValue"]),p(bn,{modelValue:n.value,"onUpdate:modelValue":c[1]||(c[1]=d=>n.value=d),label:"Enable Experimental PrusaLink Support","hide-details":""},{label:v(()=>[...c[9]||(c[9]=[C("span",null,"Enable Experimental PrusaLink Support",-1)])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),p(We,{cols:"12",md:"6"},{default:v(()=>[p(kt,null,{default:v(()=>[p(an,null,{default:v(()=>[C("h3",null,[c[12]||(c[12]=k(" Database Settings ",-1)),p(ot,{bottom:""},{activator:v(({props:d})=>[p(Z,Dv(Yh(d)),{default:v(()=>[...c[10]||(c[10]=[k("help_outline",-1)])]),_:1},16)]),default:v(()=>[c[11]||(c[11]=C("span",{class:"tooltip-content"}," By enabling this setting you will set FDM Monster to SQLite as a database source (standalone mode). Please set 'ENABLE_EXPERIMENTAL_TYPEORM' to 'true' to enable this feature. ",-1))]),_:1})])]),_:1}),p(nn,null,{default:v(()=>[p(bn,{modelValue:r.value,"onUpdate:modelValue":c[2]||(c[2]=d=>r.value=d),label:"Enable TypeORM Support","hide-details":"",disabled:""},{label:v(()=>[...c[13]||(c[13]=[C("span",null,"Enable TypeORM Support",-1)])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),p(We,{cols:"12",md:"6"},{default:v(()=>[p(kt,null,{default:v(()=>[p(an,null,{default:v(()=>[C("h3",null,[c[16]||(c[16]=k(" Experimental Features ",-1)),p(ot,{bottom:""},{activator:v(({props:d})=>[p(Z,me({class:"help-icon"},d),{default:v(()=>[...c[14]||(c[14]=[k("help_outline",-1)])]),_:1},16)]),default:v(()=>[c[15]||(c[15]=C("span",{class:"tooltip-content"}," Enables the next version of the FDM Monster UI (experimental). ",-1))]),_:1})])]),_:1}),p(nn,null,{default:v(()=>[p(bn,{modelValue:s.value,"onUpdate:modelValue":c[3]||(c[3]=d=>s.value=d),label:"Enable Next Client Version (Experimental)","hide-details":"",onChange:l},{label:v(()=>[...c[17]||(c[17]=[C("span",null,"Enable Next Client Version (Experimental)",-1)])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),p(Bn,null,{default:v(()=>[p(Tn),p(ne,{color:"primary",onClick:o},{default:v(()=>[...c[18]||(c[18]=[k("Save Settings",-1)])]),_:1}),p(ne,{onClick:a},{default:v(()=>[...c[19]||(c[19]=[k("Reset to Default",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}))}}),zn={requiresAuth:!0},Iv={requiresAuth:!1},hw=qX({history:SX("/"),routes:[{path:"/",name:Yt.Home,meta:zn,component:cZ},{path:"/first-time-setup",name:Yt.FirstTimeSetup,meta:Iv,component:_ie},{path:"/login",name:Yt.Login,meta:Iv,component:sie},{path:"/registration",name:Yt.Registration,meta:Iv,component:aie},{path:"/printers",name:Yt.PrintersView,meta:zn,component:_ee},{path:"/cameras",name:Yt.CameraGridView,meta:zn,component:uie},{path:"/settings",component:xee,meta:zn,children:[{path:"",meta:zn,redirect:"/settings/grid"},{path:"account",meta:zn,component:Eie},{path:"server-protection",meta:zn,component:Tie},{path:"grid",meta:zn,component:Cie},{path:"floors",meta:zn,component:Uee},{path:"user-management",meta:zn,component:$ee},{path:"printer",meta:zn,component:Fee},{path:"emergency-commands",meta:zn,component:Wse},{path:"software-upgrade",meta:zn,component:_le},{path:"diagnostics",meta:zn,component:kle},{path:"experimental",meta:zn,component:Ple}]},{path:"/statistics",name:Yt.PrintStatistics,meta:zn,component:Tle},{path:"/about",name:"About",component:Wee},{path:"/permission-denied",name:Yt.PermissionDenied,meta:zn,component:Zse},{path:"/:pathMatch(.*)*",name:"NotFound",component:Gse}]});hw.beforeEach(async(e,t,n)=>{var s,i;const r=ps();if(!((s=e==null?void 0:e.meta)!=null&&s.requiresAuth)||r.loginRequired===!1)return console.debug(`No auth required on route ${e.fullPath}`),n();if(console.debug(`Auth required on route ${e.fullPath} (loginRequired=${r.loginRequired}, registration=${r.registration}, wizardState=${r.wizardState}, requiresAuth=${(i=e==null?void 0:e.meta)==null?void 0:i.requiresAuth})`),r.loadTokens(),!r.hasAuthToken&&!r.hasRefreshToken){if(console.debug("Not logged in, redirecting to login page"),t.path=="/login")throw new Error("Already on login page, cannot redirect");return n({path:"/login",query:{redirect:e.fullPath}})}return n()});const Rle={collapse:"keyboard_arrow_up",complete:"check",cancel:"cancel",close:"close",delete:"cancel",clear:"cancel",success:"check_circle",info:"info",warning:"priority_high",error:"warning",prev:"chevron_left",next:"chevron_right",checkboxOn:"check_box",checkboxOff:"check_box_outline_blank",checkboxIndeterminate:"indeterminate_check_box",delimiter:"fiber_manual_record",sortAsc:"arrow_upward",sortDesc:"arrow_downward",expand:"keyboard_arrow_down",menu:"menu",subgroup:"arrow_drop_down",dropdown:"arrow_drop_down",radioOn:"radio_button_checked",radioOff:"radio_button_unchecked",edit:"edit",ratingEmpty:"star_border",ratingFull:"star",ratingHalf:"star_half",loading:"cached",first:"first_page",last:"last_page",unfold:"unfold_more",file:"attach_file",plus:"add",minus:"remove",calendar:"event",treeviewCollapse:"arrow_drop_down",treeviewExpand:"arrow_right",tableGroupCollapse:"chevron_down",tableGroupExpand:"chevron_right",eyeDropper:"colorize",upload:"cloud_upload",color:"palette",command:"keyboard_command_key",ctrl:"keyboard_control_key",shift:"shift",alt:"keyboard_option_key",space:"keyboard_space",enter:"keyboard_return",arrowup:"keyboard_arrow_up",arrowdown:"keyboard_arrow_down",arrowleft:"keyboard_arrow_left",arrowright:"keyboard_arrow_right",backspace:"backspace",play:"play",pause:"pause",fullscreen:"fullscreen",fullscreenExit:"fullscreen_exit",volumeHigh:"volume_high",volumeMedium:"volume_medium",volumeLow:"volume_low",volumeOff:"volume_variant_off"},Ile={component:e=>br(MN,{...e,class:"material-icons"})};function W2(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{blueprint:t,...n}=e,r=or(t,n),{aliases:s={},components:i={},directives:o={}}=r,a=qa();return a.run(()=>{const l=uN(r.defaults),u=xB(r.display,r.ssr),c=xN(r.theme),d=LN(r.icons),f=HN(r.locale),h=YG(r.date,f),g=n7(r.goTo,f);function m(w){for(const x in o)w.directive(x,o[x]);for(const x in i)w.component(x,i[x]);for(const x in s)w.component(x,Iu({...s[x],name:x,aliasName:s[x].name}));const b=qa();if(b.run(()=>{c.install(w)}),w.onUnmount(()=>b.stop()),w.provide(au,l),w.provide(uy,u),w.provide(rd,c),w.provide(ry,d),w.provide(ip,f),w.provide(KG,h.options),w.provide(rx,h.instance),w.provide(pO,g),Ot&&r.ssr)if(w.$nuxt)w.$nuxt.hook("app:suspense:resolve",()=>{u.update()});else{const{mount:x}=w;w.mount=function(){const _=x(...arguments);return Pt(()=>u.update()),w.mount=x,_}}w.mixin({computed:{$vuetify(){return mn({defaults:kl.call(this,au),display:kl.call(this,uy),theme:kl.call(this,rd),icons:kl.call(this,ry),locale:kl.call(this,ip),date:kl.call(this,rx)})}}})}function y(){a.stop()}return{install:m,unmount:y,defaults:l,display:u,theme:c,icons:d,locale:f,date:h,goTo:g}})}const Ale="3.10.5";W2.version=Ale;function kl(e){var r,s;const t=this.$,n=((r=t.parent)==null?void 0:r.provides)??((s=t.vnode.appContext)==null?void 0:s.provides);if(n&&e in n)return n[e]}const Ole=W2({theme:{defaultTheme:"dark",themes:{dark:{dark:!0,colors:{primary:"#1eb6c3",secondary:"#424242",accent:"#82B1FF",error:"#FF5252",info:"#2196F3",success:"#4CAF50",warning:"#FFC107"}},light:{dark:!1,colors:{primary:"#9B0505",secondary:"#424242",accent:"#82B1FF",error:"#FF5252",info:"#2196F3",success:"#4CAF50",warning:"#FFC107"}}}},icons:{defaultSet:"md",aliases:Rle,sets:{md:Ile}}}),Mle=pF();function Dle(e){e.use(Ole).use(wY).use(Mle)}const _C=(e,t,n)=>{const r=Xt(),s=U0(),i=Ft();if(t!=null&&t.length){const o=t.length===1,a=t[0];e.ondrop=async l=>{var f;l.preventDefault(),e.style.border=qp;const u=(f=l.dataTransfer)==null?void 0:f.files;if(!(u!=null&&u.length))return;const c=[...Array.from(u)];let d=[];if(o){const h=c.length===1?c[0].name:null;console.debug("Single printer upload mode",t.length,c.length,h),d=ZJ(a,c,!0)}else{if(c.length>1)throw"Cannot upload multiple files to multiple printers";console.debug("Multi printer upload mode",t.length,c.length);const h=c[0];d=wD(t,h,!0)}s.queueUploads(d),r.clearSelectedPrinters()}}else e.ondrop=async o=>{o.preventDefault(),e.style.border=qp,i.openInfoMessage({title:"No action performed",subtitle:"Please select one or more printers",warning:!0})}},qp="1px solid #2b2a27",Lle="background-color 0.5s ease",kC="1px solid red";function $le(){return{mounted:(e,t,n)=>{var r;e.style.border=qp,e.style.transition=Lle,e.ondragenter=s=>{s.preventDefault(),e.style.border=kC},e.ondragover=s=>{s.preventDefault(),e.style.border=kC},e.ondragleave=s=>{s.preventDefault(),e.style.border=qp},_C(e,(r=t.value)==null?void 0:r.printers,n.appContext)},beforeUpdate:(e,t,n)=>{_C(e,t.value,n.appContext)}}}const Av="1px solid #2b2a27",Fle="1px solid gray",xC=(e,t,n)=>{const r=t==null?void 0:t.printerSet,s=io();if(r){e.ondrop=null,e.ondragover=null,e.ondragleave=null;return}e.style.border=Av,e.ondrop=async i=>{var d;if(e.style.border=Av,i.preventDefault(),!i.dataTransfer)return;const o=i.dataTransfer.getData("text"),a=JSON.parse(o);if(!HJ(a)){console.debug("Drop not recognized",a);return}const u=(d=s.selectedFloor)==null?void 0:d.id;if(!u)throw new Error("Floor is not set");const c=a.printerId;if(!c)throw new Error("PrinterId was not provided");await os.addPrinterToFloor(u,{printerId:c,x:t.x,y:t.y})},e.ondragover=i=>{i!=null&&i.dataTransfer&&(i.dataTransfer&&Array.from(i.dataTransfer.items).filter(o=>o.kind==="file").length||(e.style.border=Fle,i.preventDefault()))},e.ondragleave=i=>{e.style.border=Av,i.preventDefault()}};function Nle(){return{mounted:(e,t,n)=>{xC(e,t.value,n.appContext)},beforeUpdate:(e,t,n)=>{xC(e,t.value,n.appContext)}}}const na=dF(AJ);console.log("[DEV: false][PROD: true]","0.0.22");Mq({app:na,dsn:"https://f64683e8d1cb4ac291434993cff1bf9b@o4503975545733120.ingest.sentry.io/4503975546912768",integrations:[$q({router:hw}),JW()],release:"0.0.22",environment:"production",enabled:!0,tracesSampleRate:1,replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1});na.config.errorHandler=e=>{var t;if(e instanceof $R){console.error(`An error was caught [${e.name}]:
|
|
88
|
+
${e.message}
|
|
89
|
+
${(t=e.config)==null?void 0:t.url}
|
|
90
|
+
${e.stack}`),Ft().openErrorMessage({title:"An error occurred",subtitle:e.message,timeout:5e3});return}else console.error(`An error was caught [${e.name}]:
|
|
91
|
+
${e.message}
|
|
92
|
+
${e.stack}`);Ft().openErrorMessage({title:"An error occurred",subtitle:e.message,timeout:5e3}),fi(e)};na.directive("drop-upload",$le());na.directive("drop-printer-position",Nle());Dle(na);na.provide("appConstants",JX());na.use(hw);na.mount("#app");
|
|
93
|
+
//# sourceMappingURL=index-Cu6fadRj.js.map
|