@fdm-monster/client-next 0.0.22 → 0.0.24

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.
@@ -0,0 +1,60 @@
1
+ (function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"0.0.24"}}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]="439f08fe-a026-4b30-bc7f-43effbb14fcc",e._sentryDebugIdIdentifier="sentry-dbid-439f08fe-a026-4b30-bc7f-43effbb14fcc")})()}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)}})();function Vy(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const It={},nl=[],Ws=()=>{},lC=()=>!1,Ph=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Uy=e=>e.startsWith("onUpdate:"),Cn=Object.assign,zy=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},w2=Object.prototype.hasOwnProperty,_t=(e,t)=>w2.call(e,t),He=Array.isArray,rl=e=>Ih(e)==="[object Map]",uC=e=>Ih(e)==="[object Set]",Ge=e=>typeof e=="function",Xt=e=>typeof e=="string",Ai=e=>typeof e=="symbol",Mt=e=>e!==null&&typeof e=="object",cC=e=>(Mt(e)||Ge(e))&&Ge(e.then)&&Ge(e.catch),dC=Object.prototype.toString,Ih=e=>dC.call(e),_2=e=>Ih(e).slice(8,-1),fC=e=>Ih(e)==="[object Object]",Ah=e=>Xt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Lu=Vy(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Oh=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},k2=/-\w/g,ar=Oh(e=>e.replace(k2,t=>t.slice(1).toUpperCase())),x2=/\B([A-Z])/g,mo=Oh(e=>e.replace(x2,"-$1").toLowerCase()),Xs=Oh(e=>e.charAt(0).toUpperCase()+e.slice(1)),Hp=Oh(e=>e?`on${Xs(e)}`:""),Qi=(e,t)=>!Object.is(e,t),Kd=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},hC=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},Hy=e=>{const t=parseFloat(e);return isNaN(t)?e:t},E2=e=>{const t=Xt(e)?Number(e):NaN;return isNaN(t)?e:t};let E0;const Dh=()=>E0||(E0=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function De(e){if(He(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],s=Xt(r)?P2(r):De(r);if(s)for(const i in s)t[i]=s[i]}return t}else if(Xt(e)||Mt(e))return e}const C2=/;(?![^(]*\))/g,T2=/:([^]+)/,R2=/\/\*[^]*?\*\//g;function P2(e){const t={};return e.replace(R2,"").split(C2).forEach(n=>{if(n){const r=n.split(T2);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function Pe(e){let t="";if(Xt(e))t=e;else if(He(e))for(let n=0;n<e.length;n++){const r=Pe(e[n]);r&&(t+=r+" ")}else if(Mt(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function Jg(e){if(!e)return null;let{class:t,style:n}=e;return t&&!Xt(t)&&(e.class=Pe(t)),n&&(e.style=De(n)),e}const I2="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",A2=Vy(I2);function pC(e){return!!e||e===""}const mC=e=>!!(e&&e.__v_isRef===!0),re=e=>Xt(e)?e:e==null?"":He(e)||Mt(e)&&(e.toString===dC||!Ge(e.toString))?mC(e)?re(e.value):JSON.stringify(e,gC,2):String(e),gC=(e,t)=>mC(t)?gC(e,t.value):rl(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,s],i)=>(n[jp(r,i)+" =>"]=s,n),{})}:uC(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>jp(n))}:Ai(t)?jp(t):Mt(t)&&!He(t)&&!fC(t)?String(t):t,jp=(e,t="")=>{var n;return Ai(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};let qn;class vC{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=qn,!t&&qn&&(this.index=(qn.scopes||(qn.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=qn;try{return qn=this,t()}finally{qn=n}}}on(){++this._on===1&&(this.prevScope=qn,qn=this)}off(){this._on>0&&--this._on===0&&(qn=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 la(e){return new vC(e)}function Mc(){return qn}function Qt(e,t=!1){qn&&qn.cleanups.push(e)}let Nt;const qp=new WeakSet;class yC{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,qn&&qn.active&&qn.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,qp.has(this)&&(qp.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||SC(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,C0(this),wC(this);const t=Nt,n=gs;Nt=this,gs=!0;try{return this.fn()}finally{_C(this),Nt=t,gs=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Wy(t);this.deps=this.depsTail=void 0,C0(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?qp.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Zg(this)&&this.run()}get dirty(){return Zg(this)}}let bC=0,Fu,Nu;function SC(e,t=!1){if(e.flags|=8,t){e.next=Nu,Nu=e;return}e.next=Fu,Fu=e}function jy(){bC++}function qy(){if(--bC>0)return;if(Nu){let t=Nu;for(Nu=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Fu;){let t=Fu;for(Fu=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 wC(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function _C(e){let t,n=e.depsTail,r=n;for(;r;){const s=r.prevDep;r.version===-1?(r===n&&(n=s),Wy(r),O2(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}e.deps=t,e.depsTail=n}function Zg(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(kC(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function kC(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===tc)||(e.globalVersion=tc,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Zg(e))))return;e.flags|=2;const t=e.dep,n=Nt,r=gs;Nt=e,gs=!0;try{wC(e);const s=e.fn(e._value);(t.version===0||Qi(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{Nt=n,gs=r,_C(e),e.flags&=-3}}function Wy(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)Wy(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function O2(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let gs=!0;const xC=[];function Si(){xC.push(gs),gs=!1}function wi(){const e=xC.pop();gs=e===void 0?!0:e}function C0(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Nt;Nt=void 0;try{t()}finally{Nt=n}}}let tc=0;class D2{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 Gy{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(!Nt||!gs||Nt===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Nt)n=this.activeLink=new D2(Nt,this),Nt.deps?(n.prevDep=Nt.depsTail,Nt.depsTail.nextDep=n,Nt.depsTail=n):Nt.deps=Nt.depsTail=n,EC(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=Nt.depsTail,n.nextDep=void 0,Nt.depsTail.nextDep=n,Nt.depsTail=n,Nt.deps===n&&(Nt.deps=r)}return n}trigger(t){this.version++,tc++,this.notify(t)}notify(t){jy();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{qy()}}}function EC(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)EC(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Tf=new WeakMap,Ko=Symbol(""),ev=Symbol(""),nc=Symbol("");function Gn(e,t,n){if(gs&&Nt){let r=Tf.get(e);r||Tf.set(e,r=new Map);let s=r.get(n);s||(r.set(n,s=new Gy),s.map=r,s.key=n),s.track()}}function fi(e,t,n,r,s,i){const o=Tf.get(e);if(!o){tc++;return}const a=l=>{l&&l.trigger()};if(jy(),t==="clear")o.forEach(a);else{const l=He(e),u=l&&Ah(n);if(l&&n==="length"){const c=Number(r);o.forEach((d,f)=>{(f==="length"||f===nc||!Ai(f)&&f>=c)&&a(d)})}else switch((n!==void 0||o.has(void 0))&&a(o.get(n)),u&&a(o.get(nc)),t){case"add":l?u&&a(o.get("length")):(a(o.get(Ko)),rl(e)&&a(o.get(ev)));break;case"delete":l||(a(o.get(Ko)),rl(e)&&a(o.get(ev)));break;case"set":rl(e)&&a(o.get(Ko));break}}qy()}function M2(e,t){const n=Tf.get(e);return n&&n.get(t)}function Aa(e){const t=Fe(e);return t===e?t:(Gn(t,"iterate",nc),Fr(e)?t:t.map(vs))}function Mh(e){return Gn(e=Fe(e),"iterate",nc),e}function Ui(e,t){return ki(e)?pi(e)?dl(vs(t)):dl(t):vs(t)}const L2={__proto__:null,[Symbol.iterator](){return Wp(this,Symbol.iterator,e=>Ui(this,e))},concat(...e){return Aa(this).concat(...e.map(t=>He(t)?Aa(t):t))},entries(){return Wp(this,"entries",e=>(e[1]=Ui(this,e[1]),e))},every(e,t){return ei(this,"every",e,t,void 0,arguments)},filter(e,t){return ei(this,"filter",e,t,n=>n.map(r=>Ui(this,r)),arguments)},find(e,t){return ei(this,"find",e,t,n=>Ui(this,n),arguments)},findIndex(e,t){return ei(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return ei(this,"findLast",e,t,n=>Ui(this,n),arguments)},findLastIndex(e,t){return ei(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return ei(this,"forEach",e,t,void 0,arguments)},includes(...e){return Gp(this,"includes",e)},indexOf(...e){return Gp(this,"indexOf",e)},join(e){return Aa(this).join(e)},lastIndexOf(...e){return Gp(this,"lastIndexOf",e)},map(e,t){return ei(this,"map",e,t,void 0,arguments)},pop(){return hu(this,"pop")},push(...e){return hu(this,"push",e)},reduce(e,...t){return T0(this,"reduce",e,t)},reduceRight(e,...t){return T0(this,"reduceRight",e,t)},shift(){return hu(this,"shift")},some(e,t){return ei(this,"some",e,t,void 0,arguments)},splice(...e){return hu(this,"splice",e)},toReversed(){return Aa(this).toReversed()},toSorted(e){return Aa(this).toSorted(e)},toSpliced(...e){return Aa(this).toSpliced(...e)},unshift(...e){return hu(this,"unshift",e)},values(){return Wp(this,"values",e=>Ui(this,e))}};function Wp(e,t,n){const r=Mh(e),s=r[t]();return r!==e&&!Fr(e)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.done||(i.value=n(i.value)),i}),s}const F2=Array.prototype;function ei(e,t,n,r,s,i){const o=Mh(e),a=o!==e&&!Fr(e),l=o[t];if(l!==F2[t]){const d=l.apply(e,i);return a?vs(d):d}let u=n;o!==e&&(a?u=function(d,f){return n.call(this,Ui(e,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 T0(e,t,n,r){const s=Mh(e);let i=n;return s!==e&&(Fr(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,Ui(e,a),l,e)}),s[t](i,...r)}function Gp(e,t,n){const r=Fe(e);Gn(r,"iterate",nc);const s=r[t](...n);return(s===-1||s===!1)&&Fl(n[0])?(n[0]=Fe(n[0]),r[t](...n)):s}function hu(e,t,n=[]){Si(),jy();const r=Fe(e)[t].apply(e,n);return qy(),wi(),r}const N2=Vy("__proto__,__v_isRef,__isVue"),CC=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Ai));function $2(e){Ai(e)||(e=String(e));const t=Fe(this);return Gn(t,"has",e),t.hasOwnProperty(e)}class TC{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?DC:OC:i?AC:IC).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const o=He(t);if(!s){let l;if(o&&(l=L2[n]))return l;if(n==="hasOwnProperty")return $2}const a=Reflect.get(t,n,Ye(t)?t:r);if((Ai(n)?CC.has(n):N2(n))||(s||Gn(t,"get",n),i))return a;if(Ye(a)){const l=o&&Ah(n)?a:a.value;return s&&Mt(l)?_i(l):l}return Mt(a)?s?_i(a):on(a):a}}class RC extends TC{constructor(t=!1){super(!1,t)}set(t,n,r,s){let i=t[n];const o=He(t)&&Ah(n);if(!this._isShallow){const u=ki(i);if(!Fr(r)&&!ki(r)&&(i=Fe(i),r=Fe(r)),!o&&Ye(i)&&!Ye(r))return u||(i.value=r),!0}const a=o?Number(n)<t.length:_t(t,n),l=Reflect.set(t,n,r,Ye(t)?t:s);return t===Fe(s)&&(a?Qi(r,i)&&fi(t,"set",n,r):fi(t,"add",n,r)),l}deleteProperty(t,n){const r=_t(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(!Ai(n)||!CC.has(n))&&Gn(t,"has",n),r}ownKeys(t){return Gn(t,"iterate",He(t)?"length":Ko),Reflect.ownKeys(t)}}class PC extends TC{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const B2=new RC,V2=new PC,U2=new RC(!0),z2=new PC(!0),tv=e=>e,cd=e=>Reflect.getPrototypeOf(e);function H2(e,t,n){return function(...r){const s=this.__v_raw,i=Fe(s),o=rl(i),a=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,u=s[e](...r),c=n?tv:t?dl:vs;return!t&&Gn(i,"iterate",l?ev:Ko),{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 dd(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function j2(e,t){const n={get(s){const i=this.__v_raw,o=Fe(i),a=Fe(s);e||(Qi(s,a)&&Gn(o,"get",s),Gn(o,"get",a));const{has:l}=cd(o),u=t?tv:e?dl:vs;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&&Gn(Fe(s),"iterate",Ko),s.size},has(s){const i=this.__v_raw,o=Fe(i),a=Fe(s);return e||(Qi(s,a)&&Gn(o,"has",s),Gn(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=Fe(a),u=t?tv:e?dl:vs;return!e&&Gn(l,"iterate",Ko),a.forEach((c,d)=>s.call(i,u(c),u(d),o))}};return Cn(n,e?{add:dd("add"),set:dd("set"),delete:dd("delete"),clear:dd("clear")}:{add(s){!t&&!Fr(s)&&!ki(s)&&(s=Fe(s));const i=Fe(this);return cd(i).has.call(i,s)||(i.add(s),fi(i,"add",s,s)),this},set(s,i){!t&&!Fr(i)&&!ki(i)&&(i=Fe(i));const o=Fe(this),{has:a,get:l}=cd(o);let u=a.call(o,s);u||(s=Fe(s),u=a.call(o,s));const c=l.call(o,s);return o.set(s,i),u?Qi(i,c)&&fi(o,"set",s,i):fi(o,"add",s,i),this},delete(s){const i=Fe(this),{has:o,get:a}=cd(i);let l=o.call(i,s);l||(s=Fe(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=Fe(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]=H2(s,e,t)}),n}function Lh(e,t){const n=j2(e,t);return(r,s,i)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?r:Reflect.get(_t(n,s)&&s in r?n:r,s,i)}const q2={get:Lh(!1,!1)},W2={get:Lh(!1,!0)},G2={get:Lh(!0,!1)},K2={get:Lh(!0,!0)},IC=new WeakMap,AC=new WeakMap,OC=new WeakMap,DC=new WeakMap;function Y2(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function X2(e){return e.__v_skip||!Object.isExtensible(e)?0:Y2(_2(e))}function on(e){return ki(e)?e:Nh(e,!1,B2,q2,IC)}function Fh(e){return Nh(e,!1,U2,W2,AC)}function _i(e){return Nh(e,!0,V2,G2,OC)}function Ky(e){return Nh(e,!0,z2,K2,DC)}function Nh(e,t,n,r,s){if(!Mt(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=X2(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 pi(e){return ki(e)?pi(e.__v_raw):!!(e&&e.__v_isReactive)}function ki(e){return!!(e&&e.__v_isReadonly)}function Fr(e){return!!(e&&e.__v_isShallow)}function Fl(e){return e?!!e.__v_raw:!1}function Fe(e){const t=e&&e.__v_raw;return t?Fe(t):e}function $h(e){return!_t(e,"__v_skip")&&Object.isExtensible(e)&&hC(e,"__v_skip",!0),e}const vs=e=>Mt(e)?on(e):e,dl=e=>Mt(e)?_i(e):e;function Ye(e){return e?e.__v_isRef===!0:!1}function H(e){return MC(e,!1)}function ke(e){return MC(e,!0)}function MC(e,t){return Ye(e)?e:new Q2(e,t)}class Q2{constructor(t,n){this.dep=new Gy,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Fe(t),this._value=n?t:vs(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,r=this.__v_isShallow||Fr(t)||ki(t);t=r?t:Fe(t),Qi(t,n)&&(this._rawValue=t,this._value=r?t:vs(t),this.dep.trigger())}}function Q(e){return Ye(e)?e.value:e}function Ut(e){return Ge(e)?e():Q(e)}const J2={get:(e,t,n)=>t==="__v_raw"?e:Q(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const s=e[t];return Ye(s)&&!Ye(n)?(s.value=n,!0):Reflect.set(e,t,n,r)}};function LC(e){return pi(e)?e:new Proxy(e,J2)}function _a(e){const t=He(e)?new Array(e.length):{};for(const n in e)t[n]=FC(e,n);return t}class Z2{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0,this._raw=Fe(t);let s=!0,i=t;if(!He(t)||!Ah(String(n)))do s=!Fl(i)||Fr(i);while(s&&(i=i.__v_raw));this._shallow=s}get value(){let t=this._object[this._key];return this._shallow&&(t=Q(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&Ye(this._raw[this._key])){const n=this._object[this._key];if(Ye(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return M2(this._raw,this._key)}}class eL{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 ne(e,t,n){return Ye(e)?e:Ge(e)?new eL(e):Mt(e)&&arguments.length>1?FC(e,t,n):H(e)}function FC(e,t,n){return new Z2(e,t,n)}class tL{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Gy(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=tc-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&Nt!==this)return SC(this,!0),!0}get value(){const t=this.dep.track();return kC(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function nL(e,t,n=!1){let r,s;return Ge(e)?r=e:(r=e.get,s=e.set),new tL(r,s,n)}const fd={},Rf=new WeakMap;let Mo;function rL(e,t=!1,n=Mo){if(n){let r=Rf.get(n);r||Rf.set(n,r=[]),r.push(e)}}function sL(e,t,n=It){const{immediate:r,deep:s,once:i,scheduler:o,augmentJob:a,call:l}=n,u=T=>s?T:Fr(T)||s===!1||s===0?hi(T,1):hi(T);let c,d,f,p,v=!1,m=!1;if(Ye(e)?(d=()=>e.value,v=Fr(e)):pi(e)?(d=()=>u(e),v=!0):He(e)?(m=!0,v=e.some(T=>pi(T)||Fr(T)),d=()=>e.map(T=>{if(Ye(T))return T.value;if(pi(T))return u(T);if(Ge(T))return l?l(T,2):T()})):Ge(e)?t?d=l?()=>l(e,2):e:d=()=>{if(f){Si();try{f()}finally{wi()}}const T=Mo;Mo=c;try{return l?l(e,3,[p]):e(p)}finally{Mo=T}}:d=Ws,t&&s){const T=d,_=s===!0?1/0:s;d=()=>hi(T(),_)}const y=Mc(),S=()=>{c.stop(),y&&y.active&&zy(y.effects,c)};if(i&&t){const T=t;t=(..._)=>{T(..._),S()}}let b=m?new Array(e.length).fill(fd):fd;const k=T=>{if(!(!(c.flags&1)||!c.dirty&&!T))if(t){const _=c.run();if(s||v||(m?_.some((C,R)=>Qi(C,b[R])):Qi(_,b))){f&&f();const C=Mo;Mo=c;try{const R=[_,b===fd?void 0:m&&b[0]===fd?[]:b,p];b=_,l?l(t,3,R):t(...R)}finally{Mo=C}}}else c.run()};return a&&a(k),c=new yC(d),c.scheduler=o?()=>o(k,!1):k,p=T=>rL(T,!1,c),f=c.onStop=()=>{const T=Rf.get(c);if(T){if(l)l(T,4);else for(const _ of T)_();Rf.delete(c)}},t?r?k(!0):b=c.run():o?o(k.bind(null,!0),!0):c.run(),S.pause=c.pause.bind(c),S.resume=c.resume.bind(c),S.stop=S,S}function hi(e,t=1/0,n){if(t<=0||!Mt(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Ye(e))hi(e.value,t,n);else if(He(e))for(let r=0;r<e.length;r++)hi(e[r],t,n);else if(uC(e)||rl(e))e.forEach(r=>{hi(r,t,n)});else if(fC(e)){for(const r in e)hi(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&hi(e[r],t,n)}return e}function Lc(e,t,n,r){try{return r?e(...r):e()}catch(s){Bh(s,t,n)}}function ys(e,t,n,r){if(Ge(e)){const s=Lc(e,t,n,r);return s&&cC(s)&&s.catch(i=>{Bh(i,t,n)}),s}if(He(e)){const s=[];for(let i=0;i<e.length;i++)s.push(ys(e[i],t,n,r));return s}}function Bh(e,t,n,r=!0){const s=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||It;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){Si(),Lc(i,null,10,[e,l,u]),wi();return}}iL(e,n,s,r,o)}function iL(e,t,n,r=!0,s=!1){if(s)throw e;console.error(e)}const sr=[];let Bs=-1;const sl=[];let zi=null,Ha=0;const NC=Promise.resolve();let Pf=null;function ot(e){const t=Pf||NC;return e?t.then(this?e.bind(this):e):t}function oL(e){let t=Bs+1,n=sr.length;for(;t<n;){const r=t+n>>>1,s=sr[r],i=rc(s);i<e||i===e&&s.flags&2?t=r+1:n=r}return t}function Yy(e){if(!(e.flags&1)){const t=rc(e),n=sr[sr.length-1];!n||!(e.flags&2)&&t>=rc(n)?sr.push(e):sr.splice(oL(t),0,e),e.flags|=1,$C()}}function $C(){Pf||(Pf=NC.then(VC))}function aL(e){He(e)?sl.push(...e):zi&&e.id===-1?zi.splice(Ha+1,0,e):e.flags&1||(sl.push(e),e.flags|=1),$C()}function R0(e,t,n=Bs+1){for(;n<sr.length;n++){const r=sr[n];if(r&&r.flags&2){if(e&&r.id!==e.uid)continue;sr.splice(n,1),n--,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function BC(e){if(sl.length){const t=[...new Set(sl)].sort((n,r)=>rc(n)-rc(r));if(sl.length=0,zi){zi.push(...t);return}for(zi=t,Ha=0;Ha<zi.length;Ha++){const n=zi[Ha];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}zi=null,Ha=0}}const rc=e=>e.id==null?e.flags&2?-1:1/0:e.id;function VC(e){try{for(Bs=0;Bs<sr.length;Bs++){const t=sr[Bs];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Lc(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Bs<sr.length;Bs++){const t=sr[Bs];t&&(t.flags&=-2)}Bs=-1,sr.length=0,BC(),Pf=null,(sr.length||sl.length)&&VC()}}let Fn=null,UC=null;function If(e){const t=Fn;return Fn=e,UC=e&&e.type.__scopeId||null,t}function g(e,t=Fn,n){if(!t||e._n)return e;const r=(...s)=>{r._d&&Df(-1);const i=If(t);let o;try{o=e(...s)}finally{If(i),r._d&&Df(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function Ot(e,t){if(Fn===null)return e;const n=qh(Fn),r=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[i,o,a,l=It]=t[s];i&&(Ge(i)&&(i={mounted:i,updated:i}),i.deep&&hi(o),r.push({dir:i,instance:n,value:o,oldValue:void 0,arg:a,modifiers:l}))}return e}function xo(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&&(Si(),ys(l,n,8,[e.el,a,e,t]),wi())}}function zt(e,t){if(Kn){let n=Kn.provides;const r=Kn.parent&&Kn.parent.provides;r===n&&(n=Kn.provides=Object.create(r)),n[e]=t}}function je(e,t,n=!1){const r=$l();if(r||Yo){let s=Yo?Yo._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&&Ge(t)?t.call(r&&r.proxy):t}}function zC(){return!!($l()||Yo)}const lL=Symbol.for("v-scx"),uL=()=>je(lL);function vn(e,t){return Xy(e,null,t)}function we(e,t,n){return Xy(e,t,n)}function Xy(e,t,n=It){const{immediate:r,deep:s,flush:i,once:o}=n,a=Cn({},n),l=t&&r||!t&&i!=="post";let u;if(ac){if(i==="sync"){const p=uL();u=p.__watcherHandles||(p.__watcherHandles=[])}else if(!l){const p=()=>{};return p.stop=Ws,p.resume=Ws,p.pause=Ws,p}}const c=Kn;a.call=(p,v,m)=>ys(p,c,v,m);let d=!1;i==="post"?a.scheduler=p=>{nr(p,c&&c.suspense)}:i!=="sync"&&(d=!0,a.scheduler=(p,v)=>{v?p():Yy(p)}),a.augmentJob=p=>{t&&(p.flags|=4),d&&(p.flags|=2,c&&(p.id=c.uid,p.i=c))};const f=sL(e,t,a);return ac&&(u?u.push(f):l&&f()),f}function cL(e,t,n){const r=this.proxy,s=Xt(e)?e.includes(".")?HC(r,e):()=>r[e]:e.bind(r,r);let i;Ge(t)?i=t:(i=t.handler,n=t);const o=Nc(this),a=Xy(s,i.bind(r),n);return o(),a}function HC(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 jC=Symbol("_vte"),qC=e=>e.__isTeleport,$u=e=>e&&(e.disabled||e.disabled===""),P0=e=>e&&(e.defer||e.defer===""),I0=e=>typeof SVGElement<"u"&&e instanceof SVGElement,A0=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,nv=(e,t)=>{const n=e&&e.to;return Xt(n)?t?t(n):null:n},WC={name:"Teleport",__isTeleport:!0,process(e,t,n,r,s,i,o,a,l,u){const{mc:c,pc:d,pbc:f,o:{insert:p,querySelector:v,createText:m,createComment:y}}=u,S=$u(t.props);let{shapeFlag:b,children:k,dynamicChildren:T}=t;if(e==null){const _=t.el=m(""),C=t.anchor=m("");p(_,n,r),p(C,n,r);const R=(P,I)=>{b&16&&c(k,P,I,s,i,o,a,l)},w=()=>{const P=t.target=nv(t.props,v),I=GC(P,t,m,p);P&&(o!=="svg"&&I0(P)?o="svg":o!=="mathml"&&A0(P)&&(o="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(P),S||(R(P,I),Yd(t,!1)))};S&&(R(n,C),Yd(t,!0)),P0(t.props)?(t.el.__isMounted=!1,nr(()=>{w(),delete t.el.__isMounted},i)):w()}else{if(P0(t.props)&&e.el.__isMounted===!1){nr(()=>{WC.process(e,t,n,r,s,i,o,a,l,u)},i);return}t.el=e.el,t.targetStart=e.targetStart;const _=t.anchor=e.anchor,C=t.target=e.target,R=t.targetAnchor=e.targetAnchor,w=$u(e.props),P=w?n:C,I=w?_:R;if(o==="svg"||I0(C)?o="svg":(o==="mathml"||A0(C))&&(o="mathml"),T?(f(e.dynamicChildren,T,P,s,i,o,a),sb(e,t,!0)):l||d(e,t,P,I,s,i,o,a,!1),S)w?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):hd(t,n,_,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const A=t.target=nv(t.props,v);A&&hd(t,A,null,u,0)}else w&&hd(t,C,R,u,1);Yd(t,S)}},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 p=i||!$u(f);for(let v=0;v<a.length;v++){const m=a[v];r(m,t,n,p,!!m.dynamicChildren)}}},move:hd,hydrate:dL};function hd(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||$u(c))&&l&16)for(let f=0;f<u.length;f++)s(u[f],t,n,2);d&&r(a,t,n)}function dL(e,t,n,r,s,i,{o:{nextSibling:o,parentNode:a,querySelector:l,insert:u,createText:c}},d){function f(m,y,S,b){y.anchor=d(o(m),y,a(m),n,r,s,i),y.targetStart=S,y.targetAnchor=b}const p=t.target=nv(t.props,l),v=$u(t.props);if(p){const m=p._lpa||p.firstChild;if(t.shapeFlag&16)if(v)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,p._lpa=t.targetAnchor&&o(t.targetAnchor);break}}y=o(y)}t.targetAnchor||GC(p,t,c,u),d(m&&o(m),t,p,n,r,s,i)}Yd(t,v)}else v&&t.shapeFlag&16&&f(e,t,e,o(e));return t.anchor&&o(t.anchor)}const fL=WC;function Yd(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 GC(e,t,n,r){const s=t.targetStart=n(""),i=t.targetAnchor=n("");return s[jC]=i,e&&(r(s,e),r(i,e)),i}const ci=Symbol("_leaveCb"),pd=Symbol("_enterCb");function KC(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return gt(()=>{e.isMounted=!0}),Vn(()=>{e.isUnmounting=!0}),e}const Ur=[Function,Array],YC={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Ur,onEnter:Ur,onAfterEnter:Ur,onEnterCancelled:Ur,onBeforeLeave:Ur,onLeave:Ur,onAfterLeave:Ur,onLeaveCancelled:Ur,onBeforeAppear:Ur,onAppear:Ur,onAfterAppear:Ur,onAppearCancelled:Ur},XC=e=>{const t=e.subTree;return t.component?XC(t.component):t},hL={name:"BaseTransition",props:YC,setup(e,{slots:t}){const n=$l(),r=KC();return()=>{const s=t.default&&Qy(t.default(),!0);if(!s||!s.length)return;const i=QC(s),o=Fe(e),{mode:a}=o;if(r.isLeaving)return Kp(i);const l=O0(i);if(!l)return Kp(i);let u=sc(l,o,r,n,d=>u=d);l.type!==Ln&&ua(l,u);let c=n.subTree&&O0(n.subTree);if(c&&c.type!==Ln&&!$o(c,l)&&XC(n).type!==Ln){let d=sc(c,o,r,n);if(ua(c,d),a==="out-in"&&l.type!==Ln)return r.isLeaving=!0,d.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,c=void 0},Kp(i);a==="in-out"&&l.type!==Ln?d.delayLeave=(f,p,v)=>{const m=JC(r,c);m[String(c.key)]=c,f[ci]=()=>{p(),f[ci]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{v(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return i}}};function QC(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Ln){t=n;break}}return t}const pL=hL;function JC(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 sc(e,t,n,r,s){const{appear:i,mode:o,persisted:a=!1,onBeforeEnter:l,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:f,onLeave:p,onAfterLeave:v,onLeaveCancelled:m,onBeforeAppear:y,onAppear:S,onAfterAppear:b,onAppearCancelled:k}=t,T=String(e.key),_=JC(n,e),C=(P,I)=>{P&&ys(P,r,9,I)},R=(P,I)=>{const A=I[1];C(P,I),He(P)?P.every($=>$.length<=1)&&A():P.length<=1&&A()},w={mode:o,persisted:a,beforeEnter(P){let I=l;if(!n.isMounted)if(i)I=y||l;else return;P[ci]&&P[ci](!0);const A=_[T];A&&$o(e,A)&&A.el[ci]&&A.el[ci](),C(I,[P])},enter(P){let I=u,A=c,$=d;if(!n.isMounted)if(i)I=S||u,A=b||c,$=k||d;else return;let K=!1;const M=P[pd]=L=>{K||(K=!0,L?C($,[P]):C(A,[P]),w.delayedLeave&&w.delayedLeave(),P[pd]=void 0)};I?R(I,[P,M]):M()},leave(P,I){const A=String(e.key);if(P[pd]&&P[pd](!0),n.isUnmounting)return I();C(f,[P]);let $=!1;const K=P[ci]=M=>{$||($=!0,I(),M?C(m,[P]):C(v,[P]),P[ci]=void 0,_[A]===e&&delete _[A])};_[A]=e,p?R(p,[P,K]):K()},clone(P){const I=sc(P,t,n,r,s);return s&&s(I),I}};return w}function Kp(e){if(Vh(e))return e=xi(e),e.children=null,e}function O0(e){if(!Vh(e))return qC(e.type)&&e.children?QC(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&&Ge(n.default))return n.default()}}function ua(e,t){e.shapeFlag&6&&e.component?(e.transition=t,ua(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 Qy(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===Ie?(o.patchFlag&128&&s++,r=r.concat(Qy(o.children,t,a))):(t||o.type!==Ln)&&r.push(a!=null?xi(o,{key:a}):o)}if(s>1)for(let i=0;i<r.length;i++)r[i].patchFlag=-2;return r}function Me(e,t){return Ge(e)?Cn({name:e.name},t,{setup:e}):e}function Pr(){const e=$l();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function ZC(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const Af=new WeakMap;function Bu(e,t,n,r,s=!1){if(He(e)){e.forEach((v,m)=>Bu(v,t&&(He(t)?t[m]:t),n,r,s));return}if(il(r)&&!s){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Bu(e,t,n,r.component.subTree);return}const i=r.shapeFlag&4?qh(r.component):r.el,o=s?null:i,{i:a,r:l}=e,u=t&&t.r,c=a.refs===It?a.refs={}:a.refs,d=a.setupState,f=Fe(d),p=d===It?lC:v=>_t(f,v);if(u!=null&&u!==l){if(D0(t),Xt(u))c[u]=null,p(u)&&(d[u]=null);else if(Ye(u)){u.value=null;const v=t;v.k&&(c[v.k]=null)}}if(Ge(l))Lc(l,a,12,[o,c]);else{const v=Xt(l),m=Ye(l);if(v||m){const y=()=>{if(e.f){const S=v?p(l)?d[l]:c[l]:l.value;if(s)He(S)&&zy(S,i);else if(He(S))S.includes(i)||S.push(i);else if(v)c[l]=[i],p(l)&&(d[l]=c[l]);else{const b=[i];l.value=b,e.k&&(c[e.k]=b)}}else v?(c[l]=o,p(l)&&(d[l]=o)):m&&(l.value=o,e.k&&(c[e.k]=o))};if(o){const S=()=>{y(),Af.delete(e)};S.id=-1,Af.set(e,S),nr(S,n)}else D0(e),y()}}}function D0(e){const t=Af.get(e);t&&(t.flags|=8,Af.delete(e))}Dh().requestIdleCallback;Dh().cancelIdleCallback;const il=e=>!!e.type.__asyncLoader,Vh=e=>e.type.__isKeepAlive;function eT(e,t){tT(e,"a",t)}function Jy(e,t){tT(e,"da",t)}function tT(e,t,n=Kn){const r=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(Uh(t,r,n),n){let s=n.parent;for(;s&&s.parent;)Vh(s.parent.vnode)&&mL(r,t,n,s),s=s.parent}}function mL(e,t,n,r){const s=Uh(t,e,r,!0);zh(()=>{zy(r[t],s)},n)}function Uh(e,t,n=Kn,r=!1){if(n){const s=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{Si();const a=Nc(n),l=ys(t,n,e,o);return a(),wi(),l});return r?s.unshift(i):s.push(i),i}}const Oi=e=>(t,n=Kn)=>{(!ac||e==="sp")&&Uh(e,(...r)=>t(...r),n)},Nl=Oi("bm"),gt=Oi("m"),nT=Oi("bu"),Zy=Oi("u"),Vn=Oi("bum"),zh=Oi("um"),gL=Oi("sp"),vL=Oi("rtg"),yL=Oi("rtc");function bL(e,t=Kn){Uh("ec",e,t)}const eb="components",SL="directives";function Pn(e,t){return tb(eb,e,!0,t)||e}const wL=Symbol.for("v-ndc");function _L(e){return Xt(e)&&tb(eb,e,!1)||e}function ic(e){return tb(SL,e)}function tb(e,t,n=!0,r=!1){const s=Fn||Kn;if(s){const i=s.type;if(e===eb){const a=sF(i,!1);if(a&&(a===t||a===ar(t)||a===Xs(ar(t))))return i}const o=M0(s[e]||i[e],t)||M0(s.appContext[e],t);return!o&&r?i:o}}function M0(e,t){return e&&(e[t]||e[ar(t)]||e[Xs(ar(t))])}function Ht(e,t,n,r){let s;const i=n,o=He(e);if(o||Xt(e)){const a=o&&pi(e);let l=!1,u=!1;a&&(l=!Fr(e),u=ki(e),e=Mh(e)),s=new Array(e.length);for(let c=0,d=e.length;c<d;c++)s[c]=t(l?u?dl(vs(e[c])):vs(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(Mt(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 rT(e,t){for(let n=0;n<t.length;n++){const r=t[n];if(He(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 Hh(e,t,n={},r,s){if(Fn.ce||Fn.parent&&il(Fn.parent)&&Fn.parent.ce){const u=Object.keys(n).length>0;return F(),ee(Ie,null,[h("slot",n,r&&r())],u?-2:64)}let i=e[t];i&&i._c&&(i._d=!1),F();const o=i&&sT(i(n)),a=n.key||o&&o.key,l=ee(Ie,{key:(a&&!Ai(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 sT(e){return e.some(t=>fl(t)?!(t.type===Ln||t.type===Ie&&!sT(t.children)):!0)?e:null}const rv=e=>e?_T(e)?qh(e):rv(e.parent):null,Vu=Cn(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=>rv(e.parent),$root:e=>rv(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>oT(e),$forceUpdate:e=>e.f||(e.f=()=>{Yy(e.update)}),$nextTick:e=>e.n||(e.n=ot.bind(e.proxy)),$watch:e=>cL.bind(e)}),Yp=(e,t)=>e!==It&&!e.__isScriptSetup&&_t(e,t),kL={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;if(t[0]!=="$"){const f=o[t];if(f!==void 0)switch(f){case 1:return r[t];case 2:return s[t];case 4:return n[t];case 3:return i[t]}else{if(Yp(r,t))return o[t]=1,r[t];if(s!==It&&_t(s,t))return o[t]=2,s[t];if(_t(i,t))return o[t]=3,i[t];if(n!==It&&_t(n,t))return o[t]=4,n[t];sv&&(o[t]=0)}}const u=Vu[t];let c,d;if(u)return t==="$attrs"&&Gn(e.attrs,"get",""),u(e);if((c=a.__cssModules)&&(c=c[t]))return c;if(n!==It&&_t(n,t))return o[t]=4,n[t];if(d=l.config.globalProperties,_t(d,t))return d[t]},set({_:e},t,n){const{data:r,setupState:s,ctx:i}=e;return Yp(s,t)?(s[t]=n,!0):r!==It&&_t(r,t)?(r[t]=n,!0):_t(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,props:i,type:o}},a){let l;return!!(n[a]||e!==It&&a[0]!=="$"&&_t(e,a)||Yp(t,a)||_t(i,a)||_t(r,a)||_t(Vu,a)||_t(s.config.globalProperties,a)||(l=o.__cssModules)&&l[a])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:_t(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function L0(e){return He(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let sv=!0;function xL(e){const t=oT(e),n=e.proxy,r=e.ctx;sv=!1,t.beforeCreate&&F0(t.beforeCreate,e,"bc");const{data:s,computed:i,methods:o,watch:a,provide:l,inject:u,created:c,beforeMount:d,mounted:f,beforeUpdate:p,updated:v,activated:m,deactivated:y,beforeDestroy:S,beforeUnmount:b,destroyed:k,unmounted:T,render:_,renderTracked:C,renderTriggered:R,errorCaptured:w,serverPrefetch:P,expose:I,inheritAttrs:A,components:$,directives:K,filters:M}=t;if(u&&EL(u,r,null),o)for(const G in o){const B=o[G];Ge(B)&&(r[G]=B.bind(n))}if(s){const G=s.call(n,n);Mt(G)&&(e.data=on(G))}if(sv=!0,i)for(const G in i){const B=i[G],q=Ge(B)?B.bind(n,n):Ge(B.get)?B.get.bind(n,n):Ws,N=!Ge(B)&&Ge(B.set)?B.set.bind(n):Ws,se=O({get:q,set:N});Object.defineProperty(r,G,{enumerable:!0,configurable:!0,get:()=>se.value,set:z=>se.value=z})}if(a)for(const G in a)iT(a[G],r,n,G);if(l){const G=Ge(l)?l.call(n):l;Reflect.ownKeys(G).forEach(B=>{zt(B,G[B])})}c&&F0(c,e,"c");function j(G,B){He(B)?B.forEach(q=>G(q.bind(n))):B&&G(B.bind(n))}if(j(Nl,d),j(gt,f),j(nT,p),j(Zy,v),j(eT,m),j(Jy,y),j(bL,w),j(yL,C),j(vL,R),j(Vn,b),j(zh,T),j(gL,P),He(I))if(I.length){const G=e.exposed||(e.exposed={});I.forEach(B=>{Object.defineProperty(G,B,{get:()=>n[B],set:q=>n[B]=q,enumerable:!0})})}else e.exposed||(e.exposed={});_&&e.render===Ws&&(e.render=_),A!=null&&(e.inheritAttrs=A),$&&(e.components=$),K&&(e.directives=K),P&&ZC(e)}function EL(e,t,n=Ws){He(e)&&(e=iv(e));for(const r in e){const s=e[r];let i;Mt(s)?"default"in s?i=je(s.from||r,s.default,!0):i=je(s.from||r):i=je(s),Ye(i)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[r]=i}}function F0(e,t,n){ys(He(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function iT(e,t,n,r){let s=r.includes(".")?HC(n,r):()=>n[r];if(Xt(e)){const i=t[e];Ge(i)&&we(s,i)}else if(Ge(e))we(s,e.bind(n));else if(Mt(e))if(He(e))e.forEach(i=>iT(i,t,n,r));else{const i=Ge(e.handler)?e.handler.bind(n):t[e.handler];Ge(i)&&we(s,i,e)}}function oT(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=>Of(l,u,o,!0)),Of(l,t,o)),Mt(t)&&i.set(t,l),l}function Of(e,t,n,r=!1){const{mixins:s,extends:i}=t;i&&Of(e,i,n,!0),s&&s.forEach(o=>Of(e,o,n,!0));for(const o in t)if(!(r&&o==="expose")){const a=CL[o]||n&&n[o];e[o]=a?a(e[o],t[o]):t[o]}return e}const CL={data:N0,props:$0,emits:$0,methods:Pu,computed:Pu,beforeCreate:er,created:er,beforeMount:er,mounted:er,beforeUpdate:er,updated:er,beforeDestroy:er,beforeUnmount:er,destroyed:er,unmounted:er,activated:er,deactivated:er,errorCaptured:er,serverPrefetch:er,components:Pu,directives:Pu,watch:RL,provide:N0,inject:TL};function N0(e,t){return t?e?function(){return Cn(Ge(e)?e.call(this,this):e,Ge(t)?t.call(this,this):t)}:t:e}function TL(e,t){return Pu(iv(e),iv(t))}function iv(e){if(He(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function er(e,t){return e?[...new Set([].concat(e,t))]:t}function Pu(e,t){return e?Cn(Object.create(null),e,t):t}function $0(e,t){return e?He(e)&&He(t)?[...new Set([...e,...t])]:Cn(Object.create(null),L0(e),L0(t??{})):t}function RL(e,t){if(!e)return t;if(!t)return e;const n=Cn(Object.create(null),e);for(const r in t)n[r]=er(e[r],t[r]);return n}function aT(){return{app:null,config:{isNativeTag:lC,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 PL=0;function IL(e,t){return function(r,s=null){Ge(r)||(r=Cn({},r)),s!=null&&!Mt(s)&&(s=null);const i=aT(),o=new WeakSet,a=[];let l=!1;const u=i.app={_uid:PL++,_component:r,_props:s,_container:null,_context:i,_instance:null,version:xT,get config(){return i.config},set config(c){},use(c,...d){return o.has(c)||(c&&Ge(c.install)?(o.add(c),c.install(u,...d)):Ge(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 p=u._ceVNode||h(r,s);return p.appContext=i,f===!0?f="svg":f===!1&&(f=void 0),e(p,c,f),l=!0,u._container=c,c.__vue_app__=u,qh(p.component)}},onUnmount(c){a.push(c)},unmount(){l&&(ys(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=Yo;Yo=u;try{return c()}finally{Yo=d}}};return u}}let Yo=null;const AL=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${ar(t)}Modifiers`]||e[`${mo(t)}Modifiers`];function OL(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||It;let s=n;const i=t.startsWith("update:"),o=i&&AL(r,t.slice(7));o&&(o.trim&&(s=n.map(c=>Xt(c)?c.trim():c)),o.number&&(s=n.map(Hy)));let a,l=r[a=Hp(t)]||r[a=Hp(ar(t))];!l&&i&&(l=r[a=Hp(mo(t))]),l&&ys(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,ys(u,e,6,s)}}const DL=new WeakMap;function lT(e,t,n=!1){const r=n?DL:t.emitsCache,s=r.get(e);if(s!==void 0)return s;const i=e.emits;let o={},a=!1;if(!Ge(e)){const l=u=>{const c=lT(u,t,!0);c&&(a=!0,Cn(o,c))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!i&&!a?(Mt(e)&&r.set(e,null),null):(He(i)?i.forEach(l=>o[l]=null):Cn(o,i),Mt(e)&&r.set(e,o),o)}function jh(e,t){return!e||!Ph(t)?!1:(t=t.slice(2).replace(/Once$/,""),_t(e,t[0].toLowerCase()+t.slice(1))||_t(e,mo(t))||_t(e,t))}function B0(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:p,ctx:v,inheritAttrs:m}=e,y=If(e);let S,b;try{if(n.shapeFlag&4){const T=s||r,_=T;S=Us(u.call(_,T,c,d,p,f,v)),b=a}else{const T=t;S=Us(T.length>1?T(d,{attrs:a,slots:o,emit:l}):T(d,null)),b=t.props?a:ML(a)}}catch(T){Uu.length=0,Bh(T,e,1),S=h(Ln)}let k=S;if(b&&m!==!1){const T=Object.keys(b),{shapeFlag:_}=k;T.length&&_&7&&(i&&T.some(Uy)&&(b=LL(b,i)),k=xi(k,b,!1,!0))}return n.dirs&&(k=xi(k,null,!1,!0),k.dirs=k.dirs?k.dirs.concat(n.dirs):n.dirs),n.transition&&ua(k,n.transition),S=k,If(y),S}const ML=e=>{let t;for(const n in e)(n==="class"||n==="style"||Ph(n))&&((t||(t={}))[n]=e[n]);return t},LL=(e,t)=>{const n={};for(const r in e)(!Uy(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function FL(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?V0(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]&&!jh(u,f))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:r===o?!1:r?o?V0(r,o,u):!0:!!o;return!1}function V0(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]&&!jh(n,i))return!0}return!1}function NL({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 uT={},cT=()=>Object.create(uT),dT=e=>Object.getPrototypeOf(e)===uT;function $L(e,t,n,r=!1){const s={},i=cT();e.propsDefaults=Object.create(null),fT(e,t,s,i);for(const o in e.propsOptions[0])o in s||(s[o]=void 0);n?e.props=r?s:Fh(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function BL(e,t,n,r){const{props:s,attrs:i,vnode:{patchFlag:o}}=e,a=Fe(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(jh(e.emitsOptions,f))continue;const p=t[f];if(l)if(_t(i,f))p!==i[f]&&(i[f]=p,u=!0);else{const v=ar(f);s[v]=ov(l,a,v,p,e,!1)}else p!==i[f]&&(i[f]=p,u=!0)}}}else{fT(e,t,s,i)&&(u=!0);let c;for(const d in a)(!t||!_t(t,d)&&((c=mo(d))===d||!_t(t,c)))&&(l?n&&(n[d]!==void 0||n[c]!==void 0)&&(s[d]=ov(l,a,d,void 0,e,!0)):delete s[d]);if(i!==a)for(const d in i)(!t||!_t(t,d))&&(delete i[d],u=!0)}u&&fi(e.attrs,"set","")}function fT(e,t,n,r){const[s,i]=e.propsOptions;let o=!1,a;if(t)for(let l in t){if(Lu(l))continue;const u=t[l];let c;s&&_t(s,c=ar(l))?!i||!i.includes(c)?n[c]=u:(a||(a={}))[c]=u:jh(e.emitsOptions,l)||(!(l in r)||u!==r[l])&&(r[l]=u,o=!0)}if(i){const l=Fe(n),u=a||It;for(let c=0;c<i.length;c++){const d=i[c];n[d]=ov(s,l,d,u[d],e,!_t(u,d))}}return o}function ov(e,t,n,r,s,i){const o=e[n];if(o!=null){const a=_t(o,"default");if(a&&r===void 0){const l=o.default;if(o.type!==Function&&!o.skipFactory&&Ge(l)){const{propsDefaults:u}=s;if(n in u)r=u[n];else{const c=Nc(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===mo(n))&&(r=!0))}return r}const VL=new WeakMap;function hT(e,t,n=!1){const r=n?VL:t.propsCache,s=r.get(e);if(s)return s;const i=e.props,o={},a=[];let l=!1;if(!Ge(e)){const c=d=>{l=!0;const[f,p]=hT(d,t,!0);Cn(o,f),p&&a.push(...p)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!i&&!l)return Mt(e)&&r.set(e,nl),nl;if(He(i))for(let c=0;c<i.length;c++){const d=ar(i[c]);U0(d)&&(o[d]=It)}else if(i)for(const c in i){const d=ar(c);if(U0(d)){const f=i[c],p=o[d]=He(f)||Ge(f)?{type:f}:Cn({},f),v=p.type;let m=!1,y=!0;if(He(v))for(let S=0;S<v.length;++S){const b=v[S],k=Ge(b)&&b.name;if(k==="Boolean"){m=!0;break}else k==="String"&&(y=!1)}else m=Ge(v)&&v.name==="Boolean";p[0]=m,p[1]=y,(m||_t(p,"default"))&&a.push(d)}}const u=[o,a];return Mt(e)&&r.set(e,u),u}function U0(e){return e[0]!=="$"&&!Lu(e)}const nb=e=>e==="_"||e==="_ctx"||e==="$stable",rb=e=>He(e)?e.map(Us):[Us(e)],UL=(e,t,n)=>{if(t._n)return t;const r=g((...s)=>rb(t(...s)),n);return r._c=!1,r},pT=(e,t,n)=>{const r=e._ctx;for(const s in e){if(nb(s))continue;const i=e[s];if(Ge(i))t[s]=UL(s,i,r);else if(i!=null){const o=rb(i);t[s]=()=>o}}},mT=(e,t)=>{const n=rb(t);e.slots.default=()=>n},gT=(e,t,n)=>{for(const r in t)(n||!nb(r))&&(e[r]=t[r])},zL=(e,t,n)=>{const r=e.slots=cT();if(e.vnode.shapeFlag&32){const s=t._;s?(gT(r,t,n),n&&hC(r,"_",s,!0)):pT(t,r)}else t&&mT(e,t)},HL=(e,t,n)=>{const{vnode:r,slots:s}=e;let i=!0,o=It;if(r.shapeFlag&32){const a=t._;a?n&&a===1?i=!1:gT(s,t,n):(i=!t.$stable,pT(t,s)),o=t}else t&&(mT(e,t),o={default:1});if(i)for(const a in s)!nb(a)&&o[a]==null&&delete s[a]},nr=KL;function jL(e){return qL(e)}function qL(e,t){const n=Dh();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:p=Ws,insertStaticContent:v}=e,m=(D,V,X,ce=null,ve=null,he=null,Se=void 0,Ee=null,me=!!V.dynamicChildren)=>{if(D===V)return;D&&!$o(D,V)&&(ce=W(D),z(D,ve,he,!0),D=null),V.patchFlag===-2&&(me=!1,V.dynamicChildren=null);const{type:ye,ref:Ce,shapeFlag:xe}=V;switch(ye){case Fc:y(D,V,X,ce);break;case Ln:S(D,V,X,ce);break;case Qp:D==null&&b(V,X,ce,Se);break;case Ie:$(D,V,X,ce,ve,he,Se,Ee,me);break;default:xe&1?_(D,V,X,ce,ve,he,Se,Ee,me):xe&6?K(D,V,X,ce,ve,he,Se,Ee,me):(xe&64||xe&128)&&ye.process(D,V,X,ce,ve,he,Se,Ee,me,Y)}Ce!=null&&ve?Bu(Ce,D&&D.ref,he,V||D,!V):Ce==null&&D&&D.ref!=null&&Bu(D.ref,null,he,D,!0)},y=(D,V,X,ce)=>{if(D==null)r(V.el=a(V.children),X,ce);else{const ve=V.el=D.el;V.children!==D.children&&u(ve,V.children)}},S=(D,V,X,ce)=>{D==null?r(V.el=l(V.children||""),X,ce):V.el=D.el},b=(D,V,X,ce)=>{[D.el,D.anchor]=v(D.children,V,X,ce,D.el,D.anchor)},k=({el:D,anchor:V},X,ce)=>{let ve;for(;D&&D!==V;)ve=f(D),r(D,X,ce),D=ve;r(V,X,ce)},T=({el:D,anchor:V})=>{let X;for(;D&&D!==V;)X=f(D),s(D),D=X;s(V)},_=(D,V,X,ce,ve,he,Se,Ee,me)=>{if(V.type==="svg"?Se="svg":V.type==="math"&&(Se="mathml"),D==null)C(V,X,ce,ve,he,Se,Ee,me);else{const ye=D.el&&D.el._isVueCE?D.el:null;try{ye&&ye._beginPatch(),P(D,V,ve,he,Se,Ee,me)}finally{ye&&ye._endPatch()}}},C=(D,V,X,ce,ve,he,Se,Ee)=>{let me,ye;const{props:Ce,shapeFlag:xe,transition:Te,dirs:ze}=D;if(me=D.el=o(D.type,he,Ce&&Ce.is,Ce),xe&8?c(me,D.children):xe&16&&w(D.children,me,null,ce,ve,Xp(D,he),Se,Ee),ze&&xo(D,null,ce,"created"),R(me,D,D.scopeId,Se,ce),Ce){for(const Lt in Ce)Lt!=="value"&&!Lu(Lt)&&i(me,Lt,null,Ce[Lt],he,ce);"value"in Ce&&i(me,"value",null,Ce.value,he),(ye=Ce.onVnodeBeforeMount)&&Ds(ye,ce,D)}ze&&xo(D,null,ce,"beforeMount");const ft=WL(ve,Te);ft&&Te.beforeEnter(me),r(me,V,X),((ye=Ce&&Ce.onVnodeMounted)||ft||ze)&&nr(()=>{ye&&Ds(ye,ce,D),ft&&Te.enter(me),ze&&xo(D,null,ce,"mounted")},ve)},R=(D,V,X,ce,ve)=>{if(X&&p(D,X),ce)for(let he=0;he<ce.length;he++)p(D,ce[he]);if(ve){let he=ve.subTree;if(V===he||bT(he.type)&&(he.ssContent===V||he.ssFallback===V)){const Se=ve.vnode;R(D,Se,Se.scopeId,Se.slotScopeIds,ve.parent)}}},w=(D,V,X,ce,ve,he,Se,Ee,me=0)=>{for(let ye=me;ye<D.length;ye++){const Ce=D[ye]=Ee?Hi(D[ye]):Us(D[ye]);m(null,Ce,V,X,ce,ve,he,Se,Ee)}},P=(D,V,X,ce,ve,he,Se)=>{const Ee=V.el=D.el;let{patchFlag:me,dynamicChildren:ye,dirs:Ce}=V;me|=D.patchFlag&16;const xe=D.props||It,Te=V.props||It;let ze;if(X&&Eo(X,!1),(ze=Te.onVnodeBeforeUpdate)&&Ds(ze,X,V,D),Ce&&xo(V,D,X,"beforeUpdate"),X&&Eo(X,!0),(xe.innerHTML&&Te.innerHTML==null||xe.textContent&&Te.textContent==null)&&c(Ee,""),ye?I(D.dynamicChildren,ye,Ee,X,ce,Xp(V,ve),he):Se||B(D,V,Ee,null,X,ce,Xp(V,ve),he,!1),me>0){if(me&16)A(Ee,xe,Te,X,ve);else if(me&2&&xe.class!==Te.class&&i(Ee,"class",null,Te.class,ve),me&4&&i(Ee,"style",xe.style,Te.style,ve),me&8){const ft=V.dynamicProps;for(let Lt=0;Lt<ft.length;Lt++){const Et=ft[Lt],pr=xe[Et],mr=Te[Et];(mr!==pr||Et==="value")&&i(Ee,Et,pr,mr,ve,X)}}me&1&&D.children!==V.children&&c(Ee,V.children)}else!Se&&ye==null&&A(Ee,xe,Te,X,ve);((ze=Te.onVnodeUpdated)||Ce)&&nr(()=>{ze&&Ds(ze,X,V,D),Ce&&xo(V,D,X,"updated")},ce)},I=(D,V,X,ce,ve,he,Se)=>{for(let Ee=0;Ee<V.length;Ee++){const me=D[Ee],ye=V[Ee],Ce=me.el&&(me.type===Ie||!$o(me,ye)||me.shapeFlag&198)?d(me.el):X;m(me,ye,Ce,null,ce,ve,he,Se,!0)}},A=(D,V,X,ce,ve)=>{if(V!==X){if(V!==It)for(const he in V)!Lu(he)&&!(he in X)&&i(D,he,V[he],null,ve,ce);for(const he in X){if(Lu(he))continue;const Se=X[he],Ee=V[he];Se!==Ee&&he!=="value"&&i(D,he,Ee,Se,ve,ce)}"value"in X&&i(D,"value",V.value,X.value,ve)}},$=(D,V,X,ce,ve,he,Se,Ee,me)=>{const ye=V.el=D?D.el:a(""),Ce=V.anchor=D?D.anchor:a("");let{patchFlag:xe,dynamicChildren:Te,slotScopeIds:ze}=V;ze&&(Ee=Ee?Ee.concat(ze):ze),D==null?(r(ye,X,ce),r(Ce,X,ce),w(V.children||[],X,Ce,ve,he,Se,Ee,me)):xe>0&&xe&64&&Te&&D.dynamicChildren&&D.dynamicChildren.length===Te.length?(I(D.dynamicChildren,Te,X,ve,he,Se,Ee),(V.key!=null||ve&&V===ve.subTree)&&sb(D,V,!0)):B(D,V,X,Ce,ve,he,Se,Ee,me)},K=(D,V,X,ce,ve,he,Se,Ee,me)=>{V.slotScopeIds=Ee,D==null?V.shapeFlag&512?ve.ctx.activate(V,X,ce,Se,me):M(V,X,ce,ve,he,Se,me):L(D,V,me)},M=(D,V,X,ce,ve,he,Se)=>{const Ee=D.component=ZL(D,ce,ve);if(Vh(D)&&(Ee.ctx.renderer=Y),eF(Ee,!1,Se),Ee.asyncDep){if(ve&&ve.registerDep(Ee,j,Se),!D.el){const me=Ee.subTree=h(Ln);S(null,me,V,X),D.placeholder=me.el}}else j(Ee,D,V,X,ve,he,Se)},L=(D,V,X)=>{const ce=V.component=D.component;if(FL(D,V,X))if(ce.asyncDep&&!ce.asyncResolved){G(ce,V,X);return}else ce.next=V,ce.update();else V.el=D.el,ce.vnode=V},j=(D,V,X,ce,ve,he,Se)=>{const Ee=()=>{if(D.isMounted){let{next:xe,bu:Te,u:ze,parent:ft,vnode:Lt}=D;{const As=vT(D);if(As){xe&&(xe.el=Lt.el,G(D,xe,Se)),As.asyncDep.then(()=>{D.isUnmounted||Ee()});return}}let Et=xe,pr;Eo(D,!1),xe?(xe.el=Lt.el,G(D,xe,Se)):xe=Lt,Te&&Kd(Te),(pr=xe.props&&xe.props.onVnodeBeforeUpdate)&&Ds(pr,ft,xe,Lt),Eo(D,!0);const mr=B0(D),Is=D.subTree;D.subTree=mr,m(Is,mr,d(Is.el),W(Is),D,ve,he),xe.el=mr.el,Et===null&&NL(D,mr.el),ze&&nr(ze,ve),(pr=xe.props&&xe.props.onVnodeUpdated)&&nr(()=>Ds(pr,ft,xe,Lt),ve)}else{let xe;const{el:Te,props:ze}=V,{bm:ft,m:Lt,parent:Et,root:pr,type:mr}=D,Is=il(V);Eo(D,!1),ft&&Kd(ft),!Is&&(xe=ze&&ze.onVnodeBeforeMount)&&Ds(xe,Et,V),Eo(D,!0);{pr.ce&&pr.ce._def.shadowRoot!==!1&&pr.ce._injectChildStyle(mr);const As=D.subTree=B0(D);m(null,As,X,ce,D,ve,he),V.el=As.el}if(Lt&&nr(Lt,ve),!Is&&(xe=ze&&ze.onVnodeMounted)){const As=V;nr(()=>Ds(xe,Et,As),ve)}(V.shapeFlag&256||Et&&il(Et.vnode)&&Et.vnode.shapeFlag&256)&&D.a&&nr(D.a,ve),D.isMounted=!0,V=X=ce=null}};D.scope.on();const me=D.effect=new yC(Ee);D.scope.off();const ye=D.update=me.run.bind(me),Ce=D.job=me.runIfDirty.bind(me);Ce.i=D,Ce.id=D.uid,me.scheduler=()=>Yy(Ce),Eo(D,!0),ye()},G=(D,V,X)=>{V.component=D;const ce=D.vnode.props;D.vnode=V,D.next=null,BL(D,V.props,ce,X),HL(D,V.children,X),Si(),R0(D),wi()},B=(D,V,X,ce,ve,he,Se,Ee,me=!1)=>{const ye=D&&D.children,Ce=D?D.shapeFlag:0,xe=V.children,{patchFlag:Te,shapeFlag:ze}=V;if(Te>0){if(Te&128){N(ye,xe,X,ce,ve,he,Se,Ee,me);return}else if(Te&256){q(ye,xe,X,ce,ve,he,Se,Ee,me);return}}ze&8?(Ce&16&&be(ye,ve,he),xe!==ye&&c(X,xe)):Ce&16?ze&16?N(ye,xe,X,ce,ve,he,Se,Ee,me):be(ye,ve,he,!0):(Ce&8&&c(X,""),ze&16&&w(xe,X,ce,ve,he,Se,Ee,me))},q=(D,V,X,ce,ve,he,Se,Ee,me)=>{D=D||nl,V=V||nl;const ye=D.length,Ce=V.length,xe=Math.min(ye,Ce);let Te;for(Te=0;Te<xe;Te++){const ze=V[Te]=me?Hi(V[Te]):Us(V[Te]);m(D[Te],ze,X,null,ve,he,Se,Ee,me)}ye>Ce?be(D,ve,he,!0,!1,xe):w(V,X,ce,ve,he,Se,Ee,me,xe)},N=(D,V,X,ce,ve,he,Se,Ee,me)=>{let ye=0;const Ce=V.length;let xe=D.length-1,Te=Ce-1;for(;ye<=xe&&ye<=Te;){const ze=D[ye],ft=V[ye]=me?Hi(V[ye]):Us(V[ye]);if($o(ze,ft))m(ze,ft,X,null,ve,he,Se,Ee,me);else break;ye++}for(;ye<=xe&&ye<=Te;){const ze=D[xe],ft=V[Te]=me?Hi(V[Te]):Us(V[Te]);if($o(ze,ft))m(ze,ft,X,null,ve,he,Se,Ee,me);else break;xe--,Te--}if(ye>xe){if(ye<=Te){const ze=Te+1,ft=ze<Ce?V[ze].el:ce;for(;ye<=Te;)m(null,V[ye]=me?Hi(V[ye]):Us(V[ye]),X,ft,ve,he,Se,Ee,me),ye++}}else if(ye>Te)for(;ye<=xe;)z(D[ye],ve,he,!0),ye++;else{const ze=ye,ft=ye,Lt=new Map;for(ye=ft;ye<=Te;ye++){const Or=V[ye]=me?Hi(V[ye]):Us(V[ye]);Or.key!=null&&Lt.set(Or.key,ye)}let Et,pr=0;const mr=Te-ft+1;let Is=!1,As=0;const fu=new Array(mr);for(ye=0;ye<mr;ye++)fu[ye]=0;for(ye=ze;ye<=xe;ye++){const Or=D[ye];if(pr>=mr){z(Or,ve,he,!0);continue}let Os;if(Or.key!=null)Os=Lt.get(Or.key);else for(Et=ft;Et<=Te;Et++)if(fu[Et-ft]===0&&$o(Or,V[Et])){Os=Et;break}Os===void 0?z(Or,ve,he,!0):(fu[Os-ft]=ye+1,Os>=As?As=Os:Is=!0,m(Or,V[Os],X,null,ve,he,Se,Ee,me),pr++)}const _0=Is?GL(fu):nl;for(Et=_0.length-1,ye=mr-1;ye>=0;ye--){const Or=ft+ye,Os=V[Or],k0=V[Or+1],x0=Or+1<Ce?k0.el||yT(k0):ce;fu[ye]===0?m(null,Os,X,x0,ve,he,Se,Ee,me):Is&&(Et<0||ye!==_0[Et]?se(Os,X,x0,2):Et--)}}},se=(D,V,X,ce,ve=null)=>{const{el:he,type:Se,transition:Ee,children:me,shapeFlag:ye}=D;if(ye&6){se(D.component.subTree,V,X,ce);return}if(ye&128){D.suspense.move(V,X,ce);return}if(ye&64){Se.move(D,V,X,Y);return}if(Se===Ie){r(he,V,X);for(let xe=0;xe<me.length;xe++)se(me[xe],V,X,ce);r(D.anchor,V,X);return}if(Se===Qp){k(D,V,X);return}if(ce!==2&&ye&1&&Ee)if(ce===0)Ee.beforeEnter(he),r(he,V,X),nr(()=>Ee.enter(he),ve);else{const{leave:xe,delayLeave:Te,afterLeave:ze}=Ee,ft=()=>{D.ctx.isUnmounted?s(he):r(he,V,X)},Lt=()=>{he._isLeaving&&he[ci](!0),xe(he,()=>{ft(),ze&&ze()})};Te?Te(he,ft,Lt):Lt()}else r(he,V,X)},z=(D,V,X,ce=!1,ve=!1)=>{const{type:he,props:Se,ref:Ee,children:me,dynamicChildren:ye,shapeFlag:Ce,patchFlag:xe,dirs:Te,cacheIndex:ze}=D;if(xe===-2&&(ve=!1),Ee!=null&&(Si(),Bu(Ee,null,X,D,!0),wi()),ze!=null&&(V.renderCache[ze]=void 0),Ce&256){V.ctx.deactivate(D);return}const ft=Ce&1&&Te,Lt=!il(D);let Et;if(Lt&&(Et=Se&&Se.onVnodeBeforeUnmount)&&Ds(Et,V,D),Ce&6)J(D.component,X,ce);else{if(Ce&128){D.suspense.unmount(X,ce);return}ft&&xo(D,null,V,"beforeUnmount"),Ce&64?D.type.remove(D,V,X,Y,ce):ye&&!ye.hasOnce&&(he!==Ie||xe>0&&xe&64)?be(ye,V,X,!1,!0):(he===Ie&&xe&384||!ve&&Ce&16)&&be(me,V,X),ce&&U(D)}(Lt&&(Et=Se&&Se.onVnodeUnmounted)||ft)&&nr(()=>{Et&&Ds(Et,V,D),ft&&xo(D,null,V,"unmounted")},X)},U=D=>{const{type:V,el:X,anchor:ce,transition:ve}=D;if(V===Ie){le(X,ce);return}if(V===Qp){T(D);return}const he=()=>{s(X),ve&&!ve.persisted&&ve.afterLeave&&ve.afterLeave()};if(D.shapeFlag&1&&ve&&!ve.persisted){const{leave:Se,delayLeave:Ee}=ve,me=()=>Se(X,he);Ee?Ee(D.el,he,me):me()}else he()},le=(D,V)=>{let X;for(;D!==V;)X=f(D),s(D),D=X;s(V)},J=(D,V,X)=>{const{bum:ce,scope:ve,job:he,subTree:Se,um:Ee,m:me,a:ye}=D;z0(me),z0(ye),ce&&Kd(ce),ve.stop(),he&&(he.flags|=8,z(Se,D,V,X)),Ee&&nr(Ee,V),nr(()=>{D.isUnmounted=!0},V)},be=(D,V,X,ce=!1,ve=!1,he=0)=>{for(let Se=he;Se<D.length;Se++)z(D[Se],V,X,ce,ve)},W=D=>{if(D.shapeFlag&6)return W(D.component.subTree);if(D.shapeFlag&128)return D.suspense.next();const V=f(D.anchor||D.el),X=V&&V[jC];return X?f(X):V};let pe=!1;const ue=(D,V,X)=>{let ce;D==null?V._vnode&&(z(V._vnode,null,null,!0),ce=V._vnode.component):m(V._vnode||null,D,V,null,null,null,X),V._vnode=D,pe||(pe=!0,R0(ce),BC(),pe=!1)},Y={p:m,um:z,m:se,r:U,mt:M,mc:w,pc:B,pbc:I,n:W,o:e};return{render:ue,hydrate:void 0,createApp:IL(ue)}}function Xp({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 Eo({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function WL(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function sb(e,t,n=!1){const r=e.children,s=t.children;if(He(r)&&He(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]=Hi(s[i]),a.el=o.el),!n&&a.patchFlag!==-2&&sb(o,a)),a.type===Fc&&(a.patchFlag!==-1?a.el=o.el:a.__elIndex=i+(e.type===Ie?1:0)),a.type===Ln&&!a.el&&(a.el=o.el)}}function GL(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 vT(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:vT(t)}function z0(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function yT(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?yT(t.subTree):null}const bT=e=>e.__isSuspense;function KL(e,t){t&&t.pendingBranch?He(e)?t.effects.push(...e):t.effects.push(e):aL(e)}const Ie=Symbol.for("v-fgt"),Fc=Symbol.for("v-txt"),Ln=Symbol.for("v-cmt"),Qp=Symbol.for("v-stc"),Uu=[];let Lr=null;function F(e=!1){Uu.push(Lr=e?null:[])}function YL(){Uu.pop(),Lr=Uu[Uu.length-1]||null}let oc=1;function Df(e,t=!1){oc+=e,e<0&&Lr&&t&&(Lr.hasOnce=!0)}function ST(e){return e.dynamicChildren=oc>0?Lr||nl:null,YL(),oc>0&&Lr&&Lr.push(e),e}function ge(e,t,n,r,s,i){return ST(E(e,t,n,r,s,i,!0))}function ee(e,t,n,r,s){return ST(h(e,t,n,r,s,!0))}function fl(e){return e?e.__v_isVNode===!0:!1}function $o(e,t){return e.type===t.type&&e.key===t.key}const wT=({key:e})=>e??null,Xd=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Xt(e)||Ye(e)||Ge(e)?{i:Fn,r:e,k:t,f:!!n}:e:null);function E(e,t=null,n=null,r=0,s=null,i=e===Ie?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&wT(t),ref:t&&Xd(t),scopeId:UC,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:Fn};return a?(ib(l,n),i&128&&e.normalize(l)):n&&(l.shapeFlag|=Xt(n)?8:16),oc>0&&!o&&Lr&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&Lr.push(l),l}const h=XL;function XL(e,t=null,n=null,r=0,s=null,i=!1){if((!e||e===wL)&&(e=Ln),fl(e)){const a=xi(e,t,!0);return n&&ib(a,n),oc>0&&!i&&Lr&&(a.shapeFlag&6?Lr[Lr.indexOf(e)]=a:Lr.push(a)),a.patchFlag=-2,a}if(iF(e)&&(e=e.__vccOpts),t){t=Mf(t);let{class:a,style:l}=t;a&&!Xt(a)&&(t.class=Pe(a)),Mt(l)&&(Fl(l)&&!He(l)&&(l=Cn({},l)),t.style=De(l))}const o=Xt(e)?1:bT(e)?128:qC(e)?64:Mt(e)?4:Ge(e)?2:0;return E(e,t,n,r,s,o,i,!0)}function Mf(e){return e?Fl(e)||dT(e)?Cn({},e):e:null}function xi(e,t,n=!1,r=!1){const{props:s,ref:i,patchFlag:o,children:a,transition:l}=e,u=t?de(s||{},t):s,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&wT(u),ref:t&&t.ref?n&&i?He(i)?i.concat(Xd(t)):[i,Xd(t)]:Xd(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!==Ie?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&&xi(e.ssContent),ssFallback:e.ssFallback&&xi(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&ua(c,l.clone(c)),c}function x(e=" ",t=0){return h(Fc,null,e,t)}function fe(e="",t=!1){return t?(F(),ee(Ln,null,e)):h(Ln,null,e)}function Us(e){return e==null||typeof e=="boolean"?h(Ln):He(e)?h(Ie,null,e.slice()):fl(e)?Hi(e):h(Fc,null,String(e))}function Hi(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:xi(e)}function ib(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(He(t))n=16;else if(typeof t=="object")if(r&65){const s=t.default;s&&(s._c&&(s._d=!1),ib(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!dT(t)?t._ctx=Fn:s===3&&Fn&&(Fn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Ge(t)?(t={default:t,_ctx:Fn},n=32):(t=String(t),r&64?(n=16,t=[x(t)]):n=8);e.children=t,e.shapeFlag|=n}function de(...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=Pe([t.class,r.class]));else if(s==="style")t.style=De([t.style,r.style]);else if(Ph(s)){const i=t[s],o=r[s];o&&i!==o&&!(He(i)&&i.includes(o))&&(t[s]=i?[].concat(i,o):o)}else s!==""&&(t[s]=r[s])}return t}function Ds(e,t,n,r=null){ys(e,t,7,[n,r])}const QL=aT();let JL=0;function ZL(e,t,n){const r=e.type,s=(t?t.appContext:e.appContext)||QL,i={uid:JL++,vnode:e,type:r,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new vC(!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:hT(r,s),emitsOptions:lT(r,s),emit:null,emitted:null,propsDefaults:It,inheritAttrs:r.inheritAttrs,ctx:It,data:It,props:It,attrs:It,slots:It,refs:It,setupState:It,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=OL.bind(null,i),e.ce&&e.ce(i),i}let Kn=null;const $l=()=>Kn||Fn;let Lf,av;{const e=Dh(),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)}};Lf=t("__VUE_INSTANCE_SETTERS__",n=>Kn=n),av=t("__VUE_SSR_SETTERS__",n=>ac=n)}const Nc=e=>{const t=Kn;return Lf(e),e.scope.on(),()=>{e.scope.off(),Lf(t)}},H0=()=>{Kn&&Kn.scope.off(),Lf(null)};function _T(e){return e.vnode.shapeFlag&4}let ac=!1;function eF(e,t=!1,n=!1){t&&av(t);const{props:r,children:s}=e.vnode,i=_T(e);$L(e,r,i,t),zL(e,s,n||t);const o=i?tF(e,t):void 0;return t&&av(!1),o}function tF(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,kL);const{setup:r}=n;if(r){Si();const s=e.setupContext=r.length>1?rF(e):null,i=Nc(e),o=Lc(r,e,0,[e.props,s]),a=cC(o);if(wi(),i(),(a||e.sp)&&!il(e)&&ZC(e),a){if(o.then(H0,H0),t)return o.then(l=>{j0(e,l)}).catch(l=>{Bh(l,e,0)});e.asyncDep=o}else j0(e,o)}else kT(e)}function j0(e,t,n){Ge(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Mt(t)&&(e.setupState=LC(t)),kT(e)}function kT(e,t,n){const r=e.type;e.render||(e.render=r.render||Ws);{const s=Nc(e);Si();try{xL(e)}finally{wi(),s()}}}const nF={get(e,t){return Gn(e,"get",""),e[t]}};function rF(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,nF),slots:e.slots,emit:e.emit,expose:t}}function qh(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(LC($h(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Vu)return Vu[n](e)},has(t,n){return n in t||n in Vu}})):e.proxy}function sF(e,t=!0){return Ge(e)?e.displayName||e.name:e.name||t&&e.__name}function iF(e){return Ge(e)&&"__vccOpts"in e}const O=(e,t)=>nL(e,t,ac);function lr(e,t,n){try{Df(-1);const r=arguments.length;return r===2?Mt(t)&&!He(t)?fl(t)?h(e,null,[t]):h(e,t):h(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&fl(n)&&(n=[n]),h(e,t,n))}finally{Df(1)}}const xT="3.5.26";let lv;const q0=typeof window<"u"&&window.trustedTypes;if(q0)try{lv=q0.createPolicy("vue",{createHTML:e=>e})}catch{}const ET=lv?e=>lv.createHTML(e):e=>e,oF="http://www.w3.org/2000/svg",aF="http://www.w3.org/1998/Math/MathML",ui=typeof document<"u"?document:null,W0=ui&&ui.createElement("template"),lF={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"?ui.createElementNS(oF,e):t==="mathml"?ui.createElementNS(aF,e):n?ui.createElement(e,{is:n}):ui.createElement(e);return e==="select"&&r&&r.multiple!=null&&s.setAttribute("multiple",r.multiple),s},createText:e=>ui.createTextNode(e),createComment:e=>ui.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ui.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{W0.innerHTML=ET(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const a=W0.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]}},Fi="transition",pu="animation",hl=Symbol("_vtc"),CT={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},TT=Cn({},YC,CT),uF=e=>(e.displayName="Transition",e.props=TT,e),so=uF((e,{slots:t})=>lr(pL,RT(e),t)),Co=(e,t=[])=>{He(e)?e.forEach(n=>n(...t)):e&&e(...t)},G0=e=>e?He(e)?e.some(t=>t.length>1):e.length>1:!1;function RT(e){const t={};for(const $ in e)$ in CT||(t[$]=e[$]);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:p=`${n}-leave-to`}=e,v=cF(s),m=v&&v[0],y=v&&v[1],{onBeforeEnter:S,onEnter:b,onEnterCancelled:k,onLeave:T,onLeaveCancelled:_,onBeforeAppear:C=S,onAppear:R=b,onAppearCancelled:w=k}=t,P=($,K,M,L)=>{$._enterCancelled=L,Bi($,K?c:a),Bi($,K?u:o),M&&M()},I=($,K)=>{$._isLeaving=!1,Bi($,d),Bi($,p),Bi($,f),K&&K()},A=$=>(K,M)=>{const L=$?R:b,j=()=>P(K,$,M);Co(L,[K,j]),K0(()=>{Bi(K,$?l:i),Ns(K,$?c:a),G0(L)||Y0(K,r,m,j)})};return Cn(t,{onBeforeEnter($){Co(S,[$]),Ns($,i),Ns($,o)},onBeforeAppear($){Co(C,[$]),Ns($,l),Ns($,u)},onEnter:A(!1),onAppear:A(!0),onLeave($,K){$._isLeaving=!0;const M=()=>I($,K);Ns($,d),$._enterCancelled?(Ns($,f),uv($)):(uv($),Ns($,f)),K0(()=>{$._isLeaving&&(Bi($,d),Ns($,p),G0(T)||Y0($,r,y,M))}),Co(T,[$,M])},onEnterCancelled($){P($,!1,void 0,!0),Co(k,[$])},onAppearCancelled($){P($,!0,void 0,!0),Co(w,[$])},onLeaveCancelled($){I($),Co(_,[$])}})}function cF(e){if(e==null)return null;if(Mt(e))return[Jp(e.enter),Jp(e.leave)];{const t=Jp(e);return[t,t]}}function Jp(e){return E2(e)}function Ns(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[hl]||(e[hl]=new Set)).add(t)}function Bi(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[hl];n&&(n.delete(t),n.size||(e[hl]=void 0))}function K0(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let dF=0;function Y0(e,t,n,r){const s=e._endId=++dF,i=()=>{s===e._endId&&r()};if(n!=null)return setTimeout(i,n);const{type:o,timeout:a,propCount:l}=PT(e,t);if(!o)return r();const u=o+"end";let c=0;const d=()=>{e.removeEventListener(u,f),i()},f=p=>{p.target===e&&++c>=l&&d()};setTimeout(()=>{c<l&&d()},a+1),e.addEventListener(u,f)}function PT(e,t){const n=window.getComputedStyle(e),r=v=>(n[v]||"").split(", "),s=r(`${Fi}Delay`),i=r(`${Fi}Duration`),o=X0(s,i),a=r(`${pu}Delay`),l=r(`${pu}Duration`),u=X0(a,l);let c=null,d=0,f=0;t===Fi?o>0&&(c=Fi,d=o,f=i.length):t===pu?u>0&&(c=pu,d=u,f=l.length):(d=Math.max(o,u),c=d>0?o>u?Fi:pu:null,f=c?c===Fi?i.length:l.length:0);const p=c===Fi&&/\b(?:transform|all)(?:,|$)/.test(r(`${Fi}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:p}}function X0(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>Q0(n)+Q0(e[r])))}function Q0(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function uv(e){return(e?e.ownerDocument:document).body.offsetHeight}function fF(e,t,n){const r=e[hl];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Ff=Symbol("_vod"),IT=Symbol("_vsh"),Di={name:"show",beforeMount(e,{value:t},{transition:n}){e[Ff]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):mu(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),mu(e,!0),r.enter(e)):r.leave(e,()=>{mu(e,!1)}):mu(e,t))},beforeUnmount(e,{value:t}){mu(e,t)}};function mu(e,t){e.style.display=t?e[Ff]:"none",e[IT]=!t}const hF=Symbol(""),pF=/(?:^|;)\s*display\s*:/;function mF(e,t,n){const r=e.style,s=Xt(n);let i=!1;if(n&&!s){if(t)if(Xt(t))for(const o of t.split(";")){const a=o.slice(0,o.indexOf(":")).trim();n[a]==null&&Qd(r,a,"")}else for(const o in t)n[o]==null&&Qd(r,o,"");for(const o in n)o==="display"&&(i=!0),Qd(r,o,n[o])}else if(s){if(t!==n){const o=r[hF];o&&(n+=";"+o),r.cssText=n,i=pF.test(n)}}else t&&e.removeAttribute("style");Ff in e&&(e[Ff]=i?r.display:"",e[IT]&&(r.display="none"))}const J0=/\s*!important$/;function Qd(e,t,n){if(He(n))n.forEach(r=>Qd(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=gF(e,t);J0.test(n)?e.setProperty(mo(r),n.replace(J0,""),"important"):e[r]=n}}const Z0=["Webkit","Moz","ms"],Zp={};function gF(e,t){const n=Zp[t];if(n)return n;let r=ar(t);if(r!=="filter"&&r in e)return Zp[t]=r;r=Xs(r);for(let s=0;s<Z0.length;s++){const i=Z0[s]+r;if(i in e)return Zp[t]=i}return t}const ew="http://www.w3.org/1999/xlink";function tw(e,t,n,r,s,i=A2(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(ew,t.slice(6,t.length)):e.setAttributeNS(ew,t,n):n==null||i&&!pC(n)?e.removeAttribute(t):e.setAttribute(t,i?"":Ai(n)?String(n):n)}function nw(e,t,n,r,s){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?ET(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=pC(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 ja(e,t,n,r){e.addEventListener(t,n,r)}function vF(e,t,n,r){e.removeEventListener(t,n,r)}const rw=Symbol("_vei");function yF(e,t,n,r,s=null){const i=e[rw]||(e[rw]={}),o=i[t];if(r&&o)o.value=r;else{const[a,l]=bF(t);if(r){const u=i[t]=_F(r,s);ja(e,a,u,l)}else o&&(vF(e,a,o,l),i[t]=void 0)}}const sw=/(?:Once|Passive|Capture)$/;function bF(e){let t;if(sw.test(e)){t={};let r;for(;r=e.match(sw);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):mo(e.slice(2)),t]}let em=0;const SF=Promise.resolve(),wF=()=>em||(SF.then(()=>em=0),em=Date.now());function _F(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;ys(kF(r,n.value),t,5,[r])};return n.value=e,n.attached=wF(),n}function kF(e,t){if(He(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 iw=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,xF=(e,t,n,r,s,i)=>{const o=s==="svg";t==="class"?fF(e,r,o):t==="style"?mF(e,n,r):Ph(t)?Uy(t)||yF(e,t,n,r,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):EF(e,t,r,o))?(nw(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&tw(e,t,r,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Xt(r))?nw(e,ar(t),r,i,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),tw(e,t,r,o))};function EF(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&iw(t)&&Ge(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return iw(t)&&Xt(n)?!1:t in e}const AT=new WeakMap,OT=new WeakMap,Nf=Symbol("_moveCb"),ow=Symbol("_enterCb"),CF=e=>(delete e.props.mode,e),TF=CF({name:"TransitionGroup",props:Cn({},TT,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=$l(),r=KC();let s,i;return Zy(()=>{if(!s.length)return;const o=e.moveClass||`${e.name||"v"}-move`;if(!AF(s[0].el,n.vnode.el,o)){s=[];return}s.forEach(RF),s.forEach(PF);const a=s.filter(IF);uv(n.vnode.el),a.forEach(l=>{const u=l.el,c=u.style;Ns(u,o),c.transform=c.webkitTransform=c.transitionDuration="";const d=u[Nf]=f=>{f&&f.target!==u||(!f||f.propertyName.endsWith("transform"))&&(u.removeEventListener("transitionend",d),u[Nf]=null,Bi(u,o))};u.addEventListener("transitionend",d)}),s=[]}),()=>{const o=Fe(e),a=RT(o);let l=o.tag||Ie;if(s=[],i)for(let u=0;u<i.length;u++){const c=i[u];c.el&&c.el instanceof Element&&(s.push(c),ua(c,sc(c,a,r,n)),AT.set(c,{left:c.el.offsetLeft,top:c.el.offsetTop}))}i=t.default?Qy(t.default()):[];for(let u=0;u<i.length;u++){const c=i[u];c.key!=null&&ua(c,sc(c,a,r,n))}return h(l,null,i)}}}),ob=TF;function RF(e){const t=e.el;t[Nf]&&t[Nf](),t[ow]&&t[ow]()}function PF(e){OT.set(e,{left:e.el.offsetLeft,top:e.el.offsetTop})}function IF(e){const t=AT.get(e),n=OT.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 AF(e,t,n){const r=e.cloneNode(),s=e[hl];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}=PT(r);return i.removeChild(r),o}const aw=e=>{const t=e.props["onUpdate:modelValue"]||!1;return He(t)?n=>Kd(t,n):t};function OF(e){e.target.composing=!0}function lw(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const tm=Symbol("_assign");function uw(e,t,n){return t&&(e=e.trim()),n&&(e=Hy(e)),e}const DF={created(e,{modifiers:{lazy:t,trim:n,number:r}},s){e[tm]=aw(s);const i=r||s.props&&s.props.type==="number";ja(e,t?"change":"input",o=>{o.target.composing||e[tm](uw(e.value,n,i))}),(n||i)&&ja(e,"change",()=>{e.value=uw(e.value,n,i)}),t||(ja(e,"compositionstart",OF),ja(e,"compositionend",lw),ja(e,"change",lw))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:s,number:i}},o){if(e[tm]=aw(o),e.composing)return;const a=(i||e.type==="number")&&!/^0\d/.test(e.value)?Hy(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))}},MF=["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)=>MF.some(n=>e[`${n}Key`]&&!t.includes(n))},yt=(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)}))},FF={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},cv=(e,t)=>{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=(s=>{if(!("key"in s))return;const i=mo(s.key);if(t.some(o=>o===i||FF[o]===i))return e(s)}))},NF=Cn({patchProp:xF},lF);let cw;function DT(){return cw||(cw=jL(NF))}const MT=((...e)=>{DT().render(...e)}),$F=((...e)=>{const t=DT().createApp(...e),{mount:n}=t;return t.mount=r=>{const s=VF(r);if(!s)return;const i=t._component;!Ge(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const o=n(s,!1,BF(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},t});function BF(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function VF(e){return Xt(e)?document.querySelector(e):e}let LT;const Wh=e=>LT=e,FT=Symbol();function dv(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var zu;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(zu||(zu={}));function UF(){const e=la(!0),t=e.run(()=>H({}));let n=[],r=[];const s=$h({install(i){Wh(s),s._a=i,i.provide(FT,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 NT=()=>{};function dw(e,t,n,r=NT){e.add(t);const s=()=>{e.delete(t)&&r()};return!n&&Mc()&&Qt(s),s}function Oa(e,...t){e.forEach(n=>{n(...t)})}const zF=e=>e(),fw=Symbol(),nm=Symbol();function fv(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];dv(s)&&dv(r)&&e.hasOwnProperty(n)&&!Ye(r)&&!pi(r)?e[n]=fv(s,r):e[n]=r}return e}const HF=Symbol();function jF(e){return!dv(e)||!Object.prototype.hasOwnProperty.call(e,HF)}const{assign:Vi}=Object;function qF(e){return!!(Ye(e)&&e.effect)}function WF(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=_a(n.state.value[e]);return Vi(c,i,Object.keys(o||{}).reduce((d,f)=>(d[f]=$h(O(()=>{Wh(n);const p=n._s.get(e);return o[f].call(p,p)})),d),{}))}return l=$T(e,u,t,n,r,!0),l}function $T(e,t,n={},r,s,i){let o;const a=Vi({actions:{}},n),l={deep:!0};let u,c,d=new Set,f=new Set,p;const v=r.state.value[e];!i&&!v&&(r.state.value[e]={}),H({});let m;function y(w){let P;u=c=!1,typeof w=="function"?(w(r.state.value[e]),P={type:zu.patchFunction,storeId:e,events:p}):(fv(r.state.value[e],w),P={type:zu.patchObject,payload:w,storeId:e,events:p});const I=m=Symbol();ot().then(()=>{m===I&&(u=!0)}),c=!0,Oa(d,P,r.state.value[e])}const S=i?function(){const{state:P}=n,I=P?P():{};this.$patch(A=>{Vi(A,I)})}:NT;function b(){o.stop(),d.clear(),f.clear(),r._s.delete(e)}const k=(w,P="")=>{if(fw in w)return w[nm]=P,w;const I=function(){Wh(r);const A=Array.from(arguments),$=new Set,K=new Set;function M(G){$.add(G)}function L(G){K.add(G)}Oa(f,{args:A,name:I[nm],store:_,after:M,onError:L});let j;try{j=w.apply(this&&this.$id===e?this:_,A)}catch(G){throw Oa(K,G),G}return j instanceof Promise?j.then(G=>(Oa($,G),G)).catch(G=>(Oa(K,G),Promise.reject(G))):(Oa($,j),j)};return I[fw]=!0,I[nm]=P,I},T={_p:r,$id:e,$onAction:dw.bind(null,f),$patch:y,$reset:S,$subscribe(w,P={}){const I=dw(d,w,P.detached,()=>A()),A=o.run(()=>we(()=>r.state.value[e],$=>{(P.flush==="sync"?c:u)&&w({storeId:e,type:zu.direct,events:p},$)},Vi({},l,P)));return I},$dispose:b},_=on(T);r._s.set(e,_);const R=(r._a&&r._a.runWithContext||zF)(()=>r._e.run(()=>(o=la()).run(()=>t({action:k}))));for(const w in R){const P=R[w];if(Ye(P)&&!qF(P)||pi(P))i||(v&&jF(P)&&(Ye(P)?P.value=v[w]:fv(P,v[w])),r.state.value[e][w]=P);else if(typeof P=="function"){const I=k(P,w);R[w]=I,a.actions[w]=P}}return Vi(_,R),Vi(Fe(_),R),Object.defineProperty(_,"$state",{get:()=>r.state.value[e],set:w=>{y(P=>{Vi(P,w)})}}),r._p.forEach(w=>{Vi(_,o.run(()=>w({store:_,app:r._a,pinia:r,options:a})))}),v&&i&&n.hydrate&&n.hydrate(_.$state,v),u=!0,c=!0,_}function is(e,t,n){let r;const s=typeof t=="function";r=s?n:t;function i(o,a){const l=zC();return o=o||(l?je(FT,null):null),o&&Wh(o),o=LT,o._s.has(e)||(s?$T(e,t,r,o):WF(e,r,o)),o._s.get(e)}return i.$id=e,i}const BT=is("Dialog",{state:()=>({ids:[],dialogsById:{}}),getters:{dialogs(){return this.ids.map(e=>this.dialogsById[e])},getBeforeOpenedCallback(){return e=>this.dialogsById[e]?.beforeOpenedCallback},getOpenedCallback(){return e=>this.dialogsById[e]?.openedCallback},getContext(){return e=>this.dialogsById[e]?.context},getOutput(){return e=>this.dialogsById[e]?.output},isDialogOpened(){return e=>this.dialogsById[e]?.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?.beforeOpenedCallback,openedCallback:t?.openedCallback};return this.dialogsById[e]=r,this.ids.push(e),r}}});function hw(e,t){return Mc()?(Qt(e,t),!0):!1}const hv=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const GF=Object.prototype.toString,KF=e=>GF.call(e)==="[object Object]";function rm(e){return Array.isArray(e)?e:[e]}function YF(e,t=1e3,n={}){const{immediate:r=!0,immediateCallback:s=!1}=n;let i=null;const o=ke(!1);function a(){i&&(clearInterval(i),i=null)}function l(){o.value=!1,a()}function u(){const c=Ut(t);c<=0||(o.value=!0,s&&e(),a(),o.value&&(i=setInterval(e,c)))}return r&&hv&&u(),(Ye(t)||typeof t=="function")&&hw(we(t,()=>{o.value&&hv&&u()})),hw(l),{isActive:Ky(o),pause:l,resume:u}}function XF(e,t,n){return we(e,t,{...n,immediate:!0})}const VT=hv?window:void 0;function QF(e){var t;const n=Ut(e);return(t=n?.$el)!==null&&t!==void 0?t:n}function JF(...e){const t=(r,s,i,o)=>(r.addEventListener(s,i,o),()=>r.removeEventListener(s,i,o)),n=O(()=>{const r=rm(Ut(e[0])).filter(s=>s!=null);return r.every(s=>typeof s!="string")?r:void 0});return XF(()=>{var r,s;return[(r=(s=n.value)===null||s===void 0?void 0:s.map(i=>QF(i)))!==null&&r!==void 0?r:[VT].filter(i=>i!=null),rm(Ut(n.value?e[1]:e[0])),rm(Q(n.value?e[2]:e[1])),Ut(n.value?e[3]:e[2])]},([r,s,i,o],a,l)=>{if(!r?.length||!s?.length||!i?.length)return;const u=KF(o)?{...o}:o,c=r.flatMap(d=>s.flatMap(f=>i.map(p=>t(d,f,p,u))));l(()=>{c.forEach(d=>d())})},{flush:"post"})}function ZF(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function eN(...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=VT,eventName:i="keydown",passive:o=!1,dedupe:a=!1}=r,l=ZF(t);return JF(s,i,c=>{c.repeat&&Ut(a)||l(c)&&n(c)},o)}const gu=new Map;function Rn(e){const t=Mc();function n(a){var l;const u=gu.get(e)||new Set;u.add(a),gu.set(e,u);const c=()=>s(a);return t==null||(l=t.cleanups)===null||l===void 0||l.push(c),c}function r(a){function l(...u){s(l),a(...u)}return n(l)}function s(a){const l=gu.get(e);l&&(l.delete(a),l.size||i())}function i(){gu.delete(e)}function o(a,l){var u;(u=gu.get(e))===null||u===void 0||u.forEach(c=>c(a,l))}return{on:n,once:r,off:s,emit:o,reset:i}}function Kt(e){const t=BT();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=>{vn(()=>{t.isDialogOpened(e)||s(t.getOutput(e))})}))}}function UT(e,t){t=Array.isArray(t)?t.slice(0,-1).map(n=>`'${n}'`).join(", ")+` or '${t.at(-1)}'`:`'${t}'`}const kt=typeof window<"u",ab=kt&&"IntersectionObserver"in window,tN=kt&&("ontouchstart"in window||window.navigator.maxTouchPoints>0),lb=kt&&"matchMedia"in window&&typeof window.matchMedia=="function",ca=()=>lb&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;function pw(e,t,n){nN(e,t),t.set(e,n)}function nN(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function mw(e,t,n){return e.set(zT(e,t),n),n}function ti(e,t){return e.get(zT(e,t))}function zT(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 HT(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 da(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(/^\./,""),HT(e,t.split("."),n))}function kn(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 da(e,t,n);if(Array.isArray(t))return HT(e,t,n);if(typeof t!="function")return n;const r=t(e,n);return typeof r>"u"?n:r}function Ka(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Array.from({length:e},(n,r)=>t+r)}function Oe(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 pl(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function gw(e){let t;return e!==null&&typeof e=="object"&&((t=Object.getPrototypeOf(e))===Object.prototype||t===null)}function ub(e){if(e&&"$el"in e){const t=e.$el;return t?.nodeType===Node.TEXT_NODE?t.nextElementSibling:t}return e}const vw=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 jT(e){return Object.keys(e)}function sm(e,t){return t.every(n=>e.hasOwnProperty(n))}function io(e,t){const n={};for(const r of t)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function pv(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)?r[i]=e[i]:s[i]=e[i];return[r,s]}function bn(e,t){const n={...e};return t.forEach(r=>delete n[r]),n}const qT=/^on[^a-z]/,cb=e=>qT.test(e),rN=["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 ka(e){const[t,n]=pv(e,[qT]),r=bn(t,rN),[s,i]=pv(n,["class","style","id","inert",/^data-/]);return Object.assign(s,t),Object.assign(i,r),[s,i]}function En(e){return e==null?[]:Array.isArray(e)?e:[e]}function sN(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),Q(t))};return r.clear=()=>{clearTimeout(n)},r.immediate=e,r}function In(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 yw(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 bw(e,t){return(arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0").repeat(Math.max(0,t-e.length))+e}function iN(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 Sw(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 Xn(){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(gw(i)&&gw(o)){r[s]=Xn(i,o,n);continue}if(n&&Array.isArray(i)&&Array.isArray(o)){r[s]=n(i,o);continue}r[s]=o}return r}function WT(e){return e.map(t=>t.type===Ie?WT(t.children):t).flat()}function Xo(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(Xo.cache.has(e))return Xo.cache.get(e);const t=e.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return Xo.cache.set(e,t),t}Xo.cache=new Map;function Ya(e,t){if(!t||typeof t!="object")return[];if(Array.isArray(t))return t.map(n=>Ya(e,n)).flat(1);if(t.suspense)return Ya(e,t.ssContent);if(Array.isArray(t.children))return t.children.map(n=>Ya(e,n)).flat(1);if(t.component){if(Object.getOwnPropertyDescriptor(t.component.provides,e))return[t.component];if(t.component.subTree)return Ya(e,t.component.subTree).flat(1)}return[]}var Da=new WeakMap,To=new WeakMap;class GT{constructor(t){pw(this,Da,[]),pw(this,To,0),this.size=t}get isFull(){return ti(Da,this).length===this.size}push(t){ti(Da,this)[ti(To,this)]=t,mw(To,this,(ti(To,this)+1)%this.size)}values(){return ti(Da,this).slice(ti(To,this)).concat(ti(Da,this).slice(0,ti(To,this)))}clear(){ti(Da,this).length=0,mw(To,this,0)}}function db(e){const t=on({});vn(()=>{const r=e();for(const s in r)t[s]=r[s]},{flush:"sync"});const n={};for(const r in t)n[r]=ne(()=>t[r]);return n}function $f(e,t){return e.includes(t)}function KT(e){return e[2].toLowerCase()+e.slice(3)}const Nn=()=>[Function,Array];function ww(e,t){return t="on"+Xs(t),!!(e[t]||e[`${t}Once`]||e[`${t}Capture`]||e[`${t}OnceCapture`]||e[`${t}CaptureOnce`])}function $c(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 Qo(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const n=["button","[href]",'input:not([type="hidden"])',"select","textarea","details:not(:has(> summary))","details > summary","[tabindex]",'[contenteditable]:not([contenteditable="false"])',"audio[controls]","video[controls]"].map(s=>`${s}${t?':not([tabindex="-1"])':""}:not([disabled], [inert])`).join(", ");let r;try{r=[...e.querySelectorAll(n)]}catch{return[]}return r.filter(s=>!s.closest("[inert]")).filter(s=>!!s.offsetParent||s.getClientRects().length>0).filter(s=>!s.parentElement?.closest("details:not([open])")||s.tagName==="SUMMARY"&&s.parentElement?.tagName==="DETAILS")}function YT(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?.(r)??!0))&&s<e.length&&s>=0);return r}function Hu(e,t){const n=Qo(e);if(t==null)(e===document.activeElement||!e.contains(document.activeElement))&&n[0]?.focus();else if(t==="first")n[0]?.focus();else if(t==="last")n.at(-1)?.focus();else if(typeof t=="number")n[t]?.focus();else{const r=YT(n,t);r?r.focus():Hu(e,t==="next"?"first":"last")}}function md(e){return e==null||typeof e=="string"&&e.trim()===""}function Bf(e,t){if(!(kt&&typeof CSS<"u"&&typeof CSS.supports<"u"&&CSS.supports(`selector(${t})`)))return null;try{return!!e&&e.matches(t)}catch{return null}}function XT(e){return e.some(t=>fl(t)?t.type===Ln?!1:t.type!==Ie||XT(t.children):!0)?e:null}function oN(e,t){if(!kt||e===0)return t(),()=>{};const n=window.setTimeout(t,e);return()=>window.clearTimeout(n)}function aN(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 mv(){const e=ke(),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:()=>ub(e.value)}),t}function _w(e){const t=e.key.length===1,n=!e.ctrlKey&&!e.metaKey&&!e.altKey;return t&&n}function oo(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="bigint"}function lN(e){const t={};for(const n in e)t[ar(n)]=e[n];return t}function uN(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 QT=["top","bottom"],cN=["start","end","left","right"];function gv(e,t){let[n,r]=e.split(" ");return r||(r=$f(QT,n)?"start":$f(cN,n)?"top":"center"),{side:vv(n,t),align:vv(r,t)}}function vv(e,t){return e==="start"?t?"right":"left":e==="end"?t?"left":"right":e}function im(e){return{side:{center:"center",top:"bottom",bottom:"top",left:"right",right:"left"}[e.side],align:e.align}}function om(e){return{side:e.side,align:{center:"center",top:"bottom",bottom:"top",left:"right",right:"left"}[e.align]}}function kw(e){return{side:e.align,align:e.side}}function xw(e){return $f(QT,e.side)?"y":"x"}class Yr{constructor(t){const n=document.body.currentCSSZoom??1,r=t instanceof Element,s=r?1+(1-n)/n:1,{x:i,y:o,width:a,height:l}=r?t.getBoundingClientRect():t;this.x=i*s,this.y=o*s,this.width=a*s,this.height=l*s}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 Ew(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 JT(e){if(Array.isArray(e)){const t=document.body.currentCSSZoom??1,n=1+(1-t)/t;return new Yr({x:e[0]*n,y:e[1]*n,width:0*n,height:0*n})}else return new Yr(e)}function dN(e){if(e===document.documentElement)if(visualViewport){const t=document.body.currentCSSZoom??1;return new Yr({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 Yr({x:0,y:0,width:document.documentElement.clientWidth,height:document.documentElement.clientHeight});else return new Yr(e)}function fb(e){const t=new Yr(e),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 Yr(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,p=o?t.height/o:e.offsetHeight+1;return new Yr({x:c,y:d,width:f,height:p})}else return new Yr(t)}function ji(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 Jd=new WeakMap;function fN(e,t){Object.keys(t).forEach(n=>{if(cb(n)){const r=KT(n),s=Jd.get(e);if(t[n]==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]]),Jd.has(e)||Jd.set(e,i)}}else t[n]==null?e.removeAttribute(n):e.setAttribute(n,t[n])})}function hN(e,t){Object.keys(t).forEach(n=>{if(cb(n)){const r=KT(n),s=Jd.get(e);s?.forEach(i=>{const[o,a]=i;o===r&&(e.removeEventListener(r,a),s.delete(i))})}else e.removeAttribute(n)})}const Ma=2.4,Cw=.2126729,Tw=.7151522,Rw=.072175,pN=.55,mN=.58,gN=.57,vN=.62,gd=.03,Pw=1.45,yN=5e-4,bN=1.25,SN=1.25,Iw=.078,Aw=12.82051282051282,vd=.06,Ow=.001;function Dw(e,t){const n=(e.r/255)**Ma,r=(e.g/255)**Ma,s=(e.b/255)**Ma,i=(t.r/255)**Ma,o=(t.g/255)**Ma,a=(t.b/255)**Ma;let l=n*Cw+r*Tw+s*Rw,u=i*Cw+o*Tw+a*Rw;if(l<=gd&&(l+=(gd-l)**Pw),u<=gd&&(u+=(gd-u)**Pw),Math.abs(u-l)<yN)return 0;let c;if(u>l){const d=(u**pN-l**mN)*bN;c=d<Ow?0:d<Iw?d-d*Aw*vd:d-vd}else{const d=(u**vN-l**gN)*SN;c=d>-Ow?0:d>-Iw?d-d*Aw*vd:d+vd}return c*100}const Vf=.20689655172413793,wN=e=>e>Vf**3?Math.cbrt(e):e/(3*Vf**2)+4/29,_N=e=>e>Vf?e**3:3*Vf**2*(e-4/29);function ZT(e){const t=wN,n=t(e[1]);return[116*n-16,500*(t(e[0]/.95047)-n),200*(n-t(e[2]/1.08883))]}function eR(e){const t=_N,n=(e[0]+16)/116;return[t(n+e[1]/500)*.95047,t(n),t(n-e[2]/200)*1.08883]}const kN=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]],xN=e=>e<=.0031308?e*12.92:1.055*e**(1/2.4)-.055,EN=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],CN=e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4;function tR(e){const t=Array(3),n=xN,r=kN;for(let s=0;s<3;++s)t[s]=Math.round(In(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 hb(e){let{r:t,g:n,b:r}=e;const s=[0,0,0],i=CN,o=EN;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 yv(e){return!!e&&/^(#|var\(--|(rgb|hsl)a?\()/.test(e)}function TN(e){return yv(e)&&!/^((rgb|hsl)a?\()?var\(--/.test(e)}const Mw=/^(?<fn>(?:rgb|hsl)a?)\((?<values>.+)\)/,RN={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)=>Lw({h:e,s:t,l:n,a:r}),hsla:(e,t,n,r)=>Lw({h:e,s:t,l:n,a:r}),hsv:(e,t,n,r)=>lc({h:e,s:t,v:n,a:r}),hsva:(e,t,n,r)=>lc({h:e,s:t,v:n,a:r})};function Hs(e){if(typeof e=="number")return{r:(e&16711680)>>16,g:(e&65280)>>8,b:e&255};if(typeof e=="string"&&Mw.test(e)){const{groups:t}=e.match(Mw),{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 RN[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),IN(t)}else if(typeof e=="object"){if(sm(e,["r","g","b"]))return e;if(sm(e,["h","s","l"]))return lc(nR(e));if(sm(e,["h","s","v"]))return lc(e)}throw new TypeError(`Invalid color: ${e==null?e:String(e)||e.constructor.name}
2
+ Expected #hex, #hexa, rgb(), rgba(), hsl(), hsla(), object or number`)}function lc(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 Lw(e){return lc(nR(e))}function nR(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 yd(e){const t=Math.round(e).toString(16);return("00".substr(0,2-t.length)+t).toUpperCase()}function PN(e){let{r:t,g:n,b:r,a:s}=e;return`#${[yd(t),yd(n),yd(r),s!==void 0?yd(Math.round(s*255)):""].join("")}`}function IN(e){e=AN(e);let[t,n,r,s]=iN(e,2).map(i=>parseInt(i,16));return s=s===void 0?s:s/255,{r:t,g:n,b:r,a:s}}function AN(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=yw(yw(e,6),8,"F")),e}function ON(e,t){const n=ZT(hb(e));return n[0]=n[0]+t*10,tR(eR(n))}function DN(e,t){const n=ZT(hb(e));return n[0]=n[0]-t*10,tR(eR(n))}function MN(e){const t=Hs(e);return hb(t)[1]}function rR(e){const t=Math.abs(Dw(Hs(0),Hs(e)));return Math.abs(Dw(Hs(16777215),Hs(e)))>Math.min(t,50)?"#fff":"#000"}function oe(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 Ue=oe({class:[String,Array,Object],style:{type:[String,Array,Object],default:null}},"component");function nn(e,t){const n=$l();if(!n)throw new Error(`[Vuetify] ${e} must be called from inside a setup function`);return n}function Qs(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"composables";const t=nn(e).type;return Xo(t?.aliasName||t?.name)}function LN(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:nn("injectSelf");const{provides:n}=t;if(n&&e in n)return n[e]}const ml=Symbol.for("vuetify:defaults");function FN(e){return H(e)}function pb(){const e=je(ml);if(!e)throw new Error("[Vuetify] Could not find defaults instance");return e}function Tr(e,t){const n=pb(),r=H(e),s=O(()=>{if(Q(t?.disabled))return n.value;const o=Q(t?.scoped),a=Q(t?.reset),l=Q(t?.root);if(r.value==null&&!(o||a||l))return n.value;let u=Xn(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=Xn(Xn(u,{prev:u}),u[l])),u}return u.prev?Xn(u.prev,u):u});return zt(ml,s),s}function NN(e,t){return e.props&&(typeof e.props[t]<"u"||typeof e.props[Xo(t)]<"u")}function $N(){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]:pb();const r=nn("useDefaults");if(t=t??r.type.name??r.type.__name,!t)throw new Error("[Vuetify] Could not determine component name");const s=O(()=>n.value?.[e._as??t]),i=new Proxy(e,{get(l,u){const c=Reflect.get(l,u);if(u==="class"||u==="style")return[s.value?.[u],c].filter(p=>p!=null);if(NN(r.vnode,u))return c;const d=s.value?.[u];if(d!==void 0)return d;const f=n.value?.global?.[u];return f!==void 0?f:c}}),o=ke();vn(()=>{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(ml,r);zt(ml,O(()=>o.value?Xn(l?.value??{},o.value):l?.value))}return{props:i,provideSubDefaults:a}}function Bl(e){if(e._setup=e._setup??e.setup,!e.name)return e;if(e._setup){e.props=oe(e.props??{},e.name)();const t=Object.keys(e.props).filter(n=>n!=="class"&&n!=="style");e.filterProps=function(r){return io(r,t)},e.props._as=String,e.setup=function(r,s){const i=pb();if(!i.value)return e._setup(r,s);const{props:o,provideSubDefaults:a}=$N(r,r._as??e.name,i),l=e._setup(o,s);return a(),l}}return e}function _e(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return t=>(e?Bl:Me)(t)}function BN(e,t){return t.props=e,t}function Vl(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"div",n=arguments.length>2?arguments[2]:void 0;return _e()({name:n??Xs(ar(e.replace(/__/g,"-"))),props:{tag:{type:String,default:t},...Ue()},setup(r,s){let{slots:i}=s;return()=>lr(r.tag,{class:[e,r.class],style:r.style},i.default?.())}})}function VN(e,t,n,r){if(!n||oo(e)||oo(t))return;const s=n.get(e);if(s)s.set(t,r);else{const i=new WeakMap;i.set(t,r),n.set(e,i)}}function UN(e,t,n){if(!n||oo(e)||oo(t))return null;const r=n.get(e)?.get(t);if(typeof r=="boolean")return r;const s=n.get(t)?.get(e);return typeof s=="boolean"?s:null}function _r(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new WeakMap;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 r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;const s=UN(e,t,n);return s||(VN(e,t,n,!0),r.every(i=>_r(e[i],t[i],n)))}function sR(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 Uf="cubic-bezier(0.4, 0, 0.2, 1)",Fw="cubic-bezier(0.0, 0, 0.2, 1)",Nw="cubic-bezier(0.4, 0, 1, 1)",zN={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 $w(e,t,n){return Object.keys(e).filter(r=>cb(r)&&r.endsWith(t)).reduce((r,s)=>(r[s.slice(0,-t.length)]=i=>$c(e[s],i,n(i)),r),{})}function mb(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;for(;e;){if(t?HN(e):gb(e))return e;e=e.parentElement}return document.scrollingElement}function zf(e,t){const n=[];if(t&&e&&!t.contains(e))return n;for(;e&&(gb(e)&&n.push(e),e!==t);)e=e.parentElement;return n}function gb(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 HN(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)return!1;const t=window.getComputedStyle(e);return["scroll","auto"].includes(t.overflowY)}function jN(e){for(;e;){if(window.getComputedStyle(e).position==="fixed")return!0;e=e.offsetParent}return!1}function Ae(e){const t=nn("useRender");t.render=e}function qN(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{leading:!0,trailing:!0},r=0,s=0,i=!1,o=0;function a(){clearTimeout(r),i=!1,o=0}const l=function(){for(var u=arguments.length,c=new Array(u),d=0;d<u;d++)c[d]=arguments[d];clearTimeout(r);const f=Date.now();o||(o=f);const p=f-Math.max(o,s);function v(){s=Date.now(),r=setTimeout(a,t),e(...c)}i?p>=t?v():n.trailing&&(r=setTimeout(v,t-p)):(i=!0,n.leading&&v())};return l.clear=a,l.immediate=e,l}const os=oe({border:[Boolean,Number,String]},"border");function _s(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Qs();return{borderClasses:O(()=>{const r=e.border;return r===!0||r===""?`${t}--border`:typeof r=="string"||r===0?String(r).split(" ").map(s=>`border-${s}`):[]})}}const WN=[null,"default","comfortable","compact"],Un=oe({density:{type:String,default:"default",validator:e=>WN.includes(e)}},"density");function as(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Qs();return{densityClasses:ne(()=>`${t}--density-${e.density}`)}}const ls=oe({elevation:{type:[Number,String],validator(e){const t=parseInt(e);return!isNaN(t)&&t>=0&&t<=24}}},"elevation");function ks(e){return{elevationClasses:ne(()=>{const n=Ye(e)?e.value:e.elevation;return n==null?[]:[`elevation-${n}`]})}}const On=oe({rounded:{type:[Boolean,Number,String],default:void 0},tile:Boolean},"rounded");function zn(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Qs();return{roundedClasses:O(()=>{const r=Ye(e)?e.value:e.rounded,s=Ye(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 ut=oe({tag:{type:[String,Object,Function],default:"div"}},"tag"),uc=Symbol.for("vuetify:theme"),Pt=oe({theme:String},"theme");function Bw(){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 GN(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Bw();const t=Bw();if(!e)return{...t,isDisabled:!0};const n={};for(const[r,s]of Object.entries(e.themes??{})){const i=s.dark||r==="dark"?t.themes?.dark:t.themes?.light;n[r]=Xn(i,s)}return Xn(t,{...e,themes:n})}function Ro(e,t,n,r){e.push(`${QN(t,r)} {
3
+ `,...n.map(s=>` ${s};
4
+ `),`}
5
+ `)}function Vw(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=Hs(o);s.push(`--${t}theme-${i}: ${a.r},${a.g},${a.b}`),i.startsWith("on-")||s.push(`--${t}theme-${i}-overlay-multiplier: ${MN(o)>.18?n:r}`)}for(const[i,o]of Object.entries(e.variables)){const a=typeof o=="string"&&o.startsWith("#")?Hs(o):void 0,l=a?`${a.r}, ${a.g}, ${a.b}`:void 0;s.push(`--${t}${i}: ${l??o}`)}return s}function KN(e,t,n){const r={};if(n)for(const s of["lighten","darken"]){const i=s==="lighten"?ON:DN;for(const o of Ka(n[s],1))r[`${e}-${s}-${o}`]=PN(i(Hs(t),o))}return r}function YN(e,t){if(!t)return{};let n={};for(const r of t.colors){const s=e[r];s&&(n={...n,...KN(r,s,t)})}return n}function XN(e){const t={};for(const n of Object.keys(e)){if(n.startsWith("on-")||e[`on-${n}`])continue;const r=`on-${n}`,s=Hs(e[n]);t[r]=rR(s)}return t}function QN(e,t){if(!t)return e;const n=`:where(${t})`;return e===":root"?n:`${n} ${e}`}function JN(e,t,n){const r=ZN(e,t);r&&(r.innerHTML=n)}function ZN(e,t){if(!kt)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 e$(e){const t=GN(e),n=ke(t.defaultTheme),r=H(t.themes),s=ke("light"),i=O({get(){return n.value==="system"?s.value:n.value},set(b){n.value=b}}),o=O(()=>{const b={};for(const[k,T]of Object.entries(r.value)){const _={...T.colors,...YN(T.colors,t.variations)};b[k]={...T,colors:{..._,...XN(_)}}}return b}),a=ne(()=>o.value[i.value]),l=ne(()=>n.value==="system"),u=O(()=>{const b=[],k=t.unimportant?"":" !important",T=t.scoped?t.prefix:"";a.value?.dark&&Ro(b,":root",["color-scheme: dark"],t.scope),Ro(b,":root",Vw(a.value,t.prefix),t.scope);for(const[C,R]of Object.entries(o.value))Ro(b,`.${t.prefix}theme--${C}`,[`color-scheme: ${R.dark?"dark":"normal"}`,...Vw(R,t.prefix)],t.scope);if(t.utilities){const C=[],R=[],w=new Set(Object.values(o.value).flatMap(P=>Object.keys(P.colors)));for(const P of w)P.startsWith("on-")?Ro(R,`.${P}`,[`color: rgb(var(--${t.prefix}theme-${P}))${k}`],t.scope):(Ro(C,`.${T}bg-${P}`,[`--${t.prefix}theme-overlay-multiplier: var(--${t.prefix}theme-${P}-overlay-multiplier)`,`background-color: rgb(var(--${t.prefix}theme-${P}))${k}`,`color: rgb(var(--${t.prefix}theme-on-${P}))${k}`],t.scope),Ro(R,`.${T}text-${P}`,[`color: rgb(var(--${t.prefix}theme-${P}))${k}`],t.scope),Ro(R,`.${T}border-${P}`,[`--${t.prefix}border-color: var(--${t.prefix}theme-${P})`],t.scope));t.layers?b.push(`@layer background {
6
+ `,...C.map(P=>` ${P}`),`}
7
+ `,`@layer foreground {
8
+ `,...R.map(P=>` ${P}`),`}
9
+ `):b.push(...C,...R)}let _=b.map((C,R)=>R===0?C:` ${C}`).join("");return t.layers&&(_=`@layer vuetify.theme {
10
+ `+b.map(C=>` ${C}`).join("")+`
11
+ }`),_}),c=ne(()=>t.isDisabled?void 0:`${t.prefix}theme--${i.value}`),d=ne(()=>Object.keys(o.value));if(lb){let k=function(){s.value=b.matches?"dark":"light"};var S=k;const b=window.matchMedia("(prefers-color-scheme: dark)");k(),b.addEventListener("change",k,{passive:!0}),Mc()&&Qt(()=>{b.removeEventListener("change",k)})}function f(b){if(t.isDisabled)return;const k=b._context.provides.usehead;if(k){let C=function(){return{style:[{textContent:u.value,id:t.stylesheetId,nonce:t.cspNonce||!1}]}};var T=C;if(k.push){const R=k.push(C);kt&&we(u,()=>{R.patch(C)})}else kt?(k.addHeadObjs(ne(C)),vn(()=>k.updateDOM())):k.addHeadObjs(C())}else{let C=function(){JN(t.stylesheetId,t.cspNonce,u.value)};var _=C;kt?we(u,C,{immediate:!0}):C()}}function p(b){b!=="system"&&!d.value.includes(b)||(i.value=b)}function v(){let b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:d.value;const k=b.indexOf(i.value),T=k===-1?0:(k+1)%b.length;p(b[T])}function m(){let b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["light","dark"];v(b)}const y=new Proxy(i,{get(b,k){return Reflect.get(b,k)},set(b,k,T){return k==="value"&&UT(`theme.global.name.value = ${T}`,`theme.change('${T}')`),Reflect.set(b,k,T)}});return{install:f,change:p,cycle:v,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 Wt(e){nn("provideTheme");const t=je(uc,null);if(!t)throw new Error("Could not find Vuetify theme injection");const n=ne(()=>e.theme??t.name.value),r=ne(()=>t.themes.value[n.value]),s=ne(()=>t.isDisabled?void 0:`${t.prefix}theme--${n.value}`),i={...t,name:n,current:r,themeClasses:s};return zt(uc,i),i}function iR(){nn("useTheme");const e=je(uc,null);if(!e)throw new Error("Could not find Vuetify theme injection");return e}function vb(e){return db(()=>{const{class:t,style:n}=t$(e);return{colorClasses:t,colorStyles:n}})}function bs(e){const{colorClasses:t,colorStyles:n}=vb(()=>({text:Ut(e)}));return{textColorClasses:t,textColorStyles:n}}function or(e){const{colorClasses:t,colorStyles:n}=vb(()=>({background:Ut(e)}));return{backgroundColorClasses:t,backgroundColorStyles:n}}function t$(e){const t=Ut(e),n=[],r={};if(t.background)if(yv(t.background)){if(r.backgroundColor=t.background,!t.text&&TN(t.background)){const s=Hs(t.background);if(s.a==null||s.a===1){const i=rR(s);r.color=i,r.caretColor=i}}}else n.push(`bg-${t.background}`);return t.text&&(yv(t.text)?(r.color=t.text,r.caretColor=t.text):n.push(`text-${t.text}`)),{class:n,style:r}}const n$=["elevated","flat","tonal","outlined","text","plain"];function go(e,t){return E(Ie,null,[e&&E("span",{key:"overlay",class:Pe(`${t}__overlay`)},null),E("span",{key:"underlay",class:Pe(`${t}__underlay`)},null)])}const xs=oe({color:String,variant:{type:String,default:"elevated",validator:e=>n$.includes(e)}},"variant");function xa(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Qs();const n=ne(()=>{const{variant:i}=Ut(e);return`${t}--variant-${i}`}),{colorClasses:r,colorStyles:s}=vb(()=>{const{variant:i,color:o}=Ut(e);return{[["elevated","flat"].includes(i)?"background":"text"]:o}});return{colorClasses:r,colorStyles:s,variantClasses:n}}const oR=oe({baseColor:String,divided:Boolean,direction:{type:String,default:"horizontal"},...os(),...Ue(),...Un(),...ls(),...On(),...ut(),...Pt(),...xs()},"VBtnGroup"),Uw=_e()({name:"VBtnGroup",props:oR(),setup(e,t){let{slots:n}=t;const{themeClasses:r}=Wt(e),{densityClasses:s}=as(e),{borderClasses:i}=_s(e),{elevationClasses:o}=ks(e),{roundedClasses:a}=zn(e);Tr({VBtn:{height:ne(()=>e.direction==="horizontal"?"auto":null),baseColor:ne(()=>e.baseColor),color:ne(()=>e.color),density:ne(()=>e.density),flat:!0,variant:ne(()=>e.variant)}}),Ae(()=>h(e.tag,{class:Pe(["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:De(e.style)},n))}});function kr(e,t){let n;function r(){n=la(),n.run(()=>t.length?t(()=>{n?.stop(),r()}):t())}we(e,s=>{s&&!n?r():s||(n?.stop(),n=void 0)},{immediate:!0}),Qt(()=>{n?.stop()})}function tt(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=nn("useProxiedModel"),o=H(e[t]!==void 0?e[t]:n),a=Xo(t),u=O(a!==t?()=>(e[t],!!((i.vnode.props?.hasOwnProperty(t)||i.vnode.props?.hasOwnProperty(a))&&(i.vnode.props?.hasOwnProperty(`onUpdate:${t}`)||i.vnode.props?.hasOwnProperty(`onUpdate:${a}`)))):()=>(e[t],!!(i.vnode.props?.hasOwnProperty(t)&&i.vnode.props?.hasOwnProperty(`onUpdate:${t}`))));kr(()=>!u.value,()=>{we(()=>e[t],d=>{o.value=d})});const c=O({get(){const d=e[t];return r(u.value?d:o.value)},set(d){const f=s(d),p=Fe(u.value?e[t]:o.value);p===f||r(p)===d||(o.value=f,i?.emit(`update:${t}`,f))}});return Object.defineProperty(c,"externalValue",{get:()=>u.value?e[t]:o.value}),c}const Bc=oe({modelValue:{type:null,default:void 0},multiple:Boolean,mandatory:[Boolean,String],max:Number,selectedClass:String,disabled:Boolean},"group"),Vc=oe({value:null,disabled:Boolean,selectedClass:String},"group-item");function gl(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;const r=nn("useGroupItem");if(!r)throw new Error("[Vuetify] useGroupItem composable must be used inside a component setup function");const s=Pr();zt(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=ne(()=>e.value),a=O(()=>!!(i.disabled.value||e.disabled));function l(){i?.register({id:s,value:o,disabled:a},r)}function u(){i?.unregister(s)}l(),Vn(()=>u());const c=O(()=>i.isSelected(s)),d=O(()=>i.items.value[0].id===s),f=O(()=>i.items.value[i.items.value.length-1].id===s),p=O(()=>c.value&&[i.selectedClass.value,e.selectedClass]);return we(c,v=>{r.emit("group:selected",{value:v})},{flush:"sync"}),{id:s,isSelected:c,isFirst:d,isLast:f,toggle:()=>i.select(s,!c.value),select:v=>i.select(s,v),selectedClass:p,value:o,disabled:a,group:i,register:l,unregister:u}}function Ul(e,t){let n=!1;const r=on([]),s=tt(e,"modelValue",[],f=>f===void 0?[]:aR(r,f===null?[null]:En(f)),f=>{const p=s$(r,f);return e.multiple?p:p[0]}),i=nn("useGroup");function o(f,p){const v=f,m=Symbol.for(`${t.description}:id`),S=Ya(m,i?.vnode).indexOf(p);Q(v.value)===void 0&&(v.value=S,v.useIndexAsValue=!0),S>-1?r.splice(S,0,v):r.push(v)}function a(f){if(n)return;l();const p=r.findIndex(v=>v.id===f);r.splice(p,1)}function l(){const f=r.find(p=>!p.disabled);f&&e.mandatory==="force"&&!s.value.length&&(s.value=[f.id])}gt(()=>{l()}),Vn(()=>{n=!0}),Zy(()=>{for(let f=0;f<r.length;f++)r[f].useIndexAsValue&&(r[f].value=f)});function u(f,p){const v=r.find(m=>m.id===f);if(!(p&&v?.disabled))if(e.multiple){const m=s.value.slice(),y=m.findIndex(b=>b===f),S=~y;if(p=p??!S,S&&e.mandatory&&m.length<=1||!S&&e.max!=null&&m.length+1>e.max)return;y<0&&p?m.push(f):y>=0&&!p&&m.splice(y,1),s.value=m}else{const m=s.value.includes(f);if(e.mandatory&&m||!m&&!p)return;s.value=p??!m?[f]:[]}}function c(f){if(e.multiple,s.value.length){const p=s.value[0],v=r.findIndex(S=>S.id===p);let m=(v+f)%r.length,y=r[m];for(;y.disabled&&m!==v;)m=(m+f)%r.length,y=r[m];if(y.disabled)return;s.value=[r[m].id]}else{const p=r.find(v=>!v.disabled);p&&(s.value=[p.id])}}const d={register:o,unregister:a,selected:s,select:u,disabled:ne(()=>e.disabled),prev:()=>c(r.length-1),next:()=>c(1),isSelected:f=>s.value.includes(f),selectedClass:ne(()=>e.selectedClass),items:ne(()=>r),getItemIndex:f=>r$(r,f)};return zt(t,d),d}function r$(e,t){const n=aR(e,[t]);return n.length?e.findIndex(r=>r.id===n[0]):-1}function aR(e,t){const n=[];return t.forEach(r=>{const s=e.find(o=>_r(r,o.value)),i=e[r];s?.value!==void 0?n.push(s.id):i?.useIndexAsValue&&n.push(i.id)}),n}function s$(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 lR=Symbol.for("vuetify:v-btn-toggle"),i$=oe({...oR(),...Bc()},"VBtnToggle"),uR=_e()({name:"VBtnToggle",props:i$(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{isSelected:r,next:s,prev:i,select:o,selected:a}=Ul(e,lR);return Ae(()=>{const l=Uw.filterProps(e);return h(Uw,de({class:["v-btn-toggle",e.class]},l,{style:e.style}),{default:()=>[n.default?.({isSelected:r,next:s,prev:i,select:o,selected:a})]})}),{next:s,prev:i,select:o}}}),o$=oe({defaults:Object,disabled:Boolean,reset:[Number,String],root:[Boolean,String],scoped:Boolean},"VDefaultsProvider"),Tt=_e(!1)({name:"VDefaultsProvider",props:o$(),setup(e,t){let{slots:n}=t;const{defaults:r,disabled:s,reset:i,root:o,scoped:a}=_a(e);return Tr(r,{reset:i,root:o,scoped:a,disabled:s}),()=>n.default?.()}}),$e=[String,Function,Object,Array],bv=Symbol.for("vuetify:icons"),Gh=oe({icon:{type:$e},tag:{type:[String,Object,Function],required:!0}},"icon"),zw=_e()({name:"VComponentIcon",props:Gh(),setup(e,t){let{slots:n}=t;return()=>{const r=e.icon;return h(e.tag,null,{default:()=>[e.icon?h(r,null,null):n.default?.()]})}}}),cR=Bl({name:"VSvgIcon",inheritAttrs:!1,props:Gh(),setup(e,t){let{attrs:n}=t;return()=>h(e.tag,de(n,{style:null}),{default:()=>[E("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)?E("path",{d:r[0],"fill-opacity":r[1]},null):E("path",{d:r},null)):E("path",{d:e.icon},null)])]})}}),a$=Bl({name:"VLigatureIcon",props:Gh(),setup(e){return()=>h(e.tag,null,{default:()=>[e.icon]})}}),dR=Bl({name:"VClassIcon",props:Gh(),setup(e){return()=>h(e.tag,{class:Pe(e.icon)},null)}}),l$=e=>{const t=je(bv);if(!t)throw new Error("Missing Vuetify Icons provide!");return{iconData:O(()=>{const r=Ut(e);if(!r)return{component:zw};let s=r;if(typeof s=="string"&&(s=s.trim(),s.startsWith("$")&&(s=t.aliases?.[s.slice(1)])),Array.isArray(s))return{component:cR,icon:s};if(typeof s!="string")return{component:zw,icon:s};const i=Object.keys(t.sets).find(l=>typeof s=="string"&&s.startsWith(`${l}:`)),o=i?s.slice(i.length+1):s;return{component:t.sets[i??t.defaultSet].component,icon:o}})}},u$=["x-small","small","default","large","x-large"],zl=oe({size:{type:[String,Number],default:"default"}},"size");function Uc(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Qs();return db(()=>{const n=e.size;let r,s;return $f(u$,n)?r=`${t}--size-${n}`:n&&(s={width:Oe(n),height:Oe(n)}),{sizeClasses:r,sizeStyles:s}})}const c$=oe({color:String,disabled:Boolean,start:Boolean,end:Boolean,icon:$e,opacity:[String,Number],...Ue(),...zl(),...ut({tag:"i"}),...Pt()},"VIcon"),Z=_e()({name:"VIcon",props:c$(),setup(e,t){let{attrs:n,slots:r}=t;const s=ke(),{themeClasses:i}=iR(),{iconData:o}=l$(()=>s.value||e.icon),{sizeClasses:a}=Uc(e),{textColorClasses:l,textColorStyles:u}=bs(()=>e.color);return Ae(()=>{const c=r.default?.();c&&(s.value=WT(c).filter(f=>f.type===Fc&&f.children&&typeof f.children=="string")[0]?.children);const d=!!(n.onClick||n.onClickOnce);return h(o.value.component,{tag:e.tag,icon:o.value.icon,class:Pe(["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:De([{"--v-icon-opacity":e.opacity},a.value?void 0:{fontSize:Oe(e.size),height:Oe(e.size),width:Oe(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 fR(e,t){const n=H(),r=ke(!1);if(ab){const s=new IntersectionObserver(i=>{r.value=!!i.find(o=>o.isIntersecting)},t);Qt(()=>{s.disconnect()}),we(n,(i,o)=>{o&&(s.unobserve(o),r.value=!1),i&&s.observe(i)},{flush:"post"})}return{intersectionRef:n,isIntersecting:r}}function ao(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"content";const n=mv(),r=H();if(kt){const s=new ResizeObserver(i=>{e?.(i,s),i.length&&(t==="content"?r.value=i[0].contentRect:r.value=i[0].target.getBoundingClientRect())});Vn(()=>{s.disconnect()}),we(()=>n.el,(i,o)=>{o&&(s.unobserve(o),r.value=void 0),i&&s.observe(i)},{flush:"post"})}return{resizeRef:n,contentRect:_i(r)}}const d$=oe({bgColor:String,color:String,indeterminate:[Boolean,String],rounded:Boolean,modelValue:{type:[Number,String],default:0},rotate:{type:[Number,String],default:0},width:{type:[Number,String],default:4},...Ue(),...zl(),...ut({tag:"div"}),...Pt()},"VProgressCircular"),zs=_e()({name:"VProgressCircular",props:d$(),setup(e,t){let{slots:n}=t;const r=20,s=2*Math.PI*r,i=H(),{themeClasses:o}=Wt(e),{sizeClasses:a,sizeStyles:l}=Uc(e),{textColorClasses:u,textColorStyles:c}=bs(()=>e.color),{textColorClasses:d,textColorStyles:f}=bs(()=>e.bgColor),{intersectionRef:p,isIntersecting:v}=fR(),{resizeRef:m,contentRect:y}=ao(),S=ne(()=>In(parseFloat(e.modelValue),0,100)),b=ne(()=>Number(e.width)),k=ne(()=>l.value?Number(e.size):y.value?y.value.width:Math.max(b.value,32)),T=ne(()=>r/(1-b.value/k.value)*2),_=ne(()=>b.value/k.value*T.value),C=ne(()=>{const w=(100-S.value)/100*s;return e.rounded&&S.value>0&&S.value<100?Oe(Math.min(s-.01,w+_.value)):Oe(w)}),R=O(()=>{const w=Number(e.rotate);return e.rounded?w+_.value/2/s*360:w});return vn(()=>{p.value=i.value,m.value=i.value}),Ae(()=>h(e.tag,{ref:i,class:Pe(["v-progress-circular",{"v-progress-circular--indeterminate":!!e.indeterminate,"v-progress-circular--visible":v.value,"v-progress-circular--disable-shrink":e.indeterminate&&(e.indeterminate==="disable-shrink"||ca())},o.value,a.value,u.value,e.class]),style:De([l.value,c.value,e.style]),role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":e.indeterminate?void 0:S.value},{default:()=>[E("svg",{style:{transform:`rotate(calc(-90deg + ${R.value}deg))`},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${T.value} ${T.value}`},[E("circle",{class:Pe(["v-progress-circular__underlay",d.value]),style:De(f.value),fill:"transparent",cx:"50%",cy:"50%",r,"stroke-width":_.value,"stroke-dasharray":s,"stroke-dashoffset":0},null),E("circle",{class:"v-progress-circular__overlay",fill:"transparent",cx:"50%",cy:"50%",r,"stroke-width":_.value,"stroke-dasharray":s,"stroke-dashoffset":C.value,"stroke-linecap":e.rounded?"round":void 0},null)]),n.default&&E("div",{class:"v-progress-circular__content"},[n.default({value:S.value})])]})),{}}}),cr=oe({height:[Number,String],maxHeight:[Number,String],maxWidth:[Number,String],minHeight:[Number,String],minWidth:[Number,String],width:[Number,String]},"dimension");function dr(e){return{dimensionStyles:O(()=>{const n={},r=Oe(e.height),s=Oe(e.maxHeight),i=Oe(e.maxWidth),o=Oe(e.minHeight),a=Oe(e.minWidth),l=Oe(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 f$={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",previousYear:"Previous year",nextYear:"Next year",selectMonth:"Select month",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",hour:"Hour",minute:"Minute",second:"Second"},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}",or:"or"},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"}}},Hw="$vuetify.",jw=(e,t)=>e.replace(/\{(\d+)\}/g,(n,r)=>String(t[Number(r)])),hR=(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(Hw))return jw(r,i);const a=r.replace(Hw,""),l=e.value&&n.value[e.value],u=t.value&&n.value[t.value];let c=da(l,a,null);return c||(`${r}${e.value}`,c=da(u,a,null)),c||(c=r),typeof c!="string"&&(c=r),jw(c,i)};function yb(e,t){return(n,r)=>new Intl.NumberFormat([e.value,t.value],r).format(n)}function pR(e,t){return yb(e,t)(.1).includes(",")?",":"."}function am(e,t,n){const r=tt(e,t,e[t]??n.value);return r.value=e[t]??n.value,we(n,s=>{e[t]==null&&(r.value=n.value)}),r}function mR(e){return t=>{const n=am(t,"locale",e.current),r=am(t,"fallback",e.fallback),s=am(t,"messages",e.messages);return{name:"vuetify",current:n,fallback:r,messages:s,decimalSeparator:ne(()=>pR(n,r)),t:hR(n,r,s),n:yb(n,r),provide:mR({current:n,fallback:r,messages:s})}}}function h$(e){const t=ke(e?.locale??"en"),n=ke(e?.fallback??"en"),r=H({en:f$,...e?.messages});return{name:"vuetify",current:t,fallback:n,messages:r,decimalSeparator:ne(()=>e?.decimalSeparator??pR(t,n)),t:hR(t,n,r),n:yb(t,n),provide:mR({current:t,fallback:n,messages:r})}}const Hf=Symbol.for("vuetify:locale");function p$(e){return e.name!=null}function m$(e){const t=e?.adapter&&p$(e?.adapter)?e?.adapter:h$(e),n=v$(t,e);return{...t,...n}}function Br(){const e=je(Hf);if(!e)throw new Error("[Vuetify] Could not find injected locale instance");return e}function g$(){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 v$(e,t){const n=H(t?.rtl??g$()),r=O(()=>n.value[e.current.value]??!1);return{isRtl:r,rtl:n,rtlClasses:ne(()=>`v-locale--is-${r.value?"rtl":"ltr"}`)}}function Ir(){const e=je(Hf);if(!e)throw new Error("[Vuetify] Could not find injected rtl instance");return{isRtl:e.isRtl,rtlClasses:e.rtlClasses}}const qw={center:"center",top:"bottom",bottom:"top",left:"right",right:"left"},vo=oe({location:String},"location");function Ea(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2?arguments[2]:void 0;const{isRtl:r}=Ir();return{locationStyles:O(()=>{if(!e.location)return{};const{side:i,align:o}=gv(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[qw[i]]=`calc(100% - ${a(i)}px)`:l[i]=0),o!=="center"?t?l[qw[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 y$=oe({chunkCount:{type:[Number,String],default:null},chunkWidth:{type:[Number,String],default:null},chunkGap:{type:[Number,String],default:4}},"chunks");function b$(e,t){const n=ne(()=>!!e.chunkCount||!!e.chunkWidth),r=O(()=>{const a=Ut(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=ne(()=>Number(e.chunkGap)),i=O(()=>{if(!n.value)return{};const a=Oe(s.value),l=Oe(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=Ut(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 In(0,d*c-u/2,100)}return{hasChunks:n,chunksMaskStyles:i,snapValueToChunk:o}}const S$=oe({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,...y$(),...Ue(),...vo({location:"top"}),...On(),...ut(),...Pt()},"VProgressLinear"),vl=_e()({name:"VProgressLinear",props:S$(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=H(),s=tt(e,"modelValue"),{isRtl:i,rtlClasses:o}=Ir(),{themeClasses:a}=Wt(e),{locationStyles:l}=Ea(e),{textColorClasses:u,textColorStyles:c}=bs(()=>e.color),{backgroundColorClasses:d,backgroundColorStyles:f}=or(()=>e.bgColor||e.color),{backgroundColorClasses:p,backgroundColorStyles:v}=or(()=>e.bufferColor||e.bgColor||e.color),{backgroundColorClasses:m,backgroundColorStyles:y}=or(()=>e.color),{roundedClasses:S}=zn(e),{intersectionRef:b,isIntersecting:k}=fR(),T=O(()=>parseFloat(e.max)),_=O(()=>parseFloat(e.height)),C=O(()=>In(parseFloat(e.bufferValue)/T.value*100,0,100)),R=O(()=>In(parseFloat(s.value)/T.value*100,0,100)),w=O(()=>i.value!==e.reverse),P=O(()=>e.indeterminate?"fade-transition":"slide-x-transition"),I=ke(0),{hasChunks:A,chunksMaskStyles:$,snapValueToChunk:K}=b$(e,I);kr(A,()=>{const{resizeRef:G}=ao(B=>I.value=B[0].contentRect.width);vn(()=>G.value=r.value)});const M=O(()=>A.value?K(C.value):C.value),L=O(()=>A.value?K(R.value):R.value);function j(G){if(!b.value)return;const{left:B,right:q,width:N}=b.value.getBoundingClientRect(),se=w.value?N-G.clientX+(q-N):G.clientX-B;s.value=Math.round(se/N*T.value)}return vn(()=>{b.value=r.value}),Ae(()=>h(e.tag,{ref:r,class:Pe(["v-progress-linear",{"v-progress-linear--absolute":e.absolute,"v-progress-linear--active":e.active&&k.value,"v-progress-linear--reverse":w.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},S.value,a.value,o.value,e.class]),style:De([{bottom:e.location==="bottom"?0:void 0,top:e.location==="top"?0:void 0,height:e.active?Oe(_.value):0,"--v-progress-linear-height":Oe(_.value),...e.absolute?l.value:{}},$.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),T.value),onClick:e.clickable&&j},{default:()=>[e.stream&&E("div",{key:"stream",class:Pe(["v-progress-linear__stream",u.value]),style:{...c.value,[w.value?"left":"right"]:Oe(-_.value),borderTop:`${Oe(_.value/2)} dotted`,opacity:parseFloat(e.bufferOpacity),top:`calc(50% - ${Oe(_.value/4)})`,width:Oe(100-C.value,"%"),"--v-progress-linear-stream-to":Oe(_.value*(w.value?1:-1))}},null),E("div",{class:Pe(["v-progress-linear__background",d.value]),style:De([f.value,{opacity:parseFloat(e.bgOpacity),width:e.stream?0:void 0}])},null),E("div",{class:Pe(["v-progress-linear__buffer",p.value]),style:De([v.value,{opacity:parseFloat(e.bufferOpacity),width:Oe(M.value,"%")}])},null),h(so,{name:P.value},{default:()=>[e.indeterminate?E("div",{class:"v-progress-linear__indeterminate"},[["long","short"].map(G=>E("div",{key:G,class:Pe(["v-progress-linear__indeterminate",G,m.value]),style:De(y.value)},null))]):E("div",{class:Pe(["v-progress-linear__determinate",m.value]),style:De([y.value,{width:Oe(L.value,"%")}])},null)]}),n.default&&E("div",{class:"v-progress-linear__content"},[n.default({value:R.value,buffer:C.value})])]})),{}}}),Kh=oe({loading:[Boolean,String]},"loader");function zc(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Qs();return{loaderClasses:ne(()=>({[`${t}--loading`]:e.loading}))}}function Yh(e,t){let{slots:n}=t;return E("div",{class:Pe(`${e.name}__loader`)},[n.default?.({color:e.color,isActive:e.active})||h(vl,{absolute:e.absolute,active:e.active,color:e.color,height:"2",indeterminate:!0},null)])}const w$=["static","relative","fixed","absolute","sticky"],Hl=oe({position:{type:String,validator:e=>w$.includes(e)}},"position");function jl(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Qs();return{positionClasses:ne(()=>e.position?`${t}--${e.position}`:void 0)}}function _$(){const e=nn("useRoute");return O(()=>e?.proxy?.$route)}function gR(){return nn("useRouter")?.proxy?.$router}function Xh(e,t){const n=_L("RouterLink"),r=ne(()=>!!(e.href||e.to)),s=O(()=>r?.value||ww(t,"click")||ww(e,"click"));if(typeof n=="string"||!("useLink"in n)){const d=ne(()=>e.href);return{isLink:r,isRouterLink:ne(()=>!1),isClickable:s,href:d,linkProps:on({href:d})}}const i=n.useLink({to:ne(()=>e.to||""),replace:ne(()=>e.replace)}),o=O(()=>e.to?i:void 0),a=_$(),l=O(()=>o.value?e.exact?a.value?o.value.isExactActive?.value&&_r(o.value.route.value.query,a.value.query):o.value.isExactActive?.value??!1:o.value.isActive?.value??!1:!1),u=O(()=>e.to?o.value?.route.value.href:e.href),c=ne(()=>!!e.to);return{isLink:r,isRouterLink:c,isClickable:s,isActive:l,route:o.value?.route,navigate:o.value?.navigate,href:u,linkProps:on({href:u,"aria-current":ne(()=>l.value?"page":void 0),"aria-disabled":ne(()=>e.disabled&&r.value?"true":void 0),tabindex:ne(()=>e.disabled&&r.value?"-1":void 0)})}}const Qh=oe({href:String,replace:Boolean,to:[String,Object],exact:Boolean},"router");let lm=!1;function k$(e,t){let n=!1,r,s;kt&&e?.beforeEach&&(ot(()=>{window.addEventListener("popstate",i),r=e.beforeEach((o,a,l)=>{lm?n?t(l):l():setTimeout(()=>n?t(l):l()),lm=!0}),s=e?.afterEach(()=>{lm=!1})}),Qt(()=>{window.removeEventListener("popstate",i),r?.(),s?.()}));function i(o){o.state?.replaced||(n=!0,setTimeout(()=>n=!1))}}function x$(e,t){we(()=>e.isActive?.value,n=>{e.isLink.value&&n!=null&&t&&ot(()=>{t(n)})},{immediate:!0})}const Sv=Symbol("rippleStop"),E$=80;function Ww(e,t){e.style.transform=t,e.style.webkitTransform=t}function wv(e){return e.constructor.name==="TouchEvent"}function vR(e){return e.constructor.name==="KeyboardEvent"}const C$=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=0,s=0;if(!vR(e)){const d=t.getBoundingClientRect(),f=wv(e)?e.touches[e.touches.length-1]:e;r=f.clientX-d.left,s=f.clientY-d.top}let i=0,o=.3;t._ripple?.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}},jf={show(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!t?._ripple?.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}=C$(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"),Ww(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"),Ww(s,`translate(${u}, ${c}) scale3d(1,1,1)`)})})},hide(e){if(!e?._ripple?.enabled)return;const t=e.getElementsByClassName("v-ripple__animation");if(t.length===0)return;const n=Array.from(t).findLast(i=>!i.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(()=>{e.getElementsByClassName("v-ripple__animation").length===1&&e.dataset.previousPosition&&(e.style.position=e.dataset.previousPosition,delete e.dataset.previousPosition),n.parentNode?.parentNode===e&&e.removeChild(n.parentNode)},300)},s)}};function yR(e){return typeof e>"u"||!!e}function cc(e){const t={},n=e.currentTarget;if(!(!n?._ripple||n._ripple.touched||e[Sv])){if(e[Sv]=!0,wv(e))n._ripple.touched=!0,n._ripple.isTouch=!0;else if(n._ripple.isTouch)return;if(t.center=n._ripple.centered||vR(e),n._ripple.class&&(t.class=n._ripple.class),wv(e)){if(n._ripple.showTimerCommit)return;n._ripple.showTimerCommit=()=>{jf.show(e,n,t)},n._ripple.showTimer=window.setTimeout(()=>{n?._ripple?.showTimerCommit&&(n._ripple.showTimerCommit(),n._ripple.showTimerCommit=null)},E$)}else jf.show(e,n,t)}}function qf(e){e[Sv]=!0}function Mr(e){const t=e.currentTarget;if(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(()=>{Mr(e)});return}window.setTimeout(()=>{t._ripple&&(t._ripple.touched=!1)}),jf.hide(t)}}function bR(e){const t=e.currentTarget;t?._ripple&&(t._ripple.showTimerCommit&&(t._ripple.showTimerCommit=null),window.clearTimeout(t._ripple.showTimer))}let dc=!1;function T$(e,t){!dc&&t.includes(e.key)&&(dc=!0,cc(e))}function SR(e){dc=!1,Mr(e)}function wR(e){dc&&(dc=!1,Mr(e))}function _R(e,t,n){const{value:r,modifiers:s}=t,i=yR(r);i||jf.hide(e),e._ripple=e._ripple??{},e._ripple.enabled=i,e._ripple.centered=s.center,e._ripple.circle=s.circle;const o=pl(r)?r:{};o.class&&(e._ripple.class=o.class);const a=o.keys??["Enter","Space"];if(e._ripple.keyDownHandler=l=>T$(l,a),i&&!n){if(s.stop){e.addEventListener("touchstart",qf,{passive:!0}),e.addEventListener("mousedown",qf);return}e.addEventListener("touchstart",cc,{passive:!0}),e.addEventListener("touchend",Mr,{passive:!0}),e.addEventListener("touchmove",bR,{passive:!0}),e.addEventListener("touchcancel",Mr),e.addEventListener("mousedown",cc),e.addEventListener("mouseup",Mr),e.addEventListener("mouseleave",Mr),e.addEventListener("keydown",e._ripple.keyDownHandler),e.addEventListener("keyup",SR),e.addEventListener("blur",wR),e.addEventListener("dragstart",Mr,{passive:!0})}else!i&&n&&kR(e)}function kR(e){e.removeEventListener("touchstart",qf),e.removeEventListener("mousedown",qf),e.removeEventListener("touchstart",cc),e.removeEventListener("touchend",Mr),e.removeEventListener("touchmove",bR),e.removeEventListener("touchcancel",Mr),e.removeEventListener("mousedown",cc),e.removeEventListener("mouseup",Mr),e.removeEventListener("mouseleave",Mr),e._ripple?.keyDownHandler&&e.removeEventListener("keydown",e._ripple.keyDownHandler),e.removeEventListener("keyup",SR),e.removeEventListener("blur",wR),e.removeEventListener("dragstart",Mr)}function R$(e,t){_R(e,t,!1)}function P$(e){kR(e),delete e._ripple}function I$(e,t){if(t.value===t.oldValue)return;const n=yR(t.oldValue);_R(e,t,n)}const Ss={mounted:R$,unmounted:P$,updated:I$},xR=oe({active:{type:Boolean,default:void 0},activeColor:String,baseColor:String,symbol:{type:null,default:lR},flat:Boolean,icon:[Boolean,String,Function,Object],prependIcon:$e,appendIcon:$e,block:Boolean,readonly:Boolean,slim:Boolean,stacked:Boolean,spaced:String,ripple:{type:[Boolean,Object],default:!0},text:{type:[String,Number,Boolean],default:void 0},...os(),...Ue(),...Un(),...cr(),...ls(),...Vc(),...Kh(),...vo(),...Hl(),...On(),...Qh(),...zl(),...ut({tag:"button"}),...Pt(),...xs({variant:"elevated"})},"VBtn"),te=_e()({name:"VBtn",props:xR(),emits:{"group:selected":e=>!0},setup(e,t){let{attrs:n,slots:r}=t;const{themeClasses:s}=Wt(e),{borderClasses:i}=_s(e),{densityClasses:o}=as(e),{dimensionStyles:a}=dr(e),{elevationClasses:l}=ks(e),{loaderClasses:u}=zc(e),{locationStyles:c}=Ea(e),{positionClasses:d}=jl(e),{roundedClasses:f}=zn(e),{sizeClasses:p,sizeStyles:v}=Uc(e),m=gl(e,e.symbol,!1),y=Xh(e,n),S=O(()=>e.active!==void 0?e.active:y.isRouterLink.value?y.isActive?.value:m?.isSelected.value),b=ne(()=>S.value?e.activeColor??e.color:e.color),k=O(()=>({color:m?.isSelected.value&&(!y.isLink.value||y.isActive?.value)||!m||y.isActive?.value?b.value??e.baseColor:e.baseColor,variant:e.variant})),{colorClasses:T,colorStyles:_,variantClasses:C}=xa(k),R=O(()=>m?.disabled.value||e.disabled),w=ne(()=>e.variant==="elevated"&&!(e.disabled||e.flat||e.border)),P=O(()=>{if(!(e.value===void 0||typeof e.value=="symbol"))return Object(e.value)===e.value?JSON.stringify(e.value,null,0):e.value});function I(A){R.value||y.isLink.value&&(A.metaKey||A.ctrlKey||A.shiftKey||A.button!==0||n.target==="_blank")||(y.isRouterLink.value?y.navigate?.(A):m?.toggle())}return x$(y,m?.select),Ae(()=>{const A=y.isLink.value?"a":e.tag,$=!!(e.prependIcon||r.prepend),K=!!(e.appendIcon||r.append),M=!!(e.icon&&e.icon!==!0);return Ot(h(A,de(y.linkProps,{type:A==="a"?void 0:"button",class:["v-btn",m?.selectedClass.value,{"v-btn--active":S.value,"v-btn--block":e.block,"v-btn--disabled":R.value,"v-btn--elevated":w.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,T.value,o.value,l.value,u.value,d.value,f.value,p.value,C.value,e.class],style:[_.value,a.value,c.value,v.value,e.style],"aria-busy":e.loading?!0:void 0,disabled:R.value&&A!=="a"||void 0,tabindex:e.loading||e.readonly?-1:void 0,onClick:I,value:P.value}),{default:()=>[go(!0,"v-btn"),!e.icon&&$&&E("span",{key:"prepend",class:"v-btn__prepend"},[r.prepend?h(Tt,{key:"prepend-defaults",disabled:!e.prependIcon,defaults:{VIcon:{icon:e.prependIcon}}},r.prepend):h(Z,{key:"prepend-icon",icon:e.prependIcon},null)]),E("span",{class:"v-btn__content","data-no-activator":""},[!r.default&&M?h(Z,{key:"content-icon",icon:e.icon},null):h(Tt,{key:"content-defaults",disabled:!M,defaults:{VIcon:{icon:e.icon}}},{default:()=>[r.default?.()??re(e.text)]})]),!e.icon&&K&&E("span",{key:"append",class:"v-btn__append"},[r.append?h(Tt,{key:"append-defaults",disabled:!e.appendIcon,defaults:{VIcon:{icon:e.appendIcon}}},r.append):h(Z,{key:"append-icon",icon:e.appendIcon},null)]),!!e.loading&&E("span",{key:"loader",class:"v-btn__loader"},[r.loader?.()??h(zs,{color:typeof e.loading=="boolean"?void 0:e.loading,indeterminate:!0,width:"2"},null)])]}),[[Ss,!R.value&&e.ripple,"",{center:!!e.icon}]])}),{group:m}}}),A$=oe({disabled:Boolean,group:Boolean,hideOnLeave:Boolean,leaveAbsolute:Boolean,mode:String,origin:String},"transition");function Vr(e,t,n){return _e()({name:e,props:A$({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?._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?ob:so;return lr(a,{name:r.disabled?"":e,css:!r.disabled,...r.group?void 0:{mode:r.mode},...r.disabled?{}:o},i.default)}}})}function ER(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"in-out";return _e()({name:e,props:{mode:{type:String,default:n},disabled:{type:Boolean,default:ca()},group:Boolean},setup(r,s){let{slots:i}=s;const o=r.group?ob:so;return()=>lr(o,{name:r.disabled?"":e,css:!r.disabled,...r.disabled?{}:t},i.default)}})}function CR(){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=ar(`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 O$=oe({target:[Object,Array]},"v-dialog-transition"),um=new WeakMap,bb=_e()({name:"VDialogTransition",props:O$(),setup(e,t){let{slots:n}=t;const r={onBeforeEnter(s){s.style.pointerEvents="none",s.style.visibility="hidden"},async onEnter(s,i){await new Promise(f=>requestAnimationFrame(f)),await new Promise(f=>requestAnimationFrame(f)),s.style.visibility="";const o=Kw(e.target,s),{x:a,y:l,sx:u,sy:c,speed:d}=o;if(um.set(s,o),ca())ji(s,[{opacity:0},{}],{duration:125*d,easing:Fw}).finished.then(()=>i());else{const f=ji(s,[{transform:`translate(${a}px, ${l}px) scale(${u}, ${c})`,opacity:0},{}],{duration:225*d,easing:Fw});Gw(s)?.forEach(p=>{ji(p,[{opacity:0},{opacity:0,offset:.33},{}],{duration:450*d,easing:Uf})}),f.finished.then(()=>i())}},onAfterEnter(s){s.style.removeProperty("pointer-events")},onBeforeLeave(s){s.style.pointerEvents="none"},async onLeave(s,i){await new Promise(f=>requestAnimationFrame(f));let o;!um.has(s)||Array.isArray(e.target)||e.target.offsetParent||e.target.getClientRects().length?o=Kw(e.target,s):o=um.get(s);const{x:a,y:l,sx:u,sy:c,speed:d}=o;ca()?ji(s,[{},{opacity:0}],{duration:85*d,easing:Nw}).finished.then(()=>i()):(ji(s,[{},{transform:`translate(${a}px, ${l}px) scale(${u}, ${c})`,opacity:0}],{duration:125*d,easing:Nw}).finished.then(()=>i()),Gw(s)?.forEach(p=>{ji(p,[{},{opacity:0,offset:.2},{opacity:0}],{duration:250*d,easing:Uf})}))},onAfterLeave(s){s.style.removeProperty("pointer-events")}};return()=>e.target?h(so,de({name:"dialog-transition"},r,{css:!1}),n):h(so,{name:"dialog-transition"},n)}});function Gw(e){const t=e.querySelector(":scope > .v-card, :scope > .v-sheet, :scope > .v-list")?.children;return t&&[...t]}function Kw(e,t){const n=JT(e),r=fb(t),[s,i]=getComputedStyle(t).transformOrigin.split(" ").map(S=>parseFloat(S)),[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),p=c/f||0,v=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:p,sy:v,speed:y}}Vr("fab-transition","center center","out-in");Vr("dialog-bottom-transition");Vr("dialog-top-transition");const Yw=Vr("fade-transition"),D$=Vr("scale-transition");Vr("scroll-x-transition");Vr("scroll-x-reverse-transition");const M$=Vr("scroll-y-transition");Vr("scroll-y-reverse-transition");Vr("slide-x-transition");Vr("slide-x-reverse-transition");const TR=Vr("slide-y-transition");Vr("slide-y-reverse-transition");const RR=ER("expand-transition",CR()),PR=ER("expand-x-transition",CR("",!0));function cm(e,t){return{x:e.x+t.x,y:e.y+t.y}}function L$(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Xw(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 cm({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 cm({x:s,y:i},t)}return cm({x:t.width/2,y:t.height/2},t)}const IR={static:$$,connected:V$},F$=oe({locationStrategy:{type:[String,Function],default:"static",validator:e=>typeof e=="function"||e in IR},location:{type:String,default:"bottom"},origin:{type:String,default:"auto"},offset:[Number,String,Array],stickToTarget:Boolean,viewportMargin:{type:[Number,String],default:12}},"VOverlay-location-strategies");function N$(e,t){const n=H({}),r=H();kt&&kr(()=>!!(t.isActive.value&&e.locationStrategy),a=>{we(()=>e.locationStrategy,a),Qt(()=>{window.removeEventListener("resize",s),visualViewport?.removeEventListener("resize",i),visualViewport?.removeEventListener("scroll",o),r.value=void 0}),window.addEventListener("resize",s,{passive:!0}),visualViewport?.addEventListener("resize",i,{passive:!0}),visualViewport?.addEventListener("scroll",o,{passive:!0}),typeof e.locationStrategy=="function"?r.value=e.locationStrategy(t,e,n)?.updateLocation:r.value=IR[e.locationStrategy](t,e,n)?.updateLocation});function s(a){r.value?.(a)}function i(a){r.value?.(a)}function o(a){r.value?.(a)}return{contentStyles:n,updateLocation:r}}function $$(){}function B$(e,t){const n=fb(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 V$(e,t,n){(Array.isArray(e.target.value)||jN(e.target.value))&&Object.assign(n.value,{position:"fixed",top:0,[e.isRtl.value?"right":"left"]:0});const{preferredAnchor:s,preferredOrigin:i}=db(()=>{const S=gv(t.location,e.isRtl.value),b=t.origin==="overlap"?S:t.origin==="auto"?im(S):gv(t.origin,e.isRtl.value);return S.side===b.side&&S.align===om(b).align?{preferredAnchor:kw(S),preferredOrigin:kw(b)}:{preferredAnchor:S,preferredOrigin:b}}),[o,a,l,u]=["minWidth","minHeight","maxWidth","maxHeight"].map(S=>O(()=>{const b=parseFloat(t[S]);return isNaN(b)?1/0:b})),c=O(()=>{if(Array.isArray(t.offset))return t.offset;if(typeof t.offset=="string"){const S=t.offset.split(" ").map(parseFloat);return S.length<2&&S.push(0),S}return typeof t.offset=="number"?[t.offset,0]:[0,0]});let d=!1,f=-1;const p=new GT(4),v=new ResizeObserver(()=>{if(!d)return;if(requestAnimationFrame(b=>{b!==f&&p.clear(),requestAnimationFrame(k=>{f=k})}),p.isFull){const b=p.values();if(_r(b.at(-1),b.at(-3))&&!_r(b.at(-1),b.at(-2)))return}const S=y();S&&p.push(S.flipped)});let m=new Yr({x:0,y:0,width:0,height:0});we(e.target,(S,b)=>{b&&!Array.isArray(b)&&v.unobserve(b),Array.isArray(S)?_r(S,b)||y():S&&v.observe(S)},{immediate:!0}),we(e.contentEl,(S,b)=>{b&&v.unobserve(b),S&&v.observe(S)},{immediate:!0}),Qt(()=>{v.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=JT(e.target.value));const S=B$(e.contentEl.value,e.isRtl.value),b=zf(e.contentEl.value),k=Number(t.viewportMargin);b.length||(b.push(document.documentElement),e.contentEl.value.style.top&&e.contentEl.value.style.left||(S.x-=parseFloat(document.documentElement.style.getPropertyValue("--v-body-scroll-x")||0),S.y-=parseFloat(document.documentElement.style.getPropertyValue("--v-body-scroll-y")||0)));const T=b.reduce((K,M)=>{const L=dN(M);return K?new Yr({x:Math.max(K.left,L.left),y:Math.max(K.top,L.top),width:Math.min(K.right,L.right)-Math.max(K.left,L.left),height:Math.min(K.bottom,L.bottom)-Math.max(K.top,L.top)}):L},void 0);t.stickToTarget?(T.x+=Math.min(k,m.x),T.y+=Math.min(k,m.y),T.width=Math.max(T.width-k*2,m.x+m.width-k),T.height=Math.max(T.height-k*2,m.y+m.height-k)):(T.x+=k,T.y+=k,T.width-=k*2,T.height-=k*2);let _={anchor:s.value,origin:i.value};function C(K){const M=new Yr(S),L=Xw(K.anchor,m),j=Xw(K.origin,M);let{x:G,y:B}=L$(L,j);switch(K.anchor.side){case"top":B-=c.value[0];break;case"bottom":B+=c.value[0];break;case"left":G-=c.value[0];break;case"right":G+=c.value[0];break}switch(K.anchor.align){case"top":B-=c.value[1];break;case"bottom":B+=c.value[1];break;case"left":G-=c.value[1];break;case"right":G+=c.value[1];break}return M.x+=G,M.y+=B,M.width=Math.min(M.width,l.value),M.height=Math.min(M.height,u.value),{overflows:Ew(M,T),x:G,y:B}}let R=0,w=0;const P={x:0,y:0},I={x:!1,y:!1};let A=-1;for(;!(A++>10);){const{x:K,y:M,overflows:L}=C(_);R+=K,w+=M,S.x+=K,S.y+=M;{const j=xw(_.anchor),G=L.x.before||L.x.after,B=L.y.before||L.y.after;let q=!1;if(["x","y"].forEach(N=>{if(N==="x"&&G&&!I.x||N==="y"&&B&&!I.y){const se={anchor:{..._.anchor},origin:{..._.origin}},z=N==="x"?j==="y"?om:im:j==="y"?im:om;se.anchor=z(se.anchor),se.origin=z(se.origin);const{overflows:U}=C(se);(U[N].before<=L[N].before&&U[N].after<=L[N].after||U[N].before+U[N].after<(L[N].before+L[N].after)/2)&&(_=se,q=I[N]=!0)}}),q)continue}L.x.before&&(R+=L.x.before,S.x+=L.x.before),L.x.after&&(R-=L.x.after,S.x-=L.x.after),L.y.before&&(w+=L.y.before,S.y+=L.y.before),L.y.after&&(w-=L.y.after,S.y-=L.y.after);{const j=Ew(S,T);P.x=T.width-j.x.before-j.x.after,P.y=T.height-j.y.before-j.y.after,R+=j.x.before,S.x+=j.x.before,w+=j.y.before,S.y+=j.y.before}break}const $=xw(_.anchor);return Object.assign(n.value,{"--v-overlay-anchor-origin":`${_.anchor.side} ${_.anchor.align}`,transformOrigin:`${_.origin.side} ${_.origin.align}`,top:Oe(dm(w)),left:e.isRtl.value?void 0:Oe(dm(R)),right:e.isRtl.value?Oe(dm(-R)):void 0,minWidth:Oe($==="y"?Math.min(o.value,m.width):o.value),maxWidth:Oe(Qw(In(P.x,o.value===1/0?0:o.value,l.value))),maxHeight:Oe(Qw(In(P.y,a.value===1/0?0:a.value,u.value)))}),{available:P,contentBox:S,flipped:I}}return we(()=>[s.value,i.value,t.offset,t.minWidth,t.minHeight,t.maxWidth,t.maxHeight],()=>y()),ot(()=>{const S=y();if(!S)return;const{available:b,contentBox:k}=S;k.height>b.y&&requestAnimationFrame(()=>{y(),requestAnimationFrame(()=>{y()})})}),{updateLocation:y}}function dm(e){return Math.round(e*devicePixelRatio)/devicePixelRatio}function Qw(e){return Math.ceil(e*devicePixelRatio)/devicePixelRatio}let _v=!0;const Wf=[];function U$(e){!_v||Wf.length?(Wf.push(e),kv()):(_v=!1,e(),kv())}let Jw=-1;function kv(){cancelAnimationFrame(Jw),Jw=requestAnimationFrame(()=>{const e=Wf.shift();e&&e(),Wf.length?kv():_v=!0})}const AR={none:null,close:j$,block:q$,reposition:W$},z$=oe({scrollStrategy:{type:[String,Function],default:"block",validator:e=>typeof e=="function"||e in AR}},"VOverlay-scroll-strategies");function H$(e,t){if(!kt)return;let n;vn(async()=>{n?.stop(),t.isActive.value&&e.scrollStrategy&&(n=la(),await new Promise(r=>setTimeout(r)),n.active&&n.run(()=>{typeof e.scrollStrategy=="function"?e.scrollStrategy(t,e,n):AR[e.scrollStrategy]?.(t,e,n)}))}),Qt(()=>{n?.stop()})}function j$(e){function t(n){e.isActive.value=!1}OR(Sb(e.target.value,e.contentEl.value),t)}function q$(e,t){const n=e.root.value?.offsetParent,r=Sb(e.target.value,e.contentEl.value),s=[...new Set([...zf(r,t.contained?n:void 0),...zf(e.contentEl.value,t.contained?n:void 0)])].filter(a=>!a.classList.contains("v-overlay-scroll-blocked")),i=window.innerWidth-document.documentElement.offsetWidth,o=(a=>gb(a)&&a)(n||document.documentElement);o&&e.root.value.classList.add("v-overlay--scroll-blocked"),s.forEach((a,l)=>{a.style.setProperty("--v-body-scroll-x",Oe(-a.scrollLeft)),a.style.setProperty("--v-body-scroll-y",Oe(-a.scrollTop)),a!==document.documentElement&&a.style.setProperty("--v-scrollbar-offset",Oe(i)),a.classList.add("v-overlay-scroll-blocked")}),Qt(()=>{s.forEach((a,l)=>{const u=parseFloat(a.style.getPropertyValue("--v-body-scroll-x")),c=parseFloat(a.style.getPropertyValue("--v-body-scroll-y")),d=a.style.scrollBehavior;a.style.scrollBehavior="auto",a.style.removeProperty("--v-body-scroll-x"),a.style.removeProperty("--v-body-scroll-y"),a.style.removeProperty("--v-scrollbar-offset"),a.classList.remove("v-overlay-scroll-blocked"),a.scrollLeft=-u,a.scrollTop=-c,a.style.scrollBehavior=d}),o&&e.root.value.classList.remove("v-overlay--scroll-blocked")})}function W$(e,t,n){let r=!1,s=-1,i=-1;function o(a){U$(()=>{const l=performance.now();e.updateLocation.value?.(a),r=(performance.now()-l)/(1e3/60)>2})}i=(typeof requestIdleCallback>"u"?a=>a():requestIdleCallback)(()=>{n.run(()=>{OR(Sb(e.target.value,e.contentEl.value),a=>{r?(cancelAnimationFrame(s),s=requestAnimationFrame(()=>{s=requestAnimationFrame(()=>{o(a)})})):o(a)})})}),Qt(()=>{typeof cancelIdleCallback<"u"&&cancelIdleCallback(i),cancelAnimationFrame(s)})}function Sb(e,t){return Array.isArray(e)?document.elementsFromPoint(...e).find(n=>!t?.contains(n)):e??t}function OR(e,t){const n=[document,...zf(e)];n.forEach(r=>{r.addEventListener("scroll",t,{passive:!0})}),Qt(()=>{n.forEach(r=>{r.removeEventListener("scroll",t)})})}const xv=Symbol.for("vuetify:v-menu"),wb=oe({closeDelay:[Number,String],openDelay:[Number,String]},"delay");function _b(e,t){let n=()=>{};function r(o,a){n?.();const l=o?e.openDelay:e.closeDelay,u=Math.max(a?.minDelay??0,Number(l??0));return new Promise(c=>{n=oN(u,()=>{t?.(o),c(o)})})}function s(){return r(!0)}function i(o){return r(!1,o)}return{clearDelay:n,runOpenDelay:s,runCloseDelay:i}}const G$=oe({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,...wb()},"VOverlay-activator");function K$(e,t){let{isActive:n,isTop:r,contentEl:s}=t;const i=nn("useActivator"),o=H();let a=!1,l=!1,u=!0;const c=O(()=>e.openOnFocus||e.openOnFocus==null&&e.openOnHover),d=O(()=>e.openOnClick||e.openOnClick==null&&!e.openOnHover&&!c.value),{runOpenDelay:f,runCloseDelay:p}=_b(e,w=>{w===(e.openOnHover&&a||c.value&&l)&&!(e.openOnHover&&n.value&&!r.value)&&(n.value!==w&&(u=!0),n.value=w)}),v=H(),m={onClick:w=>{w.stopPropagation(),o.value=w.currentTarget||w.target,n.value||(v.value=[w.clientX,w.clientY]),n.value=!n.value},onMouseenter:w=>{a=!0,o.value=w.currentTarget||w.target,f()},onMouseleave:w=>{a=!1,p()},onFocus:w=>{Bf(w.target,":focus-visible")!==!1&&(l=!0,w.stopPropagation(),o.value=w.currentTarget||w.target,f())},onBlur:w=>{l=!1,w.stopPropagation(),p({minDelay:1})}},y=O(()=>{const w={};return d.value&&(w.onClick=m.onClick),e.openOnHover&&(w.onMouseenter=m.onMouseenter,w.onMouseleave=m.onMouseleave),c.value&&(w.onFocus=m.onFocus,w.onBlur=m.onBlur),w}),S=O(()=>{const w={};if(e.openOnHover&&(w.onMouseenter=()=>{a=!0,f()},w.onMouseleave=()=>{a=!1,p()}),c.value&&(w.onFocusin=P=>{P.target.matches(":focus-visible")&&(l=!0,f())},w.onFocusout=()=>{l=!1,p({minDelay:1})}),e.closeOnContentClick){const P=je(xv,null);w.onClick=()=>{n.value=!1,P?.closeParents()}}return w}),b=O(()=>{const w={};return e.openOnHover&&(w.onMouseenter=()=>{u&&(a=!0,u=!1,f())},w.onMouseleave=()=>{a=!1,p()}),w});we(r,w=>{w&&(e.openOnHover&&!a&&(!c.value||!l)||c.value&&!l&&(!e.openOnHover||!a))&&!s.value?.contains(document.activeElement)&&(n.value=!1)}),we(n,w=>{w||setTimeout(()=>{v.value=void 0})},{flush:"post"});const k=mv();vn(()=>{k.value&&ot(()=>{o.value=k.el})});const T=mv(),_=O(()=>e.target==="cursor"&&v.value?v.value:T.value?T.el:DR(e.target,i)||o.value),C=O(()=>Array.isArray(_.value)?void 0:_.value);let R;return we(()=>!!e.activator,w=>{w&&kt?(R=la(),R.run(()=>{Y$(e,i,{activatorEl:o,activatorEvents:y})})):R&&R.stop()},{flush:"post",immediate:!0}),Qt(()=>{R?.stop()}),{activatorEl:o,activatorRef:k,target:_,targetEl:C,targetRef:T,activatorEvents:y,contentEvents:S,scrimEvents:b}}function Y$(e,t,n){let{activatorEl:r,activatorEvents:s}=n;we(()=>e.activator,(l,u)=>{if(u&&l!==u){const c=a(u);c&&o(c)}l&&ot(()=>i())},{immediate:!0}),we(()=>e.activatorProps,()=>{i()}),Qt(()=>{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&&fN(l,de(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&&hN(l,de(s.value,u))}function a(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:e.activator;const u=DR(l,t);return r.value=u?.nodeType===Node.ELEMENT_NODE?u:void 0,r.value}}function DR(e,t){if(!e)return;let n;if(e==="parent"){let r=t?.proxy?.$el?.parentNode;for(;r?.hasAttribute("data-no-activator");)r=r.parentNode;n=r}else typeof e=="string"?n=document.querySelector(e):"$el"in e?n=e.$el:n=e;return n}const MR=oe({retainFocus:Boolean,captureFocus:Boolean,disableInitialFocus:Boolean},"focusTrap"),Zd=new Map;let Zw=0;function e1(e){const t=document.activeElement;if(e.key!=="Tab"||!t)return;const n=Array.from(Zd.values()).filter(u=>{let{isActive:c,contentEl:d}=u;return c.value&&d.value?.contains(t)}).map(u=>u.contentEl.value);let r,s=t.parentElement;for(;s;){if(n.includes(s)){r=s;break}s=s.parentElement}if(!r)return;const i=Qo(r).filter(u=>u.tabIndex>=0);if(!i.length)return;const o=document.activeElement;if(i.length===1&&i[0].classList.contains("v-list")&&i[0].contains(o)){e.preventDefault();return}const a=i[0],l=i[i.length-1];e.shiftKey&&(o===a||a.classList.contains("v-list")&&a.contains(o))&&(e.preventDefault(),l.focus()),!e.shiftKey&&(o===l||l.classList.contains("v-list")&&l.contains(o))&&(e.preventDefault(),a.focus())}function LR(e,t){let{isActive:n,localTop:r,activatorEl:s,contentEl:i}=t;const o=Symbol("trap");let a=!1,l=-1;async function u(){a=!0,l=window.setTimeout(()=>{a=!1},100)}async function c(p){const v=p.relatedTarget,m=p.target;document.removeEventListener("pointerdown",u),document.removeEventListener("keydown",d),await ot(),n.value&&!a&&v!==m&&i.value&&Ut(r)&&![document,i.value].includes(m)&&!i.value.contains(m)&&Qo(i.value)[0]?.focus()}function d(p){if(p.key==="Tab"&&(document.removeEventListener("keydown",d),n.value&&i.value&&p.target&&!i.value.contains(p.target))){const v=Qo(document.documentElement);if(p.shiftKey&&p.target===v.at(0)||!p.shiftKey&&p.target===v.at(-1)){const m=Qo(i.value);m.length>0&&(p.preventDefault(),m[0].focus())}}}const f=ne(()=>n.value&&e.captureFocus&&!e.disableInitialFocus);kt&&(we(()=>e.retainFocus,p=>{p?Zd.set(o,{isActive:n,contentEl:i}):Zd.delete(o)},{immediate:!0}),we(f,p=>{p?(document.addEventListener("pointerdown",u),document.addEventListener("focusin",c,{once:!0}),document.addEventListener("keydown",d)):(document.removeEventListener("pointerdown",u),document.removeEventListener("focusin",c),document.removeEventListener("keydown",d))},{immediate:!0}),Zw++<1&&document.addEventListener("keydown",e1)),Qt(()=>{Zd.delete(o),clearTimeout(l),document.removeEventListener("pointerdown",u),document.removeEventListener("focusin",c),document.removeEventListener("keydown",d),--Zw<1&&document.removeEventListener("keydown",e1)})}const Jh=["sm","md","lg","xl","xxl"],Ev=Symbol.for("vuetify:display"),t1={mobileBreakpoint:"lg",thresholds:{xs:0,sm:600,md:960,lg:1280,xl:1920,xxl:2560}},X$=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t1;return Xn(t1,e)};function n1(e){return kt&&!e?window.innerWidth:typeof e=="object"&&e.clientWidth||0}function r1(e){return kt&&!e?window.innerHeight:typeof e=="object"&&e.clientHeight||0}function s1(e){const t=kt&&!e?window.navigator.userAgent:"ssr";function n(v){return!!t.match(v)}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),p=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:p,touch:tN,ssr:t==="ssr"}}function Q$(e,t){const{thresholds:n,mobileBreakpoint:r}=X$(e),s=ke(r1(t)),i=ke(s1(t)),o=on({}),a=ke(n1(t));function l(){s.value=r1(),a.value=n1()}function u(){l(),i.value=s1()}return vn(()=>{const c=a.value<n.sm,d=a.value<n.md&&!c,f=a.value<n.lg&&!(d||c),p=a.value<n.xl&&!(f||d||c),v=a.value<n.xxl&&!(p||f||d||c),m=a.value>=n.xxl,y=c?"xs":d?"sm":f?"md":p?"lg":v?"xl":"xxl",S=typeof r=="number"?r:n[r],b=a.value<S;o.xs=c,o.sm=d,o.md=f,o.lg=p,o.xl=v,o.xxl=m,o.smAndUp=!c,o.mdAndUp=!(c||d),o.lgAndUp=!(c||d||f),o.xlAndUp=!(c||d||f||p),o.smAndDown=!(f||p||v||m),o.mdAndDown=!(p||v||m),o.lgAndDown=!(v||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}),kt&&(window.addEventListener("resize",l,{passive:!0}),Qt(()=>{window.removeEventListener("resize",l)},!0)),{..._a(o),update:u,ssr:!!t}}const Ca=oe({mobile:{type:Boolean,default:!1},mobileBreakpoint:[Number,String]},"display");function Es(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{mobile:null},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Qs();const n=je(Ev);if(!n)throw new Error("Could not find Vuetify display injection");const r=O(()=>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=ne(()=>t?{[`${t}--mobile`]:r.value}:{});return{...n,displayClasses:s,mobile:r}}function J$(){if(!kt)return ke(!1);const{ssr:e}=Es();if(e){const t=ke(!1);return gt(()=>{t.value=!0}),t}else return ke(!0)}const FR=oe({eager:Boolean},"lazy");function NR(e,t){const n=ke(!1),r=ne(()=>n.value||e.eager||t.value);we(t,()=>n.value=!0);function s(){e.eager||(n.value=!1)}return{isBooted:n,hasContent:r,onAfterLeave:s}}function ql(){const t=nn("useScopeId").vnode.scopeId;return{scopeId:t?{[t]:""}:void 0}}const i1=Symbol.for("vuetify:stack"),vu=on([]);function Z$(e,t,n){const r=nn("useStack"),s=!n,i=je(i1,void 0),o=on({activeChildren:new Set});zt(i1,o);const a=ke(Number(Ut(t)));kr(e,()=>{const c=vu.at(-1)?.[1];a.value=c?c+10:Number(Ut(t)),s&&vu.push([r.uid,a.value]),i?.activeChildren.add(r.uid),Qt(()=>{if(s){const d=Fe(vu).findIndex(f=>f[0]===r.uid);vu.splice(d,1)}i?.activeChildren.delete(r.uid)})});const l=ke(!0);s&&vn(()=>{const c=vu.at(-1)?.[0]===r.uid;setTimeout(()=>l.value=c)});const u=ne(()=>!o.activeChildren.size);return{globalTop:_i(l),localTop:u,stackStyles:ne(()=>({zIndex:a.value}))}}function eB(e){return{teleportTarget:O(()=>{const n=e();if(n===!0||!kt)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 Wl=oe({transition:{type:null,default:"fade-transition",validator:e=>e!==!0}},"transition"),js=(e,t)=>{let{slots:n}=t;const{transition:r,disabled:s,group:i,...o}=e,{component:a=i?ob:so,...l}=pl(r)?r:{};let u;return pl(r)?u=de(l,uN({disabled:s,group:i}),o):u=de({name:s||!r?"":r},o),lr(a,u,n)};function tB(){return!0}function $R(e,t,n){if(!e||BR(e,n)===!1)return!1;const r=sR(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?.contains(e.target))}function BR(e,t){return(typeof t.value=="object"&&t.value.closeConditional||tB)(e)}function nB(e,t,n){const r=typeof n.value=="function"?n.value:n.value.handler;e.shadowTarget=e.target,t._clickOutside.lastMousedownWasOutside&&$R(e,t,n)&&setTimeout(()=>{BR(e,n)&&r&&r(e)},0)}function o1(e,t){const n=sR(e);t(document),typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&t(n)}const a1={mounted(e,t){const n=s=>nB(s,e,t),r=s=>{e._clickOutside.lastMousedownWasOutside=$R(s,e,t)};o1(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&&(o1(e,n=>{if(!n||!e._clickOutside?.[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 rB(e){const{modelValue:t,color:n,...r}=e;return h(so,{name:"fade-transition",appear:!0},{default:()=>[e.modelValue&&E("div",de({class:["v-overlay__scrim",e.color.backgroundColorClasses.value],style:e.color.backgroundColorStyles.value},r),null)]})}const Hc=oe({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},...G$(),...Ue(),...cr(),...FR(),...F$(),...z$(),...MR(),...Pt(),...Wl()},"VOverlay"),Ei=_e()({name:"VOverlay",directives:{vClickOutside:a1},inheritAttrs:!1,props:{_disableGlobalStack:Boolean,...bn(Hc(),["disableInitialFocus"])},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=nn("VOverlay"),o=H(),a=H(),l=H(),u=tt(e,"modelValue"),c=O({get:()=>u.value,set:W=>{W&&e.disabled||(u.value=W)}}),{themeClasses:d}=Wt(e),{rtlClasses:f,isRtl:p}=Ir(),{hasContent:v,onAfterLeave:m}=NR(e,c),y=or(()=>typeof e.scrim=="string"?e.scrim:null),{globalTop:S,localTop:b,stackStyles:k}=Z$(c,()=>e.zIndex,e._disableGlobalStack),{activatorEl:T,activatorRef:_,target:C,targetEl:R,targetRef:w,activatorEvents:P,contentEvents:I,scrimEvents:A}=K$(e,{isActive:c,isTop:b,contentEl:l}),{teleportTarget:$}=eB(()=>{const W=e.attach||e.contained;if(W)return W;const pe=T?.value?.getRootNode()||i.proxy?.$el?.getRootNode();return pe instanceof ShadowRoot?pe:!1}),{dimensionStyles:K}=dr(e),M=J$(),{scopeId:L}=ql();we(()=>e.disabled,W=>{W&&(c.value=!1)});const{contentStyles:j,updateLocation:G}=N$(e,{isRtl:p,contentEl:l,target:C,isActive:c});H$(e,{root:o,contentEl:l,targetEl:R,target:C,isActive:c,updateLocation:G});function B(W){s("click:outside",W),e.persistent?le():c.value=!1}function q(W){return c.value&&b.value&&(!e.scrim||W.target===a.value||W instanceof MouseEvent&&W.shadowTarget===a.value)}LR(e,{isActive:c,localTop:b,contentEl:l,activatorEl:T}),kt&&we(c,W=>{W?window.addEventListener("keydown",N):window.removeEventListener("keydown",N)},{immediate:!0}),Vn(()=>{kt&&window.removeEventListener("keydown",N)});function N(W){W.key==="Escape"&&S.value&&(l.value?.contains(document.activeElement)||s("keydown",W),e.persistent?le():(c.value=!1,l.value?.contains(document.activeElement)&&T.value?.focus()))}function se(W){W.key==="Escape"&&!S.value||s("keydown",W)}const z=gR();kr(()=>e.closeOnBack,()=>{k$(z,W=>{S.value&&c.value?(W(!1),e.persistent?le():c.value=!1):W()})});const U=H();we(()=>c.value&&(e.absolute||e.contained)&&$.value==null,W=>{if(W){const pe=mb(o.value);pe&&pe!==document.scrollingElement&&(U.value=pe.scrollTop)}});function le(){e.noClickAnimation||l.value&&ji(l.value,[{transformOrigin:"center"},{transform:"scale(1.03)"},{transformOrigin:"center"}],{duration:150,easing:Uf})}function J(){s("afterEnter")}function be(){m(),s("afterLeave")}return Ae(()=>E(Ie,null,[n.activator?.({isActive:c.value,targetRef:w,props:de({ref:_},P.value,e.activatorProps)}),M.value&&v.value&&h(fL,{disabled:!$.value,to:$.value},{default:()=>[E("div",de({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:[k.value,{"--v-overlay-opacity":e.opacity,top:Oe(U.value)},e.style],ref:o,onKeydown:se},L,r),[h(rB,de({color:y,modelValue:c.value&&!!e.scrim,ref:a},A.value),null),h(js,{appear:!0,persisted:!0,transition:e.transition,target:C.value,onAfterEnter:J,onAfterLeave:be},{default:()=>[Ot(E("div",de({ref:l,class:["v-overlay__content",e.contentClass],style:[K.value,j.value]},I.value,e.contentProps),[n.default?.({isActive:c})]),[[Di,c.value],[a1,{handler:B,closeConditional:q,include:()=>[T.value]}]])]})])]})])),{activatorEl:T,scrimEl:a,target:C,animateClick:le,contentEl:l,rootEl:o,globalTop:S,localTop:b,updateLocation:G}}}),fm=Symbol("Forwarded refs");function hm(e,t){let n=e;for(;n;){const r=Reflect.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function us(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[fm]=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){const o=Reflect.getOwnPropertyDescriptor(s,i);if(o)return o;if(!(typeof i=="symbol"||i.startsWith("$")||i.startsWith("__"))){for(const a of n){if(!a.value)continue;const l=hm(a.value,i)??("_"in a.value?hm(a.value._?.setupState,i):void 0);if(l)return l}for(const a of n){const l=a.value&&a.value[fm];if(!l)continue;const u=l.slice();for(;u.length;){const c=u.shift(),d=hm(c.value,i);if(d)return d;const f=c.value&&c.value[fm];f&&u.push(...f)}}}}})}const sB=oe({fullscreen:Boolean,scrollable:Boolean,...bn(Hc({captureFocus:!0,origin:"center center",scrollStrategy:"block",transition:{component:bb},zIndex:2400,retainFocus:!0}),["disableInitialFocus"])},"VDialog"),VR=_e()({name:"VDialog",props:sB(),emits:{"update:modelValue":e=>!0,afterEnter:()=>!0,afterLeave:()=>!0},setup(e,t){let{emit:n,slots:r}=t;const s=tt(e,"modelValue"),{scopeId:i}=ql(),o=H();function a(){n("afterEnter"),(e.scrim||e.retainFocus)&&o.value?.contentEl&&!o.value.contentEl.contains(document.activeElement)&&o.value.contentEl.focus({preventScroll:!0})}function l(){n("afterLeave")}return we(s,async u=>{u||(await ot(),o.value.activatorEl?.focus({preventScroll:!0}))}),Ae(()=>{const u=Ei.filterProps(e),c=de({"aria-haspopup":"dialog"},e.activatorProps),d=de({tabindex:-1},e.contentProps);return h(Ei,de({ref:o,class:["v-dialog",{"v-dialog--fullscreen":e.fullscreen,"v-dialog--scrollable":e.scrollable},e.class],style:e.style},u,{modelValue:s.value,"onUpdate:modelValue":f=>s.value=f,"aria-modal":"true",activatorProps:c,contentProps:d,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:a,onAfterLeave:l},i),{activator:r.activator,default:function(){for(var f=arguments.length,p=new Array(f),v=0;v<f;v++)p[v]=arguments[v];return h(Tt,{root:"VDialog"},{default:()=>[r.default?.(...p)]})}})}),us({},o)}}),iB={class:"pa-3 text--primary"},Js=Me({__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=BT(),s=t,i=Kt(n.id);function o(c){return s("opened",c)}function a(c){return s("beforeOpened",c)}gt(async()=>{eN("Escape",c=>{l.value&&(c.preventDefault(),u())}),r.registerDialogReference(n.id,{beforeOpenedCallback:a,openedCallback:o})}),Vn(()=>{r.unregisterDialogReference(n.id)});const l=O(()=>{if(!n.id)return;const c=r.isDialogOpened(n.id);return c&&console.debug(`[BaseDialog ${n.id}] Showing dialog: ${i?.isDialogOpened()}`),c});function u(){s("escape")}return(c,d)=>(F(),ee(VR,{"max-width":e.maxWidth,"retain-focus":!1,"model-value":l.value,persistent:"",onClose:d[1]||(d[1]=f=>u())},{default:g(()=>[Hh(c.$slots,"default",{},()=>[E("div",iB,[d[4]||(d[4]=x(" No content defined in dialog. ",-1)),h(te,{onClick:d[0]||(d[0]=f=>Q(i).closeDialog())},{default:g(()=>[h(Z,{class:"mr-3"},{default:g(()=>[...d[2]||(d[2]=[x("close",-1)])]),_:1}),d[3]||(d[3]=x("Close ",-1))]),_:1})])])]),_:3},8,["max-width","model-value"]))}});var Yt=(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))(Yt||{});function UR(e,t){return function(){return e.apply(t,arguments)}}const{toString:oB}=Object.prototype,{getPrototypeOf:kb}=Object,{iterator:Zh,toStringTag:zR}=Symbol,ep=(e=>t=>{const n=oB.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Cs=e=>(e=e.toLowerCase(),t=>ep(t)===e),tp=e=>t=>typeof t===e,{isArray:Gl}=Array,yl=tp("undefined");function jc(e){return e!==null&&!yl(e)&&e.constructor!==null&&!yl(e.constructor)&&xr(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const HR=Cs("ArrayBuffer");function aB(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&HR(e.buffer),t}const lB=tp("string"),xr=tp("function"),jR=tp("number"),qc=e=>e!==null&&typeof e=="object",uB=e=>e===!0||e===!1,ef=e=>{if(ep(e)!=="object")return!1;const t=kb(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(zR in e)&&!(Zh in e)},cB=e=>{if(!qc(e)||jc(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},dB=Cs("Date"),fB=Cs("File"),hB=Cs("Blob"),pB=Cs("FileList"),mB=e=>qc(e)&&xr(e.pipe),gB=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||xr(e.append)&&((t=ep(e))==="formdata"||t==="object"&&xr(e.toString)&&e.toString()==="[object FormData]"))},vB=Cs("URLSearchParams"),[yB,bB,SB,wB]=["ReadableStream","Request","Response","Headers"].map(Cs),_B=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Wc(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),Gl(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(jc(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 qR(e,t){if(jc(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 Vo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,WR=e=>!yl(e)&&e!==Vo;function Cv(){const{caseless:e,skipUndefined:t}=WR(this)&&this||{},n={},r=(s,i)=>{const o=e&&qR(n,i)||i;ef(n[o])&&ef(s)?n[o]=Cv(n[o],s):ef(s)?n[o]=Cv({},s):Gl(s)?n[o]=s.slice():(!t||!yl(s))&&(n[o]=s)};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&Wc(arguments[s],r);return n}const kB=(e,t,n,{allOwnKeys:r}={})=>(Wc(t,(s,i)=>{n&&xr(s)?e[i]=UR(s,n):e[i]=s},{allOwnKeys:r}),e),xB=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),EB=(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)},CB=(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&&kb(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},TB=(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},RB=e=>{if(!e)return null;if(Gl(e))return e;let t=e.length;if(!jR(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},PB=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&kb(Uint8Array)),IB=(e,t)=>{const r=(e&&e[Zh]).call(e);let s;for(;(s=r.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},AB=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},OB=Cs("HTMLFormElement"),DB=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),l1=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),MB=Cs("RegExp"),GR=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Wc(n,(s,i)=>{let o;(o=t(s,i,e))!==!1&&(r[i]=o||s)}),Object.defineProperties(e,r)},LB=e=>{GR(e,(t,n)=>{if(xr(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(xr(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+"'")})}})},FB=(e,t)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return Gl(e)?r(e):r(String(e).split(t)),n},NB=()=>{},$B=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function BB(e){return!!(e&&xr(e.append)&&e[zR]==="FormData"&&e[Zh])}const VB=e=>{const t=new Array(10),n=(r,s)=>{if(qc(r)){if(t.indexOf(r)>=0)return;if(jc(r))return r;if(!("toJSON"in r)){t[s]=r;const i=Gl(r)?[]:{};return Wc(r,(o,a)=>{const l=n(o,s+1);!yl(l)&&(i[a]=l)}),t[s]=void 0,i}}return r};return n(e,0)},UB=Cs("AsyncFunction"),zB=e=>e&&(qc(e)||xr(e))&&xr(e.then)&&xr(e.catch),KR=((e,t)=>e?setImmediate:t?((n,r)=>(Vo.addEventListener("message",({source:s,data:i})=>{s===Vo&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),Vo.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",xr(Vo.postMessage)),HB=typeof queueMicrotask<"u"?queueMicrotask.bind(Vo):typeof process<"u"&&process.nextTick||KR,jB=e=>e!=null&&xr(e[Zh]),ie={isArray:Gl,isArrayBuffer:HR,isBuffer:jc,isFormData:gB,isArrayBufferView:aB,isString:lB,isNumber:jR,isBoolean:uB,isObject:qc,isPlainObject:ef,isEmptyObject:cB,isReadableStream:yB,isRequest:bB,isResponse:SB,isHeaders:wB,isUndefined:yl,isDate:dB,isFile:fB,isBlob:hB,isRegExp:MB,isFunction:xr,isStream:mB,isURLSearchParams:vB,isTypedArray:PB,isFileList:pB,forEach:Wc,merge:Cv,extend:kB,trim:_B,stripBOM:xB,inherits:EB,toFlatObject:CB,kindOf:ep,kindOfTest:Cs,endsWith:TB,toArray:RB,forEachEntry:IB,matchAll:AB,isHTMLForm:OB,hasOwnProperty:l1,hasOwnProp:l1,reduceDescriptors:GR,freezeMethods:LB,toObjectSet:FB,toCamelCase:DB,noop:NB,toFiniteNumber:$B,findKey:qR,global:Vo,isContextDefined:WR,isSpecCompliantForm:BB,toJSONObject:VB,isAsyncFn:UB,isThenable:zB,setImmediate:KR,asap:HB,isIterable:jB};function Qe(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)}ie.inherits(Qe,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:ie.toJSONObject(this.config),code:this.code,status:this.status}}});const YR=Qe.prototype,XR={};["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=>{XR[e]={value:e}});Object.defineProperties(Qe,XR);Object.defineProperty(YR,"isAxiosError",{value:!0});Qe.from=(e,t,n,r,s,i)=>{const o=Object.create(YR);ie.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 Qe.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 qB=null;function Tv(e){return ie.isPlainObject(e)||ie.isArray(e)}function QR(e){return ie.endsWith(e,"[]")?e.slice(0,-2):e}function u1(e,t,n){return e?e.concat(t).map(function(s,i){return s=QR(s),!n&&i?"["+s+"]":s}).join(n?".":""):t}function WB(e){return ie.isArray(e)&&!e.some(Tv)}const GB=ie.toFlatObject(ie,{},null,function(t){return/^is[A-Z]/.test(t)});function np(e,t,n){if(!ie.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=ie.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,y){return!ie.isUndefined(y[m])});const r=n.metaTokens,s=n.visitor||c,i=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&ie.isSpecCompliantForm(t);if(!ie.isFunction(s))throw new TypeError("visitor must be a function");function u(v){if(v===null)return"";if(ie.isDate(v))return v.toISOString();if(ie.isBoolean(v))return v.toString();if(!l&&ie.isBlob(v))throw new Qe("Blob is not supported. Use a Buffer instead.");return ie.isArrayBuffer(v)||ie.isTypedArray(v)?l&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function c(v,m,y){let S=v;if(v&&!y&&typeof v=="object"){if(ie.endsWith(m,"{}"))m=r?m:m.slice(0,-2),v=JSON.stringify(v);else if(ie.isArray(v)&&WB(v)||(ie.isFileList(v)||ie.endsWith(m,"[]"))&&(S=ie.toArray(v)))return m=QR(m),S.forEach(function(k,T){!(ie.isUndefined(k)||k===null)&&t.append(o===!0?u1([m],T,i):o===null?m:m+"[]",u(k))}),!1}return Tv(v)?!0:(t.append(u1(y,m,i),u(v)),!1)}const d=[],f=Object.assign(GB,{defaultVisitor:c,convertValue:u,isVisitable:Tv});function p(v,m){if(!ie.isUndefined(v)){if(d.indexOf(v)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(v),ie.forEach(v,function(S,b){(!(ie.isUndefined(S)||S===null)&&s.call(t,S,ie.isString(b)?b.trim():b,m,f))===!0&&p(S,m?m.concat(b):[b])}),d.pop()}}if(!ie.isObject(e))throw new TypeError("data must be an object");return p(e),t}function c1(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function xb(e,t){this._pairs=[],e&&np(e,this,t)}const JR=xb.prototype;JR.append=function(t,n){this._pairs.push([t,n])};JR.toString=function(t){const n=t?function(r){return t.call(this,r,c1)}:c1;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function KB(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ZR(e,t,n){if(!t)return e;const r=n&&n.encode||KB;ie.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let i;if(s?i=s(t,n):i=ie.isURLSearchParams(t)?t.toString():new xb(t,n).toString(r),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class d1{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){ie.forEach(this.handlers,function(r){r!==null&&t(r)})}}const eP={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},YB=typeof URLSearchParams<"u"?URLSearchParams:xb,XB=typeof FormData<"u"?FormData:null,QB=typeof Blob<"u"?Blob:null,JB={isBrowser:!0,classes:{URLSearchParams:YB,FormData:XB,Blob:QB},protocols:["http","https","file","blob","url","data"]},Eb=typeof window<"u"&&typeof document<"u",Rv=typeof navigator=="object"&&navigator||void 0,ZB=Eb&&(!Rv||["ReactNative","NativeScript","NS"].indexOf(Rv.product)<0),eV=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",tV=Eb&&window.location.href||"http://localhost",nV=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Eb,hasStandardBrowserEnv:ZB,hasStandardBrowserWebWorkerEnv:eV,navigator:Rv,origin:tV},Symbol.toStringTag,{value:"Module"})),Yn={...nV,...JB};function rV(e,t){return np(e,new Yn.classes.URLSearchParams,{visitor:function(n,r,s,i){return Yn.isNode&&ie.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function sV(e){return ie.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function iV(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 tP(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&&ie.isArray(s)?s.length:o,l?(ie.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!a):((!s[o]||!ie.isObject(s[o]))&&(s[o]=[]),t(n,r,s[o],i)&&ie.isArray(s[o])&&(s[o]=iV(s[o])),!a)}if(ie.isFormData(e)&&ie.isFunction(e.entries)){const n={};return ie.forEachEntry(e,(r,s)=>{t(sV(r),s,n,0)}),n}return null}function oV(e,t,n){if(ie.isString(e))try{return(t||JSON.parse)(e),ie.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Gc={transitional:eP,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=ie.isObject(t);if(i&&ie.isHTMLForm(t)&&(t=new FormData(t)),ie.isFormData(t))return s?JSON.stringify(tP(t)):t;if(ie.isArrayBuffer(t)||ie.isBuffer(t)||ie.isStream(t)||ie.isFile(t)||ie.isBlob(t)||ie.isReadableStream(t))return t;if(ie.isArrayBufferView(t))return t.buffer;if(ie.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 rV(t,this.formSerializer).toString();if((a=ie.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return np(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),oV(t)):t}],transformResponse:[function(t){const n=this.transitional||Gc.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(ie.isResponse(t)||ie.isReadableStream(t))return t;if(t&&ie.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"?Qe.from(a,Qe.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:Yn.classes.FormData,Blob:Yn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ie.forEach(["delete","get","head","post","put","patch"],e=>{Gc.headers[e]={}});const aV=ie.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(`
12
+ `).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!n||t[n]&&aV[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},f1=Symbol("internals");function yu(e){return e&&String(e).trim().toLowerCase()}function tf(e){return e===!1||e==null?e:ie.isArray(e)?e.map(tf):String(e)}function uV(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 cV=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function pm(e,t,n,r,s){if(ie.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!ie.isString(t)){if(ie.isString(r))return t.indexOf(r)!==-1;if(ie.isRegExp(r))return r.test(t)}}function dV(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function fV(e,t){const n=ie.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 Er=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function i(a,l,u){const c=yu(l);if(!c)throw new Error("header name must be a non-empty string");const d=ie.findKey(s,c);(!d||s[d]===void 0||u===!0||u===void 0&&s[d]!==!1)&&(s[d||l]=tf(a))}const o=(a,l)=>ie.forEach(a,(u,c)=>i(u,c,l));if(ie.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(ie.isString(t)&&(t=t.trim())&&!cV(t))o(lV(t),n);else if(ie.isObject(t)&&ie.isIterable(t)){let a={},l,u;for(const c of t){if(!ie.isArray(c))throw TypeError("Object iterator must return a key-value pair");a[u=c[0]]=(l=a[u])?ie.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=yu(t),t){const r=ie.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return uV(s);if(ie.isFunction(n))return n.call(this,s,r);if(ie.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=yu(t),t){const r=ie.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||pm(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function i(o){if(o=yu(o),o){const a=ie.findKey(r,o);a&&(!n||pm(r,r[a],a,n))&&(delete r[a],s=!0)}}return ie.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||pm(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const n=this,r={};return ie.forEach(this,(s,i)=>{const o=ie.findKey(r,i);if(o){n[o]=tf(s),delete n[i];return}const a=t?dV(i):String(i).trim();a!==i&&delete n[i],n[a]=tf(s),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return ie.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&ie.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(`
13
+ `)}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[f1]=this[f1]={accessors:{}}).accessors,s=this.prototype;function i(o){const a=yu(o);r[a]||(fV(s,o),r[a]=!0)}return ie.isArray(t)?t.forEach(i):i(t),this}};Er.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ie.reduceDescriptors(Er.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});ie.freezeMethods(Er);function mm(e,t){const n=this||Gc,r=t||n,s=Er.from(r.headers);let i=r.data;return ie.forEach(e,function(a){i=a.call(n,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function nP(e){return!!(e&&e.__CANCEL__)}function Kl(e,t,n){Qe.call(this,e??"canceled",Qe.ERR_CANCELED,t,n),this.name="CanceledError"}ie.inherits(Kl,Qe,{__CANCEL__:!0});function rP(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Qe("Request failed with status code "+n.status,[Qe.ERR_BAD_REQUEST,Qe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function hV(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function pV(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 p=c&&u-c;return p?Math.round(f*1e3/p):void 0}}function mV(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 Gf=(e,t,n=3)=>{let r=0;const s=pV(50,250);return mV(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)},h1=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},p1=e=>(...t)=>ie.asap(()=>e(...t)),gV=Yn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Yn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Yn.origin),Yn.navigator&&/(msie|trident)/i.test(Yn.navigator.userAgent)):()=>!0,vV=Yn.hasStandardBrowserEnv?{write(e,t,n,r,s,i,o){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];ie.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),ie.isString(r)&&a.push(`path=${r}`),ie.isString(s)&&a.push(`domain=${s}`),i===!0&&a.push("secure"),ie.isString(o)&&a.push(`SameSite=${o}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function yV(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function bV(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function sP(e,t,n){let r=!yV(t);return e&&(r||n==!1)?bV(e,t):t}const m1=e=>e instanceof Er?{...e}:e;function fa(e,t){t=t||{};const n={};function r(u,c,d,f){return ie.isPlainObject(u)&&ie.isPlainObject(c)?ie.merge.call({caseless:f},u,c):ie.isPlainObject(c)?ie.merge({},c):ie.isArray(c)?c.slice():c}function s(u,c,d,f){if(ie.isUndefined(c)){if(!ie.isUndefined(u))return r(void 0,u,d,f)}else return r(u,c,d,f)}function i(u,c){if(!ie.isUndefined(c))return r(void 0,c)}function o(u,c){if(ie.isUndefined(c)){if(!ie.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(m1(u),m1(c),d,!0)};return ie.forEach(Object.keys({...e,...t}),function(c){const d=l[c]||s,f=d(e[c],t[c],c);ie.isUndefined(f)&&d!==a||(n[c]=f)}),n}const iP=e=>{const t=fa({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:a}=t;if(t.headers=o=Er.from(o),t.url=ZR(sP(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),ie.isFormData(n)){if(Yn.hasStandardBrowserEnv||Yn.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(ie.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(Yn.hasStandardBrowserEnv&&(r&&ie.isFunction(r)&&(r=r(t)),r||r!==!1&&gV(t.url))){const l=s&&i&&vV.read(i);l&&o.set(s,l)}return t},SV=typeof XMLHttpRequest<"u",wV=SV&&function(e){return new Promise(function(n,r){const s=iP(e);let i=s.data;const o=Er.from(s.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=s,c,d,f,p,v;function m(){p&&p(),v&&v(),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 S(){if(!y)return;const k=Er.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),_={data:!a||a==="text"||a==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:k,config:e,request:y};rP(function(R){n(R),m()},function(R){r(R),m()},_),y=null}"onloadend"in y?y.onloadend=S:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(S)},y.onabort=function(){y&&(r(new Qe("Request aborted",Qe.ECONNABORTED,e,y)),y=null)},y.onerror=function(T){const _=T&&T.message?T.message:"Network Error",C=new Qe(_,Qe.ERR_NETWORK,e,y);C.event=T||null,r(C),y=null},y.ontimeout=function(){let T=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const _=s.transitional||eP;s.timeoutErrorMessage&&(T=s.timeoutErrorMessage),r(new Qe(T,_.clarifyTimeoutError?Qe.ETIMEDOUT:Qe.ECONNABORTED,e,y)),y=null},i===void 0&&o.setContentType(null),"setRequestHeader"in y&&ie.forEach(o.toJSON(),function(T,_){y.setRequestHeader(_,T)}),ie.isUndefined(s.withCredentials)||(y.withCredentials=!!s.withCredentials),a&&a!=="json"&&(y.responseType=s.responseType),u&&([f,v]=Gf(u,!0),y.addEventListener("progress",f)),l&&y.upload&&([d,p]=Gf(l),y.upload.addEventListener("progress",d),y.upload.addEventListener("loadend",p)),(s.cancelToken||s.signal)&&(c=k=>{y&&(r(!k||k.type?new Kl(null,e,y):k),y.abort(),y=null)},s.cancelToken&&s.cancelToken.subscribe(c),s.signal&&(s.signal.aborted?c():s.signal.addEventListener("abort",c)));const b=hV(s.url);if(b&&Yn.protocols.indexOf(b)===-1){r(new Qe("Unsupported protocol "+b+":",Qe.ERR_BAD_REQUEST,e));return}y.send(i||null)})},_V=(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 Qe?c:new Kl(c instanceof Error?c.message:c))}};let o=t&&setTimeout(()=>{o=null,i(new Qe(`timeout ${t} of ms exceeded`,Qe.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=()=>ie.asap(a),l}},kV=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},xV=async function*(e,t){for await(const n of EV(e))yield*kV(n,t)},EV=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()}},g1=(e,t,n,r)=>{const s=xV(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})},v1=64*1024,{isFunction:bd}=ie,CV=(({Request:e,Response:t})=>({Request:e,Response:t}))(ie.global),{ReadableStream:y1,TextEncoder:b1}=ie.global,S1=(e,...t)=>{try{return!!e(...t)}catch{return!1}},TV=e=>{e=ie.merge.call({skipUndefined:!0},CV,e);const{fetch:t,Request:n,Response:r}=e,s=t?bd(t):typeof fetch=="function",i=bd(n),o=bd(r);if(!s)return!1;const a=s&&bd(y1),l=s&&(typeof b1=="function"?(v=>m=>v.encode(m))(new b1):async v=>new Uint8Array(await new n(v).arrayBuffer())),u=i&&a&&S1(()=>{let v=!1;const m=new n(Yn.origin,{body:new y1,method:"POST",get duplex(){return v=!0,"half"}}).headers.has("Content-Type");return v&&!m}),c=o&&a&&S1(()=>ie.isReadableStream(new r("").body)),d={stream:c&&(v=>v.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(v=>{!d[v]&&(d[v]=(m,y)=>{let S=m&&m[v];if(S)return S.call(m);throw new Qe(`Response type '${v}' is not supported`,Qe.ERR_NOT_SUPPORT,y)})});const f=async v=>{if(v==null)return 0;if(ie.isBlob(v))return v.size;if(ie.isSpecCompliantForm(v))return(await new n(Yn.origin,{method:"POST",body:v}).arrayBuffer()).byteLength;if(ie.isArrayBufferView(v)||ie.isArrayBuffer(v))return v.byteLength;if(ie.isURLSearchParams(v)&&(v=v+""),ie.isString(v))return(await l(v)).byteLength},p=async(v,m)=>{const y=ie.toFiniteNumber(v.getContentLength());return y??f(m)};return async v=>{let{url:m,method:y,data:S,signal:b,cancelToken:k,timeout:T,onDownloadProgress:_,onUploadProgress:C,responseType:R,headers:w,withCredentials:P="same-origin",fetchOptions:I}=iP(v),A=t||fetch;R=R?(R+"").toLowerCase():"text";let $=_V([b,k&&k.toAbortSignal()],T),K=null;const M=$&&$.unsubscribe&&(()=>{$.unsubscribe()});let L;try{if(C&&u&&y!=="get"&&y!=="head"&&(L=await p(w,S))!==0){let se=new n(m,{method:"POST",body:S,duplex:"half"}),z;if(ie.isFormData(S)&&(z=se.headers.get("content-type"))&&w.setContentType(z),se.body){const[U,le]=h1(L,Gf(p1(C)));S=g1(se.body,v1,U,le)}}ie.isString(P)||(P=P?"include":"omit");const j=i&&"credentials"in n.prototype,G={...I,signal:$,method:y.toUpperCase(),headers:w.normalize().toJSON(),body:S,duplex:"half",credentials:j?P:void 0};K=i&&new n(m,G);let B=await(i?A(K,I):A(m,G));const q=c&&(R==="stream"||R==="response");if(c&&(_||q&&M)){const se={};["status","statusText","headers"].forEach(J=>{se[J]=B[J]});const z=ie.toFiniteNumber(B.headers.get("content-length")),[U,le]=_&&h1(z,Gf(p1(_),!0))||[];B=new r(g1(B.body,v1,U,()=>{le&&le(),M&&M()}),se)}R=R||"text";let N=await d[ie.findKey(d,R)||"text"](B,v);return!q&&M&&M(),await new Promise((se,z)=>{rP(se,z,{data:N,headers:Er.from(B.headers),status:B.status,statusText:B.statusText,config:v,request:K})})}catch(j){throw M&&M(),j&&j.name==="TypeError"&&/Load failed|fetch/i.test(j.message)?Object.assign(new Qe("Network Error",Qe.ERR_NETWORK,v,K),{cause:j.cause||j}):Qe.from(j,j&&j.code,v,K)}}},RV=new Map,oP=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=RV;for(;a--;)l=i[a],u=c.get(l),u===void 0&&c.set(l,u=a?new Map:TV(t)),c=u;return u};oP();const Cb={http:qB,xhr:wV,fetch:{get:oP}};ie.forEach(Cb,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const w1=e=>`- ${e}`,PV=e=>ie.isFunction(e)||e===null||e===!1;function IV(e,t){e=ie.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,!PV(r)&&(s=Cb[(a=String(r)).toLowerCase()],s===void 0))throw new Qe(`Unknown adapter '${a}'`);if(s&&(ie.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 :
14
+ `+o.map(w1).join(`
15
+ `):" "+w1(o[0]):"as no adapter specified";throw new Qe("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return s}const aP={getAdapter:IV,adapters:Cb};function gm(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Kl(null,e)}function _1(e){return gm(e),e.headers=Er.from(e.headers),e.data=mm.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),aP.getAdapter(e.adapter||Gc.adapter,e)(e).then(function(r){return gm(e),r.data=mm.call(e,e.transformResponse,r),r.headers=Er.from(r.headers),r},function(r){return nP(r)||(gm(e),r&&r.response&&(r.response.data=mm.call(e,e.transformResponse,r.response),r.response.headers=Er.from(r.response.headers))),Promise.reject(r)})}const lP="1.13.2",rp={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{rp[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const k1={};rp.transitional=function(t,n,r){function s(i,o){return"[Axios v"+lP+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,a)=>{if(t===!1)throw new Qe(s(o," has been removed"+(n?" in "+n:"")),Qe.ERR_DEPRECATED);return n&&!k1[o]&&(k1[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}};rp.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function AV(e,t,n){if(typeof e!="object")throw new Qe("options must be an object",Qe.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 Qe("option "+i+" must be "+l,Qe.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Qe("Unknown option "+i,Qe.ERR_BAD_OPTION)}}const nf={assertOptions:AV,validators:rp},Ms=nf.validators;let Jo=class{constructor(t){this.defaults=t||{},this.interceptors={request:new d1,response:new d1}}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+=`
16
+ `+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=fa(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&nf.assertOptions(r,{silentJSONParsing:Ms.transitional(Ms.boolean),forcedJSONParsing:Ms.transitional(Ms.boolean),clarifyTimeoutError:Ms.transitional(Ms.boolean)},!1),s!=null&&(ie.isFunction(s)?n.paramsSerializer={serialize:s}:nf.assertOptions(s,{encode:Ms.function,serialize:Ms.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),nf.assertOptions(n,{baseUrl:Ms.spelling("baseURL"),withXsrfToken:Ms.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&ie.merge(i.common,i[n.method]);i&&ie.forEach(["delete","get","head","post","put","patch","common"],v=>{delete i[v]}),n.headers=Er.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 v=[_1.bind(this),void 0];for(v.unshift(...a),v.push(...u),f=v.length,c=Promise.resolve(n);d<f;)c=c.then(v[d++],v[d++]);return c}f=a.length;let p=n;for(;d<f;){const v=a[d++],m=a[d++];try{p=v(p)}catch(y){m.call(this,y);break}}try{c=_1.call(this,p)}catch(v){return Promise.reject(v)}for(d=0,f=u.length;d<f;)c=c.then(u[d++],u[d++]);return c}getUri(t){t=fa(this.defaults,t);const n=sP(t.baseURL,t.url,t.allowAbsoluteUrls);return ZR(n,t.params,t.paramsSerializer)}};ie.forEach(["delete","get","head","options"],function(t){Jo.prototype[t]=function(n,r){return this.request(fa(r||{},{method:t,url:n,data:(r||{}).data}))}});ie.forEach(["post","put","patch"],function(t){function n(r){return function(i,o,a){return this.request(fa(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}Jo.prototype[t]=n(),Jo.prototype[t+"Form"]=n(!0)});let OV=class uP{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 Kl(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 uP(function(s){t=s}),cancel:t}}};function DV(e){return function(n){return e.apply(null,n)}}function MV(e){return ie.isObject(e)&&e.isAxiosError===!0}const Pv={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Pv).forEach(([e,t])=>{Pv[t]=e});function cP(e){const t=new Jo(e),n=UR(Jo.prototype.request,t);return ie.extend(n,Jo.prototype,t,{allOwnKeys:!0}),ie.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return cP(fa(e,s))},n}const un=cP(Gc);un.Axios=Jo;un.CanceledError=Kl;un.CancelToken=OV;un.isCancel=nP;un.VERSION=lP;un.toFormData=np;un.AxiosError=Qe;un.Cancel=un.CanceledError;un.all=function(t){return Promise.all(t)};un.spread=DV;un.isAxiosError=MV;un.mergeConfig=fa;un.AxiosHeaders=Er;un.formToJSON=e=>tP(ie.isHTMLForm(e)?new FormData(e):e);un.getAdapter=aP.getAdapter;un.HttpStatusCode=Pv;un.default=un;const{Axios:voe,AxiosError:dP,CanceledError:yoe,isCancel:boe,CancelToken:Soe,VERSION:woe,all:_oe,Cancel:koe,isAxiosError:xoe,spread:Eoe,toFormData:Coe,AxiosHeaders:Toe,HttpStatusCode:Uo,formToJSON:Roe,getAdapter:Poe,mergeConfig:Ioe}=un;class Iu extends Error{}Iu.prototype.name="InvalidTokenError";function LV(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 FV(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 LV(t)}catch{return atob(t)}}function NV(e,t){if(typeof e!="string")throw new Iu("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 Iu(`Invalid token specified: missing part #${n+1}`);let s;try{s=FV(r)}catch(i){throw new Iu(`Invalid token specified: invalid base64 for part #${n+1} (${i.message})`)}try{return JSON.parse(s)}catch(i){throw new Iu(`Invalid token specified: invalid json for part #${n+1} (${i.message})`)}}function $V(e,t={}){const{onError:n,fallbackValue:r=null}=t,s=(i,o)=>{try{return NV(i,o)}catch(a){return n?.(a),r}};return{header:O(()=>s(Ut(e),{header:!0})),payload:O(()=>s(Ut(e)))}}class Lo{static async getLoginRequired(){return await(await Wn(!1,!1)).get("/api/auth/login-required")}static async postLogin(t,n){return await(await Wn(!1,!1)).post("/api/auth/login",{username:t,password:n})}static async logout(){return await(await Wn(!0,!1)).post("/api/auth/logout")}static async refreshLogin(t){return await(await Wn(!1,!1)).post("/api/auth/refresh",{refreshToken:t})}static async verifyLogin(){return await(await Wn(!0,!1)).post("/api/auth/verify")}static async registerAccount(t,n){return await(await Wn(!0,!1)).post("/api/auth/register",{username:t,password:n})}}const yr={IncorrectCredentials:"IncorrectCredentials",InvalidOrExpiredRefreshToken:"InvalidOrExpiredRefreshToken",InvalidOrExpiredAuthToken:"InvalidOrExpiredAuthToken",PasswordChangeRequired:"PasswordChangeRequired",LoginRequired:"LoginRequired",AccountNotVerified:"AccountNotVerified"};function Tb(e){switch(e){case yr.IncorrectCredentials:return"Incorrect credentials";case yr.InvalidOrExpiredRefreshToken:return"Invalid or expired refresh token";case yr.InvalidOrExpiredAuthToken:return"Invalid or expired auth token";case yr.PasswordChangeRequired:return"Password change required";case yr.LoginRequired:return"Login required";case yr.AccountNotVerified:return"Account not verified";default:return"Authentication error"}}const Zr=is("auth",{state:()=>({isDemoMode:null,token:null,refreshToken:null,loginRequired:null,registration:null,wizardState:null,lastLogoutReason:null}),actions:{async checkAuthenticationRequirements(){return await Lo.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=>{throw console.error("authRequired: failed to check login required",e.response?.status),e})},async login(e,t){return this.lastLogoutReason=null,await Lo.postLogin(e,t).then(n=>(this.setTokens(n.data.token,n.data.refreshToken),n.data)).catch(n=>{throw console.error("login: failed to login",n.response?.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 Lo.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(){try{return await Lo.verifyLogin(),{success:!0}}catch(e){console.error("[AuthStore.verifyOrRefreshLoginOnce]: failed to verify login",e);const t=e;if(!t.response||t.response?.status!==Uo.Unauthorized)throw console.error("[AuthStore.verifyOrRefreshLoginOnce]: unknown error",t.status),e;const{reasonCode:n,url:r}=this.extractSpecialReasonCode(e);if(n)return await this.logout(!1,Tb(n)),console.error(`[AuthStore] 401 Unauthorized - emitting 'auth:${n}' with reason ${n}`),Rn(`auth:${n}`).emit({url:r,error:t.message,reasonCode:n}),{success:!1,handled:!0};if(!this.hasRefreshToken)return{success:!1,handled:!1};try{await this.refreshLoginToken(),await Lo.verifyLogin()}catch(s){const i=s;if(i.response?.status===Uo.Unauthorized)return await this.logout(!1),console.error("[AuthStore.verifyOrRefreshLoginOnce]: failed to refresh token",i.status),{success:!1,handled:!1};throw s}return{success:!0,handled:!1}}},extractSpecialReasonCode(e){const t=e?.response?.data?.reasonCode;return t&&console.error("[AuthStore] 401 Unauthorized - Checking received reason code",t),t&&(t===yr.AccountNotVerified||t===yr.PasswordChangeRequired)?{reasonCode:t,url:e?.config?.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 Lo.refreshLogin(this.refreshToken).then(e=>(e?.data?.token&&this.setIdToken(e.data.token),!0)).catch(e=>{throw e.response?.status==Uo.Unauthorized?(this.setTokens(void 0,void 0),console.error("refreshLoginToken: authentication error, failed to refresh tokens",e.response?.status)):console.error("refreshLoginToken: unknown error, failed to refresh tokens",e.response?.status),e})},setTokens(e,t){this.setIdToken(e),this.setRefreshToken(t)},setIdToken(e){e?.length?(localStorage.setItem("token",e),this.token=e):localStorage.removeItem("token")},setRefreshToken(e){e?.length?(localStorage.setItem("refreshToken",e),this.refreshToken=e):localStorage.removeItem("refreshToken")}},getters:{hasRefreshToken(){return!!this.refreshToken},isLoginExpired(){const e=this.tokenClaims;return e?.exp?e.exp<Date.now()/1e3:!1},hasAuthToken(){return!!this.tokenClaims},tokenClaims(){if(!this.token)return null;const e=$V(this.token,{fallbackValue:null});return e?e.payload.value:null}}}),Be=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,at=globalThis,Zo="10.32.1";function Ta(){return sp(at),at}function sp(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Zo,t[Zo]=t[Zo]||{}}function Yl(e,t,n=at){const r=n.__SENTRY__=n.__SENTRY__||{},s=r[Zo]=r[Zo]||{};return s[e]||(s[e]=t())}const BV=["debug","info","warn","error","log","assert","trace"],VV="Sentry Logger ",Kf={};function Mi(e){if(!("console"in at))return e();const t=at.console,n={},r=Object.keys(Kf);r.forEach(s=>{const i=Kf[s];n[s]=t[s],t[s]=i});try{return e()}finally{r.forEach(s=>{t[s]=n[s]})}}function UV(){Pb().enabled=!0}function zV(){Pb().enabled=!1}function fP(){return Pb().enabled}function HV(...e){Rb("log",...e)}function jV(...e){Rb("warn",...e)}function qV(...e){Rb("error",...e)}function Rb(e,...t){Be&&fP()&&Mi(()=>{at.console[e](`${VV}[${e}]:`,...t)})}function Pb(){return Be?Yl("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const Re={enable:UV,disable:zV,isEnabled:fP,log:HV,warn:jV,error:qV},hP=50,ha="?",x1=/\(error: (.*)\)/,E1=/captureMessage|captureException/;function pP(...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(`
17
+ `);for(let a=r;a<o.length;a++){let l=o[a];l.length>1024&&(l=l.slice(0,1024));const u=x1.test(l)?l.replace(x1,"$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>=hP+s)break}}return GV(i.slice(s))}}function WV(e){return Array.isArray(e)?pP(...e):e}function GV(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(Sd(t).function||"")&&t.pop(),t.reverse(),E1.test(Sd(t).function||"")&&(t.pop(),E1.test(Sd(t).function||"")&&t.pop()),t.slice(0,hP).map(n=>({...n,filename:n.filename||Sd(t).filename,function:n.function||ha}))}function Sd(e){return e[e.length-1]||{}}const vm="<anonymous>";function Ci(e){try{return!e||typeof e!="function"?vm:e.name||vm}catch{return vm}}function C1(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}}}function mP(e){return"__v_isVNode"in e&&e.__v_isVNode?"[VueVNode]":"[VueViewModel]"}const rf={},T1={};function yo(e,t){rf[e]=rf[e]||[],rf[e].push(t)}function bo(e,t){if(!T1[e]){T1[e]=!0;try{t()}catch(n){Be&&Re.error(`Error while instrumenting ${e}`,n)}}}function Qr(e,t){const n=e&&rf[e];if(n)for(const r of n)try{r(t)}catch(s){Be&&Re.error(`Error while triggering instrumentation handler.
18
+ Type: ${e}
19
+ Name: ${Ci(r)}
20
+ Error:`,s)}}let ym=null;function gP(e){const t="error";yo(t,e),bo(t,KV)}function KV(){ym=at.onerror,at.onerror=function(e,t,n,r,s){return Qr("error",{column:r,error:s,line:n,msg:e,url:t}),ym?ym.apply(this,arguments):!1},at.onerror.__SENTRY_INSTRUMENTED__=!0}let bm=null;function vP(e){const t="unhandledrejection";yo(t,e),bo(t,YV)}function YV(){bm=at.onunhandledrejection,at.onunhandledrejection=function(e){return Qr("unhandledrejection",e),bm?bm.apply(this,arguments):!0},at.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const yP=Object.prototype.toString;function Ib(e){switch(yP.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Ti(e,Error)}}function Xl(e,t){return yP.call(e)===`[object ${t}]`}function bP(e){return Xl(e,"ErrorEvent")}function R1(e){return Xl(e,"DOMError")}function XV(e){return Xl(e,"DOMException")}function mi(e){return Xl(e,"String")}function Ab(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function bl(e){return e===null||Ab(e)||typeof e!="object"&&typeof e!="function"}function fc(e){return Xl(e,"Object")}function ip(e){return typeof Event<"u"&&Ti(e,Event)}function QV(e){return typeof Element<"u"&&Ti(e,Element)}function JV(e){return Xl(e,"RegExp")}function Ql(e){return!!(e?.then&&typeof e.then=="function")}function ZV(e){return fc(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function Ti(e,t){try{return e instanceof t}catch{return!1}}function SP(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue||e.__v_isVNode))}function Ob(e){return typeof Request<"u"&&Ti(e,Request)}const Db=at,eU=80;function Rr(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||eU;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?.tagName)return"";if(Db.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?.length?t.filter(o=>n.getAttribute(o)).map(o=>[o,n.getAttribute(o)]):null;if(s?.length)s.forEach(o=>{r.push(`[${o[0]}="${o[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const o=n.className;if(o&&mi(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 Jl(){try{return Db.document.location.href}catch{return""}}function wP(e){if(!Db.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 Sr(e,t,n){if(!(t in e))return;const r=e[t];if(typeof r!="function")return;const s=n(r);typeof s=="function"&&_P(s,r);try{e[t]=s}catch{Be&&Re.log(`Failed to replace method "${t}" in object`,e)}}function $r(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{Be&&Re.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function _P(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,$r(e,"__sentry_original__",t)}catch{}}function Mb(e){return e.__sentry_original__}function kP(e){if(Ib(e))return{message:e.message,name:e.name,stack:e.stack,...I1(e)};if(ip(e)){const t={type:e.type,target:P1(e.target),currentTarget:P1(e.currentTarget),...I1(e)};return typeof CustomEvent<"u"&&Ti(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function P1(e){try{return QV(e)?Rr(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function I1(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 nU(e){const t=Object.keys(kP(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}function Iv(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function A1(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const s=e[r];try{SP(s)?n.push(mP(s)):n.push(String(s))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function sf(e,t,n=!1){return mi(e)?JV(t)?t.test(e):mi(t)?n?e===t:e.includes(t):!1:!1}function gi(e,t=[],n=!1){return t.some(r=>sf(e,r,n))}function rU(){const e=at;return e.crypto||e.msCrypto}let Sm;function sU(){return Math.random()*16}function Nr(e=rU()){try{if(e?.randomUUID)return e.randomUUID().replace(/-/g,"")}catch{}return Sm||(Sm="10000000100040008000"+1e11),Sm.replace(/[018]/g,t=>(t^(sU()&15)>>t/4).toString(16))}function xP(e){return e.exception?.values?.[0]}function Bo(e){const{message:t,event_id:n}=e;if(t)return t;const r=xP(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Av(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 Sl(e,t){const n=xP(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?.data,...t.data};n.mechanism.data=i}}function O1(e){if(iU(e))return!0;try{$r(e,"__sentry_captured__",!0)}catch{}return!1}function iU(e){try{return e.__sentry_captured__}catch{}}const EP=1e3;function Ra(){return Date.now()/EP}function oU(){const{performance:e}=at;if(!e?.now||!e.timeOrigin)return Ra;const t=e.timeOrigin;return()=>(t+e.now())/EP}let D1;function fn(){return(D1??(D1=oU()))()}let wm;function aU(){const{performance:e}=at;if(!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=e.timing?.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 Ar(){return wm||(wm=aU()),wm[0]}function lU(e){const t=fn(),n={sid:Nr(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>cU(n)};return e&&wl(n,e),n}function wl(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||fn(),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:Nr()),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 uU(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),wl(e,n)}function cU(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 Kc(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]=Kc(r[s],t[s],n-1));return r}function Ri(){return Nr()}function vi(){return Nr().substring(16)}const Ov="_sentrySpan";function _l(e,t){t?$r(e,Ov,t):delete e[Ov]}function Yf(e){return e[Ov]}const dU=100;class Ks{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Ri(),sampleRand:Math.random()}}clone(){const t=new Ks;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},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,_l(t,Yf(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&&wl(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.setTags({[t]:n})}setAttributes(t){return this._attributes={...this._attributes,...t},this._notifyScopeListeners(),this}setAttribute(t,n){return this.setAttributes({[t]:n})}removeAttribute(t){return t in this._attributes&&(delete this._attributes[t],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 Ks?n.getScopeData():fc(n)?t:void 0,{tags:s,attributes:i,extra:o,user:a,contexts:l,level:u,fingerprint:c=[],propagationContext:d}=r||{};return this._tags={...this._tags,...s},this._attributes={...this._attributes,...i},this._extra={...this._extra,...o},this._contexts={...this._contexts,...l},a&&Object.keys(a).length&&(this._user=a),u&&(this._level=u),c.length&&(this._fingerprint=c),d&&(this._propagationContext=d),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,_l(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Ri(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:dU;if(r<=0)return this;const s={timestamp:Ra(),...t,message:t.message?Iv(t.message,2048):t.message};return this._breadcrumbs.push(s),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),this._client?.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,attributes:this._attributes,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:Yf(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=Kc(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n?.event_id||Nr();if(!this._client)return Be&&Re.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?.event_id||Nr();if(!this._client)return Be&&Re.warn("No client configured on scope - will not capture message!"),s;const i=r?.syntheticException??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?.event_id||Nr();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(Be&&Re.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 Yl("defaultCurrentScope",()=>new Ks)}function hU(){return Yl("defaultIsolationScope",()=>new Ks)}class pU{constructor(t,n){let r;t?r=t:r=new Ks;let s;n?s=n:s=new Ks,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 Ql(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 kl(){const e=Ta(),t=sp(e);return t.stack=t.stack||new pU(fU(),hU())}function mU(e){return kl().withScope(e)}function gU(e,t){const n=kl();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function M1(e){return kl().withScope(()=>e(kl().getIsolationScope()))}function vU(){return{withIsolationScope:M1,withScope:mU,withSetScope:gU,withSetIsolationScope:(e,t)=>M1(t),getCurrentScope:()=>kl().getScope(),getIsolationScope:()=>kl().getIsolationScope()}}function Zl(e){const t=sp(e);return t.acs?t.acs:vU()}function xt(){const e=Ta();return Zl(e).getCurrentScope()}function Zs(){const e=Ta();return Zl(e).getIsolationScope()}function yU(){return Yl("globalScope",()=>new Ks)}function op(...e){const t=Ta(),n=Zl(t);if(e.length===2){const[r,s]=e;return r?n.withSetScope(r,s):n.withScope(s)}return n.withScope(e[0])}function lt(){return xt().getClient()}function bU(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:s}=t,i={trace_id:n,span_id:s||vi()};return r&&(i.parent_span_id=r),i}const wr="sentry.source",Lb="sentry.sample_rate",CP="sentry.previous_trace_sample_rate",Pi="sentry.op",tn="sentry.origin",hc="sentry.idle_span_finish_reason",Yc="sentry.measurement_unit",Xc="sentry.measurement_value",L1="sentry.custom_span_name",Fb="sentry.profile_id",eu="sentry.exclusive_time",SU="sentry.link.type",wU=0,Nb=1,_n=2;function _U(e){if(e<400&&e>=100)return{code:Nb};if(e>=400&&e<500)switch(e){case 401:return{code:_n,message:"unauthenticated"};case 403:return{code:_n,message:"permission_denied"};case 404:return{code:_n,message:"not_found"};case 409:return{code:_n,message:"already_exists"};case 413:return{code:_n,message:"failed_precondition"};case 429:return{code:_n,message:"resource_exhausted"};case 499:return{code:_n,message:"cancelled"};default:return{code:_n,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:_n,message:"unimplemented"};case 503:return{code:_n,message:"unavailable"};case 504:return{code:_n,message:"deadline_exceeded"};default:return{code:_n,message:"internal_error"}}return{code:_n,message:"internal_error"}}function TP(e,t){e.setAttribute("http.response.status_code",t);const n=_U(t);n.message!=="unknown_error"&&e.setStatus(n)}const RP="_sentryScope",PP="_sentryIsolationScope";function kU(e){try{const t=at.WeakRef;if(typeof t=="function")return new t(e)}catch{}return e}function xU(e){if(e){if(typeof e=="object"&&"deref"in e&&typeof e.deref=="function")try{return e.deref()}catch{return}return e}}function EU(e,t,n){e&&($r(e,PP,kU(n)),$r(e,RP,t))}function Xf(e){const t=e;return{scope:t[RP],isolationScope:xU(t[PP])}}const $b="sentry-",CU=/^sentry-/,TU=8192;function IP(e){const t=PU(e);if(!t)return;const n=Object.entries(t).reduce((r,[s,i])=>{if(s.match(CU)){const o=s.slice($b.length);r[o]=i}return r},{});if(Object.keys(n).length>0)return n}function RU(e){if(!e)return;const t=Object.entries(e).reduce((n,[r,s])=>(s&&(n[`${$b}${r}`]=s),n),{});return IU(t)}function PU(e){if(!(!e||!mi(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=F1(n);return Object.entries(r).forEach(([s,i])=>{t[s]=i}),t},{}):F1(e)}function F1(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 IU(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>TU?(Be&&Re.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):o},"")}const AU=/^o(\d+)\./,OU=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function DU(e){return e==="http"||e==="https"}function tu(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 MU(e){const t=OU.exec(e);if(!t){Mi(()=>{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 AP({host:i,pass:s,path:l,projectId:u,port:o,protocol:n,publicKey:r})}function AP(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function LU(e){if(!Be)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(o=>e[o]?!1:(Re.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:n.match(/^\d+$/)?DU(r)?t&&isNaN(parseInt(t,10))?(Re.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(Re.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(Re.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function FU(e){return e.match(AU)?.[1]}function NU(e){const t=e.getOptions(),{host:n}=e.getDsn()||{};let r;return t.orgId?r=String(t.orgId):n&&(r=FU(n)),r}function $U(e){const t=typeof e=="string"?MU(e):AP(e);if(!(!t||!LU(t)))return t}function pa(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 OP=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function BU(e){if(!e)return;const t=e.match(OP);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 VU(e,t){const n=BU(e),r=IP(t);if(!n?.traceId)return{traceId:Ri(),sampleRand:Math.random()};const s=UU(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 DP(e=Ri(),t=vi(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function MP(e=Ri(),t=vi(),n){return`00-${e}-${t}-${n?"01":"00"}`}function UU(e,t){const n=pa(t?.sample_rand);if(n!==void 0)return n;const r=pa(t?.sample_rate);return r&&e?.parentSampled!==void 0?e.parentSampled?Math.random()*r:r+Math.random()*(1-r):Math.random()}const LP=0,Bb=1;let N1=!1;function zU(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:s,parent_span_id:i,status:o,origin:a,links:l}=dt(e);return{parent_span_id:i,span_id:t,trace_id:n,data:r,op:s,status:o,origin:a,links:l}}function HU(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),s=r?t:dt(e).parent_span_id,i=Xf(e).scope,o=r?i?.getPropagationContext().propagationSpanId||vi():t;return{parent_span_id:s,span_id:o,trace_id:n}}function jU(e){const{traceId:t,spanId:n}=e.spanContext(),r=So(e);return DP(t,n,r)}function qU(e){const{traceId:t,spanId:n}=e.spanContext(),r=So(e);return MP(t,n,r)}function FP(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===Bb,attributes:i,...s}))}function ea(e){return typeof e=="number"?$1(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?$1(e.getTime()):fn()}function $1(e){return e>9999999999?e/1e3:e}function dt(e){if(GU(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(WU(e)){const{attributes:r,startTime:s,name:i,endTime:o,status:a,links:l}=e,u="parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0;return{span_id:t,trace_id:n,data:r,description:i,parent_span_id:u,start_timestamp:ea(s),timestamp:ea(o)||void 0,status:NP(a),op:r[Pi],origin:r[tn],links:FP(l)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function WU(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function GU(e){return typeof e.getSpanJSON=="function"}function So(e){const{traceFlags:t}=e.spanContext();return t===Bb}function NP(e){if(!(!e||e.code===wU))return e.code===Nb?"ok":e.message||"internal_error"}const ta="_sentryChildSpans",Dv="_sentryRootSpan";function $P(e,t){const n=e[Dv]||e;$r(t,Dv,n),e[ta]?e[ta].add(t):$r(e,ta,new Set([t]))}function KU(e,t){e[ta]&&e[ta].delete(t)}function of(e){const t=new Set;function n(r){if(!t.has(r)&&So(r)){t.add(r);const s=r[ta]?Array.from(r[ta]):[];for(const i of s)n(i)}}return n(e),Array.from(t)}function $n(e){return e[Dv]||e}function Hn(){const e=Ta(),t=Zl(e);return t.getActiveSpan?t.getActiveSpan():Yf(xt())}function Mv(){N1||(Mi(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),N1=!0)}let B1=!1;function YU(){if(B1)return;function e(){const t=Hn(),n=t&&$n(t);if(n){const r="internal_error";Be&&Re.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:_n,message:r})}}e.tag="sentry_tracingErrorCallback",B1=!0,gP(e),vP(e)}function Jr(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=e||lt()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function V1(e){Re.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function Qf(e,t){if(!t?.length||!e.description)return!1;for(const n of t){if(QU(n)){if(sf(e.description,n))return Be&&V1(e),!0;continue}if(!n.name&&!n.op)continue;const r=n.name?sf(e.description,n.name):!0,s=n.op?e.op&&sf(e.op,n.op):!0;if(r&&s)return Be&&V1(e),!0}return!1}function XU(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 QU(e){return typeof e=="string"||e instanceof RegExp}const Vb="production",BP="_frozenDsc";function af(e,t){$r(e,BP,t)}function VP(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},s={environment:n.environment||Vb,release:n.release,public_key:r,trace_id:e,org_id:NU(t)};return t.emit("createDsc",s),s}function UP(e,t){const n=t.getPropagationContext();return n.dsc||VP(n.traceId,e)}function Ii(e){const t=lt();if(!t)return{};const n=$n(e),r=dt(n),s=r.data,i=n.spanContext().traceState,o=i?.get("sentry.sample_rate")??s[Lb]??s[CP];function a(v){return(typeof o=="number"||typeof o=="string")&&(v.sample_rate=`${o}`),v}const l=n[BP];if(l)return a(l);const u=i?.get("sentry.dsc"),c=u&&IP(u);if(c)return a(c);const d=VP(e.spanContext().traceId,t),f=s[wr],p=r.description;return f!=="url"&&p&&(d.transaction=p),Jr()&&(d.sampled=String(So(n)),d.sample_rand=i?.get("sentry.sample_rand")??Xf(n).scope?.getPropagationContext().sampleRand.toString()),a(d),t.emit("createDsc",d,n),d}class lo{constructor(t={}){this._traceId=t.traceId||Ri(),this._spanId=t.spanId||vi()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:LP}}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 ds(e,t=100,n=1/0){try{return Lv("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function zP(e,t=3,n=100*1024){const r=ds(e,t);return t3(r)>n?zP(e,t-1,n):r}function Lv(e,t,n=1/0,r=1/0,s=n3()){const[i,o]=s;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const a=JU(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 p=u.toJSON();return Lv("",p,l-1,r,s)}catch{}const c=Array.isArray(t)?[]:{};let d=0;const f=kP(t);for(const p in f){if(!Object.prototype.hasOwnProperty.call(f,p))continue;if(d>=r){c[p]="[MaxProperties ~]";break}const v=f[p];c[p]=Lv(p,v,l-1,r,s),d++}return o(t),c}function JU(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(SP(t))return mP(t);if(ZV(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${Ci(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=ZU(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function ZU(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function e3(e){return~-encodeURI(e).split(/%..|./).length}function t3(e){return e3(JSON.stringify(e))}function n3(){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 wo(e,t=[]){return[e,t]}function r3(e,t){const[n,r]=e;return[n,[...r,t]]}function U1(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 Fv(e){const t=sp(at);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function s3(e){const[t,n]=e;let r=JSON.stringify(t);function s(i){typeof r=="string"?r=typeof i=="string"?r+i:[Fv(r),i]:r.push(typeof i=="string"?Fv(i):i)}for(const i of n){const[o,a]=i;if(s(`
21
+ ${JSON.stringify(o)}
22
+ `),typeof a=="string"||a instanceof Uint8Array)s(a);else{let l;try{l=JSON.stringify(a)}catch{l=JSON.stringify(ds(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 o3(e){return[{type:"span"},e]}function a3(e){const t=typeof e.data=="string"?Fv(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const l3={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 z1(e){return l3[e]}function Ub(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function HP(e,t,n,r){const s=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:tu(r)},...s&&{trace:s}}}function u3(e,t){if(!t)return e;const n=e.sdk||{};return e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0},e}function c3(e,t,n,r){const s=Ub(n),i={sent_at:new Date().toISOString(),...s&&{sdk:s},...!!r&&t&&{dsn:tu(t)}},o="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return wo(i,[o])}function d3(e,t,n,r){const s=Ub(n),i=e.type&&e.type!=="replay_event"?e.type:"event";u3(e,n?.sdk);const o=HP(e,s,r,t);return delete e.sdkProcessingMetadata,wo(o,[[{type:i},e]])}function f3(e,t){function n(p){return!!p.trace_id&&!!p.public_key}const r=Ii(e[0]),s=t?.getDsn(),i=t?.getOptions().tunnel,o={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!i&&s&&{dsn:tu(s)}},{beforeSendSpan:a,ignoreSpans:l}=t?.getOptions()||{},u=l?.length?e.filter(p=>!Qf(dt(p),l)):e,c=e.length-u.length;c&&t?.recordDroppedEvent("before_send","span",c);const d=a?p=>{const v=dt(p),m=a(v);return m||(Mv(),v)}:dt,f=[];for(const p of u){const v=d(p);v&&f.push(o3(v))}return wo(o,f)}function h3(e){if(!Be)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=dt(e),{spanId:s}=e.spanContext(),i=So(e),o=$n(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}=dt(o);u.push(`root ID: ${o.spanContext().spanId}`),c&&u.push(`root op: ${c}`),d&&u.push(`root description: ${d}`)}Re.log(`${l}
23
+ ${u.join(`
24
+ `)}`)}function p3(e){if(!Be)return;const{description:t="< unknown name >",op:n="< unknown op >"}=dt(e),{spanId:r}=e.spanContext(),i=$n(e)===e,o=`[Tracing] Finishing "${n}" ${i?"root ":""}span "${t}" with ID ${r}`;Re.log(o)}function m3(e,t,n,r=Hn()){const s=r&&$n(r);s&&(Be&&Re.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),s.addEvent(e,{[Xc]:t,[Yc]:n}))}function H1(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},s=r[Yc],i=r[Xc];typeof s=="string"&&typeof i=="number"&&(t[n.name]={value:i,unit:s})}),t}const j1=1e3;class ap{constructor(t={}){this._traceId=t.traceId||Ri(),this._spanId=t.spanId||vi(),this._startTime=t.startTimestamp||fn(),this._links=t.links,this._attributes={},this.setAttributes({[tn]:"manual",[Pi]: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?Bb:LP}}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=ea(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute(wr,"custom"),this}end(t){this._endTime||(this._endTime=ea(t),p3(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[Pi],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:NP(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[tn],profile_id:this._attributes[Fb],exclusive_time:this._attributes[eu],measurements:H1(this._events),is_segment:this._isStandaloneSpan&&$n(this)===this||void 0,segment_id:this._isStandaloneSpan?$n(this).spanContext().spanId:void 0,links:FP(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){Be&&Re.log("[Tracing] Adding an event to span:",t);const s=q1(n)?n:r||fn(),i=q1(n)?{}:n||{},o={name:t,time:ea(s),attributes:i};return this._events.push(o),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=lt();if(t&&t.emit("spanEnd",this),!(this._isStandaloneSpan||this===$n(this)))return;if(this._isStandaloneSpan){this._sampled?v3(f3([this],t)):(Be&&Re.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&&(Xf(this).scope||xt()).captureEvent(r)}_convertSpanToTransaction(){if(!W1(dt(this)))return;this._name||(Be&&Re.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:t,isolationScope:n}=Xf(this),r=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;const i=of(this).filter(c=>c!==this&&!g3(c)).map(c=>dt(c)).filter(W1),o=this._attributes[wr];delete this._attributes[L1],i.forEach(c=>{delete c.data[L1]});const a={contexts:{trace:zU(this)},spans:i.length>j1?i.sort((c,d)=>c.start_timestamp-d.start_timestamp).slice(0,j1):i,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,dynamicSamplingContext:Ii(this)},request:r,...o&&{transaction_info:{source:o}}},l=H1(this._events);return l&&Object.keys(l).length&&(Be&&Re.log("[Measurements] Adding measurements to transaction event",JSON.stringify(l,void 0,2)),a.measurements=l),a}}function q1(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function W1(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function g3(e){return e instanceof ap&&e.isStandaloneSpan()}function v3(e){const t=lt();if(!t)return;const n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}function y3(e,t,n=()=>{},r=()=>{}){let s;try{s=e()}catch(i){throw t(i),n(),i}return b3(s,t,n,r)}function b3(e,t,n,r){return Ql(e)?e.then(s=>(n(),r(s),s),s=>{throw t(s),n(),s}):(n(),r(e),e)}function S3(e,t,n){if(!Jr(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=pa(s);if(i===void 0)return Be&&Re.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 Be&&Re.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||Be&&Re.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(s)})`),[o,i,r]}const jP="__SENTRY_SUPPRESS_TRACING__";function w3(e,t){const n=Hb();if(n.startSpan)return n.startSpan(e,t);const r=WP(e),{forceTransaction:s,parentSpan:i,scope:o}=e,a=o?.clone();return op(a,()=>k3(i)(()=>{const u=xt(),c=GP(u,i),f=e.onlyIfParent&&!c?new lo:qP({parentSpan:c,spanArguments:r,forceTransaction:s,scope:u});return _l(u,f),y3(()=>t(f),()=>{const{status:p}=dt(f);f.isRecording()&&(!p||p==="ok")&&f.setStatus({code:_n,message:"internal_error"})},()=>{f.end()})}))}function uo(e){const t=Hb();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=WP(e),{forceTransaction:r,parentSpan:s}=e;return(e.scope?o=>op(e.scope,o):s!==void 0?o=>zb(s,o):o=>o())(()=>{const o=xt(),a=GP(o,s);return e.onlyIfParent&&!a?new lo:qP({parentSpan:a,spanArguments:n,forceTransaction:r,scope:o})})}function zb(e,t){const n=Hb();return n.withActiveSpan?n.withActiveSpan(e,t):op(r=>(_l(r,e||void 0),t(r)))}function qP({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!Jr()){const o=new lo;if(n||!e){const a={sampled:"false",sample_rate:"0",transaction:t.name,...Ii(o)};af(o,a)}return o}const s=Zs();let i;if(e&&!n)i=_3(e,r,t),$P(e,i);else if(e){const o=Ii(e),{traceId:a,spanId:l}=e.spanContext(),u=So(e);i=G1({traceId:a,parentSpanId:l,...t},r,u),af(i,o)}else{const{traceId:o,dsc:a,parentSpanId:l,sampled:u}={...s.getPropagationContext(),...r.getPropagationContext()};i=G1({traceId:o,parentSpanId:l,...t},r,u),a&&af(i,a)}return h3(i),EU(i,r,s),i}function WP(e){const n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const r={...n};return r.startTimestamp=ea(e.startTime),delete r.startTime,r}return n}function Hb(){const e=Ta();return Zl(e)}function G1(e,t,n){const r=lt(),s=r?.getOptions()||{},{name:i=""}=e,o={spanAttributes:{...e.attributes},spanName:i,parentSampled:n};r?.emit("beforeSampling",o,{decision:!1});const a=o.parentSampled??n,l=o.spanAttributes,u=t.getPropagationContext(),[c,d,f]=t.getScopeData().sdkProcessingMetadata[jP]?[!1]:S3(s,{name:i,parentSampled:a,attributes:l,parentSampleRate:pa(u.dsc?.sample_rate)},u.sampleRand),p=new ap({...e,attributes:{[wr]:"custom",[Lb]:d!==void 0&&f?d:void 0,...l},sampled:c});return!c&&r&&(Be&&Re.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),r.recordDroppedEvent("sample_rate","transaction")),r&&r.emit("spanStart",p),p}function _3(e,t,n){const{spanId:r,traceId:s}=e.spanContext(),i=t.getScopeData().sdkProcessingMetadata[jP]?!1:So(e),o=i?new ap({...n,parentSpanId:r,traceId:s,sampled:i}):new lo({traceId:s});$P(e,o);const a=lt();return a&&(a.emit("spanStart",o),n.endTimestamp&&a.emit("spanEnd",o)),o}function GP(e,t){if(t)return t;if(t===null)return;const n=Yf(e);if(!n)return;const r=lt();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?$n(n):n}function k3(e){return e!==void 0?t=>zb(e,t):t=>t()}const lf={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},x3="heartbeatFailed",E3="idleTimeout",C3="finalTimeout",T3="externalFinish";function KP(e,t={}){const n=new Map;let r=!1,s,i=T3,o=!t.disableAutoFinish;const a=[],{idleTimeout:l=lf.idleTimeout,finalTimeout:u=lf.finalTimeout,childSpanTimeout:c=lf.childSpanTimeout,beforeSpanEnd:d,trimIdleSpanEndTimestamp:f=!0}=t,p=lt();if(!p||!Jr()){const R=new lo,w={sample_rate:"0",sampled:"false",...Ii(R)};return af(R,w),R}const v=xt(),m=Hn(),y=R3(e);y.end=new Proxy(y.end,{apply(R,w,P){if(d&&d(y),w instanceof lo)return;const[I,...A]=P,$=I||fn(),K=ea($),M=of(y).filter(N=>N!==y),L=dt(y);if(!M.length||!f)return C(K),Reflect.apply(R,w,[K,...A]);const j=p.getOptions().ignoreSpans,G=M?.reduce((N,se)=>{const z=dt(se);return!z.timestamp||j&&Qf(z,j)?N:N?Math.max(N,z.timestamp):z.timestamp},void 0),B=L.start_timestamp,q=Math.min(B?B+u/1e3:1/0,Math.max(B||-1/0,Math.min(K,G||1/0)));return C(q),Reflect.apply(R,w,[q,...A])}});function S(){s&&(clearTimeout(s),s=void 0)}function b(R){S(),s=setTimeout(()=>{!r&&n.size===0&&o&&(i=E3,y.end(R))},l)}function k(R){s=setTimeout(()=>{!r&&o&&(i=x3,y.end(R))},c)}function T(R){S(),n.set(R,!0);const w=fn();k(w+c/1e3)}function _(R){if(n.has(R)&&n.delete(R),n.size===0){const w=fn();b(w+l/1e3)}}function C(R){r=!0,n.clear(),a.forEach(M=>M()),_l(v,m);const w=dt(y),{start_timestamp:P}=w;if(!P)return;w.data[hc]||y.setAttribute(hc,i);const A=w.status;(!A||A==="unknown")&&y.setStatus({code:Nb}),Re.log(`[Tracing] Idle span "${w.op}" finished`);const $=of(y).filter(M=>M!==y);let K=0;$.forEach(M=>{M.isRecording()&&(M.setStatus({code:_n,message:"cancelled"}),M.end(R),Be&&Re.log("[Tracing] Cancelling span since span ended early",JSON.stringify(M,void 0,2)));const L=dt(M),{timestamp:j=0,start_timestamp:G=0}=L,B=G<=R,q=(u+l)/1e3,N=j-G<=q;if(Be){const se=JSON.stringify(M,void 0,2);B?N||Re.log("[Tracing] Discarding span since it finished after idle span final timeout",se):Re.log("[Tracing] Discarding span since it happened after idle span was finished",se)}(!N||!B)&&(KU(y,M),K++)}),K>0&&y.setAttribute("sentry.idle_span_discarded_spans",K)}return a.push(p.on("spanStart",R=>{if(r||R===y||dt(R).timestamp||R instanceof ap&&R.isStandaloneSpan())return;of(y).includes(R)&&T(R.spanContext().spanId)})),a.push(p.on("spanEnd",R=>{r||_(R.spanContext().spanId)})),a.push(p.on("idleSpanEnableAutoFinish",R=>{R===y&&(o=!0,b(),n.size&&k())})),t.disableAutoFinish||b(),setTimeout(()=>{r||(y.setStatus({code:_n,message:"deadline_exceeded"}),i=C3,y.end())},u),y}function R3(e){const t=uo(e);return _l(xt(),t),Be&&Re.log("[Tracing] Started span is an idle span"),t}const _m=0,K1=1,Y1=2;function lp(e){return new pc(t=>{t(e)})}function jb(e){return new pc((t,n)=>{n(e)})}class pc{constructor(t){this._state=_m,this._handlers=[],this._runExecutor(t)}then(t,n){return new pc((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 pc((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===_m)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===K1&&n[1](this._value),this._state===Y1&&n[2](this._value),n[0]=!0)})}_runExecutor(t){const n=(i,o)=>{if(this._state===_m){if(Ql(o)){o.then(r,s);return}this._state=i,this._value=o,this._executeHandlers()}},r=i=>{n(K1,i)},s=i=>{n(Y1,i)};try{t(r,s)}catch(i){s(i)}}}function P3(e,t,n,r=0){try{const s=Nv(t,n,e,r);return Ql(s)?s:lp(s)}catch(s){return jb(s)}}function Nv(e,t,n,r){const s=n[r];if(!e||!s)return e;const i=s({...e},t);return Be&&i===null&&Re.log(`Event processor "${s.id||"?"}" dropped event`),Ql(i)?i.then(o=>Nv(o,t,n,r+1)):Nv(i,t,n,r+1)}function I3(e,t){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:i}=t;A3(e,t),r&&M3(e,r),L3(e,n),O3(e,s),D3(e,i)}function X1(e,t){const{extra:n,tags:r,attributes:s,user:i,contexts:o,level:a,sdkProcessingMetadata:l,breadcrumbs:u,fingerprint:c,eventProcessors:d,attachments:f,propagationContext:p,transactionName:v,span:m}=t;bu(e,"extra",n),bu(e,"tags",r),bu(e,"attributes",s),bu(e,"user",i),bu(e,"contexts",o),e.sdkProcessingMetadata=Kc(e.sdkProcessingMetadata,l,2),a&&(e.level=a),v&&(e.transactionName=v),m&&(e.span=m),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),c.length&&(e.fingerprint=[...e.fingerprint,...c]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...p}}function bu(e,t,n){e[t]=Kc(e[t],n,1)}function A3(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 O3(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function D3(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function M3(e,t){e.contexts={trace:HU(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Ii(t),...e.sdkProcessingMetadata};const n=$n(t),r=dt(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function L3(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 Po,Q1,J1,Ni;function F3(e){const t=at._sentryDebugIds,n=at._debugIds;if(!t&&!n)return{};const r=t?Object.keys(t):[],s=n?Object.keys(n):[];if(Ni&&r.length===Q1&&s.length===J1)return Ni;Q1=r.length,J1=s.length,Ni={},Po||(Po={});const i=(o,a)=>{for(const l of o){const u=a[l],c=Po?.[l];if(c&&Ni&&u)Ni[c[0]]=u,Po&&(Po[l]=[c[0],u]);else if(u){const d=e(l);for(let f=d.length-1;f>=0;f--){const v=d[f]?.filename;if(v&&Ni&&Po){Ni[v]=u,Po[l]=[v,u];break}}}}};return t&&i(r,t),n&&i(s,n),Ni}function YP(e,t,n,r,s,i){const{normalizeDepth:o=3,normalizeMaxBreadth:a=1e3}=e,l={...t,event_id:t.event_id||n.event_id||Nr(),timestamp:t.timestamp||Ra()},u=n.integrations||e.integrations.map(y=>y.name);N3(l,e),V3(l,u),s&&s.emit("applyFrameMetadata",t),t.type===void 0&&$3(l,e.stackParser);const c=z3(r,n.captureContext);n.mechanism&&Sl(l,n.mechanism);const d=s?s.getEventProcessors():[],f=yU().getScopeData();if(i){const y=i.getScopeData();X1(f,y)}if(c){const y=c.getScopeData();X1(f,y)}const p=[...n.attachments||[],...f.attachments];p.length&&(n.attachments=p),I3(l,f);const v=[...d,...f.eventProcessors];return P3(v,l,n).then(y=>(y&&B3(y),typeof o=="number"&&o>0?U3(y,o,a):y))}function N3(e,t){const{environment:n,release:r,dist:s,maxValueLength:i}=t;e.environment=e.environment||n||Vb,!e.release&&r&&(e.release=r),!e.dist&&s&&(e.dist=s);const o=e.request;o?.url&&i&&(o.url=Iv(o.url,i)),i&&e.exception?.values?.forEach(a=>{a.value&&(a.value=Iv(a.value,i))})}function $3(e,t){const n=F3(t);e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(s=>{s.filename&&(s.debug_id=n[s.filename])})})}function B3(e){const t={};if(e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(s=>{s.debug_id&&(s.abs_path?t[s.abs_path]=s.debug_id:s.filename&&(t[s.filename]=s.debug_id),delete s.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(([r,s])=>{n.push({type:"sourcemap",code_file:r,debug_id:s})})}function V3(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function U3(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(s=>({...s,...s.data&&{data:ds(s.data,t,n)}}))},...e.user&&{user:ds(e.user,t,n)},...e.contexts&&{contexts:ds(e.contexts,t,n)},...e.extra&&{extra:ds(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=ds(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(s=>({...s,...s.data&&{data:ds(s.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=ds(e.contexts.flags,3,n)),r}function z3(e,t){if(!t)return e;const n=e?e.clone():new Ks;return n.update(t),n}function H3(e){if(e)return j3(e)?{captureContext:e}:W3(e)?{captureContext:e}:e}function j3(e){return e instanceof Ks||typeof e=="function"}const q3=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function W3(e){return Object.keys(e).some(t=>q3.includes(t))}function Gs(e,t){return xt().captureException(e,H3(t))}function XP(e,t){return xt().captureEvent(e,t)}function G3(e,t){Zs().setContext(e,t)}function K3(){const e=lt();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function Y3(e){Zs().addEventProcessor(e)}function Z1(e){const t=Zs(),n=xt(),{userAgent:r}=at.navigator||{},s=lU({user:n.getUser()||t.getUser(),...r&&{userAgent:r},...e}),i=t.getSession();return i?.status==="ok"&&wl(i,{status:"exited"}),QP(),t.setSession(s),s}function QP(){const e=Zs(),n=xt().getSession()||e.getSession();n&&uU(n),JP(),e.setSession()}function JP(){const e=Zs(),t=lt(),n=e.getSession();n&&t&&t.captureSession(n)}function e_(e=!1){if(e){QP();return}JP()}const X3="7";function Q3(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function J3(e){return`${Q3(e)}${e.projectId}/envelope/`}function Z3(e,t){const n={sentry_version:X3};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||`${J3(e)}?${Z3(e,n)}`}const t_=[];function t5(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 n5(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 t5(r)}function r5(e,t){const n={};return t.forEach(r=>{r&&ZP(e,r,n)}),n}function n_(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function ZP(e,t,n){if(n[t.name]){Be&&Re.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!t_.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),t_.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)}Be&&Re.log(`Integration installed: ${t.name}`)}function s5(e){return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{items:e}]}function i5(e,t,n,r){const s={};return t?.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=tu(r)),wo(s,[s5(e)])}function eI(e,t){const n=t??o5(e)??[];if(n.length===0)return;const r=e.getOptions(),s=i5(n,r._metadata,r.tunnel,e.getDsn());tI().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(s)}function o5(e){return tI().get(e)}function tI(){return Yl("clientToLogBufferMap",()=>new WeakMap)}function a5(e){return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{items:e}]}function l5(e,t,n,r){const s={};return t?.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=tu(r)),wo(s,[a5(e)])}function nI(e,t){const n=t??u5(e)??[];if(n.length===0)return;const r=e.getOptions(),s=l5(n,r._metadata,r.tunnel,e.getDsn());rI().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(s)}function u5(e){return rI().get(e)}function rI(){return Yl("clientToMetricBufferMap",()=>new WeakMap)}const qb=Symbol.for("SentryBufferFullError");function Wb(e=100){const t=new Set;function n(){return t.size<e}function r(o){t.delete(o)}function s(o){if(!n())return jb(qb);const a=o();return t.add(a),a.then(()=>r(a),()=>r(a)),a}function i(o){if(!t.size)return lp(!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 c5=60*1e3;function d5(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?c5:r-t}function f5(e,t){return e[t]||e.all||0}function sI(e,t,n=Date.now()){return f5(e,t)>n}function iI(e,{statusCode:t,headers:n},r=Date.now()){const s={...e},i=n?.["x-sentry-rate-limits"],o=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 p of u.split(";"))p==="metric_bucket"?(!c||c.split(";").includes("custom"))&&(s[p]=r+f):s[p]=r+f}else o?s.all=r+d5(o,r):t===429&&(s.all=r+60*1e3);return s}const oI=64;function h5(e,t,n=Wb(e.bufferSize||oI)){let r={};const s=o=>n.drain(o);function i(o){const a=[];if(U1(o,(d,f)=>{const p=z1(f);sI(r,p)?e.recordDroppedEvent("ratelimit_backoff",p):a.push(d)}),a.length===0)return Promise.resolve({});const l=wo(o[0],a),u=d=>{U1(l,(f,p)=>{e.recordDroppedEvent(d,z1(p))})},c=()=>t({body:s3(l)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&Be&&Re.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=iI(r,d),d),d=>{throw u("network_error"),Be&&Re.error("Encountered error running transport request:",d),d});return n.add(c).then(d=>d,d=>{if(d===qb)return Be&&Re.error("Skipped sending event because buffer is full."),u("queue_overflow"),Promise.resolve({});throw d})}return{send:i,flush:s}}function p5(e,t,n){const r=[{type:"client_report"},{timestamp:Ra(),discarded_events:e}];return wo(t?{dsn:t}:{},[r])}function aI(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function m5(e){const{trace_id:t,parent_span_id:n,span_id:r,status:s,origin:i,data:o,op:a}=e.contexts?.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?.[Fb],exclusive_time:o?.[eu],measurements:e.measurements,is_segment:!0}}function g5(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&&{[Fb]:e.profile_id},...e.exclusive_time&&{[eu]:e.exclusive_time}}}},measurements:e.measurements}}const r_="Not capturing exception because it's already been captured.",s_="Discarded session because of missing or non-string release",lI=Symbol.for("SentryInternalError"),uI=Symbol.for("SentryDoNotSendEventError"),v5=5e3;function uf(e){return{message:e,[lI]:!0}}function km(e){return{message:e,[uI]:!0}}function i_(e){return!!e&&typeof e=="object"&&lI in e}function o_(e){return!!e&&typeof e=="object"&&uI in e}function a_(e,t,n,r,s){let i=0,o,a=!1;e.on(n,()=>{i=0,clearTimeout(o),a=!1}),e.on(t,l=>{i+=r(l),i>=8e5?s(e):a||(a=!0,o=setTimeout(()=>{s(e)},v5))}),e.on("flush",()=>{s(e)})}class y5{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=Wb(t.transportOptions?.bufferSize??oI),t.dsn?this._dsn=$U(t.dsn):Be&&Re.warn("No DSN provided, client will not send events."),this._dsn){const r=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:r})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&a_(this,"afterCaptureLog","flushLogs",_5,eI),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&a_(this,"afterCaptureMetric","flushMetrics",w5,nI)}captureException(t,n,r){const s=Nr();if(O1(t))return Be&&Re.log(r_),s;const i={event_id:s,...n};return this._process(()=>this.eventFromException(t,i).then(o=>this._captureEvent(o,i,r)).then(o=>o),"error"),i.event_id}captureMessage(t,n,r,s){const i={event_id:Nr(),...r},o=Ab(t)?t:String(t),a=bl(t),l=a?this.eventFromMessage(o,n,i):this.eventFromException(t,i);return this._process(()=>l.then(u=>this._captureEvent(u,i,s)),a?"unknown":"error"),i.event_id}captureEvent(t,n,r){const s=Nr();if(n?.originalException&&O1(n.originalException))return Be&&Re.log(r_),s;const i={event_id:s,...n},o=t.sdkProcessingMetadata||{},a=o.capturedSpanScope,l=o.capturedSpanIsolationScope,u=l_(t.type);return this._process(()=>this._captureEvent(t,i,a||r,l),u),i.event_id}captureSession(t){this.sendSession(t),wl(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];ZP(this,t,this._integrations),n||n_(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=d3(t,this._dsn,this._options._metadata,this._options.tunnel);for(const s of n.attachments||[])r=r3(r,a3(s));this.sendEnvelope(r).then(s=>this.emit("afterSendEvent",t,s))}sendSession(t){const{release:n,environment:r=Vb}=this._options;if("aggregates"in t){const i=t.attrs||{};if(!i.release&&!n){Be&&Re.warn(s_);return}i.release=i.release||n,i.environment=i.environment||r,t.attrs=i}else{if(!t.release&&!n){Be&&Re.warn(s_);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const s=c3(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}`;Be&&Re.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 Be&&Re.error("Error while sending envelope:",n),{}}return Be&&Re.error("Transport disabled"),{}}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=r5(this,t),n_(this,t)}_updateSessionFromEvent(t,n){let r=n.level==="fatal",s=!1;const i=n.exception?.values;if(i){s=!0,r=!1;for(const l of i)if(l.mechanism?.handled===!1){r=!0;break}}const o=t.status==="ok";(o&&t.errors===0||o&&r)&&(wl(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?.length&&(n.integrations=o),this.emit("preprocessEvent",t,n),t.type||s.setLastEventId(t.event_id||n.event_id),YP(i,t,n,r,this,s).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:bU(r),...a.contexts};const l=UP(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:l,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},r=xt(),s=Zs()){return Be&&$v(t)&&Re.log(`Captured error event \`${aI(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,s).then(i=>i.event_id,i=>{Be&&(o_(i)?Re.log(i.message):i_(i)?Re.warn(i.message):Re.warn(i))})}_processEvent(t,n,r,s){const i=this.getOptions(),{sampleRate:o}=i,a=cI(t),l=$v(t),c=`before send for type \`${t.type||"error"}\``,d=typeof o>"u"?void 0:pa(o);if(l&&typeof d=="number"&&Math.random()>d)return this.recordDroppedEvent("sample_rate","error"),jb(km(`Discarding event because it's not included in the random sample (sampling rate = ${o})`));const f=l_(t.type);return this._prepareEvent(t,n,r,s).then(p=>{if(p===null)throw this.recordDroppedEvent("event_processor",f),km("An event processor returned `null`, will not send event.");if(n.data&&n.data.__sentry__===!0)return p;const m=S5(this,i,p,n);return b5(m,c)}).then(p=>{if(p===null){if(this.recordDroppedEvent("before_send",f),a){const S=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",S)}throw km(`${c} returned \`null\`, will not send event.`)}const v=r.getSession()||s.getSession();if(l&&v&&this._updateSessionFromEvent(v,p),a){const y=p.sdkProcessingMetadata?.spanCountBeforeProcessing||0,S=p.spans?p.spans.length:0,b=y-S;b>0&&this.recordDroppedEvent("before_send","span",b)}const m=p.transaction_info;if(a&&m&&p.transaction!==t.transaction){const y="custom";p.transaction_info={...m,source:y}}return this.sendEvent(p,n),p}).then(null,p=>{throw o_(p)||i_(p)?p:(this.captureException(p,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:p}),uf(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
25
+ Reason: ${p}`))})}_process(t,n){this._numProcessing++,this._promiseBuffer.add(t).then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r===qb&&this.recordDroppedEvent("queue_overflow",n),r))}_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(){Be&&Re.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){Be&&Re.log("No outcomes to send");return}if(!this._dsn){Be&&Re.log("No dsn provided, will not send outcomes");return}Be&&Re.log("Sending outcomes:",t);const n=p5(t,this._options.tunnel&&tu(this._dsn));this.sendEnvelope(n)}}function l_(e){return e==="replay_event"?"replay":e||"error"}function b5(e,t){const n=`${t} must return \`null\` or a valid event.`;if(Ql(e))return e.then(r=>{if(!fc(r)&&r!==null)throw uf(n);return r},r=>{throw uf(`${t} rejected with ${r}`)});if(!fc(e)&&e!==null)throw uf(n);return e}function S5(e,t,n,r){const{beforeSend:s,beforeSendTransaction:i,beforeSendSpan:o,ignoreSpans:a}=t;let l=n;if($v(l)&&s)return s(l,r);if(cI(l)){if(o||a){const u=m5(l);if(a?.length&&Qf(u,a))return null;if(o){const c=o(u);c?l=Kc(n,g5(c)):Mv()}if(l.spans){const c=[],d=l.spans;for(const p of d){if(a?.length&&Qf(p,a)){XU(d,p);continue}if(o){const v=o(p);v?c.push(v):(Mv(),c.push(p))}else c.push(p)}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 $v(e){return e.type===void 0}function cI(e){return e.type==="transaction"}function w5(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+dI(e.attributes)}function _5(e){let t=0;return e.message&&(t+=e.message.length*2),t+dI(e.attributes)}function dI(e){if(!e)return 0;let t=0;return Object.values(e).forEach(n=>{Array.isArray(n)?t+=n.length*u_(n[0]):bl(n)?t+=u_(n):t+=100}),t}function u_(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}function k5(e,t){t.debug===!0&&(Be?Re.enable():Mi(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),xt().update(t.initialScope);const r=new e(t);return x5(r),r.init(),r}function x5(e){xt().setClient(e)}const E5="thismessage:/";function Gb(e){return"isRelative"in e}function Kb(e,t){const n=e.indexOf("://")<=0&&e.indexOf("//")!==0,r=n?E5: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 C5(e){if(Gb(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 na(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 T5(e){return e.split(/[?#]/,1)[0]}function R5(e,t){const n=t?.getDsn(),r=t?.getOptions().tunnel;return I5(e,n)||P5(e,r)}function P5(e,t){return t?c_(e)===c_(t):!1}function I5(e,t){const n=Kb(e);return!n||Gb(n)?!1:t?n.host.includes(t.host)&&/(^|&|\?)sentry_key=/.test(n.search):!1}function c_(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function A5(e){"aggregates"in e?e.attrs?.ip_address===void 0&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):e.ipAddress===void 0&&(e.ipAddress="{{auto}}")}function fI(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:Zo})),version:Zo}),e._metadata=s}function hI(e={}){const t=e.client||lt();if(!K3()||!t)return{};const n=Ta(),r=Zl(n);if(r.getTraceData)return r.getTraceData(e);const s=e.scope||xt(),i=e.span||Hn(),o=i?jU(i):O5(s),a=i?Ii(i):UP(t,s),l=RU(a);if(!OP.test(o))return Re.warn("Invalid sentry-trace data. Cannot generate trace data"),{};const c={"sentry-trace":o,baggage:l};return e.propagateTraceparent&&(c.traceparent=i?qU(i):D5(s)),c}function O5(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return DP(t,r,n)}function D5(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return MP(t,r,n)}function M5(e,t,n){let r,s,i;const o=n?.maxWait?Math.max(n.maxWait,t):0,a=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 L5=100;function co(e,t){const n=lt(),r=Zs();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:i=L5}=n.getOptions();if(i<=0)return;const a={timestamp:Ra(),...e},l=s?Mi(()=>s(a,t)):a;l!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",l,t),r.addBreadcrumb(l,i))}let d_;const F5="FunctionToString",f_=new WeakMap,N5=(()=>({name:F5,setupOnce(){d_=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Mb(this),n=f_.has(lt())&&t!==void 0?t:this;return d_.apply(n,e)}}catch{}},setup(e){f_.set(e,!0)}})),$5=N5,B5=[/^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$/],V5="EventFilters",U5=(e={})=>{let t;return{name:V5,setup(n){const r=n.getOptions();t=h_(e,r)},processEvent(n,r,s){if(!t){const i=s.getOptions();t=h_(e,i)}return H5(n,t)?null:n}}},z5=((e={})=>({...U5(e),name:"InboundFilters"}));function h_(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:B5],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function H5(e,t){if(e.type){if(e.type==="transaction"&&q5(e,t.ignoreTransactions))return Be&&Re.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
26
+ Event: ${Bo(e)}`),!0}else{if(j5(e,t.ignoreErrors))return Be&&Re.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
27
+ Event: ${Bo(e)}`),!0;if(Y5(e))return Be&&Re.warn(`Event dropped due to not having an error message, error type or stacktrace.
28
+ Event: ${Bo(e)}`),!0;if(W5(e,t.denyUrls))return Be&&Re.warn(`Event dropped due to being matched by \`denyUrls\` option.
29
+ Event: ${Bo(e)}.
30
+ Url: ${Jf(e)}`),!0;if(!G5(e,t.allowUrls))return Be&&Re.warn(`Event dropped due to not being matched by \`allowUrls\` option.
31
+ Event: ${Bo(e)}.
32
+ Url: ${Jf(e)}`),!0}return!1}function j5(e,t){return t?.length?aI(e).some(n=>gi(n,t)):!1}function q5(e,t){if(!t?.length)return!1;const n=e.transaction;return n?gi(n,t):!1}function W5(e,t){if(!t?.length)return!1;const n=Jf(e);return n?gi(n,t):!1}function G5(e,t){if(!t?.length)return!0;const n=Jf(e);return n?gi(n,t):!0}function K5(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 Jf(e){try{const n=[...e.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?K5(n):null}catch{return Be&&Re.error(`Cannot extract url for event ${Bo(e)}`),null}}function Y5(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function X5(e,t,n,r,s,i){if(!s.exception?.values||!i||!Ti(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=Bv(e,t,r,i.originalException,n,s.exception.values,o,0))}function Bv(e,t,n,r,s,i,o,a){if(i.length>=n+1)return i;let l=[...i];if(Ti(r[s],Error)){p_(o,a);const u=e(t,r[s]),c=l.length;m_(u,s,c,a),l=Bv(e,t,n,r[s],s,[u,...l],u,c)}return Array.isArray(r.errors)&&r.errors.forEach((u,c)=>{if(Ti(u,Error)){p_(o,a);const d=e(t,u),f=l.length;m_(d,`errors[${c}]`,f,a),l=Bv(e,t,n,u,s,[d,...l],d,f)}}),l}function p_(e,t){e.mechanism={handled:!0,type:"auto.core.linked_errors",...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function m_(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function Q5(e){const t="console";yo(t,e),bo(t,J5)}function J5(){"console"in at&&BV.forEach(function(e){e in at.console&&Sr(at.console,e,function(t){return Kf[e]=t,function(...n){Qr("console",{args:n,level:e}),Kf[e]?.apply(at.console,n)}})})}function pI(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const Z5="Dedupe",e4=(()=>{let e;return{name:Z5,processEvent(t){if(t.type)return t;try{if(n4(t,e))return Be&&Re.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}}),t4=e4;function n4(e,t){return t?!!(r4(e,t)||s4(e,t)):!1}function r4(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!gI(e,t)||!mI(e,t))}function s4(e,t){const n=g_(t),r=g_(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!gI(e,t)||!mI(e,t))}function mI(e,t){let n=C1(e),r=C1(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 gI(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 g_(e){return e.exception?.values?.[0]}function i4(e,t,n,r,s){if(!e.fetchData)return;const{method:i,url:o}=e.fetchData,a=Jr()&&t(o);if(e.endTimestamp&&a){const p=e.fetchData.__span;if(!p)return;const v=r[p];v&&(l4(v,e),o4(v,e,s),delete r[p]);return}const{spanOrigin:l="auto.http.browser",propagateTraceparent:u=!1}=typeof s=="object"?s:{spanOrigin:s},c=!!Hn(),d=a&&c?uo(c4(o,i,l)):new lo;if(e.fetchData.__span=d.spanContext().spanId,r[d.spanContext().spanId]=d,n(e.fetchData.url)){const p=e.args[0],v=e.args[1]||{},m=a4(p,v,Jr()&&c?d:void 0,u);m&&(e.args[1]=v,v.headers=m)}const f=lt();if(f){const p={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};f.emit("beforeOutgoingRequestSpan",d,p)}return d}function o4(e,t,n){(typeof n=="object"&&n!==null?n.onRequestSpanEnd:void 0)?.(e,{headers:t.response?.headers,error:t.error})}function a4(e,t,n,r){const s=hI({span:n,propagateTraceparent:r}),i=s["sentry-trace"],o=s.baggage,a=s.traceparent;if(!i)return;const l=t.headers||(Ob(e)?e.headers:void 0);if(l)if(u4(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?wd(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"&&wd(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]:[],p=d&&(Array.isArray(d)?d.find(m=>wd(m)):wd(d));o&&!p&&f.push(o);const v={...l,"sentry-trace":u??i,baggage:f.length>0?f.join(","):void 0};return r&&a&&!c&&(v.traceparent=a),v}else return{...s}}function l4(e,t){if(t.response){TP(e,t.response.status);const n=t.response?.headers?.get("content-length");if(n){const r=parseInt(n);r>0&&e.setAttribute("http.response_content_length",r)}}else t.error&&e.setStatus({code:_n,message:"internal_error"});e.end()}function wd(e){return e.split(",").some(t=>t.trim().startsWith($b))}function u4(e){return typeof Headers<"u"&&Ti(e,Headers)}function c4(e,t,n){const r=Kb(e);return{name:r?`${t} ${C5(r)}`:t,attributes:d4(e,r,t,n)}}function d4(e,t,n,r){const s={url:e,type:"fetch","http.method":n,[tn]:r,[Pi]:"http.client"};return t&&(Gb(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 mc=at;function f4(){return"history"in mc&&!!mc.history}function h4(){if(!("fetch"in mc))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}function Vv(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function p4(){if(typeof EdgeRuntime=="string")return!0;if(!h4())return!1;if(Vv(mc.fetch))return!0;let e=!1;const t=mc.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=Vv(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){Be&&Re.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function yI(e,t){const n="fetch";yo(n,e),bo(n,()=>bI(void 0,t))}function m4(e){const t="fetch-body-resolved";yo(t,e),bo(t,()=>bI(v4))}function bI(e,t=!1){t&&!p4()||Sr(at,"fetch",function(n){return function(...r){const s=new Error,{method:i,url:o}=y4(r),a={args:r,fetchData:{method:i,url:o},startTimestamp:fn()*1e3,virtualError:s,headers:b4(r)};return e||Qr("fetch",{...a}),n.apply(at,r).then(async l=>(e?e(l):Qr("fetch",{...a,endTimestamp:fn()*1e3,response:l}),l),l=>{if(Qr("fetch",{...a,endTimestamp:fn()*1e3,error:l}),Ib(l)&&l.stack===void 0&&(l.stack=s.stack,$r(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 g4(e,t){if(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}g4(t,()=>{Qr("fetch-body-resolved",{endTimestamp:fn()*1e3,response:e})})}function cf(e,t){return!!e&&typeof e=="object"&&!!e[t]}function v_(e){return typeof e=="string"?e:e?cf(e,"url")?e.url:e.toString?e.toString():"":""}function y4(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:v_(n),method:cf(r,"method")?String(r.method).toUpperCase():Ob(n)&&cf(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:v_(t),method:cf(t,"method")?String(t.method).toUpperCase():"GET"}}function b4(e){const[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(Ob(t))return new Headers(t.headers)}catch{}}function S4(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function w4(){return"npm"}function _4(){return!S4()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function Uv(){return typeof window<"u"&&(!_4()||k4())}function k4(){return at.process?.type==="renderer"}const vt=at;let zv=0;function SI(){return zv>0}function x4(){zv++,setTimeout(()=>{zv--})}function xl(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(Mb(e))return e}catch{return e}const r=function(...s){try{const i=s.map(o=>xl(o,t));return e.apply(this,i)}catch(i){throw x4(),op(o=>{o.addEventProcessor(a=>(t.mechanism&&(Av(a,void 0),Sl(a,t.mechanism)),a.extra={...a.extra,arguments:s},a)),Gs(i)}),i}};try{for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])}catch{}_P(r,e),$r(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function Yb(){const e=Jl(),{referrer:t}=vt.document||{},{userAgent:n}=vt.navigator||{},r={...t&&{Referer:t},...n&&{"User-Agent":n}};return{url:e,headers:r}}function Xb(e,t){const n=Qb(e,t),r={type:P4(t),value:I4(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function E4(e,t,n,r){const i=lt()?.getOptions().normalizeDepth,o=L4(t),a={__serialized__:zP(t,i)};if(o)return{exception:{values:[Xb(e,o)]},extra:a};const l={exception:{values:[{type:ip(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:D4(t,{isUnhandledRejection:r})}]},extra:a};if(n){const u=Qb(e,n);u.length&&(l.exception.values[0].stacktrace={frames:u})}return l}function xm(e,t){return{exception:{values:[Xb(e,t)]}}}function Qb(e,t){const n=t.stacktrace||t.stack||"",r=T4(t),s=R4(t);try{return e(n,r,s)}catch{}return[]}const C4=/Minified React error #\d+;/i;function T4(e){return e&&C4.test(e.message)?1:0}function R4(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function wI(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function P4(e){const t=e?.name;return!t&&wI(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function I4(e){const t=e?.message;return wI(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 A4(e,t,n,r){const s=n?.syntheticException||void 0,i=Jb(e,t,s,r);return Sl(i),i.level="error",n?.event_id&&(i.event_id=n.event_id),lp(i)}function O4(e,t,n="info",r,s){const i=r?.syntheticException||void 0,o=Hv(e,t,i,s);return o.level=n,r?.event_id&&(o.event_id=r.event_id),lp(o)}function Jb(e,t,n,r,s){let i;if(bP(t)&&t.error)return xm(e,t.error);if(R1(t)||XV(t)){const o=t;if("stack"in t)i=xm(e,t);else{const a=o.name||(R1(o)?"DOMError":"DOMException"),l=o.message?`${a}: ${o.message}`:a;i=Hv(e,l,n,r),Av(i,l)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}return Ib(t)?xm(e,t):fc(t)||ip(t)?(i=E4(e,t,n,s),Sl(i,{synthetic:!0}),i):(i=Hv(e,t,n,r),Av(i,`${t}`),Sl(i,{synthetic:!0}),i)}function Hv(e,t,n,r){const s={};if(r&&n){const i=Qb(e,n);i.length&&(s.exception={values:[{value:t,stacktrace:{frames:i}}]}),Sl(s,{synthetic:!0})}if(Ab(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 D4(e,{isUnhandledRejection:t}){const n=nU(e),r=t?"promise rejection":"exception";return bP(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:ip(e)?`Event \`${M4(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function M4(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function L4(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}class F4 extends y5{constructor(t){const n=N4(t),r=vt.SENTRY_SDK_SOURCE||w4();fI(n,"browser",["browser"],r),n._metadata?.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,enableMetrics:l}=this._options,u=l??a?.enableMetrics??!0;vt.document&&(i||o||u)&&vt.document.addEventListener("visibilitychange",()=>{vt.document.visibilityState==="hidden"&&(i&&this._flushOutcomes(),o&&eI(this),u&&nI(this))}),s&&this.on("beforeSendSession",A5)}eventFromException(t,n){return A4(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return O4(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 N4(e){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:vt.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}const ma=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Xe=at,$4=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",Qc=(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=$4(t.value,n),e(t)))}},Jc=(e=!0)=>{const t=Xe.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},nu=()=>Jc()?.activationStart??0;function ra(e,t,n){Xe.document&&Xe.addEventListener(e,t,n)}function Zb(e,t,n){Xe.document&&Xe.removeEventListener(e,t,n)}let ol=-1;const _I=new Set,B4=()=>Xe.document?.visibilityState==="hidden"&&!Xe.document?.prerendering?0:1/0,df=e=>{if(V4(e)&&ol>-1){if(e.type==="visibilitychange"||e.type==="pagehide")for(const t of _I)t();isFinite(ol)||(ol=e.type==="visibilitychange"?e.timeStamp:0,Zb("prerenderingchange",df,!0))}},Zc=()=>{if(Xe.document&&ol<0){const e=nu();ol=(Xe.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(n=>n.name==="hidden"&&n.startTime>e)[0]?.startTime)??B4(),ra("visibilitychange",df,!0),ra("pagehide",df,!0),ra("prerenderingchange",df,!0)}return{get firstHiddenTime(){return ol},onHidden(e){_I.add(e)}}};function V4(e){return e.type==="pagehide"||Xe.document?.visibilityState==="hidden"}const U4=()=>`v5-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,ed=(e,t=-1)=>{const n=Jc();let r="navigate";return n&&(Xe.document?.prerendering||nu()>0?r="prerender":Xe.document?.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:U4(),navigationType:r}},Em=new WeakMap;function eS(e,t){return Em.get(e)||Em.set(e,new t),Em.get(e)}class Zf{constructor(){Zf.prototype.__init.call(this),Zf.prototype.__init2.call(this)}__init(){this._sessionValue=0}__init2(){this._sessionEntries=[]}_processEntry(t){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]),this._onAfterProcessingUnexpectedShift?.(t)}}const ru=(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{}},tS=e=>{let t=!1;return()=>{t||(e(),t=!0)}},up=e=>{Xe.document?.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},z4=[1800,3e3],H4=(e,t={})=>{up(()=>{const n=Zc(),r=ed("FCP");let s;const o=ru("paint",a=>{for(const l of a)l.name==="first-contentful-paint"&&(o.disconnect(),l.startTime<n.firstHiddenTime&&(r.value=Math.max(l.startTime-nu(),0),r.entries.push(l),s(!0)))});o&&(s=Qc(e,r,z4,t.reportAllChanges))})},j4=[.1,.25],q4=(e,t={})=>{H4(tS(()=>{const n=ed("CLS",0);let r;const s=Zc(),i=eS(t,Zf),o=l=>{for(const u of l)i._processEntry(u);i._sessionValue>n.value&&(n.value=i._sessionValue,n.entries=i._sessionEntries,r())},a=ru("layout-shift",o);a&&(r=Qc(e,n,j4,t.reportAllChanges),s.onHidden(()=>{o(a.takeRecords()),r(!0)}),Xe?.setTimeout?.(r))}))};let kI=0,Cm=1/0,_d=0;const W4=e=>{e.forEach(t=>{t.interactionId&&(Cm=Math.min(Cm,t.interactionId),_d=Math.max(_d,t.interactionId),kI=_d?(_d-Cm)/7+1:0)})};let jv;const xI=()=>jv?kI:performance.interactionCount||0,G4=()=>{"interactionCount"in performance||jv||(jv=ru("event",W4,{type:"event",buffered:!0,durationThreshold:0}))},Tm=10;let EI=0;const K4=()=>xI()-EI;class eh{constructor(){eh.prototype.__init.call(this),eh.prototype.__init2.call(this)}__init(){this._longestInteractionList=[]}__init2(){this._longestInteractionMap=new Map}_resetInteractions(){EI=xI(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const t=Math.min(this._longestInteractionList.length-1,Math.floor(K4()/50));return this._longestInteractionList[t]}_processEntry(t){if(this._onBeforeProcessingEntry?.(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<Tm||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((s,i)=>i._latency-s._latency),this._longestInteractionList.length>Tm){const s=this._longestInteractionList.splice(Tm);for(const i of s)this._longestInteractionMap.delete(i.id)}this._onAfterProcessingINPCandidate?.(r)}}}const CI=e=>{const t=n=>{(n.type==="pagehide"||Xe.document?.visibilityState==="hidden")&&e(n)};ra("visibilitychange",t,!0),ra("pagehide",t,!0)},TI=e=>{const t=Xe.requestIdleCallback||Xe.setTimeout;Xe.document?.visibilityState==="hidden"?e():(e=tS(e),ra("visibilitychange",e,{once:!0,capture:!0}),t(()=>{e(),Zb("visibilitychange",e,{capture:!0})}),CI(e))},Y4=[200,500],X4=40,Q4=(e,t={})=>{if(!(globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return;const n=Zc();up(()=>{G4();const r=ed("INP");let s;const i=eS(t,eh),o=l=>{TI(()=>{for(const c of l)i._processEntry(c);const u=i._estimateP98LongestInteraction();u&&u._latency!==r.value&&(r.value=u._latency,r.entries=u.entries,s())})},a=ru("event",o,{durationThreshold:t.durationThreshold??X4});s=Qc(e,r,Y4,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{o(a.takeRecords()),s(!0)}))})};class J4{_processEntry(t){this._onBeforeProcessingEntry?.(t)}}const Z4=[2500,4e3],ez=(e,t={})=>{up(()=>{const n=Zc(),r=ed("LCP");let s;const i=eS(t,J4),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-nu(),0),r.entries=[u],s())},a=ru("largest-contentful-paint",o);if(a){s=Qc(e,r,Z4,t.reportAllChanges);const l=tS(()=>{o(a.takeRecords()),a.disconnect(),s(!0)}),u=c=>{c.isTrusted&&(TI(l),Zb(c.type,u,{capture:!0}))};for(const c of["keydown","click","visibilitychange"])ra(c,u,{capture:!0})}})},tz=[800,1800],qv=e=>{Xe.document?.prerendering?up(()=>qv(e)):Xe.document?.readyState!=="complete"?addEventListener("load",()=>qv(e),!0):setTimeout(e)},nz=(e,t={})=>{const n=ed("TTFB"),r=Qc(e,n,tz,t.reportAllChanges);qv(()=>{const s=Jc();s&&(n.value=Math.max(s.responseStart-nu(),0),n.entries=[s],r(!0))})},ju={},th={};let RI,PI,II,AI;function nS(e,t=!1){return cp("cls",e,sz,RI,t)}function rS(e,t=!1){return cp("lcp",e,iz,PI,t)}function rz(e){return cp("ttfb",e,oz,II)}function OI(e){return cp("inp",e,az,AI)}function ga(e,t){return DI(e,t),th[e]||(lz(e),th[e]=!0),MI(e,t)}function td(e,t){const n=ju[e];if(n?.length)for(const r of n)try{r(t)}catch(s){ma&&Re.error(`Error while triggering instrumentation handler.
33
+ Type: ${e}
34
+ Name: ${Ci(r)}
35
+ Error:`,s)}}function sz(){return q4(e=>{td("cls",{metric:e}),RI=e},{reportAllChanges:!0})}function iz(){return ez(e=>{td("lcp",{metric:e}),PI=e},{reportAllChanges:!0})}function oz(){return nz(e=>{td("ttfb",{metric:e}),II=e})}function az(){return Q4(e=>{td("inp",{metric:e}),AI=e})}function cp(e,t,n,r,s=!1){DI(e,t);let i;return th[e]||(i=n(),th[e]=!0),r&&t({metric:r}),MI(e,t,s?i:void 0)}function lz(e){const t={};e==="event"&&(t.durationThreshold=0),ru(e,n=>{td(e,{entries:n})},t)}function DI(e,t){ju[e]=ju[e]||[],ju[e].push(t)}function MI(e,t,n){return()=>{n&&n();const r=ju[e];if(!r)return;const s=r.indexOf(t);s!==-1&&r.splice(s,1)}}function uz(e){return"duration"in e}function Rm(e){return typeof e=="number"&&isFinite(e)}function fo(e,t,n,{...r}){const s=dt(e).start_timestamp;return s&&s>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),zb(e,()=>{const i=uo({startTime:t,...r});return i&&i.end(n),i})}function sS(e){const t=lt();if(!t)return;const{name:n,transaction:r,attributes:s,startTime:i}=e,{release:o,environment:a,sendDefaultPii:l}=t.getOptions(),c=t.getIntegrationByName("Replay")?.getReplayId(),d=xt(),f=d.getUser(),p=f!==void 0?f.email||f.id||f.ip_address:void 0;let v;try{v=d.getScopeData().contexts.profile.profile_id}catch{}const m={release:o,environment:a,user:p||void 0,profile_id:v||void 0,replay_id:c||void 0,transaction:r,"user_agent.original":Xe.navigator?.userAgent,"client.address":l?"{{auto}}":void 0,...s};return uo({name:n,attributes:m,startTime:i,experimental:{standalone:!0}})}function nd(){return Xe.addEventListener&&Xe.performance}function an(e){return e/1e3}function cz(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 LI(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function FI(e,t){let n,r=!1;function s(a){!r&&n&&t(a,n),r=!0}CI(()=>{s("pagehide")});const i=e.on("beforeStartNavigationSpan",(a,l)=>{l?.isRedirect||(s("navigation"),i(),o())}),o=e.on("afterStartPageLoadSpan",a=>{n=a.spanContext().spanId,o()})}function dz(e){let t=0,n;if(!LI("layout-shift"))return;const r=nS(({metric:s})=>{const i=s.entries[s.entries.length-1];i&&(t=s.value,n=i)},!0);FI(e,(s,i)=>{fz(t,n,i,s),r()})}function fz(e,t,n,r){ma&&Re.log(`Sending CLS span (${e})`);const s=t?an((Ar()||0)+t.startTime):fn(),i=xt().getScopeData().transactionName,o=t?Rr(t.sources[0]?.node):"Layout shift",a={[tn]:"auto.http.browser.cls",[Pi]:"ui.webvital.cls",[eu]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t?.sources&&t.sources.forEach((u,c)=>{a[`cls.source.${c+1}`]=Rr(u.node)});const l=sS({name:o,transaction:i,attributes:a,startTime:s});l&&(l.addEvent("cls",{[Yc]:"",[Xc]:e}),l.end(s))}function hz(e){let t=0,n;if(!LI("largest-contentful-paint"))return;const r=rS(({metric:s})=>{const i=s.entries[s.entries.length-1];i&&(t=s.value,n=i)},!0);FI(e,(s,i)=>{pz(t,n,i,s),r()})}function pz(e,t,n,r){ma&&Re.log(`Sending LCP span (${e})`);const s=an((Ar()||0)+(t?.startTime||0)),i=xt().getScopeData().transactionName,o=t?Rr(t.element):"Largest contentful paint",a={[tn]:"auto.http.browser.lcp",[Pi]:"ui.webvital.lcp",[eu]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(a["lcp.element"]=Rr(t.element)),t.id&&(a["lcp.id"]=t.id),t.url&&(a["lcp.url"]=t.url),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=sS({name:o,transaction:i,attributes:a,startTime:s});l&&(l.addEvent("lcp",{[Yc]:"millisecond",[Xc]:e}),l.end(s))}function zr(e){return e&&((Ar()||performance.timeOrigin)+e)/1e3}function NI(e){const t={};if(e.nextHopProtocol!=null){const{name:n,version:r}=cz(e.nextHopProtocol);t["network.protocol.version"]=r,t["network.protocol.name"]=n}return Ar()||nd()?.timeOrigin?mz({...t,"http.request.redirect_start":zr(e.redirectStart),"http.request.redirect_end":zr(e.redirectEnd),"http.request.worker_start":zr(e.workerStart),"http.request.fetch_start":zr(e.fetchStart),"http.request.domain_lookup_start":zr(e.domainLookupStart),"http.request.domain_lookup_end":zr(e.domainLookupEnd),"http.request.connect_start":zr(e.connectStart),"http.request.secure_connection_start":zr(e.secureConnectionStart),"http.request.connection_end":zr(e.connectEnd),"http.request.request_start":zr(e.requestStart),"http.request.response_start":zr(e.responseStart),"http.request.response_end":zr(e.responseEnd),"http.request.time_to_first_byte":e.responseStart!=null?e.responseStart/1e3:void 0}):t}function mz(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null))}const gz=2147483647;let y_=0,fs={},vr,nh;function vz({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){const r=nd();if(r&&Ar()){r.mark&&Xe.performance.mark("sentry-tracing-init");const s=t?hz(n):_z(),i=kz(),o=e?dz(n):wz();return()=>{s?.(),i(),o?.()}}return()=>{}}function yz(){ga("longtask",({entries:e})=>{const t=Hn();if(!t)return;const{op:n,start_timestamp:r}=dt(t);for(const s of e){const i=an(Ar()+s.startTime),o=an(s.duration);n==="navigation"&&r&&i<r||fo(t,i,i+o,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[tn]:"auto.ui.browser.metrics"}})}})}function bz(){new PerformanceObserver(t=>{const n=Hn();if(n)for(const r of t.getEntries()){if(!r.scripts[0])continue;const s=an(Ar()+r.startTime),{start_timestamp:i,op:o}=dt(n);if(o==="navigation"&&i&&s<i)continue;const a=an(r.duration),l={[tn]:"auto.ui.browser.metrics"},u=r.scripts[0],{invoker:c,invokerType:d,sourceURL:f,sourceFunctionName:p,sourceCharPosition:v}=u;l["browser.script.invoker"]=c,l["browser.script.invoker_type"]=d,f&&(l["code.filepath"]=f),p&&(l["code.function"]=p),v!==-1&&(l["browser.script.source_char_position"]=v),fo(n,s,s+a,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:l})}}).observe({type:"long-animation-frame",buffered:!0})}function Sz(){ga("event",({entries:e})=>{const t=Hn();if(t){for(const n of e)if(n.name==="click"){const r=an(Ar()+n.startTime),s=an(n.duration),i={name:Rr(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[tn]:"auto.ui.browser.metrics"}},o=wP(n.target);o&&(i.attributes["ui.component_name"]=o),fo(t,r,r+s,i)}}})}function wz(){return nS(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(fs.cls={value:e.value,unit:""},nh=t)},!0)}function _z(){return rS(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(fs.lcp={value:e.value,unit:"millisecond"},vr=t)},!0)}function kz(){return rz(({metric:e})=>{e.entries[e.entries.length-1]&&(fs.ttfb={value:e.value,unit:"millisecond"})})}function xz(e,t){const n=nd(),r=Ar();if(!n?.getEntries||!r)return;const s=an(r),i=n.getEntries(),{op:o,start_timestamp:a}=dt(e);i.slice(y_).forEach(l=>{const u=an(l.startTime),c=an(Math.max(0,l.duration));if(!(o==="navigation"&&a&&s+u<a))switch(l.entryType){case"navigation":{Rz(e,l,s);break}case"mark":case"paint":case"measure":{Cz(e,l,u,c,s,t.ignorePerformanceApiSpans);const d=Zc(),f=l.startTime<d.firstHiddenTime;l.name==="first-paint"&&f&&(fs.fp={value:l.startTime,unit:"millisecond"}),l.name==="first-contentful-paint"&&f&&(fs.fcp={value:l.startTime,unit:"millisecond"});break}case"resource":{Az(e,l,l.name,u,c,s,t.ignoreResourceSpans);break}}}),y_=Math.max(i.length-1,0),Oz(e),o==="pageload"&&(Lz(fs),t.recordClsOnPageloadSpan||delete fs.cls,t.recordLcpOnPageloadSpan||delete fs.lcp,Object.entries(fs).forEach(([l,u])=>{m3(l,u.value,u.unit)}),e.setAttribute("performance.timeOrigin",s),e.setAttribute("performance.activationStart",nu()),Dz(e,t)),vr=void 0,nh=void 0,fs={}}function Ez(e){if(e?.entryType==="measure")try{return e.detail.devtools.track==="Components ⚛"}catch{return}}function Cz(e,t,n,r,s,i){if(Ez(t)||["mark","measure"].includes(t.entryType)&&gi(t.name,i))return;const o=Jc(!1),a=an(o?o.requestStart:0),l=s+Math.max(n,a),u=s+n,c=u+r,d={[tn]:"auto.resource.browser.metrics"};l!==u&&(d["sentry.browser.measure_happened_before_request"]=!0,d["sentry.browser.measure_start_time"]=l),Tz(d,t),l<=c&&fo(e,l,c,{name:t.name,op:t.entryType,attributes:d})}function Tz(e,t){try{const n=t.detail;if(!n)return;if(typeof n=="object"){for(const[r,s]of Object.entries(n))if(s&&bl(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(bl(n)){e["sentry.browser.measure.detail"]=n;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}}function Rz(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{kd(e,t,r,n)}),kd(e,t,"secureConnection",n,"TLS/SSL"),kd(e,t,"fetch",n,"cache"),kd(e,t,"domainLookup",n,"DNS"),Iz(e,t,n)}function kd(e,t,n,r,s=n){const i=Pz(n),o=t[i],a=t[`${n}Start`];!a||!o||fo(e,r+an(a),r+an(o),{op:`browser.${s}`,name:t.name,attributes:{[tn]:"auto.ui.browser.metrics",...n==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function Pz(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function Iz(e,t,n){const r=n+an(t.requestStart),s=n+an(t.responseEnd),i=n+an(t.responseStart);t.responseEnd&&(fo(e,r,s,{op:"browser.request",name:t.name,attributes:{[tn]:"auto.ui.browser.metrics"}}),fo(e,i,s,{op:"browser.response",name:t.name,attributes:{[tn]:"auto.ui.browser.metrics"}}))}function Az(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?.includes(a))return;const l={[tn]:"auto.resource.browser.metrics"},u=na(n);u.protocol&&(l["url.scheme"]=u.protocol.split(":").pop()),u.host&&(l["server.address"]=u.host),l["url.same_origin"]=n.includes(Xe.location.origin),Mz(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,...NI(t)},d=i+r,f=d+s;fo(e,d,f,{name:n.replace(Xe.location.origin,""),op:a,attributes:c})}function Oz(e){const t=Xe.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute("connectionType",n.type),Rm(n.rtt)&&(fs["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Rm(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),Rm(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}function Dz(e,t){vr&&t.recordLcpOnPageloadSpan&&(vr.element&&e.setAttribute("lcp.element",Rr(vr.element)),vr.id&&e.setAttribute("lcp.id",vr.id),vr.url&&e.setAttribute("lcp.url",vr.url.trim().slice(0,200)),vr.loadTime!=null&&e.setAttribute("lcp.loadTime",vr.loadTime),vr.renderTime!=null&&e.setAttribute("lcp.renderTime",vr.renderTime),e.setAttribute("lcp.size",vr.size)),nh?.sources&&t.recordClsOnPageloadSpan&&nh.sources.forEach((n,r)=>e.setAttribute(`cls.source.${r+1}`,Rr(n.node)))}function Mz(e,t,n){n.forEach(([r,s])=>{const i=e[r];i!=null&&(typeof i=="number"&&i<gz||typeof i=="string")&&(t[s]=i)})}function Lz(e){const t=Jc(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}function Fz(){return nd()&&Ar()?ga("element",Nz):()=>{}}const Nz=({entries:e})=>{const t=Hn(),n=t?$n(t):void 0,r=n?dt(n).description:xt().getScopeData().transactionName;e.forEach(s=>{const i=s;if(!i.identifier)return;const o=i.name,a=i.renderTime,l=i.loadTime,[u,c]=l?[an(l),"load-time"]:a?[an(a),"render-time"]:[fn(),"entry-emission"],d=o==="image-paint"?an(Math.max(0,(a??0)-(l??0))):0,f={[tn]:"auto.ui.browser.elementtiming",[Pi]:"ui.elementtiming",[wr]:"component","sentry.span_start_time_source":c,"sentry.transaction_name":r,"element.id":i.id,"element.type":i.element?.tagName?.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};w3({name:`element[${i.identifier}]`,attributes:f,startTime:u,onlyIfParent:!0},p=>{p.end(u+d)})})},$z=1e3;let b_,Wv,Gv;function $I(e){yo("dom",e),bo("dom",Bz)}function Bz(){if(!Xe.document)return;const e=Qr.bind(null,"dom"),t=S_(e,!0);Xe.document.addEventListener("click",t,!1),Xe.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const s=Xe[n]?.prototype;s?.hasOwnProperty?.("addEventListener")&&(Sr(s,"addEventListener",function(i){return function(o,a,l){if(o==="click"||o=="keypress")try{const u=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},c=u[o]=u[o]||{refCount:0};if(!c.handler){const d=S_(e);c.handler=d,i.call(this,o,d,l)}c.refCount++}catch{}return i.call(this,o,a,l)}}),Sr(s,"removeEventListener",function(i){return function(o,a,l){if(o==="click"||o=="keypress")try{const u=this.__sentry_instrumentation_handlers__||{},c=u[o];c&&(c.refCount--,c.refCount<=0&&(i.call(this,o,c.handler,l),c.handler=void 0,delete u[o]),Object.keys(u).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return i.call(this,o,a,l)}}))})}function Vz(e){if(e.type!==Wv)return!1;try{if(!e.target||e.target._sentryId!==Gv)return!1}catch{}return!0}function Uz(e,t){return e!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function S_(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=zz(n);if(Uz(n.type,r))return;$r(n,"_sentryCaptured",!0),r&&!r._sentryId&&$r(r,"_sentryId",Nr());const s=n.type==="keypress"?"input":n.type;Vz(n)||(e({event:n,name:s,global:t}),Wv=n.type,Gv=r?r._sentryId:void 0),clearTimeout(b_),b_=Xe.setTimeout(()=>{Gv=void 0,Wv=void 0},$z)}}function zz(e){try{return e.target}catch{return null}}let xd;function dp(e){const t="history";yo(t,e),bo(t,Hz)}function Hz(){if(Xe.addEventListener("popstate",()=>{const t=Xe.location.href,n=xd;if(xd=t,n===t)return;Qr("history",{from:n,to:t})}),!f4())return;function e(t){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const s=xd,i=jz(String(r));if(xd=i,s===i)return t.apply(this,n);Qr("history",{from:s,to:i})}return t.apply(this,n)}}Sr(Xe.history,"pushState",e),Sr(Xe.history,"replaceState",e)}function jz(e){try{return new URL(e,Xe.location.origin).toString()}catch{return e}}const ff={};function BI(e){const t=ff[e];if(t)return t;let n=Xe[e];if(Vv(n))return ff[e]=n.bind(Xe);const r=Xe.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?.[e]&&(n=i[e]),r.head.removeChild(s)}catch(s){ma&&Re.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,s)}return n&&(ff[e]=n.bind(Xe))}function qz(e){ff[e]=void 0}function rd(...e){return BI("setTimeout")(...e)}const zo="__sentry_xhr_v3__";function VI(e){yo("xhr",e),bo("xhr",Wz)}function Wz(){if(!Xe.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const s=new Error,i=fn()*1e3,o=mi(r[0])?r[0].toUpperCase():void 0,a=Gz(r[1]);if(!o||!a)return t.apply(n,r);n[zo]={method:o,url:a,request_headers:{}},o==="POST"&&a.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const l=()=>{const u=n[zo];if(u&&n.readyState===4){try{u.status_code=n.status}catch{}const c={endTimestamp:fn()*1e3,startTimestamp:i,xhr:n,virtualError:s};Qr("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,p]=d,v=c[zo];return v&&mi(f)&&mi(p)&&(v.request_headers[f.toLowerCase()]=p),u.apply(c,d)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const s=n[zo];if(!s)return t.apply(n,r);r[0]!==void 0&&(s.body=r[0]);const i={startTimestamp:fn()*1e3,xhr:n};return Qr("xhr",i),t.apply(n,r)}})}function Gz(e){if(mi(e))return e;try{return e.toString()}catch{}}const Kz=Symbol.for("sentry__originalRequestBody");function UI(e){return new URLSearchParams(e).toString()}function zI(e,t=Re){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[UI(e)];if(!e)return[void 0]}catch(n){return ma&&t.error(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return ma&&t.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function HI(e=[]){if(e.length>=2&&e[1]&&typeof e[1]=="object"&&"body"in e[1])return e[1].body;if(e.length>=1&&e[0]instanceof Request){const n=e[0][Kz];return n!==void 0?n:void 0}}function jI(e){let t;try{t=e.getAllResponseHeaders()}catch(n){return ma&&Re.error(n,"Failed to get xhr response headers",e),{}}return t?t.split(`\r
36
+ `).reduce((n,r)=>{const[s,i]=r.split(": ");return i&&(n[s.toLowerCase()]=i),n},{}):{}}const Pm=[],hf=new Map,La=new Map,Yz=60;function Xz(){if(nd()&&Ar()){const t=Qz();return()=>{t()}}return()=>{}}const Kv={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 Qz(){return OI(Jz)}const Jz=({metric:e})=>{if(e.value==null)return;const t=an(e.value);if(t>Yz)return;const n=e.entries.find(v=>v.duration===e.value&&Kv[v.name]);if(!n)return;const{interactionId:r}=n,s=Kv[n.name],i=an(Ar()+n.startTime),o=Hn(),a=o?$n(o):void 0,l=r!=null?hf.get(r):void 0,u=l?.span||a,c=u?dt(u).description:xt().getScopeData().transactionName,d=l?.elementName||Rr(n.target),f={[tn]:"auto.http.browser.inp",[Pi]:`ui.interaction.${s}`,[eu]:n.duration},p=sS({name:d,transaction:c,attributes:f,startTime:i});p&&(p.addEvent("inp",{[Yc]:"millisecond",[Xc]:e.value}),p.end(i+t))};function Zz(){const e=Object.keys(Kv);Uv()&&e.forEach(s=>{Xe.addEventListener(s,t,{capture:!0,passive:!0})});function t(s){const i=s.target;if(!i)return;const o=Rr(i),a=Math.round(s.timeStamp);if(La.set(a,o),La.size>50){const l=La.keys().next().value;l!==void 0&&La.delete(l)}}function n(s){const i=Math.round(s.startTime);let o=La.get(i);if(!o)for(let a=-5;a<=5;a++){const l=La.get(i+a);if(l){o=l;break}}return o||"<unknown>"}const r=({entries:s})=>{const i=Hn(),o=i&&$n(i);s.forEach(a=>{if(!uz(a))return;const l=a.interactionId;if(l==null||hf.has(l))return;const u=a.target?Rr(a.target):n(a);if(Pm.length>10){const c=Pm.shift();hf.delete(c)}Pm.push(l),hf.set(l,{span:o,elementName:u})})};ga("event",r),ga("first-input",r)}const eH=40;function tH(e,t=BI("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 qz("fetch"),l}finally{n-=o,r--}}return h5(e,s,Wb(e.bufferSize||eH))}const es=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,nH=30,rH=50;function Yv(e,t,n,r){const s={filename:e,function:t==="<anonymous>"?ha:t,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}const sH=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,iH=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,oH=/\((\S*)(?::(\d+))(?::(\d+))\)/,aH=/at (.+?) ?\(data:(.+?),/,lH=e=>{const t=e.match(aH);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const n=sH.exec(e);if(n){const[,s,i,o]=n;return Yv(s,ha,+i,+o)}const r=iH.exec(e);if(r){if(r[2]&&r[2].indexOf("eval")===0){const a=oH.exec(r[2]);a&&(r[2]=a[1],r[3]=a[2],r[4]=a[3])}const[i,o]=qI(r[1]||ha,r[2]);return Yv(o,i,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},uH=[nH,lH],cH=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,dH=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,fH=e=>{const t=cH.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const i=dH.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]||ha;return[s,r]=qI(s,r),Yv(r,s,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},hH=[rH,fH],pH=[uH,hH],mH=pP(...pH),qI=(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]:ha,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Ed=1024,gH="Breadcrumbs",vH=((e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:gH,setup(n){t.console&&Q5(wH(n)),t.dom&&$I(SH(n,t.dom)),t.xhr&&VI(_H(n)),t.fetch&&yI(kH(n)),t.history&&dp(xH(n)),t.sentry&&n.on("beforeSendEvent",bH(n))}}}),yH=vH;function bH(e){return function(n){lt()===e&&co({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:Bo(n)},{event:n})}}function SH(e,t){return function(r){if(lt()!==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>Ed&&(es&&Re.warn(`\`dom.maxStringLength\` cannot exceed ${Ed}, but a value of ${a} was configured. Sentry will use ${Ed} instead.`),a=Ed),typeof o=="string"&&(o=[o]);try{const u=r.event,c=EH(u)?u.target:u;s=Rr(c,{keyAttrs:o,maxStringLength:a}),i=wP(c)}catch{s="<unknown>"}if(s.length===0)return;const l={category:`ui.${r.name}`,message:s};i&&(l.data={"ui.component_name":i}),co(l,{event:r.event,name:r.name,global:r.global})}}function wH(e){return function(n){if(lt()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:pI(n.level),message:A1(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${A1(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;co(r,{input:n.args,level:n.level})}}function _H(e){return function(n){if(lt()!==e)return;const{startTimestamp:r,endTimestamp:s}=n,i=n.xhr[zo];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),co(f,d)}}function kH(e){return function(n){if(lt()!==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),co(a,o)}else{const i=n.response,o={...n.fetchData,status_code:i?.status};n.fetchData.request_body_size,n.fetchData.response_body_size,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),co(l,a)}}}function xH(e){return function(n){if(lt()!==e)return;let r=n.from,s=n.to;const i=na(vt.location.href);let o=r?na(r):void 0;const a=na(s);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),co({category:"navigation",data:{from:r,to:s}})}}function EH(e){return!!e&&!!e.target}const CH=["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"],TH="BrowserApiErrors",RH=((e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:TH,setupOnce(){t.setTimeout&&Sr(vt,"setTimeout",w_),t.setInterval&&Sr(vt,"setInterval",w_),t.requestAnimationFrame&&Sr(vt,"requestAnimationFrame",IH),t.XMLHttpRequest&&"XMLHttpRequest"in vt&&Sr(XMLHttpRequest.prototype,"send",AH);const n=t.eventTarget;n&&(Array.isArray(n)?n:CH).forEach(s=>OH(s,t))}}}),PH=RH;function w_(e){return function(...t){const n=t[0];return t[0]=xl(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${Ci(e)}`}}),e.apply(this,t)}}function IH(e){return function(t){return e.apply(this,[xl(t,{mechanism:{data:{handler:Ci(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function AH(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&Sr(n,s,function(i){const o={mechanism:{data:{handler:Ci(i)},handled:!1,type:`auto.browser.browserapierrors.xhr.${s}`}},a=Mb(i);return a&&(o.mechanism.data.handler=Ci(a)),xl(i,o)})}),e.apply(this,t)}}function OH(e,t){const r=vt[e]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(Sr(r,"addEventListener",function(s){return function(i,o,a){try{DH(o)&&(o.handleEvent=xl(o.handleEvent,{mechanism:{data:{handler:Ci(o),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&MH(this,i,o),s.apply(this,[i,xl(o,{mechanism:{data:{handler:Ci(o),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),a])}}),Sr(r,"removeEventListener",function(s){return function(i,o,a){try{const l=o.__sentry_wrapped__;l&&s.call(this,i,l,a)}catch{}return s.call(this,i,o,a)}}))}function DH(e){return typeof e.handleEvent=="function"}function MH(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}const LH=()=>({name:"BrowserSession",setupOnce(){if(typeof vt.document>"u"){es&&Re.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}Z1({ignoreDuration:!0}),e_(),dp(({from:e,to:t})=>{e!==void 0&&e!==t&&(Z1({ignoreDuration:!0}),e_())})}}),FH="GlobalHandlers",NH=((e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:FH,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(BH(n),__("onerror")),t.onunhandledrejection&&(VH(n),__("onunhandledrejection"))}}}),$H=NH;function BH(e){gP(t=>{const{stackParser:n,attachStacktrace:r}=WI();if(lt()!==e||SI())return;const{msg:s,url:i,line:o,column:a,error:l}=t,u=HH(Jb(n,l||s,void 0,r,!1),i,o,a);u.level="error",XP(u,{originalException:l,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function VH(e){vP(t=>{const{stackParser:n,attachStacktrace:r}=WI();if(lt()!==e||SI())return;const s=UH(t),i=bl(s)?zH(s):Jb(n,s,void 0,r,!0);i.level="error",XP(i,{originalException:s,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function UH(e){if(bl(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 zH(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function HH(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=jH(t)??Jl();return l.length===0&&l.push({colno:u,filename:d,function:ha,in_app:!0,lineno:c}),e}function __(e){es&&Re.log(`Global Handler attached: ${e}`)}function WI(){return lt()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function jH(e){if(!(!mi(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}}const qH=()=>({name:"HttpContext",preprocessEvent(e){if(!vt.navigator&&!vt.location&&!vt.document)return;const t=Yb(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}}}),WH="cause",GH=5,KH="LinkedErrors",YH=((e={})=>{const t=e.limit||GH,n=e.key||WH;return{name:KH,preprocessEvent(r,s,i){const o=i.getOptions();X5(Xb,o.stackParser,n,t,r,s)}}}),XH=YH;function QH(){return JH()?(es&&Mi(()=>{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 JH(){if(typeof vt.window>"u")return!1;const e=vt;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;const n=Jl(),r=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(vt===vt.top&&r.some(i=>n.startsWith(`${i}://`)))}function GI(e){return[z5(),$5(),PH(),yH(),$H(),XH(),t4(),qH(),LH()]}function ZH(e={}){const t=!e.skipBrowserExtensionCheck&&QH();let n=e.defaultIntegrations==null?GI():e.defaultIntegrations;const r={...e,enabled:t?!1:e.enabled,stackParser:WV(e.stackParser||mH),integrations:n5({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||tH};return k5(F4,r)}const $t=at,iS="sentryReplaySession",ej="replay_event",oS="Unable to send Replay",tj=3e5,nj=9e5,rj=5e3,sj=5500,ij=6e4,oj=5e3,aj=3,k_=15e4,Cd=5e3,lj=3e3,uj=300,aS=2e7,cj=4999,dj=5e4,x_=36e5;var fj=Object.defineProperty,hj=(e,t,n)=>t in e?fj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,E_=(e,t,n)=>hj(e,typeof t!="symbol"?t+"":t,n),hn=(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))(hn||{});function pj(e){return e.nodeType===e.ELEMENT_NODE}function qu(e){return e?.host?.shadowRoot===e}function Wu(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function mj(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 gj(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 rh(e){try{const t=e.rules||e.cssRules;return t?mj(Array.from(t,KI).join("")):null}catch{return null}}function vj(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 KI(e){let t;if(bj(e))try{t=rh(e.styleSheet)||gj(e)}catch{}else if(Sj(e)){let n=e.cssText;const r=e.selectorText.includes(":"),s=typeof e.style.all=="string"&&e.style.all;if(s&&(n=vj(e)),r&&(n=yj(n)),r||s)return n}return t||e.cssText}function yj(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function bj(e){return"styleSheet"in e}function Sj(e){return"selectorText"in e}class YI{constructor(){E_(this,"idNodeMap",new Map),E_(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.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 wj(){return new YI}function fp({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 gc({isMasked:e,element:t,value:n,maskInputFn:r}){let s=n||"";return e?(r&&(s=r(s,t)),"*".repeat(s.length)):s}function El(e){return e.toLowerCase()}function Xv(e){return e.toUpperCase()}const C_="__rrweb_original__";function _j(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=C_ in i?i[C_]: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 lS(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?El(t):null}function sh(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function XI(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i;return n.pathname.match(r)?.[1]??null}const T_={};function QI(e){const t=T_[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 T_[e]=r.bind(window)}function Qv(...e){return QI("setTimeout")(...e)}function JI(...e){return QI("clearTimeout")(...e)}function ZI(e){try{return e.contentDocument}catch{}}let kj=1;const xj=new RegExp("[^a-z0-9-_:]"),vc=-2;function uS(){return kj++}function Ej(e){if(e instanceof HTMLFormElement)return"form";const t=El(e.tagName);return xj.test(t)?"div":t}function Cj(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let Fa,R_;const Tj=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Rj=/^(?:[a-z+]+:)?\/\//i,Pj=/^www\..*/i,Ij=/^(data:)([^,]*),(.*)/i;function Aj(e,t){if(!e||t.size===0)return e;try{const n=e.split(";"),r=[];for(let s of n){if(s=s.trim(),!s)continue;const i=s.indexOf(":");if(i===-1){r.push(s);continue}const o=s.slice(0,i).trim();t.has(o)||r.push(s)}return r.join("; ")+(r.length>0&&e.endsWith(";")?";":"")}catch(n){return console.warn("Error filtering CSS properties:",n),e}}function ih(e,t){return(e||"").replace(Tj,(n,r,s,i,o,a)=>{const l=s||o||a,u=r||i||"";if(!l)return n;if(Rj.test(l)||Pj.test(l))return`url(${u}${l}${u})`;if(Ij.test(l))return`url(${u}${l}${u})`;if(l[0]==="/")return`url(${u}${Cj(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 Oj=/^[^ \t\n\r\u000c]+/,Dj=/^[, \t\n\r\u000c]+/;function Mj(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(Dj),!(n>=t.length);){let i=r(Oj);if(i.slice(-1)===",")i=Xa(e,i.substring(0,i.length-1)),s.push(i);else{let o="";i=Xa(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 P_=new WeakMap;function Xa(e,t){return!t||t.trim()===""?t:hp(e,t)}function Lj(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function hp(e,t){let n=P_.get(e);if(n||(n=e.createElement("a"),P_.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function eA(e,t,n,r,s,i,o){if(!r)return r;if(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#"))return Xa(e,r);if(n==="xlink:href"&&r[0]!=="#")return Xa(e,r);if(n==="background"&&(t==="table"||t==="td"||t==="th"))return Xa(e,r);if(n==="srcset")return Mj(e,r);if(n==="style"){let a=ih(r,hp(e));return o&&o.size>0&&(a=Aj(a,o)),a}else if(t==="object"&&n==="data")return Xa(e,r);return typeof i=="function"?i(n,r,s):r}function tA(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function Fj(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 Nj(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function Ho(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Ho(e.parentNode,t,n,r+1)}function Qa(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(Nj(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function Cl(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=Ho(o,Qa(r,s)),l<0)return!0;a=Ho(o,Qa(t,n),l>=0?l:1/0)}else{if(a=Ho(o,Qa(t,n)),a<0)return!1;l=Ho(o,Qa(r,s),a>=0?a:1/0)}return a>=0?l>=0?a<=l:!0:l>=0?!1:!!i}catch{}return!!i}function $j(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=Qv(()=>{s||(t(),s=!0)},n);e.addEventListener("load",()=>{JI(a),s=!0,t()});return}const o="about:blank";if(r.location.href!==o||e.src===o||e.src==="")return Qv(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function Bj(e,t,n){let r=!1,s;try{s=e.sheet}catch{return}if(s)return;const i=Qv(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{JI(i),r=!0,t()})}function Vj(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:p,maskInputOptions:v={},maskTextFn:m,maskInputFn:y,dataURLOptions:S={},inlineImages:b,recordCanvas:k,keepIframeSrcFn:T,newlyAddedElement:_=!1,ignoreCSSAttributes:C}=t,R=Uj(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:hn.Document,childNodes:[],compatMode:e.compatMode}:{type:hn.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:hn.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:R};case e.ELEMENT_NODE:return Hj(e,{doc:n,blockClass:s,blockSelector:i,unblockSelector:o,inlineStylesheet:p,maskAttributeFn:l,maskInputOptions:v,maskInputFn:y,dataURLOptions:S,inlineImages:b,recordCanvas:k,keepIframeSrcFn:T,newlyAddedElement:_,rootId:R,maskTextClass:u,unmaskTextClass:c,maskTextSelector:d,unmaskTextSelector:f,ignoreCSSAttributes:C});case e.TEXT_NODE:return zj(e,{doc:n,maskAllText:a,maskTextClass:u,unmaskTextClass:c,maskTextSelector:d,unmaskTextSelector:f,maskTextFn:m,maskInputOptions:v,maskInputFn:y,rootId:R});case e.CDATA_SECTION_NODE:return{type:hn.CDATA,textContent:"",rootId:R};case e.COMMENT_NODE:return{type:hn.Comment,textContent:e.textContent||"",rootId:R};default:return!1}}function Uj(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function zj(e,t){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 p=d==="STYLE"?!0:void 0,v=d==="SCRIPT"?!0:void 0,m=d==="TEXTAREA"?!0:void 0;if(p&&f){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(f=rh(e.parentNode.sheet))}catch(S){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${S}`,e)}f=ih(f,hp(t.doc))}v&&(f="SCRIPT_PLACEHOLDER");const y=Cl(e,r,i,s,o,n);if(!p&&!v&&!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 S=fp({type:null,tagName:d,maskInputOptions:l});f=gc({isMasked:Cl(e,r,i,s,o,S),element:e,value:f,maskInputFn:u})}return{type:hn.Text,textContent:f||"",isStyle:p,rootId:c}}function Hj(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:p,newlyAddedElement:v=!1,rootId:m,maskTextClass:y,unmaskTextClass:S,maskTextSelector:b,unmaskTextSelector:k,ignoreCSSAttributes:T}=t,_=Fj(e,r,s,i),C=Ej(e);let R={};const w=e.attributes.length;for(let I=0;I<w;I++){const A=e.attributes[I];A.name&&!tA(C,A.name,A.value)&&(R[A.name]=eA(n,C,El(A.name),A.value,e,l,T))}if(C==="link"&&o){const I=Array.from(n.styleSheets).find($=>$.href===e.href);let A=null;I&&(A=rh(I)),A&&(R.rel=null,R.href=null,R.crossorigin=null,R._cssText=ih(A,I.href))}if(C==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const I=rh(e.sheet);I&&(R._cssText=ih(I,hp(n)))}if(C==="input"||C==="textarea"||C==="select"||C==="option"){const I=e,A=lS(I),$=sh(I,Xv(C),A),K=I.checked;if(A!=="submit"&&A!=="button"&&$){const M=Cl(I,y,b,S,k,fp({type:A,tagName:Xv(C),maskInputOptions:a}));R.value=gc({isMasked:M,element:I,value:$,maskInputFn:u})}K&&(R.checked=K)}if(C==="option"&&(e.selected&&!a.select?R.selected=!0:delete R.selected),C==="canvas"&&f){if(e.__context==="2d")_j(e)||(R.rr_dataURL=e.toDataURL(c.type,c.quality));else if(!("__context"in e)){const I=e.toDataURL(c.type,c.quality),A=n.createElement("canvas");A.width=e.width,A.height=e.height;const $=A.toDataURL(c.type,c.quality);I!==$&&(R.rr_dataURL=I)}}if(C==="img"&&d){Fa||(Fa=n.createElement("canvas"),R_=Fa.getContext("2d"));const I=e,A=I.currentSrc||I.getAttribute("src")||"<unknown-src>",$=I.crossOrigin,K=()=>{I.removeEventListener("load",K);try{Fa.width=I.naturalWidth,Fa.height=I.naturalHeight,R_.drawImage(I,0,0),R.rr_dataURL=Fa.toDataURL(c.type,c.quality)}catch(M){if(I.crossOrigin!=="anonymous"){I.crossOrigin="anonymous",I.complete&&I.naturalWidth!==0?K():I.addEventListener("load",K);return}else console.warn(`Cannot inline img src=${A}! Error: ${M}`)}I.crossOrigin==="anonymous"&&($?R.crossOrigin=$:I.removeAttribute("crossorigin"))};I.complete&&I.naturalWidth!==0?K():I.addEventListener("load",K)}if((C==="audio"||C==="video")&&(R.rr_mediaState=e.paused?"paused":"played",R.rr_mediaCurrentTime=e.currentTime),v||(e.scrollLeft&&(R.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(R.rr_scrollTop=e.scrollTop)),_){const{width:I,height:A}=e.getBoundingClientRect();R={class:R.class,rr_width:`${I}px`,rr_height:`${A}px`}}C==="iframe"&&!p(R.src)&&(!_&&!ZI(e)&&(R.rr_src=R.src),delete R.src);let P;try{customElements.get(C)&&(P=!0)}catch{}return{type:hn.Element,tagName:C,attributes:R,childNodes:[],isSVG:Lj(e)||void 0,needBlock:_,rootId:m,isCustom:P}}function Ft(e){return e==null?"":e.toLowerCase()}function jj(e,t){if(t.comment&&e.type===hn.Comment)return!0;if(e.type===hn.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"&&XI(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(Ft(e.attributes.name).match(/^msapplication-tile(image|color)$/)||Ft(e.attributes.name)==="application-name"||Ft(e.attributes.rel)==="icon"||Ft(e.attributes.rel)==="apple-touch-icon"||Ft(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&Ft(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Ft(e.attributes.property).match(/^(og|twitter|fb):/)||Ft(e.attributes.name).match(/^(og|twitter):/)||Ft(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(Ft(e.attributes.name)==="robots"||Ft(e.attributes.name)==="googlebot"||Ft(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(Ft(e.attributes.name)==="author"||Ft(e.attributes.name)==="generator"||Ft(e.attributes.name)==="framework"||Ft(e.attributes.name)==="publisher"||Ft(e.attributes.name)==="progid"||Ft(e.attributes.property).match(/^article:/)||Ft(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(Ft(e.attributes.name)==="google-site-verification"||Ft(e.attributes.name)==="yandex-verification"||Ft(e.attributes.name)==="csrf-token"||Ft(e.attributes.name)==="p:domain_verify"||Ft(e.attributes.name)==="verify-v1"||Ft(e.attributes.name)==="verification"||Ft(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ja(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:p=!0,maskInputOptions:v={},maskAttributeFn:m,maskTextFn:y,maskInputFn:S,slimDOMOptions:b,dataURLOptions:k={},inlineImages:T=!1,recordCanvas:_=!1,onSerialize:C,onIframeLoad:R,iframeLoadTimeout:w=5e3,onBlockedImageLoad:P,onStylesheetLoad:I,stylesheetLoadTimeout:A=5e3,keepIframeSrcFn:$=()=>!1,newlyAddedElement:K=!1,ignoreCSSAttributes:M}=t;let{preserveWhiteSpace:L=!0}=t;const j=Vj(e,{doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:a,unblockSelector:o,maskTextClass:l,unmaskTextClass:u,maskTextSelector:c,unmaskTextSelector:d,inlineStylesheet:p,maskInputOptions:v,maskAttributeFn:m,maskTextFn:y,maskInputFn:S,dataURLOptions:k,inlineImages:T,recordCanvas:_,keepIframeSrcFn:$,newlyAddedElement:K,ignoreCSSAttributes:M});if(!j)return console.warn(e,"not serialized"),null;let G;r.hasNode(e)?G=r.getId(e):jj(j,b)||!L&&j.type===hn.Text&&!j.isStyle&&!j.textContent.replace(/^\s+|\s+$/gm,"").length?G=vc:G=uS();const B=Object.assign(j,{id:G});if(r.add(e,B),G===vc)return null;C&&C(e);let q=!f;if(B.type===hn.Element){q=q&&!B.needBlock;const N=e.shadowRoot;N&&Wu(N)&&(B.isShadowHost=!0)}if((B.type===hn.Document||B.type===hn.Element)&&q){b.headWhitespace&&B.type===hn.Element&&B.tagName==="head"&&(L=!1);const N={doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:a,unblockSelector:o,maskTextClass:l,unmaskTextClass:u,maskTextSelector:c,unmaskTextSelector:d,skipChild:f,inlineStylesheet:p,maskInputOptions:v,maskAttributeFn:m,maskTextFn:y,maskInputFn:S,slimDOMOptions:b,dataURLOptions:k,inlineImages:T,recordCanvas:_,preserveWhiteSpace:L,onSerialize:C,onIframeLoad:R,iframeLoadTimeout:w,onBlockedImageLoad:P,onStylesheetLoad:I,stylesheetLoadTimeout:A,keepIframeSrcFn:$,ignoreCSSAttributes:M},se=e.childNodes?Array.from(e.childNodes):[];for(const z of se){const U=Ja(z,N);U&&B.childNodes.push(U)}if(pj(e)&&e.shadowRoot)for(const z of Array.from(e.shadowRoot.childNodes)){const U=Ja(z,N);U&&(Wu(e.shadowRoot)&&(U.isShadow=!0),B.childNodes.push(U))}}if(e.parentNode&&qu(e.parentNode)&&Wu(e.parentNode)&&(B.isShadow=!0),B.type===hn.Element&&B.tagName==="iframe"&&!B.needBlock&&$j(e,()=>{const N=ZI(e);if(N&&R){const se=Ja(N,{doc:N,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:l,unmaskTextClass:u,maskTextSelector:c,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:v,maskAttributeFn:m,maskTextFn:y,maskInputFn:S,slimDOMOptions:b,dataURLOptions:k,inlineImages:T,recordCanvas:_,preserveWhiteSpace:L,onSerialize:C,onIframeLoad:R,iframeLoadTimeout:w,onStylesheetLoad:I,stylesheetLoadTimeout:A,keepIframeSrcFn:$,ignoreCSSAttributes:M});se&&R(e,se)}},w),B.type===hn.Element&&B.tagName==="img"&&!e.complete&&B.needBlock){const N=e,se=()=>{if(N.isConnected&&!N.complete&&P)try{const z=N.getBoundingClientRect();z.width>0&&z.height>0&&P(N,B,z)}catch{}N.removeEventListener("load",se)};N.isConnected&&N.addEventListener("load",se)}return B.type===hn.Element&&B.tagName==="link"&&typeof B.attributes.rel=="string"&&(B.attributes.rel==="stylesheet"||B.attributes.rel==="preload"&&typeof B.attributes.href=="string"&&XI(B.attributes.href)==="css")&&Bj(e,()=>{if(I){const N=Ja(e,{doc:n,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:l,unmaskTextClass:u,maskTextSelector:c,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:v,maskAttributeFn:m,maskTextFn:y,maskInputFn:S,slimDOMOptions:b,dataURLOptions:k,inlineImages:T,recordCanvas:_,preserveWhiteSpace:L,onSerialize:C,onIframeLoad:R,iframeLoadTimeout:w,onStylesheetLoad:I,stylesheetLoadTimeout:A,keepIframeSrcFn:$,ignoreCSSAttributes:M});N&&I(e,N)}},A),B.type===hn.Element&&delete B.needBlock,B}function qj(e,t){const{mirror:n=new YI,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:p=!1,maskAllInputs:v=!1,maskAttributeFn:m,maskTextFn:y,maskInputFn:S,slimDOM:b=!1,dataURLOptions:k,preserveWhiteSpace:T,onSerialize:_,onIframeLoad:C,iframeLoadTimeout:R,onBlockedImageLoad:w,onStylesheetLoad:P,stylesheetLoadTimeout:I,keepIframeSrcFn:A=()=>!1,ignoreCSSAttributes:$=new Set([])}=t||{};return Ja(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:v===!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}:v===!1?{}:v,maskAttributeFn:m,maskTextFn:y,maskInputFn:S,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:k,inlineImages:f,recordCanvas:p,preserveWhiteSpace:T,onSerialize:_,onIframeLoad:C,iframeLoadTimeout:R,onBlockedImageLoad:w,onStylesheetLoad:P,stylesheetLoadTimeout:I,keepIframeSrcFn:A,newlyAddedElement:!1,ignoreCSSAttributes:$})}function ir(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const qa=`Please stop import mirror directly. Instead of that,\r
37
+ now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
38
+ or you can use record.mirror to access the mirror instance during recording.`;let I_={map:{},getId(){return console.error(qa),-1},getNode(){return console.error(qa),null},removeNodeFromMap(){console.error(qa)},has(){return console.error(qa),!1},reset(){console.error(qa)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(I_=new Proxy(I_,{get(e,t,n){return t==="map"&&console.error(qa),Reflect.get(e,t,n)}}));function yc(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&&(Jj(r),r=null),s=o,e.apply(l,i)):!r&&n.trailing!==!1&&(r=pp(()=>{s=n.leading===!1?0:Date.now(),r=null,e.apply(l,i)},a))}}function nA(e,t,n,r,s=window){const i=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,r?n:{set(o){pp(()=>{n.set.call(this,o)},0),i&&i.set&&i.set.call(this,o)}}),()=>nA(e,t,i||{},!0)}function cS(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 oh=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(oh=()=>new Date().getTime());function rA(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:t?.documentElement.scrollLeft||t?.body?.parentElement?.scrollLeft||t?.body?.scrollLeft||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:t?.documentElement.scrollTop||t?.body?.parentElement?.scrollTop||t?.body?.scrollTop||0}}function sA(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function iA(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function oA(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Dr(e,t,n,r,s){if(!e)return!1;const i=oA(e);if(!i)return!1;const o=Qa(t,n);if(!s){const u=r&&i.matches(r);return o(i)&&!u}const a=Ho(i,o);let l=-1;return a<0?!1:(r&&(l=Ho(i,Qa(null,r))),a>-1&&l<0?!0:a<l)}function Wj(e,t){return t.getId(e)!==-1}function Im(e,t){return t.getId(e)===vc}function aA(e,t){if(qu(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?aA(e.parentNode,t):!0:!0}function Jv(e){return!!e.changedTouches}function Gj(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 lA(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function uA(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Zv(e){return!!e?.shadowRoot}class Kj{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 cA(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function Yj(e){let t=e,n;for(;n=cA(t);)t=n;return t}function Xj(e){const t=e.ownerDocument;if(!t)return!1;const n=Yj(e);return t.contains(n)}function dA(e){const t=e.ownerDocument;return t?t.contains(e)||Xj(e):!1}const A_={};function dS(e){const t=A_[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 A_[e]=r.bind(window)}function Qj(...e){return dS("requestAnimationFrame")(...e)}function pp(...e){return dS("setTimeout")(...e)}function Jj(...e){return dS("clearTimeout")(...e)}var rt=(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))(rt||{}),Ke=(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))(Ke||{}),tr=(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))(tr||{}),oi=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(oi||{}),Wa=(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))(Wa||{});function fS(e){try{return e.contentDocument}catch{}}function Zj(e){try{return e.contentWindow}catch{}}function O_(e){return"__ln"in e}class e8{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?.next||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&O_(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&&O_(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 D_=(e,t)=>`${e}@${t}`;class t8{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 e8,s=l=>{let u=l,c=vc;for(;c===vc;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},i=l=>{if(!l.parentNode||!dA(l))return;const u=qu(l.parentNode)?this.mirror.getId(cA(l)):this.mirror.getId(l.parentNode),c=s(l);if(u===-1||c===-1)return r.addNode(l);const d=Ja(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=>{lA(f,this.mirror)&&!Dr(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(f),uA(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),Zv(l)&&this.shadowDomManager.addShadowRoot(l.shadowRoot,this.doc)},onIframeLoad:(f,p)=>{Dr(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(f,p),f.contentWindow&&this.canvasManager.addWindow(f.contentWindow),this.shadowDomManager.observeAttachShadow(f))},onStylesheetLoad:(f,p)=>{this.stylesheetManager.attachLinkElement(f,p)},onBlockedImageLoad:(f,p,{width:v,height:m})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:p.id,attributes:{style:{width:`${v}px`,height:`${m}px`}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});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)M_(this.removes,l,this.mirror)&&!this.movedSet.has(l.parentNode)||i(l);for(const l of this.addedSet)!L_(this.droppedSet,l)&&!M_(this.removes,l,this.mirror)||L_(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 p=c.value;if(p.parentNode&&p.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const v=p.parentNode.host;if(this.mirror.getId(v)!==-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(!Im(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!Dr(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:Cl(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,oA(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=lS(n),a=n.tagName;s=sh(n,a,o);const l=fp({maskInputOptions:this.maskInputOptions,tagName:a,type:o}),u=Cl(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,l);s=gc({isMasked:u,element:n,value:s,maskInputFn:this.maskInputFn})}if(Dr(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(!fS(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"),!tA(n.tagName,r)&&(i.attributes[r]=eA(this.doc,El(n.tagName),El(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(Dr(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=qu(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Dr(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||Im(n,this.mirror)||!Wj(n,this.mirror)||(this.addedSet.has(n)?(ey(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||aA(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[D_(r,s)]?ey(this.movedSet,n):this.removes.push({parentId:s,id:r,isShadow:qu(t.target)&&Wu(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(Im(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[D_(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Dr(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes&&t.childNodes.forEach(r=>this.genAdds(r)),Zv(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","ignoreCSSAttributes"].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 ey(e,t){e.delete(t),t.childNodes?.forEach(n=>ey(e,n))}function M_(e,t,n){return e.length===0?!1:n8(e,t,n)}function n8(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 L_(e,t){return e.size===0?!1:fA(e,t)}function fA(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:fA(e,n):!1}let Gu;function r8(e){Gu=e}function s8(){Gu=void 0}const ht=e=>Gu?(...n)=>{try{return e(...n)}catch(r){if(Gu&&Gu(r)===!0)return()=>{};throw r}}:e,Za=[];function sd(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 hA(e,t){const n=new t8;Za.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const s=window?.Zone?.__symbol__?.("MutationObserver");s&&window[s]&&(r=window[s]);const i=new r(ht(o=>{e.onMutation&&e.onMutation(o)===!1||n.processMutations.bind(n)(o)}));return i.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function i8({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=yc(ht(d=>{const f=Date.now()-a;e(o.map(p=>(p.timeOffset-=f,p)),d),o=[],a=null}),i),u=ht(yc(ht(d=>{const f=sd(d),{clientX:p,clientY:v}=Jv(d)?d.changedTouches[0]:d;a||(a=oh()),o.push({x:p,y:v,id:r.getId(f),timeOffset:oh()-a}),l(typeof DragEvent<"u"&&d instanceof DragEvent?Ke.Drag:d instanceof MouseEvent?Ke.MouseMove:Ke.TouchMove)}),s,{trailing:!1})),c=[ir("mousemove",u,n),ir("touchmove",u,n),ir("drag",u,n)];return ht(()=>{c.forEach(d=>d())})}function o8({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 p=sd(f);if(Dr(p,r,s,i,!0))return;let v=null,m=d;if("pointerType"in f){switch(f.pointerType){case"mouse":v=oi.Mouse;break;case"touch":v=oi.Touch;break;case"pen":v=oi.Pen;break}v===oi.Touch?tr[d]===tr.MouseDown?m="TouchStart":tr[d]===tr.MouseUp&&(m="TouchEnd"):oi.Pen}else Jv(f)&&(v=oi.Touch);v!==null?(u=v,(m.startsWith("Touch")&&v===oi.Touch||m.startsWith("Mouse")&&v===oi.Mouse)&&(v=null)):tr[d]===tr.Click&&(v=u,u=null);const y=Jv(f)?f.changedTouches[0]:f;if(!y)return;const S=n.getId(p),{clientX:b,clientY:k}=y;ht(e)({type:tr[m],id:S,x:b,y:k,...v!==null&&{pointerType:v}})};return Object.keys(tr).filter(d=>Number.isNaN(Number(d))&&!d.endsWith("_Departed")&&a[d]!==!1).forEach(d=>{let f=El(d);const p=c(d);if(window.PointerEvent)switch(tr[d]){case tr.MouseDown:case tr.MouseUp:f=f.replace("mouse","pointer");break;case tr.TouchStart:case tr.TouchEnd:return}l.push(ir(f,p,t))}),ht(()=>{l.forEach(d=>d())})}function pA({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){const a=ht(yc(ht(l=>{const u=sd(l);if(!u||Dr(u,r,s,i,!0))return;const c=n.getId(u);if(u===t&&t.defaultView){const d=rA(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 ir("scroll",a,t)}function a8({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const s=ht(yc(ht(()=>{const i=sA(),o=iA();(n!==i||r!==o)&&(e({width:Number(o),height:Number(i)}),n=i,r=o)}),200));return ir("resize",s,t)}const l8=["INPUT","TEXTAREA","SELECT"],F_=new WeakMap;function u8({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:p,maskTextSelector:v,unmaskTextSelector:m}){function y(R){let w=sd(R);const P=R.isTrusted,I=w&&Xv(w.tagName);if(I==="OPTION"&&(w=w.parentElement),!w||!I||l8.indexOf(I)<0||Dr(w,r,s,i,!0))return;const A=w;if(A.classList.contains(o)||a&&A.matches(a))return;const $=lS(w);let K=sh(A,I,$),M=!1;const L=fp({maskInputOptions:l,tagName:I,type:$}),j=Cl(w,f,v,p,m,L);($==="radio"||$==="checkbox")&&(M=w.checked),K=gc({isMasked:j,element:w,value:K,maskInputFn:u}),S(w,d?{text:K,isChecked:M,userTriggered:P}:{text:K,isChecked:M});const G=w.name;$==="radio"&&G&&M&&t.querySelectorAll(`input[type="radio"][name="${G}"]`).forEach(B=>{if(B!==w){const q=gc({isMasked:j,element:B,value:sh(B,I,$),maskInputFn:u});S(B,d?{text:q,isChecked:!M,userTriggered:!1}:{text:q,isChecked:!M})}})}function S(R,w){const P=F_.get(R);if(!P||P.text!==w.text||P.isChecked!==w.isChecked){F_.set(R,w);const I=n.getId(R);ht(e)({...w,id:I})}}const k=(c.input==="last"?["change"]:["input","change"]).map(R=>ir(R,ht(y),t)),T=t.defaultView;if(!T)return()=>{k.forEach(R=>R())};const _=T.Object.getOwnPropertyDescriptor(T.HTMLInputElement.prototype,"value"),C=[[T.HTMLInputElement.prototype,"value"],[T.HTMLInputElement.prototype,"checked"],[T.HTMLSelectElement.prototype,"value"],[T.HTMLTextAreaElement.prototype,"value"],[T.HTMLSelectElement.prototype,"selectedIndex"],[T.HTMLOptionElement.prototype,"selected"]];return _&&_.set&&k.push(...C.map(R=>nA(R[0],R[1],{set(){ht(y)({target:this,isTrusted:!1})}},!1,T))),ht(()=>{k.forEach(R=>R())})}function ah(e){const t=[];function n(r,s){if(Td("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Td("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Td("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Td("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 qi(e,t,n){let r,s;return e?(e.ownerNode?r=t.getId(e.ownerNode):s=n.getId(e),{styleId:s,id:r}):{}}function c8({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:ht((c,d,f)=>{const[p,v]=f,{id:m,styleId:y}=qi(d,t,n.styleMirror);return(m&&m!==-1||y&&y!==-1)&&e({id:m,styleId:y,adds:[{rule:p,index:v}]}),c.apply(d,f)})});const i=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:ht((c,d,f)=>{const[p]=f,{id:v,styleId:m}=qi(d,t,n.styleMirror);return(v&&v!==-1||m&&m!==-1)&&e({id:v,styleId:m,removes:[{index:p}]}),c.apply(d,f)})});let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:ht((c,d,f)=>{const[p]=f,{id:v,styleId:m}=qi(d,t,n.styleMirror);return(v&&v!==-1||m&&m!==-1)&&e({id:v,styleId:m,replace:p}),c.apply(d,f)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:ht((c,d,f)=>{const[p]=f,{id:v,styleId:m}=qi(d,t,n.styleMirror);return(v&&v!==-1||m&&m!==-1)&&e({id:v,styleId:m,replaceSync:p}),c.apply(d,f)})}));const l={};Rd("CSSGroupingRule")?l.CSSGroupingRule=r.CSSGroupingRule:(Rd("CSSMediaRule")&&(l.CSSMediaRule=r.CSSMediaRule),Rd("CSSConditionRule")&&(l.CSSConditionRule=r.CSSConditionRule),Rd("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:ht((f,p,v)=>{const[m,y]=v,{id:S,styleId:b}=qi(p.parentStyleSheet,t,n.styleMirror);return(S&&S!==-1||b&&b!==-1)&&e({id:S,styleId:b,adds:[{rule:m,index:[...ah(p),y||0]}]}),f.apply(p,v)})}),d.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:ht((f,p,v)=>{const[m]=v,{id:y,styleId:S}=qi(p.parentStyleSheet,t,n.styleMirror);return(y&&y!==-1||S&&S!==-1)&&e({id:y,styleId:S,removes:[{index:[...ah(p),m]}]}),f.apply(p,v)})})}),ht(()=>{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 mA({mirror:e,stylesheetManager:t},n){let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);const s=n.nodeName==="#document"?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,i=s?.prototype?Object.getOwnPropertyDescriptor(s?.prototype,"adoptedStyleSheets"):void 0;return r===null||r===-1||!s||!i?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get(){return i.get?.call(this)},set(o){const a=i.set?.call(this,o);if(r!==null&&r!==-1)try{t.adoptStyleSheets(o,r)}catch{}return a}}),ht(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))}function d8({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:s}){const i=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:ht((a,l,u)=>{const[c,d,f]=u;if(n.has(c))return i.apply(l,[c,d,f]);const{id:p,styleId:v}=qi(l.parentRule?.parentStyleSheet,t,r.styleMirror);return(p&&p!==-1||v&&v!==-1)&&e({id:p,styleId:v,set:{property:c,value:d,priority:f},index:ah(l.parentRule)}),a.apply(l,u)})});const o=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:ht((a,l,u)=>{const[c]=u;if(n.has(c))return o.apply(l,[c]);const{id:d,styleId:f}=qi(l.parentRule?.parentStyleSheet,t,r.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,remove:{property:c},index:ah(l.parentRule)}),a.apply(l,u)})}),ht(()=>{s.CSSStyleDeclaration.prototype.setProperty=i,s.CSSStyleDeclaration.prototype.removeProperty=o})}function f8({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:s,sampling:i,doc:o}){const a=ht(u=>yc(ht(c=>{const d=sd(c);if(!d||Dr(d,t,n,r,!0))return;const{currentTime:f,volume:p,muted:v,playbackRate:m}=d;e({type:u,id:s.getId(d),currentTime:f,volume:p,muted:v,playbackRate:m})}),i.media||500)),l=[ir("play",a(Wa.Play),o),ir("pause",a(Wa.Pause),o),ir("seeked",a(Wa.Seeked),o),ir("volumechange",a(Wa.VolumeChange),o),ir("ratechange",a(Wa.RateChange),o)];return ht(()=>{l.forEach(u=>u())})}function h8({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=cS(t.fonts,"add",function(a){return function(l){return pp(ht(()=>{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),ht(()=>{r.forEach(a=>a())})}function p8(e){const{doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,selectionCb:o}=e;let a=!0;const l=ht(()=>{const u=t.getSelection();if(!u||a&&u?.isCollapsed)return;a=u.isCollapsed||!1;const c=[],d=u.rangeCount||0;for(let f=0;f<d;f++){const p=u.getRangeAt(f),{startContainer:v,startOffset:m,endContainer:y,endOffset:S}=p;Dr(v,r,s,i,!0)||Dr(y,r,s,i,!0)||c.push({start:n.getId(v),startOffset:m,end:n.getId(y),endOffset:S})}o({ranges:c})});return l(),ir("selectionchange",l)}function m8({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:cS(n.customElements,"define",function(s){return function(i,o,a){try{t({define:{name:i}})}catch{}return s.apply(this,[i,o,a])}})}function g8(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=hA(e,e.doc));const s=i8(e),i=o8(e),o=pA(e),a=a8(e,{win:n}),l=u8(e),u=f8(e);let c=()=>{},d=()=>{},f=()=>{},p=()=>{};e.recordDOM&&(c=c8(e,{win:n}),d=mA(e,e.doc),f=d8(e,{win:n}),e.collectFonts&&(p=h8(e)));const v=p8(e),m=m8(e),y=[];for(const S of e.plugins)y.push(S.observer(S.callback,n,S.options));return ht(()=>{Za.forEach(S=>S.reset()),r?.disconnect(),s(),i(),o(),a(),l(),u(),c(),d(),f(),p(),v(),m(),y.forEach(S=>S())})}function Td(e){return typeof window[e]<"u"}function Rd(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class ty{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 v8{constructor(){this.crossOriginIframeMirror=new ty(uS),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class y8{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new ty(uS),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new ty(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){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&t.contentWindow?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(t);const r=fS(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){switch(n.type){case rt.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);const r=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,r),this.patchRootIdOnNode(n.data.node,r),{timestamp:n.timestamp,type:rt.IncrementalSnapshot,data:{source:Ke.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case rt.Meta:case rt.Load:case rt.DomContentLoaded:return!1;case rt.Plugin:return n;case rt.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case rt.IncrementalSnapshot:switch(n.data.source){case Ke.Mutation:return n.data.adds.forEach(r=>{this.replaceIds(r,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,t);const s=this.crossOriginIframeRootIdMap.get(t);s&&this.patchRootIdOnNode(r.node,s)}),n.data.removes.forEach(r=>{this.replaceIds(r,t,["parentId","id"])}),n.data.attributes.forEach(r=>{this.replaceIds(r,t,["id"])}),n.data.texts.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case Ke.Drag:case Ke.TouchMove:case Ke.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case Ke.ViewportResize:return!1;case Ke.MediaInteraction:case Ke.MouseInteraction:case Ke.Scroll:case Ke.CanvasMutation:case Ke.Input:return this.replaceIds(n.data,t,["id"]),n;case Ke.StyleSheetRule:case Ke.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case Ke.Font:return n;case Ke.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,t,["start","end"])}),n;case Ke.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),n.data.styles?.forEach(r=>{this.replaceStyleIds(r,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!==hn.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class b8{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class S8{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(!Wu(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const r=hA({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(pA({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),pp(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(mA({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){const n=fS(t),r=Zj(t);!n||!r||this.patchAttachShadow(r.Element,n)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(cS(t.prototype,"attachShadow",function(s){return function(i){const o=s.call(this,i);return this.shadowRoot&&dA(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 N_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",w8=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Pd=0;Pd<N_.length;Pd++)w8[N_.charCodeAt(Pd)]=Pd;class $_{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class _8{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new Kj,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:KI(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 k8{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,Qj(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}destroy(){}}let rn,lh;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const cs=wj();function yi(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:p=null,inlineStylesheet:v=!0,maskAllInputs:m,maskInputOptions:y,slimDOMOptions:S,maskAttributeFn:b,maskInputFn:k,maskTextFn:T,maxCanvasSize:_=null,packFn:C,sampling:R={},dataURLOptions:w={},mousemoveWait:P,recordDOM:I=!0,recordCanvas:A=!1,recordCrossOriginIframes:$=!1,recordAfter:K=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:M=!1,collectFonts:L=!1,inlineImages:j=!1,plugins:G,keepIframeSrcFn:B=()=>!1,ignoreCSSAttributes:q=new Set([]),errorHandler:N,onMutation:se,getCanvasManager:z}=e;r8(N);const U=$?window.parent===window:!0;let le=!1;if(!U)try{window.parent.document&&(le=!1)}catch{le=!0}if(U&&!t)throw new Error("emit function is required");if(!U&&!le)return()=>{};P!==void 0&&R.mousemove===void 0&&(R.mousemove=P),cs.reset();const J=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:{},be=S===!0||S==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:S==="all",headMetaDescKeywords:S==="all"}:S||{};Gj();let W,pe=0;const ue=me=>{for(const ye of G||[])ye.eventProcessor&&(me=ye.eventProcessor(me));return C&&!le&&(me=C(me)),me};rn=(me,ye)=>{const Ce=me;if(Ce.timestamp=oh(),Za[0]?.isFrozen()&&Ce.type!==rt.FullSnapshot&&!(Ce.type===rt.IncrementalSnapshot&&Ce.data.source===Ke.Mutation)&&Za.forEach(xe=>xe.unfreeze()),U)t?.(ue(Ce),ye);else if(le){const xe={type:"rrweb",event:ue(Ce),origin:window.location.origin,isCheckout:ye};window.parent.postMessage(xe,"*")}if(Ce.type===rt.FullSnapshot)W=Ce,pe=0;else if(Ce.type===rt.IncrementalSnapshot){if(Ce.data.source===Ke.Mutation&&Ce.data.isAttachIframe)return;pe++;const xe=r&&pe>=r,Te=n&&W&&Ce.timestamp-W.timestamp>n;(xe||Te)&&Ee(!0)}};const Y=me=>{rn({type:rt.IncrementalSnapshot,data:{source:Ke.Mutation,...me}})},Le=me=>rn({type:rt.IncrementalSnapshot,data:{source:Ke.Scroll,...me}}),D=me=>rn({type:rt.IncrementalSnapshot,data:{source:Ke.CanvasMutation,...me}}),V=me=>rn({type:rt.IncrementalSnapshot,data:{source:Ke.AdoptedStyleSheet,...me}}),X=new _8({mutationCb:Y,adoptedStyleSheetCb:V}),ce=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new v8:new y8({mirror:cs,mutationCb:Y,stylesheetManager:X,recordCrossOriginIframes:$,wrappedEmit:rn});for(const me of G||[])me.getMirror&&me.getMirror({nodeMirror:cs,crossOriginIframeMirror:ce.crossOriginIframeMirror,crossOriginIframeStyleMirror:ce.crossOriginIframeStyleMirror});const ve=new k8,he=E8(z,{mirror:cs,win:window,mutationCb:me=>rn({type:rt.IncrementalSnapshot,data:{source:Ke.CanvasMutation,...me}}),recordCanvas:A,blockClass:s,blockSelector:i,unblockSelector:o,maxCanvasSize:_,sampling:R.canvas,dataURLOptions:w,errorHandler:N}),Se=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new b8:new S8({mutationCb:Y,scrollCb:Le,bypassOptions:{onMutation:se,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:c,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:v,maskInputOptions:J,dataURLOptions:w,maskAttributeFn:b,maskTextFn:T,maskInputFn:k,recordCanvas:A,inlineImages:j,sampling:R,slimDOMOptions:be,iframeManager:ce,stylesheetManager:X,canvasManager:he,keepIframeSrcFn:B,processedNodeManager:ve,ignoreCSSAttributes:q},mirror:cs}),Ee=(me=!1)=>{if(!I)return;rn({type:rt.Meta,data:{href:window.location.href,width:iA(),height:sA()}},me),X.reset(),Se.init(),Za.forEach(Ce=>Ce.lock());const ye=qj(document,{mirror:cs,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:c,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:v,maskAllInputs:J,maskAttributeFn:b,maskInputFn:k,maskTextFn:T,slimDOM:be,dataURLOptions:w,recordCanvas:A,inlineImages:j,onSerialize:Ce=>{lA(Ce,cs)&&ce.addIframe(Ce),uA(Ce,cs)&&X.trackLinkElement(Ce),Zv(Ce)&&Se.addShadowRoot(Ce.shadowRoot,document)},onIframeLoad:(Ce,xe)=>{ce.attachIframe(Ce,xe),Ce.contentWindow&&he.addWindow(Ce.contentWindow),Se.observeAttachShadow(Ce)},onStylesheetLoad:(Ce,xe)=>{X.attachLinkElement(Ce,xe)},onBlockedImageLoad:(Ce,xe,{width:Te,height:ze})=>{Y({adds:[],removes:[],texts:[],attributes:[{id:xe.id,attributes:{style:{width:`${Te}px`,height:`${ze}px`}}}]})},keepIframeSrcFn:B,ignoreCSSAttributes:q});if(!ye)return console.warn("Failed to snapshot the document");rn({type:rt.FullSnapshot,data:{node:ye,initialOffset:rA(window)}}),Za.forEach(Ce=>Ce.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&X.adoptStyleSheets(document.adoptedStyleSheets,cs.getId(document))};lh=Ee;try{const me=[],ye=xe=>ht(g8)({onMutation:se,mutationCb:Y,mousemoveCb:(Te,ze)=>rn({type:rt.IncrementalSnapshot,data:{source:ze,positions:Te}}),mouseInteractionCb:Te=>rn({type:rt.IncrementalSnapshot,data:{source:Ke.MouseInteraction,...Te}}),scrollCb:Le,viewportResizeCb:Te=>rn({type:rt.IncrementalSnapshot,data:{source:Ke.ViewportResize,...Te}}),inputCb:Te=>rn({type:rt.IncrementalSnapshot,data:{source:Ke.Input,...Te}}),mediaInteractionCb:Te=>rn({type:rt.IncrementalSnapshot,data:{source:Ke.MediaInteraction,...Te}}),styleSheetRuleCb:Te=>rn({type:rt.IncrementalSnapshot,data:{source:Ke.StyleSheetRule,...Te}}),styleDeclarationCb:Te=>rn({type:rt.IncrementalSnapshot,data:{source:Ke.StyleDeclaration,...Te}}),canvasMutationCb:D,fontCb:Te=>rn({type:rt.IncrementalSnapshot,data:{source:Ke.Font,...Te}}),selectionCb:Te=>{rn({type:rt.IncrementalSnapshot,data:{source:Ke.Selection,...Te}})},customElementCb:Te=>{rn({type:rt.IncrementalSnapshot,data:{source:Ke.CustomElement,...Te}})},blockClass:s,ignoreClass:a,ignoreSelector:l,maskAllText:u,maskTextClass:c,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,maskInputOptions:J,inlineStylesheet:v,sampling:R,recordDOM:I,recordCanvas:A,inlineImages:j,userTriggeredOnInput:M,collectFonts:L,doc:xe,maskAttributeFn:b,maskInputFn:k,maskTextFn:T,keepIframeSrcFn:B,blockSelector:i,unblockSelector:o,slimDOMOptions:be,dataURLOptions:w,mirror:cs,iframeManager:ce,stylesheetManager:X,shadowDomManager:Se,processedNodeManager:ve,canvasManager:he,ignoreCSSAttributes:q,plugins:G?.filter(Te=>Te.observer)?.map(Te=>({observer:Te.observer,options:Te.options,callback:ze=>rn({type:rt.Plugin,data:{plugin:Te.name,payload:ze}})}))||[]},{});ce.addLoadListener(xe=>{try{me.push(ye(xe.contentDocument))}catch(Te){console.warn(Te)}});const Ce=()=>{Ee(),me.push(ye(document))};return document.readyState==="interactive"||document.readyState==="complete"?Ce():(me.push(ir("DOMContentLoaded",()=>{rn({type:rt.DomContentLoaded,data:{}}),K==="DOMContentLoaded"&&Ce()})),me.push(ir("load",()=>{rn({type:rt.Load,data:{}}),K==="load"&&Ce()},window))),()=>{me.forEach(xe=>xe()),ve.destroy(),lh=void 0,s8()}}catch(me){console.warn(me)}}function x8(e){if(!lh)throw new Error("please take full snapshot after start recording");lh(e)}yi.mirror=cs;yi.takeFullSnapshot=x8;function E8(e,t){try{return e?e(t):new $_}catch{return console.warn("Unable to initialize CanvasManager"),new $_}}var B_;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(B_||(B_={}));const C8=3,T8=5;function hS(e){return e>9999999999?e:e*1e3}function Am(e){return e>9999999999?e/1e3:e}function id(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:rt.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:ds(t,10,1e3)}}),t.category==="console")))}const R8="button,a";function gA(e){return e.closest(R8)||e}function vA(e){const t=yA(e);return!t||!(t instanceof Element)?t:gA(t)}function yA(e){return P8(e)?e.target:e}function P8(e){return typeof e=="object"&&!!e&&"target"in e}let Wi;function I8(e){return Wi||(Wi=[],A8()),Wi.push(e),()=>{const t=Wi?Wi.indexOf(e):-1;t>-1&&Wi.splice(t,1)}}function A8(){Sr($t,"open",function(e){return function(...t){if(Wi)try{Wi.forEach(n=>n())}catch{}return e.apply($t,t)}})}const O8=new Set([Ke.Mutation,Ke.StyleSheetRule,Ke.StyleDeclaration,Ke.AdoptedStyleSheet,Ke.CanvasMutation,Ke.Selection,Ke.MediaInteraction]);function D8(e,t,n){e.handleClick(t,n)}class M8{constructor(t,n,r=id){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=I8(()=>{this._lastMutation=V_()});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(F8(n,this._ignoreSelector)||!N8(t))return;const r={timestamp:Am(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=Am(t)}registerScroll(t=Date.now()){this._lastScroll=Am(t)}registerClick(t){const n=gA(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=V_();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:$t.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:$t.location.href,route:n.getCurrentRoute(),clickCount:o,metric:!0}};this._addBreadcrumbEvent(n,l)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=rd(()=>this._checkClicks(),1e3)}}const L8=["A","BUTTON","INPUT"];function F8(e,t){return!!(!L8.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 N8(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function V_(){return Date.now()/1e3}function $8(e,t){try{if(!B8(t))return;const{source:n}=t.data;if(O8.has(n)&&e.registerMutation(t.timestamp),n===Ke.Scroll&&e.registerScroll(t.timestamp),V8(t)){const{type:r,id:s}=t.data,i=yi.mirror.getNode(s);i instanceof HTMLElement&&r===tr.Click&&e.registerClick(i)}}catch{}}function B8(e){return e.type===C8}function V8(e){return e.data.source===Ke.MouseInteraction}function qs(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var pS=(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))(pS||{});const U8=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function z8(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(U8.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}const H8=e=>t=>{if(!e.isEnabled())return;const n=j8(t);if(!n)return;const r=t.name==="click",s=r?t.event:void 0;r&&e.clickDetector&&s?.target&&!s.altKey&&!s.metaKey&&!s.ctrlKey&&!s.shiftKey&&D8(e.clickDetector,n,vA(t.event)),id(e,n)};function bA(e,t){const n=yi.mirror.getId(e),r=n&&yi.mirror.getNode(n),s=r&&yi.mirror.getMeta(r),i=s&&W8(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===pS.Text&&o.textContent).filter(Boolean).map(o=>o.trim()).join(""),attributes:z8(i.attributes)}}:{}}}function j8(e){const{target:t,message:n}=q8(e);return qs({category:`ui.${e.name}`,...bA(t,n)})}function q8(e){const t=e.name==="click";let n,r=null;try{r=t?vA(e.event):yA(e.event),n=Rr(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function W8(e){return e.type===pS.Element}function G8(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=K8(t);n&&id(e,n)}function K8(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:i,target:o}=e;if(!o||Y8(o)||!i)return null;const a=t||r||s,l=i.length===1;if(!a&&l)return null;const u=Rr(o,{maxStringLength:200})||"<unknown>",c=bA(o,u);return qs({category:"ui.keyDown",message:u,data:{...c.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:i}})}function Y8(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const X8={resource:tq,paint:Z8,navigation:eq};function Om(e,t){return({metric:n})=>{t.replayPerformanceEntries.push(e(n))}}function Q8(e){return e.map(J8).filter(Boolean)}function J8(e){const t=X8[e.entryType];return t?t(e):null}function Tl(e){return((Ar()||$t.performance.timeOrigin)+e)/1e3}function Z8(e){const{duration:t,entryType:n,name:r,startTime:s}=e,i=Tl(s);return{type:n,name:r,start:i,end:i+t,data:void 0}}function eq(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:p,transferSize:v,type:m}=e;return s===0?null:{type:`${t}.${m}`,start:Tl(p),end:Tl(i),name:n,data:{size:v,decodedBodySize:r,encodedBodySize:o,duration:s,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:l,loadEventStart:c,loadEventEnd:d,domComplete:i,redirectCount:f}}}function tq(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:Tl(i),end:Tl(s),name:r,data:{size:u,statusCode:l,decodedBodySize:o,encodedBodySize:a}}}function nq(e){const t=e.entries[e.entries.length-1],n=t?.element?[t.element]:void 0;return mS(e,"largest-contentful-paint",n)}function rq(e){return e.sources!==void 0}function sq(e){const t=[],n=[];for(const r of e.entries)if(rq(r)){const s=[];for(const i of r.sources)if(i.node){n.push(i.node);const o=yi.mirror.getId(i.node);o&&s.push(o)}t.push({value:r.value,nodeIds:s.length?s:void 0})}return mS(e,"cumulative-layout-shift",n,t)}function iq(e){const t=e.entries[e.entries.length-1],n=t?.target?[t.target]:void 0;return mS(e,"interaction-to-next-paint",n)}function mS(e,t,n,r){const s=e.value,i=e.rating,o=Tl(s);return{type:"web-vital",name:t,start:o,end:o,data:{value:s,size:s,rating:i,nodeIds:n?n.map(a=>yi.mirror.getId(a)):void 0,attributions:r}}}function oq(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(ga(s,n))}),r.push(rS(Om(nq,e)),nS(Om(sq,e)),OI(Om(iq,e))),()=>{r.forEach(s=>s())}}const qe=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,aq='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 lq(){const e=new Blob([aq]);return URL.createObjectURL(e)}const U_=["log","warn","error"],pf="[Replay] ";function Dm(e,t="info"){co({category:"console",data:{logger:"replay"},level:t,message:`${pf}${e}`},{level:t})}function uq(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:r=>{e=!!r.captureExceptions,t=!!r.traceInternals}};return qe?(U_.forEach(r=>{n[r]=(...s)=>{Re[r](pf,...s),t&&Dm(s.join(""),pI(r))}}),n.exception=(r,...s)=>{s.length&&n.error&&n.error(...s),Re.error(pf,r),e?Gs(r,{mechanism:{handled:!0,type:"auto.function.replay.debug"}}):t&&Dm(r,"error")},n.infoTick=(...r)=>{Re.log(pf,...r),t&&setTimeout(()=>Dm(r[0]),0)}):U_.forEach(r=>{n[r]=()=>{}}),n}const We=uq();class gS extends Error{constructor(){super(`Event buffer exceeded maximum size of ${aS}.`)}}class SA{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>aS)throw new gS;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?hS(t):null}}class cq{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(){qe&&We.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){qe&&We.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 dq{constructor(t){this._worker=new cq(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=hS(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>aS?Promise.reject(new gS):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{qe&&We.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 fq{constructor(t){this._fallback=new SA,this._compression=new dq(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){qe&&We.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){qe&&We.exception(i,"Failed to add events when switching buffers.")}}}function hq({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=pq(t);if(n)return n}return qe&&We.log("Using simple buffer"),new SA}function pq(e){try{const t=e||mq();if(!t)return;qe&&We.log(`Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new fq(n)}catch(t){qe&&We.exception(t,"Failed to create compression worker")}}function mq(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?lq():""}function vS(){try{return"sessionStorage"in $t&&!!$t.sessionStorage}catch{return!1}}function gq(e){vq(),e.session=void 0}function vq(){if(vS())try{$t.sessionStorage.removeItem(iS)}catch{}}function wA(e){return e===void 0?!1:Math.random()<e}function mp(e){if(vS())try{$t.sessionStorage.setItem(iS,JSON.stringify(e))}catch{}}function _A(e){const t=Date.now(),n=e.id||Nr(),r=e.started||t,s=e.lastActivity||t,i=e.segmentId||0,o=e.sampled,a=e.previousSessionId,l=e.dirty||!1;return{id:n,started:r,lastActivity:s,segmentId:i,sampled:o,previousSessionId:a,dirty:l}}function yq(e,t){return wA(e)?"session":t?"buffer":!1}function z_({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const s=yq(e,t),i=_A({sampled:s,previousSessionId:r});return n&&mp(i),i}function bq(){if(!vS())return null;try{const e=$t.sessionStorage.getItem(iS);if(!e)return null;const t=JSON.parse(e);return qe&&We.infoTick("Loading existing session"),_A(t)}catch{return null}}function ny(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function kA(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return ny(e.started,t,r)||ny(e.lastActivity,n,r)}function xA(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!kA(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function Mm({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const s=r.stickySession&&bq();return s?xA(s,{sessionIdleExpire:e,maxReplayDuration:t})?(qe&&We.infoTick("Session in sessionStorage is expired, creating new one..."),z_(r,{previousSessionId:s.id})):s:(qe&&We.infoTick("Creating new session"),z_(r,{previousSessionId:n}))}function Sq(e){return e.type===rt.Custom}function yS(e,t,n){return CA(e,t)?(EA(e,t,n),!0):!1}function wq(e,t,n){return CA(e,t)?EA(e,t,n):Promise.resolve(null)}async function EA(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=_q(t,i.beforeAddRecordingEvent);return o?await r.addEvent(o):void 0}catch(i){const o=i&&i instanceof gS,a=o?"addEventSizeExceeded":"addEvent",l=lt();if(l){const u=o?"buffer_overflow":"internal_sdk_error";l.recordDroppedEvent(u,"replay")}if(o&&s)return r.clear(),r.waitForCheckout=!0,null;e.handleException(i),await e.stop({reason:a})}}function CA(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=hS(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(qe&&We.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function _q(e,t){try{if(typeof t=="function"&&Sq(e))return t(e)}catch(n){return qe&&We.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function bS(e){return!e.type}function ry(e){return e.type==="transaction"}function kq(e){return e.type==="replay_event"}function H_(e){return e.type==="feedback"}function xq(e){return(t,n)=>{if(!e.isEnabled()||!bS(t)&&!ry(t))return;const r=n.statusCode;if(!(!r||r<200||r>=300)){if(ry(t)){Eq(e,t);return}Cq(e,t)}}}function Eq(e,t){const n=e.getContext();t.contexts?.trace?.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function Cq(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)||rd(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(s){e.handleException(s)}})}function Tq(e){return t=>{!e.isEnabled()||!bS(t)||Rq(e,t)}}function Rq(e,t){const n=t.exception?.values?.[0]?.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 r=qs({category:"replay.hydrate-error",data:{url:Jl()}});id(e,r)}}function Pq(e){const t=lt();t&&t.on("beforeAddBreadcrumb",n=>Iq(e,n))}function Iq(e,t){if(!e.isEnabled()||!TA(t))return;const n=Aq(t);n&&id(e,n)}function Aq(e){return!TA(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?Oq(e):qs(e)}function Oq(e){const t=e.data?.arguments;if(!Array.isArray(t)||t.length===0)return qs(e);let n=!1;const r=t.map(s=>{if(!s)return s;if(typeof s=="string")return s.length>Cd?(n=!0,`${s.slice(0,Cd)}…`):s;if(typeof s=="object")try{const i=ds(s,7);return JSON.stringify(i).length>Cd?(n=!0,`${JSON.stringify(i,null,2).slice(0,Cd)}…`):i}catch{}return s});return qs({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function TA(e){return!!e.category}function Dq(e,t){return e.type||!e.exception?.values?.length?!1:!!t.originalException?.__rrweb__}function RA(){const e=xt().getPropagationContext().dsc;e&&delete e.replay_id;const t=Hn();if(t){const n=Ii(t);delete n.replay_id}}function Mq(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:rt.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 Lq(e,t){return e.recordingMode!=="buffer"||t.message===oS||!t.exception||t.type?!1:wA(e.getOptions().errorSampleRate)}function Fq(e){return Object.assign((t,n)=>{if(!e.isEnabled()||e.isPaused())return t;if(kq(t))return delete t.breadcrumbs,t;if(!bS(t)&&!ry(t)&&!H_(t))return t;if(!e.checkAndHandleExpiredSession())return RA(),t;if(H_(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),Mq(e,t),t;if(Dq(t,n)&&!e.getOptions()._experiments.captureExceptions)return qe&&We.log("Ignoring error from rrweb internals",t),null;const s=Lq(e,t);if((s||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),s&&e.recordingMode==="buffer"&&e.session?.sampled==="buffer"){const o=e.session;o.dirty=!0,e.getOptions().stickySession&&mp(o)}return t},{id:"Replay"})}function gp(e,t){return t.map(({type:n,start:r,end:s,name:i,data:o})=>{const a=e.throttledAddEvent({type:rt.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 Nq(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 $q(e){return t=>{if(!e.isEnabled())return;const n=Nq(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(gp(e,[n]),!1)))}}function Bq(e,t){return qe&&e.getOptions()._experiments.traceInternals?!1:R5(t,lt())}function PA(e,t){e.isEnabled()&&t!==null&&(Bq(e,t.name)||e.addUpdate(()=>(gp(e,[t]),!0)))}function vp(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=UI(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function IA(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function uh(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 AA(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 bc(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function Ji(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}=Vq(n);return r.body=s,i?.length&&(r._meta={warnings:i}),r}function sy(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 Vq(e){if(!e||typeof e!="string")return{body:e};const t=e.length>k_,n=Uq(e);if(t){const r=e.slice(0,k_);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 Uq(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function ch(e,t){const n=zq(e);return gi(n,t)}function zq(e,t=$t.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith($t.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 Hq(e,t,n){try{const r=await qq(e,t,n),s=AA("resource.fetch",r);PA(n.replay,s)}catch(r){qe&&We.exception(r,"Failed to capture fetch breadcrumb")}}function jq(e,t){const{input:n,response:r}=t,s=n?HI(n):void 0,i=vp(s),o=r?IA(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 qq(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=ch(o,n.networkDetailAllowUrls)&&!ch(o,n.networkDetailDenyUrls),f=d?Wq(n,t.input,u):bc(u),p=await Gq(d,n,t.response,c);return{startTimestamp:s,endTimestamp:i,url:o,method:a,statusCode:l,request:f,response:p}}function Wq({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const s=n?Xq(n,t):{};if(!e)return Ji(s,r,void 0);const i=HI(n),[o,a]=zI(i,We),l=Ji(s,r,o);return a?uh(l,a):l}async function Gq(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,s){if(!e&&s!==void 0)return bc(s);const i=r?OA(r.headers,n):{};if(!r||!t&&s!==void 0)return Ji(i,s,void 0);const[o,a]=await Yq(r),l=Kq(o,{networkCaptureBodies:t,responseBodySize:s,captureDetails:e,headers:i});return a?uh(l,a):l}function Kq(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:s}){try{const i=e?.length&&n===void 0?vp(e):n;return r?t?Ji(s,i,e):Ji(s,i,void 0):bc(i)}catch(i){return qe&&We.exception(i,"Failed to serialize response body"),Ji(s,n,void 0)}}async function Yq(e){const t=Qq(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await Jq(t)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(qe&&We.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(qe&&We.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function OA(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function Xq(e,t){return e.length===1&&typeof e[0]!="string"?j_(e[0],t):e.length===2?j_(e[1],t):{}}function j_(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?OA(n,t):Array.isArray(n)?{}:sy(n,t):{}}function Qq(e){try{return e.clone()}catch(t){qe&&We.exception(t,"Failed to clone response body")}}function Jq(e){return new Promise((t,n)=>{const r=rd(()=>n(new Error("Timeout while trying to read response body")),500);Zq(e).then(s=>t(s),s=>n(s)).finally(()=>clearTimeout(r))})}async function Zq(e){return await e.text()}async function e6(e,t,n){try{const r=n6(e,t,n),s=AA("resource.xhr",r);PA(n.replay,s)}catch(r){qe&&We.exception(r,"Failed to capture xhr breadcrumb")}}function t6(e,t){const{xhr:n,input:r}=t;if(!n)return;const s=vp(r),i=n.getResponseHeader("content-length")?IA(n.getResponseHeader("content-length")):i6(n.response,n.responseType);s!==void 0&&(e.data.request_body_size=s),i!==void 0&&(e.data.response_body_size=i)}function n6(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||!ch(l,n.networkDetailAllowUrls)||ch(l,n.networkDetailDenyUrls)){const C=bc(d),R=bc(f);return{startTimestamp:s,endTimestamp:i,url:l,method:u,statusCode:c,request:C,response:R}}const p=a[zo],v=p?sy(p.request_headers,n.networkRequestHeaders):{},m=sy(jI(a),n.networkResponseHeaders),[y,S]=n.networkCaptureBodies?zI(o,We):[void 0],[b,k]=n.networkCaptureBodies?r6(a):[void 0],T=Ji(v,d,y),_=Ji(m,f,b);return{startTimestamp:s,endTimestamp:i,url:l,method:u,statusCode:c,request:S?uh(T,S):T,response:k?uh(_,k):_}}function r6(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return s6(e.response,e.responseType)}catch(n){t.push(n)}return qe&&We.warn("Failed to get xhr response body",...t),[void 0]}function s6(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 qe&&We.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return qe&&We.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function i6(e,t){try{const n=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return vp(n)}catch{return}}function o6(e){const t=lt();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)=>a6(a,l,u))}catch{}}function a6(e,t,n){if(t.data)try{l6(t)&&c6(n)&&(t6(t,n),e6(t,n,e)),u6(t)&&d6(n)&&(jq(t,n),Hq(t,n,e))}catch(r){qe&&We.exception(r,"Error when enriching network breadcrumb")}}function l6(e){return e.category==="xhr"}function u6(e){return e.category==="fetch"}function c6(e){return e?.xhr}function d6(e){return e?.response}function f6(e){const t=lt();$I(H8(e)),dp($q(e)),Pq(e),o6(e);const n=Fq(e);Y3(n),t&&(t.on("beforeSendEvent",Tq(e)),t.on("afterSendEvent",xq(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)=>{const i=e.getSessionId();s?.includeReplay&&e.isEnabled()&&i&&r.contexts?.feedback&&(r.contexts.feedback.source==="api"&&await e.sendBufferedReplayOrFlush(),r.contexts.feedback.replay_id=i)}),t.on("openFeedbackWidget",async()=>{await e.sendBufferedReplayOrFlush()}))}async function h6(e){try{return Promise.all(gp(e,[p6($t.performance.memory)]))}catch{return[]}}function p6(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 m6(e,t,n){return M5(e,t,{...n,setTimeoutImpl:rd})}const Id=at.navigator;function g6(){return/iPhone|iPad|iPod/i.test(Id?.userAgent??"")||/Macintosh/i.test(Id?.userAgent??"")&&Id?.maxTouchPoints&&Id?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function v6(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){qe&&We.warn("Received replay event after session expired.");return}const s=r||!t;t=!0,e.clickDetector&&$8(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&s&&e.setInitialState(),!yS(e,n,s))return!0;if(!s)return!1;const i=e.session;if(b6(e,s),e.recordingMode==="buffer"&&i&&e.eventBuffer&&!i.dirty){const o=e.eventBuffer.getEarliestTimestamp();o&&(qe&&We.log(`Updating session start time to earliest event in buffer to ${new Date(o)}`),i.started=o,e.getOptions().stickySession&&mp(i))}return i?.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}}function y6(e){const t=e.getOptions();return{type:rt.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 b6(e,t){!t||!e.session||e.session.segmentId!==0||yS(e,y6(e),!1)}function S6(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function w6(e,t,n,r){return wo(HP(e,Ub(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function _6({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}
39
+ `;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 k6({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 YP(e.getOptions(),r,i,t,e,Zs());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?.sdk||{};return o.sdk={...o.sdk,name:l||"sentry.javascript.unknown",version:u||"0.0.0",settings:c},o}async function x6({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:s,session:i}){const o=_6({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:l,traceIds:u,initialTimestamp:c}=r,d=lt(),f=xt(),p=d?.getTransport(),v=d?.getDsn();if(!d||!p||!v||!i.sampled)return Promise.resolve({});const m={type:ej,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 k6({scope:f,client:d,replayId:t,event:m});if(!y)return d.recordDroppedEvent("event_processor","replay"),qe&&We.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete y.sdkProcessingMetadata;const S=w6(y,o,v,d.getOptions().tunnel);let b;try{b=await p.send(S)}catch(T){const _=new Error(oS);try{_.cause=T}catch{}throw _}if(typeof b.statusCode=="number"&&(b.statusCode<200||b.statusCode>=300))throw new DA(b.statusCode);const k=iI({},b);if(sI(k,"replay"))throw new SS(k);return b}class DA extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class SS extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}async function MA(e,t={count:0,interval:oj}){const{recordingData:n,onError:r}=e;if(n.length)try{return await x6(e),!0}catch(s){if(s instanceof DA||s instanceof SS)throw s;if(G3("Replays",{_retryCount:t.count}),r&&r(s),t.count>=aj){const i=new Error(`${oS} - max retries exceeded`);try{i.cause=s}catch{}throw i}return t.interval*=++t.count,new Promise((i,o)=>{rd(async()=>{try{await MA(e,t),i(!0)}catch(a){o(a)}},t.interval)})}}const LA="__THROTTLED",E6="__SKIPPED";function C6(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?E6:LA}o=!1;const u=r.get(l)||0;return r.set(l,u+1),e(...a)}}class T6{constructor({options:t,recordingOptions:n}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:tj,sessionIdleExpire:nj},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=m6(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=C6((o,a)=>wq(this,o,a),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:s}=this.getOptions(),i=r?{threshold:Math.min(lj,r),timeout:r,scrollTimeout:uj,ignoreSelector:s?s.join(","):""}:void 0;if(i&&(this.clickDetector=new M8(this,i)),qe){const o=t._experiments;We.setConfig({captureExceptions:!!o.captureExceptions,traceInternals:!!o.traceInternals})}this._handleVisibilityChange=()=>{$t.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{const o=qs({category:"ui.blur"});this._doChangeToBackgroundTasks(o)},this._handleWindowFocus=()=>{const o=qs({category:"ui.focus"});this._doChangeToForegroundTasks(o)},this._handleKeyboardEvent=o=>{G8(this,o)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){qe&&We.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){qe&&We.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",qe&&We.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){qe&&We.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){qe&&We.log("Buffering is in progress, call `flush()` to save the replay");return}qe&&We.infoTick("Starting replay in session mode"),this._updateUserActivity();const t=Mm({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){qe&&We.log("Buffering is in progress, call `flush()` to save the replay");return}qe&&We.infoTick("Starting replay in buffer mode");const t=Mm({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=yi({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:ij}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:v6(this),...g6(),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}={}){if(this._isEnabled){this._isEnabled=!1,this.recordingMode="buffer";try{qe&&We.log(`Stopping Replay${n?` triggered by ${n}`:""}`),RA(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,gq(this)}catch(r){this.handleException(r)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),qe&&We.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),qe&&We.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();qe&&We.log("Converting buffer to session"),await this.flushImmediate();const r=this.stopRecording();!t||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this.session.dirty=!1,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){if(!(t&&this.session?.sampled===!1))return this.session?.id}checkAndHandleExpiredSession(){if(this._lastActivity&&ny(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${$t.location.pathname}${$t.location.hash}${$t.location.search}`,n=`${$t.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===LA){const s=qs({category:"replay.throttled"});this.addUpdate(()=>!yS(this,{type:T8,timestamp:s.timestamp||0,data:{tag:"breadcrumb",payload:s,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastActiveSpan||Hn(),n=t&&$n(t),s=(n&&dt(n).data||{})[wr];if(!(!n||!s||!["route","custom"].includes(s)))return dt(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=hq({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=Mm({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 xA(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{$t.document.addEventListener("visibilitychange",this._handleVisibilityChange),$t.addEventListener("blur",this._handleWindowBlur),$t.addEventListener("focus",this._handleWindowFocus),$t.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(f6(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=oq(this)}_removeListeners(){try{$t.document.removeEventListener("visibilitychange",this._handleVisibilityChange),$t.removeEventListener("blur",this._handleWindowBlur),$t.removeEventListener("focus",this._handleWindowFocus),$t.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}_doChangeToBackgroundTasks(t){!this.session||kA(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()){qe&&We.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:rt.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=Q8(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(gp(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(){const t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){qe&&We.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!this.eventBuffer?.hasEvents&&(await h6(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const r=this._popEventContext(),s=this.session.segmentId++;this._maybeSaveSession();const i=await this.eventBuffer.finish();await MA({replayId:t,recordingData:i,segmentId:s,eventContext:r,session:this.session,timestamp:n,onError:o=>this.handleException(o)})}catch(n){this.handleException(n),this.stop({reason:"sendReplay"});const r=lt();if(r){const s=n instanceof SS?"ratelimit_backoff":"send_error";r.recordDroppedEvent(s,"replay")}}}async _flush({force:t=!1}={}){if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){qe&&We.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){qe&&We.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&&qe&&We.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&&mp(this.session)}_onMutationHandler(t){const{ignoreMutations:n}=this._options._experiments;if(n?.length&&t.some(a=>{const l=S6(a.target),u=n.join(",");return 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=qs({category:"replay.mutations",data:{count:r,limit:o}});this._createCustomBreadcrumb(a)}return o?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}function Su(e,t){return[...e,...t].join(",")}function R6({mask:e,unmask:t,block:n,unblock:r,ignore:s}){const i=["base","iframe[srcdoc]:not([src])"],o=Su(e,[".sentry-mask","[data-sentry-mask]"]),a=Su(t,[]);return{maskTextSelector:o,unmaskTextSelector:a,blockSelector:Su(n,[".sentry-block","[data-sentry-block]",...i]),unblockSelector:Su(r,[]),ignoreSelector:Su(s,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function P6({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 q_='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',I6=["content-length","content-type","accept"],A6=Symbol.for("sentry__originalRequestBody");let W_=!1,G_=!1;function O6(){if(typeof Request>"u"||G_)return;const e=Request;try{const t=function(n,r){const s=new e(n,r);return r?.body!=null&&(s[A6]=r.body),s};t.prototype=e.prototype,at.Request=t,G_=!0}catch{}}const D6=(e=>new M6(e));class M6{constructor({flushMinDelay:t=rj,flushMaxDelay:n=sj,minReplayDuration:r=cj,maxReplayDuration:s=x_,stickySession:i=!0,useCompression:o=!0,workerUrl:a,_experiments:l={},maskAllText:u=!0,maskAllInputs:c=!0,blockAllMedia:d=!0,mutationBreadcrumbLimit:f=750,mutationLimit:p=1e4,slowClickTimeout:v=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:y=[],networkDetailDenyUrls:S=[],networkCaptureBodies:b=!0,networkRequestHeaders:k=[],networkResponseHeaders:T=[],mask:_=[],maskAttributes:C=["title","placeholder","aria-label"],unmask:R=[],block:w=[],unblock:P=[],ignore:I=[],maskFn:A,beforeAddRecordingEvent:$,beforeErrorSampling:K,onError:M,attachRawBodyFromRequest:L=!1}={}){this.name="Replay";const j=R6({mask:_,unmask:R,block:w,unblock:P,ignore:I});if(this._recordingOptions={maskAllInputs:c,maskAllText:u,maskInputOptions:{password:!0},maskTextFn:A,maskInputFn:A,maskAttributeFn:(G,B,q)=>P6({maskAttributes:C,maskAllText:u,privacyOptions:j,key:G,value:B,el:q}),...j,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:G=>{try{G.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!l.recordCrossOriginIframes},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,dj),maxReplayDuration:Math.min(s,x_),stickySession:i,useCompression:o,workerUrl:a,blockAllMedia:d,maskAllInputs:c,maskAllText:u,mutationBreadcrumbLimit:f,mutationLimit:p,slowClickTimeout:v,slowClickIgnoreSelectors:m,networkDetailAllowUrls:y,networkDetailDenyUrls:S,networkCaptureBodies:b,networkRequestHeaders:K_(k),networkResponseHeaders:K_(T),beforeAddRecordingEvent:$,beforeErrorSampling:K,onError:M,attachRawBodyFromRequest:L,_experiments:l},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${q_}`:q_,this._recordingOptions.ignoreCSSAttributes=new Set(["background-image"])),this._isInitialized&&Uv())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return W_}set _isInitialized(t){W_=t}afterAllSetup(t){!Uv()||this._replay||(this._initialOptions.attachRawBodyFromRequest&&O6(),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){if(this._replay?.isEnabled())return this._replay.getSessionId(t)}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){const n=L6(this._initialOptions,t);this._replay=new T6({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}function L6(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},s=pa(n.replaysSessionSampleRate),i=pa(n.replaysOnErrorSampleRate);return s==null&&i==null&&Mi(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),s!=null&&(r.sessionSampleRate=s),i!=null&&(r.errorSampleRate=i),r}function K_(e){return[...I6,...e.map(t=>t.toLowerCase())]}function F6(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function FA(e){try{return new URL(e,vt.location.origin).href}catch{return}}function N6(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function NA(e){try{return new Headers(e)}catch{return}}const Y_=new WeakMap,Lm=new Map,$A={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function $6(e,t){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:s,shouldCreateSpanForRequest:i,enableHTTPTimings:o,tracePropagationTargets:a,onRequestSpanStart:l,onRequestSpanEnd:u}={...$A,...t},c=typeof i=="function"?i:v=>!0,d=v=>B6(v,a),f={},p=e.getOptions().propagateTraceparent;n&&(e.addEventProcessor(v=>(v.type==="transaction"&&v.spans&&v.spans.forEach(m=>{if(m.op==="http.client"){const y=Lm.get(m.span_id);y&&(m.timestamp=y/1e3,Lm.delete(m.span_id))}}),v)),s&&m4(v=>{if(v.response){const m=Y_.get(v.response);m&&v.endTimestamp&&Lm.set(m,v.endTimestamp)}}),yI(v=>{const m=i4(v,c,d,f,{propagateTraceparent:p,onRequestSpanEnd:u});if(v.response&&v.fetchData.__span&&Y_.set(v.response,v.fetchData.__span),m){const y=FA(v.fetchData.url),S=y?na(y).host:void 0;m.setAttributes({"http.url":y,"server.address":S}),o&&X_(m),l?.(m,{headers:v.headers})}})),r&&VI(v=>{const m=V6(v,c,d,f,p,u);m&&(o&&X_(m),l?.(m,{headers:NA(v.xhr.__sentry_xhr_v3__?.request_headers)}))})}function X_(e){const{url:t}=dt(e).data;if(!t||typeof t!="string")return;const n=ga("resource",({entries:r})=>{r.forEach(s=>{N6(s)&&s.name.endsWith(t)&&(e.setAttributes(NI(s)),setTimeout(n))})})}function B6(e,t){const n=Jl();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?gi(r.toString(),t)||i&&gi(r.pathname,t):i}else{const r=!!e.match(/^\/(?!\/)/);return t?gi(e,t):r}}function V6(e,t,n,r,s,i){const o=e.xhr,a=o?.[zo];if(!o||o.__sentry_own_request__||!a)return;const{url:l,method:u}=a,c=Jr()&&t(l);if(e.endTimestamp&&c){const S=o.__sentry_xhr_span_id__;if(!S)return;const b=r[S];b&&a.status_code!==void 0&&(TP(b,a.status_code),b.end(),i?.(b,{headers:NA(jI(o)),error:e.error}),delete r[S]);return}const d=FA(l),f=na(d||l),p=T5(l),v=!!Hn(),m=c&&v?uo({name:`${u} ${p}`,attributes:{url:l,type:"xhr","http.method":u,"http.url":d,"server.address":f?.host,[tn]:"auto.http.browser",[Pi]:"http.client",...f?.search&&{"http.query":f?.search},...f?.hash&&{"http.fragment":f?.hash}}}):new lo;o.__sentry_xhr_span_id__=m.spanContext().spanId,r[o.__sentry_xhr_span_id__]=m,n(l)&&U6(o,Jr()&&v?m:void 0,s);const y=lt();return y&&y.emit("beforeOutgoingRequestSpan",m,e),m}function U6(e,t,n){const{"sentry-trace":r,baggage:s,traceparent:i}=hI({span:t,propagateTraceparent:n});r&&z6(e,r,s,i)}function z6(e,t,n,r){const s=e.__sentry_xhr_v3__?.request_headers;if(!(s?.["sentry-trace"]||!e.setRequestHeader))try{if(e.setRequestHeader("sentry-trace",t),r&&!s?.traceparent&&e.setRequestHeader("traceparent",r),n){const i=s?.baggage;(!i||!F6(i))&&e.setRequestHeader("baggage",n)}}catch{}}function H6(){vt.document?vt.document.addEventListener("visibilitychange",()=>{const e=Hn();if(!e)return;const t=$n(e);if(vt.document.hidden&&t){const n="cancelled",{op:r,status:s}=dt(t);es&&Re.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),s||t.setStatus({code:_n,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):es&&Re.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const j6=3600,BA="sentry_previous_trace",q6="sentry.previous_trace";function W6(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const r=t==="session-storage";let s=r?Y6():void 0;e.on("spanStart",o=>{if($n(o)!==o)return;const a=xt().getPropagationContext();s=G6(s,o,a),r&&K6(s)});let i=!0;n&&e.on("beforeSampling",o=>{if(!s)return;const a=xt(),l=a.getPropagationContext();if(i&&l.parentSpanId){i=!1;return}a.setPropagationContext({...l,dsc:{...l.dsc,sample_rate:String(s.sampleRate),sampled:String(iy(s.spanContext))},sampleRand:s.sampleRand}),o.parentSampled=iy(s.spanContext),o.parentSampleRate=s.sampleRate,o.spanAttributes={...o.spanAttributes,[CP]:s.sampleRate}})}function G6(e,t,n){const r=dt(t);function s(){try{return Number(n.dsc?.sample_rate)??Number(r.data?.[Lb])}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<=j6&&(es&&Re.log(`Adding previous_trace \`${JSON.stringify(o)}\` link to span \`${JSON.stringify({op:r.op,...t.spanContext()})}\``),t.addLink({context:o,attributes:{[SU]:"previous_trace"}}),t.setAttribute(q6,`${o.traceId}-${o.spanId}-${iy(o)?1:0}`)),i)}function K6(e){try{vt.sessionStorage.setItem(BA,JSON.stringify(e))}catch(t){es&&Re.warn("Could not store previous trace in sessionStorage",t)}}function Y6(){try{const e=vt.sessionStorage?.getItem(BA);return JSON.parse(e)}catch{return}}function iy(e){return e.traceFlags===1}const X6="BrowserTracing",Q6={...lf,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:{},...$A},Q_=((e={})=>{const t={name:void 0,source:void 0},n=vt.document,{enableInp:r,enableElementTiming:s,enableLongTask:i,enableLongAnimationFrame:o,_experiments:{enableInteractions:a,enableStandaloneClsSpans:l,enableStandaloneLcpSpans:u},beforeStartSpan:c,idleTimeout:d,finalTimeout:f,childSpanTimeout:p,markBackgroundSpan:v,traceFetch:m,traceXHR:y,trackFetchStreamPerformance:S,shouldCreateSpanForRequest:b,enableHTTPTimings:k,ignoreResourceSpans:T,ignorePerformanceApiSpans:_,instrumentPageLoad:C,instrumentNavigation:R,detectRedirects:w,linkPreviousTrace:P,consistentTraceSampling:I,enableReportPageLoaded:A,onRequestSpanStart:$,onRequestSpanEnd:K}={...Q6,...e};let M,L,j;function G(B,q,N=!0){const se=q.op==="pageload",z=q.name,U=c?c(q):q,le=U.attributes||{};if(z!==U.name&&(le[wr]="custom",U.attributes=le),!N){const W=Ra();uo({...U,startTime:W}).end(W);return}t.name=U.name,t.source=le[wr];const J=KP(U,{idleTimeout:d,finalTimeout:f,childSpanTimeout:p,disableAutoFinish:se,beforeSpanEnd:W=>{M?.(),xz(W,{recordClsOnPageloadSpan:!l,recordLcpOnPageloadSpan:!u,ignoreResourceSpans:T,ignorePerformanceApiSpans:_}),Z_(B,void 0);const pe=xt(),ue=pe.getPropagationContext();pe.setPropagationContext({...ue,traceId:J.spanContext().traceId,sampled:So(J),dsc:Ii(W)}),se&&(j=void 0)},trimIdleSpanEndTimestamp:!A});se&&A&&(j=J),Z_(B,J);function be(){n&&["interactive","complete"].includes(n.readyState)&&B.emit("idleSpanEnableAutoFinish",J)}se&&!A&&n&&(n.addEventListener("readystatechange",()=>{be()}),be())}return{name:X6,setup(B){if(YU(),M=vz({recordClsStandaloneSpans:l||!1,recordLcpStandaloneSpans:u||!1,client:B}),r&&Xz(),s&&Fz(),o&&at.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?bz():i&&yz(),a&&Sz(),w&&n){const N=()=>{L=fn()};addEventListener("click",N,{capture:!0}),addEventListener("keydown",N,{capture:!0,passive:!0})}function q(){const N=Sc(B);N&&!dt(N).timestamp&&(es&&Re.log(`[Tracing] Finishing current active span with op: ${dt(N).op}`),N.setAttribute(hc,"cancelled"),N.end())}B.on("startNavigationSpan",(N,se)=>{if(lt()!==B)return;if(se?.isRedirect){es&&Re.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),G(B,{op:"navigation.redirect",...N},!1);return}L=void 0,q(),Zs().setPropagationContext({traceId:Ri(),sampleRand:Math.random(),propagationSpanId:Jr()?void 0:vi()});const z=xt();z.setPropagationContext({traceId:Ri(),sampleRand:Math.random(),propagationSpanId:Jr()?void 0:vi()}),z.setSDKProcessingMetadata({normalizedRequest:void 0}),G(B,{op:"navigation",...N,parentSpan:null,forceTransaction:!0})}),B.on("startPageLoadSpan",(N,se={})=>{if(lt()!==B)return;q();const z=se.sentryTrace||J_("sentry-trace"),U=se.baggage||J_("baggage"),le=VU(z,U),J=xt();J.setPropagationContext(le),Jr()||(J.getPropagationContext().propagationSpanId=vi()),J.setSDKProcessingMetadata({normalizedRequest:Yb()}),G(B,{op:"pageload",...N})}),B.on("endPageloadSpan",()=>{A&&j&&(j.setAttribute(hc,"reportPageLoaded"),j.end())})},afterAllSetup(B){let q=Jl();if(P!=="off"&&W6(B,{linkPreviousTrace:P,consistentTraceSampling:I}),vt.location){if(C){const N=Ar();J6(B,{name:vt.location.pathname,startTime:N?N/1e3:void 0,attributes:{[wr]:"url",[tn]:"auto.pageload.browser"}})}R&&dp(({to:N,from:se})=>{if(se===void 0&&q?.indexOf(N)!==-1){q=void 0;return}q=void 0;const z=Kb(N),U=Sc(B),le=U&&w&&eW(U,L);VA(B,{name:z?.pathname||vt.location.pathname,attributes:{[wr]:"url",[tn]:"auto.navigation.browser"}},{url:N,isRedirect:le})})}v&&H6(),a&&Z6(B,d,f,p,t),r&&Zz(),$6(B,{traceFetch:m,traceXHR:y,trackFetchStreamPerformance:S,tracePropagationTargets:B.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:b,enableHTTPTimings:k,onRequestSpanStart:$,onRequestSpanEnd:K})}}});function J6(e,t,n){e.emit("startPageLoadSpan",t,n),xt().setTransactionName(t.name);const r=Sc(e);return r&&e.emit("afterStartPageLoadSpan",r),r}function VA(e,t,n){const{url:r,isRedirect:s}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:s}),e.emit("startNavigationSpan",t,{isRedirect:s});const i=xt();return i.setTransactionName(t.name),r&&!s&&i.setSDKProcessingMetadata({normalizedRequest:{...Yb(),url:r}}),Sc(e)}function J_(e){return vt.document?.querySelector(`meta[name=${e}]`)?.getAttribute("content")||void 0}function Z6(e,t,n,r,s){const i=vt.document;let o;const a=()=>{const l="ui.action.click",u=Sc(e);if(u){const c=dt(u).op;if(["navigation","pageload"].includes(c)){es&&Re.warn(`[Tracing] Did not create ${l} span because a pageload or navigation span is in progress.`);return}}if(o&&(o.setAttribute(hc,"interactionInterrupted"),o.end(),o=void 0),!s.name){es&&Re.warn(`[Tracing] Did not create ${l} transaction because _latestRouteName is missing.`);return}o=KP({name:s.name,op:l,attributes:{[wr]:s.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})};i&&addEventListener("click",a,{capture:!0})}const UA="_sentry_idleSpan";function Sc(e){return e[UA]}function Z_(e,t){$r(e,UA,t)}const ek=1.5;function eW(e,t){const n=dt(e),r=Ra(),s=n.start_timestamp;return!(r-s>ek||t&&r-t<=ek)}const zA=["activate","mount"],HA=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,tW=/(?:^|[-_])(\w)/g,nW=e=>e.replace(tW,t=>t.toUpperCase()).replace(/[-_]/g,""),rW="<Root>",Fm="<Anonymous>",sW=(e,t)=>e.repeat(t),Ku=(e,t)=>{if(!e)return Fm;if(e.$root===e)return rW;if(!e.$options)return Fm;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?`<${nW(r)}>`:Fm)+(s&&t!==!1?` at ${s}`:"")},iW=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`
40
+
41
+ found in
42
+
43
+ ${t.map((s,i)=>`${(i===0?"---> ":sW(" ",5+i*2))+(Array.isArray(s)?`${Ku(s[0])}... (${s[1]} recursive calls)`:Ku(s))}`).join(`
44
+ `)}`}return`
45
+
46
+ (found in ${Ku(e)})`},oW=(e,t)=>{const{errorHandler:n}=e.config;e.config.errorHandler=(r,s,i)=>{const o=Ku(s,!1),a=s?iW(s):"",l={componentName:o,lifecycleHook:i,trace:a};if(t?.attachProps!==!1&&s&&(s.$options?.propsData?l.propsData=s.$options.propsData:s.$props&&(l.propsData=s.$props)),setTimeout(()=>{Gs(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}},tk="ui.vue",aW={activate:["activated","deactivated"],create:["beforeCreate","created"],unmount:["beforeUnmount","unmounted"],destroy:["beforeDestroy","destroyed"],mount:["beforeMount","mounted"],update:["beforeUpdate","updated"]};function Nm(e,t,n){e.$_sentryRootComponentSpanTimer&&clearTimeout(e.$_sentryRootComponentSpanTimer),e.$_sentryRootComponentSpanTimer=setTimeout(()=>{e.$root?.$_sentryRootComponentSpan&&(e.$root.$_sentryRootComponentSpan.end(t),e.$root.$_sentryRootComponentSpan=void 0)},n)}function lW(e,t){function n(s){return s.replace(/^<([^\s]*)>(?: at [^\s]*)?$/,"$1")}return e.some(s=>n(t)===n(s))}const uW=(e={})=>{const t=(e.hooks||[]).concat(zA).filter((s,i,o)=>o.indexOf(s)===i),n={},r=e.timeout||2e3;for(const s of t){const i=aW[s];if(!i){HA&&Re.warn(`Unknown hook: ${s}`);continue}for(const o of i)n[o]=function(){const a=this.$root===this;a&&(this.$_sentryRootComponentSpan=this.$_sentryRootComponentSpan||uo({name:"Application Render",op:`${tk}.render`,attributes:{[tn]:"auto.ui.vue"},onlyIfParent:!0}),Nm(this,fn(),r));const l=Ku(this,!1);if(!(a||(Array.isArray(e.trackComponents)?lW(e.trackComponents,l):e.trackComponents))){Nm(this,fn(),r);return}this.$_sentryComponentSpans=this.$_sentryComponentSpans||{};const c=o===i[0],d=this.$root?.$_sentryRootComponentSpan||Hn();if(c){if(d){const f=this.$_sentryComponentSpans[s];f&&f.end(),this.$_sentryComponentSpans[s]=uo({name:`Vue ${l}`,op:`${tk}.${s}`,attributes:{[tn]:"auto.ui.vue"},onlyIfParent:!0})}}else{const f=this.$_sentryComponentSpans[s];if(!f)return;f.end(),Nm(this,fn(),r)}}}return n},cW=at,dW={Vue:cW.Vue,attachProps:!0,attachErrorHandler:!0,tracingOptions:{hooks:zA,timeout:2e3,trackComponents:!1}},fW="Vue",hW=(e={})=>({name:fW,setup(t){const n={...dW,...t.getOptions(),...e};if(!n.Vue&&!n.app){Mi(()=>{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=>nk(s,n)):n.Vue&&nk(n.Vue,n)}}),nk=(e,t)=>{HA&&e._instance?.isMounted===!0&&Mi(()=>{console.warn("[@sentry/vue]: Misconfigured SDK. Vue app is already mounted. Make sure to call `app.mount()` after `Sentry.init()`.")}),t.attachErrorHandler&&oW(e,t),Jr(t)&&e.mixin(uW(t.tracingOptions))};function pW(e={}){const t={defaultIntegrations:[...GI(),hW()],...e};return fI(t,"vue"),ZH(t)}function mW(e,t,n){let r=!1;e.onError(s=>Gs(s,{mechanism:{handled:!1}})),e.beforeEach((s,i,o)=>{const a=r?void 0:gW(),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"}xt().setTransactionName(u),t.instrumentPageLoad&&a&&(dt(a).data[wr]!=="custom"&&(a.updateName(u),a.setAttribute(wr,c)),a.setAttributes({...l,[tn]:"auto.pageload.vue"}),r=!0),t.instrumentNavigation&&!a&&n({name:u,op:"navigation",attributes:{...l,[tn]:"auto.navigation.vue",[wr]:c}}),o&&o()})}function gW(){const e=Hn(),t=e&&$n(e);return t&&dt(t).op==="pageload"?t:void 0}function vW(e={}){if(!e.router)return Q_(e);const t=Q_({...e,instrumentNavigation:!1}),{router:n,instrumentNavigation:r=!0,instrumentPageLoad:s=!0,routeLabel:i="name"}=e;return{...t,afterAllSetup(o){t.afterAllSetup(o),mW(n,{routeLabel:i,instrumentNavigation:r,instrumentPageLoad:s},l=>{VA(o,l)})}}}async function jA(){return"/"}async function Wn(e=!0,t=!0){const n=un.create({baseURL:await jA()});return n.interceptors.request.use(r=>(console.debug(`${r.method?.toUpperCase().padEnd(6)} ${r.url?.padEnd(25)} WithAuth: ${e?.toString().padEnd(7)} AutoHandle401: ${t?.toString().padEnd(7)} BaseURL: ${r.baseURL}`),r)),e&&n.interceptors.request.use(async r=>{const s=Zr();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=>{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?.url}`,stack:r.stack});if(s.status===Uo.FailedDependency)return Promise.reject(r);if(![Uo.Unauthorized,Uo.Forbidden].includes(s.status))return console.error("Error in axios response interceptor which is not 401 or 403",r),Gs(r),Promise.reject({message:`${r.message} - URL ${i?.url}`,stack:r.stack});if(s.status===Uo.Forbidden){const d=r?.response?.data;return console.error("[HttpClient] 403 Forbidden",d),Rn("auth:permission-denied").emit({roles:d?.roles,permissions:d?.permissions,error:d?.error,url:i?.url}),Promise.reject(r)}const o=Zr();o.loadTokens();const{reasonCode:a,url:l}=o.extractSpecialReasonCode(r);if(a)return await o.logout(!1,Tb(a)),console.error(`[AuthStore] 401 Unauthorized - emitting 'auth:${a}' with reason ${a}`),Rn(`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?.url)throw new Error("No URL in axios config, cannot retry");console.debug("Redoing request without interceptors",i?.url);const d=i;return d.headers||(d.headers={}),d.headers.Authorization=`Bearer ${o.token}`,un(d)}return console.error("[HttpClient] 401 Unauthorized - emitting 'auth:failure'"),Rn("auth:failure").emit({url:i?.url,error:r.message}),Promise.reject(r)}),n}class fr{static async get(t){return(await(await Wn(!0)).get(t)).data}static async put(t,n){return(await(await Wn(!0)).put(t,n)).data}static async post(t,n){return(await(await Wn(!0)).post(t,n)).data}static async postUpload(t,n,r){return await(await Wn(!0)).post(t,n,r)}static async getDownload(t,n){return await(await Wn(!0)).request({method:"GET",url:t,data:n,responseType:"arraybuffer"})}static async delete(t,n){return(await(await Wn(!0)).request({url:t,method:"delete",data:n})).data}static async patch(t,n){return(await(await Wn(!0)).patch(t,n)).data}}class ae{static base="/api";static firstTimeSetupRoute=`${ae.base}/first-time-setup`;static completeFirstTimeSetupRoute=`${ae.firstTimeSetupRoute}/complete`;static printerRoute=`${ae.base}/printer`;static printerBatchRoute=`${ae.printerRoute}/batch`;static printerTestConnectionRoute=`${ae.printerRoute}/test-connection`;static printerSettingsRoute=`${ae.base}/printer-settings`;static floorRoute=`${ae.base}/floor`;static batchRoute=`${ae.base}/batch`;static batchGetLastPrintedFilesRoute=`${ae.batchRoute}/reprint/list`;static batchReprintFilesRoute=`${ae.batchRoute}/reprint/execute`;static printCompletionRoute=`${ae.base}/print-completion`;static printerFilesRoute=`${ae.base}/printer-files`;static printerFilesPurgeRoute=`${ae.printerFilesRoute}/purge`;static printerGroupRoute=`${ae.base}/printer-group`;static createGroupRoute=`${ae.base}/printer-group`;static customGCodeRoute=`${ae.base}/custom-gcode`;static userRoute=`${ae.base}/user`;static rolesRoute=`${ae.base}/user/roles`;static userProfileRoute=`${ae.userRoute}/profile`;static settingsRoute=`${ae.base}/settings`;static settingsSensitiveRoute=`${ae.settingsRoute}/sensitive`;static updateLoginRequiredRoute=`${ae.settingsRoute}/login-required`;static updateRegistrationEnabledRoute=`${ae.settingsRoute}/registration-enabled`;static updateCredentialSettings=`${ae.settingsRoute}/credential`;static fileCleanSettingsRoute=`${ae.settingsRoute}/file-clean`;static updateFrontendSettingsRoute=`${ae.settingsRoute}/frontend`;static updateTimeoutSettingRoute=`${ae.settingsRoute}/timeout`;static serverSentryDiagnosticsSettingRoute=`${ae.settingsRoute}/sentry-diagnostics`;static updateExperimentalMoonrakerSupportRoute=`${ae.settingsRoute}/experimental-moonraker-support`;static updateExperimentalThumbnailSupportRoute=`${ae.settingsRoute}/experimental-thumbnail-support`;static updateExperimentalClientSupportRoute=`${ae.settingsRoute}/experimental-client-support`;static updateExperimentalPrusaLinkSupportRoute=`${ae.settingsRoute}/experimental-prusa-link-support`;static deleteGroupRoute=t=>`${ae.base}/printer-group/${t}`;static updateGroupNameRoute=t=>`${ae.base}/printer-group/${t}/name`;static addPrinterToGroupRoute=t=>`${ae.base}/printer-group/${t}/printer`;static deletePrinterFromGroupRoute=ae.addPrinterToGroupRoute;static getPrinterRoute=t=>`${ae.printerRoute}/${t}`;static postPrinterDisabledReasonRoute=t=>`${ae.printerRoute}/${t}/disabled-reason`;static getPrinterLoginDetailsRoute=t=>`${ae.getPrinterRoute(t)}/login-details`;static restartOctoPrintRoute=t=>`${ae.getPrinterRoute(t)}/restart-octoprint`;static refreshSocketRoute=t=>`${ae.getPrinterRoute(t)}/refresh-socket`;static getPrinterSettingsRoute=t=>`${ae.printerSettingsRoute}/${t}`;static setPrinterSettingsGCodeAnalysisRoute=t=>`${ae.getPrinterSettingsRoute(t)}/gcode-analysis`;static syncPrinterNameSettingRoute=t=>`${ae.getPrinterSettingsRoute(t)}/sync-printername`;static getFloorRoute=t=>`${ae.floorRoute}/${t}`;static addOrRemovePrinterFromFloorRoute=t=>`${ae.getFloorRoute(t)}/printer`;static sendQuickStopM112Route=t=>`${ae.customGCodeRoute}/send-emergency-m112/${t}`;static updatePrinterFloorNameRoute=t=>`${ae.getFloorRoute(t)}/name`;static updatePrinterFloorNumberRoute=t=>`${ae.getFloorRoute(t)}/floor-number`;static printerFilesClearRoute=t=>`${ae.printerFilesRoute}/${t}/clear`;static printerFilesStartPrintRoute=t=>`${ae.printerFilesRoute}/${t}/select`;static printerFilesUploadRoute=t=>`${ae.printerFilesRoute}/${t}/upload`;static printerFilesCacheRoute=t=>`${ae.printerFilesRoute}/${t}/cache`;static printerEnabledRoute=t=>`${ae.getPrinterRoute(t)}/enabled`;static printerSerialConnectRoute=t=>`${ae.getPrinterRoute(t)}/serial-connect`;static printerJogCommandRoute=t=>`${ae.getPrinterRoute(t)}/jog`;static printerHomeCommandRoute=t=>`${ae.getPrinterRoute(t)}/home`;static printerSerialDisconnectRoute=t=>`${ae.getPrinterRoute(t)}/serial-disconnect`;static printerJobRoute=t=>`${ae.getPrinterRoute(t)}/job`;static printerStopJobRoute=t=>`${ae.printerJobRoute(t)}/stop`;static printerPauseJobRoute=t=>`${ae.printerJobRoute(t)}/pause`;static printerResumeJobRoute=t=>`${ae.printerJobRoute(t)}/resume`;static userChangeUsernameRoute=t=>`${ae.userRoute}/${t}/change-username`;static userChangePasswordRoute=t=>`${ae.userRoute}/${t}/change-password`;static userDeleteRoute=t=>`${ae.userRoute}/${t}`;static userSetVerifiedRoute=t=>`${ae.userRoute}/${t}/set-verified`;static userSetRootUserRoute=t=>`${ae.userRoute}/${t}/set-root-user`;static userSetUserRolesRoute=t=>`${ae.userRoute}/${t}/set-user-roles`}const yW=Symbol("Progress snackbar message event symbol"),bW=Symbol("Info snackbar message event symbol"),SW=Symbol("Error snackbar message event symbol");function Rt(){const{emit:e,on:t}=Rn(yW),{emit:n,on:r}=Rn(bW),{emit:s,on:i}=Rn(SW);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 oy(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 bi extends fr{static async getFiles(t){const n=`${ae.printerFilesRoute}/${t}`;return await this.get(n)}static async getThumbnail(t){const n=`${ae.printerFilesRoute}/${t}/thumbnail`;return await this.get(n)}static async getFileCache(t){const n=`${ae.printerFilesCacheRoute(t)}`;return await this.get(n)}static async selectAndPrintFile(t,n,r=!0){const s=ae.printerFilesStartPrintRoute(t);return await this.post(s,{filePath:n,print:r})}static async uploadFile(t,n,r=!0){const s=ae.printerFilesUploadRoute(t.id),i=new FormData;return i.append("startPrint",r.toString()),i.append("files[0]",n),this.postUpload(s,i,{onUploadProgress:o=>{Rt().openProgressMessage("single-file-upload",`Uploading file ${n.name}`,100*o.loaded/o.total,!1)}})}static async clearFiles(t){const n=`${ae.printerFilesClearRoute(t)}`;return this.delete(n)}static async purgeFiles(){const t=`${ae.printerFilesPurgeRoute}`;return this.post(t)}static async deleteFileOrFolder(t,n){const r=`${ae.printerFilesRoute}/${t}?path=${encodeURIComponent(n)}`;return this.delete(r)}static async downloadFile(t,n){const r=`${ae.printerFilesRoute}/${t}/download/${encodeURIComponent(n)}`,s=await this.getDownload(r);oy(s.data,n)}}const wW=JSON.parse('["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"]'),_W=JSON.parse(`["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 rk(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}function su(){const e=Math.round(Math.random()*1124),t=Math.round(Math.random()*3260);return`${rk(wW[e])} ${rk(_W[t])}`}function yp(e){return e?.trim().length?e?.trim()?.replace(/[^a-zA-Z ]/g,"")?.split(" ").map(n=>n.length?n:"").slice(0,3).reduce((n,r)=>n+r[0],"")?.replace("undefined",""):"?"}const ay=()=>({id:void 0,name:su(),apiKey:"",username:"",password:"",printerURL:"",printerType:0,enabled:!0});class qt extends fr{static convertPrinterToCreateForm(t){const n=ay();return n.id=t.id,n.printerURL=t.printerURL,n.name=t.name||su(),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=ae.printerRoute;return await this.get(t)}static async getPrinterLoginDetails(t){const n=ae.getPrinterLoginDetailsRoute(t);return await this.get(n)}static async restartOctoPrint(t){const n=`${ae.restartOctoPrintRoute(t)}`;return await this.post(n)}static async refreshSocket(t){const n=`${ae.refreshSocketRoute(t)}`;return await this.post(n)}static async sendPrinterConnectCommand(t){const n=ae.printerSerialConnectRoute(t);return await this.post(n)}static async sendPrinterDisconnectCommand(t){const n=ae.printerSerialDisconnectRoute(t);return await this.post(n)}static async sendPrinterJogCommand(t,n){const r=ae.printerJogCommandRoute(t);return await this.post(r,n)}static async sendPrinterHomeCommand(t,n){const r=ae.printerHomeCommandRoute(t);return await this.post(r,n)}static async createPrinter(t,n){const r=`${ae.printerRoute}?forceSave=${n}`;return await this.post(r,t)}static async batchImportPrinters(t){const n=ae.printerBatchRoute;return await this.post(n,t)}static async deletePrinter(t){const n=ae.getPrinterRoute(t);return await this.delete(n)}static async updatePrinter(t,n,r){const i=`${ae.getPrinterRoute(t)}?forceSave=${r}`;return await this.patch(i,n)}static async updatePrinterMaintenance(t,n=null){const r=ae.postPrinterDisabledReasonRoute(t);return await this.patch(r,{disabledReason:n})}static async testConnection(t){const n=ae.printerTestConnectionRoute;return await this.post(n,t)}static async toggleEnabled(t,n){const r=ae.printerEnabledRoute(t);return await this.patch(r,{enabled:n})}}class pn extends fr{static async getSettings(){const t=ae.settingsRoute;return await this.get(t)}static async getSettingsSensitive(){const t=ae.settingsSensitiveRoute;return await this.get(t)}static async updateLoginRequiredSettings(t){const n=`${ae.updateLoginRequiredRoute}`;return await this.put(n,{loginRequired:t})}static async updateRegistrationEnabledSettings(t){const n=`${ae.updateRegistrationEnabledRoute}`;return await this.put(n,{registrationEnabled:t})}static async updateCredentialSettings(t,n,r){const s=`${ae.updateCredentialSettings}`;return await this.put(s,{jwtExpiresIn:t,refreshTokenAttempts:n,refreshTokenExpiry:r})}static async updateFrontendSettings(t){const n=`${ae.updateFrontendSettingsRoute}`;return await this.put(n,t)}static async setSentryDiagnosticsSettings(t){const n=`${ae.serverSentryDiagnosticsSettingRoute}`;return await this.patch(n,{enabled:t})}static async updateTimeoutSettings(t){const n=`${ae.updateTimeoutSettingRoute}`;return await this.put(n,t)}static async setFileCleanSettings(t){const n=`${ae.fileCleanSettingsRoute}`;return await this.put(n,t)}static async updateExperimentalMoonrakerSupport(t){const n=ae.updateExperimentalMoonrakerSupportRoute;return await this.put(n,{enabled:t})}static async updateExperimentalPrusaLinkSupport(t){const n=ae.updateExperimentalPrusaLinkSupportRoute;return await this.put(n,{enabled:t})}static async updateExperimentalClientSupport(t){const n=ae.updateExperimentalClientSupportRoute;return await this.put(n,{enabled:t})}}class sa extends fr{static async stopPrintJob(t){const n=ae.printerStopJobRoute(t);return await this.post(n)}static async pausePrintJob(t){const n=ae.printerPauseJobRoute(t);return await this.post(n)}static async resumePrintJob(t){const n=ae.printerResumeJobRoute(t);return await this.post(n)}}const Ts=is("Settings",{state:()=>({settings:void 0,frontendDebugSettings:{showPrinterStateUpdateSideNav:!1,showInterpretedPrinterState:!1,showJobsRendered:!1}}),actions:{async loadSettings(){const e=await pn.getSettings();return this.settings=e,e},async updateFrontendSettings(e){const t=await pn.updateFrontendSettings(e);return this.settings=t,t},async saveFrontendSettings(){if(!this.settings)return;const e=await pn.updateFrontendSettings(this.settings.frontend);this.settings=e},async updateTimeoutSettings(e){const t=await pn.updateTimeoutSettings(e);return this.settings=t,t}},getters:{serverSettings(){return this.settings?.server},frontendSettings(){return this.settings?.frontend},preferCancelOverQuickStop(){return this.settings?.frontend?.tilePreferCancelOverQuickStop||!1},thumbnailsEnabled(){return this.settings?.server.experimentalThumbnailSupport||!1},largeTiles(){return this.settings?.frontend?.largeTiles||!1},gridCols(){return this.settings?.frontend?.gridCols||8},gridRows(){return this.settings?.frontend?.gridRows||8}}}),ni={danger:"danger",dark:"dark",secondary:"secondary",success:"success"},ri={DarkBlue:"#050c2e",Black:"#000000",DarkGray:"#262626",LightBrown:"#583c0e",Brown:"#580e47",Red:"#2e0905"},Na={Disabled:"Disabled",Maintenance:"Maintenance",Error:"Error",Paused:"Paused",Operational:"Operational",Printing:"Printing"};function qA(e,t,n){const s=Ts().frontendDebugSettings.showInterpretedPrinterState,i={};if(!e.enabled)return e.disabledReason?.length?{...i,color:ni.danger,rgb:ri.Black,text:Na.Maintenance}:{...i,color:ni.secondary,rgb:ri.DarkBlue,text:Na.Disabled};const o=t?.api==="responding",a=t?.api==="authFail";if(!o||!t){const f=t?.api==="noResponse";return{...i,color:ni.secondary,rgb:ri.Red,text:a?"API key wrong":f?"API unreachable":t?.api||"-"}}if(!o)return{...i,color:ni.danger,rgb:ri.Red,text:a?"API key wrong":"No API connection"};const l=t.socket==="authenticated",u=t.socket==="authenticating",c=n?.current?.payload?.state,d=c?.flags;if(!l||!d)return s&&console.debug(`Socket opened ${l?1:0}, socketAuthing ${u?1:0} printerState ${n?1:0},
47
+ currentState: ${c}, FLAGS ${d}`),{...i,color:ni.danger,rgb:ri.Red,text:n?"Awaiting state":"Unknown state"};if(!d){console.error("No flags",d);return}return d.error||d.closedOrError?{...i,color:ni.danger,rgb:ri.Red,text:c.text?.replace("Offline","Disconnected")||Na.Error,description:c.error}:d.paused||d.pausing?{...i,color:ni.success,rgb:ri.Brown,text:Na.Paused}:d.printing?{...i,color:ni.success,rgb:ri.LightBrown,text:Na.Printing}:{...i,color:ni.dark,rgb:ri.DarkGray,text:Na.Operational,description:c.error}}const ia=e=>e?.current?.payload?.state,kW=e=>ia(e)?.flags.printing,xW=(e,t)=>!bp(e)&&e?.enabled&&!ia(t)?.flags.operational||ia(t)?.flags.error||ia(t)?.flags.closedOrError,WA=e=>!bp(e)&&!e?.enabled,bp=e=>!e?.enabled&&e?.disabledReason?.length,EW=(e,t)=>ia(t)?.flags&&!ia(t)?.flags.printing&&ia(t)?.flags.operational&&!WA(e)&&!bp(e),Jn=is("PrinterState",{state:()=>({printerIds:[],printerEventsById:{},socketStatesById:{}}),getters:{operationalPrintersById(){const e=Vt(),t={};return this.printerIds.forEach(n=>{if(this.printerEventsById[n]?.current?.payload?.state?.flags?.operational){const s=e.printer(n);if(s)t[n]=s;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=>{const n=this.printerEventsById[t];n?.current?.payload?.state?.flags?.printing&&(e[t]=n)}),e},isPrinterPrinting(){return e=>!!this.printingPrintersById[e]},isPrinterStoppable(){return e=>{const t=this.printerEventsById[e];if(!t)return!1;const n=t?.current?.payload?.state?.flags;return n?.printing||n?.paused||n?.pausing}},isPrinterPaused(){return e=>{const t=this.printerEventsById[e];if(!t)return!1;const n=t?.current?.payload?.state?.flags;return n?.paused||n?.pausing}},printerCurrentEventReceivedAtById(){const e={};return this.printerIds.forEach(t=>{const n=this.printerEventsById[t];n?.current?.receivedAt&&(e[t]=n.current.receivedAt)}),e},onlinePrinters(){const e=Vt(),t={};return this.printerIds.forEach(n=>{if(this.socketStatesById[n]?.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=Jn();return Object.values(e.onlinePrintersWithStates).filter(t=>kW(t.printerState)).length},operationalNotPrintingCount(){return this.onlinePrintersWithStates.filter(e=>EW(e.printer,e.printerState)).length},isApiResponding(){return e=>Object.keys(this.onlinePrinters).includes(e.toString())},isPrinterNotOnline(){return e=>!this.isApiResponding(e)},printerJobsById(){const e=Vt(),t=Ts().frontendDebugSettings.showJobsRendered,n={};return this.printerIds.forEach(r=>{const s=this.printerEventsById[r],i=s?.current?.payload?.state?.flags;if(i?.printing||i?.paused||i?.pausing){const o=e.printer(r);if(o)n[o.id]=s?.current?.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=Vt(),t=[];return this.printerIds.forEach(n=>{const r=this.printerEventsById[n],s=r?.current?.payload?.state?.flags;if(s?.printing||s?.paused||s?.pausing){const i=e.printer(n);if(i)t.push({printer:i,job:r?.current?.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=>{const n=this.printerEventsById[t],r=n?.current?.payload?.state?.flags;(r?.printing||r?.paused||r?.pausing)&&(e[t]=n?.current?.payload?.job?.file?.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||!Vt().printer(e))){if(this.isPrinterPrinting(e)){alert("This printer is printing or not connected! Either way printing is not an option.");return}await bi.selectAndPrintFile(e,t,!0)}}}}),Vt=is("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(WA).length},disconnectedCount(){const e=Jn();return this.printers.filter(t=>xW(t,e.printerEventsById[t.id])).length},maintenanceCount(){return this.printers.filter(e=>bp(e)).length}},actions:{async createPrinter(e,t){const n=await qt.createPrinter(e,t);return this.printers.push(n),this.printers.sort((r,s)=>r.name?.toLowerCase()?.localeCompare(s?.name?.toLowerCase())?1:-1),n},toggleSelectedPrinter(e){const t=Jn(),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 qt.updatePrinter(e,t,n);return this._replacePrinter({printerId:e,printer:r}),r},async loadPrinters(){const e=await qt.getPrinters();return this.setPrinters(e),e},async deletePrinter(e){const t=await qt.deletePrinter(e);return this._popPrinter(e),t},setPrinters(e){if(!e?.length){this.printers=[];return}const t=this.sideNavPrinter?.id;t&&(this.sideNavPrinter=e.find(n=>n.id===t)),this.printers=e.sort((n,r)=>n.name?.toLowerCase()?.localeCompare(r?.name?.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 bi.clearFiles(e);if(!t?.failedFiles)throw new Error("No failed files were returned");this.printerFileCache[e]&&(this.printerFileCache[e]=t.failedFiles)},async loadPrinterFiles(e){const t=await bi.getFiles(e);return t.sort((n,r)=>n.date<r.date?1:-1),this.printerFileCache[e]=t,t},async deletePrinterFile(e,t){await bi.deleteFileOrFolder(e,t);const n=this.printerFileCache[e];if(!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=Jn();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 sa.stopPrintJob(n.id)}}}),CW=oe({...Ue(),...ut()},"VCardActions"),An=_e()({name:"VCardActions",props:CW(),setup(e,t){let{slots:n}=t;return Tr({VBtn:{slim:!0,variant:"text"}}),Ae(()=>h(e.tag,{class:Pe(["v-card-actions",e.class]),style:De(e.style)},n)),{}}}),TW=oe({opacity:[Number,String],...Ue(),...ut()},"VCardSubtitle"),Sp=_e()({name:"VCardSubtitle",props:TW(),setup(e,t){let{slots:n}=t;return Ae(()=>h(e.tag,{class:Pe(["v-card-subtitle",e.class]),style:De([{"--v-card-subtitle-opacity":e.opacity},e.style])},n)),{}}}),Zt=Vl("v-card-title");function RW(e){return{aspectStyles:O(()=>{const t=Number(e.aspectRatio);return t?{paddingBottom:String(1/t*100)+"%"}:void 0})}}const GA=oe({aspectRatio:[String,Number],contentClass:null,inline:Boolean,...Ue(),...cr()},"VResponsive"),sk=_e()({name:"VResponsive",props:GA(),setup(e,t){let{slots:n}=t;const{aspectStyles:r}=RW(e),{dimensionStyles:s}=dr(e);return Ae(()=>E("div",{class:Pe(["v-responsive",{"v-responsive--inline":e.inline},e.class]),style:De([s.value,e.style])},[E("div",{class:"v-responsive__sizer",style:De(r.value)},null),n.additional?.(),n.default&&E("div",{class:Pe(["v-responsive__content",e.contentClass])},[n.default()])])),{}}});function PW(e,t){if(!ab)return;const n=t.modifiers||{},r=t.value,{handler:s,options:i}=typeof r=="object"?r:{handler:r,options:{}},o=new IntersectionObserver(function(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],l=arguments.length>1?arguments[1]:void 0;const u=e._observe?.[t.instance.$.uid];if(!u)return;const c=a.some(d=>d.isIntersecting);s&&(!n.quiet||u.init)&&(!n.once||c||u.init)&&s(c,a,l),c&&n.once?KA(e,t):u.init=!0},i);e._observe=Object(e._observe),e._observe[t.instance.$.uid]={init:!1,observer:o},o.observe(e)}function KA(e,t){const n=e._observe?.[t.instance.$.uid];n&&(n.observer.unobserve(e),delete e._observe[t.instance.$.uid])}const Rl={mounted:PW,unmounted:KA},IW=oe({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,...GA(),...Ue(),...On(),...Wl()},"VImg"),ts=_e()({name:"VImg",directives:{vIntersect:Rl},props:IW(),emits:{loadstart:e=>!0,load:e=>!0,error:e=>!0},setup(e,t){let{emit:n,slots:r}=t;const{backgroundColorClasses:s,backgroundColorStyles:i}=or(()=>e.color),{roundedClasses:o}=zn(e),a=nn("VImg"),l=ke(""),u=H(),c=ke(e.eager?"loading":"idle"),d=ke(),f=ke(),p=O(()=>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)}),v=O(()=>p.value.aspect||d.value/f.value||0);we(()=>e.src,()=>{m(c.value!=="idle")}),we(v,($,K)=>{!$&&K&&u.value&&T(u.value)}),Nl(()=>m());function m($){if(!(e.eager&&$)&&!(ab&&!$&&!e.eager)){if(c.value="loading",p.value.lazySrc){const K=new Image;K.src=p.value.lazySrc,T(K,null)}p.value.src&&ot(()=>{n("loadstart",u.value?.currentSrc||p.value.src),setTimeout(()=>{if(!a.isUnmounted)if(u.value?.complete){if(u.value.naturalWidth||S(),c.value==="error")return;v.value||T(u.value,null),c.value==="loading"&&y()}else v.value||T(u.value),b()})})}}function y(){a.isUnmounted||(b(),T(u.value),c.value="loaded",n("load",u.value?.currentSrc||p.value.src))}function S(){a.isUnmounted||(c.value="error",n("error",u.value?.currentSrc||p.value.src))}function b(){const $=u.value;$&&(l.value=$.currentSrc||$.src)}let k=-1;Vn(()=>{clearTimeout(k)});function T($){let K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:100;const M=()=>{if(clearTimeout(k),a.isUnmounted)return;const{naturalHeight:L,naturalWidth:j}=$;L||j?(d.value=j,f.value=L):!$.complete&&c.value==="loading"&&K!=null?k=window.setTimeout(M,K):($.currentSrc.endsWith(".svg")||$.currentSrc.startsWith("data:image/svg+xml"))&&(d.value=1,f.value=1)};M()}const _=ne(()=>({"v-img__img--cover":e.cover,"v-img__img--contain":!e.cover})),C=()=>{if(!p.value.src||c.value==="idle")return null;const $=E("img",{class:Pe(["v-img__img",_.value]),style:{objectPosition:e.position},crossorigin:e.crossorigin,src:p.value.src,srcset:p.value.srcset,alt:e.alt,referrerpolicy:e.referrerpolicy,draggable:e.draggable,sizes:e.sizes,ref:u,onLoad:y,onError:S},null),K=r.sources?.();return h(js,{transition:e.transition,appear:!0},{default:()=>[Ot(K?E("picture",{class:"v-img__picture"},[K,$]):$,[[Di,c.value==="loaded"]])]})},R=()=>h(js,{transition:e.transition},{default:()=>[p.value.lazySrc&&c.value!=="loaded"&&E("img",{class:Pe(["v-img__img","v-img__img--preload",_.value]),style:{objectPosition:e.position},crossorigin:e.crossorigin,src:p.value.lazySrc,alt:e.alt,referrerpolicy:e.referrerpolicy,draggable:e.draggable},null)]}),w=()=>r.placeholder?h(js,{transition:e.transition,appear:!0},{default:()=>[(c.value==="loading"||c.value==="error"&&!r.error)&&E("div",{class:"v-img__placeholder"},[r.placeholder()])]}):null,P=()=>r.error?h(js,{transition:e.transition,appear:!0},{default:()=>[c.value==="error"&&E("div",{class:"v-img__error"},[r.error()])]}):null,I=()=>e.gradient?E("div",{class:"v-img__gradient",style:{backgroundImage:`linear-gradient(${e.gradient})`}},null):null,A=ke(!1);{const $=we(v,K=>{K&&(requestAnimationFrame(()=>{requestAnimationFrame(()=>{A.value=!0})}),$())})}return Ae(()=>{const $=sk.filterProps(e);return Ot(h(sk,de({class:["v-img",{"v-img--absolute":e.absolute,"v-img--booting":!A.value},s.value,o.value,e.class],style:[{width:Oe(e.width==="auto"?d.value:e.width)},i.value,e.style]},$,{aspectRatio:v.value,"aria-label":e.alt,role:e.alt?"img":void 0}),{additional:()=>E(Ie,null,[h(C,null,null),h(R,null,null),h(I,null,null),h(w,null,null),h(P,null,null)]),default:r.default}),[[Rl,{handler:m,options:e.options},null,{once:!0}]])}),{currentSrc:l,image:u,state:c,naturalWidth:d,naturalHeight:f}}}),AW=oe({start:Boolean,end:Boolean,icon:$e,image:String,text:String,...os(),...Ue(),...Un(),...On(),...zl(),...ut(),...Pt(),...xs({variant:"flat"})},"VAvatar"),st=_e()({name:"VAvatar",props:AW(),setup(e,t){let{slots:n}=t;const{themeClasses:r}=Wt(e),{borderClasses:s}=_s(e),{colorClasses:i,colorStyles:o,variantClasses:a}=xa(e),{densityClasses:l}=as(e),{roundedClasses:u}=zn(e),{sizeClasses:c,sizeStyles:d}=Uc(e);return Ae(()=>h(e.tag,{class:Pe(["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:De([o.value,d.value,e.style])},{default:()=>[n.default?h(Tt,{key:"content-defaults",defaults:{VImg:{cover:!0,src:e.image},VIcon:{icon:e.icon}}},{default:()=>[n.default()]}):e.image?h(ts,{key:"image",src:e.image,alt:"",cover:!0},null):e.icon?h(Z,{key:"icon",icon:e.icon},null):e.text,go(!1,"v-avatar")]})),{}}}),OW=oe({appendAvatar:String,appendIcon:$e,prependAvatar:String,prependIcon:$e,subtitle:{type:[String,Number,Boolean],default:void 0},title:{type:[String,Number,Boolean],default:void 0},...Ue(),...Un(),...ut()},"VCardItem"),DW=_e()({name:"VCardItem",props:OW(),setup(e,t){let{slots:n}=t;return Ae(()=>{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 h(e.tag,{class:Pe(["v-card-item",e.class]),style:De(e.style)},{default:()=>[s&&E("div",{key:"prepend",class:"v-card-item__prepend"},[n.prepend?h(Tt,{key:"prepend-defaults",disabled:!r,defaults:{VAvatar:{density:e.density,image:e.prependAvatar},VIcon:{density:e.density,icon:e.prependIcon}}},n.prepend):E(Ie,null,[e.prependAvatar&&h(st,{key:"prepend-avatar",density:e.density,image:e.prependAvatar},null),e.prependIcon&&h(Z,{key:"prepend-icon",density:e.density,icon:e.prependIcon},null)])]),E("div",{class:"v-card-item__content"},[a&&h(Zt,{key:"title"},{default:()=>[n.title?.()??re(e.title)]}),l&&h(Sp,{key:"subtitle"},{default:()=>[n.subtitle?.()??re(e.subtitle)]}),n.default?.()]),o&&E("div",{key:"append",class:"v-card-item__append"},[n.append?h(Tt,{key:"append-defaults",disabled:!i,defaults:{VAvatar:{density:e.density,image:e.appendAvatar},VIcon:{density:e.density,icon:e.appendIcon}}},n.append):E(Ie,null,[e.appendIcon&&h(Z,{key:"append-icon",density:e.density,icon:e.appendIcon},null),e.appendAvatar&&h(st,{key:"append-avatar",density:e.density,image:e.appendAvatar},null)])])]})}),{}}}),MW=oe({opacity:[Number,String],...Ue(),...ut()},"VCardText"),Gt=_e()({name:"VCardText",props:MW(),setup(e,t){let{slots:n}=t;return Ae(()=>h(e.tag,{class:Pe(["v-card-text",e.class]),style:De([{"--v-card-text-opacity":e.opacity},e.style])},n)),{}}}),LW=oe({appendAvatar:String,appendIcon:$e,disabled:Boolean,flat:Boolean,hover:Boolean,image:String,link:{type:Boolean,default:void 0},prependAvatar:String,prependIcon:$e,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},...os(),...Ue(),...Un(),...cr(),...ls(),...Kh(),...vo(),...Hl(),...On(),...Qh(),...ut(),...Pt(),...xs({variant:"elevated"})},"VCard"),mt=_e()({name:"VCard",directives:{vRipple:Ss},props:LW(),setup(e,t){let{attrs:n,slots:r}=t;const{themeClasses:s}=Wt(e),{borderClasses:i}=_s(e),{colorClasses:o,colorStyles:a,variantClasses:l}=xa(e),{densityClasses:u}=as(e),{dimensionStyles:c}=dr(e),{elevationClasses:d}=ks(e),{loaderClasses:f}=zc(e),{locationStyles:p}=Ea(e),{positionClasses:v}=jl(e),{roundedClasses:m}=zn(e),y=Xh(e,n),S=ke(void 0);return we(()=>e.loading,(b,k)=>{S.value=!b&&typeof k=="string"?k:typeof b=="boolean"?void 0:b},{immediate:!0}),Ae(()=>{const b=e.link!==!1&&y.isLink.value,k=!e.disabled&&e.link!==!1&&(e.link||y.isClickable.value),T=b?"a":e.tag,_=!!(r.title||e.title!=null),C=!!(r.subtitle||e.subtitle!=null),R=_||C,w=!!(r.append||e.appendAvatar||e.appendIcon),P=!!(r.prepend||e.prependAvatar||e.prependIcon),I=!!(r.image||e.image),A=R||P||w,$=!!(r.text||e.text!=null);return Ot(h(T,de(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":k},s.value,i.value,o.value,u.value,d.value,f.value,v.value,m.value,l.value,e.class],style:[a.value,c.value,p.value,e.style],onClick:k&&y.navigate,tabindex:e.disabled?-1:void 0}),{default:()=>[I&&E("div",{key:"image",class:"v-card__image"},[r.image?h(Tt,{key:"image-defaults",disabled:!e.image,defaults:{VImg:{cover:!0,src:e.image}}},r.image):h(ts,{key:"image-img",cover:!0,src:e.image},null)]),h(Yh,{name:"v-card",active:!!e.loading,color:S.value},{default:r.loader}),A&&h(DW,{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}),$&&h(Gt,{key:"text"},{default:()=>[r.text?.()??e.text]}),r.default?.(),r.actions&&h(An,null,{default:r.actions}),go(k,"v-card")]}),[[Ss,k&&e.ripple]])}),{}}}),YA=Symbol.for("vuetify:goto");function XA(){return{container:void 0,duration:300,layout:!1,offset:0,easing:"easeInOutCubic",patterns:zN}}function FW(e){return wS(e)??(document.scrollingElement||document.body)}function wS(e){return typeof e=="string"?document.querySelector(e):ub(e)}function $m(e,t,n){if(typeof e=="number")return t&&n?-e:e;let r=wS(e),s=0;for(;r;)s+=t?r.offsetLeft:r.offsetTop,r=r.offsetParent;return s}function NW(e,t){return{rtl:t.isRtl,options:Xn(XA(),e)}}async function ik(e,t,n,r){const s=n?"scrollLeft":"scrollTop",i=Xn(r?.options??XA(),t),o=r?.rtl.value,a=(typeof e=="number"?e:wS(e))??0,l=i.container==="parent"&&a instanceof HTMLElement?a.parentElement:FW(i.container),u=ca()?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=$m(a,n,o);else if(c=$m(a,n,o)-$m(l,n,o),i.layout){const v=window.getComputedStyle(a).getPropertyValue("--v-layout-top");v&&(c-=parseInt(v,10))}c+=i.offset,c=BW(l,c,!!o,!!n);const d=l[s]??0;if(c===d)return Promise.resolve(c);const f=performance.now();return new Promise(p=>requestAnimationFrame(function v(m){const S=(m-f)/i.duration,b=Math.floor(d+(c-d)*u(In(S,0,1)));if(l[s]=b,S>=1&&Math.abs(b-l[s])<10)return p(c);if(S>2)return p(l[s]);requestAnimationFrame(v)}))}function $W(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=je(YA),{isRtl:n}=Ir();if(!t)throw new Error("[Vuetify] Could not find injected goto instance");const r={...t,rtl:ne(()=>t.rtl.value||n.value)};async function s(i,o){return ik(i,Xn(e,o),!1,r)}return s.horizontal=async(i,o)=>ik(i,Xn(e,o),!0,r),s}function BW(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),In(t,l,u)}function VW(e){let{selectedElement:t,containerElement:n,isRtl:r,isHorizontal:s}=e;const i=wc(s,n),o=QA(s,r,n),a=wc(s,t),l=JA(s,t),u=a*.4;return o>l?l-u:o+i<l+a?l-i+a+u:o}function UW(e){let{selectedElement:t,containerElement:n,isHorizontal:r}=e;const s=wc(r,n),i=JA(r,t),o=wc(r,t);return i-s/2+o/2}function ok(e,t){return t?.[e?"scrollWidth":"scrollHeight"]||0}function zW(e,t){return t?.[e?"clientWidth":"clientHeight"]||0}function QA(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 wc(e,t){return t?.[e?"offsetWidth":"offsetHeight"]||0}function JA(e,t){return t?.[e?"offsetLeft":"offsetTop"]||0}const ZA=Symbol.for("vuetify:v-slide-group"),eO=oe({centerActive:Boolean,scrollToActive:{type:Boolean,default:!0},contentClass:null,direction:{type:String,default:"horizontal"},symbol:{type:null,default:ZA},nextIcon:{type:$e,default:"$next"},prevIcon:{type:$e,default:"$prev"},showArrows:{type:[Boolean,String],validator:e=>typeof e=="boolean"||["always","desktop","mobile","never"].includes(e)},...Ue(),...Ca({mobile:null}),...ut(),...Bc({selectedClass:"v-slide-group-item--active"})},"VSlideGroup"),ak=_e()({name:"VSlideGroup",props:eO(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{isRtl:r}=Ir(),{displayClasses:s,mobile:i}=Es(e),o=Ul(e,e.symbol),a=ke(!1),l=ke(0),u=ke(0),c=ke(0),d=O(()=>e.direction==="horizontal"),{resizeRef:f,contentRect:p}=ao(),{resizeRef:v,contentRect:m}=ao(),y=$W(),S=O(()=>({container:f.el,duration:200,easing:"easeOutQuart"})),b=O(()=>o.selected.value.length?o.items.value.findIndex(z=>z.id===o.selected.value[0]):-1),k=O(()=>o.selected.value.length?o.items.value.findIndex(z=>z.id===o.selected.value[o.selected.value.length-1]):-1);if(kt){let z=-1;we(()=>[o.selected.value,p.value,m.value,d.value],()=>{cancelAnimationFrame(z),z=requestAnimationFrame(()=>{if(p.value&&m.value){const U=d.value?"width":"height";u.value=p.value[U],c.value=m.value[U],a.value=u.value+1<c.value}if(e.scrollToActive&&b.value>=0&&v.el){const U=v.el.children[k.value];_(U,e.centerActive)}})})}const T=ke(!1);function _(z,U){let le=0;U?le=UW({containerElement:f.el,isHorizontal:d.value,selectedElement:z}):le=VW({containerElement:f.el,isHorizontal:d.value,isRtl:r.value,selectedElement:z}),C(le)}function C(z){if(!kt||!f.el)return;const U=wc(d.value,f.el),le=QA(d.value,r.value,f.el);if(!(ok(d.value,f.el)<=U||Math.abs(z-le)<16)){if(d.value&&r.value&&f.el){const{scrollWidth:be,offsetWidth:W}=f.el;z=be-W-z}d.value?y.horizontal(z,S.value):y(z,S.value)}}function R(z){const{scrollTop:U,scrollLeft:le}=z.target;l.value=d.value?le:U}function w(z){if(T.value=!0,!(!a.value||!v.el)){for(const U of z.composedPath())for(const le of v.el.children)if(le===U){_(le);return}}}function P(z){T.value=!1}let I=!1;function A(z){!I&&!T.value&&!(z.relatedTarget&&v.el?.contains(z.relatedTarget))&&L(),I=!1}function $(){I=!0}function K(z){if(!v.el)return;function U(le){z.preventDefault(),L(le)}d.value?z.key==="ArrowRight"?U(r.value?"prev":"next"):z.key==="ArrowLeft"&&U(r.value?"next":"prev"):z.key==="ArrowDown"?U("next"):z.key==="ArrowUp"&&U("prev"),z.key==="Home"?U("first"):z.key==="End"&&U("last")}function M(z,U){if(!z)return;let le=z;do le=le?.[U==="next"?"nextElementSibling":"previousElementSibling"];while(le?.hasAttribute("disabled"));return le}function L(z){if(!v.el)return;let U;if(!z)U=Qo(v.el)[0];else if(z==="next"){if(U=M(v.el.querySelector(":focus"),z),!U)return L("first")}else if(z==="prev"){if(U=M(v.el.querySelector(":focus"),z),!U)return L("last")}else z==="first"?(U=v.el.firstElementChild,U?.hasAttribute("disabled")&&(U=M(U,"next"))):z==="last"&&(U=v.el.lastElementChild,U?.hasAttribute("disabled")&&(U=M(U,"prev")));U&&U.focus({preventScroll:!0})}function j(z){const U=d.value&&r.value?-1:1,le=(z==="prev"?-U:U)*u.value;let J=l.value+le;if(d.value&&r.value&&f.el){const{scrollWidth:be,offsetWidth:W}=f.el;J+=be-W}C(J)}const G=O(()=>({next:o.next,prev:o.prev,select:o.select,isSelected:o.isSelected})),B=O(()=>a.value||Math.abs(l.value)>0),q=O(()=>{switch(e.showArrows){case"never":return!1;case"always":return!0;case"desktop":return!i.value;case!0:return B.value;case"mobile":return i.value||B.value;default:return!i.value&&B.value}}),N=O(()=>Math.abs(l.value)>1),se=O(()=>{if(!f.value||!B.value)return!1;const z=ok(d.value,f.el),U=zW(d.value,f.el);return z-U-Math.abs(l.value)>1});return Ae(()=>h(e.tag,{class:Pe(["v-slide-group",{"v-slide-group--vertical":!d.value,"v-slide-group--has-affixes":q.value,"v-slide-group--is-overflowing":a.value},s.value,e.class]),style:De(e.style),tabindex:T.value||o.selected.value.length?-1:0,onFocus:A},{default:()=>[q.value&&E("div",{key:"prev",class:Pe(["v-slide-group__prev",{"v-slide-group__prev--disabled":!N.value}]),onMousedown:$,onClick:()=>N.value&&j("prev")},[n.prev?.(G.value)??h(Yw,null,{default:()=>[h(Z,{icon:r.value?e.nextIcon:e.prevIcon},null)]})]),E("div",{key:"container",ref:f,class:Pe(["v-slide-group__container",e.contentClass]),onScroll:R},[E("div",{ref:v,class:"v-slide-group__content",onFocusin:w,onFocusout:P,onKeydown:K},[n.default?.(G.value)])]),q.value&&E("div",{key:"next",class:Pe(["v-slide-group__next",{"v-slide-group__next--disabled":!se.value}]),onMousedown:$,onClick:()=>se.value&&j("next")},[n.next?.(G.value)??h(Yw,null,{default:()=>[h(Z,{icon:r.value?e.prevIcon:e.nextIcon},null)]})])]})),{selected:o.selected,scrollTo:j,scrollOffset:l,focus:L,hasPrev:N,hasNext:se}}}),tO=Symbol.for("vuetify:v-chip-group"),HW=oe({baseColor:String,column:Boolean,filter:Boolean,valueComparator:{type:Function,default:_r},...eO({scrollToActive:!1}),...Ue(),...Bc({selectedClass:"v-chip--selected"}),...ut(),...Pt(),...xs({variant:"tonal"})},"VChipGroup"),dh=_e()({name:"VChipGroup",props:HW(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{themeClasses:r}=Wt(e),{isSelected:s,select:i,next:o,prev:a,selected:l}=Ul(e,tO);return Tr({VChip:{baseColor:ne(()=>e.baseColor),color:ne(()=>e.color),disabled:ne(()=>e.disabled),filter:ne(()=>e.filter),variant:ne(()=>e.variant)}}),Ae(()=>{const u=ak.filterProps(e);return h(ak,de(u,{class:["v-chip-group",{"v-chip-group--column":e.column},r.value,e.class],style:e.style}),{default:()=>[n.default?.({isSelected:s,select:i,next:o,prev:a,selected:l.value})]})}),{}}}),jW=oe({activeClass:String,appendAvatar:String,appendIcon:$e,baseColor:String,closable:Boolean,closeIcon:{type:$e,default:"$delete"},closeLabel:{type:String,default:"$vuetify.close"},draggable:Boolean,filter:Boolean,filterIcon:{type:$e,default:"$complete"},label:Boolean,link:{type:Boolean,default:void 0},pill:Boolean,prependAvatar:String,prependIcon:$e,ripple:{type:[Boolean,Object],default:!0},text:{type:[String,Number,Boolean],default:void 0},modelValue:{type:Boolean,default:!0},onClick:Nn(),onClickOnce:Nn(),...os(),...Ue(),...Un(),...ls(),...Vc(),...On(),...Qh(),...zl(),...ut({tag:"span"}),...Pt(),...xs({variant:"tonal"})},"VChip"),mn=_e()({name:"VChip",directives:{vRipple:Ss},props:jW(),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}=Br(),{borderClasses:o}=_s(e),{densityClasses:a}=as(e),{elevationClasses:l}=ks(e),{roundedClasses:u}=zn(e),{sizeClasses:c}=Uc(e),{themeClasses:d}=Wt(e),f=tt(e,"modelValue"),p=gl(e,tO,!1),v=gl(e,ZA,!1),m=Xh(e,n),y=ne(()=>e.link!==!1&&m.isLink.value),S=O(()=>!e.disabled&&e.link!==!1&&(!!p||e.link||m.isClickable.value)),b=ne(()=>({"aria-label":i(e.closeLabel),disabled:e.disabled,onClick(w){w.preventDefault(),w.stopPropagation(),f.value=!1,r("click:close",w)}}));we(f,w=>{w?(p?.register(),v?.register()):(p?.unregister(),v?.unregister())});const{colorClasses:k,colorStyles:T,variantClasses:_}=xa(()=>({color:!p||p.isSelected.value?e.color??e.baseColor:e.baseColor,variant:e.variant}));function C(w){r("click",w),S.value&&(m.navigate?.(w),p?.toggle())}function R(w){(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),C(w))}return()=>{const w=m.isLink.value?"a":e.tag,P=!!(e.appendIcon||e.appendAvatar),I=!!(P||s.append),A=!!(s.close||e.closable),$=!!(s.filter||e.filter)&&p,K=!!(e.prependIcon||e.prependAvatar),M=!!(K||s.prepend);return f.value&&Ot(h(w,de(m.linkProps,{class:["v-chip",{"v-chip--disabled":e.disabled,"v-chip--label":e.label,"v-chip--link":S.value,"v-chip--filter":$,"v-chip--pill":e.pill,[`${e.activeClass}`]:e.activeClass&&m.isActive?.value},d.value,o.value,k.value,a.value,l.value,u.value,c.value,_.value,p?.selectedClass.value,e.class],style:[T.value,e.style],disabled:e.disabled||void 0,draggable:e.draggable,tabindex:S.value?0:void 0,onClick:C,onKeydown:S.value&&!y.value&&R}),{default:()=>[go(S.value,"v-chip"),$&&h(PR,{key:"filter"},{default:()=>[Ot(E("div",{class:"v-chip__filter"},[s.filter?h(Tt,{key:"filter-defaults",disabled:!e.filterIcon,defaults:{VIcon:{icon:e.filterIcon}}},s.filter):h(Z,{key:"filter-icon",icon:e.filterIcon},null)]),[[Di,p.isSelected.value]])]}),M&&E("div",{key:"prepend",class:"v-chip__prepend"},[s.prepend?h(Tt,{key:"prepend-defaults",disabled:!K,defaults:{VAvatar:{image:e.prependAvatar,start:!0},VIcon:{icon:e.prependIcon,start:!0}}},s.prepend):E(Ie,null,[e.prependIcon&&h(Z,{key:"prepend-icon",icon:e.prependIcon,start:!0},null),e.prependAvatar&&h(st,{key:"prepend-avatar",image:e.prependAvatar,start:!0},null)])]),E("div",{class:"v-chip__content","data-no-activator":""},[s.default?.({isSelected:p?.isSelected.value,selectedClass:p?.selectedClass.value,select:p?.select,toggle:p?.toggle,value:p?.value.value,disabled:e.disabled})??re(e.text)]),I&&E("div",{key:"append",class:"v-chip__append"},[s.append?h(Tt,{key:"append-defaults",disabled:!P,defaults:{VAvatar:{end:!0,image:e.appendAvatar},VIcon:{end:!0,icon:e.appendIcon}}},s.append):E(Ie,null,[e.appendIcon&&h(Z,{key:"append-icon",end:!0,icon:e.appendIcon},null),e.appendAvatar&&h(st,{key:"append-avatar",end:!0,image:e.appendAvatar},null)])]),A&&E("button",de({key:"close",class:"v-chip__close",type:"button","data-testid":"close-chip"},b.value),[s.close?h(Tt,{key:"close-defaults",defaults:{VIcon:{icon:e.closeIcon,size:"x-small"}}},s.close):h(Z,{key:"close-icon",icon:e.closeIcon,size:"x-small"},null)])]}),[[Ss,S.value&&e.ripple,null]])}}}),qW=oe({fluid:{type:Boolean,default:!1},...Ue(),...cr(),...ut()},"VContainer"),Bn=_e()({name:"VContainer",props:qW(),setup(e,t){let{slots:n}=t;const{rtlClasses:r}=Ir(),{dimensionStyles:s}=dr(e);return Ae(()=>h(e.tag,{class:Pe(["v-container",{"v-container--fluid":e.fluid},r.value,e.class]),style:De([s.value,e.style])},n)),{}}}),nO=Jh.reduce((e,t)=>(e[t]={type:[Boolean,String,Number],default:!1},e),{}),rO=Jh.reduce((e,t)=>{const n="offset"+Xs(t);return e[n]={type:[String,Number],default:null},e},{}),sO=Jh.reduce((e,t)=>{const n="order"+Xs(t);return e[n]={type:[String,Number],default:null},e},{}),lk={col:Object.keys(nO),offset:Object.keys(rO),order:Object.keys(sO)};function WW(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 GW=["auto","start","end","center","baseline","stretch"],KW=oe({cols:{type:[Boolean,String,Number],default:!1},...nO,offset:{type:[String,Number],default:null},...rO,order:{type:[String,Number],default:null},...sO,alignSelf:{type:String,default:null,validator:e=>GW.includes(e)},...Ue(),...ut()},"VCol"),Ve=_e()({name:"VCol",props:KW(),setup(e,t){let{slots:n}=t;const r=O(()=>{const s=[];let i;for(i in lk)lk[i].forEach(a=>{const l=e[a],u=WW(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()=>lr(e.tag,{class:[r.value,e.class],style:e.style},n.default?.())}}),_S=["start","end","center"],iO=["space-between","space-around","space-evenly"];function kS(e,t){return Jh.reduce((n,r)=>{const s=e+Xs(r);return n[s]=t(),n},{})}const YW=[..._S,"baseline","stretch"],oO=e=>YW.includes(e),aO=kS("align",()=>({type:String,default:null,validator:oO})),XW=[..._S,...iO],lO=e=>XW.includes(e),uO=kS("justify",()=>({type:String,default:null,validator:lO})),QW=[..._S,...iO,"stretch"],cO=e=>QW.includes(e),dO=kS("alignContent",()=>({type:String,default:null,validator:cO})),uk={align:Object.keys(aO),justify:Object.keys(uO),alignContent:Object.keys(dO)},JW={align:"align",justify:"justify",alignContent:"align-content"};function ZW(e,t,n){let r=JW[e];if(n!=null){if(t){const s=t.replace(e,"");r+=`-${s}`}return r+=`-${n}`,r.toLowerCase()}}const eG=oe({dense:Boolean,noGutters:Boolean,align:{type:String,default:null,validator:oO},...aO,justify:{type:String,default:null,validator:lO},...uO,alignContent:{type:String,default:null,validator:cO},...dO,...Ue(),...ut()},"VRow"),Je=_e()({name:"VRow",props:eG(),setup(e,t){let{slots:n}=t;const r=O(()=>{const s=[];let i;for(i in uk)uk[i].forEach(o=>{const a=e[o],l=ZW(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()=>lr(e.tag,{class:["v-row",r.value,e.class],style:e.style},n.default?.())}}),yn=Vl("v-spacer","div","VSpacer"),tG=Me({__name:"PrinterControlDialog",setup(e){const t=Kt(Yt.PrinterControlDialog),n=Vt(),r=Jn(),s=O(()=>t.context()?.printerId),i=O(()=>{if(s.value)return n.printer(s.value)}),o=H(10),a=O(()=>{const d=r.printerEventsById[s.value];return d?.current?.payload?.temps?.length&&d?.current?.payload?.temps[0]?.tool0?.actual?d?.current?.payload?.temps[0]?.tool0:null}),l=async(d,f,p)=>{await qt.sendPrinterJogCommand(s.value,{x:d*o.value,y:f*o.value,z:p*o.value})},u=async d=>{await qt.sendPrinterHomeCommand(s.value,d)},c=()=>{t.closeDialog()};return(d,f)=>{const p=Js;return F(),ee(p,{id:Q(t).dialogId,"max-width":"700px",onEscape:f[14]||(f[14]=v=>c())},{default:g(()=>[h(mt,null,{default:g(()=>[h(Zt,null,{default:g(()=>[...f[15]||(f[15]=[x(" Printer Controls ",-1)])]),_:1}),h(Gt,null,{default:g(()=>[i.value?(F(),ee(Bn,{key:0},{default:g(()=>[h(Je,null,{default:g(()=>[h(Ve,{cols:12},{default:g(()=>[x(" Printer: "+re(i.value?.name)+" ",1),f[16]||(f[16]=E("br",null,null,-1)),h(mn,{color:"primary"},{default:g(()=>[x(re(a.value?.actual)+"C / "+re(a.value?.target)+"C ",1)]),_:1})]),_:1})]),_:1}),h(Je,null,{default:g(()=>[h(Ve,{cols:8},{default:g(()=>[f[26]||(f[26]=x(" X/Y ",-1)),f[27]||(f[27]=E("br",null,null,-1)),h(te,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[0]||(f[0]=v=>l(-1,1,0))},{default:g(()=>[h(Z,null,{default:g(()=>[...f[17]||(f[17]=[x("north_west",-1)])]),_:1})]),_:1}),h(te,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[1]||(f[1]=v=>l(0,1,0))},{default:g(()=>[h(Z,null,{default:g(()=>[...f[18]||(f[18]=[x("north",-1)])]),_:1})]),_:1}),h(te,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[2]||(f[2]=v=>l(1,1,0))},{default:g(()=>[h(Z,null,{default:g(()=>[...f[19]||(f[19]=[x("north_east",-1)])]),_:1})]),_:1}),f[28]||(f[28]=E("br",null,null,-1)),h(te,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[3]||(f[3]=v=>l(-1,0,0))},{default:g(()=>[h(Z,null,{default:g(()=>[...f[20]||(f[20]=[x("west",-1)])]),_:1})]),_:1}),h(te,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[4]||(f[4]=v=>u(["x","y"]))},{default:g(()=>[h(Z,null,{default:g(()=>[...f[21]||(f[21]=[x("home",-1)])]),_:1})]),_:1}),h(te,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[5]||(f[5]=v=>l(1,0,0))},{default:g(()=>[h(Z,null,{default:g(()=>[...f[22]||(f[22]=[x("east",-1)])]),_:1})]),_:1}),f[29]||(f[29]=E("br",null,null,-1)),h(te,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[6]||(f[6]=v=>l(-1,-1,0))},{default:g(()=>[h(Z,null,{default:g(()=>[...f[23]||(f[23]=[x("south_west",-1)])]),_:1})]),_:1}),h(te,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[7]||(f[7]=v=>l(0,-1,0))},{default:g(()=>[h(Z,null,{default:g(()=>[...f[24]||(f[24]=[x("south",-1)])]),_:1})]),_:1}),h(te,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[8]||(f[8]=v=>l(1,-1,0))},{default:g(()=>[h(Z,null,{default:g(()=>[...f[25]||(f[25]=[x("south_east",-1)])]),_:1})]),_:1})]),_:1}),h(Ve,{cols:"4"},{default:g(()=>[f[33]||(f[33]=x(" Z ",-1)),f[34]||(f[34]=E("br",null,null,-1)),h(te,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[9]||(f[9]=v=>l(0,0,1))},{default:g(()=>[h(Z,null,{default:g(()=>[...f[30]||(f[30]=[x("north",-1)])]),_:1})]),_:1}),f[35]||(f[35]=E("br",null,null,-1)),h(te,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[10]||(f[10]=v=>u(["z"]))},{default:g(()=>[h(Z,null,{default:g(()=>[...f[31]||(f[31]=[x("home",-1)])]),_:1})]),_:1}),f[36]||(f[36]=E("br",null,null,-1)),h(te,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[11]||(f[11]=v=>l(1,0,1))},{default:g(()=>[h(Z,null,{default:g(()=>[...f[32]||(f[32]=[x("south",-1)])]),_:1})]),_:1})]),_:1})]),_:1}),h(Je,null,{default:g(()=>[h(Ve,{cols:"12"},{default:g(()=>[h(uR,{modelValue:o.value,"onUpdate:modelValue":f[12]||(f[12]=v=>o.value=v)},{default:g(()=>[h(te,{value:.1},{default:g(()=>[...f[37]||(f[37]=[x(" 0.1 ",-1)])]),_:1}),h(te,{value:1},{default:g(()=>[...f[38]||(f[38]=[x(" 1 ",-1)])]),_:1}),h(te,{value:10},{default:g(()=>[...f[39]||(f[39]=[x(" 10 ",-1)])]),_:1}),h(te,{value:100},{default:g(()=>[...f[40]||(f[40]=[x(" 100 ",-1)])]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1})):fe("",!0)]),_:1}),h(An,null,{default:g(()=>[h(yn),h(te,{variant:"text",onClick:f[13]||(f[13]=v=>c())},{default:g(()=>[...f[41]||(f[41]=[x(" Close ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}});class el extends fr{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=ae.batchGetLastPrintedFilesRoute;return await this.post(n,{printerIds:t})}static async batchReprintFiles(t){const n=ae.batchReprintFilesRoute;return await this.post(n,{prints:t})}}var Fo=(e=>(e[e.PrinterNotAvailable=0]="PrinterNotAvailable",e[e.NoLastPrint=1]="NoLastPrint",e[e.LastPrintReady=2]="LastPrintReady",e))(Fo||{});function nG(e){return e.message?`${e.message}
48
+ ${e.stack}`:`'${e}'`}const rG=Vl("v-alert-title"),sG=oe({iconSize:[Number,String],iconSizes:{type:Array,default:()=>[["x-small",10],["small",16],["default",24],["large",28],["x-large",32]]}},"iconSize");function iG(e,t){return{iconSize:O(()=>{const r=new Map(e.iconSizes),s=e.iconSize??t()??"default";return r.has(s)?r.get(s):s})}}const oG=["success","info","warning","error"],aG=oe({border:{type:[Boolean,String],validator:e=>typeof e=="boolean"||["top","end","bottom","start"].includes(e)},borderColor:String,closable:Boolean,closeIcon:{type:$e,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=>oG.includes(e)},...Ue(),...Un(),...cr(),...ls(),...sG(),...vo(),...Hl(),...On(),...ut(),...Pt(),...xs({variant:"flat"})},"VAlert"),ln=_e()({name:"VAlert",props:aG(),emits:{"click:close":e=>!0,"update:modelValue":e=>!0},setup(e,t){let{emit:n,slots:r}=t;const s=tt(e,"modelValue"),i=ne(()=>{if(e.icon!==!1)return e.type?e.icon??`$${e.type}`:e.icon}),{iconSize:o}=iG(e,()=>e.prominent?44:void 0),{themeClasses:a}=Wt(e),{colorClasses:l,colorStyles:u,variantClasses:c}=xa(()=>({color:e.color??e.type,variant:e.variant})),{densityClasses:d}=as(e),{dimensionStyles:f}=dr(e),{elevationClasses:p}=ks(e),{locationStyles:v}=Ea(e),{positionClasses:m}=jl(e),{roundedClasses:y}=zn(e),{textColorClasses:S,textColorStyles:b}=bs(()=>e.borderColor),{t:k}=Br(),T=ne(()=>({"aria-label":k(e.closeLabel),onClick(_){s.value=!1,n("click:close",_)}}));return()=>{const _=!!(r.prepend||i.value),C=!!(r.title||e.title),R=!!(r.close||e.closable),w={density:e.density,icon:i.value,size:e.iconSize||e.prominent?o.value:void 0};return s.value&&h(e.tag,{class:Pe(["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,p.value,m.value,y.value,c.value,e.class]),style:De([u.value,f.value,v.value,e.style]),role:"alert"},{default:()=>[go(!1,"v-alert"),e.border&&E("div",{key:"border",class:Pe(["v-alert__border",S.value]),style:De(b.value)},null),_&&E("div",{key:"prepend",class:"v-alert__prepend"},[r.prepend?h(Tt,{key:"prepend-defaults",disabled:!i.value,defaults:{VIcon:{...w}}},r.prepend):h(Z,de({key:"prepend-icon"},w),null)]),E("div",{class:"v-alert__content"},[C&&h(rG,{key:"title"},{default:()=>[r.title?.()??e.title]}),r.text?.()??e.text,r.default?.()]),r.append&&E("div",{key:"append",class:"v-alert__append"},[r.append()]),R&&E("div",{key:"close",class:"v-alert__close"},[r.close?h(Tt,{key:"close-defaults",defaults:{VBtn:{icon:e.closeIcon,size:"x-small",variant:"text"}}},{default:()=>[r.close?.({props:T.value})]}):h(te,de({key:"close-btn",icon:e.closeIcon,size:"x-small",variant:"text"},T.value),null)])]})}}}),ly=Symbol.for("vuetify:list");function fO(){let{filterable:e}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{filterable:!1};const t=je(ly,{filterable:!1,hasPrepend:ke(!1),updateHasPrepend:()=>null}),n={filterable:t.filterable||e,hasPrepend:ke(!1),updateHasPrepend:r=>{r&&(n.hasPrepend.value=r)}};return zt(ly,n),t}function hO(){return je(ly,null)}const xS=e=>{const t={activate:n=>{let{id:r,value:s,activated:i}=n;return r=Fe(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 En(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},pO=e=>{const t=xS(e);return{activate:r=>{let{activated:s,id:i,...o}=r;i=Fe(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=En(r);a.length&&(o=t.in(a.slice(0,1),s,i))}return o},out:(r,s,i)=>t.out(r,s,i)}},lG=e=>{const t=xS(e);return{activate:r=>{let{id:s,activated:i,children:o,...a}=r;return s=Fe(s),o.has(s)?i:t.activate({id:s,activated:i,children:o,...a})},in:t.in,out:t.out}},uG=e=>{const t=pO(e);return{activate:r=>{let{id:s,activated:i,children:o,...a}=r;return s=Fe(s),o.has(s)?i:t.activate({id:s,activated:i,children:o,...a})},in:t.in,out:t.out}},cG={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},mO={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},dG={open:mO.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)}},ES=e=>{const t={select:n=>{let{id:r,value:s,selected:i}=n;if(r=Fe(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},gO=e=>{const t=ES(e);return{select:r=>{let{selected:s,id:i,...o}=r;i=Fe(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?.length?t.in(r.slice(0,1),s,i,o):new Map,out:(r,s,i)=>t.out(r,s,i)}},fG=e=>{const t=ES(e);return{select:r=>{let{id:s,selected:i,children:o,...a}=r;return s=Fe(s),o.has(s)?i:t.select({id:s,selected:i,children:o,...a})},in:t.in,out:t.out}},hG=e=>{const t=gO(e);return{select:r=>{let{id:s,selected:i,children:o,...a}=r;return s=Fe(s),o.has(s)?i:t.select({id:s,selected:i,children:o,...a})},in:t.in,out:t.out}},vO=e=>{const t={select:n=>{let{id:r,value:s,selected:i,children:o,parents:a,disabled:l}=n;r=Fe(r);const u=new Map(i),c=[r];for(;c.length;){const f=c.shift();l.has(f)||i.set(Fe(f),s?"on":"off"),o.has(f)&&c.push(...o.get(f))}let d=Fe(a.get(r));for(;d;){let f=!0,p=!0;for(const v of o.get(d)){const m=Fe(v);if(!l.has(m)&&(i.get(m)!=="on"&&(f=!1),i.has(m)&&i.get(m)!=="off"&&(p=!1),!f&&!p))break}i.set(d,f?"on":p?"off":"indeterminate"),d=Fe(a.get(d))}return e&&!s&&Array.from(i.entries()).reduce((p,v)=>{let[m,y]=v;return y==="on"&&p.push(m),p},[]).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},pG=e=>{const t=vO(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}}},Pl=Symbol.for("vuetify:nested"),yO={id:ke(),root:{itemsRegistration:H("render"),register:()=>null,unregister:()=>null,children:H(new Map),parents:H(new Map),disabled:H(new Set),open:()=>null,openOnSelect:()=>null,activate:()=>null,select:()=>null,activatable:H(!1),selectable:H(!1),opened:H(new Set),activated:H(new Set),selected:H(new Map),selectedValues:H([]),getPath:()=>[]}},mG=oe({activatable:Boolean,selectable:Boolean,activeStrategy:[String,Function,Object],selectStrategy:[String,Function,Object],openStrategy:[String,Object],opened:null,activated:null,selected:null,mandatory:Boolean,itemsRegistration:{type:String,default:"render"}},"nested"),gG=(e,t,n)=>{let r=!1;const s=ke(new Map),i=ke(new Map),o=ke(new Set),a=tt(e,"opened",e.opened,k=>new Set(Array.isArray(k)?k.map(T=>Fe(T)):k),k=>[...k.values()]),l=O(()=>{if(typeof e.activeStrategy=="object")return e.activeStrategy;if(typeof e.activeStrategy=="function")return e.activeStrategy(e.mandatory);switch(e.activeStrategy){case"leaf":return lG(e.mandatory);case"single-leaf":return uG(e.mandatory);case"independent":return xS(e.mandatory);default:return pO(e.mandatory)}}),u=O(()=>{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 hG(e.mandatory);case"leaf":return fG(e.mandatory);case"independent":return ES(e.mandatory);case"single-independent":return gO(e.mandatory);case"trunk":return pG(e.mandatory);default:return vO(e.mandatory)}}),c=O(()=>{if(typeof e.openStrategy=="object")return e.openStrategy;switch(e.openStrategy){case"list":return dG;case"single":return cG;default:return mO}}),d=tt(e,"activated",e.activated,k=>l.value.in(k,s.value,i.value),k=>l.value.out(k,s.value,i.value)),f=tt(e,"selected",e.selected,k=>u.value.in(k,s.value,i.value,o.value),k=>u.value.out(k,s.value,i.value));Vn(()=>{r=!0});function p(k){const T=[];let _=Fe(k);for(;_!==void 0;)T.unshift(_),_=i.value.get(_);return T}const v=nn("nested"),m=new Set,y=qN(()=>{ot(()=>{s.value=new Map(s.value),i.value=new Map(i.value)})},100);we(()=>[t.value,Ut(n)],()=>{e.itemsRegistration==="props"&&S()},{immediate:!0});function S(){const k=new Map,T=new Map,_=new Set,C=Ut(n)?P=>Fe(P.raw):P=>P.value,R=[...t.value];let w=0;for(;w<R.length;){const P=R[w++],I=C(P);if(P.children){const A=[];for(const $ of P.children){const K=C($);k.set(K,I),A.push(K),R.push($)}T.set(I,A)}P.props.disabled&&_.add(I)}s.value=T,i.value=k,o.value=_}const b={id:ke(),root:{opened:a,activatable:ne(()=>e.activatable),selectable:ne(()=>e.selectable),activated:d,selected:f,selectedValues:O(()=>{const k=[];for(const[T,_]of f.value.entries())_==="on"&&k.push(T);return k}),itemsRegistration:ne(()=>e.itemsRegistration),register:(k,T,_,C)=>{if(m.has(k)){p(k).map(String).join(" -> "),p(T).concat(k).map(String).join(" -> ");return}else m.add(k);T&&k!==T&&i.value.set(k,T),_&&o.value.add(k),C&&s.value.set(k,[]),T!=null&&s.value.set(T,[...s.value.get(T)||[],k]),y()},unregister:k=>{if(r)return;m.delete(k),s.value.delete(k),o.value.delete(k);const T=i.value.get(k);if(T){const _=s.value.get(T)??[];s.value.set(T,_.filter(C=>C!==k))}i.value.delete(k),y()},open:(k,T,_)=>{v.emit("click:open",{id:k,value:T,path:p(k),event:_});const C=c.value.open({id:k,value:T,opened:new Set(a.value),children:s.value,parents:i.value,event:_});C&&(a.value=C)},openOnSelect:(k,T,_)=>{const C=c.value.select({id:k,value:T,selected:new Map(f.value),opened:new Set(a.value),children:s.value,parents:i.value,event:_});C&&(a.value=C)},select:(k,T,_)=>{v.emit("click:select",{id:k,value:T,path:p(k),event:_});const C=u.value.select({id:k,value:T,selected:new Map(f.value),children:s.value,parents:i.value,disabled:o.value,event:_});C&&(f.value=C),b.root.openOnSelect(k,T,_)},activate:(k,T,_)=>{if(!e.activatable)return b.root.select(k,!0,_);v.emit("click:activate",{id:k,value:T,path:p(k),event:_});const C=l.value.activate({id:k,value:T,activated:new Set(d.value),children:s.value,parents:i.value,event:_});if(C.size!==d.value.size)d.value=C;else{for(const R of C)if(!d.value.has(R)){d.value=C;return}for(const R of d.value)if(!C.has(R)){d.value=C;return}}},children:s,parents:i,disabled:o,getPath:p}};return zt(Pl,b),b.root},bO=(e,t,n)=>{const r=je(Pl,yO),s=Symbol("nested item"),i=O(()=>{const a=Fe(Ut(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:O(()=>r.root.opened.value.has(i.value)),parent:O(()=>r.root.parents.value.get(i.value)),activate:(a,l)=>r.root.activate(i.value,a,l),isActivated:O(()=>r.root.activated.value.has(i.value)),select:(a,l)=>r.root.select(i.value,a,l),isSelected:O(()=>r.root.selected.value.get(i.value)==="on"),isIndeterminate:O(()=>r.root.selected.value.get(i.value)==="indeterminate"),isLeaf:O(()=>!r.root.children.value.get(i.value)),isGroupActivator:r.isGroupActivator};return Nl(()=>{r.isGroupActivator||r.root.itemsRegistration.value==="props"||ot(()=>{r.root.register(i.value,r.id.value,Ut(t),n)})}),Vn(()=>{r.isGroupActivator||r.root.itemsRegistration.value==="props"||r.root.unregister(i.value)}),we(i,(a,l)=>{r.isGroupActivator||r.root.itemsRegistration.value==="props"||(r.root.unregister(l),ot(()=>{r.root.register(a,r.id.value,Ut(t),n)}))}),n&&zt(Pl,o),o},vG=()=>{const e=je(Pl,yO);zt(Pl,{...e,isGroupActivator:!0})};function od(){const e=ke(!1);return gt(()=>{window.requestAnimationFrame(()=>{e.value=!0})}),{ssrBootStyles:ne(()=>e.value?void 0:{transition:"none !important"}),isBooted:_i(e)}}const yG=Bl({name:"VListGroupActivator",setup(e,t){let{slots:n}=t;return vG(),()=>n.default?.()}}),bG=oe({activeColor:String,baseColor:String,color:String,collapseIcon:{type:$e,default:"$collapse"},disabled:Boolean,expandIcon:{type:$e,default:"$expand"},rawId:[String,Number],prependIcon:$e,appendIcon:$e,fluid:Boolean,subgroup:Boolean,title:String,value:null,...Ue(),...ut()},"VListGroup"),uy=_e()({name:"VListGroup",props:bG(),setup(e,t){let{slots:n}=t;const{isOpen:r,open:s,id:i}=bO(()=>e.value,()=>e.disabled,!0),o=O(()=>`v-list-group--id-${String(e.rawId??i.value)}`),a=hO(),{isBooted:l}=od(),u=je(Pl),c=ne(()=>u?.root?.itemsRegistration.value==="render");function d(m){["INPUT","TEXTAREA"].includes(m.target?.tagName)||s(!r.value,m)}const f=O(()=>({onClick:d,class:"v-list-group__header",id:o.value})),p=O(()=>r.value?e.collapseIcon:e.expandIcon),v=O(()=>({VListItem:{activeColor:e.activeColor,baseColor:e.baseColor,color:e.color,prependIcon:e.prependIcon||e.subgroup&&p.value,appendIcon:e.appendIcon||!e.subgroup&&p.value,title:e.title,value:e.value}}));return Ae(()=>h(e.tag,{class:Pe(["v-list-group",{"v-list-group--prepend":a?.hasPrepend.value,"v-list-group--fluid":e.fluid,"v-list-group--subgroup":e.subgroup,"v-list-group--open":r.value},e.class]),style:De(e.style)},{default:()=>[n.activator&&h(Tt,{defaults:v.value},{default:()=>[h(yG,null,{default:()=>[n.activator({props:f.value,isOpen:r.value})]})]}),h(js,{transition:{component:RR},disabled:!l.value},{default:()=>[c.value?Ot(E("div",{class:"v-list-group__items",role:"group","aria-labelledby":o.value},[n.default?.()]),[[Di,r.value]]):r.value&&E("div",{class:"v-list-group__items",role:"group","aria-labelledby":o.value},[n.default?.()])]})]})),{isOpen:r}}}),SG=oe({opacity:[Number,String],...Ue(),...ut()},"VListItemSubtitle"),pt=_e()({name:"VListItemSubtitle",props:SG(),setup(e,t){let{slots:n}=t;return Ae(()=>h(e.tag,{class:Pe(["v-list-item-subtitle",e.class]),style:De([{"--v-list-item-subtitle-opacity":e.opacity},e.style])},n)),{}}}),it=Vl("v-list-item-title"),wG=oe({active:{type:Boolean,default:void 0},activeClass:String,activeColor:String,appendAvatar:String,appendIcon:$e,baseColor:String,disabled:Boolean,lines:[Boolean,String],link:{type:Boolean,default:void 0},nav:Boolean,prependAvatar:String,prependIcon:$e,ripple:{type:[Boolean,Object],default:!0},slim:Boolean,prependGap:[Number,String],subtitle:{type:[String,Number,Boolean],default:void 0},title:{type:[String,Number,Boolean],default:void 0},value:null,onClick:Nn(),onClickOnce:Nn(),...os(),...Ue(),...Un(),...cr(),...ls(),...On(),...Qh(),...ut(),...Pt(),...xs({variant:"text"})},"VListItem"),Ne=_e()({name:"VListItem",directives:{vRipple:Ss},props:wG(),emits:{click:e=>!0},setup(e,t){let{attrs:n,slots:r,emit:s}=t;const i=Xh(e,n),o=O(()=>e.value===void 0?i.href.value:e.value),{activate:a,isActivated:l,select:u,isOpen:c,isSelected:d,isIndeterminate:f,isGroupActivator:p,root:v,parent:m,openOnSelect:y,id:S}=bO(o,()=>e.disabled,!1),b=hO(),k=O(()=>e.active!==!1&&(e.active||i.isActive?.value||(v.activatable.value?l.value:d.value))),T=ne(()=>e.link!==!1&&i.isLink.value),_=O(()=>!!b&&(v.selectable.value||v.activatable.value||e.value!=null)),C=O(()=>!e.disabled&&e.link!==!1&&(e.link||i.isClickable.value||_.value)),R=O(()=>b?T.value?"link":_.value?"option":"listitem":void 0),w=O(()=>{if(_.value)return v.activatable.value?l.value:v.selectable.value?d.value:k.value}),P=ne(()=>e.rounded||e.nav),I=ne(()=>e.color??e.activeColor),A=ne(()=>({color:k.value?I.value??e.baseColor:e.baseColor,variant:e.variant}));we(()=>i.isActive?.value,W=>{W&&$()}),Nl(()=>{i.isActive?.value&&ot(()=>$())});function $(){m.value!=null&&v.open(m.value,!0),y(!0)}const{themeClasses:K}=Wt(e),{borderClasses:M}=_s(e),{colorClasses:L,colorStyles:j,variantClasses:G}=xa(A),{densityClasses:B}=as(e),{dimensionStyles:q}=dr(e),{elevationClasses:N}=ks(e),{roundedClasses:se}=zn(P),z=ne(()=>e.lines?`v-list-item--${e.lines}-line`:void 0),U=ne(()=>e.ripple!==void 0&&e.ripple&&b?.filterable?{keys:["Enter"]}:e.ripple),le=O(()=>({isActive:k.value,select:u,isOpen:c.value,isSelected:d.value,isIndeterminate:f.value}));function J(W){s("click",W),!["INPUT","TEXTAREA"].includes(W.target?.tagName)&&C.value&&(i.navigate?.(W),!p&&(v.activatable.value?a(!l.value,W):(v.selectable.value||e.value!=null&&!T.value)&&u(!d.value,W)))}function be(W){const pe=W.target;["INPUT","TEXTAREA"].includes(pe.tagName)||(W.key==="Enter"||W.key===" "&&!b?.filterable)&&(W.preventDefault(),W.stopPropagation(),W.target.dispatchEvent(new MouseEvent("click",W)))}return Ae(()=>{const W=T.value?"a":e.tag,pe=r.title||e.title!=null,ue=r.subtitle||e.subtitle!=null,Y=!!(e.appendAvatar||e.appendIcon),Le=!!(Y||r.append),D=!!(e.prependAvatar||e.prependIcon),V=!!(D||r.prepend);return b?.updateHasPrepend(V),e.activeColor&&UT("active-color",["color","base-color"]),Ot(h(W,de(i.linkProps,{class:["v-list-item",{"v-list-item--active":k.value,"v-list-item--disabled":e.disabled,"v-list-item--link":C.value,"v-list-item--nav":e.nav,"v-list-item--slim":e.slim,[`${e.activeClass}`]:e.activeClass&&k.value},K.value,M.value,L.value,B.value,N.value,z.value,se.value,G.value,e.class],style:[{"--v-list-prepend-gap":Oe(e.prependGap)},j.value,q.value,e.style],tabindex:C.value?b?-2:0:void 0,"aria-selected":w.value,role:R.value,onClick:J,onKeydown:C.value&&!T.value&&be}),{default:()=>[go(C.value||k.value,"v-list-item"),V&&E("div",{key:"prepend",class:"v-list-item__prepend"},[r.prepend?h(Tt,{key:"prepend-defaults",disabled:!D,defaults:{VAvatar:{density:e.density,image:e.prependAvatar},VIcon:{density:e.density,icon:e.prependIcon},VListItemAction:{start:!0}}},{default:()=>[r.prepend?.(le.value)]}):E(Ie,null,[e.prependAvatar&&h(st,{key:"prepend-avatar",density:e.density,image:e.prependAvatar},null),e.prependIcon&&h(Z,{key:"prepend-icon",density:e.density,icon:e.prependIcon},null)]),E("div",{class:"v-list-item__spacer"},null)]),E("div",{class:"v-list-item__content","data-no-activator":""},[pe&&h(it,{key:"title"},{default:()=>[r.title?.({title:e.title})??re(e.title)]}),ue&&h(pt,{key:"subtitle"},{default:()=>[r.subtitle?.({subtitle:e.subtitle})??re(e.subtitle)]}),r.default?.(le.value)]),Le&&E("div",{key:"append",class:"v-list-item__append"},[r.append?h(Tt,{key:"append-defaults",disabled:!Y,defaults:{VAvatar:{density:e.density,image:e.appendAvatar},VIcon:{density:e.density,icon:e.appendIcon},VListItemAction:{end:!0}}},{default:()=>[r.append?.(le.value)]}):E(Ie,null,[e.appendIcon&&h(Z,{key:"append-icon",density:e.density,icon:e.appendIcon},null),e.appendAvatar&&h(st,{key:"append-avatar",density:e.density,image:e.appendAvatar},null)]),E("div",{class:"v-list-item__spacer"},null)])]}),[[Ss,C.value&&U.value]])}),{activate:a,isActivated:l,isGroupActivator:p,isSelected:d,list:b,select:u,root:v,id:S,link:i}}}),_G=oe({color:String,inset:Boolean,sticky:Boolean,title:String,...Ue(),...ut()},"VListSubheader"),Cr=_e()({name:"VListSubheader",props:_G(),setup(e,t){let{slots:n}=t;const{textColorClasses:r,textColorStyles:s}=bs(()=>e.color);return Ae(()=>{const i=!!(n.default||e.title);return h(e.tag,{class:Pe(["v-list-subheader",{"v-list-subheader--inset":e.inset,"v-list-subheader--sticky":e.sticky},r.value,e.class]),style:De([{textColorStyles:s},e.style])},{default:()=>[i&&E("div",{class:"v-list-subheader__text"},[n.default?.()??e.title])]})}),{}}}),kG=["dotted","dashed","solid","double"],xG=oe({color:String,contentOffset:[Number,String,Array],gradient:Boolean,inset:Boolean,length:[Number,String],opacity:[Number,String],thickness:[Number,String],vertical:Boolean,variant:{type:String,default:"solid",validator:e=>kG.includes(e)},...Ue(),...Pt()},"VDivider"),en=_e()({name:"VDivider",props:xG(),setup(e,t){let{attrs:n,slots:r}=t;const{themeClasses:s}=Wt(e),{textColorClasses:i,textColorStyles:o}=bs(()=>e.color),a=O(()=>{const u={};return e.length&&(u[e.vertical?"height":"width"]=Oe(e.length)),e.thickness&&(u[e.vertical?"borderRightWidth":"borderTopWidth"]=Oe(e.thickness)),u}),l=ne(()=>{const u=Array.isArray(e.contentOffset)?e.contentOffset[0]:e.contentOffset,c=Array.isArray(e.contentOffset)?e.contentOffset[1]:0;return{marginBlock:e.vertical&&u?Oe(u):void 0,marginInline:!e.vertical&&u?Oe(u):void 0,transform:c?`translate${e.vertical?"X":"Y"}(${Oe(c)})`:void 0}});return Ae(()=>{const u=E("hr",{class:Pe([{"v-divider":!0,"v-divider--gradient":e.gradient&&!r.default,"v-divider--inset":e.inset,"v-divider--vertical":e.vertical},s.value,i.value,e.class]),style:De([a.value,o.value,{"--v-border-opacity":e.opacity},{"border-style":e.variant},e.style]),"aria-orientation":!n.role||n.role==="separator"?e.vertical?"vertical":"horizontal":void 0,role:`${n.role||"separator"}`},null);return r.default?E("div",{class:Pe(["v-divider__wrapper",{"v-divider__wrapper--gradient":e.gradient,"v-divider__wrapper--inset":e.inset,"v-divider__wrapper--vertical":e.vertical}])},[u,E("div",{class:"v-divider__content",style:De(l.value)},[r.default()]),u]):u}),{}}}),EG=oe({items:Array,returnObject:Boolean},"VListChildren"),SO=_e()({name:"VListChildren",props:EG(),setup(e,t){let{slots:n}=t;return fO(),()=>n.default?.()??e.items?.map(r=>{let{children:s,props:i,type:o,raw:a}=r;if(o==="divider")return n.divider?.({props:i})??h(en,i,null);if(o==="subheader")return n.subheader?.({props:i})??h(Cr,i,null);const l={subtitle:n.subtitle?c=>n.subtitle?.({...c,item:a}):void 0,prepend:n.prepend?c=>n.prepend?.({...c,item:a}):void 0,append:n.append?c=>n.append?.({...c,item:a}):void 0,title:n.title?c=>n.title?.({...c,item:a}):void 0},u=uy.filterProps(i);return s?h(uy,de(u,{value:e.returnObject?a:i?.value,rawId:i?.value}),{activator:c=>{let{props:d}=c;const f=de(i,d,{value:e.returnObject?a:i.value});return n.header?n.header({props:f}):h(Ne,f,l)},default:()=>h(SO,{items:s,returnObject:e.returnObject},n)}):n.item?n.item({props:i}):h(Ne,de(i,{value:e.returnObject?a:i.value}),l)})}}),wO=oe({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"),CG=new Set(["item","divider","subheader"]);function al(e,t){const n=kn(t,e.itemTitle,t),r=kn(t,e.itemValue,n),s=kn(t,e.itemChildren),i=e.itemProps===!0?typeof t=="object"&&t!=null&&!Array.isArray(t)?"children"in t?bn(t,["children"]):t:void 0:kn(t,e.itemProps);let o=kn(t,e.itemType,"item");CG.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)?_O(e,s):void 0,raw:t}}al.neededProps=["itemTitle","itemValue","itemChildren","itemProps","itemType"];function _O(e,t){const n=io(e,al.neededProps),r=[];for(const s of t)r.push(al(n,s));return r}function TG(e){const t=O(()=>_O(e,e.items)),n=O(()=>t.value.some(a=>a.value===null)),r=ke(new Map),s=ke([]);vn(()=>{const a=t.value,l=new Map,u=[];for(let c=0;c<a.length;c++){const d=a[c];if(oo(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,p=!!e.valueComparator,v=e.valueComparator||_r,m=io(e,al.neededProps),y=[];e:for(const S of a){if(!d&&S===null)continue;if(f&&typeof S=="string"){y.push(al(m,S));continue}const b=l.get(S);if(p||!b){for(const k of p?u:c)if(v(S,k.value)){y.push(k);continue e}y.push(al(m,S));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 RG=new Set(["item","divider","subheader"]);function PG(e,t){const n=oo(t)?t:kn(t,e.itemTitle),r=oo(t)?t:kn(t,e.itemValue,void 0),s=kn(t,e.itemChildren),i=e.itemProps===!0?bn(t,["children"]):kn(t,e.itemProps);let o=kn(t,e.itemType,"item");RG.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?kO(e,s):void 0,raw:t}}function kO(e,t){const n=[];for(const r of t)n.push(PG(e,r));return n}function IG(e){return{items:O(()=>kO(e,e.items))}}const AG=oe({baseColor:String,activeColor:String,activeClass:String,bgColor:String,disabled:Boolean,filterable:Boolean,expandIcon:$e,collapseIcon:$e,lines:{type:[Boolean,String],default:"one"},slim:Boolean,prependGap:[Number,String],indent:[Number,String],nav:Boolean,"onClick:open":Nn(),"onClick:select":Nn(),"onUpdate:opened":Nn(),...mG({selectStrategy:"single-leaf",openStrategy:"list"}),...os(),...Ue(),...Un(),...cr(),...ls(),...wO(),...On(),...ut(),...Pt(),...xs({variant:"text"})},"VList"),Dt=_e()({name:"VList",props:AG(),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}=IG(e),{themeClasses:s}=Wt(e),{backgroundColorClasses:i,backgroundColorStyles:o}=or(()=>e.bgColor),{borderClasses:a}=_s(e),{densityClasses:l}=as(e),{dimensionStyles:u}=dr(e),{elevationClasses:c}=ks(e),{roundedClasses:d}=zn(e),{children:f,open:p,parents:v,select:m,getPath:y}=gG(e,r,()=>e.returnObject),S=ne(()=>e.lines?`v-list--${e.lines}-line`:void 0),b=ne(()=>e.activeColor),k=ne(()=>e.baseColor),T=ne(()=>e.color),_=ne(()=>e.selectable||e.activatable);fO({filterable:e.filterable}),Tr({VListGroup:{activeColor:b,baseColor:k,color:T,expandIcon:ne(()=>e.expandIcon),collapseIcon:ne(()=>e.collapseIcon)},VListItem:{activeClass:ne(()=>e.activeClass),activeColor:b,baseColor:k,color:T,density:ne(()=>e.density),disabled:ne(()=>e.disabled),lines:ne(()=>e.lines),nav:ne(()=>e.nav),slim:ne(()=>e.slim),variant:ne(()=>e.variant)}});const C=ke(!1),R=H();function w(M){C.value=!0}function P(M){C.value=!1}function I(M){!C.value&&!(M.relatedTarget&&R.value?.contains(M.relatedTarget))&&K()}function A(M){const L=M.target;if(!(!R.value||L.tagName==="INPUT"&&["Home","End"].includes(M.key)||L.tagName==="TEXTAREA")){if(M.key==="ArrowDown")K("next");else if(M.key==="ArrowUp")K("prev");else if(M.key==="Home")K("first");else if(M.key==="End")K("last");else return;M.preventDefault()}}function $(M){C.value=!0}function K(M){if(R.value)return Hu(R.value,M)}return Ae(()=>{const M=e.indent??(e.prependGap?Number(e.prependGap)+24:void 0);return h(e.tag,{ref:R,class:Pe(["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,S.value,d.value,e.class]),style:De([{"--v-list-indent":Oe(M),"--v-list-group-prepend":M?"0px":void 0,"--v-list-prepend-gap":Oe(e.prependGap)},o.value,u.value,e.style]),tabindex:e.disabled?-1:0,role:_.value?"listbox":"list","aria-activedescendant":void 0,onFocusin:w,onFocusout:P,onFocus:I,onKeydown:A,onMousedown:$},{default:()=>[h(SO,{items:r.value,returnObject:e.returnObject},n)]})}),{open:p,select:m,focus:K,children:f,parents:v,getPath:y}}}),OG=oe({start:Boolean,end:Boolean,...Ue(),...ut()},"VListItemAction"),Il=_e()({name:"VListItemAction",props:OG(),setup(e,t){let{slots:n}=t;return Ae(()=>h(e.tag,{class:Pe(["v-list-item-action",{"v-list-item-action--start":e.start,"v-list-item-action--end":e.end},e.class]),style:De(e.style)},n)),{}}}),DG=oe({start:Boolean,end:Boolean,...Ue(),...ut()},"VListItemMedia"),MG=_e()({name:"VListItemMedia",props:DG(),setup(e,t){let{slots:n}=t;return Ae(()=>h(e.tag,{class:Pe(["v-list-item-media",{"v-list-item-media--start":e.start,"v-list-item-media--end":e.end},e.class]),style:De(e.style)},n)),{}}}),LG={key:1},FG={key:2},NG={class:"mt-3"},$G={key:0},BG={key:1},VG={key:2},UG=Me({__name:"BatchReprintDialog",setup(e){const t=Vt(),n=H(),r=Kt(Yt.BatchReprintDialog),s=H(!1),i=H(!1),o=H([]),a=H([]),l=H(""),u=Rt();function c(v){s.value=!0}async function d(v){n.value=v;try{const m=await el.batchGetLastPrintedFiles(n.value);o.value=m,a.value=m.filter(y=>y.connectionState==="Operational"&&y.reprintState==Fo.LastPrintReady)}catch(m){l.value=m.code.toString()??""}s.value=!1}async function f(){i.value=!0;try{await el.batchReprintFiles(a.value.filter(v=>v.file?.path).map(v=>({printerId:v.printerId,path:v.file?.path||""}))),t.clearSelectedPrinters(),u.info("Action completed","Your reprinted jobs are starting",5e3),p()}catch(v){l.value=nG(v)}finally{i.value=!1}}function p(){r.closeDialog(r.context())}return(v,m)=>{const y=Js;return F(),ee(y,{id:Q(r).dialogId,"max-width":"1000px",onBeforeOpened:c,onEscape:m[3]||(m[3]=S=>p()),onOpened:d},{default:g(()=>[h(mt,{class:"pa-4"},{default:g(()=>[h(Zt,null,{default:g(()=>[...m[4]||(m[4]=[E("span",{class:"text-h5"}," Batch - Submit Reprint Jobs ",-1)])]),_:1}),h(Gt,null,{default:g(()=>[l.value?.length?(F(),ee(ln,{key:0,color:"error"},{default:g(()=>[x(re(l.value),1)]),_:1})):fe("",!0),s.value?(F(),ge("span",LG," Loading... ")):(F(),ge("div",FG,[h(Dt,{density:"compact"},{default:g(()=>[h(Cr,null,{default:g(()=>[...m[5]||(m[5]=[x(" Reprinted Files - Select from list ",-1)])]),_:1}),h(uy,{modelValue:a.value,"onUpdate:modelValue":m[0]||(m[0]=S=>a.value=S),multiple:""},{default:g(()=>[(F(!0),ge(Ie,null,Ht(o.value,(S,b)=>(F(),ee(Ne,{key:b,value:S,disabled:S.connectionState!=="Operational"||S.reprintState!==Q(Fo).LastPrintReady},{prepend:g(()=>[S.reprintState==Q(Fo).LastPrintReady?(F(),ee(Z,{key:0},{default:g(()=>[...m[6]||(m[6]=[x("checklist",-1)])]),_:1})):fe("",!0),S.reprintState==Q(Fo).NoLastPrint?(F(),ee(Z,{key:1},{default:g(()=>[...m[7]||(m[7]=[x(" question_mark ",-1)])]),_:1})):fe("",!0),S.reprintState==Q(Fo).PrinterNotAvailable?(F(),ee(Z,{key:2},{default:g(()=>[...m[8]||(m[8]=[x(" signal_disconnected ",-1)])]),_:1})):fe("",!0)]),default:g(()=>[S.file?.path?.length?(F(),ee(it,{key:0},{default:g(()=>[x(re(S.file?.path)+" ",1),S.connectionState!=="Operational"?(F(),ee(mn,{key:0},{default:g(()=>[...m[9]||(m[9]=[x(" Printer busy ",-1)])]),_:1})):fe("",!0)]),_:2},1024)):S.reprintState==Q(Fo).NoLastPrint?(F(),ee(it,{key:1},{default:g(()=>[...m[10]||(m[10]=[x(" No file is present to print again ",-1)])]),_:1})):(F(),ee(it,{key:2},{default:g(()=>[...m[11]||(m[11]=[x(" OctoPrint cant be reached ",-1)])]),_:1})),h(pt,null,{default:g(()=>[x(" Printer '"+re(Q(t).printer(S.printerId)?.name??"Unknown printer")+"' ",1)]),_:2},1024)]),_:2},1032,["value","disabled"]))),128))]),_:1},8,["modelValue"])]),_:1})])),E("div",NG,[i.value?(F(),ge("div",$G,[h(zs,{class:"ma-3",indeterminate:"",color:"blue"}),m[12]||(m[12]=x(" Submitting ",-1))])):a.value.length>0?(F(),ge("div",BG,re(a.value.length)+" reprint selected ",1)):(F(),ge("div",VG,"Must select at least one file"))]),m[14]||(m[14]=E("br",null,null,-1)),h(te,{disabled:i.value||a.value.length===0,onClick:m[1]||(m[1]=S=>f())},{default:g(()=>[...m[13]||(m[13]=[x(" Submit Batch Reprint ",-1)])]),_:1},8,["disabled"])]),_:1}),h(An,null,{default:g(()=>[h(yn),h(te,{variant:"text",onClick:m[2]||(m[2]=S=>Q(r).closeDialog())},{default:g(()=>[...m[15]||(m[15]=[x(" Close ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}});function xO(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 cy="/assets/octoprint-tentacle-D_4slObB.svg",mf=0,dy=1,gf=2;function EO(e){return e===mf}function fh(e){return e===dy}function hh(e){return e===gf}function Yu(e){return EO(e)?"OctoPrint":fh(e)?"Moonraker":hh(e)?"PrusaLink":"Unknown"}function zG(e){let{rootEl:t,isSticky:n,layoutItemStyles:r}=e;const s=ke(!1),i=ke(0),o=O(()=>{const u=typeof s.value=="boolean"?"top":s.value;return[n.value?{top:"auto",bottom:"auto",height:void 0}:void 0,s.value?{[u]:Oe(i.value)}:{top:r.value.top}]});gt(()=>{we(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),p=c.height+Math.max(i.value,d)-window.scrollY-window.innerHeight,v=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-v,s.value=!0):u==="down"&&p<=0?(i.value=0,s.value="bottom"):u==="up"&&f<=0&&(v?s.value!=="top"&&(i.value=-f+v+d,s.value="top"):(i.value=c.top+f,s.value="top")),a=window.scrollY}return{isStuck:s,stickyStyles:o}}const HG=100,jG=20;function ck(e){return(e<0?-1:1)*Math.sqrt(Math.abs(e))*1.41421356237}function dk(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=ck(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 ck(t)*1e3}function qG(){const e={};function t(s){Array.from(s.changedTouches).forEach(i=>{(e[i.identifier]??(e[i.identifier]=new GT(jG))).push([s.timeStamp,i])})}function n(s){Array.from(s.changedTouches).forEach(i=>{delete e[i.identifier]})}function r(s){const i=e[s]?.values().reverse();if(!i)throw new Error(`No samples for touch id ${s}`);const o=i[0],a=[],l=[];for(const u of i){if(o[0]-u[0]>HG)break;a.push({t:u[0],d:u[1].clientX}),l.push({t:u[0],d:u[1].clientY})}return{x:dk(a),y:dk(l),get direction(){const{x:u,y:c}=this,[d,f]=[Math.abs(u),Math.abs(c)];return d>f&&u>=0?"right":d>f&&u<=0?"left":f>d&&c>=0?"down":f>d&&c<=0?"up":WG()}}}return{addMovement:t,endTouch:n,getVelocity:r}}function WG(){throw new Error}function GG(e){let{el:t,isActive:n,isTemporary:r,width:s,touchless:i,position:o}=e;gt(()=>{window.addEventListener("touchstart",b,{passive:!0}),window.addEventListener("touchmove",k,{passive:!1}),window.addEventListener("touchend",T,{passive:!0})}),Vn(()=>{window.removeEventListener("touchstart",b),window.removeEventListener("touchmove",k),window.removeEventListener("touchend",T)});const a=O(()=>["left","right"].includes(o.value)),{addMovement:l,endTouch:u,getVelocity:c}=qG();let d=!1;const f=ke(!1),p=ke(0),v=ke(0);let m;function y(C,R){return(o.value==="left"?C:o.value==="right"?document.documentElement.clientWidth-C:o.value==="top"?C:o.value==="bottom"?document.documentElement.clientHeight-C:$a())-(R?s.value:0)}function S(C){let R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const w=o.value==="left"?(C-v.value)/s.value:o.value==="right"?(document.documentElement.clientWidth-C-v.value)/s.value:o.value==="top"?(C-v.value)/s.value:o.value==="bottom"?(document.documentElement.clientHeight-C-v.value)/s.value:$a();return R?In(w):w}function b(C){if(i.value)return;const R=C.changedTouches[0].clientX,w=C.changedTouches[0].clientY,P=25,I=o.value==="left"?R<P:o.value==="right"?R>document.documentElement.clientWidth-P:o.value==="top"?w<P:o.value==="bottom"?w>document.documentElement.clientHeight-P:$a(),A=n.value&&(o.value==="left"?R<s.value:o.value==="right"?R>document.documentElement.clientWidth-s.value:o.value==="top"?w<s.value:o.value==="bottom"?w>document.documentElement.clientHeight-s.value:$a());(I||A||n.value&&r.value)&&(m=[R,w],v.value=y(a.value?R:w,n.value),p.value=S(a.value?R:w),d=v.value>-20&&v.value<80,u(C),l(C))}function k(C){const R=C.changedTouches[0].clientX,w=C.changedTouches[0].clientY;if(d){if(!C.cancelable){d=!1;return}const I=Math.abs(R-m[0]),A=Math.abs(w-m[1]);(a.value?I>A&&I>3:A>I&&A>3)?(f.value=!0,d=!1):(a.value?A:I)>3&&(d=!1)}if(!f.value)return;C.preventDefault(),l(C);const P=S(a.value?R:w,!1);p.value=Math.max(0,Math.min(1,P)),P>1?v.value=y(a.value?R:w,!0):P<0&&(v.value=y(a.value?R:w,!1))}function T(C){if(d=!1,!f.value)return;l(C),f.value=!1;const R=c(C.changedTouches[0].identifier),w=Math.abs(R.x),P=Math.abs(R.y);(a.value?w>P&&w>400:P>w&&P>3)?n.value=R.direction===({left:"right",right:"left",top:"down",bottom:"up"}[o.value]||$a()):n.value=p.value>.5}const _=O(()=>f.value?{transform:o.value==="left"?`translateX(calc(-100% + ${p.value*s.value}px))`:o.value==="right"?`translateX(calc(100% - ${p.value*s.value}px))`:o.value==="top"?`translateY(calc(-100% + ${p.value*s.value}px))`:o.value==="bottom"?`translateY(calc(100% - ${p.value*s.value}px))`:$a(),transition:"none"}:void 0);return kr(f,()=>{const C=t.value?.style.transform??null,R=t.value?.style.transition??null;vn(()=>{t.value?.style.setProperty("transform",_.value?.transform||"none"),t.value?.style.setProperty("transition",_.value?.transition||null)}),Qt(()=>{t.value?.style.setProperty("transform",C),t.value?.style.setProperty("transition",R)})}),{isDragging:f,dragProgress:p,dragStyles:_}}function $a(){throw new Error}function ad(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
49
+ 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
50
+ 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
51
+ 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
52
+ 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 KG(e,t,n){const r=[];let s=[];const i=CO(e),o=TO(e),a=n??ad(t)?.firstDay??0,l=(i.getDay()-a+7)%7,u=(o.getDay()-a+7)%7;for(let c=0;c<l;c++){const d=new Date(i);d.setDate(d.getDate()-(l-c)),s.push(d)}for(let c=1;c<=o.getDate();c++){const d=new Date(e.getFullYear(),e.getMonth(),c);s.push(d),s.length===7&&(r.push(s),s=[])}for(let c=1;c<7-u;c++){const d=new Date(o);d.setDate(d.getDate()+c),s.push(d)}return s.length>0&&r.push(s),r}function Xu(e,t,n){let r=(n??ad(t)?.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 YG(e,t){const n=new Date(e),r=((ad(t)?.firstDay??0)+6)%7;for(;n.getDay()!==r;)n.setDate(n.getDate()+1);return n}function CO(e){return new Date(e.getFullYear(),e.getMonth(),1)}function TO(e){return new Date(e.getFullYear(),e.getMonth()+1,0)}function XG(e){const t=e.split("-").map(Number);return new Date(t[0],t[1]-1,t[2])}const QG=/^([12]\d{3}-([1-9]|0[1-9]|1[0-2])-([1-9]|0[1-9]|[12]\d|3[01]))$/;function RO(e){if(e==null)return new Date;if(e instanceof Date)return e;if(typeof e=="string"){let t;if(QG.test(e))return XG(e);if(t=Date.parse(e),!isNaN(t))return new Date(t)}return null}const fk=new Date(2e3,0,2);function JG(e,t,n){const r=t??ad(e)?.firstDay??0;return Ka(7).map(s=>{const i=new Date(fk);return i.setDate(fk.getDate()+r+s),new Intl.DateTimeFormat(e,{weekday:n??"narrow"}).format(i)})}function ZG(e,t,n,r){const s=RO(e)??new Date,i=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 e7(e,t){const n=e.toJsDate(t),r=n.getFullYear(),s=bw(String(n.getMonth()+1),2,"0"),i=bw(String(n.getDate()),2,"0");return`${r}-${s}-${i}`}function t7(e){const[t,n,r]=e.split("-").map(Number);return new Date(t,n-1,r)}function n7(e,t){const n=new Date(e);return n.setMinutes(n.getMinutes()+t),n}function r7(e,t){const n=new Date(e);return n.setHours(n.getHours()+t),n}function oa(e,t){const n=new Date(e);return n.setDate(n.getDate()+t),n}function s7(e,t){const n=new Date(e);return n.setDate(n.getDate()+t*7),n}function i7(e,t){const n=new Date(e);return n.setDate(1),n.setMonth(n.getMonth()+t),n}function _c(e){return e.getFullYear()}function o7(e){return e.getMonth()}function a7(e,t,n,r){const s=ad(t),i=n??s?.firstDay??0,o=s?.firstWeekSize??1;return r!==void 0?l7(e,t,i,r):u7(e,t,i,o)}function l7(e,t,n,r){const s=(7+r-n)%7,i=Xu(e,t,n),o=oa(i,6);function a(f){return(7+new Date(f,0,1).getDay()-n)%7}let l=_c(i);l<_c(o)&&a(l+1)<=s&&l++;const u=new Date(l,0,1),c=a(l),d=c<=s?oa(u,-c):oa(u,7-c);return 1+mh(CS(i),kc(d),"weeks")}function u7(e,t,n,r){const s=Xu(e,t,n),i=oa(Xu(e,t,n),6);function o(d){const f=new Date(d,0,1);return 7-mh(f,Xu(f,t,n),"days")}let a=_c(s);a<_c(i)&&o(a+1)>=r&&a++;const l=new Date(a,0,1),u=o(a),c=u>=r?oa(l,u-7):oa(l,u);return 1+mh(CS(s),kc(c),"weeks")}function c7(e){return e.getDate()}function d7(e){return new Date(e.getFullYear(),e.getMonth()+1,1)}function f7(e){return new Date(e.getFullYear(),e.getMonth()-1,1)}function h7(e){return e.getHours()}function p7(e){return e.getMinutes()}function m7(e){return new Date(e.getFullYear(),0,1)}function g7(e){return new Date(e.getFullYear(),11,31)}function v7(e,t){return ph(e,t[0])&&S7(e,t[1])}function y7(e){const t=new Date(e);return t instanceof Date&&!isNaN(t.getTime())}function ph(e,t){return e.getTime()>t.getTime()}function b7(e,t){return ph(kc(e),kc(t))}function S7(e,t){return e.getTime()<t.getTime()}function hk(e,t){return e.getTime()===t.getTime()}function w7(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}function _7(e,t){return e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}function k7(e,t){return e.getFullYear()===t.getFullYear()}function mh(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 x7(e,t){const n=new Date(e);return n.setHours(t),n}function E7(e,t){const n=new Date(e);return n.setMinutes(t),n}function C7(e,t){const n=new Date(e);return n.setMonth(t),n}function T7(e,t){const n=new Date(e);return n.setDate(t),n}function R7(e,t){const n=new Date(e);return n.setFullYear(t),n}function kc(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0,0)}function CS(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),23,59,59,999)}class P7{constructor(t){this.locale=t.locale,this.formats=t.formats}date(t){return RO(t)}toJsDate(t){return t}toISO(t){return e7(this,t)}parseISO(t){return t7(t)}addMinutes(t,n){return n7(t,n)}addHours(t,n){return r7(t,n)}addDays(t,n){return oa(t,n)}addWeeks(t,n){return s7(t,n)}addMonths(t,n){return i7(t,n)}getWeekArray(t,n){const r=n!==void 0?Number(n):void 0;return KG(t,this.locale,r)}startOfWeek(t,n){const r=n!==void 0?Number(n):void 0;return Xu(t,this.locale,r)}endOfWeek(t){return YG(t,this.locale)}startOfMonth(t){return CO(t)}endOfMonth(t){return TO(t)}format(t,n){return ZG(t,n,this.locale,this.formats)}isEqual(t,n){return hk(t,n)}isValid(t){return y7(t)}isWithinRange(t,n){return v7(t,n)}isAfter(t,n){return ph(t,n)}isAfterDay(t,n){return b7(t,n)}isBefore(t,n){return!ph(t,n)&&!hk(t,n)}isSameDay(t,n){return w7(t,n)}isSameMonth(t,n){return _7(t,n)}isSameYear(t,n){return k7(t,n)}setMinutes(t,n){return E7(t,n)}setHours(t,n){return x7(t,n)}setMonth(t,n){return C7(t,n)}setDate(t,n){return T7(t,n)}setYear(t,n){return R7(t,n)}getDiff(t,n,r){return mh(t,n,r)}getWeekdays(t,n){const r=t!==void 0?Number(t):void 0;return JG(this.locale,r,n)}getYear(t){return _c(t)}getMonth(t){return o7(t)}getWeek(t,n,r){const s=n!==void 0?Number(n):void 0,i=r!==void 0?Number(r):void 0;return a7(t,this.locale,s,i)}getDate(t){return c7(t)}getNextMonth(t){return d7(t)}getPreviousMonth(t){return f7(t)}getHours(t){return h7(t)}getMinutes(t){return p7(t)}startOfDay(t){return kc(t)}endOfDay(t){return CS(t)}startOfYear(t){return m7(t)}endOfYear(t){return g7(t)}}const I7=Symbol.for("vuetify:date-options"),pk=Symbol.for("vuetify:date-adapter");function A7(e,t){const n=Xn({adapter:P7,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:O7(n,t)}}function O7(e,t){const n=on(typeof e.adapter=="function"?new e.adapter({locale:e.locale[t.current.value]??t.current.value,formats:e.formats}):e.adapter);return we(t.current,r=>{n.locale=e.locale[r]??r??n.locale}),n}const xc=Symbol.for("vuetify:layout"),PO=Symbol.for("vuetify:layout-item"),mk=1e3,IO=oe({overlaps:{type:Array,default:()=>[]},fullHeight:Boolean},"layout"),AO=oe({name:{type:String},order:{type:[Number,String],default:0},absolute:Boolean},"layout-item");function OO(){const e=je(xc);if(!e)throw new Error("[Vuetify] Could not find injected layout");return{getLayoutItem:e.getLayoutItem,mainRect:e.mainRect,mainStyles:e.mainStyles}}function DO(e){const t=je(xc);if(!t)throw new Error("[Vuetify] Could not find injected layout");const n=e.id??`layout-item-${Pr()}`,r=nn("useLayoutItem");zt(PO,{id:n});const s=ke(!1);Jy(()=>s.value=!0),eT(()=>s.value=!1);const{layoutItemStyles:i,layoutItemScrimStyles:o}=t.register(r,{...e,active:O(()=>s.value?!1:e.active.value),id:n});return Vn(()=>t.unregister(n)),{layoutItemStyles:i,layoutRect:t.layoutRect,layoutItemScrimStyles:o}}const D7=(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 MO(e){const t=je(xc,null),n=O(()=>t?t.rootZIndex.value-100:mk),r=H([]),s=on(new Map),i=on(new Map),o=on(new Map),a=on(new Map),l=on(new Map),{resizeRef:u,contentRect:c}=ao(),d=O(()=>{const C=new Map,R=e.overlaps??[];for(const w of R.filter(P=>P.includes(":"))){const[P,I]=w.split(":");if(!r.value.includes(P)||!r.value.includes(I))continue;const A=s.get(P),$=s.get(I),K=i.get(P),M=i.get(I);!A||!$||!K||!M||(C.set(I,{position:A.value,amount:parseInt(K.value,10)}),C.set(P,{position:$.value,amount:-parseInt(M.value,10)}))}return C}),f=O(()=>{const C=[...new Set([...o.values()].map(w=>w.value))].sort((w,P)=>w-P),R=[];for(const w of C){const P=r.value.filter(I=>o.get(I)?.value===w);R.push(...P)}return D7(R,s,i,a)}),p=O(()=>!Array.from(l.values()).some(C=>C.value)),v=O(()=>f.value[f.value.length-1].layer),m=ne(()=>({"--v-layout-left":Oe(v.value.left),"--v-layout-right":Oe(v.value.right),"--v-layout-top":Oe(v.value.top),"--v-layout-bottom":Oe(v.value.bottom),...p.value?void 0:{transition:"none"}})),y=O(()=>f.value.slice(1).map((C,R)=>{let{id:w}=C;const{layer:P}=f.value[R],I=i.get(w),A=s.get(w);return{id:w,...P,size:Number(I.value),position:A.value}})),S=C=>y.value.find(R=>R.id===C),b=nn("createLayout"),k=ke(!1);gt(()=>{k.value=!0}),zt(xc,{register:(C,R)=>{let{id:w,order:P,position:I,layoutSize:A,elementSize:$,active:K,disableTransitions:M,absolute:L}=R;o.set(w,P),s.set(w,I),i.set(w,A),a.set(w,K),M&&l.set(w,M);const G=Ya(PO,b?.vnode).indexOf(C);G>-1?r.value.splice(G,0,w):r.value.push(w);const B=O(()=>y.value.findIndex(z=>z.id===w)),q=O(()=>n.value+f.value.length*2-B.value*2),N=O(()=>{const z=I.value==="left"||I.value==="right",U=I.value==="right",le=I.value==="bottom",J=$.value??A.value,be=J===0?"%":"px",W={[I.value]:0,zIndex:q.value,transform:`translate${z?"X":"Y"}(${(K.value?0:-(J===0?100:J))*(U||le?-1:1)}${be})`,position:L.value||n.value!==mk?"absolute":"fixed",...p.value?void 0:{transition:"none"}};if(!k.value)return W;const pe=y.value[B.value],ue=d.value.get(w);return ue&&(pe[ue.position]+=ue.amount),{...W,height:z?`calc(100% - ${pe.top}px - ${pe.bottom}px)`:$.value?`${$.value}px`:void 0,left:U?void 0:`${pe.left}px`,right:U?`${pe.right}px`:void 0,top:I.value!=="bottom"?`${pe.top}px`:void 0,bottom:I.value!=="top"?`${pe.bottom}px`:void 0,width:z?$.value?`${$.value}px`:void 0:`calc(100% - ${pe.left}px - ${pe.right}px)`}}),se=O(()=>({zIndex:q.value-1}));return{layoutItemStyles:N,layoutItemScrimStyles:se,zIndex:q}},unregister:C=>{o.delete(C),s.delete(C),i.delete(C),a.delete(C),l.delete(C),r.value=r.value.filter(R=>R!==C)},mainRect:v,mainStyles:m,getLayoutItem:S,items:y,layoutRect:c,rootZIndex:n});const T=ne(()=>["v-layout",{"v-layout--full-height":e.fullHeight}]),_=ne(()=>({zIndex:t?n.value:void 0,position:t?"relative":void 0,overflow:t?"hidden":void 0}));return{layoutClasses:T,layoutStyles:_,getLayoutItem:S,items:y,layoutRect:c,layoutRef:u}}const M7=["start","end","left","right","top","bottom"],L7=oe({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=>M7.includes(e)},sticky:Boolean,...os(),...Ue(),...wb(),...Ca({mobile:null}),...ls(),...AO(),...On(),...bn(MR(),["disableInitialFocus"]),...ut({tag:"nav"}),...Pt()},"VNavigationDrawer"),TS=_e()({name:"VNavigationDrawer",props:L7(),emits:{"update:modelValue":e=>!0,"update:rail":e=>!0},setup(e,t){let{attrs:n,emit:r,slots:s}=t;const{isRtl:i}=Ir(),{themeClasses:o}=Wt(e),{borderClasses:a}=_s(e),{backgroundColorClasses:l,backgroundColorStyles:u}=or(()=>e.color),{elevationClasses:c}=ks(e),{displayClasses:d,mobile:f}=Es(e),{roundedClasses:p}=zn(e),v=gR(),m=tt(e,"modelValue",null,N=>!!N),{ssrBootStyles:y}=od(),{scopeId:S}=ql(),b=H(),k=ke(!1),{runOpenDelay:T,runCloseDelay:_}=_b(e,N=>{k.value=N}),C=O(()=>e.rail&&e.expandOnHover&&k.value?Number(e.width):Number(e.rail?e.railWidth:e.width)),R=O(()=>vv(e.location,i.value)),w=ne(()=>e.persistent),P=O(()=>!e.permanent&&(f.value||e.temporary)),I=O(()=>e.sticky&&!P.value&&R.value!=="bottom");LR(e,{isActive:m,localTop:P,contentEl:b}),kr(()=>e.expandOnHover&&e.rail!=null,()=>{we(k,N=>r("update:rail",!N))}),kr(()=>!e.disableResizeWatcher,()=>{we(P,N=>!e.permanent&&ot(()=>m.value=!N))}),kr(()=>!e.disableRouteWatcher&&!!v,()=>{we(v.currentRoute,()=>P.value&&(m.value=!1))}),we(()=>e.permanent,N=>{N&&(m.value=!0)}),e.modelValue==null&&!P.value&&(m.value=e.permanent||!f.value);const{isDragging:A,dragProgress:$}=GG({el:b,isActive:m,isTemporary:P,width:C,touchless:ne(()=>e.touchless),position:R}),K=O(()=>{const N=P.value?0:e.rail&&e.expandOnHover?Number(e.railWidth):C.value;return A.value?N*$.value:N}),{layoutItemStyles:M,layoutItemScrimStyles:L}=DO({id:e.name,order:O(()=>parseInt(e.order,10)),position:R,layoutSize:K,elementSize:C,active:_i(m),disableTransitions:ne(()=>A.value),absolute:O(()=>e.absolute||I.value&&typeof j.value!="string")}),{isStuck:j,stickyStyles:G}=zG({rootEl:b,isSticky:I,layoutItemStyles:M}),B=or(()=>typeof e.scrim=="string"?e.scrim:null),q=O(()=>({...A.value?{opacity:$.value*.2,transition:"none"}:void 0,...L.value}));return Tr({VList:{bgColor:"transparent"}}),Ae(()=>{const N=s.image||e.image;return E(Ie,null,[h(e.tag,de({ref:b,onMouseenter:T,onMouseleave:_,class:["v-navigation-drawer",`v-navigation-drawer--${R.value}`,{"v-navigation-drawer--expand-on-hover":e.expandOnHover,"v-navigation-drawer--floating":e.floating,"v-navigation-drawer--is-hovering":k.value,"v-navigation-drawer--rail":e.rail,"v-navigation-drawer--temporary":P.value,"v-navigation-drawer--persistent":w.value,"v-navigation-drawer--active":m.value,"v-navigation-drawer--sticky":I.value},o.value,l.value,a.value,d.value,c.value,p.value,e.class],style:[u.value,M.value,y.value,G.value,e.style],inert:!m.value},S,n),{default:()=>[N&&E("div",{key:"image",class:"v-navigation-drawer__img"},[s.image?h(Tt,{key:"image-defaults",disabled:!e.image,defaults:{VImg:{alt:"",cover:!0,height:"inherit",src:e.image}}},s.image):h(ts,{key:"image-img",alt:"",cover:!0,height:"inherit",src:e.image},null)]),s.prepend&&E("div",{class:"v-navigation-drawer__prepend"},[s.prepend?.()]),E("div",{class:"v-navigation-drawer__content"},[s.default?.()]),s.append&&E("div",{class:"v-navigation-drawer__append"},[s.append?.()])]}),h(so,{name:"fade-transition"},{default:()=>[P.value&&(A.value||m.value)&&!!e.scrim&&E("div",de({class:["v-navigation-drawer__scrim",B.backgroundColorClasses.value],style:[q.value,B.backgroundColorStyles.value],onClick:()=>{w.value||(m.value=!1)}},S),null)]})])}),{isStuck:j}}}),F7=oe({active:Boolean,disabled:Boolean,max:[Number,String],value:{type:[Number,String],default:0},...Ue(),...Wl({transition:{component:TR}})},"VCounter"),RS=_e()({name:"VCounter",functional:!0,props:F7(),setup(e,t){let{slots:n}=t;const r=ne(()=>e.max?`${e.value} / ${e.max}`:String(e.value));return Ae(()=>h(js,{transition:e.transition},{default:()=>[Ot(E("div",{class:Pe(["v-counter",{"text-error":e.max&&!e.disabled&&parseFloat(e.value)>parseFloat(e.max)},e.class]),style:De(e.style)},[n.default?n.default({counter:r.value,max:e.max,value:e.value}):r.value]),[[Di,e.active]])]})),{}}}),N7=oe({text:String,onClick:Nn(),...Ue(),...Pt()},"VLabel"),PS=_e()({name:"VLabel",props:N7(),setup(e,t){let{slots:n}=t;return Ae(()=>E("label",{class:Pe(["v-label",{"v-label--clickable":!!e.onClick},e.class]),style:De(e.style),onClick:e.onClick},[e.text,n.default?.()])),{}}}),$7=oe({floating:Boolean,...Ue()},"VFieldLabel"),Ad=_e()({name:"VFieldLabel",props:$7(),setup(e,t){let{slots:n}=t;return Ae(()=>h(PS,{class:Pe(["v-field-label",{"v-field-label--floating":e.floating},e.class]),style:De(e.style)},n)),{}}});function IS(e){const{t}=Br();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(),$c(l,new PointerEvent("click",d)))}const c=l&&a?t(`$vuetify.input.${a}`,e.label??""):void 0;return h(Z,de({icon:e[`${s}Icon`],"aria-label":c,onClick:l,onKeydown:u,color:i},o),null)}return{InputIcon:n}}const LO=oe({focused:Boolean,"onUpdate:focused":Nn()},"focus");function iu(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Qs();const n=tt(e,"focused"),r=ne(()=>({[`${t}--focused`]:n.value}));function s(){n.value=!0}function i(){n.value=!1}return{focusClasses:r,isFocused:n,focus:s,blur:i}}const B7=["underlined","outlined","filled","solo","solo-inverted","solo-filled","plain"],wp=oe({appendInnerIcon:$e,bgColor:String,clearable:Boolean,clearIcon:{type:$e,default:"$clear"},active:Boolean,centerAffix:{type:Boolean,default:void 0},color:String,baseColor:String,dirty:Boolean,disabled:{type:Boolean,default:null},glow:Boolean,error:Boolean,flat:Boolean,iconColor:[Boolean,String],label:String,persistentClear:Boolean,prependInnerIcon:$e,reverse:Boolean,singleLine:Boolean,variant:{type:String,default:"filled",validator:e=>B7.includes(e)},"onClick:clear":Nn(),"onClick:appendInner":Nn(),"onClick:prependInner":Nn(),...Ue(),...Kh(),...On(),...Pt()},"VField"),Al=_e()({name:"VField",inheritAttrs:!1,props:{id:String,details:Boolean,labelId:String,...LO(),...wp()},emits:{"update:focused":e=>!0,"update:modelValue":e=>!0},setup(e,t){let{attrs:n,emit:r,slots:s}=t;const{themeClasses:i}=Wt(e),{loaderClasses:o}=zc(e),{focusClasses:a,isFocused:l,focus:u,blur:c}=iu(e),{InputIcon:d}=IS(e),{roundedClasses:f}=zn(e),{rtlClasses:p}=Ir(),v=ne(()=>e.dirty||e.active),m=ne(()=>!!(e.label||s.label)),y=ne(()=>!e.singleLine&&m.value),S=Pr(),b=O(()=>e.id||`input-${S}`),k=ne(()=>e.details?`${b.value}-messages`:void 0),T=H(),_=H(),C=H(),R=O(()=>["plain","underlined"].includes(e.variant)),w=O(()=>e.error||e.disabled?void 0:v.value&&l.value?e.color:e.baseColor),P=O(()=>{if(!(!e.iconColor||e.glow&&!l.value))return e.iconColor===!0?w.value:e.iconColor}),{backgroundColorClasses:I,backgroundColorStyles:A}=or(()=>e.bgColor),{textColorClasses:$,textColorStyles:K}=bs(w);we(v,j=>{if(y.value&&!ca()){const G=T.value.$el,B=_.value.$el;requestAnimationFrame(()=>{const q=fb(G),N=B.getBoundingClientRect(),se=N.x-q.x,z=N.y-q.y-(q.height/2-N.height/2),U=N.width/.75,le=Math.abs(U-q.width)>1?{maxWidth:Oe(U)}:void 0,J=getComputedStyle(G),be=getComputedStyle(B),W=parseFloat(J.transitionDuration)*1e3||150,pe=parseFloat(be.getPropertyValue("--v-field-label-scale")),ue=be.getPropertyValue("color");G.style.visibility="visible",B.style.visibility="hidden",ji(G,{transform:`translate(${se}px, ${z}px) scale(${pe})`,color:ue,...le},{duration:W,easing:Uf,direction:j?"normal":"reverse"}).finished.then(()=>{G.style.removeProperty("visibility"),B.style.removeProperty("visibility")})})}},{flush:"post"});const M=O(()=>({isActive:v,isFocused:l,controlRef:C,iconColor:P,blur:c,focus:u}));function L(j){j.target!==document.activeElement&&j.preventDefault()}return Ae(()=>{const j=e.variant==="outlined",G=!!(s["prepend-inner"]||e.prependInnerIcon),B=!!(e.clearable||s.clear)&&!e.disabled,q=!!(s["append-inner"]||e.appendInnerIcon||B),N=()=>s.label?s.label({...M.value,label:e.label,props:{for:b.value}}):e.label;return E("div",de({class:["v-field",{"v-field--active":v.value,"v-field--appended":q,"v-field--center-affix":e.centerAffix??!R.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":G,"v-field--reverse":e.reverse,"v-field--single-line":e.singleLine,"v-field--no-label":!N(),[`v-field--variant-${e.variant}`]:!0},i.value,I.value,a.value,o.value,f.value,p.value,e.class],style:[A.value,e.style],onClick:L},n),[E("div",{class:"v-field__overlay"},null),h(Yh,{name:"v-field",active:!!e.loading,color:e.error?"error":typeof e.loading=="string"?e.loading:e.color},{default:s.loader}),G&&E("div",{key:"prepend",class:"v-field__prepend-inner"},[s["prepend-inner"]?s["prepend-inner"](M.value):e.prependInnerIcon&&h(d,{key:"prepend-icon",name:"prependInner",color:P.value},null)]),E("div",{class:"v-field__field","data-no-activator":""},[["filled","solo","solo-inverted","solo-filled"].includes(e.variant)&&y.value&&h(Ad,{key:"floating-label",ref:_,class:Pe([$.value]),floating:!0,for:b.value,"aria-hidden":!v.value,style:De(K.value)},{default:()=>[N()]}),m.value&&h(Ad,{key:"label",ref:T,id:e.labelId,for:b.value,"aria-hidden":y.value&&v.value},{default:()=>[N()]}),s.default?.({...M.value,props:{id:b.value,class:"v-field__input","aria-describedby":k.value},focus:u,blur:c})??E("div",{id:b.value,class:"v-field__input","aria-describedby":k.value},null)]),B&&h(PR,{key:"clear"},{default:()=>[Ot(E("div",{class:"v-field__clearable",onMousedown:se=>{se.preventDefault(),se.stopPropagation()}},[h(Tt,{defaults:{VIcon:{icon:e.clearIcon}}},{default:()=>[s.clear?s.clear({...M.value,props:{onFocus:u,onBlur:c,onClick:e["onClick:clear"],tabindex:-1}}):h(d,{name:"clear",onFocus:u,onBlur:c,tabindex:-1},null)]})]),[[Di,e.dirty]])]}),q&&E("div",{key:"append",class:"v-field__append-inner"},[s["append-inner"]?s["append-inner"](M.value):e.appendInnerIcon&&h(d,{key:"append-icon",name:"appendInner",color:P.value},null)]),E("div",{class:Pe(["v-field__outline",$.value]),style:De(K.value)},[j&&E(Ie,null,[E("div",{class:"v-field__outline__start"},null),y.value&&E("div",{class:"v-field__outline__notch"},[h(Ad,{ref:_,floating:!0,for:b.value,"aria-hidden":!v.value},{default:()=>[N()]})]),E("div",{class:"v-field__outline__end"},null)]),R.value&&y.value&&h(Ad,{ref:_,floating:!0,for:b.value,"aria-hidden":!v.value},{default:()=>[N()]})])])}),{controlRef:C,fieldIconColor:P}}}),V7=oe({active:Boolean,color:String,messages:{type:[Array,String],default:()=>[]},...Ue(),...Wl({transition:{component:TR,leaveAbsolute:!0,group:!0}})},"VMessages"),U7=_e()({name:"VMessages",props:V7(),setup(e,t){let{slots:n}=t;const r=O(()=>En(e.messages)),{textColorClasses:s,textColorStyles:i}=bs(()=>e.color);return Ae(()=>h(js,{transition:e.transition,tag:"div",class:Pe(["v-messages",s.value,e.class]),style:De([i.value,e.style])},{default:()=>[e.active&&r.value.map((o,a)=>E("div",{class:"v-messages__message",key:`${a}-${r.value}`},[n.message?n.message({message:o}):o]))]})),{}}}),FO=Symbol.for("vuetify:form"),z7=oe({disabled:Boolean,fastFail:Boolean,readonly:Boolean,modelValue:{type:Boolean,default:null},validateOn:{type:String,default:"input"}},"form");function H7(e){const t=tt(e,"modelValue"),n=ne(()=>e.disabled),r=ne(()=>e.readonly),s=ke(!1),i=H([]),o=H([]);async function a(){const c=[];let d=!0;o.value=[],s.value=!0;for(const f of i.value){const p=await f.validate();if(p.length>0&&(d=!1,c.push({id:f.id,errorMessages:p})),!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 we(i,()=>{let c=0,d=0;const f=[];for(const p of i.value)p.isValid===!1?(d++,f.push({id:p.id,errorMessages:p.errorMessages})):p.isValid===!0&&c++;o.value=f,t.value=d>0?!1:c===i.value.length?!0:null},{deep:!0,flush:"post"}),zt(FO,{register:c=>{let{id:d,vm:f,validate:p,reset:v,resetValidation:m}=c;i.value.some(y=>y.id===d),i.value.push({id:d,validate:p,reset:v,resetValidation:m,vm:$h(f),isValid:null,errorMessages:[]})},unregister:c=>{i.value=i.value.filter(d=>d.id!==c)},update:(c,d,f)=>{const p=i.value.find(v=>v.id===c);p&&(p.isValid=d,p.errorMessages=f)},isDisabled:n,isReadonly:r,isValidating:s,isValid:t,items:i,validateOn:ne(()=>e.validateOn)}),{errors:o,isDisabled:n,isReadonly:r,isValidating:s,isValid:t,items:i,validate:a,reset:l,resetValidation:u}}function NO(e){const t=je(FO,null);return{...t,isReadonly:O(()=>!!(e?.readonly??t?.isReadonly.value)),isDisabled:O(()=>!!(e?.disabled??t?.isDisabled.value))}}const j7=Symbol.for("vuetify:rules");function q7(e){const t=je(j7,null);if(!e){if(!t)throw new Error("Could not find Vuetify rules injection");return t.aliases}return t?.resolve(e)??ne(e)}const W7=oe({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,...LO()},"validation");function G7(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Qs(),n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Pr();const r=tt(e,"modelValue"),s=O(()=>e.validationValue===void 0?r.value:e.validationValue),i=NO(e),o=q7(()=>e.rules),a=H([]),l=ke(!0),u=O(()=>!!(En(r.value===""?null:r.value).length||En(s.value===""?null:s.value).length)),c=O(()=>e.errorMessages?.length?En(e.errorMessages).concat(a.value).slice(0,Math.max(0,Number(e.maxErrors))):a.value),d=O(()=>{let T=(e.validateOn??i.validateOn?.value)||"input";T==="lazy"&&(T="input lazy"),T==="eager"&&(T="input eager");const _=new Set(T?.split(" ")??[]);return{input:_.has("input"),blur:_.has("blur")||_.has("input")||_.has("invalid-input"),invalidInput:_.has("invalid-input"),lazy:_.has("lazy"),eager:_.has("eager")}}),f=O(()=>e.error||e.errorMessages?.length?!1:e.rules.length?l.value?a.value.length||d.value.lazy?null:!0:!a.value.length:!0),p=ke(!1),v=O(()=>({[`${t}--error`]:f.value===!1,[`${t}--dirty`]:u.value,[`${t}--disabled`]:i.isDisabled.value,[`${t}--readonly`]:i.isReadonly.value})),m=nn("validation"),y=O(()=>e.name??Q(n));Nl(()=>{i.register?.({id:y.value,vm:m,validate:k,reset:S,resetValidation:b})}),Vn(()=>{i.unregister?.(y.value)}),gt(async()=>{d.value.lazy||await k(!d.value.eager),i.update?.(y.value,f.value,c.value)}),kr(()=>d.value.input||d.value.invalidInput&&f.value===!1,()=>{we(s,()=>{if(s.value!=null)k();else if(e.focused){const T=we(()=>e.focused,_=>{_||k(),T()})}})}),kr(()=>d.value.blur,()=>{we(()=>e.focused,T=>{T||k()})}),we([f,c],()=>{i.update?.(y.value,f.value,c.value)});async function S(){r.value=null,await ot(),await b()}async function b(){l.value=!0,d.value.lazy?a.value=[]:await k(!d.value.eager)}async function k(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const _=[];p.value=!0;for(const C of o.value){if(_.length>=Number(e.maxErrors??1))break;const w=await(typeof C=="function"?C:()=>C)(s.value);if(w!==!0){if(w!==!1&&typeof w!="string"){console.warn(`${w} is not a valid value. Rule functions must return boolean true or a string.`);continue}_.push(w||"")}}return a.value=_,p.value=!1,l.value=T,a.value}return{errorMessages:c,isDirty:u,isDisabled:i.isDisabled,isReadonly:i.isReadonly,isPristine:l,isValid:f,isValidating:p,reset:S,resetValidation:b,validate:k,validationClasses:v}}const Pa=oe({id:String,appendIcon:$e,baseColor:String,centerAffix:{type:Boolean,default:!0},color:String,glow:Boolean,iconColor:[Boolean,String],prependIcon:$e,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":Nn(),"onClick:append":Nn(),...Ue(),...Un(),...io(cr(),["maxWidth","minWidth","width"]),...Pt(),...W7()},"VInput"),ns=_e()({name:"VInput",props:{...Pa()},emits:{"update:modelValue":e=>!0},setup(e,t){let{attrs:n,slots:r,emit:s}=t;const{densityClasses:i}=as(e),{dimensionStyles:o}=dr(e),{themeClasses:a}=Wt(e),{rtlClasses:l}=Ir(),{InputIcon:u}=IS(e),c=Pr(),d=O(()=>e.id||`input-${c}`),{errorMessages:f,isDirty:p,isDisabled:v,isReadonly:m,isPristine:y,isValid:S,isValidating:b,reset:k,resetValidation:T,validate:_,validationClasses:C}=G7(e,"v-input",d),R=O(()=>e.errorMessages?.length||!y.value&&f.value.length?f.value:e.hint&&(e.persistentHint||e.focused)?e.hint:e.messages),w=ne(()=>R.value.length>0),P=ne(()=>!e.hideDetails||e.hideDetails==="auto"&&(w.value||!!r.details)),I=O(()=>P.value?`${d.value}-messages`:void 0),A=O(()=>({id:d,messagesId:I,isDirty:p,isDisabled:v,isReadonly:m,isPristine:y,isValid:S,isValidating:b,hasDetails:P,reset:k,resetValidation:T,validate:_})),$=ne(()=>e.error||e.disabled?void 0:e.focused?e.color:e.baseColor),K=ne(()=>{if(e.iconColor)return e.iconColor===!0?$.value:e.iconColor});return Ae(()=>{const M=!!(r.prepend||e.prependIcon),L=!!(r.append||e.appendIcon);return E("div",{class:Pe(["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,C.value,e.class]),style:De([o.value,e.style])},[M&&E("div",{key:"prepend",class:"v-input__prepend"},[r.prepend?r.prepend(A.value):e.prependIcon&&h(u,{key:"prepend-icon",name:"prepend",color:K.value},null)]),r.default&&E("div",{class:"v-input__control"},[r.default?.(A.value)]),L&&E("div",{key:"append",class:"v-input__append"},[r.append?r.append(A.value):e.appendIcon&&h(u,{key:"append-icon",name:"append",color:K.value},null)]),P.value&&E("div",{id:I.value,class:"v-input__details",role:"alert","aria-live":"polite"},[h(U7,{active:w.value,messages:R.value},{message:r.message}),r.details?.(A.value)])])}),{reset:k,resetValidation:T,validate:_,isValid:S,errorMessages:f}}}),$O=oe({autocomplete:String},"autocomplete");function AS(e){const t=Pr(),n=ke(0),r=ne(()=>e.autocomplete==="suppress"),s=ne(()=>{if(e.name)return r.value?`${e.name}-${t}-${n.value}`:e.name}),i=ne(()=>r.value?"off":e.autocomplete);return{isSuppressing:r,fieldAutocomplete:i,fieldName:s,update:()=>n.value=new Date().getTime()}}function BO(e){function t(n,r){if(!e.autofocus||!n)return;const s=r[0].target;(s.matches("input,textarea")?s:s.querySelector("input,textarea"))?.focus()}return{onIntersect:t}}const K7=["color","file","time","date","datetime-local","week","month"],VO=oe({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,...$O(),...Pa(),...wp()},"VTextField"),et=_e()({name:"VTextField",directives:{vIntersect:Rl},inheritAttrs:!1,props:VO(),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=tt(e,"modelValue"),{isFocused:o,focus:a,blur:l}=iu(e),{onIntersect:u}=BO(e),c=O(()=>typeof e.counterValue=="function"?e.counterValue(i.value):typeof e.counterValue=="number"?e.counterValue:(i.value??"").toString().length),d=O(()=>{if(n.maxlength)return n.maxlength;if(!(!e.counter||typeof e.counter!="number"&&typeof e.counter!="string"))return e.counter}),f=O(()=>["plain","underlined"].includes(e.variant)),p=H(),v=H(),m=H(),y=AS(e),S=O(()=>K7.includes(e.type)||e.persistentPlaceholder||o.value||e.active);function b(){y.isSuppressing.value&&y.update(),o.value||a(),ot(()=>{m.value!==document.activeElement&&m.value?.focus()})}function k(R){r("mousedown:control",R),R.target!==m.value&&(b(),R.preventDefault())}function T(R){r("click:control",R)}function _(R,w){R.stopPropagation(),b(),ot(()=>{w(),$c(e["onClick:clear"],R)})}function C(R){const w=R.target;if(!(e.modelModifiers?.trim&&["text","search","password","tel","url"].includes(e.type))){i.value=w.value;return}const P=w.value,I=w.selectionStart,A=w.selectionEnd;i.value=P,ot(()=>{let $=0;P.trimStart().length===w.value.length&&($=P.length-w.value.length),I!=null&&(w.selectionStart=I-$),A!=null&&(w.selectionEnd=A-$)})}return Ae(()=>{const R=!!(s.counter||e.counter!==!1&&e.counter!=null),w=!!(R||s.details),[P,I]=ka(n),{modelValue:A,...$}=ns.filterProps(e),K=Al.filterProps(e);return h(ns,de({ref:p,modelValue:i.value,"onUpdate:modelValue":M=>i.value=M,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},P,$,{centerAffix:!f.value,focused:o.value}),{...s,default:M=>{let{id:L,isDisabled:j,isDirty:G,isReadonly:B,isValid:q,hasDetails:N,reset:se}=M;return h(Al,de({ref:v,onMousedown:k,onClick:T,"onClick:clear":z=>_(z,se),role:e.role},bn(K,["onClick:clear"]),{id:L.value,labelId:`${L.value}-label`,active:S.value||G.value,dirty:G.value||e.dirty,disabled:j.value,focused:o.value,details:N.value,error:q.value===!1}),{...s,default:z=>{let{props:{class:U,...le},controlRef:J}=z;const be=E("input",de({ref:W=>m.value=J.value=W,value:i.value,onInput:C,autofocus:e.autofocus,readonly:B.value,disabled:j.value,name:y.fieldName.value,autocomplete:y.fieldAutocomplete.value,placeholder:e.placeholder,size:1,role:e.role,type:e.type,onFocus:a,onBlur:l,"aria-labelledby":`${L.value}-label`},le,I),null);return E(Ie,null,[e.prefix&&E("span",{class:"v-text-field__prefix"},[E("span",{class:"v-text-field__prefix__text"},[e.prefix])]),Ot(s.default?E("div",{class:Pe(U),"data-no-activator":""},[s.default({id:L}),be]):xi(be,{class:U}),[[Rl,u,null,{once:!0}]]),e.suffix&&E("span",{class:"v-text-field__suffix"},[E("span",{class:"v-text-field__suffix__text"},[e.suffix])])])}})},details:w?M=>E(Ie,null,[s.details?.(M),R&&E(Ie,null,[E("span",null,null),h(RS,{active:e.persistentCounter||o.value,value:c.value,max:d.value,disabled:e.disabled},s.counter)])]):void 0})}),us({},p,v,m)}}),Y7=oe({id:String,interactive:Boolean,text:String,...bn(Hc({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","retainFocus","captureFocus","disableInitialFocus"])},"VTooltip"),Ze=_e()({name:"VTooltip",props:Y7(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=tt(e,"modelValue"),{scopeId:s}=ql(),i=Pr(),o=ne(()=>e.id||`v-tooltip-${i}`),a=H(),l=O(()=>e.location.split(" ").length>1?e.location:e.location+" center"),u=O(()=>e.origin==="auto"||e.origin==="overlap"||e.origin.split(" ").length>1||e.location.split(" ").length>1?e.origin:e.origin+" center"),c=ne(()=>e.transition!=null?e.transition:r.value?"scale-transition":"fade-transition"),d=O(()=>de({"aria-describedby":o.value},e.activatorProps));return Ae(()=>{const f=Ei.filterProps(e);return h(Ei,de({ref:a,class:["v-tooltip",{"v-tooltip--interactive":e.interactive},e.class],style:e.style,id:o.value},f,{modelValue:r.value,"onUpdate:modelValue":p=>r.value=p,transition:c.value,absolute:!0,location:l.value,origin:u.value,role:"tooltip",activatorProps:d.value,_disableGlobalStack:!0},s),{activator:n.activator,default:function(){for(var p=arguments.length,v=new Array(p),m=0;m<p;m++)v[m]=arguments[m];return n.default?.(...v)??e.text}})}),us({},a)}}),X7={key:0,class:"d-flex justify-center static-disabled"},Q7={key:1,class:"pulsating-red d-flex justify-center"},J7={key:0,class:"d-flex justify-center"},Z7={key:0},e9={key:1},t9={key:1},n9={key:2},r9={key:3},s9={key:0},i9={key:1},o9={key:0},a9={key:1},l9={key:0},u9={key:1},c9={key:2},d9=Me({__name:"FileExplorerSideNav",setup(e){const t=Vt(),n=Jn(),r=H(36),s=H(void 0),i=H(void 0),o=H(!1),a=H(!0),l=O(()=>t.sideNavPrinter),u=O(()=>l.value?.id),c=O(()=>u.value?n.isApiResponding(u.value):!1),d=O(()=>EO(l.value?.printerType)),f=O(()=>fh(l.value?.printerType)),p=O(()=>hh(l.value?.printerType)),v=O(()=>Yu(l.value?.printerType)),m=O(()=>u.value?n.isPrinterOperational(u.value):!1),y=O(()=>l.value?.enabled),S=O(()=>!!l.value?.disabledReason?.length),b=O(()=>u.value?n.isPrinterPrinting(u.value):!1),k=O(()=>i.value?.length?i.value.filter(ue=>s.value?.length?`${ue.path}`.toLowerCase().includes(s.value):!0)||[]:[]),T=O(()=>!l.value||!u.value?!1:n.isPrinterStoppable(u.value)),_=O(()=>!l.value||!u.value?!1:n.isPrinterPaused(u.value)),C=O(()=>u.value?i.value?.length&&n.isApiResponding(u.value):!1),R=O(()=>{if(!u.value)throw new Error("Printer ID not set, cannot get current job");return n.printerJobsById[u.value]}),w=O(()=>{if(!u.value)throw new Error("Printer ID not set, cannot get current printing file name");return n.printingFilePathsByPrinterId[u.value]}),P=O(()=>{if(!u.value||!l.value)return null;const ue=n.printerEventsById[u.value],Y=n.socketStatesById[u.value],Le=qA(l.value,Y,ue);return Ts().frontendDebugSettings?.showInterpretedPrinterState&&console.debug("[FileExplorerSideNav] rendered for printerId",u.value,Le?.text,Le?.color,Le?.rgb),Le}),I=async()=>{a.value=!0;const ue=l.value?.id;if(ue)try{n.isApiResponding(ue)?i.value=await t.loadPrinterFiles(ue):i.value=await bi.getFileCache(ue)}finally{a.value=!1}},A=async ue=>{u.value&&await t.deletePrinterFile(u.value,ue.path)};we(l,async(ue,Y)=>{o.value=!!ue;const Le=ue?.id;!ue||!Le||(!i.value||ue.id!==Y?.id||!Y)&&await I()}),we(o,ue=>{ue||t.setSideNavPrinter(void 0)});function $(ue){return ue?ue?.toFixed(1):""}function K(ue){return u.value?n.printingFilePathsByPrinterId[u.value]===ue.path:!1}function M(){const ue=l.value;if(ue&&o.value)return yp(ue.name)}function L(){l.value&&(qt.openPrinterURL(l.value.printerURL),pe())}function j(){if(!l.value)return;const ue=new URL(l.value.printerURL);ue.port="8080",qt.openPrinterURL(ue.toString()),pe()}async function G(){if(u.value){if(n.isPrinterOperational(u.value))return await qt.sendPrinterDisconnectCommand(u.value);await qt.sendPrinterConnectCommand(u.value)}}async function B(){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 ue=!l.value.enabled;await qt.toggleEnabled(u.value,ue)}async function q(){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(S.value){await qt.updatePrinterMaintenance(u.value);return}t.setMaintenanceDialogPrinter(l.value),await Kt(Yt.PrinterMaintenanceDialog).openDialog(),pe()}async function N(){u.value&&await qt.refreshSocket(u.value)}async function se(){u.value&&confirm("Are you sure to cancel the current print job?")&&await sa.stopPrintJob(u.value)}async function z(){u.value&&await sa.pausePrintJob(u.value)}async function U(){u.value&&await sa.resumePrintJob(u.value)}async function le(){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 J(){l.value&&(t.setUpdateDialogPrinter(l.value),Kt(Yt.AddOrUpdatePrinterDialog).openDialog(),pe())}async function be(ue){u.value&&await n.selectAndPrintFile({printerId:u.value,fullPath:ue.path})}function W(ue){u.value&&bi.downloadFile(u.value,ue)}function pe(){t.setSideNavPrinter(void 0)}return(ue,Y)=>{const Le=ic("drop-upload");return F(),ee(TS,{modelValue:o.value,"onUpdate:modelValue":Y[14]||(Y[14]=D=>o.value=D),absolute:"",loading:"true",location:"right",scrim:"white",temporary:"",width:"700",onClose:Y[15]||(Y[15]=D=>pe())},{default:g(()=>[l.value?(F(),ee(Ne,{key:0,lines:"two"},{prepend:g(()=>[h(Ze,{location:"left"},{activator:g(({props:D})=>[h(te,de({size:r.value,class:"mr-4 mt-1",color:"primary",icon:""},D,{onClick:Y[0]||(Y[0]=V=>L()),onMouseup:Y[1]||(Y[1]=yt(V=>L(),["middle"]))}),{default:g(()=>[h(st,{size:r.value,class:"font-weight-bold",color:"primary"},{default:g(()=>[x(re(M()),1)]),_:1},8,["size"])]),_:1},16,["size"])]),default:g(()=>[E("span",null," Visit the "+re(v.value)+" associated to this printer ",1)]),_:1})]),default:g(()=>[h(it,{class:"font-weight-bold"},{default:g(()=>[x(re(l.value.name),1)]),_:1}),h(pt),h(MG,null,{default:g(()=>[!y.value||!c.value?(F(),ge("strong",X7,re(y.value?"Enabled":"Disabled")+" - "+re(c.value?P.value?.text?.toUpperCase():"Offline"),1)):fe("",!0),y.value&&P.value?.text&&m.value&&c.value?(F(),ge("strong",Q7," Enabled - "+re(P.value?.text),1)):fe("",!0)]),_:1}),R.value?(F(),ee(pt,{key:0},{default:g(()=>[R.value?.progress?(F(),ge("span",J7," Progress: "+re($(R.value?.progress.completion))+"% ",1)):fe("",!0),R.value?.progress?(F(),ee(vl,{key:1,"model-value":$(R.value.progress?.completion),class:"mt-1 mb-1",height:"8px"},null,8,["model-value"])):fe("",!0),h(Ze,{location:"bottom"},{activator:g(({props:D})=>[h(te,de({size:"small"},D,{variant:"outlined"}),{default:g(()=>[x(re(w.value),1)]),_:1},16)]),default:g(()=>[E("span",null,re(w.value),1)]),_:1})]),_:1})):fe("",!0)]),_:1})):fe("",!0),!y.value||!c.value?(F(),ee(ln,{key:1,color:"primary"},{default:g(()=>[y.value?(F(),ge("span",e9,[x(" This "+re(v.value)+" seems unreachable... Will keep trying for you ",1),h(Z,null,{default:g(()=>[...Y[16]||(Y[16]=[x("hourglass_top",-1)])]),_:1})])):(F(),ge("span",Z7," Disabled "+re(v.value)+", enable it first to get live updates ",1))]),_:1})):fe("",!0),!l.value?.enabled&&!l.value?.disabledReason?(F(),ee(ln,{key:2,color:"secondary"},{default:g(()=>[x(" This "+re(v.value)+" was disabled without reason. ",1)]),_:1})):fe("",!0),l.value?.disabledReason?(F(),ee(ln,{key:3,color:"black"},{default:g(()=>[x(" This "+re(v.value)+" was disabled for maintenance: ",1),Y[17]||(Y[17]=E("br",null,null,-1)),E("small",null,"   "+re(l.value?.disabledReason),1)]),_:1})):fe("",!0),h(en),Ot((F(),ee(Dt,{density:"compact"},{default:g(()=>[h(Cr,{inset:""},{default:g(()=>[...Y[18]||(Y[18]=[x(" Manage FDM Monster instance",-1)])]),_:1}),h(Ze,{location:"left"},{activator:g(({props:D})=>[h(Ne,de({class:"extra-dense-list-item",link:""},D,{onClick:Y[2]||(Y[2]=yt(V=>L(),["prevent","stop"]))}),{prepend:g(()=>[h(st,{size:r.value,class:"ml-3 mr-6 ma-5"},{default:g(()=>[d.value?(F(),ee(ts,{key:0,src:Q(cy)},null,8,["src"])):f.value?(F(),ge("span",t9,"MR")):p.value?(F(),ge("span",n9,"PL")):(F(),ge("span",r9,"?"))]),_:1},8,["size"])]),default:g(()=>[E("span",null," Open "+re(v.value),1)]),_:1},16)]),default:g(()=>[E("span",null," Visit the "+re(v.value)+" associated to this printer ",1)]),_:1}),f.value?(F(),ee(Ze,{key:0,location:"left"},{activator:g(({props:D})=>[h(Ne,de({class:"extra-dense-list-item",link:""},D,{onClick:Y[3]||(Y[3]=yt(V=>j(),["prevent","stop"]))}),{prepend:g(()=>[h(st,{size:r.value,class:"ml-3 mr-6 ma-5"},{default:g(()=>[...Y[19]||(Y[19]=[E("span",null,"MA",-1)])]),_:1},8,["size"])]),default:g(()=>[Y[20]||(Y[20]=E("span",null," Open Mainsail ",-1))]),_:1},16)]),default:g(()=>[Y[21]||(Y[21]=E("span",null," Visit the Mainsail for this printer ",-1))]),_:1})):fe("",!0),h(Ze,{location:"left"},{activator:g(({props:D})=>[h(Ne,de({class:"extra-dense-list-item",link:""},D,{onClick:Y[4]||(Y[4]=yt(V=>B(),["prevent","stop"]))}),{prepend:g(()=>[h(st,{size:r.value,color:"grey-lighten-1"},{default:g(()=>[h(Z,{color:y.value?"primary":"green"},{default:g(()=>[...Y[22]||(Y[22]=[x(" dns",-1)])]),_:1},8,["color"])]),_:1},8,["size"])]),default:g(()=>[y.value?(F(),ge("span",s9," Disable Printer Location ")):y.value?fe("",!0):(F(),ge("span",i9," Enable Printer Location "))]),_:1},16)]),default:g(()=>[Y[23]||(Y[23]=E("span",null," Deactivate connection, without impacting print ",-1))]),_:1}),h(Ze,{location:"left"},{activator:g(({props:D})=>[h(Ne,de({class:"extra-dense-list-item",link:""},D,{onClick:Y[5]||(Y[5]=yt(V=>q(),["prevent","stop"]))}),{default:g(()=>[h(st,{size:r.value,color:"grey-lighten-1"},{default:g(()=>[h(Z,{color:S.value?"green":"primary"},{default:g(()=>[...Y[24]||(Y[24]=[x(" construction ",-1)])]),_:1},8,["color"])]),_:1},8,["size"]),S.value?S.value?(F(),ge("span",a9," Complete Maintenance ")):fe("",!0):(F(),ge("span",o9," Enable Maintenance "))]),_:1},16)]),default:g(()=>[Y[25]||(Y[25]=E("span",null," Deactivate, set under repair, without impacting print ",-1))]),_:1}),h(Ze,{location:"left"},{activator:g(({props:D})=>[h(Ne,de({class:"extra-dense-list-item",link:""},D,{onClick:Y[6]||(Y[6]=yt(V=>N(),["prevent","stop"]))}),{default:g(()=>[h(st,{size:r.value},{default:g(()=>[h(Z,{color:S.value?"green":"primary",class:"grey-lighten-1"},{default:g(()=>[...Y[26]||(Y[26]=[x(" autorenew ",-1)])]),_:1},8,["color"])]),_:1},8,["size"]),Y[27]||(Y[27]=E("span",null,[x(" Refresh State "),E("small",null," - this does not affect the print! ")],-1))]),_:1},16)]),default:g(()=>[Y[28]||(Y[28]=E("span",null," Let FDM Monster know you are experiencing inconsistencies, reset all volatile states ",-1))]),_:1}),h(en),h(Cr,{inset:""},{default:g(()=>[...Y[29]||(Y[29]=[x(" Commands",-1)])]),_:1}),h(Ze,{location:"left"},{activator:g(({props:D})=>[h(Ne,de({disabled:!l.value?.enabled||!c.value,class:"extra-dense-list-item",link:""},D,{onClick:Y[7]||(Y[7]=yt(V=>G(),["prevent","stop"]))}),{default:g(()=>[h(st,{size:r.value},{default:g(()=>[h(Z,null,{default:g(()=>[...Y[30]||(Y[30]=[x(" usb",-1)])]),_:1})]),_:1},8,["size"]),T.value?(F(),ge("span",l9," Disconnect USB & Stop Print ")):m.value?(F(),ge("span",u9," Disconnect USB ")):(F(),ge("span",c9," Connect USB "))]),_:1},16,["disabled"])]),default:g(()=>[Y[31]||(Y[31]=E("span",null," Disconnect USB, disrupting any print ",-1))]),_:1}),h(Ze,{location:"left"},{activator:g(({props:D})=>[h(Ne,de({disabled:!c.value||!b.value,class:"extra-dense-list-item",link:""},D,{onClick:Y[8]||(Y[8]=yt(V=>_.value?U():z(),["prevent","stop"]))}),{default:g(()=>[h(st,{size:r.value},{default:g(()=>[_.value?fe("",!0):(F(),ee(Z,{key:0},{default:g(()=>[...Y[32]||(Y[32]=[x(" pause",-1)])]),_:1})),_.value?(F(),ee(Z,{key:1},{default:g(()=>[...Y[33]||(Y[33]=[x(" play_circle_outline",-1)])]),_:1})):fe("",!0)]),_:1},8,["size"]),x(" "+re(_.value?"Resume print":"Pause print"),1)]),_:1},16,["disabled"])]),default:g(()=>[Y[34]||(Y[34]=E("span",null," Send Pause or Resume command ",-1))]),_:1}),h(Ze,{location:"left"},{activator:g(({props:D})=>[h(Ne,de({disabled:!T.value,class:"extra-dense-list-item",link:""},D,{onClick:Y[9]||(Y[9]=yt(V=>se(),["prevent","stop"]))}),{default:g(()=>[h(st,{size:r.value},{default:g(()=>[h(Z,null,{default:g(()=>[...Y[35]||(Y[35]=[x(" stop",-1)])]),_:1})]),_:1},8,["size"]),Y[36]||(Y[36]=x(" Cancel print ",-1))]),_:1},16,["disabled"])]),default:g(()=>[Y[37]||(Y[37]=E("span",null," Cancel print gracefully ",-1))]),_:1}),h(Ze,{location:"left"},{activator:g(({props:D})=>[h(Ne,de({disabled:!C.value,class:"extra-dense-list-item",link:""},D,{onClick:Y[10]||(Y[10]=yt(V=>le(),["prevent","stop"]))}),{default:g(()=>[h(st,{size:r.value},{default:g(()=>[h(Z,null,{default:g(()=>[...Y[38]||(Y[38]=[x(" delete",-1)])]),_:1})]),_:1},8,["size"]),Y[39]||(Y[39]=x(" Delete files ",-1))]),_:1},16,["disabled"])]),default:g(()=>[Y[40]||(Y[40]=E("span",null," Clear all files present on OctoPrint (local) ",-1))]),_:1}),h(Ze,{location:"left"},{activator:g(({props:D})=>[h(Ne,de({class:"extra-dense-list-item",link:""},D,{onClick:Y[11]||(Y[11]=yt(V=>I(),["prevent","stop"]))}),{default:g(()=>[h(st,{size:r.value},{default:g(()=>[h(Z,null,{default:g(()=>[...Y[41]||(Y[41]=[x(" refresh",-1)])]),_:1})]),_:1},8,["size"]),Y[42]||(Y[42]=x(" Refresh files ",-1))]),_:1},16)]),default:g(()=>[Y[43]||(Y[43]=E("span",null," Rebuild the file list on OctoPrint (local) ",-1))]),_:1}),h(Ze,{location:"left"},{activator:g(({props:D})=>[h(Ne,de({class:"extra-dense-list-item",link:""},D,{onClick:Y[12]||(Y[12]=yt(V=>J(),["prevent","stop"]))}),{default:g(()=>[h(st,{size:r.value},{default:g(()=>[h(Z,null,{default:g(()=>[...Y[44]||(Y[44]=[x(" settings",-1)])]),_:1})]),_:1},8,["size"]),Y[45]||(Y[45]=x(" Settings ",-1))]),_:1},16)]),default:g(()=>[Y[46]||(Y[46]=E("span",null," Edit the printer settings ",-1))]),_:1})]),_:1})),[[Le,{printers:[l.value]}]]),h(en),Ot((F(),ee(Dt,{density:"compact"},{default:g(()=>[h(Cr,{inset:""},{default:g(()=>[...Y[47]||(Y[47]=[x(" Files - drag 'n drop!",-1)])]),_:1}),h(et,{modelValue:s.value,"onUpdate:modelValue":Y[13]||(Y[13]=D=>s.value=D),class:"ml-5 mr-5",clearable:"",label:"Search files...","prepend-icon":"search"},null,8,["modelValue"]),k.value.length?fe("",!0):(F(),ee(Ne,{key:0},{default:g(()=>[h(st,{size:r.value},{default:g(()=>[h(Z,null,{default:g(()=>[...Y[48]||(Y[48]=[x(" clear",-1)])]),_:1})]),_:1},8,["size"]),h(it,null,{default:g(()=>[...Y[49]||(Y[49]=[x(" No files to show",-1)])]),_:1})]),_:1})),a.value?(F(),ee(vl,{key:1,indeterminate:""})):fe("",!0),(F(!0),ge(Ie,null,Ht(k.value,(D,V)=>(F(),ee(Ne,{key:V,density:"compact",link:"",style:{"padding-top":"0"}},{default:g(()=>[h(st,{size:r.value},{default:g(()=>[h(Ze,{location:"left"},{activator:g(({props:X})=>[h(te,de({ref_for:!0},X,{onClick:ce=>W(D.path)}),{default:g(()=>[h(Z,null,{default:g(()=>[...Y[50]||(Y[50]=[x(" download",-1)])]),_:1})]),_:1},16,["onClick"])]),default:g(()=>[Y[51]||(Y[51]=E("span",null," Download GCode ",-1))]),_:2},1024)]),_:2},1032,["size"]),h(Il,null,{default:g(()=>[h(Ze,{location:"left"},{activator:g(({props:X})=>[h(te,de({disabled:K(D),icon:""},{ref_for:!0},X,{onClick:ce=>be(D)}),{default:g(()=>[h(Z,null,{default:g(()=>[...Y[52]||(Y[52]=[x(" play_arrow",-1)])]),_:1})]),_:1},16,["disabled","onClick"])]),default:g(()=>[Y[53]||(Y[53]=E("span",null," Select & Print ",-1))]),_:2},1024)]),_:2},1024),h(Ze,{location:"left"},{activator:g(({props:X})=>[E("span",de({class:{"current-file-print":K(D)}},{ref_for:!0},X),re(D.path),17)]),default:g(()=>[E("span",null,[x(" File: "+re(D.path)+" ",1),Y[54]||(Y[54]=E("br",null,null,-1)),x(" Size: "+re(Q(xO)(D.size))+" ",1),Y[55]||(Y[55]=E("br",null,null,-1)),E("strong",null,re(K(D)?"Printing":"Unused"),1)])]),_:2},1024),h(Il,null,{default:g(()=>[h(Ze,{location:"left"},{activator:g(({props:X})=>[h(te,de({disabled:K(D)},{ref_for:!0},X,{onClick:ce=>A(D)}),{default:g(()=>[h(Z,{color:"grey-lighten-1"},{default:g(()=>[...Y[56]||(Y[56]=[x(" delete",-1)])]),_:1})]),_:1},16,["disabled","onClick"])]),default:g(()=>[Y[57]||(Y[57]=E("span",null," Delete file ",-1))]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))]),_:1})),[[Le,{printers:[l.value]}]])]),_:1},8,["modelValue"])}}});class gh extends fr{static async downloadYamlExport(t){const r=await(await Wn()).request({method:"POST",url:"api/server/export-printers-floors-yaml",data:t,responseType:"arraybuffer"});oy(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 Wn()).request({method:"POST",url:"api/server/dump-fdm-monster-logs",responseType:"arraybuffer"});oy(n.data,"logs-fdm-monster-"+Date.now()+".zip")}static async clearLogFilesOlderThanWeek(){return await this.delete("api/server/clear-outdated-fdm-monster-logs")}}class jo extends fr{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 Wn(!1,!1)).get("/api/test")}}const _p=is("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?.available:(console.debug(`Feature ${t} not defined. Options:`,Object.keys(e.features)),!1)}},actions:{async loadFeatures(){try{const e=await jo.getFeatures();this.setFeatures(e)}catch{this.features={}}},setFeatures(e){this.features=e}}}),UO=Symbol.for("vuetify:selection-control-group"),OS=oe({color:String,disabled:{type:Boolean,default:null},defaultsTarget:String,error:Boolean,id:String,inline:Boolean,falseIcon:$e,trueIcon:$e,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:_r},...Ue(),...Un(),...Pt()},"SelectionControlGroup"),f9=oe({...OS({defaultsTarget:"VSelectionControl"})},"VSelectionControlGroup"),h9=_e()({name:"VSelectionControlGroup",props:f9(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=tt(e,"modelValue"),s=Pr(),i=ne(()=>e.id||`v-selection-control-group-${s}`),o=ne(()=>e.name||i.value),a=new Set;return zt(UO,{modelValue:r,forceUpdate:()=>{a.forEach(l=>l())},onForceUpdate:l=>{a.add(l),Qt(()=>{a.delete(l)})}}),Tr({[e.defaultsTarget]:{color:ne(()=>e.color),disabled:ne(()=>e.disabled),density:ne(()=>e.density),error:ne(()=>e.error),inline:ne(()=>e.inline),modelValue:r,multiple:ne(()=>!!e.multiple||e.multiple==null&&Array.isArray(r.value)),name:o,falseIcon:ne(()=>e.falseIcon),trueIcon:ne(()=>e.trueIcon),readonly:ne(()=>e.readonly),ripple:ne(()=>e.ripple),type:ne(()=>e.type),valueComparator:ne(()=>e.valueComparator)}}),Ae(()=>E("div",{class:Pe(["v-selection-control-group",{"v-selection-control-group--inline":e.inline},e.class]),style:De(e.style),role:e.type==="radio"?"radiogroup":void 0},[n.default?.()])),{}}}),kp=oe({label:String,baseColor:String,trueValue:null,falseValue:null,value:null,...Ue(),...OS()},"VSelectionControl");function p9(e){const t=je(UO,void 0),{densityClasses:n}=as(e),r=tt(e,"modelValue"),s=O(()=>e.trueValue!==void 0?e.trueValue:e.value!==void 0?e.value:!0),i=O(()=>e.falseValue!==void 0?e.falseValue:!1),o=O(()=>!!e.multiple||e.multiple==null&&Array.isArray(r.value)),a=O({get(){const p=t?t.modelValue.value:r.value;return o.value?En(p).some(v=>e.valueComparator(v,s.value)):e.valueComparator(p,s.value)},set(p){if(e.readonly)return;const v=p?s.value:i.value;let m=v;o.value&&(m=p?[...En(r.value),v]:En(r.value).filter(y=>!e.valueComparator(y,s.value))),t?t.modelValue.value=m:r.value=m}}),{textColorClasses:l,textColorStyles:u}=bs(()=>{if(!(e.error||e.disabled))return a.value?e.color:e.baseColor}),{backgroundColorClasses:c,backgroundColorStyles:d}=or(()=>a.value&&!e.error&&!e.disabled?e.color:e.baseColor),f=O(()=>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 va=_e()({name:"VSelectionControl",directives:{vRipple:Ss},inheritAttrs:!1,props:kp(),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}=p9(e),p=Pr(),v=ke(!1),m=ke(!1),y=H(),S=ne(()=>e.id||`input-${p}`),b=ne(()=>!e.disabled&&!e.readonly);s?.onForceUpdate(()=>{y.value&&(y.value.checked=a.value)});function k(R){b.value&&(v.value=!0,Bf(R.target,":focus-visible")!==!1&&(m.value=!0))}function T(){v.value=!1,m.value=!1}function _(R){R.stopPropagation()}function C(R){if(!b.value){y.value&&(y.value.checked=a.value);return}e.readonly&&s&&ot(()=>s.forceUpdate()),a.value=R.target.checked}return Ae(()=>{const R=r.label?r.label({label:e.label,props:{for:S.value}}):e.label,[w,P]=ka(n),I=E("input",de({ref:y,checked:a.value,disabled:!!e.disabled,id:S.value,onBlur:T,onFocus:k,onInput:C,"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},P),null);return E("div",de({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":v.value,"v-selection-control--focus-visible":m.value,"v-selection-control--inline":e.inline},i.value,e.class]},w,{style:e.style}),[E("div",{class:Pe(["v-selection-control__wrapper",l.value]),style:De(u.value)},[r.default?.({backgroundColorClasses:c,backgroundColorStyles:d}),Ot(E("div",{class:Pe(["v-selection-control__input"])},[r.input?.({model:a,textColorClasses:l,textColorStyles:u,backgroundColorClasses:c,backgroundColorStyles:d,inputNode:I,icon:o.value,props:{onFocus:k,onBlur:T,id:S.value}})??E(Ie,null,[o.value&&h(Z,{key:"icon",icon:o.value},null),I])]),[[Ss,!e.disabled&&!e.readonly&&e.ripple,null,{center:!0,circle:!0}]])]),R&&h(PS,{for:S.value,onClick:_},{default:()=>[R]})])}),{isFocused:v,input:y}}}),zO=oe({indeterminate:Boolean,indeterminateIcon:{type:$e,default:"$checkboxIndeterminate"},...kp({falseIcon:"$checkboxOff",trueIcon:"$checkboxOn"})},"VCheckboxBtn"),ya=_e()({name:"VCheckboxBtn",props:zO(),emits:{"update:modelValue":e=>!0,"update:indeterminate":e=>!0},setup(e,t){let{slots:n}=t;const r=tt(e,"indeterminate"),s=tt(e,"modelValue");function i(l){r.value&&(r.value=!1)}const o=ne(()=>r.value?e.indeterminateIcon:e.falseIcon),a=ne(()=>r.value?e.indeterminateIcon:e.trueIcon);return Ae(()=>{const l=bn(va.filterProps(e),["modelValue"]);return h(va,de(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=oe({...Pa(),...bn(zO(),["inline"])},"VCheckbox"),cn=_e()({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=tt(e,"modelValue"),{isFocused:i,focus:o,blur:a}=iu(e),l=H(),u=Pr();return Ae(()=>{const[c,d]=ka(n),f=ns.filterProps(e),p=ya.filterProps(e);return h(ns,de({ref:l,class:["v-checkbox",e.class]},c,f,{modelValue:s.value,"onUpdate:modelValue":v=>s.value=v,id:e.id||`checkbox-${u}`,focused:i.value,style:e.style}),{...r,default:v=>{let{id:m,messagesId:y,isDisabled:S,isReadonly:b,isValid:k}=v;return h(ya,de(p,{id:m.value,"aria-describedby":y.value,disabled:S.value,readonly:b.value},d,{error:k.value===!1,modelValue:s.value,"onUpdate:modelValue":T=>s.value=T,onFocus:o,onBlur:a}),r)}})}),us({},l)}});function g9(){function e(n){return[...n.dataTransfer?.items??[]].filter(s=>s.kind==="file").map(s=>s.webkitGetAsEntry()).filter(Boolean).length>0||[...n.dataTransfer?.files??[]].length>0}async function t(n){const r=[],s=[...n.dataTransfer?.items??[]].filter(i=>i.kind==="file").map(i=>i.webkitGetAsEntry()).filter(Boolean);if(s.length)for(const i of s){const o=await HO(i,jO(".",i));r.push(...o.map(a=>a.file))}else r.push(...n.dataTransfer?.files??[]);return r}return{handleDrop:t,hasFilesOrFolders:e}}function HO(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 HO(a,jO(t,a)));n(o)})})}function jO(e,t){return t.isDirectory?`${e}/${t.name}`:e}const v9=oe({filterByType:String},"file-accept");function y9(e){const t=O(()=>e.filterByType?b9(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 b9(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=>{const o=i.name.split(".").at(-1)?.toLowerCase()??"",a=i.type.split("/").at(0)?.toLowerCase()??"";return s.includes(i.type)||n.includes(`.${o}`)||r.includes(`${a}/*`)}}const S9=oe({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},...Pa({prependIcon:"$file"}),modelValue:{type:[Array,Object],default:e=>e.multiple?[]:null,validator:e=>En(e).every(t=>t!=null&&typeof t=="object")},...v9(),...wp({clearable:!0})},"VFileInput"),qO=_e()({name:"VFileInput",inheritAttrs:!1,props:S9(),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}=Br(),{filterAccepted:o}=y9(e),a=tt(e,"modelValue",e.modelValue,q=>En(q),q=>!e.multiple&&Array.isArray(q)?q[0]:q),{isFocused:l,focus:u,blur:c}=iu(e),d=O(()=>typeof e.showSize!="boolean"?e.showSize:void 0),f=O(()=>(a.value??[]).reduce((q,N)=>{let{size:se=0}=N;return q+se},0)),p=O(()=>Sw(f.value,d.value)),v=O(()=>(a.value??[]).map(q=>{const{name:N="",size:se=0}=q,z=K(N);return e.showSize?`${z} (${Sw(se,d.value)})`:z})),m=O(()=>{const q=a.value?.length??0;return e.showSize?i(e.counterSizeString,q,p.value):i(e.counterString,q)}),y=H(),S=H(),b=H(),k=ne(()=>l.value||e.active),T=O(()=>["plain","underlined"].includes(e.variant)),_=ke(!1),{handleDrop:C,hasFilesOrFolders:R}=g9();function w(){b.value!==document.activeElement&&b.value?.focus(),l.value||u()}function P(q){b.value?.click()}function I(q){r("mousedown:control",q)}function A(q){b.value?.click(),r("click:control",q)}function $(q){q.stopPropagation(),w(),ot(()=>{a.value=[],$c(e["onClick:clear"],q)})}function K(q){if(q.length<Number(e.truncateLength))return q;const N=Math.floor((Number(e.truncateLength)-1)/2);return`${q.slice(0,N)}…${q.slice(q.length-N)}`}function M(q){q.preventDefault(),q.stopImmediatePropagation(),_.value=!0}function L(q){q.preventDefault(),_.value=!1}async function j(q){if(q.preventDefault(),q.stopImmediatePropagation(),_.value=!1,!b.value||!R(q))return;const N=await C(q);B(N)}function G(q){if(!(!q.target||q.repack))if(e.filterByType)B([...q.target.files]);else{const N=q.target;a.value=[...N.files??[]]}}function B(q){const N=new DataTransfer,{accepted:se,rejected:z}=o(q);z.length&&r("rejected",z);for(const le of se)N.items.add(le);b.value.files=N.files,a.value=[...N.files];const U=new Event("change",{bubbles:!0});U.repack=!0,b.value.dispatchEvent(U)}return we(a,q=>{(!Array.isArray(q)||!q.length)&&b.value&&(b.value.value="")}),Ae(()=>{const q=!!(s.counter||e.counter),N=!!(q||s.details),[se,z]=ka(n),{modelValue:U,...le}=ns.filterProps(e),J={...Al.filterProps(e),"onClick:clear":$},be=n.webkitdirectory!==void 0&&n.webkitdirectory!==!1,W=n.accept?String(n.accept):void 0,pe=be?void 0:e.filterByType??W;return h(ns,de({ref:y,modelValue:e.multiple?a.value:a.value[0],class:["v-file-input",{"v-file-input--chips":!!e.chips,"v-file-input--dragging":_.value,"v-file-input--hide":e.hideInput,"v-input--plain-underlined":T.value},e.class],style:e.style,"onClick:prepend":P},se,le,{centerAffix:!T.value,focused:l.value}),{...s,default:ue=>{let{id:Y,isDisabled:Le,isDirty:D,isReadonly:V,isValid:X,hasDetails:ce}=ue;return h(Al,de({ref:S,prependIcon:e.prependIcon,onMousedown:I,onClick:A,"onClick:prependInner":e["onClick:prependInner"],"onClick:appendInner":e["onClick:appendInner"]},J,{id:Y.value,active:k.value||D.value,dirty:D.value||e.dirty,disabled:Le.value,focused:l.value,details:ce.value,error:X.value===!1,onDragover:M,onDrop:j}),{...s,default:ve=>{let{props:{class:he,...Se},controlRef:Ee}=ve;return E(Ie,null,[E("input",de({ref:me=>b.value=Ee.value=me,type:"file",accept:pe,readonly:V.value,disabled:Le.value,multiple:e.multiple,name:e.name,onClick:me=>{me.stopPropagation(),V.value&&me.preventDefault(),w()},onChange:G,onDragleave:L,onFocus:w,onBlur:c},Se,z),null),E("div",{class:Pe(he)},[!!a.value?.length&&!e.hideInput&&(s.selection?s.selection({fileNames:v.value,totalBytes:f.value,totalBytesReadable:p.value}):e.chips?v.value.map(me=>h(mn,{key:me,size:"small",text:me},null)):v.value.join(", "))])])}})},details:N?ue=>E(Ie,null,[s.details?.(ue),q&&E(Ie,null,[E("span",null,null),h(RS,{active:!!a.value?.length,value:m.value,disabled:e.disabled},s.counter)])]):void 0})}),us({},y,S,b)}}),w9=oe({...kp({falseIcon:"$radioOff",trueIcon:"$radioOn"})},"VRadio"),fy=_e()({name:"VRadio",props:w9(),setup(e,t){let{slots:n}=t;return Ae(()=>{const r=va.filterProps(e);return h(va,de(r,{class:["v-radio",e.class],style:e.style,type:"radio"}),n)}),{}}}),_9=oe({height:{type:[Number,String],default:"auto"},...Pa(),...bn(OS(),["multiple"]),trueIcon:{type:$e,default:"$radioOn"},falseIcon:{type:$e,default:"$radioOff"},type:{type:String,default:"radio"}},"VRadioGroup"),WO=_e()({name:"VRadioGroup",inheritAttrs:!1,props:_9(),emits:{"update:modelValue":e=>!0},setup(e,t){let{attrs:n,slots:r}=t;const s=Pr(),i=O(()=>e.id||`radio-group-${s}`),o=tt(e,"modelValue"),a=H();return Ae(()=>{const[l,u]=ka(n),c=ns.filterProps(e),d=va.filterProps(e),f=r.label?r.label({label:e.label,props:{for:i.value}}):e.label;return h(ns,de({ref:a,class:["v-radio-group",e.class],style:e.style},l,c,{modelValue:o.value,"onUpdate:modelValue":p=>o.value=p,id:i.value}),{...r,default:p=>{let{id:v,messagesId:m,isDisabled:y,isReadonly:S}=p;return E(Ie,null,[f&&h(PS,{id:v.value},{default:()=>[f]}),h(h9,de(d,{id:v.value,"aria-describedby":m.value,defaultsTarget:"VRadio",trueIcon:e.trueIcon,falseIcon:e.falseIcon,type:e.type,disabled:y.value,readonly:S.value,"aria-labelledby":f?v.value:void 0,multiple:!1},u,{modelValue:o.value,"onUpdate:modelValue":b=>o.value=b}),r)])}})}),us({},a)}}),k9=oe({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))},maxHeight:{type:[Number,String],validator:e=>!isNaN(parseFloat(e))},maxRows:{type:[Number,String],validator:e=>!isNaN(parseFloat(e))},suffix:String,modelModifiers:Object,...$O(),...Pa(),...wp()},"VTextarea"),GO=_e()({name:"VTextarea",directives:{vIntersect:Rl},inheritAttrs:!1,props:k9(),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=tt(e,"modelValue"),{isFocused:o,focus:a,blur:l}=iu(e),{onIntersect:u}=BO(e),c=O(()=>typeof e.counterValue=="function"?e.counterValue(i.value):(i.value||"").toString().length),d=O(()=>{if(n.maxlength)return n.maxlength;if(!(!e.counter||typeof e.counter!="number"&&typeof e.counter!="string"))return e.counter}),f=H(),p=H(),v=ke(""),m=H(),y=H(0),{platform:S}=Es(),b=AS(e),k=O(()=>e.persistentPlaceholder||o.value||e.active);function T(){b.isSuppressing.value&&b.update(),m.value!==document.activeElement&&m.value?.focus(),o.value||a()}function _(M){T(),r("click:control",M)}function C(M){r("mousedown:control",M)}function R(M){M.stopPropagation(),T(),ot(()=>{i.value="",$c(e["onClick:clear"],M)})}function w(M){const L=M.target;if(!e.modelModifiers?.trim){i.value=L.value;return}const j=L.value,G=L.selectionStart,B=L.selectionEnd;i.value=j,ot(()=>{let q=0;j.trimStart().length===L.value.length&&(q=j.length-L.value.length),G!=null&&(L.selectionStart=G-q),B!=null&&(L.selectionEnd=B-q)})}const P=H(),I=H(Number(e.rows)),A=O(()=>["plain","underlined"].includes(e.variant));vn(()=>{e.autoGrow||(I.value=Number(e.rows))});function $(){ot(()=>{if(!m.value)return;if(S.value.firefox){y.value=12;return}const{offsetWidth:M,clientWidth:L}=m.value;y.value=Math.max(0,M-L)}),e.autoGrow&&ot(()=>{if(!P.value||!p.value)return;const M=getComputedStyle(P.value),L=getComputedStyle(p.value.$el),j=parseFloat(M.getPropertyValue("--v-field-padding-top"))+parseFloat(M.getPropertyValue("--v-input-padding-top"))+parseFloat(M.getPropertyValue("--v-field-padding-bottom")),G=P.value.scrollHeight,B=parseFloat(M.lineHeight),q=Math.max(parseFloat(e.rows)*B+j,parseFloat(L.getPropertyValue("--v-input-control-height"))),N=e.maxHeight?parseFloat(e.maxHeight):parseFloat(e.maxRows)*B+j||1/0,se=In(G??0,q,N);I.value=Math.floor((se-j)/B),v.value=Oe(se)})}gt($),we(i,$),we(()=>e.rows,$),we(()=>e.maxHeight,$),we(()=>e.maxRows,$),we(()=>e.density,$),we(I,M=>{r("update:rows",M)});let K;return we(P,M=>{M?(K=new ResizeObserver($),K.observe(P.value)):K?.disconnect()}),Vn(()=>{K?.disconnect()}),Ae(()=>{const M=!!(s.counter||e.counter||e.counterValue),L=!!(M||s.details),[j,G]=ka(n),{modelValue:B,...q}=ns.filterProps(e),N={...Al.filterProps(e),"onClick:clear":R};return h(ns,de({ref:f,modelValue:i.value,"onUpdate:modelValue":se=>i.value=se,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":A.value},e.class],style:[{"--v-textarea-max-height":e.maxHeight?Oe(e.maxHeight):void 0,"--v-textarea-scroll-bar-width":Oe(y.value)},e.style]},j,q,{centerAffix:I.value===1&&!A.value,focused:o.value}),{...s,default:se=>{let{id:z,isDisabled:U,isDirty:le,isReadonly:J,isValid:be,hasDetails:W}=se;return h(Al,de({ref:p,style:{"--v-textarea-control-height":v.value},onClick:_,onMousedown:C,"onClick:prependInner":e["onClick:prependInner"],"onClick:appendInner":e["onClick:appendInner"]},N,{id:z.value,active:k.value||le.value,labelId:`${z.value}-label`,centerAffix:I.value===1&&!A.value,dirty:le.value||e.dirty,disabled:U.value,focused:o.value,details:W.value,error:be.value===!1}),{...s,default:pe=>{let{props:{class:ue,...Y},controlRef:Le}=pe;return E(Ie,null,[e.prefix&&E("span",{class:"v-text-field__prefix"},[e.prefix]),Ot(E("textarea",de({ref:D=>m.value=Le.value=D,class:ue,value:i.value,onInput:w,autofocus:e.autofocus,readonly:J.value,disabled:U.value,placeholder:e.placeholder,rows:e.rows,name:b.fieldName.value,autocomplete:b.fieldAutocomplete.value,onFocus:T,onBlur:l,"aria-labelledby":`${z.value}-label`},Y,G),null),[[Rl,{handler:u},null,{once:!0}]]),e.autoGrow&&Ot(E("textarea",{class:Pe([ue,"v-textarea__sizer"]),id:`${Y.id}-sizer`,"onUpdate:modelValue":D=>i.value=D,ref:P,readonly:!0,"aria-hidden":"true"},null),[[DF,i.value]]),e.suffix&&E("span",{class:"v-text-field__suffix"},[e.suffix])])}})},details:L?se=>E(Ie,null,[s.details?.(se),M&&E(Ie,null,[E("span",null,null),h(RS,{active:e.persistentCounter||o.value,value:c.value,max:d.value,disabled:e.disabled},s.counter)])]):void 0})}),us({},f,p,m)}}),x9={key:0,class:"pl-2"},E9={key:1},C9=Me({__name:"YamlImportExportDialog",setup(e){const t=_p(),n=Kt(Yt.YamlImportExport),r=Rt(),s=H(""),i=H(""),o=H(0),a=H(!0),l=H(!0),u=H(!0),c=H(!0),d=H(void 0),f=H(""),p=O(()=>!t.hasFeature("printerGroupsApi")),v=O(()=>!!d.value),m=O(()=>o.value===0),y=async()=>{await t.loadFeatures(),u.value=t.hasFeature("printerGroupsApi")},S=async()=>{d.value=void 0,s.value="",i.value="",f.value=""},b=async()=>{l.value&&(c.value=!0),await gh.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=""},k=async()=>{if(s.value="",i.value="",!d.value){s.value="The import file was not specified";return}try{await gh.uploadAndImportYaml(d.value),d.value=void 0,r.openInfoMessage({title:"Imported the YAML file"}),T()}catch(_){s.value="An error occurred uring import",i.value=_.message.toString(),d.value=void 0}},T=()=>{d.value=void 0,s.value="",i.value="",f.value="",n.closeDialog()};return(_,C)=>{const R=Js;return F(),ee(R,{id:Q(n).dialogId,"max-width":"700px",onEscape:C[10]||(C[10]=w=>T()),onOpened:S,onBeforeOpened:y},{default:g(()=>[h(mt,{class:"pa-4"},{default:g(()=>[h(Zt,null,{default:g(()=>[...C[11]||(C[11]=[E("span",{class:"text-h5"}," YAML export and import ",-1)])]),_:1}),h(Gt,null,{default:g(()=>[C[18]||(C[18]=E("div",null,"Choose mode:",-1)),h(Je,null,{default:g(()=>[C[12]||(C[12]=E("br",null,null,-1)),h(WO,{modelValue:Q(o),"onUpdate:modelValue":C[0]||(C[0]=w=>Ye(o)?o.value=w:null),class:"ml-3",inline:""},{default:g(()=>[h(fy,{value:0,label:"Import YAML"}),h(fy,{value:1,label:"Export YAML"})]),_:1},8,["modelValue"])]),_:1}),E("div",null,[Q(m)?(F(),ge("div",x9,[h(qO,{modelValue:Q(d),"onUpdate:modelValue":C[1]||(C[1]=w=>Ye(d)?d.value=w:null),accept:".yaml",label:"Select a YAML file for import *"},null,8,["modelValue"])])):(F(),ge("div",E9,[h(cn,{modelValue:Q(a),"onUpdate:modelValue":C[2]||(C[2]=w=>Ye(a)?a.value=w:null),class:"pa-0 ma-0 mt-2 ml-2",label:"Include floors"},null,8,["modelValue"]),h(cn,{modelValue:Q(u),"onUpdate:modelValue":C[3]||(C[3]=w=>Ye(u)?u.value=w:null),disabled:Q(p),class:"pa-0 ma-0 mt-2 ml-2",label:"Include groups"},null,8,["modelValue","disabled"]),h(cn,{modelValue:Q(c),"onUpdate:modelValue":C[4]||(C[4]=w=>Ye(c)?c.value=w:null),class:"pa-0 ma-0 ml-2",label:"Include printers"},null,8,["modelValue"]),h(cn,{modelValue:Q(l),"onUpdate:modelValue":C[5]||(C[5]=w=>Ye(l)?l.value=w:null),class:"pa-0 ma-0 ml-2",label:"Include grid positions (auto-includes printers)"},null,8,["modelValue"]),C[13]||(C[13]=x(" Include notes (for yourself): ",-1)),h(GO,{modelValue:Q(f),"onUpdate:modelValue":C[6]||(C[6]=w=>Ye(f)?f.value=w:null),rows:"1"},null,8,["modelValue"])])),Q(m)?fe("",!0):(F(),ee(te,{key:2,onClick:C[7]||(C[7]=w=>b())},{default:g(()=>[h(Z,null,{default:g(()=>[...C[14]||(C[14]=[x("download",-1)])]),_:1}),C[15]||(C[15]=x(" Export YAML file ",-1))]),_:1})),Q(m)?(F(),ee(te,{key:3,disabled:!Q(v),onClick:C[8]||(C[8]=w=>k())},{default:g(()=>[h(Z,null,{default:g(()=>[...C[16]||(C[16]=[x("upload",-1)])]),_:1}),C[17]||(C[17]=x(" Import YAML data ",-1))]),_:1},8,["disabled"])):fe("",!0)])]),_:1}),h(An,null,{default:g(()=>[C[20]||(C[20]=E("em",{class:"text-red"}," * indicates required field ",-1)),h(yn),h(te,{variant:"text",onClick:C[9]||(C[9]=w=>T())},{default:g(()=>[...C[19]||(C[19]=[x(" Close ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}}),T9="/assets/octofarm-printer-export-Dw0Zh14I.gif",DS=Symbol.for("vuetify:v-stepper"),KO=oe({color:String,disabled:{type:[Boolean,String],default:!1},prevText:{type:String,default:"$vuetify.stepper.prev"},nextText:{type:String,default:"$vuetify.stepper.next"}},"VStepperActions"),R9=_e()({name:"VStepperActions",props:KO(),emits:{"click:prev":()=>!0,"click:next":()=>!0},setup(e,t){let{emit:n,slots:r}=t;const{t:s}=Br();function i(){n("click:prev")}function o(){n("click:next")}return Ae(()=>{const a={onClick:i},l={onClick:o};return E("div",{class:"v-stepper-actions"},[h(Tt,{defaults:{VBtn:{disabled:["prev",!0].includes(e.disabled),text:s(e.prevText),variant:"text"}}},{default:()=>[r.prev?.({props:a})??h(te,a,null)]}),h(Tt,{defaults:{VBtn:{color:e.color,disabled:["next",!0].includes(e.disabled),text:s(e.nextText),variant:"tonal"}}},{default:()=>[r.next?.({props:l})??h(te,l,null)]})])}),{}}}),MS=Vl("v-stepper-header"),P9=oe({color:String,title:String,subtitle:String,complete:Boolean,completeIcon:{type:$e,default:"$complete"},editable:Boolean,editIcon:{type:$e,default:"$edit"},error:Boolean,errorIcon:{type:$e,default:"$error"},icon:$e,ripple:{type:[Boolean,Object],default:!0},rules:{type:Array,default:()=>[]}},"StepperItem"),I9=oe({...P9(),...Vc()},"VStepperItem"),vf=_e()({name:"VStepperItem",directives:{vRipple:Ss},props:I9(),emits:{"group:selected":e=>!0},setup(e,t){let{slots:n}=t;const r=gl(e,DS,!0),s=O(()=>r?.value.value??e.value),i=O(()=>e.rules.every(f=>f()===!0)),o=O(()=>!e.disabled&&e.editable),a=O(()=>!e.disabled&&e.editable),l=O(()=>e.error||!i.value),u=O(()=>e.complete||e.rules.length>0&&i.value),c=O(()=>l.value?e.errorIcon:u.value?e.completeIcon:r.isSelected.value&&e.editable?e.editIcon:e.icon),d=O(()=>({canEdit:a.value,hasError:l.value,hasCompleted:u.value,title:e.title,subtitle:e.subtitle,step:s.value,value:e.value}));return Ae(()=>{const f=(!r||r.isSelected.value||u.value||a.value)&&!l.value&&!e.disabled,p=!!(e.title!=null||n.title),v=!!(e.subtitle!=null||n.subtitle);function m(){r?.toggle()}return Ot(E("button",{class:Pe(["v-stepper-item",{"v-stepper-item--complete":u.value,"v-stepper-item--disabled":e.disabled,"v-stepper-item--error":l.value},r?.selectedClass.value]),disabled:!e.editable,type:"button",onClick:m},[o.value&&go(!0,"v-stepper-item"),h(st,{key:"stepper-avatar",class:"v-stepper-item__avatar",color:f?e.color:void 0,size:24},{default:()=>[n.icon?.(d.value)??(c.value?h(Z,{icon:c.value},null):s.value)]}),E("div",{class:"v-stepper-item__content"},[p&&E("div",{key:"title",class:"v-stepper-item__title"},[n.title?.(d.value)??e.title]),v&&E("div",{key:"subtitle",class:"v-stepper-item__subtitle"},[n.subtitle?.(d.value)??e.subtitle]),n.default?.(d.value)])]),[[Ss,e.editable&&e.ripple,null]])}),{}}}),A9=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 O9(e,t){const n=e.changedTouches[0];t.touchstartX=n.clientX,t.touchstartY=n.clientY,t.start?.({originalEvent:e,...t})}function D9(e,t){const n=e.changedTouches[0];t.touchendX=n.clientX,t.touchendY=n.clientY,t.end?.({originalEvent:e,...t}),A9(t)}function M9(e,t){const n=e.changedTouches[0];t.touchmoveX=n.clientX,t.touchmoveY=n.clientY,t.move?.({originalEvent:e,...t})}function L9(){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=>O9(n,t),touchend:n=>D9(n,t),touchmove:n=>M9(n,t)}}function F9(e,t){const n=t.value,r=n?.parent?e.parentElement:e,s=n?.options??{passive:!0},i=t.instance?.$.uid;if(!r||i===void 0)return;const o=L9(t.value);r._touchHandlers=r._touchHandlers??Object.create(null),r._touchHandlers[i]=o,jT(o).forEach(a=>{r.addEventListener(a,o[a],s)})}function N9(e,t){const n=t.value?.parent?e.parentElement:e,r=t.instance?.$.uid;if(!n?._touchHandlers||r===void 0)return;const s=n._touchHandlers[r];jT(s).forEach(i=>{n.removeEventListener(i,s[i])}),delete n._touchHandlers[r]}const hy={mounted:F9,unmounted:N9},YO=Symbol.for("vuetify:v-window"),XO=Symbol.for("vuetify:v-window-group"),QO=oe({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,...Ue(),...ut(),...Pt()},"VWindow"),gk=_e()({name:"VWindow",directives:{vTouch:hy},props:QO(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{themeClasses:r}=Wt(e),{isRtl:s}=Ir(),{t:i}=Br(),o=Ul(e,XO),a=H(),l=O(()=>s.value?!e.reverse:e.reverse),u=ke(!1),c=O(()=>{if(e.crossfade)return"v-window-crossfade-transition";const T=e.direction==="vertical"?"y":"x",C=(l.value?!u.value:u.value)?"-reverse":"";return`v-window-${T}${C}-transition`}),d=ke(0),f=H(void 0),p=O(()=>o.items.value.findIndex(T=>o.selected.value.includes(T.id)));we(p,(T,_)=>{let C;const R={left:0,top:0};kt&&_>=0&&(C=mb(a.value),R.left=C?.scrollLeft,R.top=C?.scrollTop);const w=o.items.value.length,P=w-1;w<=2?u.value=T<_:T===P&&_===0?u.value=!1:T===0&&_===P?u.value=!0:u.value=T<_,ot(()=>{if(!kt||!C)return;C.scrollTop!==R.top&&C.scrollTo({...R,behavior:"instant"}),requestAnimationFrame(()=>{if(!C)return;C.scrollTop!==R.top&&C.scrollTo({...R,behavior:"instant"})})})},{flush:"sync"}),zt(YO,{transition:c,isReversed:u,transitionCount:d,transitionHeight:f,rootRef:a});const v=ne(()=>e.continuous||p.value!==0),m=ne(()=>e.continuous||p.value!==o.items.value.length-1);function y(){v.value&&o.prev()}function S(){m.value&&o.next()}const b=O(()=>{const T=[],_={icon:s.value?e.nextIcon:e.prevIcon,class:`v-window__${l.value?"right":"left"}`,onClick:o.prev,"aria-label":i("$vuetify.carousel.prev")};T.push(v.value?n.prev?n.prev({props:_}):h(te,_,null):E("div",null,null));const C={icon:s.value?e.prevIcon:e.nextIcon,class:`v-window__${l.value?"left":"right"}`,onClick:o.next,"aria-label":i("$vuetify.carousel.next")};return T.push(m.value?n.next?n.next({props:C}):h(te,C,null):E("div",null,null)),T}),k=O(()=>e.touch===!1?e.touch:{...{left:()=>{l.value?y():S()},right:()=>{l.value?S():y()},start:_=>{let{originalEvent:C}=_;C.stopPropagation()}},...e.touch===!0?{}:e.touch});return Ae(()=>Ot(h(e.tag,{ref:a,class:Pe(["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:De([e.style,{"--v-window-transition-duration":ca()?null:Oe(e.transitionDuration,"ms")}])},{default:()=>[E("div",{class:"v-window__container",style:{height:f.value}},[n.default?.({group:o}),e.showArrows!==!1&&E("div",{class:Pe(["v-window__controls",{"v-window__controls--left":e.verticalArrows==="left"||e.verticalArrows===!0},{"v-window__controls--right":e.verticalArrows==="right"}])},[b.value])]),n.additional?.({group:o})]}),[[hy,k.value]])),{group:o}}}),$9=oe({...bn(QO(),["continuous","nextIcon","prevIcon","showArrows","touch","mandatory"])},"VStepperWindow"),JO=_e()({name:"VStepperWindow",props:$9(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=je(DS,null),s=tt(e,"modelValue"),i=O({get(){return s.value!=null||!r?s.value:r.items.value.find(o=>r.selected.value.includes(o.id))?.value},set(o){s.value=o}});return Ae(()=>{const o=gk.filterProps(e);return h(gk,de({_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)}),{}}}),ZO=oe({reverseTransition:{type:[Boolean,String],default:void 0},transition:{type:[Boolean,String],default:void 0},...Ue(),...Vc(),...FR()},"VWindowItem"),vk=_e()({name:"VWindowItem",directives:{vTouch:hy},props:ZO(),emits:{"group:selected":e=>!0},setup(e,t){let{slots:n}=t;const r=je(YO),s=gl(e,XO),{isBooted:i}=od();if(!r||!s)throw new Error("[Vuetify] VWindowItem must be used inside VWindow");const o=ke(!1),a=O(()=>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(){o.value||!r||(o.value=!0,r.transitionCount.value===0&&(r.transitionHeight.value=Oe(r.rootRef.value?.clientHeight)),r.transitionCount.value+=1)}function c(){l()}function d(v){o.value&&ot(()=>{!a.value||!o.value||!r||(r.transitionHeight.value=Oe(v.clientHeight))})}const f=O(()=>{const v=r.isReversed.value?e.reverseTransition:e.transition;return a.value?{name:typeof v!="string"?r.transition.value:v,onBeforeEnter:u,onAfterEnter:l,onEnterCancelled:c,onBeforeLeave:u,onAfterLeave:l,onLeaveCancelled:c,onEnter:d}:!1}),{hasContent:p}=NR(e,s.isSelected);return Ae(()=>h(js,{transition:f.value,disabled:!i.value},{default:()=>[Ot(E("div",{class:Pe(["v-window-item",s.selectedClass.value,e.class]),style:De(e.style)},[p.value&&n.default?.()]),[[Di,s.isSelected.value]])]})),{groupItem:s}}}),B9=oe({...ZO()},"VStepperWindowItem"),yf=_e()({name:"VStepperWindowItem",props:B9(),setup(e,t){let{slots:n}=t;return Ae(()=>{const r=vk.filterProps(e);return h(vk,de({_as:"VStepperWindowItem"},r,{class:["v-stepper-window-item",e.class],style:e.style}),n)}),{}}}),eD=oe({color:String,...os(),...Ue(),...cr(),...ls(),...vo(),...Hl(),...On(),...ut(),...Pt()},"VSheet"),Ec=_e()({name:"VSheet",props:eD(),setup(e,t){let{slots:n}=t;const{themeClasses:r}=Wt(e),{backgroundColorClasses:s,backgroundColorStyles:i}=or(()=>e.color),{borderClasses:o}=_s(e),{dimensionStyles:a}=dr(e),{elevationClasses:l}=ks(e),{locationStyles:u}=Ea(e),{positionClasses:c}=jl(e),{roundedClasses:d}=zn(e);return Ae(()=>h(e.tag,{class:Pe(["v-sheet",r.value,s.value,o.value,l.value,c.value,d.value,e.class]),style:De([i.value,a.value,u.value,e.style])},n)),{}}}),V9=oe({altLabels:Boolean,bgColor:String,completeIcon:$e,editIcon:$e,editable:Boolean,errorIcon:$e,hideActions:Boolean,items:{type:Array,default:()=>[]},itemTitle:{type:[String,Array,Function],default:"title"},itemValue:{type:[String,Array,Function],default:"value"},itemProps:{type:[Boolean,String,Array,Function],default:"props"},nonLinear:Boolean,flat:Boolean,...Ca()},"Stepper"),U9=oe({...V9(),...Bc({mandatory:"force",selectedClass:"v-stepper-item--selected"}),...eD(),...io(KO(),["prevText","nextText"])},"VStepper"),tD=_e()({name:"VStepper",props:U9(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{items:r,next:s,prev:i,selected:o}=Ul(e,DS),{displayClasses:a,mobile:l}=Es(e),{completeIcon:u,editIcon:c,errorIcon:d,color:f,editable:p,prevText:v,nextText:m}=_a(e),y=O(()=>e.items.map((k,T)=>{const _=kn(k,e.itemTitle,k),C=kn(k,e.itemValue,T+1),R=e.itemProps===!0?k:kn(k,e.itemProps),w={title:_,value:C,...R};return{title:w.title,value:w.value,props:w,raw:k}})),S=O(()=>r.value.findIndex(k=>o.value.includes(k.id))),b=O(()=>e.disabled?e.disabled:S.value===0?"prev":S.value===r.value.length-1?"next":!1);return Tr({VStepperItem:{editable:p,errorIcon:d,completeIcon:u,editIcon:c,prevText:v,nextText:m},VStepperActions:{color:f,disabled:b,prevText:v,nextText:m}}),Ae(()=>{const k=Ec.filterProps(e),T=!!(n.header||e.items.length),_=e.items.length>0,C=!e.hideActions&&!!(_||n.actions);return h(Ec,de(k,{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:()=>[T&&h(MS,{key:"stepper-header"},{default:()=>[y.value.map((R,w)=>{let{raw:P,...I}=R;return E(Ie,null,[!!w&&h(en,null,null),h(vf,I.props,{default:n[`header-item.${I.value}`]??n.header,icon:n.icon,title:n.title,subtitle:n.subtitle})])})]}),_&&h(JO,{key:"stepper-window"},{default:()=>[y.value.map(R=>h(yf,{value:R.value},{default:()=>n[`item.${R.value}`]?.(R)??n.item?.(R)}))]}),n.default?.({prev:i,next:s}),C&&(n.actions?.({next:s,prev:i})??h(R9,{key:"stepper-actions","onClick:prev":i,"onClick:next":s},n))]})}),{prev:i,next:s}}}),z9={class:"my-3"},H9={key:0},j9={key:1},q9={class:"my-2"},W9={key:0},G9={class:"mr-4"},K9={class:"mr-4"},Y9={class:"mr-4"},X9={class:"my-3"},Q9={key:0,class:"mb-5 mt-10"},J9={key:1},Z9={class:"ml-5 mt-2"},eK={key:0,class:"ml-5 mt-2"},tK=Me({__name:"OctoFarmImportDialog",setup(e){const t=H(),n=H(!1),r=H(!1),s=H(""),i=H(""),o=H(),a=H(0),l=H([]),u=H([]),c=H(!1),d=Kt(Yt.ImportOctoFarmDialog);function f(){}async function p(){}const v=async()=>{if(!o.value){n.value=!1;return}const T=JSON.parse(await o.value.text());if(!T||!Array.isArray(T))return[];if(!T?.length)return[];let _=T;T.length===1&&Array.isArray(T[0])&&(_=T[0]),_=_.map(w=>(w._id&&delete w._id,w.apikey&&(w.apiKey=w.apikey,delete w.apikey),w.settingsApperance&&(w.settingsAppearance=w.settingsApperance,delete w.settingsApperance),w.settingsAppearance?.name?(w.name=w.settingsAppearance?.name,delete w.settingsAppearance):w.name=w.printerURL,{enabled:!w.disabled,apiKey:w.apiKey,printerURL:w.printerURL,name:w.name}));let C=!1;const R=[];s.value="",i.value="";for(const w of _){const P=Object.keys(w);P.includes("enabled")&&(w.enabled===!1||w.enabled===!0)&&P.includes("apiKey")&&w.apiKey.length&&P.includes("printerURL")&&w.printerURL.length&&P.includes("name")&&w.name||(R.push(w.name||w.printerURL||"No name known for printer"),C||=!0)}return n.value=!C,C&&(s.value="Imported file failed the validation step",i.value="These printers failed validation: "+R.join(", ")),_},m=async()=>{const T=await v();T?.length&&(u.value=[...Array(T.length)].map((_,C)=>C),l.value=T||[],t.value=2)},y=()=>{u.value.length?u.value=[]:u.value=[...Array(l.value.length)].map((_,C)=>C)},S=async()=>{a.value=(await v())?.length||0},b=async()=>{t.value=3;const T=l.value.filter((_,C)=>u.value.includes(C));if(T?.length)try{await qt.batchImportPrinters(T),c.value=!0}catch(_){c.value=!1,o.value=void 0,s.value="An error occurred",i.value=_.message.toString()}},k=()=>{o.value=void 0,d.closeDialog(),t.value=1};return(T,_)=>{const C=Pn("v-subheader"),R=Pn("v-list-item-content"),w=Pn("v-list-item-group"),P=Js;return F(),ee(P,{id:Q(d).dialogId,"max-width":"700px",onBeforeOpened:_[8]||(_[8]=I=>void 0),onEscape:_[9]||(_[9]=I=>k()),onOpened:_[10]||(_[10]=I=>p())},{default:g(()=>[h(mt,{class:"pa-4"},{default:g(()=>[h(Zt,null,{default:g(()=>[..._[11]||(_[11]=[E("span",{class:"text-h5"}," Import OctoFarm Printers ",-1)])]),_:1}),h(Gt,null,{default:g(()=>[h(Je,null,{default:g(()=>[h(Ve,{cols:"12"},{default:g(()=>[h(tD,{modelValue:Q(t),"onUpdate:modelValue":_[6]||(_[6]=I=>Ye(t)?t.value=I:null),"non-linear":""},{default:g(()=>[h(MS,null,{default:g(()=>[h(vf,{complete:Q(t)>1,value:"1",editable:""},{default:g(()=>[..._[12]||(_[12]=[x(" Export PrintersDB from OctoFarm ",-1)])]),_:1},8,["complete"]),h(vf,{complete:Q(t)>2,value:"2",editable:""},{default:g(()=>[..._[13]||(_[13]=[x(" Show printers & decide ",-1)])]),_:1},8,["complete"]),h(vf,{complete:Q(t)>3,value:"3",editable:""},{default:g(()=>[..._[14]||(_[14]=[x(" Import printers into FDM Monster ",-1)])]),_:1},8,["complete"])]),_:1}),h(JO,null,{default:g(()=>[h(yf,{value:"1"},{default:g(()=>[h(qO,{class:"mt-2",style:{"max-width":"400px"},modelValue:Q(o),"onUpdate:modelValue":_[0]||(_[0]=I=>Ye(o)?o.value=I:null),filled:"",accept:".json",clearable:"",label:"Upload PrintersDB.json file",onChange:_[1]||(_[1]=I=>S())},null,8,["modelValue"]),E("ol",null,[E("li",null,[E("h4",null,[h(Z,null,{default:g(()=>[..._[15]||(_[15]=[x("navigation",-1)])]),_:1}),_[16]||(_[16]=x(" Go to your OctoFarm System page ",-1))])]),E("li",null,[E("h4",null,[h(Z,null,{default:g(()=>[..._[17]||(_[17]=[x("mouse",-1)])]),_:1}),_[18]||(_[18]=x(" Click 'Database' ",-1))])]),E("li",null,[E("h4",null,[h(Z,null,{default:g(()=>[..._[19]||(_[19]=[x("mouse",-1)])]),_:1}),_[20]||(_[20]=x(" Click the button 'Export Printers' ",-1))])]),E("li",null,[E("h4",null,[h(Z,null,{default:g(()=>[..._[21]||(_[21]=[x("upload",-1)])]),_:1}),_[22]||(_[22]=x(" Upload 'PrintersDB.json' above ",-1))])])]),E("div",z9,[h(Z,{class:"pr-2"},{default:g(()=>[..._[23]||(_[23]=[x("info",-1)])]),_:1}),_[25]||(_[25]=x(' OctoFarm printers should be exported as a JSON file. Please upload the correct "PrintersDB.json" database file using the steps provided. ',-1)),h(te,{small:"",class:"ml-2",color:"success",onClick:_[2]||(_[2]=I=>r.value=!Q(r))},{default:g(()=>[h(Z,{class:"pr-2"},{default:g(()=>[..._[24]||(_[24]=[x("gif",-1)])]),_:1}),Q(r)?(F(),ge("span",j9,"Hide GIF")):(F(),ge("span",H9,"Show GIF"))]),_:1})]),Q(r)?(F(),ee(ts,{key:0,class:"my-4",src:Q(T9),style:{border:"3px solid dimgray","max-width":"800px"},elevation:"10"},null,8,["src"])):fe("",!0),_[27]||(_[27]=E("br",null,null,-1)),h(te,{color:"primary",onClick:_[3]||(_[3]=I=>m()),disabled:!Q(o)},{default:g(()=>[..._[26]||(_[26]=[x(" Validate ",-1)])]),_:1},8,["disabled"])]),_:1}),h(yf,{value:"2"},{default:g(()=>[E("div",q9,[h(Z,{class:"pr-2"},{default:g(()=>[..._[28]||(_[28]=[x("info",-1)])]),_:1}),x(" Import state: "+re(Q(n)?"success":"failed")+" - "+re(Q(a))+" printer(s) found ",1)]),Q(s)?(F(),ee(ln,{key:0,class:"my-2",type:"error"},{default:g(()=>[x(re(Q(s))+" ",1),_[29]||(_[29]=E("br",null,null,-1)),x(" Details: "+re(Q(i)?.slice(0,75))+" ",1),Q(i)?.length>75?(F(),ge("span",W9,"...")):fe("",!0)]),_:1})):fe("",!0),h(en,{class:"mt-2"}),h(Dt,{"two-line":"",flat:"",subheader:"",dense:"",class:"mt-2"},{default:g(()=>[h(C,null,{default:g(()=>[..._[30]||(_[30]=[x("Found printers",-1)])]),_:1}),h(w,{modelValue:Q(u),"onUpdate:modelValue":_[4]||(_[4]=I=>Ye(u)?u.value=I:null),multiple:""},{default:g(()=>[(F(!0),ge(Ie,null,Ht(Q(l),I=>(F(),ee(Ne,{dense:"",key:I.name,title:I.name},{default:g(({isActive:A})=>[h(Il,null,{default:g(()=>[h(cn,{"input-value":A},null,8,["input-value"])]),_:2},1024),h(R,null,{default:g(()=>[h(it,null,{default:g(()=>[x(re(I.name),1)]),_:2},1024),h(pt,null,{default:g(()=>[E("span",G9,"URL: "+re(I.printerURL),1),E("span",K9,"Enabled: "+re(I.enabled),1),E("span",Y9,"API Key: "+re(I.apiKey),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["title"]))),128))]),_:1},8,["modelValue"]),h(C,null,{default:g(()=>[h(te,{onClick:y,class:"my-2",small:""},{default:g(()=>[h(Z,{class:"mr-2"},{default:g(()=>[..._[31]||(_[31]=[x("check",-1)])]),_:1}),_[32]||(_[32]=x(" Toggle selection ",-1))]),_:1})]),_:1})]),_:1}),E("div",X9,[h(Z,{class:"pr-2"},{default:g(()=>[..._[33]||(_[33]=[x("info",-1)])]),_:1}),_[34]||(_[34]=x(" At this moment, the following properties will be imported: enabled, name, printerURL and apiKey ",-1))]),h(te,{class:"my-2",color:"primary",onClick:_[5]||(_[5]=I=>b()),disabled:!Q(u)?.length},{default:g(()=>[x(" Submit "+re(Q(u)?.length)+" printers ",1)]),_:1},8,["disabled"])]),_:1}),h(yf,{value:"3"},{default:g(()=>[Q(c)?(F(),ge("div",Q9,[h(Z,{size:"100",class:"mr-5",color:"green circle"},{default:g(()=>[..._[35]||(_[35]=[x("check_circle",-1)])]),_:1}),_[36]||(_[36]=x(" Import Completed ",-1))])):(F(),ge("div",J9,[h(Z,{size:"100",class:"mr-5",color:"red circle"},{default:g(()=>[..._[37]||(_[37]=[x("error",-1)])]),_:1}),x(" Something went wrong: "+re(Q(s))+" ",1),_[38]||(_[38]=E("br",null,null,-1)),E("span",Z9," Details: "+re(Q(i)?.slice(0,75)),1),Q(i)?.length>75?(F(),ge("span",eK,"...")):fe("",!0)]))]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1}),h(te,{class:"mt-2"},{default:g(()=>[..._[39]||(_[39]=[x(" Validate printers ",-1)])]),_:1})]),_:1}),h(An,null,{default:g(()=>[h(yn),h(te,{onClick:_[7]||(_[7]=I=>k())},{default:g(()=>[h(Z,{class:"mr-2"},{default:g(()=>[..._[40]||(_[40]=[x("close",-1)])]),_:1}),_[41]||(_[41]=x(" Close ",-1))]),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}}),nK=oe({id:String,submenu:Boolean,...bn(Hc({captureFocus:!0,closeDelay:250,closeOnContentClick:!0,locationStrategy:"connected",location:void 0,openDelay:300,scrim:!1,scrollStrategy:"reposition",transition:{component:bb}}),["absolute"])},"VMenu"),xp=_e()({name:"VMenu",props:nK(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=tt(e,"modelValue"),{scopeId:s}=ql(),{isRtl:i}=Ir(),o=Pr(),a=ne(()=>e.id||`v-menu-${o}`),l=H(),u=je(xv,null),c=ke(new Set);zt(xv,{register(){c.value.add(o)},unregister(){c.value.delete(o)},closeParents(m){setTimeout(()=>{!c.value.size&&!e.persistent&&(m==null||l.value?.contentEl&&!aN(m,l.value.contentEl))&&(r.value=!1,u?.closeParents())},40)}}),Vn(()=>u?.unregister()),Jy(()=>r.value=!1),we(r,m=>{m?u?.register():u?.unregister()},{immediate:!0});function d(m){u?.closeParents(m)}function f(m){if(!e.disabled)if(m.key==="Tab"||m.key==="Enter"&&!e.closeOnContentClick){if(m.key==="Enter"&&(m.target instanceof HTMLTextAreaElement||m.target instanceof HTMLInputElement&&m.target.closest("form")))return;m.key==="Enter"&&m.preventDefault(),!YT(Qo(l.value?.contentEl,!1),m.shiftKey?"prev":"next",S=>S.tabIndex>=0)&&!e.retainFocus&&(r.value=!1,l.value?.activatorEl?.focus())}else e.submenu&&m.key===(i.value?"ArrowRight":"ArrowLeft")&&(r.value=!1,l.value?.activatorEl?.focus())}function p(m){if(e.disabled)return;const y=l.value?.contentEl;y&&r.value?m.key==="ArrowDown"?(m.preventDefault(),m.stopImmediatePropagation(),Hu(y,"next")):m.key==="ArrowUp"?(m.preventDefault(),m.stopImmediatePropagation(),Hu(y,"prev")):e.submenu&&(m.key===(i.value?"ArrowRight":"ArrowLeft")?r.value=!1:m.key===(i.value?"ArrowLeft":"ArrowRight")&&(m.preventDefault(),Hu(y,"first"))):(e.submenu?m.key===(i.value?"ArrowLeft":"ArrowRight"):["ArrowDown","ArrowUp"].includes(m.key))&&(r.value=!0,m.preventDefault(),setTimeout(()=>setTimeout(()=>p(m))))}const v=O(()=>de({"aria-haspopup":"menu","aria-expanded":String(r.value),"aria-controls":a.value,"aria-owns":a.value,onKeydown:p},e.activatorProps));return Ae(()=>{const m=Ei.filterProps(e);return h(Ei,de({ref:l,id:a.value,class:["v-menu",e.class],style:e.style},m,{modelValue:r.value,"onUpdate:modelValue":y=>r.value=y,absolute:!0,activatorProps:v.value,location:e.location??(e.submenu?"end":"bottom"),"onClick:outside":d,onKeydown:f},s),{activator:n.activator,default:function(){for(var y=arguments.length,S=new Array(y),b=0;b<y;b++)S[b]=arguments[b];return h(Tt,{root:"VMenu"},{default:()=>[n.default?.(...S)]})}})}),us({id:a,ΨopenChildren:c},l)}}),rK=oe({renderless:Boolean,...Ue()},"VVirtualScrollItem"),sK=_e()({name:"VVirtualScrollItem",inheritAttrs:!1,props:rK(),emits:{"update:height":e=>!0},setup(e,t){let{attrs:n,emit:r,slots:s}=t;const{resizeRef:i,contentRect:o}=ao(void 0,"border");we(()=>o.value?.height,a=>{a!=null&&r("update:height",a)}),Ae(()=>e.renderless?E(Ie,null,[s.default?.({itemRef:i})]):E("div",de({ref:i,class:["v-virtual-scroll__item",e.class],style:e.style},n),[s.default?.()]))}}),iK=-1,oK=1,Bm=100,aK=oe({itemHeight:{type:[Number,String],default:null},itemKey:{type:[String,Array,Function],default:null},height:[Number,String]},"virtual");function lK(e,t){const n=Es(),r=ke(0);vn(()=>{r.value=parseFloat(e.itemHeight||0)});const s=ke(0),i=ke(Math.ceil((parseInt(e.height)||n.height.value)/(r.value||16))||1),o=ke(0),a=ke(0),l=H(),u=H();let c=0;const{resizeRef:d,contentRect:f}=ao();vn(()=>{d.value=l.value});const p=O(()=>l.value===document.documentElement?n.height.value:f.value?.height||parseInt(e.height)||0),v=O(()=>!!(l.value&&u.value&&p.value&&r.value));let m=Array.from({length:t.value.length}),y=Array.from({length:t.value.length});const S=ke(0);let b=-1;function k(N){return m[N]||r.value}const T=sN(()=>{const N=performance.now();y[0]=0;const se=t.value.length;for(let z=1;z<=se;z++)y[z]=(y[z-1]||0)+k(z-1);S.value=Math.max(S.value,performance.now()-N)},S),_=we(v,N=>{N&&(_(),c=u.value.offsetTop,T.immediate(),j(),~b&&ot(()=>{kt&&window.requestAnimationFrame(()=>{B(b),b=-1})}))});Qt(()=>{T.clear()});function C(N,se){const z=m[N],U=r.value;r.value=U?Math.min(r.value,se):se,(z!==se||U!==r.value)&&(m[N]=se,T())}function R(N){N=In(N,0,t.value.length);const se=Math.floor(N),z=N%1,U=se+1,le=y[se]||0,J=y[U]||le;return le+(J-le)*z}function w(N){return uK(y,N)}let P=0,I=0,A=0;we(p,(N,se)=>{j(),N<se&&requestAnimationFrame(()=>{I=0,j()})});let $=-1;function K(){if(!l.value||!u.value)return;const N=l.value.scrollTop,se=performance.now();se-A>500?(I=Math.sign(N-P),c=u.value.offsetTop):I=N-P,P=N,A=se,window.clearTimeout($),$=window.setTimeout(M,500),j()}function M(){!l.value||!u.value||(I=0,A=0,window.clearTimeout($),j())}let L=-1;function j(){cancelAnimationFrame(L),L=requestAnimationFrame(G)}function G(){if(!l.value||!p.value||!r.value)return;const N=P-c,se=Math.sign(I),z=Math.max(0,N-Bm),U=In(w(z),0,t.value.length),le=N+p.value+Bm,J=In(w(le)+1,U+1,t.value.length);if((se!==iK||U<s.value)&&(se!==oK||J>i.value)){const be=R(s.value)-R(U),W=R(J)-R(i.value);Math.max(be,W)>Bm?(s.value=U,i.value=J):(U<=0&&(s.value=U),J>=t.value.length&&(i.value=J))}o.value=R(s.value),a.value=R(t.value.length)-R(i.value)}function B(N){const se=R(N);!l.value||N&&!se?b=N:l.value.scrollTop=se}const q=O(()=>t.value.slice(s.value,i.value).map((N,se)=>{const z=se+s.value;return{raw:N,index:z,key:kn(N,e.itemKey,z)}}));return we(t,()=>{m=Array.from({length:t.value.length}),y=Array.from({length:t.value.length}),T.immediate(),j()},{deep:1}),{calculateVisibleItems:j,containerRef:l,markerRef:u,computedItems:q,paddingTop:o,paddingBottom:a,scrollToIndex:B,handleScroll:K,handleScrollend:M,handleItemResize:C}}function uK(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 cK=oe({items:{type:Array,default:()=>[]},renderless:Boolean,...aK(),...Ue(),...cr()},"VVirtualScroll"),dK=_e()({name:"VVirtualScroll",props:cK(),setup(e,t){let{slots:n}=t;const r=nn("VVirtualScroll"),{dimensionStyles:s}=dr(e),{calculateVisibleItems:i,containerRef:o,markerRef:a,handleScroll:l,handleScrollend:u,handleItemResize:c,scrollToIndex:d,paddingTop:f,paddingBottom:p,computedItems:v}=lK(e,ne(()=>e.items));return kr(()=>e.renderless,()=>{function m(){const S=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)?"addEventListener":"removeEventListener";o.value===document.documentElement?(document[S]("scroll",l,{passive:!0}),document[S]("scrollend",u)):(o.value?.[S]("scroll",l,{passive:!0}),o.value?.[S]("scrollend",u))}gt(()=>{o.value=mb(r.vnode.el,!0),m(!0)}),Qt(m)}),Ae(()=>{const m=v.value.map(y=>h(sK,{key:y.key,renderless:e.renderless,"onUpdate:height":S=>c(y.index,S)},{default:S=>n.default?.({item:y.raw,index:y.index,...S})}));return e.renderless?E(Ie,null,[E("div",{ref:a,class:"v-virtual-scroll__spacer",style:{paddingTop:Oe(f.value)}},null),m,E("div",{class:"v-virtual-scroll__spacer",style:{paddingBottom:Oe(p.value)}},null)]):E("div",{ref:o,class:Pe(["v-virtual-scroll",e.class]),onScrollPassive:l,onScrollend:u,style:De([s.value,e.style])},[E("div",{ref:a,class:"v-virtual-scroll__container",style:{paddingTop:Oe(f.value),paddingBottom:Oe(p.value)}},[m])])}),{calculateVisibleItems:i,scrollToIndex:d}}});function fK(e,t){const n=ke(!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=we(n,()=>{l(),a()})}else a()})}async function o(a){if(a.key==="Tab"&&t.value?.focus(),!["PageDown","PageUp","Home","End"].includes(a.key))return;const l=e.value?.$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 c=l.getBoundingClientRect().top;for(const d of u)if(d.getBoundingClientRect().top>=c){d.focus();break}}else{const c=l.getBoundingClientRect().bottom;for(const d of[...u].reverse())if(d.getBoundingClientRect().bottom<=c){d.focus();break}}}return{onScrollPassive:s,onKeydown:o}}const hK=oe({closeText:{type:String,default:"$vuetify.close"},openText:{type:String,default:"$vuetify.open"}},"autocomplete");function pK(e,t){const n=Pr(),r=O(()=>`menu-${n}`),s=ne(()=>Ut(t)),i=ne(()=>r.value);return{menuId:r,ariaExpanded:s,ariaControls:i}}const mK=oe({chips:Boolean,closableChips:Boolean,eager:Boolean,hideNoData:Boolean,hideSelected:Boolean,listProps:{type:Object},menu:Boolean,menuIcon:{type:$e,default:"$dropdown"},menuProps:{type:Object},multiple:Boolean,noDataText:{type:String,default:"$vuetify.noDataText"},openOnClear:Boolean,itemColor:String,noAutoScroll:Boolean,...hK(),...wO({itemChildren:!1})},"Select"),gK=oe({...mK(),...bn(VO({modelValue:null,role:"combobox"}),["validationValue","dirty"]),...Wl({transition:{component:bb}})},"VSelect"),ho=_e()({name:"VSelect",props:gK(),emits:{"update:focused":e=>!0,"update:modelValue":e=>!0,"update:menu":e=>!0},setup(e,t){let{slots:n}=t;const{t:r}=Br(),s=H(),i=H(),o=H(),{items:a,transformIn:l,transformOut:u}=TG(e),c=tt(e,"modelValue",[],J=>l(J===null?[null]:En(J)),J=>{const be=u(J);return e.multiple?be:be[0]??null}),d=O(()=>typeof e.counterValue=="function"?e.counterValue(c.value):typeof e.counterValue=="number"?e.counterValue:c.value.length),f=NO(e),p=AS(e),v=O(()=>c.value.map(J=>J.value)),m=ke(!1),y=ne(()=>e.closableChips&&!f.isReadonly.value&&!f.isDisabled.value),{InputIcon:S}=IS(e);let b="",k=0,T;const _=O(()=>e.hideSelected?a.value.filter(J=>!c.value.some(be=>(e.valueComparator||_r)(be,J))):a.value),C=O(()=>e.hideNoData&&!_.value.length||f.isReadonly.value||f.isDisabled.value),R=tt(e,"menu"),w=O({get:()=>R.value,set:J=>{R.value&&!J&&i.value?.ΨopenChildren.size||J&&C.value||(R.value=J)}}),{menuId:P,ariaExpanded:I,ariaControls:A}=pK(e,w),$=O(()=>({...e.menuProps,activatorProps:{...e.menuProps?.activatorProps||{},"aria-haspopup":"listbox"}})),K=H(),M=fK(K,s);function L(J){e.openOnClear&&(w.value=!0)}function j(){C.value||(w.value=!w.value)}function G(J){_w(J)&&B(J)}function B(J){if(!J.key||f.isReadonly.value)return;if(["Enter"," ","ArrowDown","ArrowUp","Home","End"].includes(J.key)&&J.preventDefault(),["Enter","ArrowDown"," "].includes(J.key)&&(w.value=!0),["Escape","Tab"].includes(J.key)&&(w.value=!1),e.clearable&&J.key==="Backspace"){J.preventDefault(),c.value=[],L();return}J.key==="Home"?K.value?.focus("first"):J.key==="End"&&K.value?.focus("last");const be=1e3;if(!_w(J))return;const W=performance.now();W-T>be&&(b="",k=0),b+=J.key.toLowerCase(),T=W;const pe=_.value;function ue(){let X=Y();return X||b.at(-1)===b.at(-2)&&(b=b.slice(0,-1),k++,X=Y(),X)||(k=0,X=Y(),X)?X:(b=J.key.toLowerCase(),Y())}function Y(){for(let X=k;X<pe.length;X++){const ce=pe[X];if(ce.title.toLowerCase().startsWith(b))return[ce,X]}}const Le=ue();if(!Le)return;const[D,V]=Le;k=V,K.value?.focus(V),e.multiple||(c.value=[D])}function q(J){let be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!J.props.disabled)if(e.multiple){const W=c.value.findIndex(ue=>(e.valueComparator||_r)(ue.value,J.value)),pe=be??!~W;if(~W){const ue=pe?[...c.value,J]:[...c.value];ue.splice(W,1),c.value=ue}else pe&&(c.value=[...c.value,J])}else{const W=be!==!1;c.value=W?[J]:[],ot(()=>{w.value=!1})}}function N(J){K.value?.$el.contains(J.relatedTarget)||(w.value=!1)}function se(){e.eager&&o.value?.calculateVisibleItems()}function z(){m.value&&s.value?.focus()}function U(J){m.value=!0}function le(J){if(J==null)c.value=[];else if(Bf(s.value,":autofill")||Bf(s.value,":-webkit-autofill")){const be=a.value.find(W=>W.title===J);be&&q(be)}else s.value&&(s.value.value="")}return we(w,()=>{if(!e.hideSelected&&w.value&&c.value.length){const J=_.value.findIndex(be=>c.value.some(W=>(e.valueComparator||_r)(W.value,be.value)));kt&&!e.noAutoScroll&&window.requestAnimationFrame(()=>{J>=0&&o.value?.scrollToIndex(J)})}}),we(a,(J,be)=>{w.value||m.value&&e.hideNoData&&!be.length&&J.length&&(w.value=!0)}),Ae(()=>{const J=!!(e.chips||n.chip),be=!!(!e.hideNoData||_.value.length||n["prepend-item"]||n["append-item"]||n["no-data"]),W=c.value.length>0,pe=et.filterProps(e),ue=W||!m.value&&e.label&&!e.persistentPlaceholder?void 0:e.placeholder;return h(et,de({ref:s},pe,{modelValue:c.value.map(Y=>Y.props.title).join(", "),name:void 0,"onUpdate:modelValue":le,focused:m.value,"onUpdate:focused":Y=>m.value=Y,validationValue:c.externalValue,counterValue:d.value,dirty:W,class:["v-select",{"v-select--active-menu":w.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:ue,"onClick:clear":L,"onMousedown:control":j,onBlur:N,onKeydown:B,"aria-expanded":I.value,"aria-controls":A.value}),{...n,default:Y=>{let{id:Le}=Y;return E(Ie,null,[E("select",{hidden:!0,multiple:e.multiple,name:p.fieldName.value},[a.value.map(D=>E("option",{key:D.value,value:D.value,selected:v.value.includes(D.value)},null))]),h(xp,de({id:P.value,ref:i,modelValue:w.value,"onUpdate:modelValue":D=>w.value=D,activator:"parent",contentClass:"v-select__content",disabled:C.value,eager:e.eager,maxHeight:310,openOnClick:!1,closeOnContentClick:!1,transition:e.transition,onAfterEnter:se,onAfterLeave:z},$.value),{default:()=>[be&&h(Dt,de({ref:K,selected:v.value,selectStrategy:e.multiple?"independent":"single-independent",onMousedown:D=>D.preventDefault(),onKeydown:G,onFocusin:U,tabindex:"-1",selectable:!0,"aria-live":"polite","aria-labelledby":`${Le.value}-label`,"aria-multiselectable":e.multiple,color:e.itemColor??e.color},M,e.listProps),{default:()=>[n["prepend-item"]?.(),!_.value.length&&!e.hideNoData&&(n["no-data"]?.()??h(Ne,{key:"no-data",title:r(e.noDataText)},null)),h(dK,{ref:o,renderless:!0,items:_.value,itemKey:"value"},{default:D=>{let{item:V,index:X,itemRef:ce}=D;const ve=lN(V.props),he=de(V.props,{ref:ce,key:V.value,onClick:()=>q(V,null),"aria-posinset":X+1,"aria-setsize":_.value.length});return V.type==="divider"?n.divider?.({props:V.raw,index:X})??h(en,de(V.props,{key:`divider-${X}`}),null):V.type==="subheader"?n.subheader?.({props:V.raw,index:X})??h(Cr,de(V.props,{key:`subheader-${X}`}),null):n.item?.({item:V,index:X,props:he})??h(Ne,de(he,{role:"option"}),{prepend:Se=>{let{isSelected:Ee}=Se;return E(Ie,null,[e.multiple&&!e.hideSelected?h(ya,{key:V.value,modelValue:Ee,ripple:!1,tabindex:"-1","aria-hidden":!0,onClick:me=>me.preventDefault()},null):void 0,ve.prependAvatar&&h(st,{image:ve.prependAvatar},null),ve.prependIcon&&h(Z,{icon:ve.prependIcon},null)])}})}}),n["append-item"]?.()]})]}),c.value.map((D,V)=>{function X(Se){Se.stopPropagation(),Se.preventDefault(),q(D,!1)}const ce=de(mn.filterProps(D.props),{"onClick:close":X,onKeydown(Se){Se.key!=="Enter"&&Se.key!==" "||(Se.preventDefault(),Se.stopPropagation(),X(Se))},onMousedown(Se){Se.preventDefault(),Se.stopPropagation()},modelValue:!0,"onUpdate:modelValue":void 0}),ve=J?!!n.chip:!!n.selection,he=ve?XT(J?n.chip({item:D,index:V,props:ce}):n.selection({item:D,index:V})):void 0;if(!(ve&&!he))return E("div",{key:D.value,class:"v-select__selection"},[J?n.chip?h(Tt,{key:"chip-defaults",defaults:{VChip:{closable:y.value,size:"small",text:D.title}}},{default:()=>[he]}):h(mn,de({key:"chip",closable:y.value,size:"small",text:D.title,disabled:D.props.disabled},ce),null):he??E("span",{class:"v-select__selection-text"},[D.title,e.multiple&&V<c.value.length-1&&E("span",{class:"v-select__selection-comma"},[x(",")])])])})])},"append-inner":function(){for(var Y=arguments.length,Le=new Array(Y),D=0;D<Y;D++)Le[D]=arguments[D];return E(Ie,null,[n["append-inner"]?.(...Le),e.menuIcon?h(Z,{class:"v-select__menu-icon",color:s.value?.fieldIconColor,icon:e.menuIcon,"aria-hidden":!0},null):void 0,e.appendInnerIcon&&h(S,{key:"append-icon",name:"appendInner",color:Le[0].iconColor.value},null)])}})}),us({isFocused:m,menu:w,select:q},s)}}),vK={class:"text-h5"},yK=Me({__name:"PrinterMaintenanceDialog",setup(e){const t=H([]),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=H({}),s=Vt(),i=Kt(Yt.PrinterMaintenanceDialog),o=O(()=>s.maintenanceDialogPrinter),a=()=>{r.value.disabledReason=t.value.join(", ")},l=async()=>{const c=o.value?.id;if(!c){r.value={},u();return}const d=r.value.disabledReason;await qt.updatePrinterMaintenance(c,d),r.value={},u()},u=()=>{t.value=[],i.closeDialog(),s.setMaintenanceDialogPrinter()};return(c,d)=>{const f=Js;return F(),ee(f,{id:Q(i).dialogId,"max-width":"700px",onEscape:d[5]||(d[5]=p=>u())},{default:g(()=>[h(mt,{class:"pa-4"},{default:g(()=>[h(Zt,null,{default:g(()=>[E("span",vK," Mark '"+re(o.value?.name)+"' for maintenance ",1)]),_:1}),h(ln,{color:"secondary"},{default:g(()=>[...d[6]||(d[6]=[x(" Keep this info clear and stick to convention ",-1)])]),_:1}),h(Gt,null,{default:g(()=>[h(Je,null,{default:g(()=>[h(Ve,{cols:"12"},{default:g(()=>[h(ho,{modelValue:t.value,"onUpdate:modelValue":[d[0]||(d[0]=p=>t.value=p),d[1]||(d[1]=p=>a())],chips:!0,items:n,"menu-props":{closeOnBack:!0,closeOnContentClick:!0},clearable:"",color:"primary",multiple:"",placeholder:"Quick select reason"},null,8,["modelValue"]),h(GO,{modelValue:r.value.disabledReason,"onUpdate:modelValue":d[2]||(d[2]=p=>r.value.disabledReason=p),"data-vv-validate-on":"change|blur"},{label:g(()=>[...d[7]||(d[7]=[E("div",null,"Type the reason*",-1)])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),h(An,null,{default:g(()=>[d[10]||(d[10]=E("em",{class:"text-red"}," * indicates required field ",-1)),h(yn),h(te,{variant:"text",onClick:d[3]||(d[3]=p=>u())},{default:g(()=>[...d[8]||(d[8]=[x(" Close ",-1)])]),_:1}),h(te,{color:"blue-darken-1",variant:"text",onClick:d[4]||(d[4]=p=>l())},{default:g(()=>[...d[9]||(d[9]=[x(" Save ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}}),bK=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],SK=[1,2,3,4,5,6,7,8,9,10,11,12],nD=Me({__name:"GridSettingsList",setup(e){const t=Ts(),n=Rt(),r=O(()=>t.largeTiles),s=O(()=>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)=>(F(),ge("div",null,[h(Gt,null,{default:g(()=>[h(Dt,{subheader:"",lines:"three"},{default:g(()=>[h(Cr,null,{default:g(()=>[...c[2]||(c[2]=[x(" Grid Rows and Columns ",-1)])]),_:1}),Q(t).settings?.frontend?(F(),ee(Ne,{key:0},{default:g(()=>[h(Je,null,{default:g(()=>[h(Ve,{cols:"3"},{default:g(()=>[h(ho,{type:"number","onUpdate:modelValue":o,value:Q(t).settings.frontend.gridRows,items:Q(bK),label:"Set the grid rows"},null,8,["value","items"])]),_:1}),h(Ve,{cols:"3"},{default:g(()=>[h(ho,{type:"number","onUpdate:modelValue":i,value:Q(t).settings.frontend.gridCols,items:Q(SK),label:"Set the grid columns"},null,8,["value","items"])]),_:1})]),_:1})]),_:1})):fe("",!0)]),_:1}),h(en),h(Dt,{subheader:"",lines:"three"},{default:g(()=>[h(Cr,null,{default:g(()=>[...c[3]||(c[3]=[x(" Large or Compact Tiles ",-1)])]),_:1}),h(Ne,null,{default:g(()=>[Q(t).settings?.frontend?(F(),ee(Je,{key:0},{default:g(()=>[h(Ve,{cols:"5"},{default:g(()=>[h(cn,{onChange:a,modelValue:Q(t).settings.frontend.largeTiles,"onUpdate:modelValue":c[0]||(c[0]=d=>Q(t).settings.frontend.largeTiles=d),label:"Large tiles"},null,8,["modelValue"])]),_:1})]),_:1})):fe("",!0)]),_:1})]),_:1}),h(en),h(Dt,{subheader:"","three-line":""},{default:g(()=>[h(Cr,null,{default:g(()=>[...c[4]||(c[4]=[x("Large or Compact Tiles",-1)])]),_:1}),h(Ne,null,{default:g(()=>[Q(t).settings?.frontend?(F(),ee(Je,{key:0},{default:g(()=>[h(Ve,{cols:"5"},{default:g(()=>[h(cn,{onChange:a,modelValue:Q(t).settings.frontend.tilePreferCancelOverQuickStop,"onUpdate:modelValue":c[1]||(c[1]=d=>Q(t).settings.frontend.tilePreferCancelOverQuickStop=d),label:"Print tile - show cancel instead of quick stop"},null,8,["modelValue"])]),_:1})]),_:1})):fe("",!0)]),_:1})]),_:1})]),_:1})]))}}),wK={class:"text-h5"},_K=Me({__name:"GridSettingsDialog",setup(e){const t=Kt(Yt.GridSettingsDialog);function n(){t.closeDialog(t.context())}return(r,s)=>{const i=Js;return F(),ee(i,{id:Q(t).dialogId,"max-width":"1000px",onEscape:s[1]||(s[1]=o=>n())},{default:g(()=>[h(mt,{class:"pa-4"},{default:g(()=>[h(Zt,null,{default:g(()=>[E("span",wK,[s[4]||(s[4]=x(" Grid Settings ",-1)),h(Ze,{top:""},{activator:g(({props:o})=>[h(te,de(o,{class:"ma-2",fab:"","x-small":""}),{default:g(()=>[h(Z,null,{default:g(()=>[...s[2]||(s[2]=[x("question_mark",-1)])]),_:1})]),_:1},16)]),default:g(()=>[...s[3]||(s[3]=[x(" Change your grid rows, columns and tile settings. ",-1)])]),_:1})])]),_:1}),h(nD),h(An,null,{default:g(()=>[h(yn),h(te,{onClick:s[0]||(s[0]=o=>Q(t).closeDialog())},{default:g(()=>[...s[5]||(s[5]=[x("Close",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}});class qr extends fr{static async createUser(t){const n=ae.userRoute;return await this.post(n,t)}static async listUsers(){const t=ae.userRoute;return await this.get(t)}static async listRoles(){const t=ae.rolesRoute;return await this.get(t)}static async getProfile(){const t=ae.userProfileRoute;return await this.get(t)}static async changePassword(t,n,r){const s=ae.userChangePasswordRoute(t);return await this.post(s,{oldPassword:n,newPassword:r})}static async changeUsername(t,n){const r=ae.userChangeUsernameRoute(t);return await this.post(r,{username:n})}static async deleteUser(t){const n=ae.userDeleteRoute(t);return await this.delete(n)}static async setUserVerified(t,n){const r=ae.userSetVerifiedRoute(t);return await this.post(r,{isVerified:n})}static async setRootUser(t,n){const r=ae.userSetRootUserRoute(t);return await this.post(r,{isRootUser:n})}static async setUserRoles(t,n){const r=ae.userSetUserRolesRoute(t);return await this.post(r,{roleIds:n})}}const kK={class:"text-h5"},xK={class:"pl-5"},EK=Me({__name:"CreateUserDialog",setup(e){const t=Kt(Yt.CreateUserDialog),n=je("appConstants"),r=Rt(),s=H({username:"",password:"",roleIds:[]}),i=H(""),o=H([]),a=O(()=>s.value?.username?.length?yp(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 qr.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 gt(async()=>{try{o.value=await qr.listRoles()}catch(f){r.openErrorMessage({title:"Failed to load roles",subtitle:f instanceof Error?f.message:"Unknown error"})}}),(f,p)=>{const v=Js;return F(),ee(v,{id:Q(t).dialogId,"max-width":"700px",onEscape:d},{default:g(()=>[h(mt,{class:"pa-4"},{default:g(()=>[h(Zt,null,{default:g(()=>[E("span",kK,[h(st,{color:"primary",size:"56"},{default:g(()=>[x(re(a.value),1)]),_:1}),E("span",xK,[p[6]||(p[6]=x("New verified User ",-1)),h(Ze,{top:""},{activator:g(({props:m})=>[h(te,de({class:"ma-2",fab:""},m,{"x-small":""}),{default:g(()=>[h(Z,null,{default:g(()=>[...p[4]||(p[4]=[x("question_mark",-1)])]),_:1})]),_:1},16)]),default:g(()=>[...p[5]||(p[5]=[x(" The user will be set to verified and assigned roles. Please share the username and password with them manually. ",-1)])]),_:1})])])]),_:1}),h(Gt,null,{default:g(()=>[h(Je,null,{default:g(()=>[h(Ve,{cols:12},{default:g(()=>[h(Bn,null,{default:g(()=>[h(Je,null,{default:g(()=>[h(Ve,{cols:"12",md:"6"},{default:g(()=>[h(et,{modelValue:s.value.username,"onUpdate:modelValue":p[0]||(p[0]=m=>s.value.username=m),rules:[l.required,l.minLength],autofocus:"",label:"Username*","prepend-icon":"person",required:""},null,8,["modelValue","rules"]),h(et,{modelValue:s.value.password,"onUpdate:modelValue":p[1]||(p[1]=m=>s.value.password=m),rules:[l.required,l.password],label:"Password*","prepend-icon":"lock",required:"",type:"password"},null,8,["modelValue","rules"]),h(et,{modelValue:i.value,"onUpdate:modelValue":p[2]||(p[2]=m=>i.value=m),rules:[l.required,l.passwordMatch],label:"Confirm Password*","prepend-icon":"lock",required:"",type:"password"},null,8,["modelValue","rules"]),h(ho,{modelValue:s.value.roleIds,"onUpdate:modelValue":p[3]||(p[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}),h(An,null,{default:g(()=>[p[9]||(p[9]=E("em",{class:"text-red"}," * indicates required field ",-1)),h(yn),h(te,{variant:"text",onClick:d},{default:g(()=>[...p[7]||(p[7]=[x("Close",-1)])]),_:1}),h(te,{color:"blue-darken-1",variant:"text",onClick:c},{default:g(()=>[...p[8]||(p[8]=[x("Create",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}}),rD=()=>({id:void 0,name:su(),floor:"1",printers:[]});class Wr extends fr{static convertPrinterFloorToCreateForm(t){const n=rD();return n.id=t?.id,n.name=t?.name||su(),n.printers=[],n.floor=(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=`${ae.floorRoute}/`;return await this.get(t)}static async createFloor(t){const n=`${ae.floorRoute}/`;return await this.post(n,t)}static async updateFloorName(t,n){const r=`${ae.updatePrinterFloorNameRoute(t)}/`;return await this.patch(r,{name:n})}static async updateFloorNumber(t,n){const r=`${ae.updatePrinterFloorNumberRoute(t)}/`;return await this.patch(r,{floor:n})}static async deleteFloor(t){const n=`${ae.getFloorRoute(t)}/`;return await this.delete(n)}static async addPrinterToFloor(t,n){const r=`${ae.addOrRemovePrinterFromFloorRoute(t)}/`;return await this.post(r,n)}static async deletePrinterFromFloor(t,n){const r=`${ae.addOrRemovePrinterFromFloorRoute(t)}/`;return await this.delete(r,{printerId:n})}}const Li=is("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 Vt().printers.filter(n=>!e.floors.find(r=>r.printers.find(s=>s.printerId===n.id)))},gridSortedPrinters(){const e=Ts(),t=e.gridCols,n=e.gridRows,s=Vt().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 Wr.getFloors();return this.saveFloors(e),e},async createFloor(e){const t=await Wr.createFloor(e);return this.floors.push(t),t},saveFloors(e){if(!e?.length)return;this.floors=e.sort((r,s)=>r.floor-s.floor);const t=this.selectedFloor?.id,n=this.floors.findIndex(r=>r.id===t);this.selectedFloorIndex=n===-1?0:n},async deleteFloor(e){await Wr.deleteFloor(e),this._popPrinterFloor(e)},async updateFloorName({floorId:e,name:t}){const n=await Wr.updateFloorName(e,t);return this._replaceFloor(n),n},async updateFloorNumber({floorId:e,floorNumber:t}){const n=await Wr.updateFloorNumber(e,t);return this._replaceFloor(n),n},async addPrinterToFloor({floorId:e,printerId:t,x:n,y:r}){const s=await Wr.addPrinterToFloor(e,{printerId:t,x:n,y:r});this._replaceFloor(s)},async changeSelectedFloorByIndex(e){if(!this.floors?.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 Wr.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)}}}),CK={class:"text-h5"},TK=Me({__name:"AddOrUpdateFloorDialog",setup(e){const t=Kt(Yt.AddOrUpdateFloorDialog),n=Li(),r=je("appConstants"),s=Rt(),i=H(rD()),o=O(()=>t.context()?.printerFloorId),a=O(()=>i.value?yp(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=Wr.convertCreateFormToFloor(i.value);await n.createFloor(d),s.openInfoMessage({title:`Floor ${d.name} created`}),i.value.name=su();const f=Math.max(...n.floors.map(p=>p.floor))+1;i.value.floor=f.toString(),c()},c=()=>{t.closeDialog()};return we(o,d=>{if(d){const f=n.floor(d);i.value=Wr.convertPrinterFloorToCreateForm(f)}}),gt(()=>{if(o.value){const d=n.floor(o.value);i.value=Wr.convertPrinterFloorToCreateForm(d)}else if(n.floors?.length){const d=Math.max(...n.floors.map(f=>f.floor))+1;i.value.floor=d.toString()}}),(d,f)=>{const p=Js;return F(),ee(p,{id:Q(t).dialogId,"max-width":"700px",onEscape:c},{default:g(()=>[h(mt,null,{default:g(()=>[h(Zt,null,{default:g(()=>[E("span",CK,[h(st,{color:"primary",size:"56"},{default:g(()=>[x(re(a.value),1)]),_:1}),f[2]||(f[2]=x(" New Floor ",-1))])]),_:1}),h(Gt,null,{default:g(()=>[h(Je,null,{default:g(()=>[h(Ve,{cols:12},{default:g(()=>[h(Bn,null,{default:g(()=>[h(Je,null,{default:g(()=>[i.value?(F(),ee(Ve,{key:0,cols:"12",md:"6"},{default:g(()=>[h(et,{modelValue:i.value.name,"onUpdate:modelValue":f[0]||(f[0]=v=>i.value.name=v),autofocus:"",label:"Floor name*",required:""},null,8,["modelValue"]),h(et,{modelValue:i.value.floor,"onUpdate:modelValue":f[1]||(f[1]=v=>i.value.floor=v),label:"Floor number",required:"",type:"number"},null,8,["modelValue"])]),_:1})):fe("",!0)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),h(An,null,{default:g(()=>[f[5]||(f[5]=E("em",{class:"text-red"}," * indicates required field ",-1)),h(yn),h(te,{variant:"text",onClick:c},{default:g(()=>[...f[3]||(f[3]=[x("Close",-1)])]),_:1}),h(te,{color:"blue-darken-1",variant:"text",onClick:u},{default:g(()=>[...f[4]||(f[4]=[x("Create",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}});class vh extends fr{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 ou=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(){}},RK={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},PK=class{#e=RK;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},qo=new PK;function IK(e){setTimeout(e,0)}var ba=typeof window>"u"||"Deno"in globalThis;function jr(){}function AK(e,t){return typeof e=="function"?e(t):e}function py(e){return typeof e=="number"&&e>=0&&e!==1/0}function sD(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Zi(e,t){return typeof e=="function"?e(t):e}function Gr(e,t){return typeof e=="function"?e(t):e}function yk(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==LS(o,t.options))return!1}else if(!Cc(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 bk(e,t){const{exact:n,status:r,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Sa(t.options.mutationKey)!==Sa(i))return!1}else if(!Cc(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function LS(e,t){return(t?.queryKeyHashFn||Sa)(e)}function Sa(e){return JSON.stringify(e,(t,n)=>my(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function Cc(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Cc(e[n],t[n])):!1}var OK=Object.prototype.hasOwnProperty;function iD(e,t){if(e===t)return e;const n=Sk(e)&&Sk(t);if(!n&&!(my(e)&&my(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:OK.call(e,c))&&l++;continue}if(d===null||f===null||typeof d!="object"||typeof f!="object"){a[c]=f;continue}const p=iD(d,f);a[c]=p,p===d&&l++}return s===o&&l===s?e:a}function yh(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 Sk(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function my(e){if(!wk(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!wk(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function wk(e){return Object.prototype.toString.call(e)==="[object Object]"}function DK(e){return new Promise(t=>{qo.setTimeout(t,e)})}function gy(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?iD(e,t):t}function MK(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function LK(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var FS=Symbol();function oD(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===FS?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function vy(e,t){return typeof e=="function"?e(...t):!!e}var FK=class extends ou{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!ba&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},NS=new FK;function yy(){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 NK=IK;function $K(){let e=[],t=0,n=a=>{a()},r=a=>{a()},s=NK;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 Mn=$K(),BK=class extends ou{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!ba&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},bh=new BK;function VK(e){return Math.min(1e3*2**e,3e4)}function aD(e){return(e??"online")==="online"?bh.isOnline():!0}var by=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function lD(e){let t=!1,n=0,r;const s=yy(),i=()=>s.status!=="pending",o=m=>{if(!i()){const y=new by(m);f(y),e.onCancel?.(y)}},a=()=>{t=!0},l=()=>{t=!1},u=()=>NS.isFocused()&&(e.networkMode==="always"||bh.isOnline())&&e.canRun(),c=()=>aD(e.networkMode)&&e.canRun(),d=m=>{i()||(r?.(),s.resolve(m))},f=m=>{i()||(r?.(),s.reject(m))},p=()=>new Promise(m=>{r=y=>{(i()||u())&&m(y)},e.onPause?.()}).then(()=>{r=void 0,i()||e.onContinue?.()}),v=()=>{if(i())return;let m;const y=n===0?e.initialPromise:void 0;try{m=y??e.fn()}catch(S){m=Promise.reject(S)}Promise.resolve(m).then(d).catch(S=>{if(i())return;const b=e.retry??(ba?0:3),k=e.retryDelay??VK,T=typeof k=="function"?k(n,S):k,_=b===!0||typeof b=="number"&&n<b||typeof b=="function"&&b(n,S);if(t||!_){f(S);return}n++,e.onFail?.(n,S),DK(T).then(()=>u()?void 0:p()).then(()=>{t?f(S):v()})})};return{promise:s,status:()=>s.status,cancel:o,continue:()=>(r?.(),s),cancelRetry:a,continueRetry:l,canStart:c,start:()=>(c()?v():p().then(v),s)}}var uD=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),py(this.gcTime)&&(this.#e=qo.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ba?1/0:300*1e3))}clearGcTimeout(){this.#e&&(qo.clearTimeout(this.#e),this.#e=void 0)}},UK=class extends uD{#e;#t;#n;#s;#r;#o;#a;constructor(e){super(),this.#a=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#s=e.client,this.#n=this.#s.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=kk(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#o,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=kk(this.options);t.data!==void 0&&(this.setState(_k(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=gy(this.state.data,e,this.options);return this.#i({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#i({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(jr).catch(jr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Gr(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===FS||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Zi(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!sD(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#a?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const a=this.observers.find(l=>l.options.queryFn);a&&this.setOptions(a.options)}const n=new AbortController,r=a=>{Object.defineProperty(a,"signal",{enumerable:!0,get:()=>(this.#a=!0,n.signal)})},s=()=>{const a=oD(this.options,t),u=(()=>{const c={client:this.#s,queryKey:this.queryKey,meta:this.meta};return r(c),c})();return this.#a=!1,this.options.persister?this.options.persister(a,u,this):a(u)},o=(()=>{const a={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:s};return r(a),a})();this.options.behavior?.onFetch(o,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#i({type:"fetch",meta:o.fetchOptions?.meta}),this.#r=lD({initialPromise:t?.initialPromise,fn:o.fetchFn,onCancel:a=>{a instanceof by&&a.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(a,l)=>{this.#i({type:"failed",failureCount:a,error:l})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0});try{const a=await this.#r.start();if(a===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(a),this.#n.config.onSuccess?.(a,this),this.#n.config.onSettled?.(a,this.state.error,this),a}catch(a){if(a instanceof by){if(a.silent)return this.#r.promise;if(a.revert){if(this.state.data===void 0)throw a;return this.state.data}}throw this.#i({type:"error",error:a}),this.#n.config.onError?.(a,this),this.#n.config.onSettled?.(this.state.data,a,this),a}finally{this.scheduleGc()}}#i(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...cD(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,..._k(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?r:void 0,r;case"error":const s=e.error;return{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Mn.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function cD(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:aD(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function _k(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function kk(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 zK=class extends ou{constructor(e,t){super(),this.options=t,this.#e=e,this.#i=null,this.#a=yy(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#s=void 0;#r;#o;#a;#i;#m;#f;#h;#u;#c;#l;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),xk(this.#t,this.options)?this.#d():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Sy(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Sy(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#S(),this.#w(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Gr(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#_(),this.#t.setOptions(this.options),t._defaulted&&!yh(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&Ek(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),r&&(this.#t!==n||Gr(this.options.enabled,this.#t)!==Gr(t.enabled,this.#t)||Zi(this.options.staleTime,this.#t)!==Zi(t.staleTime,this.#t))&&this.#g();const s=this.#v();r&&(this.#t!==n||Gr(this.options.enabled,this.#t)!==Gr(t.enabled,this.#t)||s!==this.#l)&&this.#y(s)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return jK(this,n)&&(this.#s=n,this.#o=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#s}trackResult(e,t){return new Proxy(e,{get:(n,r)=>(this.trackProp(r),t?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,r))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#s))}#d(e){this.#_();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(jr)),t}#g(){this.#S();const e=Zi(this.options.staleTime,this.#t);if(ba||this.#s.isStale||!py(e))return;const n=sD(this.#s.dataUpdatedAt,e)+1;this.#u=qo.setTimeout(()=>{this.#s.isStale||this.updateResult()},n)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#w(),this.#l=e,!(ba||Gr(this.options.enabled,this.#t)===!1||!py(this.#l)||this.#l===0)&&(this.#c=qo.setInterval(()=>{(this.options.refetchIntervalInBackground||NS.isFocused())&&this.#d()},this.#l))}#b(){this.#g(),this.#y(this.#v())}#S(){this.#u&&(qo.clearTimeout(this.#u),this.#u=void 0)}#w(){this.#c&&(qo.clearInterval(this.#c),this.#c=void 0)}createResult(e,t){const n=this.#t,r=this.options,s=this.#s,i=this.#r,o=this.#o,l=e!==n?e.state:this.#n,{state:u}=e;let c={...u},d=!1,f;if(t._optimisticResults){const w=this.hasListeners(),P=!w&&xk(e,t),I=w&&Ek(e,n,t,r);(P||I)&&(c={...c,...cD(u.data,e.options)}),t._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:p,errorUpdatedAt:v,status:m}=c;f=c.data;let y=!1;if(t.placeholderData!==void 0&&f===void 0&&m==="pending"){let w;s?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(w=s.data,y=!0):w=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,w!==void 0&&(m="success",f=gy(s?.data,w,t),d=!0)}if(t.select&&f!==void 0&&!y)if(s&&f===i?.data&&t.select===this.#m)f=this.#f;else try{this.#m=t.select,f=t.select(f),f=gy(s?.data,f,t),this.#f=f,this.#i=null}catch(w){this.#i=w}this.#i&&(p=this.#i,f=this.#f,v=Date.now(),m="error");const S=c.fetchStatus==="fetching",b=m==="pending",k=m==="error",T=b&&S,_=f!==void 0,R={status:m,fetchStatus:c.fetchStatus,isPending:b,isSuccess:m==="success",isError:k,isInitialLoading:T,isLoading:T,data:f,dataUpdatedAt:c.dataUpdatedAt,error:p,errorUpdatedAt:v,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>l.dataUpdateCount||c.errorUpdateCount>l.errorUpdateCount,isFetching:S,isRefetching:S&&!b,isLoadingError:k&&!_,isPaused:c.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:k&&_,isStale:$S(e,t),refetch:this.refetch,promise:this.#a,isEnabled:Gr(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const w=A=>{R.status==="error"?A.reject(R.error):R.data!==void 0&&A.resolve(R.data)},P=()=>{const A=this.#a=R.promise=yy();w(A)},I=this.#a;switch(I.status){case"pending":e.queryHash===n.queryHash&&w(I);break;case"fulfilled":(R.status==="error"||R.data!==I.value)&&P();break;case"rejected":(R.status!=="error"||R.error!==I.reason)&&P();break}}return R}updateResult(){const e=this.#s,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#o=this.options,this.#r.data!==void 0&&(this.#h=this.#t),yh(t,e))return;this.#s=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,s=typeof r=="function"?r():r;if(s==="all"||!s&&!this.#p.size)return!0;const i=new Set(s??this.#p);return this.options.throwOnError&&i.add("error"),Object.keys(this.#s).some(o=>{const a=o;return this.#s[a]!==e[a]&&i.has(a)})};this.#k({listeners:n()})}#_(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#k(e){Mn.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#s)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function HK(e,t){return Gr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function xk(e,t){return HK(e,t)||e.state.data!==void 0&&Sy(e,t,t.refetchOnMount)}function Sy(e,t,n){if(Gr(t.enabled,e)!==!1&&Zi(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&$S(e,t)}return!1}function Ek(e,t,n,r){return(e!==t||Gr(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&$S(e,n)}function $S(e,t){return Gr(t.enabled,e)!==!1&&e.isStaleByTime(Zi(t.staleTime,e))}function jK(e,t){return!yh(e.getCurrentResult(),t)}function Ck(e){return{onFetch:(t,n)=>{const r=t.options,s=t.fetchOptions?.meta?.fetchMore?.direction,i=t.state.data?.pages||[],o=t.state.data?.pageParams||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let c=!1;const d=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(t.signal.aborted?c=!0:t.signal.addEventListener("abort",()=>{c=!0}),t.signal)})},f=oD(t.options,t.fetchOptions),p=async(v,m,y)=>{if(c)return Promise.reject();if(m==null&&v.pages.length)return Promise.resolve(v);const b=(()=>{const C={client:t.client,queryKey:t.queryKey,pageParam:m,direction:y?"backward":"forward",meta:t.options.meta};return d(C),C})(),k=await f(b),{maxPages:T}=t.options,_=y?LK:MK;return{pages:_(v.pages,k,T),pageParams:_(v.pageParams,m,T)}};if(s&&i.length){const v=s==="backward",m=v?qK:Tk,y={pages:i,pageParams:o},S=m(r,y);a=await p(y,S,v)}else{const v=e??i.length;do{const m=l===0?o[0]??r.initialPageParam:Tk(r,a);if(l>0&&m==null)break;a=await p(a,m),l++}while(l<v)}return a};t.options.persister?t.fetchFn=()=>t.options.persister?.(u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=u}}}function Tk(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 qK(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var WK=class extends uD{#e;#t;#n;#s;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||dD(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=lD({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(i,o)=>{this.#r({type:"failed",failureCount:i,error:o})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const r=this.state.status==="pending",s=!this.#s.canStart();try{if(r)t();else{this.#r({type:"pending",variables:e,isPaused:s}),await this.#n.config.onMutate?.(e,this,n);const o=await this.options.onMutate?.(e,n);o!==this.state.context&&this.#r({type:"pending",context:o,variables:e,isPaused:s})}const i=await this.#s.start();return await this.#n.config.onSuccess?.(i,e,this.state.context,this,n),await this.options.onSuccess?.(i,e,this.state.context,n),await this.#n.config.onSettled?.(i,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(i,null,e,this.state.context,n),this.#r({type:"success",data:i}),i}catch(i){try{throw await this.#n.config.onError?.(i,e,this.state.context,this,n),await this.options.onError?.(i,e,this.state.context,n),await this.#n.config.onSettled?.(void 0,i,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(void 0,i,e,this.state.context,n),i}finally{this.#r({type:"error",error:i})}}finally{this.#n.runNext(this)}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Mn.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function dD(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var fD=class extends ou{constructor(t={}){super(),this.config=t,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(t,n,r){const s=new WK({client:t,mutationCache:this,mutationId:++this.#n,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){this.#e.add(t);const n=Od(t);if(typeof n=="string"){const r=this.#t.get(n);r?r.push(t):this.#t.set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const n=Od(t);if(typeof n=="string"){const r=this.#t.get(n);if(r)if(r.length>1){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}else r[0]===t&&this.#t.delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Od(t);if(typeof n=="string"){const s=this.#t.get(n)?.find(i=>i.state.status==="pending");return!s||s===t}else return!0}runNext(t){const n=Od(t);return typeof n=="string"?this.#t.get(n)?.find(s=>s!==t&&s.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Mn.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(t){const n={exact:!0,...t};return this.getAll().find(r=>bk(n,r))}findAll(t={}){return this.getAll().filter(n=>bk(t,n))}notify(t){Mn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Mn.batch(()=>Promise.all(t.map(n=>n.continue().catch(jr))))}};function Od(e){return e.options.scope?.id}var GK=class extends ou{#e;#t=void 0;#n;#s;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#e.defaultMutationOptions(t),yh(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&Sa(n.mutationKey)!==Sa(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#o(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#o()}mutate(t,n){return this.#s=n,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(t)}#r(){const t=this.#n?.state??dD();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){Mn.batch(()=>{if(this.#s&&this.hasListeners()){const n=this.#t.variables,r=this.#t.context,s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};t?.type==="success"?(this.#s.onSuccess?.(t.data,n,r,s),this.#s.onSettled?.(t.data,null,n,r,s)):t?.type==="error"&&(this.#s.onError?.(t.error,n,r,s),this.#s.onSettled?.(void 0,t.error,n,r,s))}this.listeners.forEach(n=>{n(this.#t)})})}},hD=class extends ou{constructor(t={}){super(),this.config=t,this.#e=new Map}#e;build(t,n,r){const s=n.queryKey,i=n.queryHash??LS(s,n);let o=this.get(i);return o||(o=new UK({client:t,queryKey:s,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){this.#e.has(t.queryHash)||(this.#e.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=this.#e.get(t.queryHash);n&&(t.destroy(),n===t&&this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Mn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>yk(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>yk(t,r)):n}notify(t){Mn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Mn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Mn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},KK=class{#e;#t;#n;#s;#r;#o;#a;#i;constructor(t={}){this.#e=t.queryCache||new hD,this.#t=t.mutationCache||new fD,this.#n=t.defaultOptions||{},this.#s=new Map,this.#r=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#a=NS.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=bh.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#a?.(),this.#a=void 0,this.#i?.(),this.#i=void 0)}isFetching(t){return this.#e.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#t.findAll({...t,status:"pending"}).length}getQueryData(t){const n=this.defaultQueryOptions({queryKey:t});return this.#e.get(n.queryHash)?.state.data}ensureQueryData(t){const n=this.defaultQueryOptions(t),r=this.#e.build(this,n),s=r.state.data;return s===void 0?this.fetchQuery(t):(t.revalidateIfStale&&r.isStaleByTime(Zi(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(s))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:n,state:r})=>{const s=r.data;return[n,s]})}setQueryData(t,n,r){const s=this.defaultQueryOptions({queryKey:t}),o=this.#e.get(s.queryHash)?.state.data,a=AK(n,o);if(a!==void 0)return this.#e.build(this,s).setData(a,{...r,manual:!0})}setQueriesData(t,n,r){return Mn.batch(()=>this.#e.findAll(t).map(({queryKey:s})=>[s,this.setQueryData(s,n,r)]))}getQueryState(t){const n=this.defaultQueryOptions({queryKey:t});return this.#e.get(n.queryHash)?.state}removeQueries(t){const n=this.#e;Mn.batch(()=>{n.findAll(t).forEach(r=>{n.remove(r)})})}resetQueries(t,n){const r=this.#e;return Mn.batch(()=>(r.findAll(t).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...t},n)))}cancelQueries(t,n={}){const r={revert:!0,...n},s=Mn.batch(()=>this.#e.findAll(t).map(i=>i.cancel(r)));return Promise.all(s).then(jr).catch(jr)}invalidateQueries(t,n={}){return Mn.batch(()=>(this.#e.findAll(t).forEach(r=>{r.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},n)))}refetchQueries(t,n={}){const r={...n,cancelRefetch:n.cancelRefetch??!0},s=Mn.batch(()=>this.#e.findAll(t).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,r);return r.throwOnError||(o=o.catch(jr)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(s).then(jr)}fetchQuery(t){const n=this.defaultQueryOptions(t);n.retry===void 0&&(n.retry=!1);const r=this.#e.build(this,n);return r.isStaleByTime(Zi(n.staleTime,r))?r.fetch(n):Promise.resolve(r.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(jr).catch(jr)}fetchInfiniteQuery(t){return t.behavior=Ck(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(jr).catch(jr)}ensureInfiniteQueryData(t){return t.behavior=Ck(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return bh.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(t){this.#n=t}setQueryDefaults(t,n){this.#s.set(Sa(t),{queryKey:t,defaultOptions:n})}getQueryDefaults(t){const n=[...this.#s.values()],r={};return n.forEach(s=>{Cc(t,s.queryKey)&&Object.assign(r,s.defaultOptions)}),r}setMutationDefaults(t,n){this.#r.set(Sa(t),{mutationKey:t,defaultOptions:n})}getMutationDefaults(t){const n=[...this.#r.values()],r={};return n.forEach(s=>{Cc(t,s.mutationKey)&&Object.assign(r,s.defaultOptions)}),r}defaultQueryOptions(t){if(t._defaulted)return t;const n={...this.#n.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return n.queryHash||(n.queryHash=LS(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===FS&&(n.enabled=!1),n}defaultMutationOptions(t){return t?._defaulted?t:{...this.#n.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},YK="VUE_QUERY_CLIENT";function pD(e){const t=e?`:${e}`:"";return`${YK}${t}`}function wy(e,t){Object.keys(e).forEach(n=>{e[n]=t[n]})}function _y(e,t,n="",r=0){if(t){const s=t(e,n,r);if(s===void 0&&Ye(e)||s!==void 0)return s}if(Array.isArray(e))return e.map((s,i)=>_y(s,t,String(i),r+1));if(typeof e=="object"&&QK(e)){const s=Object.entries(e).map(([i,o])=>[i,_y(o,t,i,r+1)]);return Object.fromEntries(s)}return e}function XK(e,t){return _y(e,t)}function nt(e,t=!1){return XK(e,(n,r,s)=>{if(s===1&&r==="queryKey")return nt(n,!0);if(t&&JK(n))return nt(n(),t);if(Ye(n))return nt(Q(n),t)})}function QK(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function JK(e){return typeof e=="function"}function BS(e=""){if(!zC())throw new Error("vue-query hooks can only be used inside setup() function or functions that support injection context.");const t=pD(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 ZK=class extends hD{find(e){return super.find(nt(e))}findAll(e={}){return super.findAll(nt(e))}},eY=class extends fD{find(e){return super.find(nt(e))}findAll(e={}){return super.findAll(nt(e))}},tY=class extends KK{constructor(e={}){const t={defaultOptions:e.defaultOptions,queryCache:e.queryCache||new ZK,mutationCache:e.mutationCache||new eY};super(t),this.isRestoring=H(!1)}isFetching(e={}){return super.isFetching(nt(e))}isMutating(e={}){return super.isMutating(nt(e))}getQueryData(e){return super.getQueryData(nt(e))}ensureQueryData(e){return super.ensureQueryData(nt(e))}getQueriesData(e){return super.getQueriesData(nt(e))}setQueryData(e,t,n={}){return super.setQueryData(nt(e),t,nt(n))}setQueriesData(e,t,n={}){return super.setQueriesData(nt(e),t,nt(n))}getQueryState(e){return super.getQueryState(nt(e))}removeQueries(e={}){return super.removeQueries(nt(e))}resetQueries(e={},t={}){return super.resetQueries(nt(e),nt(t))}cancelQueries(e={},t={}){return super.cancelQueries(nt(e),nt(t))}invalidateQueries(e={},t={}){const n=nt(e),r=nt(t);if(super.invalidateQueries({...n,refetchType:"none"},r),n.refetchType==="none")return Promise.resolve();const s={...n,type:n.refetchType??n.type??"active"};return ot().then(()=>super.refetchQueries(s,r))}refetchQueries(e={},t={}){return super.refetchQueries(nt(e),nt(t))}fetchQuery(e){return super.fetchQuery(nt(e))}prefetchQuery(e){return super.prefetchQuery(nt(e))}fetchInfiniteQuery(e){return super.fetchInfiniteQuery(nt(e))}prefetchInfiniteQuery(e){return super.prefetchInfiniteQuery(nt(e))}setDefaultOptions(e){super.setDefaultOptions(nt(e))}setQueryDefaults(e,t){super.setQueryDefaults(nt(e),nt(t))}getQueryDefaults(e){return super.getQueryDefaults(nt(e))}setMutationDefaults(e,t){super.setMutationDefaults(nt(e),nt(t))}getMutationDefaults(e){return super.getMutationDefaults(nt(e))}},nY={install:(e,t={})=>{const n=pD(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 tY(o)}ba||r.mount();let s=()=>{};if(t.clientPersister){r.isRestoring&&(r.isRestoring.value=!0);const[o,a]=t.clientPersister(r);s=o,a.then(()=>{r.isRestoring&&(r.isRestoring.value=!1),t.clientPersisterOnSuccess?.(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 rY(e,t,n){const r=BS(),s=O(()=>{let p=t;typeof p=="function"&&(p=p());const v=nt(p);typeof v.enabled=="function"&&(v.enabled=v.enabled());const m=r.defaultQueryOptions(v);return m._optimisticResults=r.isRestoring?.value?"isRestoring":"optimistic",m}),i=new e(r,s.value),o=s.value.shallow?Fh(i.getCurrentResult()):on(i.getCurrentResult());let a=()=>{};r.isRestoring&&we(r.isRestoring,p=>{p||(a(),a=i.subscribe(v=>{wy(o,v)}))},{immediate:!0});const l=()=>{i.setOptions(s.value),wy(o,i.getCurrentResult())};we(s,l),Qt(()=>{a()});const u=(...p)=>(l(),o.refetch(...p)),c=()=>new Promise((p,v)=>{let m=()=>{};const y=()=>{if(s.value.enabled!==!1){i.setOptions(s.value);const S=i.getOptimisticResult(s.value);S.isStale?(m(),i.fetchOptimistic(s.value).then(p,b=>{vy(s.value.throwOnError,[b,i.getCurrentQuery()])?v(b):p(i.getCurrentResult())})):(m(),p(S))}};y(),m=we(s,y)});we(()=>o.error,p=>{if(o.isError&&!o.isFetching&&vy(s.value.throwOnError,[p,i.getCurrentQuery()]))throw p});const d=s.value.shallow?Ky(o):_i(o),f=_a(d);for(const p in o)typeof o[p]=="function"&&(f[p]=o[p]);return f.suspense=c,f.refetch=u,f}function Ep(e,t){return rY(zK,e)}function sY(e,t){const n=BS(),r=O(()=>{const c=typeof e=="function"?e():e;return n.defaultMutationOptions(nt(c))}),s=new GK(n,r.value),i=r.value.shallow?Fh(s.getCurrentResult()):on(s.getCurrentResult()),o=s.subscribe(c=>{wy(i,c)}),a=(c,d)=>{s.mutate(c,d).catch(()=>{})};we(r,()=>{s.setOptions(r.value)}),Qt(()=>{o()});const l=r.value.shallow?Ky(i):_i(i),u=_a(l);return we(()=>i.error,c=>{if(c&&vy(r.value.throwOnError,[c]))throw c}),{...u,mutate:a,mutateAsync:i.mutate,reset:i.reset}}const iY=oe({...Ue(),...cr(),...IO()},"VLayout"),Cp=_e()({name:"VLayout",props:iY(),setup(e,t){let{slots:n}=t;const{layoutClasses:r,layoutStyles:s,getLayoutItem:i,items:o,layoutRef:a}=MO(e),{dimensionStyles:l}=dr(e);return Ae(()=>E("div",{ref:a,class:Pe([r.value,e.class]),style:De([l.value,s.value,e.style])},[n.default?.()])),{getLayoutItem:i,items:o}}}),oY={class:"text-h5"},aY={key:0},lY={key:1},uY=Me({__name:"AddOrUpdateCameraStreamDialog",setup(e){const t=BS(),n=Kt(Yt.AddOrUpdateCameraDialog),r=O(()=>"C"),s=H({name:"",streamURL:""}),i=()=>n.context()?.addOrUpdate==="update",o=O(()=>i());we(()=>n.context(),d=>{if(!d||d?.addOrUpdate!=="update"){s.value.streamURL="",s.value.name="";return}const f=t.getQueryData(["cameraStream"])?.find(p=>p.cameraStream.id===d.cameraId);s.value.name=f?.cameraStream.name,s.value.streamURL=f?.cameraStream.streamURL||""});function a(){n.closeDialog()}async function l(){await vh.createCameraStream({streamURL:s.value.streamURL,name:s.value.name}),await t.refetchQueries({queryKey:["cameraStream"]}),n.closeDialog()}async function u(){await vh.updateCameraStream(n.context()?.cameraId,{streamURL:s.value.streamURL,name:s.value.name}),await t.refetchQueries({queryKey:["cameraStream"]}),n.closeDialog()}function c(){n.closeDialog()}return(d,f)=>{const p=Js;return F(),ee(p,{id:Q(n).dialogId,"max-width":"800px",onEscape:f[3]||(f[3]=v=>a())},{default:g(()=>[h(mt,null,{default:g(()=>[h(Zt,null,{default:g(()=>[E("span",oY,[h(st,{class:"mr-2",color:"primary",size:"56"},{default:g(()=>[x(re(r.value),1)]),_:1}),o.value?(F(),ge("span",aY," Updating Camera ")):(F(),ge("span",lY," New Camera "))])]),_:1}),h(Gt,null,{default:g(()=>[h(Bn,{"grid-list-md":""},{default:g(()=>[h(Cp,{wrap:""},{default:g(()=>[h(et,{modelValue:s.value.name,"onUpdate:modelValue":f[0]||(f[0]=v=>s.value.name=v),label:"Name",required:""},null,8,["modelValue"]),h(et,{modelValue:s.value.streamURL,"onUpdate:modelValue":f[1]||(f[1]=v=>s.value.streamURL=v),label:"Url (MJPEG)",required:""},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),h(An,null,{default:g(()=>[h(yn),h(te,{color:"primary-darken-2",onClick:c},{default:g(()=>[...f[4]||(f[4]=[x(" Cancel ",-1)])]),_:1}),h(te,{color:"primary",onClick:f[2]||(f[2]=v=>o.value?u():l())},{default:g(()=>[x(re(o.value?"Update":"Create"),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}}),VS=is("TestPrinter",{state:()=>({currentCorrelationToken:void 0,testPrinter:void 0,testPrinterEvents:[]}),getters:{getEvents(){return()=>(this.testPrinterEvents?.filter(e=>e.correlationToken===this.currentCorrelationToken)||[]).filter(e=>(e.event!=="API_STATE_UPDATED"||e.payload!=="unset")&&(e.event!=="WS_STATE_UPDATED"||e.payload!=="unopened")).map(e=>({event:e.event.startsWith("WS_")?"Socket":"API",payload:e.payload?.toString()?.replace("noResponse","unreachable").replace("authFail","authentication failure"),failure:["authFail","noResponse","aborted","globalKey","error","connection error","closed","connection closed"].includes(e.payload?.toString())}))}},actions:{clearEvents(){this.testPrinterEvents=[]},async createTestPrinter(e){return this.testPrinter=e,await qt.testConnection(e)},saveEvent(e){this.testPrinterEvents?.push(e)}}}),cY="error",dY="success",fY=Me({__name:"PrinterChecksPanel",setup(e){const t=VS(),n=H(4);function r(){return t.getEvents().map(s=>({label:s.event,text:s.payload,color:s.failure?cY:dY}))}return(s,i)=>(F(),ee(Ve,{cols:Q(n)},{default:g(()=>[i[0]||(i[0]=E("strong",null," Checks: ",-1)),(F(!0),ge(Ie,null,Ht(r(),(o,a)=>(F(),ee(ln,{key:a,type:o.color,density:"compact"},{default:g(()=>[E("small",null,re(o.label)+" "+re(o.text),1)]),_:2},1032,["type"]))),128))]),_:1},8,["cols"]))}}),hY="/assets/klipper-logo-B1Hu-a1R.svg",pY="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",mD=Symbol.for("vuetify:v-item-group"),mY=oe({...Ue(),...Bc({selectedClass:"v-item--selected"}),...ut(),...Pt()},"VItemGroup"),gY=_e()({name:"VItemGroup",props:mY(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{themeClasses:r}=Wt(e),{isSelected:s,select:i,next:o,prev:a,selected:l}=Ul(e,mD);return()=>h(e.tag,{class:Pe(["v-item-group",r.value,e.class]),style:De(e.style)},{default:()=>[n.default?.({isSelected:s,select:i,next:o,prev:a,selected:l.value})]})}}),vY=_e()({name:"VItem",props:Vc(),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}=gl(e,mD);return()=>n.default?.({isSelected:r.value,selectedClass:o.value,select:s,toggle:i,value:a.value,disabled:l.value})}}),yY={class:"text-h5"},bY={key:0},SY={key:1},wY={class:"ml-3 align-center"},_Y=Me({__name:"AddOrUpdatePrinterDialog",setup(e){const t=Kt(Yt.AddOrUpdatePrinterDialog),n=Vt(),r=VS(),s=_p(),i=je("appConstants"),o=Rt(),a=H(null),l=H(!1),u=H(!1),c=H(!1),d=H(""),f=H(ay()),p=O(()=>{if(s.hasFeature("multiplePrinterServices")){const M=s.getFeature("multiplePrinterServices"),L=M?.subFeatures?.types?.includes("klipper"),j=M?.subFeatures?.types?.includes("prusaLink");return[{name:Yu(mf),logo:cy,height:"60px"},...L?[{name:Yu(dy),logo:hY,height:"60px"}]:[],...j?[{name:Yu(gf),logo:pY,height:"20px"}]:[]]}return[{name:"OctoPrint",logo:cy,height:"75px"}]}),v=O(()=>n.updateDialogPrinter?.id);gt(async()=>{if(v.value){const M=n.printer(v.value);f.value=qt.convertPrinterToCreateForm(M)}}),we(v,M=>{if(!M)return;const L=n.printer(M);f.value=qt.convertPrinterToCreateForm(L)});const m=O(()=>n.updateDialogPrinter),y=O(()=>!!m.value),S=O(()=>y?"Save":"Create"),b=O(()=>f?yp(f.value?.name):"?"),k=O(()=>({required:!0,max:i.maxPrinterNameLength})),T=O(()=>({required:!0,length:i.apiKeyLength,alpha_num:!0}));function _(){f.value=ay()}function C(){c.value=!0}async function R(){if(!w())return;r.clearEvents(),C();const{correlationToken:M}=await r.createTestPrinter(f.value);r.currentCorrelationToken=M}const w=()=>{const M=f.value;return M?fh(M.printerType)?M.printerURL?.length&&M.name?.length:hh(M.printerType)?M.printerURL?.length&&M.name?.length&&M.username?.length&&M.password?.length:M.printerURL?.length&&M.name?.length&&M.apiKey?.length:!1};async function P(M){await n.createPrinter(M,u.value),o.openInfoMessage({title:`Printer ${M.name} created`})}async function I(M){const L=M.id;await n.updatePrinter({printerId:L,updatedPrinter:M},u.value),o.openInfoMessage({title:`Printer ${M.name} updated`})}async function A(){if(!w())return;a.value=null,l.value=!0,f.value.printerURL?.length&&!f.value.printerURL?.startsWith("http://")&&!f.value.printerURL?.startsWith("https://")&&(f.value.printerURL+="https://");const M=f.value;(fh(M.printerType)||hh(M.printerType))&&(M.apiKey="");try{y.value?await I(M):await P(M),K()}catch(L){L instanceof dP?(a.value=L.response?.data?.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 $(){f.value.name=su(),n.updateDialogPrinter=void 0,a.value=null,u.value=!1,a.value=null}function K(){t.closeDialog(),u.value=!1,a.value=null,c.value=!1,r.clearEvents(),_(),n.updateDialogPrinter=void 0,d.value=""}return(M,L)=>{const j=fY,G=Js;return F(),ee(G,{id:Q(t).dialogId,"max-width":Q(c)?"900px":"700px",onEscape:L[13]||(L[13]=B=>K())},{default:g(()=>[h(mt,{class:"pa-4"},{default:g(()=>[h(Zt,null,{default:g(()=>[E("span",yY,[h(st,{color:"primary",size:"56"},{default:g(()=>[x(re(Q(b)),1)]),_:1}),Q(y)?(F(),ge("span",bY," Updating Printer ")):(F(),ge("span",SY," New Printer "))])]),_:1}),h(Gt,null,{default:g(()=>[L[16]||(L[16]=E("h4",null,"Printer type",-1)),h(gY,{modelValue:Q(f).printerType,"onUpdate:modelValue":L[0]||(L[0]=B=>Q(f).printerType=B),mandatory:""},{default:g(()=>[h(Bn,null,{default:g(()=>[h(Je,null,{default:g(()=>[(F(!0),ge(Ie,null,Ht(Q(p),B=>(F(),ee(Ve,{key:B.name,cols:"4",md:"4"},{default:g(()=>[h(vY,null,{default:g(({isSelected:q,toggle:N})=>[h(mt,{color:q?"primary":"blue-grey darken-4",class:"d-flex align-center justify-center elevation-8",height:"60px",width:"225px",onClick:N},{default:g(()=>[h(ts,{height:B.height,src:B.logo,"max-width":"100px",width:"125px"},null,8,["height","src"]),h(M$,null,{default:g(()=>[E("h3",wY,re(B.name),1)]),_:2},1024)]),_:2},1032,["color","onClick"])]),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"]),h(Je,null,{default:g(()=>[h(Ve,{cols:Q(c)?8:12},{default:g(()=>[Q(f)?(F(),ee(Je,{key:0},{default:g(()=>[h(Ve,null,{default:g(()=>[h(et,{modelValue:Q(f).name,"onUpdate:modelValue":L[1]||(L[1]=B=>Q(f).name=B),counter:Q(k).max,autofocus:"",class:"ma-1",label:"Printer name*",required:""},null,8,["modelValue","counter"])]),_:1}),h(Ve,null,{default:g(()=>[h(cn,{modelValue:Q(f).enabled,"onUpdate:modelValue":L[2]||(L[2]=B=>Q(f).enabled=B),hint:"Disabling makes the printer passive",label:"Enabled*","persistent-hint":"",required:""},null,8,["modelValue"])]),_:1})]),_:1})):fe("",!0),h(et,{modelValue:Q(f).printerURL,"onUpdate:modelValue":L[3]||(L[3]=B=>Q(f).printerURL=B),class:"ma-1",hint:"F.e. 'octopi.local' or 'https://my.printer.com'",label:"Printer URL*"},null,8,["modelValue"]),Q(f).printerType===Q(mf)?(F(),ee(et,{key:1,modelValue:Q(f).apiKey,"onUpdate:modelValue":L[4]||(L[4]=B=>Q(f).apiKey=B),counter:Q(T).length,class:"ma-1",hint:"User or Application Key with 32 or 43 characters (Global API key will fail)",label:Q(f).printerType===Q(mf)||Q(f).printerType===Q(dy)?"API Key (unsupported)":"API Key (required)*","persistent-hint":"",required:""},null,8,["modelValue","counter","label"])):fe("",!0),Q(f).printerType===Q(gf)?(F(),ee(et,{key:2,modelValue:Q(f).username,"onUpdate:modelValue":L[5]||(L[5]=B=>Q(f).username=B),class:"ma-1",hint:"Username (often 'maker')",label:"Username","persistent-hint":"",required:""},null,8,["modelValue"])):fe("",!0),Q(f).printerType===Q(gf)?(F(),ee(et,{key:3,modelValue:Q(f).password,"onUpdate:modelValue":L[6]||(L[6]=B=>Q(f).password=B),class:"ma-1",hint:"Password (visit your printer settings)",label:"Password","persistent-hint":"",required:""},null,8,["modelValue"])):fe("",!0)]),_:1},8,["cols"]),Q(c)?(F(),ee(j,{key:0,cols:4},{default:g(()=>[h(te,{onClick:L[7]||(L[7]=B=>c.value=!1)},{default:g(()=>[...L[14]||(L[14]=[x(" Hide checks",-1)])]),_:1})]),_:1})):fe("",!0)]),_:1}),Q(a)?.length?(F(),ee(ln,{key:0,class:"my-3",color:"primary"},{default:g(()=>[x(re(Q(a))+" ",1),h(cn,{modelValue:Q(u),"onUpdate:modelValue":L[8]||(L[8]=B=>Ye(u)?u.value=B:null),color:"warning",label:"Force save"},null,8,["modelValue"])]),_:1})):fe("",!0),Q(l)?(F(),ee(ln,{key:1,class:"my-3"},{default:g(()=>[L[15]||(L[15]=x(" Validating printer ",-1)),h(zs,{indeterminate:""})]),_:1})):fe("",!0)]),_:1}),h(An,null,{default:g(()=>[L[20]||(L[20]=E("em",{class:"text-red"}," * indicates required field ",-1)),h(yn),h(te,{variant:"text",onClick:L[9]||(L[9]=B=>K())},{default:g(()=>[...L[17]||(L[17]=[x(" Close ",-1)])]),_:1}),Q(y)?(F(),ee(te,{key:0,color:"gray",variant:"text",onClick:L[10]||(L[10]=B=>$())},{default:g(()=>[...L[18]||(L[18]=[x(" Duplicate ",-1)])]),_:1})):fe("",!0),h(te,{color:"warning",variant:"text",onClick:L[11]||(L[11]=B=>R())},{default:g(()=>[...L[19]||(L[19]=[x(" Test connection ",-1)])]),_:1}),h(te,{color:"blue-darken-1",variant:"text",onClick:L[12]||(L[12]=B=>A())},{default:g(()=>[x(re(Q(S)),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["id","max-width"])}}}),kY=oe({text:String,...Ue(),...ut()},"VToolbarTitle"),Tn=_e()({name:"VToolbarTitle",props:kY(),setup(e,t){let{slots:n}=t;return Ae(()=>{const r=!!(n.default||n.text||e.text);return h(e.tag,{class:Pe(["v-toolbar-title",e.class]),style:De(e.style)},{default:()=>[r&&E("div",{class:"v-toolbar-title__placeholder"},[n.text?n.text():e.text,n.default?.()])]})}),{}}}),xY=[null,"prominent","default","comfortable","compact"],gD=oe({absolute:Boolean,collapse:Boolean,collapsePosition:{type:String,default:"start"},color:String,density:{type:String,default:"default",validator:e=>xY.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,...os(),...Ue(),...ls(),...On(),...ut({tag:"header"}),...Pt()},"VToolbar"),ur=_e()({name:"VToolbar",props:gD(),setup(e,t){let{slots:n}=t;const{backgroundColorClasses:r,backgroundColorStyles:s}=or(()=>e.color),{borderClasses:i}=_s(e),{elevationClasses:o}=ks(e),{roundedClasses:a}=zn(e),{themeClasses:l}=Wt(e),{rtlClasses:u}=Ir(),c=ke(e.extended===null?!!n.extension?.():e.extended),d=O(()=>parseInt(Number(e.height)+(e.density==="prominent"?Number(e.height):0)-(e.density==="comfortable"?8:0)-(e.density==="compact"?16:0),10)),f=O(()=>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 Tr({VBtn:{variant:"text"}}),Ae(()=>{const p=!!(e.title||n.title),v=!!(n.image||e.image),m=n.extension?.();return c.value=e.extended===null?!!m:e.extended,h(e.tag,{class:Pe(["v-toolbar",`v-toolbar--collapse-${e.collapsePosition}`,{"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:De([s.value,e.style])},{default:()=>[v&&E("div",{key:"image",class:"v-toolbar__image"},[n.image?h(Tt,{key:"image-defaults",disabled:!e.image,defaults:{VImg:{cover:!0,src:e.image}}},n.image):h(ts,{key:"image-img",cover:!0,src:e.image},null)]),h(Tt,{defaults:{VTabs:{height:Oe(d.value)}}},{default:()=>[E("div",{class:"v-toolbar__content",style:{height:Oe(d.value)}},[n.prepend&&E("div",{class:"v-toolbar__prepend"},[n.prepend?.()]),p&&h(Tn,{key:"title",text:e.title},{text:n.title}),n.default?.(),n.append&&E("div",{class:"v-toolbar__append"},[n.append?.()])])]}),h(Tt,{defaults:{VTabs:{height:Oe(f.value)}}},{default:()=>[h(RR,null,{default:()=>[c.value&&E("div",{class:"v-toolbar__extension",style:{height:Oe(f.value)}},[m])]})]})]})}),{contentHeight:d,extensionHeight:f}}}),EY=Me({__name:"HelpOverlay",setup(e){const t=H(!1);return(n,r)=>(F(),ee(VR,{modelValue:Q(t),"onUpdate:modelValue":r[0]||(r[0]=s=>Ye(t)?t.value=s:null),fullscreen:"",eager:"",transition:"dialog-bottom-transition",width:"100%"},{activator:g(({props:s})=>[h(Ze,{location:"top"},{activator:g(({props:i})=>[h(te,de({icon:"help"},{...s,...i}),{default:g(()=>[h(Z,null,{default:g(()=>[...r[1]||(r[1]=[x("help",-1)])]),_:1})]),_:1},16)]),default:g(()=>[r[2]||(r[2]=E("span",null," Load the online documentation webpage ",-1))]),_:2},1024)]),default:g(({isActive:s})=>[h(mt,{height:"100%",width:"100%"},{default:g(()=>[h(ur,{color:"primary"},{default:g(()=>[h(Z,{class:"ml-5"},{default:g(()=>[...r[3]||(r[3]=[x("help",-1)])]),_:1}),r[6]||(r[6]=E("h2",{class:"ml-10"},"FDM Monster Documentation",-1)),h(yn),r[7]||(r[7]=E("span",{class:"mr-10"}," docs.fdm-monster.net ",-1)),h(te,{variant:"flat",onClick:i=>s.value=!1},{default:g(()=>[h(Z,{class:"mr-2"},{default:g(()=>[...r[4]||(r[4]=[x("close",-1)])]),_:1}),r[5]||(r[5]=x(" Close help ",-1))]),_:1},8,["onClick"])]),_:2},1024),r[8]||(r[8]=E("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"]))}}),CY=Me({__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)=>(F(),ee(Ze,{location:t.location},{activator:g(({props:s})=>[h(te,de(s,{variant:"outlined",class:"ml-2",color:e.color,onClick:r[0]||(r[0]=i=>n.$emit("click"))}),{default:g(()=>[Hh(n.$slots,"default",{},()=>[t.icon?.length?(F(),ee(Z,{key:0,class:Pe("mr-2 "+t.iconClass)},{default:g(()=>[x(re(t.icon),1)]),_:1},8,["class"])):fe("",!0),x(" "+re(t.text),1)])]),_:3},16,["color"])]),default:g(()=>[E("span",null,re(t.tooltip),1)]),_:3},8,["location"]))}});const Ga=typeof document<"u";function vD(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function TY(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&vD(e.default)}const wt=Object.assign;function Vm(e,t){const n={};for(const r in t){const s=t[r];n[r]=ws(s)?s.map(e):e(s)}return n}const Qu=()=>{},ws=Array.isArray;function Rk(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}const yD=/#/g,RY=/&/g,PY=/\//g,IY=/=/g,AY=/\?/g,bD=/\+/g,OY=/%5B/g,DY=/%5D/g,SD=/%5E/g,MY=/%60/g,wD=/%7B/g,LY=/%7C/g,_D=/%7D/g,FY=/%20/g;function US(e){return e==null?"":encodeURI(""+e).replace(LY,"|").replace(OY,"[").replace(DY,"]")}function NY(e){return US(e).replace(wD,"{").replace(_D,"}").replace(SD,"^")}function ky(e){return US(e).replace(bD,"%2B").replace(FY,"+").replace(yD,"%23").replace(RY,"%26").replace(MY,"`").replace(wD,"{").replace(_D,"}").replace(SD,"^")}function $Y(e){return ky(e).replace(IY,"%3D")}function BY(e){return US(e).replace(yD,"%23").replace(AY,"%3F")}function VY(e){return BY(e).replace(PY,"%2F")}function Tc(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const UY=/\/$/,zY=e=>e.replace(UY,"");function Um(e,t,n="/"){let r,s={},i="",o="";const a=t.indexOf("#");let l=t.indexOf("?");return l=a>=0&&l>a?-1:l,l>=0&&(r=t.slice(0,l),i=t.slice(l,a>0?a:t.length),s=e(i.slice(1))),a>=0&&(r=r||t.slice(0,a),o=t.slice(a,t.length)),r=WY(r??t,n),{fullPath:r+i+o,path:r,query:s,hash:Tc(o)}}function HY(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Pk(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function jY(e,t,n){const r=t.matched.length-1,s=n.matched.length-1;return r>-1&&r===s&&Ol(t.matched[r],n.matched[s])&&kD(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Ol(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function kD(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!qY(e[n],t[n]))return!1;return!0}function qY(e,t){return ws(e)?Ik(e,t):ws(t)?Ik(t,e):e?.valueOf()===t?.valueOf()}function Ik(e,t){return ws(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function WY(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 $i={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let xy=(function(e){return e.pop="pop",e.push="push",e})({}),zm=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function GY(e){if(!e)if(Ga){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),zY(e)}const KY=/^[^#]+#/;function YY(e,t){return e.replace(KY,"#")+t}function XY(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 Tp=()=>({left:window.scrollX,top:window.scrollY});function QY(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=XY(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 Ak(e,t){return(history.state?history.state.position-t:-1)+e}const Ey=new Map;function JY(e,t){Ey.set(e,t)}function ZY(e){const t=Ey.get(e);return Ey.delete(e),t}function eX(e){return typeof e=="string"||e&&typeof e=="object"}function xD(e){return typeof e=="string"||typeof e=="symbol"}let sn=(function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e})({});const ED=Symbol("");sn.MATCHER_NOT_FOUND+"",sn.NAVIGATION_GUARD_REDIRECT+"",sn.NAVIGATION_ABORTED+"",sn.NAVIGATION_CANCELLED+"",sn.NAVIGATION_DUPLICATED+"";function Dl(e,t){return wt(new Error,{type:e,[ED]:!0},t)}function si(e,t){return e instanceof Error&&ED in e&&(t==null||!!(e.type&t))}const tX=["params","query","hash"];function nX(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of tX)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function rX(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;r<n.length;++r){const s=n[r].replace(bD," "),i=s.indexOf("="),o=Tc(i<0?s:s.slice(0,i)),a=i<0?null:Tc(s.slice(i+1));if(o in t){let l=t[o];ws(l)||(l=t[o]=[l]),l.push(a)}else t[o]=a}return t}function Ok(e){let t="";for(let n in e){const r=e[n];if(n=$Y(n),r==null){r!==void 0&&(t+=(t.length?"&":"")+n);continue}(ws(r)?r.map(s=>s&&ky(s)):[r&&ky(r)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+n,s!=null&&(t+="="+s))})}return t}function sX(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=ws(r)?r.map(s=>s==null?null:""+s):r==null?r:""+r)}return t}const iX=Symbol(""),Dk=Symbol(""),Rp=Symbol(""),zS=Symbol(""),Cy=Symbol("");function wu(){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 Gi(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(Dl(sn.NAVIGATION_ABORTED,{from:n,to:t})):f instanceof Error?l(f):eX(f)?l(Dl(sn.NAVIGATION_GUARD_REDIRECT,{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 Hm(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(vD(l)){const u=(l.__vccOpts||l)[t];u&&i.push(Gi(u,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=TY(c)?c.default:c;o.mods[a]=c,o.components[a]=d;const f=(d.__vccOpts||d)[t];return f&&Gi(f,n,r,o,a,s)()}))}}return i}function oX(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=>Ol(u,a))?r.push(a):n.push(a));const l=e.matched[o];l&&(t.matched.find(u=>Ol(u,l))||s.push(l))}return[n,r,s]}let aX=()=>location.protocol+"//"+location.host;function CD(e,t){const{pathname:n,search:r,hash:s}=t,i=e.indexOf("#");if(i>-1){let o=s.includes(e.slice(i))?e.slice(i).length:1,a=s.slice(o);return a[0]!=="/"&&(a="/"+a),Pk(a,"")}return Pk(n,e)+r+s}function lX(e,t,n,r){let s=[],i=[],o=null;const a=({state:f})=>{const p=CD(e,location),v=n.value,m=t.value;let y=0;if(f){if(n.value=p,t.value=f,o&&o===v){o=null;return}y=m?f.position-m.position:0}else r(p);s.forEach(S=>{S(n.value,v,{delta:y,type:xy.pop,direction:y?y>0?zm.forward:zm.back:zm.unknown})})};function l(){o=n.value}function u(f){s.push(f);const p=()=>{const v=s.indexOf(f);v>-1&&s.splice(v,1)};return i.push(p),p}function c(){if(document.visibilityState==="hidden"){const{history:f}=window;if(!f.state)return;f.replaceState(wt({},f.state,{scroll:Tp()}),"")}}function d(){for(const f of i)f();i=[],window.removeEventListener("popstate",a),window.removeEventListener("pagehide",c),document.removeEventListener("visibilitychange",c)}return window.addEventListener("popstate",a),window.addEventListener("pagehide",c),document.addEventListener("visibilitychange",c),{pauseListeners:l,listen:u,destroy:d}}function Mk(e,t,n,r=!1,s=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:s?Tp():null}}function uX(e){const{history:t,location:n}=window,r={value:CD(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:aX()+e+l;try{t[c?"replaceState":"pushState"](u,"",f),s.value=u}catch(p){console.error(p),n[c?"replace":"assign"](f)}}function o(l,u){i(l,wt({},t.state,Mk(s.value.back,l,s.value.forward,!0),u,{position:s.value.position}),!0),r.value=l}function a(l,u){const c=wt({},s.value,t.state,{forward:l,scroll:Tp()});i(c.current,c,!0),i(l,wt({},Mk(r.value,l,null),{position:c.position+1},u),!1),r.value=l}return{location:r,state:s,push:a,replace:o}}function cX(e){e=GY(e);const t=uX(e),n=lX(e,t.state,t.location,t.replace);function r(i,o=!0){o||n.pauseListeners(),history.go(i)}const s=wt({location:"",base:e,go:r,createHref:YY.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}let Wo=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({});var Sn=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e})(Sn||{});const dX={type:Wo.Static,value:""},fX=/[a-zA-Z0-9_]/;function hX(e){if(!e)return[[]];if(e==="/")return[[dX]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(p){throw new Error(`ERR (${n})/"${u}": ${p}`)}let n=Sn.Static,r=n;const s=[];let i;function o(){i&&s.push(i),i=[]}let a=0,l,u="",c="";function d(){u&&(n===Sn.Static?i.push({type:Wo.Static,value:u}):n===Sn.Param||n===Sn.ParamRegExp||n===Sn.ParamRegExpEnd?(i.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),i.push({type:Wo.Param,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!==Sn.ParamRegExp){r=n,n=Sn.EscapeNext;continue}switch(n){case Sn.Static:l==="/"?(u&&d(),o()):l===":"?(d(),n=Sn.Param):f();break;case Sn.EscapeNext:f(),n=r;break;case Sn.Param:l==="("?n=Sn.ParamRegExp:fX.test(l)?f():(d(),n=Sn.Static,l!=="*"&&l!=="?"&&l!=="+"&&a--);break;case Sn.ParamRegExp:l===")"?c[c.length-1]=="\\"?c=c.slice(0,-1)+l:n=Sn.ParamRegExpEnd:c+=l;break;case Sn.ParamRegExpEnd:d(),n=Sn.Static,l!=="*"&&l!=="?"&&l!=="+"&&a--,c="";break;default:t("Unknown state");break}}return n===Sn.ParamRegExp&&t(`Unfinished custom RegExp for param "${u}"`),d(),o(),s}const Lk="[^/]+?",pX={sensitive:!1,strict:!1,start:!0,end:!0};var rr=(function(e){return e[e._multiplier=10]="_multiplier",e[e.Root=90]="Root",e[e.Segment=40]="Segment",e[e.SubSegment=30]="SubSegment",e[e.Static=40]="Static",e[e.Dynamic=20]="Dynamic",e[e.BonusCustomRegExp=10]="BonusCustomRegExp",e[e.BonusWildcard=-50]="BonusWildcard",e[e.BonusRepeatable=-20]="BonusRepeatable",e[e.BonusOptional=-8]="BonusOptional",e[e.BonusStrict=.7000000000000001]="BonusStrict",e[e.BonusCaseSensitive=.25]="BonusCaseSensitive",e})(rr||{});const mX=/[.+*?^${}()[\]/\\]/g;function gX(e,t){const n=wt({},pX,t),r=[];let s=n.start?"^":"";const i=[];for(const u of e){const c=u.length?[]:[rr.Root];n.strict&&!u.length&&(s+="/");for(let d=0;d<u.length;d++){const f=u[d];let p=rr.Segment+(n.sensitive?rr.BonusCaseSensitive:0);if(f.type===Wo.Static)d||(s+="/"),s+=f.value.replace(mX,"\\$&"),p+=rr.Static;else if(f.type===Wo.Param){const{value:v,repeatable:m,optional:y,regexp:S}=f;i.push({name:v,repeatable:m,optional:y});const b=S||Lk;if(b!==Lk){p+=rr.BonusCustomRegExp;try{`${b}`}catch(T){throw new Error(`Invalid custom RegExp for param "${v}" (${b}): `+T.message)}}let k=m?`((?:${b})(?:/(?:${b}))*)`:`(${b})`;d||(k=y&&u.length<2?`(?:/${k})`:"/"+k),y&&(k+="?"),s+=k,p+=rr.Dynamic,y&&(p+=rr.BonusOptional),m&&(p+=rr.BonusRepeatable),b===".*"&&(p+=rr.BonusWildcard)}c.push(p)}r.push(c)}if(n.strict&&n.end){const u=r.length-1;r[u][r[u].length-1]+=rr.BonusStrict}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 p=c[f]||"",v=i[f-1];d[v.name]=p&&v.repeatable?p.split("/"):p}return d}function l(u){let c="",d=!1;for(const f of e){(!d||!c.endsWith("/"))&&(c+="/"),d=!1;for(const p of f)if(p.type===Wo.Static)c+=p.value;else if(p.type===Wo.Param){const{value:v,repeatable:m,optional:y}=p,S=v in u?u[v]:"";if(ws(S)&&!m)throw new Error(`Provided param "${v}" is an array but it is not repeatable (* or + modifiers)`);const b=ws(S)?S.join("/"):S;if(!b)if(y)f.length<2&&(c.endsWith("/")?c=c.slice(0,-1):d=!0);else throw new Error(`Missing required param "${v}"`);c+=b}}return c||"/"}return{re:o,score:r,keys:i,parse:a,stringify:l}}function vX(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]===rr.Static+rr.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===rr.Static+rr.Segment?1:-1:0}function TD(e,t){let n=0;const r=e.score,s=t.score;for(;n<r.length&&n<s.length;){const i=vX(r[n],s[n]);if(i)return i;n++}if(Math.abs(s.length-r.length)===1){if(Fk(r))return 1;if(Fk(s))return-1}return s.length-r.length}function Fk(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const yX={strict:!1,end:!0,sensitive:!1};function bX(e,t,n){const r=gX(hX(e.path),n),s=wt(r,{record:e,parent:t,children:[],alias:[]});return t&&!s.record.aliasOf==!t.record.aliasOf&&t.children.push(s),s}function SX(e,t){const n=[],r=new Map;t=Rk(yX,t);function s(d){return r.get(d)}function i(d,f,p){const v=!p,m=$k(d);m.aliasOf=p&&p.record;const y=Rk(t,d),S=[m];if("alias"in d){const T=typeof d.alias=="string"?[d.alias]:d.alias;for(const _ of T)S.push($k(wt({},m,{components:p?p.record.components:m.components,path:_,aliasOf:p?p.record:m})))}let b,k;for(const T of S){const{path:_}=T;if(f&&_[0]!=="/"){const C=f.record.path,R=C[C.length-1]==="/"?"":"/";T.path=f.record.path+(_&&R+_)}if(b=bX(T,f,y),p?p.alias.push(b):(k=k||b,k!==b&&k.alias.push(b),v&&d.name&&!Bk(b)&&o(d.name)),RD(b)&&l(b),m.children){const C=m.children;for(let R=0;R<C.length;R++)i(C[R],b,p&&p.children[R])}p=p||b}return k?()=>{o(k)}:Qu}function o(d){if(xD(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=kX(d,n);n.splice(f,0,d),d.record.name&&!Bk(d)&&r.set(d.record.name,d)}function u(d,f){let p,v={},m,y;if("name"in d&&d.name){if(p=r.get(d.name),!p)throw Dl(sn.MATCHER_NOT_FOUND,{location:d});y=p.record.name,v=wt(Nk(f.params,p.keys.filter(k=>!k.optional).concat(p.parent?p.parent.keys.filter(k=>k.optional):[]).map(k=>k.name)),d.params&&Nk(d.params,p.keys.map(k=>k.name))),m=p.stringify(v)}else if(d.path!=null)m=d.path,p=n.find(k=>k.re.test(m)),p&&(v=p.parse(m),y=p.record.name);else{if(p=f.name?r.get(f.name):n.find(k=>k.re.test(f.path)),!p)throw Dl(sn.MATCHER_NOT_FOUND,{location:d,currentLocation:f});y=p.record.name,v=wt({},f.params,d.params),m=p.stringify(v)}const S=[];let b=p;for(;b;)S.unshift(b.record),b=b.parent;return{name:y,path:m,params:v,matched:S,meta:_X(S)}}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 Nk(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function $k(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:wX(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 wX(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 Bk(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function _X(e){return e.reduce((t,n)=>wt(t,n.meta),{})}function kX(e,t){let n=0,r=t.length;for(;n!==r;){const i=n+r>>1;TD(e,t[i])<0?r=i:n=i+1}const s=xX(e);return s&&(r=t.lastIndexOf(s,r-1)),r}function xX(e){let t=e;for(;t=t.parent;)if(RD(t)&&TD(e,t)===0)return t}function RD({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Vk(e){const t=je(Rp),n=je(zS),r=O(()=>{const l=Q(e.to);return t.resolve(l)}),s=O(()=>{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(Ol.bind(null,c));if(f>-1)return f;const p=Uk(l[u-2]);return u>1&&Uk(c)===p&&d[d.length-1].path!==p?d.findIndex(Ol.bind(null,l[u-2])):f}),i=O(()=>s.value>-1&&PX(n.params,r.value.params)),o=O(()=>s.value>-1&&s.value===n.matched.length-1&&kD(n.params,r.value.params));function a(l={}){if(RX(l)){const u=t[Q(e.replace)?"replace":"push"](Q(e.to)).catch(Qu);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>u),u}return Promise.resolve()}return{route:r,href:O(()=>r.value.href),isActive:i,isExactActive:o,navigate:a}}function EX(e){return e.length===1?e[0]:e}const CX=Me({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:Vk,setup(e,{slots:t}){const n=on(Vk(e)),{options:r}=je(Rp),s=O(()=>({[zk(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[zk(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&EX(t.default(n));return e.custom?i:lr("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},i)}}}),TX=CX;function RX(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 PX(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(!ws(s)||s.length!==r.length||r.some((i,o)=>i.valueOf()!==s[o].valueOf()))return!1}return!0}function Uk(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const zk=(e,t,n)=>e??t??n,IX=Me({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=je(Cy),s=O(()=>e.route||r.value),i=je(Dk,0),o=O(()=>{let u=Q(i);const{matched:c}=s.value;let d;for(;(d=c[u])&&!d.components;)u++;return u}),a=O(()=>s.value.matched[o.value]);zt(Dk,O(()=>o.value+1)),zt(iX,a),zt(Cy,s);const l=H();return we(()=>[l.value,a.value,e.name],([u,c,d],[f,p,v])=>{c&&(c.instances[d]=u,p&&p!==c&&u&&u===f&&(c.leaveGuards.size||(c.leaveGuards=p.leaveGuards),c.updateGuards.size||(c.updateGuards=p.updateGuards))),u&&c&&(!p||!Ol(c,p)||!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 Hk(n.default,{Component:f,route:u});const p=d.props[c],v=p?p===!0?u.params:typeof p=="function"?p(u):p:null,y=lr(f,wt({},v,t,{onVnodeUnmounted:S=>{S.component.isUnmounted&&(d.instances[c]=null)},ref:l}));return Hk(n.default,{Component:y,route:u})||y}}});function Hk(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const AX=IX;function OX(e){const t=SX(e.routes,e),n=e.parseQuery||rX,r=e.stringifyQuery||Ok,s=e.history,i=wu(),o=wu(),a=wu(),l=ke($i);let u=$i;Ga&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=Vm.bind(null,W=>""+W),d=Vm.bind(null,VY),f=Vm.bind(null,Tc);function p(W,pe){let ue,Y;return xD(W)?(ue=t.getRecordMatcher(W),Y=pe):Y=W,t.addRoute(Y,ue)}function v(W){const pe=t.getRecordMatcher(W);pe&&t.removeRoute(pe)}function m(){return t.getRoutes().map(W=>W.record)}function y(W){return!!t.getRecordMatcher(W)}function S(W,pe){if(pe=wt({},pe||l.value),typeof W=="string"){const X=Um(n,W,pe.path),ce=t.resolve({path:X.path},pe),ve=s.createHref(X.fullPath);return wt(X,ce,{params:f(ce.params),hash:Tc(X.hash),redirectedFrom:void 0,href:ve})}let ue;if(W.path!=null)ue=wt({},W,{path:Um(n,W.path,pe.path).path});else{const X=wt({},W.params);for(const ce in X)X[ce]==null&&delete X[ce];ue=wt({},W,{params:d(X)}),pe.params=d(pe.params)}const Y=t.resolve(ue,pe),Le=W.hash||"";Y.params=c(f(Y.params));const D=HY(r,wt({},W,{hash:NY(Le),path:Y.path})),V=s.createHref(D);return wt({fullPath:D,hash:Le,query:r===Ok?sX(W.query):W.query||{}},Y,{redirectedFrom:void 0,href:V})}function b(W){return typeof W=="string"?Um(n,W,l.value.path):wt({},W)}function k(W,pe){if(u!==W)return Dl(sn.NAVIGATION_CANCELLED,{from:pe,to:W})}function T(W){return R(W)}function _(W){return T(wt(b(W),{replace:!0}))}function C(W,pe){const ue=W.matched[W.matched.length-1];if(ue&&ue.redirect){const{redirect:Y}=ue;let Le=typeof Y=="function"?Y(W,pe):Y;return typeof Le=="string"&&(Le=Le.includes("?")||Le.includes("#")?Le=b(Le):{path:Le},Le.params={}),wt({query:W.query,hash:W.hash,params:Le.path!=null?{}:W.params},Le)}}function R(W,pe){const ue=u=S(W),Y=l.value,Le=W.state,D=W.force,V=W.replace===!0,X=C(ue,Y);if(X)return R(wt(b(X),{state:typeof X=="object"?wt({},Le,X.state):Le,force:D,replace:V}),pe||ue);const ce=ue;ce.redirectedFrom=pe;let ve;return!D&&jY(r,Y,ue)&&(ve=Dl(sn.NAVIGATION_DUPLICATED,{to:ce,from:Y}),se(Y,Y,!0,!1)),(ve?Promise.resolve(ve):I(ce,Y)).catch(he=>si(he)?si(he,sn.NAVIGATION_GUARD_REDIRECT)?he:N(he):B(he,ce,Y)).then(he=>{if(he){if(si(he,sn.NAVIGATION_GUARD_REDIRECT))return R(wt({replace:V},b(he.to),{state:typeof he.to=="object"?wt({},Le,he.to.state):Le,force:D}),pe||ce)}else he=$(ce,Y,!0,V,Le);return A(ce,Y,he),he})}function w(W,pe){const ue=k(W,pe);return ue?Promise.reject(ue):Promise.resolve()}function P(W){const pe=le.values().next().value;return pe&&typeof pe.runWithContext=="function"?pe.runWithContext(W):W()}function I(W,pe){let ue;const[Y,Le,D]=oX(W,pe);ue=Hm(Y.reverse(),"beforeRouteLeave",W,pe);for(const X of Y)X.leaveGuards.forEach(ce=>{ue.push(Gi(ce,W,pe))});const V=w.bind(null,W,pe);return ue.push(V),be(ue).then(()=>{ue=[];for(const X of i.list())ue.push(Gi(X,W,pe));return ue.push(V),be(ue)}).then(()=>{ue=Hm(Le,"beforeRouteUpdate",W,pe);for(const X of Le)X.updateGuards.forEach(ce=>{ue.push(Gi(ce,W,pe))});return ue.push(V),be(ue)}).then(()=>{ue=[];for(const X of D)if(X.beforeEnter)if(ws(X.beforeEnter))for(const ce of X.beforeEnter)ue.push(Gi(ce,W,pe));else ue.push(Gi(X.beforeEnter,W,pe));return ue.push(V),be(ue)}).then(()=>(W.matched.forEach(X=>X.enterCallbacks={}),ue=Hm(D,"beforeRouteEnter",W,pe,P),ue.push(V),be(ue))).then(()=>{ue=[];for(const X of o.list())ue.push(Gi(X,W,pe));return ue.push(V),be(ue)}).catch(X=>si(X,sn.NAVIGATION_CANCELLED)?X:Promise.reject(X))}function A(W,pe,ue){a.list().forEach(Y=>P(()=>Y(W,pe,ue)))}function $(W,pe,ue,Y,Le){const D=k(W,pe);if(D)return D;const V=pe===$i,X=Ga?history.state:{};ue&&(Y||V?s.replace(W.fullPath,wt({scroll:V&&X&&X.scroll},Le)):s.push(W.fullPath,Le)),l.value=W,se(W,pe,ue,V),N()}let K;function M(){K||(K=s.listen((W,pe,ue)=>{if(!J.listening)return;const Y=S(W),Le=C(Y,J.currentRoute.value);if(Le){R(wt(Le,{replace:!0,force:!0}),Y).catch(Qu);return}u=Y;const D=l.value;Ga&&JY(Ak(D.fullPath,ue.delta),Tp()),I(Y,D).catch(V=>si(V,sn.NAVIGATION_ABORTED|sn.NAVIGATION_CANCELLED)?V:si(V,sn.NAVIGATION_GUARD_REDIRECT)?(R(wt(b(V.to),{force:!0}),Y).then(X=>{si(X,sn.NAVIGATION_ABORTED|sn.NAVIGATION_DUPLICATED)&&!ue.delta&&ue.type===xy.pop&&s.go(-1,!1)}).catch(Qu),Promise.reject()):(ue.delta&&s.go(-ue.delta,!1),B(V,Y,D))).then(V=>{V=V||$(Y,D,!1),V&&(ue.delta&&!si(V,sn.NAVIGATION_CANCELLED)?s.go(-ue.delta,!1):ue.type===xy.pop&&si(V,sn.NAVIGATION_ABORTED|sn.NAVIGATION_DUPLICATED)&&s.go(-1,!1)),A(Y,D,V)}).catch(Qu)}))}let L=wu(),j=wu(),G;function B(W,pe,ue){N(W);const Y=j.list();return Y.length?Y.forEach(Le=>Le(W,pe,ue)):console.error(W),Promise.reject(W)}function q(){return G&&l.value!==$i?Promise.resolve():new Promise((W,pe)=>{L.add([W,pe])})}function N(W){return G||(G=!W,M(),L.list().forEach(([pe,ue])=>W?ue(W):pe()),L.reset()),W}function se(W,pe,ue,Y){const{scrollBehavior:Le}=e;if(!Ga||!Le)return Promise.resolve();const D=!ue&&ZY(Ak(W.fullPath,0))||(Y||!ue)&&history.state&&history.state.scroll||null;return ot().then(()=>Le(W,pe,D)).then(V=>V&&QY(V)).catch(V=>B(V,W,pe))}const z=W=>s.go(W);let U;const le=new Set,J={currentRoute:l,listening:!0,addRoute:p,removeRoute:v,clearRoutes:t.clearRoutes,hasRoute:y,getRoutes:m,resolve:S,options:e,push:T,replace:_,go:z,back:()=>z(-1),forward:()=>z(1),beforeEach:i.add,beforeResolve:o.add,afterEach:a.add,onError:j.add,isReady:q,install(W){W.component("RouterLink",TX),W.component("RouterView",AX),W.config.globalProperties.$router=J,Object.defineProperty(W.config.globalProperties,"$route",{enumerable:!0,get:()=>Q(l)}),Ga&&!U&&l.value===$i&&(U=!0,T(s.location).catch(Y=>{}));const pe={};for(const Y in $i)Object.defineProperty(pe,Y,{get:()=>l.value[Y],enumerable:!0});W.provide(Rp,J),W.provide(zS,Fh(pe)),W.provide(Cy,l);const ue=W.unmount;le.add(W),W.unmount=function(){le.delete(W),le.size<1&&(u=$i,K&&K(),K=null,l.value=$i,U=!1,G=!1),ue()}}};function be(W){return W.reduce((pe,ue)=>pe.then(()=>P(ue)),Promise.resolve())}return J}function _o(){return je(Rp)}function PD(e){return je(zS)}const DX={class:"text-center"},MX={class:"float-end"},LX=Me({__name:"PrintJobsMenu",setup(e){const t=Jn(),n=H(""),r=H(!1),s=O(()=>t.printersWithJob.filter(a=>{const u=a.job?.job?.file.name?.toLowerCase()||"",c=a.printer.printerURL?.toLowerCase()||"",d=a.printer.name?.toLowerCase()||"",f=`${u} ${c} ${d}`;return!n.value||f.includes(n.value.toLowerCase())})),i=O(()=>s.value.length||0);function o(a){return a?a?.toFixed(0):""}return we(r,()=>{n.value=""}),(a,l)=>(F(),ge("div",DX,[h(xp,{modelValue:Q(r),"onUpdate:modelValue":l[3]||(l[3]=u=>Ye(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:g(({props:u})=>[h(te,de({color:Q(i)?"green":"secondary",dark:""},u),{default:g(()=>[E("span",null," Print jobs "+re(Q(i)?`(${Q(i)})`:""),1),h(Z,{end:""},{default:g(()=>[...l[4]||(l[4]=[x(" work ",-1)])]),_:1})]),_:1},16,["color"])]),default:g(()=>[h(mt,{class:"d-flex flex-column","min-width":"300"},{default:g(()=>[h(Dt,{style:{"overflow-y":"hidden","flex-shrink":"0"}},{default:g(()=>[h(Ne,null,{prepend:g(()=>[h(st,{class:"font-weight-bold",color:"primary",size:"44"},{default:g(()=>[x(re(Q(i)),1)]),_:1})]),default:g(()=>[h(it,null,{default:g(()=>[l[7]||(l[7]=x(" Print Jobs ",-1)),E("span",MX,[h(te,{variant:"tonal",onClick:l[0]||(l[0]=u=>r.value=!1)},{default:g(()=>[h(Z,null,{default:g(()=>[...l[5]||(l[5]=[x("close",-1)])]),_:1}),l[6]||(l[6]=x("Close ",-1))]),_:1})])]),_:1}),h(Il,{class:"mt-2"},{default:g(()=>[h(et,{modelValue:Q(n),"onUpdate:modelValue":l[1]||(l[1]=u=>Ye(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}),h(en),h(Dt,{style:{"overflow-y":"auto","flex-shrink":"1"}},{default:g(()=>[Q(i)?fe("",!0):(F(),ee(Ne,{key:0},{default:g(()=>[...l[8]||(l[8]=[x(" No active prints ",-1)])]),_:1})),(F(!0),ge(Ie,null,Ht(Q(s),({printer:u,job:c})=>(F(),ee(Ne,{key:u.id,lines:"two"},{prepend:g(()=>[h(st,{size:"70"},{default:g(()=>[h(zs,{"model-value":c?.progress?.completion,width:5,color:"green",size:"50"},{default:g(()=>[x(re(o(c.progress?.completion)+"%"||""),1)]),_:2},1032,["model-value"])]),_:2},1024)]),default:g(()=>[h(it,null,{default:g(()=>[x(re(c.job?.file?.name),1)]),_:2},1024),h(pt,null,{default:g(()=>[x(" Elapsed: "+re(Math.round(c?.progress.printTime??0/60))+" minutes ",1),l[9]||(l[9]=E("br",null,null,-1)),x(" Printer: "+re(u.name),1)]),_:2},1024)]),_:2},1024))),128))]),_:1}),h(An,null,{default:g(()=>[h(yn),h(te,{onClick:l[2]||(l[2]=u=>r.value=!1)},{default:g(()=>[...l[10]||(l[10]=[x(" Close ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])]))}}),HS=is("profile",{state:()=>({username:null,isDemoUser:null,userId:null}),actions:{async getProfile(){return await qr.getProfile().then(e=>{this.username=e.username,this.userId=e.id,this.isDemoUser=e.isDemoUser})}}}),Bt={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 FX(e,t){return e.push({name:t})}async function ID(e){if(e.currentRoute.value.path==="/login"){console.log("routeToLogin: already at login page");return}return FX(e,Bt.Login)}const jk=!0,NX=()=>Object.freeze({apiKeyLength:43,maxPort:65535,maxPrinterNameLength:25,maxPrinterGroupNameLength:30,maxPrinterGroupLocationX:4,maxPrinterGroupLocationY:4,minPrinterFloorNameLength:3,minUsernameLength:3}),$X=is("tracked-uploads",()=>{const e=H([]),t=O(()=>e.value.filter(r=>!r.completed));function n(r){e.value.splice(0),e.value.push(...r)}return{current:e,setUploads:n,activeUploads:t}}),Ys=Object.create(null);Ys.open="0";Ys.close="1";Ys.ping="2";Ys.pong="3";Ys.message="4";Ys.upgrade="5";Ys.noop="6";const bf=Object.create(null);Object.keys(Ys).forEach(e=>{bf[Ys[e]]=e});const Ty={type:"error",data:"parser error"},AD=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",OD=typeof ArrayBuffer=="function",DD=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,jS=({type:e,data:t},n,r)=>AD&&t instanceof Blob?n?r(t):qk(t,r):OD&&(t instanceof ArrayBuffer||DD(t))?n?r(t):qk(new Blob([t]),r):r(Ys[e]+(t||"")),qk=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Wk(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let jm;function BX(e,t){if(AD&&e.data instanceof Blob)return e.data.arrayBuffer().then(Wk).then(t);if(OD&&(e.data instanceof ArrayBuffer||DD(e.data)))return t(Wk(e.data));jS(e,!1,n=>{jm||(jm=new TextEncoder),t(jm.encode(n))})}const Gk="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Au=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<Gk.length;e++)Au[Gk.charCodeAt(e)]=e;const VX=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=Au[e.charCodeAt(r)],o=Au[e.charCodeAt(r+1)],a=Au[e.charCodeAt(r+2)],l=Au[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},UX=typeof ArrayBuffer=="function",qS=(e,t)=>{if(typeof e!="string")return{type:"message",data:MD(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:zX(e.substring(1),t)}:bf[n]?e.length>1?{type:bf[n],data:e.substring(1)}:{type:bf[n]}:Ty},zX=(e,t)=>{if(UX){const n=VX(e);return MD(n,t)}else return{base64:!0,data:e}},MD=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,LD="",HX=(e,t)=>{const n=e.length,r=new Array(n);let s=0;e.forEach((i,o)=>{jS(i,!1,a=>{r[o]=a,++s===n&&t(r.join(LD))})})},jX=(e,t)=>{const n=e.split(LD),r=[];for(let s=0;s<n.length;s++){const i=qS(n[s],t);if(r.push(i),i.type==="error")break}return r};function qX(){return new TransformStream({transform(e,t){BX(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 qm;function Dd(e){return e.reduce((t,n)=>t+n.length,0)}function Md(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 WX(e,t){qm||(qm=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(Dd(n)<1)break;const l=Md(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(Dd(n)<2)break;const l=Md(n,2);s=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(Dd(n)<8)break;const l=Md(n,8),u=new DataView(l.buffer,l.byteOffset,l.length),c=u.getUint32(0);if(c>Math.pow(2,21)-1){a.enqueue(Ty);break}s=c*Math.pow(2,32)+u.getUint32(4),r=3}else{if(Dd(n)<s)break;const l=Md(n,s);a.enqueue(qS(i?l:qm.decode(l),t)),r=0}if(s===0||s>e){a.enqueue(Ty);break}}}})}const FD=4;function gn(e){if(e)return GX(e)}function GX(e){for(var t in gn.prototype)e[t]=gn.prototype[t];return e}gn.prototype.on=gn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};gn.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};gn.prototype.off=gn.prototype.removeListener=gn.prototype.removeAllListeners=gn.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};gn.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};gn.prototype.emitReserved=gn.prototype.emit;gn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};gn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Pp=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Kr=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),KX="arraybuffer";function ND(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const YX=Kr.setTimeout,XX=Kr.clearTimeout;function Ip(e,t){t.useNativeTimers?(e.setTimeoutFn=YX.bind(Kr),e.clearTimeoutFn=XX.bind(Kr)):(e.setTimeoutFn=Kr.setTimeout.bind(Kr),e.clearTimeoutFn=Kr.clearTimeout.bind(Kr))}const QX=1.33;function JX(e){return typeof e=="string"?ZX(e):Math.ceil((e.byteLength||e.size)*QX)}function ZX(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 $D(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function eQ(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function tQ(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 nQ extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class WS extends gn{constructor(t){super(),this.writable=!1,Ip(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 nQ(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=qS(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=eQ(t);return n.length?"?"+n:""}}class rQ extends WS{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)};jX(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,HX(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]=$D()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let BD=!1;try{BD=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const sQ=BD;function iQ(){}class oQ extends rQ{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 ll=class Sf extends gn{constructor(t,n,r){super(),this.createRequest=t,Ip(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=ND(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=Sf.requestsCount++,Sf.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=iQ,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Sf.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()}};ll.requestsCount=0;ll.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Kk);else if(typeof addEventListener=="function"){const e="onpagehide"in Kr?"pagehide":"unload";addEventListener(e,Kk,!1)}}function Kk(){for(let e in ll.requests)ll.requests.hasOwnProperty(e)&&ll.requests[e].abort()}const aQ=(function(){const e=VD({xdomain:!1});return e&&e.responseType!==null})();class lQ extends oQ{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=aQ&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new ll(VD,this.uri(),t)}}function VD(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||sQ))return new XMLHttpRequest}catch{}if(!t)try{return new Kr[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const UD=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class uQ extends WS{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=UD?{}:ND(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;jS(r,this.supportsBinary,i=>{try{this.doWrite(r,i)}catch{}s&&Pp(()=>{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]=$D()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Wm=Kr.WebSocket||Kr.MozWebSocket;class cQ extends uQ{createSocket(t,n,r){return UD?new Wm(t,n,r):n?new Wm(t,n):new Wm(t)}doWrite(t,n){this.ws.send(n)}}class dQ extends WS{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=WX(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),s=qX();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&&Pp(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const fQ={websocket:cQ,webtransport:dQ,polling:lQ},hQ=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,pQ=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Ry(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=hQ.exec(e||""),i={},o=14;for(;o--;)i[pQ[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=mQ(i,i.path),i.queryKey=gQ(i,i.query),i}function mQ(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 gQ(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,i){s&&(n[s]=i)}),n}const Py=typeof addEventListener=="function"&&typeof removeEventListener=="function",wf=[];Py&&addEventListener("offline",()=>{wf.forEach(e=>e())},!1);class eo extends gn{constructor(t,n){if(super(),this.binaryType=KX,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=Ry(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=Ry(n.host).host);Ip(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=tQ(this.opts.query)),Py&&(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"})},wf.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=FD,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&&eo.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",eo.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+=JX(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,Pp(()=>{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(eo.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(),Py&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=wf.indexOf(this._offlineEventListener);r!==-1&&wf.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}eo.protocol=FD;class vQ extends eo{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;eo.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;eo.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 yQ=class extends vQ{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=>fQ[s]).filter(s=>!!s)),super(t,r)}};function bQ(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=Ry(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 SQ=typeof ArrayBuffer=="function",wQ=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,zD=Object.prototype.toString,_Q=typeof Blob=="function"||typeof Blob<"u"&&zD.call(Blob)==="[object BlobConstructor]",kQ=typeof File=="function"||typeof File<"u"&&zD.call(File)==="[object FileConstructor]";function GS(e){return SQ&&(e instanceof ArrayBuffer||wQ(e))||_Q&&e instanceof Blob||kQ&&e instanceof File}function _f(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(_f(e[n]))return!0;return!1}if(GS(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return _f(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&_f(e[n]))return!0;return!1}function xQ(e){const t=[],n=e.data,r=e;return r.data=Iy(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Iy(e,t){if(!e)return e;if(GS(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]=Iy(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]=Iy(e[r],t));return n}return e}function EQ(e,t){return e.data=Ay(e.data,t),delete e.attachments,e}function Ay(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]=Ay(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Ay(e[n],t));return e}const CQ=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],TQ=5;var ct;(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"})(ct||(ct={}));class RQ{constructor(t){this.replacer=t}encode(t){return(t.type===ct.EVENT||t.type===ct.ACK)&&_f(t)?this.encodeAsBinary({type:t.type===ct.EVENT?ct.BINARY_EVENT:ct.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===ct.BINARY_EVENT||t.type===ct.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=xQ(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}function Yk(e){return Object.prototype.toString.call(e)==="[object Object]"}class KS extends gn{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===ct.BINARY_EVENT;r||n.type===ct.BINARY_ACK?(n.type=r?ct.EVENT:ct.ACK,this.reconstructor=new PQ(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(GS(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(ct[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===ct.BINARY_EVENT||r.type===ct.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(KS.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 ct.CONNECT:return Yk(n);case ct.DISCONNECT:return n===void 0;case ct.CONNECT_ERROR:return typeof n=="string"||Yk(n);case ct.EVENT:case ct.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&CQ.indexOf(n[0])===-1);case ct.ACK:case ct.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class PQ{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=EQ(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const IQ=Object.freeze(Object.defineProperty({__proto__:null,Decoder:KS,Encoder:RQ,get PacketType(){return ct},protocol:TQ},Symbol.toStringTag,{value:"Module"}));function hs(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const AQ=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class HD extends gn{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=[hs(t,"open",this.onopen.bind(this)),hs(t,"packet",this.onpacket.bind(this)),hs(t,"error",this.onerror.bind(this)),hs(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(AQ.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:ct.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)=>(this._queue[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:ct.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 ct.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 ct.EVENT:case ct.BINARY_EVENT:this.onevent(t);break;case ct.ACK:case ct.BINARY_ACK:this.onack(t);break;case ct.DISCONNECT:this.ondisconnect();break;case ct.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:ct.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._drainQueue(!0),this.emitReserved("connect")}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:ct.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 au(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}au.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)==0?e-n:e+n}return Math.min(e,this.max)|0};au.prototype.reset=function(){this.attempts=0};au.prototype.setMin=function(e){this.ms=e};au.prototype.setMax=function(e){this.max=e};au.prototype.setJitter=function(e){this.jitter=e};class Oy extends gn{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,Ip(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 au({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||IQ;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 yQ(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const s=hs(n,"open",function(){r.onopen(),t&&t()}),i=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},o=hs(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(hs(t,"ping",this.onping.bind(this)),hs(t,"data",this.ondata.bind(this)),hs(t,"error",this.onerror.bind(this)),hs(t,"close",this.onclose.bind(this)),hs(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){Pp(()=>{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 HD(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 _u={};function kf(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=bQ(e,t.path||"/socket.io"),r=n.source,s=n.id,i=n.path,o=_u[s]&&i in _u[s].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return a?l=new Oy(r,t):(_u[s]||(_u[s]=new Oy(r,t)),l=_u[s]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(kf,{Manager:Oy,Socket:HD,io:kf,connect:kf});let Jt=null;const wn=on({connected:!1,setup:!1,id:"",active:!1});class OQ{printerStore=Vt();floorStore=Li();printerStateStore=Jn();testPrinterStore=VS();trackedUploadsStore=$X();snackbar=Rt();authStore=Zr();socketState(){return Jt?{setup:!0,connected:Jt.connected,active:Jt.active,id:Jt.id}:(console.debug("Returning default socket state, socket was not set up"),{setup:!1})}async setupSocketConnection(){if(console.debug("Setting up socket.io client"),wn.setup)throw new Error("Cant setup socket, socket already created");wn.setup=!1;const t=await jA();this.authStore.loadTokens(),Jt=kf(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(),wn.setup=!0}disconnect(){if(!Jt)throw new Error("Cant disconnect socket, socket not created");Jt.close(),Jt=null,wn.setup=!1,wn.connected=!1,wn.active=!1,wn.id=""}reconnect(){if(!Jt)throw new Error("Cant reconnect socket, socket not created");console.debug("Resetting socket connection. Previous state:",{connected:Jt.connected,active:Jt.active,id:Jt.id}),Jt.close(),Jt.connect()}onMessage(t){t.trackedUploads.current?.length&&(this.trackedUploadsStore.setUploads(t?.trackedUploads.current),this.trackedUploadsStore.activeUploads.forEach(n=>{this.snackbar.openProgressMessage(n.correlationToken,n.multerFile.originalname,(n.progress||0)*100,n.completed)})),t.floors?.length&&this.floorStore.saveFloors(t.floors),t.printers?.length&&this.printerStore.setPrinters(t.printers),t.socketStates&&this.printerStateStore.setSocketStates(t.socketStates),t.printerEvents&&this.printerStateStore.setPrinterEvents(t.printerEvents)}setupConnectionHandlers(){if(!Jt)throw new Error("Cant bind socket events, socket not created");Jt.on("connect",()=>{wn.id=Jt?.id??"",wn.connected=!0,wn.active=Jt?.active??!1,console.debug("Socket connected:",wn.id,"Active:",wn.active),Rn("server:connected").emit({})}),Jt.on("disconnect",()=>{wn.id="",wn.connected=!1,wn.active=!1,console.debug("Socket disconnected"),Rn("server:disconnected").emit({})}),Jt.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 Rn("server:disconnected").emit({})})}registerMessageHandlers(){if(!Jt)throw new Error("Cant bind socket app events, socket not created");Jt.on("legacy-update",t=>this.onMessage(t)),Jt.on("test-printer-state",t=>{this.testPrinterStore.saveEvent(t)})}}const DQ=oe({scrollTarget:{type:String},scrollThreshold:{type:[String,Number],default:300}},"scroll");function MQ(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{canScroll:n,layoutSize:r}=t;let s=0,i=0;const o=H(null),a=ke(0),l=ke(0),u=ke(0),c=ke(!1),d=ke(!1),f=ke(!1),p=ke(!1),v=ke(!0),m=O(()=>Number(e.scrollThreshold)),y=O(()=>In((m.value-a.value)/m.value||0));function S(_){const C="window"in _?window.innerHeight:_.clientHeight,R="window"in _?document.documentElement.scrollHeight:_.scrollHeight;return{clientHeight:C,scrollHeight:R}}function b(){const _=o.value;if(!_)return;const{clientHeight:C,scrollHeight:R}=S(_),w=R-C,P=r?.value||0,I=m.value+P;v.value=w>I}function k(){b()}function T(){const _=o.value;if(!_||n&&!n.value)return;s=a.value,a.value="window"in _?_.pageYOffset:_.scrollTop;const C=_ instanceof Window?document.documentElement.scrollHeight:_.scrollHeight;i!==C&&(C>i&&b(),i=C),d.value=a.value<s,u.value=Math.abs(a.value-m.value);const{clientHeight:R,scrollHeight:w}=S(_),P=a.value+R>=w-5;!d.value&&P&&a.value>=m.value&&v.value&&(p.value=!0);const I=Math.abs(a.value-s)>100,A=a.value<=5;(d.value&&s-a.value>1&&!P||I&&a.value<m.value||A)&&(p.value=!1),f.value=P}return we(d,()=>{l.value=l.value||a.value}),we(c,()=>{l.value=0}),gt(()=>{we(()=>e.scrollTarget,_=>{const C=_?document.querySelector(_):window;C&&C!==o.value&&(o.value?.removeEventListener("scroll",T),o.value=C,o.value.addEventListener("scroll",T,{passive:!0}),Promise.resolve().then(()=>{b()}))},{immediate:!0}),window.addEventListener("resize",k,{passive:!0})}),Vn(()=>{o.value?.removeEventListener("scroll",T),window.removeEventListener("resize",k)}),n&&we(n,T,{immediate:!0}),{scrollThreshold:m,currentScroll:a,currentThreshold:u,isScrollActive:c,scrollRatio:y,isScrollingUp:d,savedScroll:l,isAtBottom:f,reachedBottomWhileScrollingDown:p,hasEnoughScrollableSpace:v}}const LQ=oe({scrollBehavior:String,modelValue:{type:Boolean,default:!0},location:{type:String,default:"top",validator:e=>["top","bottom"].includes(e)},...gD(),...AO(),...DQ(),height:{type:[Number,String],default:64}},"VAppBar"),jD=_e()({name:"VAppBar",props:LQ(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=H(),s=tt(e,"modelValue"),i=O(()=>{const C=new Set(e.scrollBehavior?.split(" ")??[]);return{hide:C.has("hide"),fullyHide:C.has("fully-hide"),inverted:C.has("inverted"),collapse:C.has("collapse"),elevate:C.has("elevate"),fadeImage:C.has("fade-image")}}),o=O(()=>{const C=i.value;return C.hide||C.fullyHide||C.inverted||C.collapse||C.elevate||C.fadeImage||!s.value}),a=O(()=>{const C=r.value?.contentHeight??0,R=r.value?.extensionHeight??0;return C+R}),{currentScroll:l,scrollThreshold:u,isScrollingUp:c,scrollRatio:d,isAtBottom:f,reachedBottomWhileScrollingDown:p,hasEnoughScrollableSpace:v}=MQ(e,{canScroll:o,layoutSize:a}),m=ne(()=>i.value.hide||i.value.fullyHide),y=O(()=>e.collapse||i.value.collapse&&(i.value.inverted?d.value>0:d.value===0)),S=O(()=>e.flat||i.value.fullyHide&&!s.value||i.value.elevate&&(i.value.inverted?l.value>0:l.value===0)),b=O(()=>i.value.fadeImage?i.value.inverted?1-d.value:d.value:void 0),k=O(()=>{if(i.value.hide&&i.value.inverted)return 0;const C=r.value?.contentHeight??0,R=r.value?.extensionHeight??0;return m.value?l.value<u.value||i.value.fullyHide?C+R:C:C+R});kr(()=>!!e.scrollBehavior,()=>{vn(()=>{if(!m.value){s.value=!0;return}if(i.value.inverted){s.value=l.value>u.value;return}if(!v.value){s.value=!0;return}if(p.value){s.value=!1;return}s.value=c.value&&!f.value||l.value<u.value})});const{ssrBootStyles:T}=od(),{layoutItemStyles:_}=DO({id:e.name,order:O(()=>parseInt(e.order,10)),position:ne(()=>e.location),layoutSize:k,elementSize:ke(void 0),active:s,absolute:ne(()=>e.absolute)});return Ae(()=>{const C=ur.filterProps(e);return h(ur,de({ref:r,class:["v-app-bar",{"v-app-bar--bottom":e.location==="bottom"},e.class],style:[{..._.value,"--v-toolbar-image-opacity":b.value,height:void 0,...T.value},e.style]},C,{collapse:y.value,flat:S.value}),n)}),{}}}),FQ=oe({...bn(xR({icon:"$menu",variant:"text"}),["spaced"])},"VAppBarNavIcon"),NQ=_e()({name:"VAppBarNavIcon",props:FQ(),setup(e,t){let{slots:n}=t;return Ae(()=>h(te,de(e,{class:["v-app-bar-nav-icon"]}),n)),{}}}),$Q={key:1,class:"text-uppercase text--white"},BQ={key:3,class:"ml-2"},VQ={key:4,class:"ml-2"},UQ=Me({__name:"TopBar",setup(e){const t=HS(),n=Zr(),r=_o(),s=[{title:"Open Profile",icon:"person",path:"/settings/account"}],i=H(Date.now());YF(()=>{i.value=Date.now()},1e3);const o=O(()=>{if(!n.tokenClaims?.exp)return"";const c=n.tokenClaims.exp-i.value/1e3;return`${Math.round(c)}s`}),a=O(()=>t.username),l=O(()=>n.isDemoMode);async function u(){await n.logout(!0),await ID(r)}return(c,d)=>{const f=CY,p=EY;return F(),ee(jD,{elevation:"0"},{default:g(()=>[h(Tn,{class:"text-uppercase text-white"},{default:g(()=>[...d[1]||(d[1]=[E("span",{class:"font-weight-light"}," FDM ",-1),E("strong",null," Monster ",-1)])]),_:1}),l.value?(F(),ee(yn,{key:0})):fe("",!0),l.value?(F(),ge("h2",$Q," DEMO MODE ")):fe("",!0),h(yn),h(LX),Q(n).hasAuthToken&&!Q(n).isLoginExpired?(F(),ee(xp,{key:2,"close-on-content-click":!1,location:"bottom right","open-on-hover":"",transition:"slide-y-transition"},{activator:g(({props:v})=>[h(te,de({class:"ml-2",color:"secondary",theme:"dark"},v),{default:g(()=>[h(Z,{class:"mr-2"},{default:g(()=>[...d[2]||(d[2]=[x("person",-1)])]),_:1}),x(" "+re(a.value),1)]),_:1},16)]),default:g(()=>[h(Dt,null,{default:g(()=>[(F(),ge(Ie,null,Ht(s,(v,m)=>h(Ne,{key:m,to:v.path,title:v.title,"prepend-avatar":v.icon,link:""},null,8,["to","title","prepend-avatar"])),64))]),_:1})]),_:1})):fe("",!0),Q(jk)&&o.value?(F(),ge("span",BQ," AuthExp "+re(o.value),1)):fe("",!0),Q(jk)?(F(),ge("span",VQ,[E("small",null," S"+re(Q(wn).setup?1:0)+" C"+re(Q(wn).connected?1:0)+" A"+re(Q(wn).active?1:0)+" "+re(Q(wn).id),1)])):fe("",!0),Q(n).loginRequired===!0?(F(),ee(f,{key:5,tooltip:"Go back to login",text:"Logout",color:"secondary",icon:"logout",onClick:d[0]||(d[0]=v=>u())})):fe("",!0),Q(n).loginRequired===!0?(F(),ee(te,{key:6,class:"ml-2"},{default:g(()=>[h(Z,{class:"mr-2"},{default:g(()=>[...d[3]||(d[3]=[x("logout",-1)])]),_:1}),d[4]||(d[4]=x(" Logout ",-1))]),_:1})):fe("",!0),h(p)]),_:1})}}}),YS="/assets/logo-CJVdjy51.png",zQ=Me({__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)=>(F(),ee(TS,{permanent:"",rail:""},{default:g(()=>[h(NQ,{class:"ml-1 mt-2"},{default:g(()=>[h(ts,{alt:"FDM Monster Logo",src:Q(YS),class:"shrink mr-1 pt-3 ml-1",transition:"scale-transition",width:"40"},null,8,["src"])]),_:1}),h(en),h(Dt,{density:"compact",nav:""},{default:g(()=>[(F(),ge(Ie,null,Ht(t,([s,i,o],a)=>h(Ne,{key:a,to:o,"prepend-icon":s,title:i,density:"comfortable","router-link":""},null,8,["to","prepend-icon","title"])),64))]),_:1})]),_:1}))}});function HQ(e){const t=ke(e());let n=-1;function r(){clearInterval(n)}function s(){r(),ot(()=>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 Qt(r),{clear:r,time:t,start:i,reset:s}}const jQ=oe({multiLine:Boolean,text:String,timer:[Boolean,String],timeout:{type:[Number,String],default:5e3},vertical:Boolean,...vo({location:"bottom"}),...Hl(),...On(),...xs(),...Pt(),...bn(Hc({transition:"v-snackbar-transition"}),["persistent","noClickAnimation","retainFocus","captureFocus","disableInitialFocus","scrim","scrollStrategy","stickToTarget","viewportMargin"])},"VSnackbar"),XS=_e()({name:"VSnackbar",props:jQ(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=tt(e,"modelValue"),{positionClasses:s}=jl(e),{scopeId:i}=ql(),{themeClasses:o}=Wt(e),{colorClasses:a,colorStyles:l,variantClasses:u}=xa(e),{roundedClasses:c}=zn(e),d=HQ(()=>Number(e.timeout)),f=H(),p=H(),v=ke(!1),m=ke(0),y=H(),S=je(xc,void 0);kr(()=>!!S,()=>{const A=OO();vn(()=>{y.value=A.mainStyles.value})}),we(r,k),we(()=>e.timeout,k),gt(()=>{r.value&&k()});let b=-1;function k(){d.reset(),window.clearTimeout(b);const A=Number(e.timeout);if(!r.value||A===-1)return;const $=ub(p.value);d.start($),b=window.setTimeout(()=>{r.value=!1},A)}function T(){d.reset(),window.clearTimeout(b)}function _(){v.value=!0,T()}function C(){v.value=!1,k()}function R(A){m.value=A.touches[0].clientY}function w(A){Math.abs(m.value-A.changedTouches[0].clientY)>50&&(r.value=!1)}function P(){v.value&&C()}const I=O(()=>e.location.split(" ").reduce((A,$)=>(A[`v-snackbar--${$}`]=!0,A),{}));return Ae(()=>{const A=Ei.filterProps(e),$=!!(n.default||n.text||e.text);return h(Ei,de({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},I.value,s.value,e.class],style:[y.value,e.style]},A,{modelValue:r.value,"onUpdate:modelValue":K=>r.value=K,contentProps:de({class:["v-snackbar__wrapper",o.value,a.value,c.value,u.value],style:[l.value],onPointerenter:_,onPointerleave:C},A.contentProps),persistent:!0,noClickAnimation:!0,scrim:!1,scrollStrategy:"none",_disableGlobalStack:!0,onTouchstartPassive:R,onTouchend:w,onAfterLeave:P},i),{default:()=>[go(!1,"v-snackbar"),e.timer&&!v.value&&E("div",{key:"timer",class:"v-snackbar__timer"},[h(vl,{ref:p,color:typeof e.timer=="string"?e.timer:"info",max:e.timeout,modelValue:d.time.value},null)]),$&&E("div",{key:"content",class:"v-snackbar__content",role:"status","aria-live":"polite"},[n.text?.()??e.text,n.default?.()]),n.actions&&h(Tt,{defaults:{VBtn:{variant:"text",ripple:!1,slim:!0}}},{default:()=>[E("div",{class:"v-snackbar__actions"},[n.actions({isActive:r})])]})],activator:n.activator})}),us({},f)}}),qQ={style:{width:"100%"}},WQ={class:"font-weight-bold text-button"},GQ=Me({__name:"AppProgressSnackbar",setup(e){const t=Rt(),n=H(!1),r=H(""),s=H([]),i=H(100);function o(u){return s.value.find(c=>c.key===u)}function a(u,c,d=0,f=!1,p=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:p,timeoutAt:void 0})}function l(u){s.value=s.value.filter(c=>c.key!==u)}return gt(()=>{setInterval(()=>{if(s.value.length){for(const u of s.value){const{value:c,completed:d,expiresAt:f,key:p}=u;(d||c>=100)&&f<Date.now()||u.timeoutAt&&u.timeoutAt<Date.now()?l(p):!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:p}=u,v=o(c);if(v)Math.min(100,d)>=v.value&&(v.expiresAt=Date.now()+1500,v.value=d,v.completed=p);else{if(d>=100)return;a(c,f,d,!1,Date.now()+1500)}r.value="Uploading files"})}),(u,c)=>(F(),ee(XS,{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:g(()=>[h(Je,null,{default:g(()=>[h(Ve,{cols:"2"},{default:g(()=>[h(te,{icon:"file_upload",size:"large"})]),_:1}),h(Ve,{class:"d-flex align-center flex-row",cols:"8"},{default:g(()=>[E("div",qQ,[E("span",WQ,re(r.value),1),(F(!0),ge(Ie,null,Ht(s.value,(d,f)=>(F(),ge("div",{key:f,class:"mb-2"},[d.completed?(F(),ee(Z,{key:0},{default:g(()=>[...c[2]||(c[2]=[x("check",-1)])]),_:1})):d.timeoutAt?(F(),ee(Z,{key:1},{default:g(()=>[...c[3]||(c[3]=[x("pause",-1)])]),_:1})):(F(),ee(Z,{key:2},{default:g(()=>[...c[4]||(c[4]=[x("hourglass_bottom",-1)])]),_:1})),x(" "+re(d.title)+" "+re((d.completed?100:d.value).toFixed(1))+"% ",1),c[5]||(c[5]=E("br",null,null,-1)),(F(),ee(vl,{key:d.key,"model-value":d.completed?100:d.value,color:d.timeoutAt?"red":"success"},null,8,["model-value","color"]))]))),128))])]),_:1}),h(Ve,{cols:"1"},{default:g(()=>[h(te,{icon:"close",size:"large",onClick:c[0]||(c[0]=d=>n.value=!1)})]),_:1})]),_:1})]),_:1},8,["modelValue","timeout"]))}}),KQ={class:"font-weight-bold text-button"},YQ={key:0},XQ=Me({__name:"AppErrorSnackbar",setup(e){const t=Rt(),n=H(-1),r=H(!1),s=H(""),i=H("");return gt(()=>{t.onErrorMessage(o=>{s.value=o.title,i.value=o.subtitle??"",r.value=!0,n.value=o.timeout??1e4})}),(o,a)=>(F(),ee(XS,{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:g(()=>[h(Je,null,{default:g(()=>[h(Ve,{cols:"2"},{default:g(()=>[h(te,{icon:"error"})]),_:1}),h(Ve,{class:"d-flex align-center flex-row",cols:"8"},{default:g(()=>[E("div",null,[E("span",KQ,re(s.value),1),i.value?.length?(F(),ge("div",YQ,re(i.value),1)):fe("",!0)])]),_:1}),h(Ve,{cols:"1"},{default:g(()=>[h(te,{icon:"close",onClick:a[0]||(a[0]=l=>r.value=!1)})]),_:1})]),_:1})]),_:1},8,["modelValue","timeout"]))}}),QQ={class:"font-weight-bold text-button"},JQ={key:0},ZQ=Me({__name:"AppInfoSnackbar",setup(e){const t=Rt(),n=H(!1),r=H(""),s=H(""),i=H(2e3),o=H(!1);return gt(()=>{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)=>(F(),ee(XS,{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:g(()=>[h(Je,null,{default:g(()=>[h(Ve,{cols:"2"},{default:g(()=>[h(te,{icon:"info"})]),_:1}),h(Ve,{cols:"8",class:"d-flex align-center flex-row"},{default:g(()=>[E("div",null,[E("span",QQ,re(r.value),1),s.value?.length?(F(),ge("div",JQ,re(s.value),1)):fe("",!0)])]),_:1}),h(Ve,{cols:"2"},{default:g(()=>[h(te,{icon:"close",onClick:l[0]||(l[0]=u=>n.value=!1)})]),_:1})]),_:1})]),_:1},8,["modelValue","color","timeout"]))}}),QS=is("Uploads",{state:()=>({queuedUploads:[],failedUploads:[],uploadingNow:!1}),getters:{hasPendingUploads(e){return e.queuedUploads?.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(){const e=Rt();if(!this.queuedUploads?.length)return;this.uploadingNow=!0;const{file:t,printer:n,startPrint:r}=this.nextUpload;this.queuedUploads.splice(0,1);try{await bi.uploadFile(n,t,r)}catch(s){if(s.isAxiosError){const i={file:t,printer:n,error:s,startPrint:!1};this.failedUploads.push(i),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}}}),Xk="/img/OIG.JYDC2RaWdz7g9.jpg",Ia=(e,t)=>{const n=e.__vccOpts||e;for(const[r,s]of t)n[r]=s;return n},eJ=e=>Math.random()*e,tJ={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:eJ,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 nJ(e,t,n,r,s,i){return n.loading?(F(),ge("div",{key:0,style:De(i.getWrapperStyle())},[(F(),ge(Ie,null,Ht(9,o=>E("div",{key:o,style:De(i.getCircleStyle(i.random(100)))},null,4)),64))],4)):fe("",!0)}const qD=Ia(tJ,[["render",nJ]]);function WD(e){const t=lt();t.getOptions().enabled=e,console.warn("Sentry enabled:",e)}const rJ=e=>new Promise(t=>setTimeout(t,e)),sJ={key:1},iJ={key:2,style:{margin:"50px"}},oJ={class:"mt-2 mb-2"},aJ={key:0,class:"mt-2 mb-2"},lJ={key:1,class:"mt-2 mb-2"},uJ={key:3,style:{animation:"fadeIn 0.75s"}},cJ=Me({__name:"AppLoader",setup(e){const t=Zr(),n=Ts(),r=_p(),s=HS(),i=H(!1),o=_o(),a=H(""),l=H(!0),u=H(),c=H(),d=H(),f=H(),p=Rt(),v=new OQ;function m(){window.location.reload()}function y(){navigator.clipboard.writeText(JSON.stringify(u.value)),p.openInfoMessage({title:"Copied",subtitle:"Error copied to clipboard"})}function S(I,A=""){I?(a.value=A,u.value=null,d.value=null,f.value=null):a.value="",i.value=I}async function b(){try{await n.loadSettings(),await r.loadFeatures(),await s.getProfile();const I=n.serverSettings?.sentryDiagnosticsEnabled;WD(!!I)}catch(I){console.log("Error when loading settings.",I),p.openErrorMessage({title:"Error",subtitle:"Error when loading settings, features and/or profile."}),Gs(I)}v.socketState().setup?v.reconnect():await v.setupSocketConnection(),l.value=!1,S(!1)}return Rn("auth:permission-denied").on(async I=>{console.log("[AppLoader] Permission denied, going to permission denied page"),S(!0,"Permission denied"),await o.push({name:Bt.PermissionDenied,query:{roles:I?.roles,page:String(o.currentRoute.value.name),permissions:I?.permissions,error:I?.error,url:I?.url}}),S(!1)}),Rn("auth:failure").on(async I=>{console.debug(`[AppLoader] Event received: 'auth:failure', going back to login, context: ${I}`),S(!0,"Authentication failed, going back to login"),o.currentRoute.value.name!==Bt.Login&&await o.push({name:Bt.Login}),S(!1)}),Rn("auth:login").on(async()=>{console.debug("[AppLoader] Event received: 'auth:login', loading app"),S(!0,"Loading app"),await b()}),Rn(`auth:${yr.AccountNotVerified}`).on(async()=>{console.debug(`[AppLoader] Event received: 'auth:${yr.AccountNotVerified}', going to login`),p.error("Account not verified, please ask an administrator to verify your account."),S(!0,"Account not verified, please ask an administrator to verify your account."),o.currentRoute.value.name!==Bt.Login&&await o.push({name:Bt.Login}),S(!1)}),Rn(`auth:${yr.PasswordChangeRequired}`).on(async()=>{console.debug(`[AppLoader] Event received: 'auth:${yr.PasswordChangeRequired}', going to login`),p.error("Password change required, please change your password."),S(!0,"Password change required, please change your password."),o.currentRoute.value.name!==Bt.Login&&await o.push({name:Bt.Login}),S(!1)}),Rn("server:disconnected").on(async I=>{S(!0),c.value=!0,l.value=!0}),Rn("server:connected").on(async I=>{S(!1),c.value=!1,l.value=!1}),zh(()=>{v.socketState().setup&&v.disconnect()}),Nl(async()=>{l.value=!0;const I=["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"],A=I[Math.floor(Math.random()*I.length)];S(!0,A);try{await jo.test()}catch(M){l.value=!1,c.value=!0,Gs(M);return}const{loginRequired:$,wizardState:K}=await t.checkAuthenticationRequirements();if(!K.wizardCompleted){console.debug("[AppLoader] Wizard not completed, going to wizard"),await t.logout(!1),o.currentRoute.value.name!==Bt.FirstTimeSetup&&await o.replace({name:Bt.FirstTimeSetup}),S(!1);return}if(!$)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"),S(!1);S(!0,"Refreshing login"),console.debug("[AppLoader] Verifying or refreshing login once");try{const{success:M,handled:L}=await t.verifyOrRefreshLoginOnceOrLogout();if(L){console.debug("[AppLoader] received handled event, hiding overlay");return}if(!M){console.debug("[AppLoader] No success refreshing"),S(!0,"Login expired, going back to login"),await rJ(500),o.currentRoute.value.name!==Bt.Login&&await o.push({name:Bt.Login}),S(!1);return}}catch(M){console.log("[AppLoader] Error when refreshing login",M),l.value=!1,u.value=M.message,d.value=M.config?.url,f.value=M.response?.data,Gs(M);return}console.debug("[AppLoader] Loading app"),await b()}),(I,A)=>(F(),ge(Ie,null,[h(Ei,{modelValue:i.value,"onUpdate:modelValue":A[3]||(A[3]=$=>i.value=$),opacity:"0.98",style:{"z-index":"7"}},{default:g(()=>[l.value?(F(),ee(qD,{key:0,size:20,class:"ma-auto",color:"#a70015"})):fe("",!0),A[31]||(A[31]=E("br",null,null,-1)),c.value?(F(),ge("div",sJ,[A[13]||(A[13]=E("h1",null,"FDM Monster Server Disconnected",-1)),A[14]||(A[14]=E("p",null,"Did not receive an answer from the server. Please ensure the server is started and reload the page.",-1)),h(Ec,{class:"pa-4 rounded",color:"grey darken-3",width:"100%"},{default:g(()=>[h(Je,null,{default:g(()=>[h(Ve,null,{default:g(()=>[...A[4]||(A[4]=[E("img",{class:"justify-center align-center align-content-center rounded-pill mt-8 ma-4",src:Xk,style:{opacity:"0.9"},width:"200"},null,-1)])]),_:1}),h(Ve,{class:"justify-center align-center align-content-center"},{default:g(()=>[h(te,{color:"primary mb-2",onClick:A[0]||(A[0]=$=>m())},{default:g(()=>[h(Z,{class:"mr-2"},{default:g(()=>[...A[5]||(A[5]=[x("refresh",-1)])]),_:1}),A[6]||(A[6]=x(" reload the page ",-1))]),_:1}),A[11]||(A[11]=E("br",null,null,-1)),h(te,{color:"darken-2 mb-2",href:"https://docs.fdm-monster.net",style:{color:"white"},target:"_blank"},{default:g(()=>[h(Z,{class:"mr-2"},{default:g(()=>[...A[7]||(A[7]=[x("menu_book",-1)])]),_:1}),A[8]||(A[8]=x(" view documentation ",-1))]),_:1}),A[12]||(A[12]=E("br",null,null,-1)),h(te,{color:"purple darken-4",href:"https://discord.gg/mwA8uP8CMc",style:{color:"white"},target:"_blank"},{default:g(()=>[h(Z,{class:"mr-2"},{default:g(()=>[...A[9]||(A[9]=[x("chat",-1)])]),_:1}),A[10]||(A[10]=x(" join our Discord ",-1))]),_:1})]),_:1})]),_:1})]),_:1})])):fe("",!0),u.value?(F(),ge("div",iJ,[A[28]||(A[28]=E("h1",null,"FDM Monster Server Error",-1)),A[29]||(A[29]=E("p",null," Did not expect this answer from the server. Please check your configuration and logs. ",-1)),h(Ec,{class:"pa-4 rounded",color:"grey-darken-2",width:"80%"},{default:g(()=>[A[23]||(A[23]=x(" Details: ",-1)),E("div",oJ,re(JSON.stringify(u.value,null,4)),1),d.value?(F(),ge("div",aJ," Original URL: "+re(d.value),1)):fe("",!0),f.value?(F(),ge("div",lJ," Response body: "+re(f.value),1)):fe("",!0),A[24]||(A[24]=E("br",null,null,-1)),h(te,{class:"mb-2",color:"secondary",onClick:A[1]||(A[1]=$=>y())},{default:g(()=>[h(Z,{class:"mr-2"},{default:g(()=>[...A[15]||(A[15]=[x("content_copy",-1)])]),_:1}),A[16]||(A[16]=x(" Copy error details ",-1))]),_:1}),A[25]||(A[25]=E("br",null,null,-1)),h(te,{color:"primary mb-2",onClick:A[2]||(A[2]=$=>m())},{default:g(()=>[h(Z,{class:"mr-2"},{default:g(()=>[...A[17]||(A[17]=[x("refresh",-1)])]),_:1}),A[18]||(A[18]=x(" reload the page ",-1))]),_:1}),A[26]||(A[26]=E("br",null,null,-1)),h(te,{color:"darken-2 mb-2",href:"https://docs.fdm-monster.net",style:{color:"white"},target:"_blank"},{default:g(()=>[h(Z,{class:"mr-2"},{default:g(()=>[...A[19]||(A[19]=[x("menu_book",-1)])]),_:1}),A[20]||(A[20]=x(" view documentation ",-1))]),_:1}),A[27]||(A[27]=E("br",null,null,-1)),h(te,{color:"purple-darken-4",href:"https://discord.gg/mwA8uP8CMc",style:{color:"white"},target:"_blank"},{default:g(()=>[h(Z,{class:"mr-2"},{default:g(()=>[...A[21]||(A[21]=[x("chat",-1)])]),_:1}),A[22]||(A[22]=x(" join our Discord ",-1))]),_:1})]),_:1}),A[30]||(A[30]=E("img",{class:"justify-center align-center align-content-center rounded-pill mt-8 ma-4",src:Xk,style:{opacity:"0.9"},width:"400"},null,-1))])):fe("",!0),l.value?(F(),ge("div",uJ,re(a.value),1)):fe("",!0)]),_:1},8,["modelValue"]),i.value?fe("",!0):Hh(I.$slots,"default",{key:0})],64))}});async function dJ(){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 fJ=oe({...Ue(),...bn(IO(),["fullHeight"]),...Pt()},"VApp"),hJ=_e()({name:"VApp",props:fJ(),setup(e,t){let{slots:n}=t;const r=Wt(e),{layoutClasses:s,getLayoutItem:i,items:o,layoutRef:a}=MO({...e,fullHeight:!0}),{rtlClasses:l}=Ir();return Ae(()=>E("div",{ref:a,class:Pe(["v-application",r.themeClasses.value,s.value,l.value,e.class]),style:De([e.style])},[E("div",{class:"v-application__wrap"},[n.default?.()])])),{getLayoutItem:i,items:o,theme:r}}}),pJ=oe({scrollable:Boolean,...Ue(),...cr(),...ut({tag:"main"})},"VMain"),mJ=_e()({name:"VMain",props:pJ(),setup(e,t){let{slots:n}=t;const{dimensionStyles:r}=dr(e),{mainStyles:s}=OO(),{ssrBootStyles:i}=od();return Ae(()=>h(e.tag,{class:Pe(["v-main",{"v-main--scrollable":e.scrollable},e.class]),style:De([s.value,i.value,r.value,e.style])},{default:()=>[e.scrollable?E("div",{class:"v-main__scroller"},[n.default?.()]):n.default?.()]})),{}}}),gJ=Me({__name:"App",setup(e){const t=QS(),n=Zr(),r=t.queuedUploads;return we(r,async()=>{await t.handleNextUpload()}),gt(()=>{dJ(),console.debug(`App.vue mounted. Logged in: ${n.hasAuthToken}, Expired: ${n.isLoginExpired}`)}),(s,i)=>{const o=ZQ,a=XQ,l=GQ,u=zQ,c=UQ,d=Pn("router-view"),f=_Y,p=uY,v=TK,m=EK,y=_K,S=yK,b=tK,k=C9,T=d9,_=UG,C=tG;return F(),ee(hJ,null,{default:g(()=>[h(o),h(a),h(l),Q(n).hasAuthToken&&!Q(n).isLoginExpired||!Q(n).loginRequired?(F(),ee(u,{key:0})):fe("",!0),Q(n).hasAuthToken&&!Q(n).isLoginExpired||!Q(n).loginRequired?(F(),ee(c,{key:1})):fe("",!0),h(cJ,null,{default:g(()=>[h(mJ,null,{default:g(()=>[h(d)]),_:1})]),_:1}),h(f),h(p),h(v),h(m),h(y),h(S),h(b),h(k),h(T),h(_),h(C)]),_:1})}}}),JS="/img/logo.svg",GD=Me({__name:"PrinterCreateAction",props:{floorId:{},floorX:{},floorY:{}},setup(e){const t=e,n=Kt(Yt.AddOrUpdatePrinterDialog);function r(){n.openDialog(t)}return(s,i)=>(F(),ee(te,{class:"ma-2",color:"primary",size:"small",rounded:"",onClickCapture:i[0]||(i[0]=yt(o=>r(),["stop"]))},{default:g(()=>[h(Z,null,{default:g(()=>[...i[1]||(i[1]=[x("add",-1)])]),_:1}),i[2]||(i[2]=x(" New printer ",-1))]),_:1}))}});class KD extends fr{static async postQuickStopM112Command(t){const n=ae.sendQuickStopM112Route(t);return await this.post(n)}}const Ap=is("GridStore",{state:()=>({gridEditMode:!1})}),vJ="thumbnail",yJ=(e,t)=>Ep({queryKey:[vJ,e],queryFn:async()=>e.value?bi.getThumbnail(e.value).then(n=>n.thumbnailBase64||""):"",enabled:!!e&&!!t}),bJ={class:"d-flex flex flex-column justify-center",style:{height:"100%"}},SJ={key:1,class:"printer-file-or-stream-viewer"},wJ={key:2,class:"printer-file-or-stream-viewer"},_J={key:3,class:"printer-menu"},kJ={class:"file-name"},xJ={key:5,class:"centered-controls"},EJ={key:0},CJ={key:1},Qk="rgba(100,100,100,0.1)",TJ=Me({__name:"PrinterGridTile",props:{printer:{type:Object,required:!1},x:{type:Number,required:!0},y:{type:Number,required:!0}},setup(e){const t=e,n=Vt(),r=Jn(),s=Li(),i=Ts(),o=Ap(),a=Kt(Yt.PrinterControlDialog),l=Kt(Yt.AddOrUpdatePrinterDialog),u=Rt(),c=O(()=>t.printer?.id),d=O(()=>i.largeTiles),f=O(()=>d.value?"80px":"40px"),{data:p}=yJ(c,i.thumbnailsEnabled),v=O(()=>c.value?r.isApiResponding(c.value):!1),m=O(()=>c.value?r.isPrinterOperational(c.value):!1),y=O(()=>c.value?r.isPrinterPrinting(c.value):!1),S=O(()=>c.value?r.isPrinterPaused(c.value):!1),b=O(()=>c.value?n.isSelectedPrinter(c.value):!1),k=O(()=>n.selectedPrinters?.length&&!b.value),T=O(()=>i.preferCancelOverQuickStop),_=O(()=>{if(!c.value)return;const q=n.printer(c.value);if(!q)return;const N=r.printerEventsById[c.value],se=r.socketStatesById[c.value];return qA(q,se,N)}),C=O(()=>{const q=_.value;return q&&q.rgb||Qk}),R=O(()=>{if(c.value)return r.printerJobsById[c.value]}),w=O(()=>{if(c.value)return r.printingFilePathsByPrinterId[c.value]}),P=async()=>{c.value&&confirm("Are you sure to cancel the current print job?")&&await sa.stopPrintJob(c.value)},I=async()=>{c.value&&await sa.pausePrintJob(c.value)},A=async()=>{c.value&&await sa.resumePrintJob(c.value)},$=()=>{n.setSideNavPrinter(t.printer)},K=async()=>{c.value&&(await qt.refreshSocket(c.value),u.openInfoMessage({title:"Refreshing connection state"}))},M=()=>{n.setUpdateDialogPrinter(t.printer),l.openDialog()},L=async()=>{if(!c.value)throw new Error("PrinterId not set, cant open dialog");await a.openDialog({printerId:c})},j=async()=>{c.value&&confirm("Are you sure to abort the print in Quick Stop mode? Please reconnect after.")&&await KD.postQuickStopM112Command(c.value)},G=async()=>{c.value&&await qt.sendPrinterConnectCommand(c.value)},B=async()=>{if(!(!t.printer||!c.value)){if(o.gridEditMode){const q=s.selectedFloor?.id;if(!q)throw new Error("Cant clear printer, floor not selected");await Wr.deletePrinterFromFloor(q,c.value);return}n.toggleSelectedPrinter(t.printer)}};return(q,N)=>{const se=GD,z=ic("drop-upload"),U=ic("drop-printer-position");return Ot((F(),ge("div",null,[Ot((F(),ee(mt,{class:Pe([{"tile-large":d.value,"tile-selected":b.value,"tile-unselected":k.value,"tile-no-printer":!e.printer},"tile colored-tile rounded-lg"]),elevation:"5",onClick:N[8]||(N[8]=le=>B())},{default:g(()=>[Ot(E("div",{class:"printer-title"},re(e.printer?.name??" "),513),[[Di,e.printer]]),!e.printer||Q(o).gridEditMode?(F(),ge("div",{key:0,style:De([{height:d.value?"calc(120px - 20px)":"calc(84px - 20px)"},{position:"absolute"}]),class:"plus-hover-icon"},[E("div",bJ,[e.printer?fe("",!0):(F(),ee(se,{key:0,"floor-id":Q(s).selectedFloor?.id,"floor-x":e.x,"floor-y":e.y},null,8,["floor-id","floor-x","floor-y"])),e.printer?(F(),ee(te,{key:1,color:"error",rounded:"",small:"",onClickCapture:N[0]||(N[0]=yt(le=>B(),["stop"]))},{default:g(()=>[h(Z,null,{default:g(()=>[...N[9]||(N[9]=[x("clear",-1)])]),_:1}),N[10]||(N[10]=x(" Clear position ",-1))]),_:1})):fe("",!0)])],4)):fe("",!0),e.printer&&v.value?(F(),ge("div",SJ,[Q(p)?.length?(F(),ee(ts,{key:1,src:"data:image/png;base64,"+(Q(p)??""),width:f.value},null,8,["src","width"])):(F(),ee(ts,{key:0,src:Q(YS),width:f.value,alt:"No thumbnail was found in GCode",style:{opacity:"0.3",filter:"grayscale(100%)"}},null,8,["src","width"]))])):e.printer?(F(),ge("div",wJ,[_.value?.text.includes("API")?(F(),ee(Z,{key:0,size:f.value,color:"secondary"},{default:g(()=>[...N[11]||(N[11]=[x(" wifi_off ",-1)])]),_:1},8,["size"])):fe("",!0),e.printer.enabled?fe("",!0):(F(),ee(Z,{key:1,size:f.value,color:"secondary"},{default:g(()=>[...N[12]||(N[12]=[x(" disabled_by_default ",-1)])]),_:1},8,["size"])),_.value?.text.includes("unset")?(F(),ee(Z,{key:2,size:f.value,color:"secondary"},{default:g(()=>[...N[13]||(N[13]=[x(" question_mark ",-1)])]),_:1},8,["size"])):fe("",!0)])):fe("",!0),e.printer&&!Q(o).gridEditMode?(F(),ge("div",_J,[h(Ze,{top:""},{activator:g(({props:le})=>[h(te,de({color:"darkgray",elevation:"0",small:"",style:{"border-radius":"7px"}},le,{onClick:N[1]||(N[1]=yt(J=>$(),["prevent","stop"]))}),{default:g(()=>[h(Z,{dark:""},{default:g(()=>[...N[14]||(N[14]=[x("menu",-1)])]),_:1})]),_:1},16)]),default:g(()=>[...N[15]||(N[15]=[x("Open printer details",-1)])]),_:1})])):fe("",!0),e.printer&&!Q(o).gridEditMode?(F(),ge("div",{key:4,style:De([{position:d.value?"inherit":"absolute",top:d.value?"inherit":"30px"},{overflow:"clip"}]),class:"printer-controls"},[E("small",kJ,re(w.value??" "),1)],4)):fe("",!0),e.printer&&!Q(o).gridEditMode?(F(),ge("div",xJ,[h(Ze,{top:""},{activator:g(({props:le})=>[h(te,de({disabled:!v.value||!m.value,size:d.value?"small":"x-small",color:"darkgray",elevation:"0",style:{"border-radius":"7px"}},le,{onClick:N[2]||(N[2]=yt(J=>L(),["prevent","stop"]))}),{default:g(()=>[h(Z,null,{default:g(()=>[...N[16]||(N[16]=[x("open_with",-1)])]),_:1})]),_:1},16,["disabled","size"])]),default:g(()=>[...N[17]||(N[17]=[x("Move and home printer",-1)])]),_:1}),h(Ze,{top:""},{activator:g(({props:le})=>[!m.value&&v.value?(F(),ee(te,de({key:0,size:d.value?"small":"x-small",color:"darkgray",elevation:"0",style:{"border-radius":"7px"}},le,{onClick:N[3]||(N[3]=yt(J=>G(),["prevent","stop"]))}),{default:g(()=>[h(Z,null,{default:g(()=>[...N[18]||(N[18]=[x("usb",-1)])]),_:1})]),_:1},16,["size"])):fe("",!0)]),default:g(()=>[...N[19]||(N[19]=[x("Connect USB (only for OctoPrint)",-1)])]),_:1}),h(Ze,{top:""},{activator:g(({props:le})=>[h(te,de({size:d.value?"small":"x-small",color:"darkgray",elevation:"0",style:{"border-radius":"7px"}},le,{onClick:N[4]||(N[4]=yt(J=>K(),["prevent","stop"]))}),{default:g(()=>[h(Z,null,{default:g(()=>[...N[20]||(N[20]=[x("refresh",-1)])]),_:1})]),_:1},16,["size"])]),default:g(()=>[...N[21]||(N[21]=[x("Reload printer websocket and refresh all states ",-1)])]),_:1}),h(Ze,{top:""},{activator:g(({props:le})=>[h(te,de({disabled:!v.value||!S.value&&!y.value,size:d.value?"small":"x-small",color:"darkgray",elevation:"0",style:{"border-radius":"7px"}},le,{onClick:N[5]||(N[5]=yt(J=>S.value?A():I(),["prevent","stop"]))}),{default:g(()=>[S.value?fe("",!0):(F(),ee(Z,{key:0},{default:g(()=>[...N[22]||(N[22]=[x("pause",-1)])]),_:1})),S.value?(F(),ee(Z,{key:1},{default:g(()=>[...N[23]||(N[23]=[x("play_arrow",-1)])]),_:1})):fe("",!0)]),_:1},16,["disabled","size"])]),default:g(()=>[x(re(S.value?"Resume print":"Pause print"),1)]),_:1}),h(Ze,{top:""},{activator:g(({props:le})=>[h(te,de({disabled:!v.value||T.value&&!y.value&&!S.value,size:d.value?"small":"x-small",color:"darkgray",elevation:"0",style:{"border-radius":"7px"}},le,{onClick:N[6]||(N[6]=yt(J=>T.value?P():j(),["prevent","stop"]))}),{default:g(()=>[h(Z,null,{default:g(()=>[x(re(T.value?"stop":"dangerous"),1)]),_:1})]),_:1},16,["disabled","size"])]),default:g(()=>[x(re(T.value?"Cancel current print gracefully":"Perform quick stop of printer"),1)]),_:1}),h(Ze,{top:""},{activator:g(({props:le})=>[h(te,de({size:d.value?"small":"x-small",color:"darkgray",elevation:"0",style:{"border-radius":"7px"}},le,{onClick:N[7]||(N[7]=yt(J=>M(),["prevent","stop"]))}),{default:g(()=>[h(Z,null,{default:g(()=>[...N[24]||(N[24]=[x("settings",-1)])]),_:1})]),_:1},16,["size"])]),default:g(()=>[...N[25]||(N[25]=[x("Open printer settings",-1)])]),_:1})])):fe("",!0),e.printer&&!Q(o).gridEditMode?(F(),ee(vl,{key:6,value:R.value?.progress?.completion,"background-color":"dark-gray",class:"progress-bar",height:"14"},{default:g(({value:le})=>[E("strong",null,re(le?.toFixed(1)+"%"),1),h(Ze,{disabled:e.printer?.enabled,"close-delay":"100",color:"danger","open-delay":"0",top:""},{activator:g(({props:J})=>[E("span",de({class:"xsmall-resized-font text--secondary ml-sm-2"},J),[e.printer?.disabledReason?(F(),ge("span",EJ,[N[27]||(N[27]=E("small",null," MAINTENANCE",-1)),h(Z,{class:"d-none d-xl-inline",color:"primary",small:""},{default:g(()=>[...N[26]||(N[26]=[x("info",-1)])]),_:1})])):(F(),ge("span",CJ,[E("small",{style:De({"background-color":C.value+"99","border-left":"5px solid "+C.value+"ff",padding:"5px"})},re(_.value?.text?.toUpperCase()),5)]))],16)]),default:g(()=>[E("span",null,re(e.printer?.disabledReason??"Printer disabled"),1)]),_:1},8,["disabled"])]),_:1},8,["value"])):fe("",!0)]),_:1},8,["class"])),[[z,{printers:[e.printer]}]])])),[[U,{x:e.x,y:e.y,printerSet:e.printer}]])}}}),YD="FDM-Monster-Client-Vue2";var XD=(e=>(e.PRINTER_PLACE="PRINTER_PLACE",e))(XD||{});function RJ(e){return!e?.appId?.length||!e?.intent?.length?!1:e.appId===YD&&e.intent==="PRINTER_PLACE"}const PJ=oe({color:String,density:String,...Ue()},"VBannerActions"),IJ=_e()({name:"VBannerActions",props:PJ(),setup(e,t){let{slots:n}=t;return Tr({VBtn:{color:e.color,density:e.density,slim:!0,variant:"text"}}),Ae(()=>E("div",{class:Pe(["v-banner-actions",e.class]),style:De(e.style)},[n.default?.()])),{}}}),AJ=Vl("v-banner-text"),OJ=oe({avatar:String,bgColor:String,color:String,icon:$e,lines:String,stacked:Boolean,sticky:Boolean,text:String,...os(),...Ue(),...Un(),...cr(),...Ca({mobile:null}),...ls(),...vo(),...Hl(),...On(),...ut(),...Pt()},"VBanner"),QD=_e()({name:"VBanner",props:OJ(),setup(e,t){let{slots:n}=t;const{backgroundColorClasses:r,backgroundColorStyles:s}=or(()=>e.bgColor),{borderClasses:i}=_s(e),{densityClasses:o}=as(e),{displayClasses:a,mobile:l}=Es(e),{dimensionStyles:u}=dr(e),{elevationClasses:c}=ks(e),{locationStyles:d}=Ea(e),{positionClasses:f}=jl(e),{roundedClasses:p}=zn(e),{themeClasses:v}=Wt(e),m=ne(()=>e.color),y=ne(()=>e.density);Tr({VBannerActions:{color:m,density:y}}),Ae(()=>{const S=!!(e.text||n.text),b=!!(e.avatar||e.icon),k=!!(b||n.prepend);return h(e.tag,{class:Pe(["v-banner",{"v-banner--stacked":e.stacked||l.value,"v-banner--sticky":e.sticky,[`v-banner--${e.lines}-line`]:!!e.lines},v.value,r.value,i.value,o.value,a.value,c.value,f.value,p.value,e.class]),style:De([s.value,u.value,d.value,e.style]),role:"banner"},{default:()=>[k&&E("div",{key:"prepend",class:"v-banner__prepend"},[n.prepend?h(Tt,{key:"prepend-defaults",disabled:!b,defaults:{VAvatar:{color:m.value,density:y.value,icon:e.icon,image:e.avatar}}},n.prepend):h(st,{key:"prepend-avatar",color:m.value,density:y.value,icon:e.icon,image:e.avatar},null)]),E("div",{class:"v-banner__content"},[S&&h(AJ,{key:"text"},{default:()=>[n.text?.()??e.text]}),n.default?.()]),n.actions&&h(IJ,{key:"actions"},n.actions)]})})}}),DJ={class:"printer-grid-container"},MJ={key:0,class:"d-flex flex-row justify-start",style:{gap:"10px",width:"100%"}},LJ={key:0,class:"d-flex flex-column justify-start",style:{gap:"10px","margin-top":"10px"}},FJ=Me({__name:"PrinterGrid",props:{gap:{type:String,default:"4px"}},setup(e){const t=Vt(),n=Li(),r=Ts(),s=Ap();gt(async()=>{await t.loadPrinters(),await n.loadFloors()});const i=e,o=O(()=>n.gridSortedPrinters),a=O(()=>r.gridCols),l=O(()=>r.gridRows),u=O(()=>r.largeTiles),c=O(()=>l.value*a.value),d=O(()=>({display:"grid",gridTemplateColumns:`repeat(${a.value}, 1fr)`,gap:i.gap})),f=T=>T%a.value,p=T=>Math.floor(T/a.value);function v(T,_){_.dataTransfer&&T.id&&_.dataTransfer.setData("text",JSON.stringify({appId:YD,intent:XD.PRINTER_PLACE,printerId:T.id}))}function m(T,_){const C=T,R=_;if(!(!o.value?.length||!o.value[C]))return o.value[C][R]}async function y(){!s.gridEditMode||!r.frontendSettings||r.frontendSettings.gridRows>=16||(r.frontendSettings.gridRows++,await r.saveFrontendSettings())}async function S(){!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 k(){!s.gridEditMode||!r.frontendSettings||r.frontendSettings.gridCols!=1&&(r.frontendSettings.gridCols--,await r.saveFrontendSettings())}return(T,_)=>(F(),ge("div",null,[Q(s).gridEditMode?(F(),ee(QD,{key:0},{default:g(()=>[h(Je,{style:{"margin-bottom":"-5px"}},{default:g(()=>[h(Ve,null,{default:g(()=>[E("span",null," Drag "+re(Q(n).floorlessPrinters.length)+" unplaced printer(s) from here to place it on the grid. ",1),h(dh,null,{default:g(()=>[(F(!0),ge(Ie,null,Ht(Q(n).floorlessPrinters,C=>(F(),ee(mn,{key:C.id,draggable:"",size:"small",style:{cursor:"move"},onDragstart:R=>v(C,R)},{default:g(()=>[x(re(C.name),1)]),_:2},1032,["onDragstart"]))),128))]),_:1})]),_:1}),h(Ve,null,{default:g(()=>[E("div",null,[_[6]||(_[6]=x(" Clear printers by clicking on ",-1)),E("strong",null,[h(Z,null,{default:g(()=>[..._[4]||(_[4]=[x("disabled_visible",-1)])]),_:1}),_[5]||(_[5]=x(" Click to clear ",-1))])])]),_:1})]),_:1})]),_:1})):fe("",!0),E("div",DJ,[E("div",{class:"printer-grid",style:De(d.value)},[(F(!0),ge(Ie,null,Ht(c.value,C=>(F(),ge("div",{key:`printer-${f(C-1)}-${p(C-1)}`,class:Pe(["printer-cell",{"printer-cell-large":u.value}])},[h(TJ,{printer:m(f(C-1),p(C-1)),x:f(C-1),y:p(C-1)},null,8,["printer","x","y"])],2))),128)),Q(s).gridEditMode?(F(),ge("div",MJ,[_[9]||(_[9]=x(" Columns ",-1)),h(te,{"x-small":"",rounded:"",disabled:Q(r).gridCols<=1,onClick:_[0]||(_[0]=C=>k())},{default:g(()=>[h(Z,null,{default:g(()=>[..._[7]||(_[7]=[x("remove",-1)])]),_:1})]),_:1},8,["disabled"]),h(te,{"x-small":"",rounded:"",disabled:Q(r).gridCols>=12,onClick:_[1]||(_[1]=C=>S())},{default:g(()=>[h(Z,null,{default:g(()=>[..._[8]||(_[8]=[x("add",-1)])]),_:1})]),_:1},8,["disabled"])])):fe("",!0)],4),Q(s).gridEditMode?(F(),ge("div",LJ,[_[12]||(_[12]=x(" Rows ",-1)),h(te,{"x-small":"",rounded:"",disabled:Q(r).gridRows<=1,onClick:_[2]||(_[2]=C=>b())},{default:g(()=>[h(Z,null,{default:g(()=>[..._[10]||(_[10]=[x("remove",-1)])]),_:1})]),_:1},8,["disabled"]),h(te,{"x-small":"",rounded:"",disabled:Q(r).gridRows>=16,onClick:_[3]||(_[3]=C=>y())},{default:g(()=>[h(Z,null,{default:g(()=>[..._[11]||(_[11]=[x("add",-1)])]),_:1})]),_:1},8,["disabled"])])):fe("",!0)]),_[13]||(_[13]=E("img",{alt:"FDM Monster Background",class:"grid-bg-img align-content-center",src:JS,style:{opacity:"0.08","pointer-events":"none"}},null,-1))]))}}),NJ=Ia(FJ,[["__scopeId","data-v-0a20edf3"]]);function $J(e,t,n=!0){return e?t.map(r=>({file:r,printer:e,startPrint:n})):[]}function JD(e,t,n=!0){return!e?.length||!t?[]:e.map(r=>({file:t,printer:r,startPrint:n}))}const BJ=oe({indeterminate:Boolean,inset:Boolean,flat:Boolean,loading:{type:[Boolean,String],default:!1},...Pa(),...kp()},"VSwitch"),Sh=_e()({name:"VSwitch",inheritAttrs:!1,props:BJ(),emits:{"update:focused":e=>!0,"update:modelValue":e=>!0,"update:indeterminate":e=>!0},setup(e,t){let{attrs:n,slots:r}=t;const s=tt(e,"indeterminate"),i=tt(e,"modelValue"),{loaderClasses:o}=zc(e),{isFocused:a,focus:l,blur:u}=iu(e),c=H(),d=H(),f=lb&&window.matchMedia("(forced-colors: active)").matches,p=ne(()=>typeof e.loading=="string"&&e.loading!==""?e.loading:e.color),v=Pr(),m=ne(()=>e.id||`switch-${v}`);function y(){s.value&&(s.value=!1)}function S(b){b.stopPropagation(),b.preventDefault(),c.value?.input?.click()}return Ae(()=>{const[b,k]=ka(n),T=ns.filterProps(e),_=va.filterProps(e);return h(ns,de({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,T,{modelValue:i.value,"onUpdate:modelValue":C=>i.value=C,id:m.value,focused:a.value,style:e.style}),{...r,default:C=>{let{id:R,messagesId:w,isDisabled:P,isReadonly:I,isValid:A}=C;const $={model:i,isValid:A};return h(va,de({ref:c},_,{modelValue:i.value,"onUpdate:modelValue":[K=>i.value=K,y],id:R.value,"aria-describedby":w.value,type:"checkbox","aria-checked":s.value?"mixed":void 0,disabled:P.value,readonly:I.value,onFocus:l,onBlur:u},k),{...r,default:K=>{let{backgroundColorClasses:M,backgroundColorStyles:L}=K;return E("div",{class:Pe(["v-switch__track",f?void 0:M.value]),style:De(L.value),onClick:S},[r["track-true"]&&E("div",{key:"prepend",class:"v-switch__track-true"},[r["track-true"]($)]),r["track-false"]&&E("div",{key:"append",class:"v-switch__track-false"},[r["track-false"]($)])])},input:K=>{let{inputNode:M,icon:L,backgroundColorClasses:j,backgroundColorStyles:G}=K;return E(Ie,null,[M,E("div",{class:Pe(["v-switch__thumb",{"v-switch__thumb--filled":L||e.loading},e.inset||f?void 0:j.value]),style:De(e.inset?void 0:G.value)},[r.thumb?h(Tt,{defaults:{VIcon:{icon:L,size:"x-small"}}},{default:()=>[r.thumb({...$,icon:L})]}):h(D$,null,{default:()=>[e.loading?h(Yh,{name:"v-switch",active:!0,color:A.value===!1?void 0:p.value},{default:B=>r.loader?r.loader(B):h(zs,{active:B.isActive,color:B.color,indeterminate:!0,size:"16",width:"2"},null)}):L&&h(Z,{key:String(L),icon:L,size:"x-small"},null)]})])])}})}})}),us({},d)}}),VJ={class:"d-flex flex-wrap gap-2"},UJ={class:"pr-2"},zJ={class:"pr-2"},HJ={class:"pr-2"},jJ={class:"pr-2"},qJ={class:"pr-2"},WJ={class:"ma-4 pt-6"},GJ=Me({__name:"HomeToolbar",setup(e){const t=Vt(),n=Jn(),r=Li(),s=Ap(),i=O(()=>r.selectedFloorIndex),o=O(()=>r.floors);function a(l){r.changeSelectedFloorByIndex(l)}return(l,u)=>(F(),ee(ur,{flat:""},{default:g(()=>[h(uR,{"model-value":i.value,class:"ml-7",mandatory:"",rounded:"","onUpdate:modelValue":a},{default:g(()=>[(F(!0),ge(Ie,null,Ht(o.value,c=>(F(),ee(te,{key:c.id,size:"small"},{default:g(()=>[h(Z,null,{default:g(()=>[...u[2]||(u[2]=[x("layers",-1)])]),_:1}),x(" "+re(c.name),1)]),_:2},1024))),128))]),_:1},8,["model-value"]),Q(t).printers?.length?fe("",!0):(F(),ee(te,{key:0,class:"mt-0 ml-6",color:"primary",to:"/printers"},{default:g(()=>[...u[3]||(u[3]=[x(" You have no printers. Click here to start! ",-1)])]),_:1})),Q(r).floorlessPrinters.length?(F(),ee(ln,{key:1,class:"ml-4"},{default:g(()=>[h(Z,null,{default:g(()=>[...u[4]||(u[4]=[x("warning",-1)])]),_:1}),x(" "+re(Q(r).floorlessPrinters.length)+" unplaced printer(s)! ",1)]),_:1})):fe("",!0),h(yn),E("span",VJ,[E("span",UJ,[h(Z,null,{default:g(()=>[...u[5]||(u[5]=[x("print",-1)])]),_:1}),x(" "+re(Q(n).printingCount),1)]),E("span",zJ,[h(Z,null,{default:g(()=>[...u[6]||(u[6]=[x("ac_unit",-1)])]),_:1}),x(" "+re(Q(n).operationalNotPrintingCount),1)]),E("span",HJ,[h(Z,null,{default:g(()=>[...u[7]||(u[7]=[x("handyman",-1)])]),_:1}),x(" "+re(Q(t).maintenanceCount),1)]),E("span",jJ,[h(Z,null,{default:g(()=>[...u[8]||(u[8]=[x("usb_off",-1)])]),_:1}),x(" "+re(Q(t).disconnectedCount),1)]),E("span",qJ,[h(Z,null,{default:g(()=>[...u[9]||(u[9]=[x("print_disabled",-1)])]),_:1}),x(" "+re(Q(t).disabledCount),1)])]),h(te,{elevation:"2",small:"",class:"ml-6",icon:"",onClick:u[0]||(u[0]=c=>Q(Kt)(Q(Yt).GridSettingsDialog).openDialog())},{default:g(()=>[h(Z,null,{default:g(()=>[...u[10]||(u[10]=[x("settings",-1)])]),_:1})]),_:1}),E("div",WJ,[h(Sh,{modelValue:Q(s).gridEditMode,"onUpdate:modelValue":u[1]||(u[1]=c=>Q(s).gridEditMode=c),label:"Grid Edit Mode"},null,8,["modelValue"])])]),_:1}))}}),KJ={class:"pl-1"},YJ=Me({__name:"PrinterGridView",setup(e){const t=Ap(),n=Vt(),r=Jn(),s=QS(),i=Rt(),o=H(void 0),a=O(()=>n.selectedPrinters.length>0),l=O(()=>n.selectedPrinters),u=H(null),c=()=>{u.value&&(u.value.value="",o.value=void 0)},d=()=>{n.clearSelectedPrinters()},f=async()=>{const S=await Kt(Yt.BatchReprintDialog).handleAsync(n.selectedPrinters?.map(b=>b.id));console.log("[PrinterGridView] Dialog completed",S)},p=S=>{const b=l.value,k=b.filter(C=>r.isApiResponding(C.id));if(!o.value)return;const T=b.length-k.length;T>0&&i.openInfoMessage({title:`${T} printers inaccessible`,subtitle:"These were skipped from uploading."});const _=JD(k,o.value,S);s.queueUploads(_),u.value&&(u.value.value=""),d()},v=()=>{u.value&&u.value.files?o.value=u.value.files[0]:o.value=void 0},m=S=>{n.toggleSelectedPrinter(S)},y=S=>{qt.openPrinterURL(S.printerURL)};return(S,b)=>{const k=ic("drop-upload");return F(),ge("div",null,[h(GJ),Q(t).gridEditMode?fe("",!0):Ot((F(),ee(QD,{key:0},{default:g(()=>[h(Je,{style:{"margin-bottom":"-5px"}},{default:g(()=>[h(Ve,{style:{padding:"5px 0 0 15px"}},{default:g(()=>[h(dh,{class:"d-inline-block"},{default:g(()=>[l.value.length===0?(F(),ee(mn,{key:0,size:"small"},{default:g(()=>[...b[7]||(b[7]=[x(" No selected printers ",-1)])]),_:1})):fe("",!0),(F(!0),ge(Ie,null,Ht(l.value,T=>(F(),ee(mn,{key:T.id,closable:"",color:"primary",size:"small",onClick:_=>y(T),"onClick:close":_=>m(T)},{default:g(()=>[x(re(T.name),1)]),_:2},1032,["onClick","onClick:close"]))),128))]),_:1})]),_:1}),h(Ve,{align:"right",style:{padding:"0"}},{default:g(()=>[o.value?(F(),ee(dh,{key:0,class:"float-end"},{default:g(()=>[h(mn,{closable:"","onClick:close":b[0]||(b[0]=T=>c())},{default:g(()=>[x(re(o.value.name)+" ",1),E("strong",KJ,re(Q(xO)(o.value.size)),1)]),_:1})]),_:1})):fe("",!0),b[14]||(b[14]=E("br",null,null,-1)),h(te,{disabled:!a.value,color:"primary",size:"x-small",onClick:b[1]||(b[1]=T=>f())},{default:g(()=>[h(Z,{class:"pr-2",size:"small"},{default:g(()=>[...b[8]||(b[8]=[x(" refresh ",-1)])]),_:1}),b[9]||(b[9]=x(" Batch reprint ",-1))]),_:1},8,["disabled"]),h(te,{color:a.value?"primary":"secondary",class:"ml-2",size:"x-small",onClick:b[2]||(b[2]=T=>d())},{default:g(()=>[h(Z,{class:"pr-2",size:"small"},{default:g(()=>[...b[10]||(b[10]=[x(" delete ",-1)])]),_:1}),x(" Clear all ("+re(l.value.length)+") ",1)]),_:1},8,["color"]),h(te,{class:"ml-2",color:"primary",size:"x-small",onClick:b[3]||(b[3]=T=>u.value?.click())},{default:g(()=>[...b[11]||(b[11]=[x(" Select gcode file ",-1)])]),_:1}),h(te,{disabled:!o.value,class:"ml-2 mr-5",color:"green",size:"x-small",onClick:b[4]||(b[4]=T=>p(!1))},{default:g(()=>[...b[12]||(b[12]=[x(" Upload only ",-1)])]),_:1},8,["disabled"]),h(te,{disabled:!o.value,class:"ml-2 mr-5",color:"green",size:"x-small",onClick:b[5]||(b[5]=T=>p(!0))},{default:g(()=>[...b[13]||(b[13]=[x(" Upload and print ",-1)])]),_:1},8,["disabled"]),E("input",{ref_key:"fileUpload",ref:u,multiple:!1,accept:".gcode",style:{display:"none"},type:"file",onChange:b[6]||(b[6]=T=>v())},null,544)]),_:1})]),_:1})]),_:1})),[[k,{printers:l.value}]]),h(NJ,{class:"ma-2"})])}}}),XJ=Me({name:"RefreshFilesAction",components:{},props:{printer:Object},setup:()=>({printersStore:Vt()}),methods:{async getFiles(){this.printer&&await this.printersStore.loadPrinterFiles(this.printer.id)}}});function QJ(e,t,n,r,s,i){return F(),ee(te,{color:"secondary",onClick:t[0]||(t[0]=o=>e.getFiles())},{default:g(()=>[h(Z,null,{default:g(()=>[...t[1]||(t[1]=[x("refresh",-1)])]),_:1}),t[2]||(t[2]=E("span",{class:"d-none d-lg-inline"}," Refresh files ",-1))]),_:1})}const ZD=Ia(XJ,[["render",QJ]]),JJ=Me({name:"PrinterDetails",components:{RefreshFilesAction:ZD},props:{printer:Object},setup:()=>({printersStore:Vt(),printerStateStore:Jn()}),data:()=>({dragging:!1}),computed:{printerId(){return this.printer?.id},socketState(){if(this.printerId)return this.printerStateStore.socketStatesById[this.printerId]?.socket},apiState(){if(this.printerId)return this.printerStateStore.socketStatesById[this.printerId]?.api},printerTextState(){if(this.printerId)return this.printerStateStore.printerEventsById[this.printerId]?.current?.payload?.state.text}}});function ZJ(e,t,n,r,s,i){const o=ZD,a=ic("drop-upload");return e.printer?Ot((F(),ee(Bn,{key:0,style:De(e.dragging?"background-color:red":""),transition:"scale-transition"},{default:g(()=>[h(Je,null,{default:g(()=>[h(Ve,null,{default:g(()=>[x(" Name: "+re(e.printer.name)+" ",1),t[0]||(t[0]=E("br",null,null,-1)),x(" URL: "+re(e.printer.printerURL)+" ",1),t[1]||(t[1]=E("br",null,null,-1)),t[2]||(t[2]=x(" Host: ",-1)),h(mn,{size:"small"},{default:g(()=>[x(re(e.apiState),1)]),_:1}),t[3]||(t[3]=E("br",null,null,-1)),t[4]||(t[4]=x(" WebSocket: ",-1)),h(mn,{size:"small"},{default:g(()=>[x(re(e.socketState),1)]),_:1}),t[5]||(t[5]=E("br",null,null,-1)),t[6]||(t[6]=x(" Printer: ",-1)),h(mn,{size:"small"},{default:g(()=>[x(re(e.printerTextState),1)]),_:1})]),_:1}),h(Ve,null,{default:g(()=>[h(o,{printer:e.printer,class:"d-flex justify-end"},null,8,["printer"])]),_:1})]),_:1})]),_:1},8,["style"])),[[a,{printers:[e.printer]}]]):fe("",!0)}const eZ=Ia(JJ,[["render",ZJ]]),tZ=Me({__name:"PrinterUrlAction",props:{printer:{}},setup(e){const t=e;async function n(){qt.openPrinterURL(t.printer.printerURL)}return(r,s)=>(F(),ee(Ze,{location:"top"},{activator:g(({props:i})=>[h(te,de(i,{color:"secondary",rounded:"",size:"small",onClickCapture:s[0]||(s[0]=yt(o=>n(),["stop"]))}),{default:g(()=>[h(Z,null,{default:g(()=>[...s[1]||(s[1]=[x("directions",-1)])]),_:1})]),_:1},16)]),default:g(()=>[...s[2]||(s[2]=[x("Visit printer service",-1)])]),_:1}))}}),nZ=Me({name:"PrinterSettingsAction",props:{printer:Object},computed:{printerId(){return this.printer.id}},methods:{openSettings(){this.$emit("update:show",this.printer.id)}}});function rZ(e,t,n,r,s,i){return F(),ee(Ze,{location:"top"},{activator:g(({props:o})=>[h(te,de(o,{color:"secondary",class:"ma-2",size:"small",rounded:"",onClickCapture:t[0]||(t[0]=yt(a=>e.openSettings(),["stop"]))}),{default:g(()=>[h(Z,null,{default:g(()=>[...t[1]||(t[1]=[x("settings",-1)])]),_:1})]),_:1},16)]),default:g(()=>[...t[2]||(t[2]=[x("Update printer settings",-1)])]),_:1})}const sZ=Ia(nZ,[["render",rZ]]),iZ=oe({bordered:Boolean,color:String,content:[Number,String],dot:Boolean,floating:Boolean,icon:$e,inline:Boolean,label:{type:String,default:"$vuetify.badge"},max:[Number,String],modelValue:{type:Boolean,default:!0},offsetX:[Number,String],offsetY:[Number,String],textColor:String,...Ue(),...vo({location:"top end"}),...On(),...ut(),...Pt(),...Wl({transition:"scale-rotate-transition"}),...cr()},"VBadge"),eM=_e()({name:"VBadge",inheritAttrs:!1,props:iZ(),setup(e,t){const{backgroundColorClasses:n,backgroundColorStyles:r}=or(()=>e.color),{roundedClasses:s}=zn(e),{t:i}=Br(),{textColorClasses:o,textColorStyles:a}=bs(()=>e.textColor),{themeClasses:l}=iR(),{locationStyles:u}=Ea(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}=dr(e);return Ae(()=>{const d=Number(e.content),f=!e.max||isNaN(d)?e.content:d<=Number(e.max)?d:`${e.max}+`,[p,v]=pv(t.attrs,["aria-atomic","aria-label","aria-live","role","title"]);return h(e.tag,de({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]},v,{style:e.style}),{default:()=>[E("div",{class:"v-badge__wrapper"},[t.slots.default?.(),h(js,{transition:e.transition},{default:()=>[Ot(E("span",de({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"},p),[e.dot?void 0:t.slots.badge?t.slots.badge?.():e.icon?h(Z,{icon:e.icon},null):f]),[[Di,e.modelValue]])]})])]})}),{}}}),oZ=Me({__name:"PrinterConnectionAction",props:{printer:{}},setup(e){const t=e,n=Jn();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 qt.sendPrinterDisconnectCommand(t.printer.id);await qt.sendPrinterConnectCommand(t.printer.id)}return(o,a)=>(F(),ee(Ze,{location:"top"},{activator:g(({props:l})=>[e.printer.enabled?(F(),ee(eM,{key:0,color:r()?"green":"red",class:"pa-2"},{badge:g(()=>[r()?(F(),ee(Z,{key:0},{default:g(()=>[...a[0]||(a[0]=[x("check",-1)])]),_:1})):(F(),ee(Z,{key:1},{default:g(()=>[...a[1]||(a[1]=[x("close",-1)])]),_:1}))]),default:g(()=>[h(te,de({disabled:s()},l,{color:"secondary",rounded:"",size:"small",onClick:yt(i,["stop"])}),{default:g(()=>[h(Z,null,{default:g(()=>[...a[2]||(a[2]=[x("usb",-1)])]),_:1})]),_:1},16,["disabled"])]),_:2},1032,["color"])):fe("",!0)]),default:g(()=>[...a[3]||(a[3]=[x("Connect USB (OctoPrint only)",-1)])]),_:1}))}}),aZ=Me({__name:"PrinterQuickStopAction",props:{printer:{}},setup(e){const t=e;async function n(){confirm("Are you sure to quick stop this printer?")&&await KD.postQuickStopM112Command(t.printer.id)}return(r,s)=>(F(),ee(Ze,{location:"top"},{activator:g(({props:i})=>[e.printer.enabled?(F(),ee(eM,{key:0,class:"ma-2"},{badge:g(()=>[h(Z,null,{default:g(()=>[...s[0]||(s[0]=[x("bolt",-1)])]),_:1})]),default:g(()=>[h(te,de(i,{color:"secondary",size:"small",rounded:"",onClick:yt(n,["stop"])}),{default:g(()=>[h(Z,null,{default:g(()=>[...s[1]||(s[1]=[x("dangerous",-1)])]),_:1})]),_:1},16)]),_:2},1024)):fe("",!0)]),default:g(()=>[...s[2]||(s[2]=[x("Perform quick stop of printer",-1)])]),_:1}))}});class tM extends fr{static async getSettings(t){const n=`${ae.getPrinterSettingsRoute(t)}`;return await this.get(n)}static async setGCodeAnalysis(t,n=!1){const r=`${ae.setPrinterSettingsGCodeAnalysisRoute(t)}`;return await this.post(r,{enabled:n})}static async syncPrinterName(t){const n=`${ae.syncPrinterNameSettingRoute(t)}`;return await this.post(n)}}const lZ=Me({__name:"SyncPrinterNameAction",props:{printer:{}},setup(e){const t=e,n=Rt();async function r(){await tM.syncPrinterName(t.printer.id),n.openInfoMessage({title:"Synced printer name to OctoPrint"})}return(s,i)=>(F(),ee(Ze,{location:"top"},{activator:g(({props:o})=>[h(te,de(o,{color:"secondary",size:"small",rounded:"",onClickCapture:i[0]||(i[0]=yt(a=>r(),["stop"]))}),{default:g(()=>[h(Z,null,{default:g(()=>[...i[1]||(i[1]=[x("badge",-1)])]),_:1})]),_:1},16)]),default:g(()=>[...i[2]||(i[2]=[x(" Set OctoPrints name to the FDM Monster Name ",-1)])]),_:1}))}}),uZ=Me({__name:"PrinterDeleteAction",props:{printer:{}},setup(e){const t=e,n=Vt(),r=Jn();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)=>(F(),ee(Ze,{location:"top"},{activator:g(({props:a})=>[h(te,de(a,{class:"ms-4",color:"secondary",size:"small",rounded:"",onClick:yt(s,["prevent","stop"])}),{default:g(()=>[h(Z,null,{default:g(()=>[...o[0]||(o[0]=[x("delete",-1)])]),_:1})]),_:1},16)]),default:g(()=>[...o[1]||(o[1]=[x("Delete printer",-1)])]),_:1}))}});class Ba extends fr{static async createGroup(t){const n=`${ae.createGroupRoute}`,r={name:t};return await this.post(n,r)}static async deleteGroup(t){const n=`${ae.deleteGroupRoute(t)}`;return await this.delete(n)}static async getGroupsWithPrinters(){const t=`${ae.printerGroupRoute}`;return await this.get(t)}static async addPrinterToGroup(t,n){const r=`${ae.addPrinterToGroupRoute(t)}`,s={printerId:n};return await this.post(r,s)}static async deletePrinterFromGroup(t,n){const r=`${ae.deletePrinterFromGroupRoute(t)}`,s={printerId:n};return await this.delete(r,s)}static async updateGroupName(t,n){const r=`${ae.updateGroupNameRoute(t)}`,s={name:n};return await this.patch(r,s)}}const cZ=(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 Gm(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 dZ=oe({customFilter:Function,customKeyFilter:Object,filterKeys:[Array,String],filterMode:{type:String,default:"intersection"},noFilter:Boolean},"filter");function fZ(e,t,n){const r=[],s=n?.default??cZ,i=n?.filterKeys?En(n.filterKeys):!1,o=Object.keys(n?.customKeyFilter??{}).length;if(!e?.length)return r;let a=null;e:for(let l=0;l<e.length;l++){const[u,c=u]=En(e[l]),d={},f={};let p=-1;if((t||o>0)&&!n?.noFilter){let v=!1;if(typeof u=="object"){if(u.type==="divider"||u.type==="subheader"){a?.type==="divider"&&u.type==="subheader"&&r.push(a),a={index:l,matches:{},type:u.type};continue}const S=i||Object.keys(c);v=S.length===o;for(const b of S){const k=kn(c,b),T=n?.customKeyFilter?.[b];if(p=T?T(k,t,u):s(k,t,u),p!==-1&&p!==!1)T?d[b]=Gm(p,t):f[b]=Gm(p,t);else if(n?.filterMode==="every")continue e}}else p=s(u,t,u),p!==-1&&p!==!1&&(f.title=Gm(p,t));const m=Object.keys(f).length,y=Object.keys(d).length;if(!m&&!y||n?.filterMode==="union"&&y!==o&&!m||n?.filterMode==="intersection"&&(y!==o||!m&&o>0&&!v))continue}a&&(r.push(a),a=null),r.push({index:l,matches:{...f,...d}})}return r}function hZ(e,t,n,r){const s=ke([]),i=ke(new Map),o=O(()=>r?.transform?Q(t).map(l=>[l,r.transform(l)]):Q(t));vn(()=>{const l=typeof n=="function"?n():Q(n),u=typeof l!="string"&&typeof l!="number"?"":String(l),c=fZ(o.value,u,{customKeyFilter:{...e.customKeyFilter,...Q(r?.customKeyFilter)},default:e.customFilter,filterKeys:e.filterKeys,filterMode:e.filterMode,noFilter:e.noFilter}),d=Q(t),f=[],p=new Map;c.forEach(v=>{let{index:m,matches:y}=v;const S=d[m];f.push(S),p.set(S.value,y)}),s.value=f,i.value=p});function a(l){return i.value.get(l.value)}return{filteredItems:s,filteredMatches:i,getMatches:a}}const pZ=oe({expandOnClick:Boolean,showExpand:Boolean,expanded:{type:Array,default:()=>[]}},"DataTable-expand"),nM=Symbol.for("vuetify:datatable:expanded");function mZ(e){const t=ne(()=>e.expandOnClick),n=tt(e,"expanded",e.expanded,a=>new Set(a),a=>[...a.values()]);function r(a,l){const u=new Set(n.value),c=Fe(a.value);if(l)u.add(c);else{const d=[...n.value].find(f=>Fe(f)===c);u.delete(d)}n.value=u}function s(a){const l=Fe(a.value);return[...n.value].some(u=>Fe(u)===l)}function i(a){r(a,!s(a))}const o={expand:r,expanded:n,expandOnClick:t,isExpanded:s,toggleExpand:i};return zt(nM,o),o}function rM(){const e=je(nM);if(!e)throw new Error("foo");return e}const gZ=oe({groupBy:{type:Array,default:()=>[]}},"DataTable-group"),sM=Symbol.for("vuetify:data-table-group");function vZ(e){return{groupBy:tt(e,"groupBy")}}function yZ(e){const{disableSort:t,groupBy:n,sortBy:r}=e,s=H(new Set),i=O(()=>n.value.map(c=>({...c,order:c.order??!1})).concat(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 p=[];for(const v of f.items)"type"in v&&v.type==="group"?p.push(...d(v)):p.push(v);return[...new Set(p)]}return d({items:c})}const u={sortByWithGroups:i,toggleGroup:a,opened:s,groupBy:n,extractRows:l,isGroupOpen:o};return zt(sM,u),u}function iM(){const e=je(sM);if(!e)throw new Error("Missing group!");return e}function bZ(e,t){if(!e.length)return[];const n=new Map;for(const r of e){const s=da(r.raw,t);n.has(s)||n.set(s,[]),n.get(s).push(r)}return n}function oM(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=bZ(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?oM(a,o,n+1,c):a,type:"group"})}),i}function aM(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(...aM(s.items,t,n)),n&&r.push({...s,type:"group-summary"}))):r.push(s);return r}function SZ(e,t,n,r){return{flatItems:O(()=>{if(!t.value.length)return e.value;const i=oM(e.value,t.value.map(o=>o.key));return aM(i,n.value,Ut(r))})}}function wZ(e){let{page:t,itemsPerPage:n,sortBy:r,groupBy:s,search:i}=e;const o=nn("VDataTable"),a=()=>({page:t.value,itemsPerPage:n.value,sortBy:r.value,groupBy:s.value,search:i.value});let l=null;we(a,u=>{_r(l,u)||(l&&l.search!==u.search&&(t.value=1),o.emit("update:options",u),l=u)},{deep:!0,immediate:!0})}const _Z=oe({page:{type:[Number,String],default:1},itemsPerPage:{type:[Number,String],default:10}},"DataTable-paginate"),lM=Symbol.for("vuetify:data-table-pagination");function kZ(e){const t=tt(e,"page",void 0,r=>Number(r??1)),n=tt(e,"itemsPerPage",void 0,r=>Number(r??10));return{page:t,itemsPerPage:n}}function xZ(e){const{page:t,itemsPerPage:n,itemsLength:r}=e,s=O(()=>n.value===-1?0:n.value*(t.value-1)),i=O(()=>n.value===-1?r.value:Math.min(r.value,s.value+n.value)),o=O(()=>n.value===-1||r.value===0?1:Math.ceil(r.value/n.value));we([t,o],()=>{t.value>o.value&&(t.value=o.value)});function a(f){n.value=f,t.value=1}function l(){t.value=In(t.value+1,1,o.value)}function u(){t.value=In(t.value-1,1,o.value)}function c(f){t.value=In(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 zt(lM,d),d}function EZ(){const e=je(lM);if(!e)throw new Error("Missing pagination!");return e}function CZ(e){const t=nn("usePaginatedItems"),{items:n,startIndex:r,stopIndex:s,itemsPerPage:i}=e,o=O(()=>i.value<=0?n.value:n.value.slice(r.value,s.value));return we(o,a=>{t.emit("update:currentItems",a)},{immediate:!0}),{paginatedItems:o}}const TZ={showSelectAll:!1,allSelected:()=>[],select:e=>{let{items:t,value:n}=e;return new Set(n?[t[0]?.value]:[])},selectAll:e=>{let{selected:t}=e;return t}},uM={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 uM.select({items:n,value:t,selected:r})}},RZ={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}=e;return new Set(t?n.map(r=>r.value):[])}},PZ=oe({showSelect:Boolean,selectStrategy:{type:[String,Object],default:"page"},modelValue:{type:Array,default:()=>[]},valueComparator:Function},"DataTable-select"),cM=Symbol.for("vuetify:data-table-selection");function IZ(e,t){let{allItems:n,currentPage:r}=t;const s=tt(e,"modelValue",e.modelValue,b=>{const k=e.valueComparator;return k?new Set(En(b).map(T=>n.value.find(_=>k(T,_.value))?.value??T)):new Set(En(b).map(T=>oo(T)?n.value.find(_=>T===_.value)?.value??T:n.value.find(_=>_r(T,_.value))?.value??T))},b=>[...b.values()]),i=O(()=>n.value.filter(b=>b.selectable)),o=O(()=>r.value.filter(b=>b.selectable)),a=O(()=>{if(typeof e.selectStrategy=="object")return e.selectStrategy;switch(e.selectStrategy){case"single":return TZ;case"all":return RZ;default:return uM}}),l=ke(null);function u(b){return En(b).every(k=>s.value.has(k.value))}function c(b){return En(b).some(k=>s.value.has(k.value))}function d(b,k){const T=a.value.select({items:b,value:k,selected:new Set(s.value)});s.value=T}function f(b,k,T){const _=[];if(k=k??r.value.findIndex(C=>C.value===b.value),e.selectStrategy!=="single"&&T?.shiftKey&&l.value!==null){const[C,R]=[l.value,k].sort((w,P)=>w-P);_.push(...r.value.slice(C,R+1).filter(w=>w.selectable))}else _.push(b),l.value=k;d(_,!u([b]))}function p(b){const k=a.value.selectAll({value:b,allItems:i.value,currentPage:o.value,selected:new Set(s.value)});s.value=k}const v=O(()=>s.value.size>0),m=O(()=>{const b=a.value.allSelected({allItems:i.value,currentPage:o.value});return!!b.length&&u(b)}),y=ne(()=>a.value.showSelectAll),S={toggleSelect:f,select:d,selectAll:p,isSelected:u,isSomeSelected:c,someSelected:v,allSelected:m,showSelectAll:y,lastSelectedIndex:l,selectStrategy:a};return zt(cM,S),S}function Op(){const e=je(cM);if(!e)throw new Error("Missing selection!");return e}const AZ=oe({initialSortOrder:{type:String,default:"asc",validator:e=>!e||["asc","desc"].includes(e)},sortBy:{type:Array,default:()=>[]},customKeySort:Object,multiSort:{type:[Boolean,Object],default:!1},mustSort:Boolean},"DataTable-sort"),dM=Symbol.for("vuetify:data-table-sort");function OZ(e){const t=ne(()=>e.initialSortOrder),n=tt(e,"sortBy"),r=ne(()=>e.mustSort),s=ne(()=>e.multiSort);return{initialSortOrder:t,sortBy:n,multiSort:s,mustSort:r}}function DZ(e,t){if(!pl(e))return{active:!!e};const{key:n,mode:r,modifier:s}=e,i=s==="alt"&&t?.altKey||s==="shift"&&t?.shiftKey;return{active:!n||t?.ctrlKey||t?.metaKey||!1,mode:i?r==="append"?"prepend":"append":r}}function MZ(e){const{initialSortOrder:t,sortBy:n,mustSort:r,multiSort:s,page:i}=e,o=(u,c)=>{if(u.key==null)return;let d=n.value.map(m=>({...m}))??[];const f=d.find(m=>m.key===u.key),p=t.value,v=t.value==="desc"?"asc":"desc";if(f)f.order===v?r.value&&d.length===1?f.order=t.value:d=d.filter(m=>m.key!==u.key):f.order=v;else{const{active:m,mode:y}=DZ(s.value,c);m?y==="prepend"?d.unshift({key:u.key,order:p}):d.push({key:u.key,order:p}):d=[{key:u.key,order:p}]}n.value=d,i&&(i.value=1)};function a(u){return!!n.value.find(c=>c.key===u.key)}const l={sortBy:n,toggleSort:o,isSorted:a};return zt(dM,l),l}function fM(){const e=je(dM);if(!e)throw new Error("Missing sort!");return e}function LZ(e,t,n,r){const s=Br();return{sortedItems:O(()=>n.value.length?FZ(t.value,n.value,s.current.value,{transform:r?.transform,sortFunctions:{...e.customKeySort,...r?.sortFunctions?.value},sortRawFunctions:r?.sortRawFunctions?.value}):t.value)}}function FZ(e,t,n,r){const s=new Intl.Collator(n,{sensitivity:"accent",usage:"sort"});return e.map(o=>[o,r?.transform?r.transform(o):o]).sort((o,a)=>{for(let l=0;l<t.length;l++){let u=!1;const c=t[l].key,d=t[l].order??"asc";if(d===!1)continue;let f=da(o[1],c),p=da(a[1],c),v=o[0].raw,m=a[0].raw;if(d==="desc"&&([f,p]=[p,f],[v,m]=[m,v]),r?.sortRawFunctions?.[c]){const y=r.sortRawFunctions[c](v,m);if(y==null)continue;if(u=!0,y)return y}if(r?.sortFunctions?.[c]){const y=r.sortFunctions[c](f,p);if(y==null)continue;if(u=!0,y)return y}if(!u&&(f instanceof Date&&p instanceof Date&&(f=f.getTime(),p=p.getTime()),[f,p]=[f,p].map(y=>y!=null?y.toString().toLocaleLowerCase():y),f!==p))return md(f)&&md(p)?0:md(f)?-1:md(p)?1:!isNaN(f)&&!isNaN(p)?Number(f)-Number(p):s.compare(f,p)}return 0}).map(o=>{let[a]=o;return a})}function NZ(){const e=H([]);nT(()=>e.value=[]);function t(n,r){e.value[r]=n}return{refs:e,updateRef:t}}const $Z=oe({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:$e,default:"$first"},prevIcon:{type:$e,default:"$prev"},nextIcon:{type:$e,default:"$next"},lastIcon:{type:$e,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,...os(),...Ue(),...Un(),...ls(),...On(),...zl(),...ut({tag:"nav"}),...Pt(),...xs({variant:"text"})},"VPagination"),Jk=_e()({name:"VPagination",props:$Z(),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=tt(e,"modelValue"),{t:i,n:o}=Br(),{isRtl:a}=Ir(),{themeClasses:l}=Wt(e),{width:u}=Es(),c=ke(-1);Tr(void 0,{scoped:!0});const{resizeRef:d}=ao(w=>{if(!w.length)return;const{target:P,contentRect:I}=w[0],A=P.querySelector(".v-pagination__list > *");if(!A)return;const $=I.width,K=A.offsetWidth+parseFloat(getComputedStyle(A).marginRight)*2;c.value=m($,K)}),f=O(()=>parseInt(e.length,10)),p=O(()=>parseInt(e.start,10)),v=O(()=>e.totalVisible!=null?parseInt(e.totalVisible,10):c.value>=0?c.value:m(u.value,58));function m(w,P){const I=e.showFirstLastPage?5:3;return Math.max(0,Math.floor(Number(((w-P*I)/P).toFixed(2))))}const y=O(()=>{if(f.value<=0||isNaN(f.value)||f.value>Number.MAX_SAFE_INTEGER)return[];if(v.value<=0)return[];if(v.value===1)return[s.value];if(f.value<=v.value)return Ka(f.value,p.value);const w=v.value%2===0,P=w?v.value/2:Math.floor(v.value/2),I=w?P:P+1,A=f.value-P;if(I-s.value>=0)return[...Ka(Math.max(1,v.value-1),p.value),e.ellipsis,f.value];if(s.value-A>=(w?1:0)){const $=v.value-1,K=f.value-$+p.value;return[p.value,e.ellipsis,...Ka($,K)]}else{const $=Math.max(1,v.value-2),K=$===1?s.value:s.value-Math.ceil($/2)+p.value;return[p.value,e.ellipsis,...Ka($,K),e.ellipsis,f.value]}});function S(w,P,I){w.preventDefault(),s.value=P,I&&r(I,P)}const{refs:b,updateRef:k}=NZ();Tr({VPaginationBtn:{color:ne(()=>e.color),border:ne(()=>e.border),density:ne(()=>e.density),size:ne(()=>e.size),variant:ne(()=>e.variant),rounded:ne(()=>e.rounded),elevation:ne(()=>e.elevation)}});const T=O(()=>y.value.map((w,P)=>{const I=A=>k(A,P);if(typeof w=="string")return{isActive:!1,key:`ellipsis-${P}`,page:w,props:{ref:I,ellipsis:!0,icon:!0,disabled:!0}};{const A=w===s.value;return{isActive:A,key:w,page:o(w),props:{ref:I,ellipsis:!1,icon:!0,disabled:!!e.disabled||Number(e.length)<2,color:A?e.activeColor:e.color,"aria-current":A,"aria-label":i(A?e.currentPageAriaLabel:e.pageAriaLabel,w),onClick:$=>S($,w)}}}})),_=O(()=>{const w=!!e.disabled||s.value<=p.value,P=!!e.disabled||s.value>=p.value+f.value-1;return{first:e.showFirstLastPage?{icon:a.value?e.lastIcon:e.firstIcon,onClick:I=>S(I,p.value,"first"),disabled:w,"aria-label":i(e.firstAriaLabel),"aria-disabled":w}:void 0,prev:{icon:a.value?e.nextIcon:e.prevIcon,onClick:I=>S(I,s.value-1,"prev"),disabled:w,"aria-label":i(e.previousAriaLabel),"aria-disabled":w},next:{icon:a.value?e.prevIcon:e.nextIcon,onClick:I=>S(I,s.value+1,"next"),disabled:P,"aria-label":i(e.nextAriaLabel),"aria-disabled":P},last:e.showFirstLastPage?{icon:a.value?e.firstIcon:e.lastIcon,onClick:I=>S(I,p.value+f.value-1,"last"),disabled:P,"aria-label":i(e.lastAriaLabel),"aria-disabled":P}:void 0}});function C(){const w=s.value-p.value;b.value[w]?.$el.focus()}function R(w){w.key===vw.left&&!e.disabled&&s.value>Number(e.start)?(s.value=s.value-1,ot(C)):w.key===vw.right&&!e.disabled&&s.value<p.value+f.value-1&&(s.value=s.value+1,ot(C))}return Ae(()=>h(e.tag,{ref:d,class:Pe(["v-pagination",l.value,e.class]),style:De(e.style),role:"navigation","aria-label":i(e.ariaLabel),onKeydown:R,"data-test":"v-pagination-root"},{default:()=>[E("ul",{class:"v-pagination__list"},[e.showFirstLastPage&&E("li",{key:"first",class:"v-pagination__first","data-test":"v-pagination-first"},[n.first?n.first(_.value.first):h(te,de({_as:"VPaginationBtn"},_.value.first),null)]),E("li",{key:"prev",class:"v-pagination__prev","data-test":"v-pagination-prev"},[n.prev?n.prev(_.value.prev):h(te,de({_as:"VPaginationBtn"},_.value.prev),null)]),T.value.map((w,P)=>E("li",{key:w.key,class:Pe(["v-pagination__item",{"v-pagination__item--is-active":w.isActive}]),"data-test":"v-pagination-item"},[n.item?n.item(w):h(te,de({_as:"VPaginationBtn"},w.props),{default:()=>[w.page]})])),E("li",{key:"next",class:"v-pagination__next","data-test":"v-pagination-next"},[n.next?n.next(_.value.next):h(te,de({_as:"VPaginationBtn"},_.value.next),null)]),e.showFirstLastPage&&E("li",{key:"last",class:"v-pagination__last","data-test":"v-pagination-last"},[n.last?n.last(_.value.last):h(te,de({_as:"VPaginationBtn"},_.value.last),null)])])]})),{}}}),hM=oe({color:String,prevIcon:{type:$e,default:"$prev"},nextIcon:{type:$e,default:"$next"},firstIcon:{type:$e,default:"$first"},lastIcon:{type:$e,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"),Zk=_e()({name:"VDataTableFooter",props:hM(),setup(e,t){let{slots:n}=t;const{t:r}=Br(),{page:s,pageCount:i,startIndex:o,stopIndex:a,itemsLength:l,itemsPerPage:u,setItemsPerPage:c}=EZ(),d=O(()=>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 Ae(()=>{const f=Jk.filterProps(e);return E("div",{class:"v-data-table-footer"},[n.prepend?.(),E("div",{class:"v-data-table-footer__items-per-page"},[E("span",null,[r(e.itemsPerPageText)]),h(ho,{items:d.value,itemColor:e.color,modelValue:u.value,"onUpdate:modelValue":p=>c(Number(p)),density:"compact",variant:"outlined","aria-label":r(e.itemsPerPageText),hideDetails:!0},null)]),E("div",{class:"v-data-table-footer__info"},[E("div",null,[r(e.pageText,l.value?o.value+1:0,a.value,l.value)])]),E("div",{class:"v-data-table-footer__pagination"},[h(Jk,de({modelValue:s.value,"onUpdate:modelValue":p=>s.value=p,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"},bn(f,["color"])),null)])])}),{}}}),Rc=BN({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 h(r,{class:Pe(["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:Oe(e.height),width:Oe(e.width),maxWidth:Oe(e.maxWidth),left:s==="start"?Oe(e.fixedOffset||null):void 0,right:s==="end"?Oe(e.fixedEndOffset||null):void 0,paddingInlineStart:e.indent?Oe(e.indent):void 0}},{default:()=>[n.default?.()]})}),BZ=oe({headers:Array},"DataTable-header"),pM=Symbol.for("vuetify:data-table-headers"),mM={title:"",sortable:!1},VZ={...mM,width:48};function UZ(){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 Dy(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)Dy(n,t);return t}function gM(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&&gM(n.children,t);return t}function zZ(e){if(e.key){if(e.key==="data-table-group")return mM;if(["data-table-expand","data-table-select"].includes(e.key))return VZ}}function ZS(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.children?Math.max(t,...e.children.map(n=>ZS(n,t+1))):t}function HZ(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=vM(e[i],r);let s=0;for(let i=e.length-1;i>=0;i--)s=yM(e[i],s)}function vM(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=vM(n,t)}else e.fixed&&e.fixed!=="end"&&(e.fixedOffset=t,t+=parseFloat(e.width||"0")||0);return t}function yM(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=yM(n,t)}else e.fixed==="end"&&(e.fixedEndOffset=t,t+=parseFloat(e.width||"0")||0);return t}function jZ(e,t){const n=[];let r=0;const s=UZ(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-ZS(u);if(a.push({...u,rowspan:d??1,colspan:u.children?Dy(u).length:1}),u.children)for(const f of u.children){const p=c%1+l/Math.pow(10,r+2);s.enqueue(f,r+d+p)}l+=1,o-=1}r+=1,n.push(a)}return{columns:e.map(o=>Dy(o)).flat(),headers:n}}function bM(e){const t=[];for(const n of e){const r={...zZ(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?bM(r.children):void 0};t.push(o)}return t}function qZ(e,t){const n=H([]),r=H([]),s=H({}),i=H({}),o=H({});vn(()=>{const u=(e.headers||Object.keys(e.items[0]??{}).map(m=>({key:m,title:Xs(m)}))).slice(),c=gM(u);t?.groupBy?.value.length&&!c.has("data-table-group")&&u.unshift({key:"data-table-group",title:"Group"}),t?.showSelect?.value&&!c.has("data-table-select")&&u.unshift({key:"data-table-select"}),t?.showExpand?.value&&!c.has("data-table-expand")&&u.push({key:"data-table-expand"});const d=bM(u);HZ(d);const f=Math.max(...d.map(m=>ZS(m)))+1,p=jZ(d,f);n.value=p.headers,r.value=p.columns;const v=p.headers.flat(1);for(const m of v)m.key&&(m.sortable&&(m.sort&&(s.value[m.key]=m.sort),m.sortRaw&&(i.value[m.key]=m.sortRaw)),m.filter&&(o.value[m.key]=m.filter))});const a={headers:n,columns:r,sortFunctions:s,sortRawFunctions:i,filterFunctions:o};return zt(pM,a),a}function Dp(){const e=je(pM);if(!e)throw new Error("Missing headers!");return e}const SM=oe({color:String,disableSort:Boolean,fixedHeader:Boolean,multiSort:Boolean,initialSortOrder:String,sortAscIcon:{type:$e,default:"$sortAsc"},sortDescIcon:{type:$e,default:"$sortDesc"},headerProps:{type:Object},sticky:Boolean,...Un(),...Ca(),...Kh()},"VDataTableHeaders"),ex=_e()({name:"VDataTableHeaders",props:SM(),setup(e,t){let{slots:n}=t;const{t:r}=Br(),{toggleSort:s,sortBy:i,isSorted:o}=fM(),{someSelected:a,allSelected:l,selectAll:u,showSelectAll:c}=Op(),{columns:d,headers:f}=Dp(),{loaderClasses:p}=zc(e);function v(P,I){if(!(e.sticky||e.fixedHeader)&&!P.fixed)return;const A=typeof P.fixed=="string"?P.fixed:P.fixed?"start":"none";return{position:"sticky",left:A==="start"?Oe(P.fixedOffset):void 0,right:A==="end"?Oe(P.fixedEndOffset):void 0,top:e.sticky||e.fixedHeader?`calc(var(--v-table-header-height) * ${I})`:void 0}}function m(P,I){P.key==="Enter"&&!e.disableSort&&s(I,P)}function y(P){const I=i.value.find(A=>A.key===P.key);return!I&&e.initialSortOrder==="asc"||I?.order==="asc"?e.sortAscIcon:e.sortDescIcon}const{backgroundColorClasses:S,backgroundColorStyles:b}=or(()=>e.color),{displayClasses:k,mobile:T}=Es(e),_=O(()=>({headers:f.value,columns:d.value,toggleSort:s,isSorted:o,sortBy:i.value,someSelected:a.value,allSelected:l.value,selectAll:u,getSortIcon:y})),C=O(()=>["v-data-table__th",{"v-data-table__th--sticky":e.sticky||e.fixedHeader},k.value,p.value]),R=P=>{let{column:I,x:A,y:$}=P;const K=I.key==="data-table-select"||I.key==="data-table-expand",M=I.key==="data-table-group"&&I.width===0&&!I.title,L=de(e.headerProps??{},I.headerProps??{});return h(Rc,de({tag:"th",align:I.align,class:[{"v-data-table__th--sortable":I.sortable&&!e.disableSort,"v-data-table__th--sorted":o(I),"v-data-table__th--fixed":I.fixed},...C.value],style:{width:Oe(I.width),minWidth:Oe(I.minWidth),maxWidth:Oe(I.maxWidth),...v(I,$)},colspan:I.colspan,rowspan:I.rowspan,fixed:I.fixed,nowrap:I.nowrap,lastFixed:I.lastFixed,firstFixedEnd:I.firstFixedEnd,noPadding:K,empty:M,tabindex:I.sortable?0:void 0,onClick:I.sortable?j=>s(I,j):void 0,onKeydown:I.sortable?j=>m(j,I):void 0},L),{default:()=>{const j=`header.${I.key}`,G={column:I,selectAll:u,isSorted:o,toggleSort:s,sortBy:i.value,someSelected:a.value,allSelected:l.value,getSortIcon:y};return n[j]?n[j](G):M?"":I.key==="data-table-select"?n["header.data-table-select"]?.(G)??(c.value&&h(ya,{color:e.color,density:e.density,modelValue:l.value,indeterminate:a.value&&!l.value,"onUpdate:modelValue":u},null)):E("div",{class:"v-data-table-header__content"},[E("span",null,[I.title]),I.sortable&&!e.disableSort&&h(Z,{key:"icon",class:"v-data-table-header__sort-icon",icon:y(I)},null),e.multiSort&&o(I)&&E("div",{key:"badge",class:Pe(["v-data-table-header__sort-badge",...S.value]),style:De(b.value)},[i.value.findIndex(B=>B.key===I.key)+1])])}})},w=()=>{const P=O(()=>d.value.filter(A=>A?.sortable&&!e.disableSort)),I=d.value.find(A=>A.key==="data-table-select");return h(Rc,de({tag:"th",class:[...C.value],colspan:f.value.length+1},e.headerProps),{default:()=>[E("div",{class:"v-data-table-header__content"},[h(ho,{chips:!0,color:e.color,class:"v-data-table__td-sort-select",clearable:!0,density:"default",items:P.value,label:r("$vuetify.dataTable.sortBy"),multiple:e.multiSort,variant:"underlined","onClick:clear":()=>i.value=[]},{append:I?()=>h(ya,{color:e.color,density:"compact",modelValue:l.value,indeterminate:a.value&&!l.value,"onUpdate:modelValue":()=>u(!l.value)},null):void 0,chip:A=>h(mn,{onClick:A.item.raw?.sortable?()=>s(A.item.raw):void 0,onMousedown:$=>{$.preventDefault(),$.stopPropagation()}},{default:()=>[A.item.title,h(Z,{class:Pe(["v-data-table__td-sort-icon",o(A.item.raw)&&"v-data-table__td-sort-icon-active"]),icon:y(A.item.raw),size:"small"},null)]})})])]})};Ae(()=>T.value?E("tr",null,[h(w,null,null)]):E(Ie,null,[n.headers?n.headers(_.value):f.value.map((P,I)=>E("tr",null,[P.map((A,$)=>h(R,{column:A,x:$,y:I},null))])),e.loading&&E("tr",{class:"v-data-table-progress"},[E("th",{colspan:d.value.length},[h(Yh,{name:"v-data-table-progress",absolute:!0,active:!0,color:typeof e.loading=="boolean"||e.loading==="true"?e.color:e.loading,indeterminate:!0},{default:n.loader})])])]))}}),wM=oe({item:{type:Object,required:!0},groupCollapseIcon:{type:$e,default:"$tableGroupCollapse"},groupExpandIcon:{type:$e,default:"$tableGroupExpand"},...Un()},"VDataTableGroupHeaderRow"),WZ=_e()({name:"VDataTableGroupHeaderRow",props:wM(),setup(e,t){let{slots:n}=t;const{isGroupOpen:r,toggleGroup:s,extractRows:i}=iM(),{isSelected:o,isSomeSelected:a,select:l}=Op(),{columns:u}=Dp(),c=O(()=>i([e.item])),d=ne(()=>u.value.length-(u.value.some(f=>f.key==="data-table-select")?1:0));return()=>E("tr",{class:"v-data-table-group-header-row",style:{"--v-data-table-group-header-row-depth":e.item.depth}},[u.value.map(f=>{if(f.key==="data-table-group"){const p=r(e.item)?e.groupCollapseIcon:e.groupExpandIcon,v=()=>s(e.item);return n["data-table-group"]?.({item:e.item,count:c.value.length,props:{icon:p,onClick:v}})??h(Rc,{class:"v-data-table-group-header-row__column",colspan:d.value},{default:()=>[h(te,{size:"small",variant:"text",icon:p,onClick:v},null),E("span",null,[e.item.value]),E("span",null,[x("("),c.value.length,x(")")])]})}else if(f.key==="data-table-select"){const p=c.value.filter(S=>S.selectable),v=p.length>0&&o(p),m=a(p)&&!v,y=S=>l(p,S);return n["data-table-select"]?.({props:{modelValue:v,indeterminate:m,"onUpdate:modelValue":y}})??h(Rc,{class:"v-data-table__td--select-row",noPadding:!0},{default:()=>[h(ya,{density:e.density,disabled:p.length===0,modelValue:v,indeterminate:m,"onUpdate:modelValue":y},null)]})}return""})])}}),_M=oe({color:String,index:Number,item:Object,cellProps:[Object,Function],collapseIcon:{type:$e,default:"$collapse"},expandIcon:{type:$e,default:"$expand"},onClick:Nn(),onContextmenu:Nn(),onDblclick:Nn(),...Un(),...Ca()},"VDataTableRow"),GZ=_e()({name:"VDataTableRow",props:_M(),setup(e,t){let{slots:n}=t;const{displayClasses:r,mobile:s}=Es(e,"v-data-table__tr"),{isSelected:i,toggleSelect:o,someSelected:a,allSelected:l,selectAll:u}=Op(),{isExpanded:c,toggleExpand:d}=rM(),{toggleSort:f,sortBy:p,isSorted:v}=fM(),{columns:m}=Dp();Ae(()=>E("tr",{class:Pe(["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,S)=>{const b=e.item,k=`item.${y.key}`,T=`header.${y.key}`,_={index:e.index,item:b.raw,internalItem:b,value:da(b.columns,y.key),column:y,isSelected:i,toggleSelect:o,isExpanded:c,toggleExpand:d},C={column:y,selectAll:u,isSorted:v,toggleSort:f,sortBy:p.value,someSelected:a.value,allSelected:l.value,getSortIcon:()=>""},R=typeof e.cellProps=="function"?e.cellProps({index:_.index,item:_.item,internalItem:_.internalItem,value:_.value,column:y}):e.cellProps,w=typeof y.cellProps=="function"?y.cellProps({index:_.index,item:_.item,internalItem:_.internalItem,value:_.value}):y.cellProps,P=y.key==="data-table-select"||y.key==="data-table-expand",I=y.key==="data-table-group"&&y.width===0&&!y.title;return h(Rc,de({align:y.align,indent:y.indent,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:P,empty:I,nowrap:y.nowrap,width:s.value?void 0:y.width},R,w),{default:()=>{if(y.key==="data-table-select")return n["item.data-table-select"]?.({..._,props:{color:e.color,disabled:!b.selectable,modelValue:i([b]),onClick:yt(()=>o(b),["stop"])}})??h(ya,{color:e.color,disabled:!b.selectable,density:e.density,modelValue:i([b]),onClick:yt($=>o(b,e.index,$),["stop"])},null);if(y.key==="data-table-expand")return n["item.data-table-expand"]?.({..._,props:{icon:c(b)?e.collapseIcon:e.expandIcon,size:"small",variant:"text",onClick:yt(()=>d(b),["stop"])}})??h(te,{icon:c(b)?e.collapseIcon:e.expandIcon,size:"small",variant:"text",onClick:yt(()=>d(b),["stop"])},null);if(n[k]&&!s.value)return n[k](_);const A=re(_.value);return s.value?E(Ie,null,[E("div",{class:"v-data-table__td-title"},[n[T]?.(C)??y.title]),E("div",{class:"v-data-table__td-value"},[n[k]?.(_)??A])]):A}})})]))}}),kM=oe({color:String,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],...io(_M(),["collapseIcon","expandIcon","density"]),...io(wM(),["groupCollapseIcon","groupExpandIcon","density"]),...Ca()},"VDataTableRows"),tx=_e()({name:"VDataTableRows",inheritAttrs:!1,props:kM(),setup(e,t){let{attrs:n,slots:r}=t;const{columns:s}=Dp(),{expandOnClick:i,toggleExpand:o,isExpanded:a}=rM(),{isSelected:l,toggleSelect:u}=Op(),{toggleGroup:c,isGroupOpen:d}=iM(),{t:f}=Br(),{mobile:p}=Es(e);return Ae(()=>{const v=io(e,["groupCollapseIcon","groupExpandIcon","density"]);return e.loading&&(!e.items.length||r.loading)?E("tr",{class:"v-data-table-rows-loading",key:"loading"},[E("td",{colspan:s.value.length},[r.loading?.()??f(e.loadingText)])]):!e.loading&&!e.items.length&&!e.hideNoData?E("tr",{class:"v-data-table-rows-no-data",key:"no-data"},[E("td",{colspan:s.value.length},[r["no-data"]?.()??f(e.noDataText)])]):E(Ie,null,[e.items.map((m,y)=>{if(m.type==="group"){const k={index:y,item:m,columns:s.value,isExpanded:a,toggleExpand:o,isSelected:l,toggleSelect:u,toggleGroup:c,isGroupOpen:d};return r["group-header"]?r["group-header"](k):h(WZ,de({key:`group-header_${m.id}`,item:m},$w(n,":groupHeader",()=>k),v),r)}if(m.type==="group-summary"){const k={index:y,item:m,columns:s.value,toggleGroup:c};return r["group-summary"]?.(k)??""}const S={index:y,item:m.raw,internalItem:m,columns:s.value,isExpanded:a,toggleExpand:o,isSelected:l,toggleSelect:u},b={...S,props:de({key:`item_${m.key??m.index}`,onClick:i.value?()=>{o(m)}:void 0,index:y,item:m,color:e.color,cellProps:e.cellProps,collapseIcon:e.collapseIcon,expandIcon:e.expandIcon,density:e.density,mobile:p.value},$w(n,":row",()=>S),typeof e.rowProps=="function"?e.rowProps({item:S.item,index:S.index,internalItem:S.internalItem}):e.rowProps)};return E(Ie,{key:b.props.key},[r.item?r.item(b):h(GZ,b.props,r),a(m)&&r["expanded-row"]?.(S)])})])}),{}}}),xM=oe({fixedHeader:Boolean,fixedFooter:Boolean,height:[Number,String],hover:Boolean,striped:{type:String,default:null,validator:e=>["even","odd"].includes(e)},...Ue(),...Un(),...ut(),...Pt()},"VTable"),My=_e()({name:"VTable",props:xM(),setup(e,t){let{slots:n,emit:r}=t;const{themeClasses:s}=Wt(e),{densityClasses:i}=as(e);return Ae(()=>h(e.tag,{class:Pe(["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:De(e.style)},{default:()=>[n.top?.(),n.default?E("div",{class:"v-table__wrapper",style:{height:Oe(e.height)}},[E("table",null,[n.default()])]):n.wrapper?.(),n.bottom?.()]})),{}}}),KZ=oe({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 YZ(e,t,n,r){const s=e.returnObject?t:kn(t,e.itemValue),i=kn(t,e.itemSelectable,!0),o=r.reduce((a,l)=>(l.key!=null&&(a[l.key]=kn(t,l.value)),a),{});return{type:"item",key:e.returnObject?kn(t,e.itemValue):s,index:n,value:s,selectable:i,columns:o,raw:t}}function XZ(e,t,n){return t.map((r,s)=>YZ(e,r,s,n))}function QZ(e,t){return{items:O(()=>XZ(e,e.items,t.value))}}const JZ=oe({...kM(),hideDefaultBody:Boolean,hideDefaultFooter:Boolean,hideDefaultHeader:Boolean,width:[String,Number],search:String,...pZ(),...gZ(),...BZ(),...KZ(),...PZ(),...AZ(),...bn(SM(),["multiSort","initialSortOrder"]),...xM()},"DataTable"),ZZ=oe({..._Z(),...JZ(),...dZ(),...hM()},"VDataTable"),eee=_e()({name:"VDataTable",props:ZZ(),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}=vZ(e),{initialSortOrder:i,sortBy:o,multiSort:a,mustSort:l}=OZ(e),{page:u,itemsPerPage:c}=kZ(e),{disableSort:d}=_a(e),{columns:f,headers:p,sortFunctions:v,sortRawFunctions:m,filterFunctions:y}=qZ(e,{groupBy:s,showSelect:ne(()=>e.showSelect),showExpand:ne(()=>e.showExpand)}),{items:S}=QZ(e,f),b=ne(()=>e.search),{filteredItems:k}=hZ(e,S,b,{transform:pe=>pe.columns,customKeyFilter:y}),{toggleSort:T}=MZ({initialSortOrder:i,sortBy:o,multiSort:a,mustSort:l,page:u}),{sortByWithGroups:_,opened:C,extractRows:R,isGroupOpen:w,toggleGroup:P}=yZ({groupBy:s,sortBy:o,disableSort:d}),{sortedItems:I}=LZ(e,k,_,{transform:pe=>({...pe.raw,...pe.columns}),sortFunctions:v,sortRawFunctions:m}),{flatItems:A}=SZ(I,s,C,()=>!!r["group-summary"]),$=O(()=>A.value.length),{startIndex:K,stopIndex:M,pageCount:L,setItemsPerPage:j}=xZ({page:u,itemsPerPage:c,itemsLength:$}),{paginatedItems:G}=CZ({items:A,startIndex:K,stopIndex:M,itemsPerPage:c}),B=O(()=>R(G.value)),{isSelected:q,select:N,selectAll:se,toggleSelect:z,someSelected:U,allSelected:le}=IZ(e,{allItems:S,currentPage:B}),{isExpanded:J,toggleExpand:be}=mZ(e);wZ({page:u,itemsPerPage:c,sortBy:o,groupBy:s,search:b}),Tr({VDataTableRows:{hideNoData:ne(()=>e.hideNoData),noDataText:ne(()=>e.noDataText),loading:ne(()=>e.loading),loadingText:ne(()=>e.loadingText)}});const W=O(()=>({page:u.value,itemsPerPage:c.value,sortBy:o.value,pageCount:L.value,toggleSort:T,setItemsPerPage:j,someSelected:U.value,allSelected:le.value,isSelected:q,select:N,selectAll:se,toggleSelect:z,isExpanded:J,toggleExpand:be,isGroupOpen:w,toggleGroup:P,items:B.value.map(pe=>pe.raw),internalItems:B.value,groupedItems:G.value,columns:f.value,headers:p.value}));return Ae(()=>{const pe=Zk.filterProps(e),ue=ex.filterProps(bn(e,["multiSort"])),Y=tx.filterProps(e),Le=My.filterProps(e);return h(My,de({class:["v-data-table",{"v-data-table--show-select":e.showSelect,"v-data-table--loading":e.loading},e.class],style:e.style},Le,{fixedHeader:e.fixedHeader||e.sticky}),{top:()=>r.top?.(W.value),default:()=>r.default?r.default(W.value):E(Ie,null,[r.colgroup?.(W.value),!e.hideDefaultHeader&&E("thead",{key:"thead"},[h(ex,de(ue,{multiSort:!!e.multiSort}),r)]),r.thead?.(W.value),!e.hideDefaultBody&&E("tbody",null,[r["body.prepend"]?.(W.value),r.body?r.body(W.value):h(tx,de(n,Y,{items:G.value}),r),r["body.append"]?.(W.value)]),r.tbody?.(W.value),r.tfoot?.(W.value)]),bottom:()=>r.bottom?r.bottom(W.value):!e.hideDefaultFooter&&E(Ie,null,[h(en,null,null),h(Zk,pe,{prepend:r["footer.prepend"]})])})}),{}}}),tee=oe({...Ue(),...z7()},"VForm"),e0=_e()({name:"VForm",props:tee(),emits:{"update:modelValue":e=>!0,submit:e=>!0},setup(e,t){let{slots:n,emit:r}=t;const s=H7(e),i=H();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=>{let{valid:f}=d;f&&i.value?.submit()}),u.preventDefault()}return Ae(()=>E("form",{ref:i,class:Pe(["v-form",e.class]),style:De(e.style),novalidate:!0,onReset:o,onSubmit:a},[n.default?.(s)])),us(s,i)}}),nee=oe({disabled:Boolean,modelValue:{type:Boolean,default:null},...wb()},"VHover"),nx=_e()({name:"VHover",props:nee(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=tt(e,"modelValue"),{runOpenDelay:s,runCloseDelay:i}=_b(e,o=>!e.disabled&&(r.value=o));return()=>n.default?.({isHovering:r.value,props:{onMouseenter:s,onMouseleave:i}})}}),ree={class:"mt-4 mb-4"},see={key:0},iee={key:1},oee={key:0},aee={key:1},lee=["colspan"],uee=Me({__name:"PrintersView",setup(e){const t=Rt(),n=Vt(),r=H(!1),s=Jn(),i=Li(),o=_p(),a=Kt(Yt.AddOrUpdatePrinterDialog),l=H([]),u=H([]),c=H(""),d=H(""),f=H(),p=H(""),v=H([]),m=O(()=>o.hasFeature("printerGroupsApi")),y=O(()=>[{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 S(){return r.value=!0,await o.loadFeatures(),o.hasFeature("printerGroupsApi")&&(l.value=await Ba.getGroupsWithPrinters()),r.value=!1,l}const b=Ep({queryKey:["printerGroups"],queryFn:S}),k=O(()=>{if(!o.hasFeature("printerGroupsApi")||!u.value?.length)return n.printers;const z=u.value.flatMap(U=>U.printers.map(le=>le.printerId))||[];return n.printers.filter(U=>z.includes(U.id))}),T=O(()=>s.printerCurrentEventReceivedAtById),_=O(()=>{if(!(!f.value&&f.value!==0))return l.value[f.value]}),C=z=>z?(Date.now()-z)/1e3:void 0,R=z=>l.value.filter(U=>U.printers.find(le=>le.printerId===z)),w=z=>l.value.filter(U=>!U.printers.find(le=>le.printerId===z)),P=z=>i.floorOfPrinter(z),I=z=>{n.setUpdateDialogPrinter(z),a.openDialog(z)},A=()=>{a.openDialog()},$=(z,U)=>{if(console.log(z,U),U.isExpanded){const le=v.value.findIndex(J=>J===z.id);v.value.splice(le,1)}else v.value.push(z.id.toString())},K=()=>{Kt(Yt.ImportOctoFarmDialog).openDialog()},M=()=>{Kt(Yt.YamlImportExport).openDialog()},L=async()=>{if(!c.value?.trim()?.length)throw new Error("Please set a non-empty group name");await Ba.createGroup(c.value.trim()),await b.refetch(),c.value="",t.info("Created group")},j=()=>{_.value&&(d.value=_.value?.name)},G=async z=>{if(!z?.id)throw new Error("Group id was not defined");if(!l.value.find(le=>le.id===z.id))throw new Error("Group was not found, please reload the page");if(!d.value?.trim()?.length)throw new Error("Please set a non-empty group name");await Ba.updateGroupName(z.id,d.value.trim()),await b.refetch()},B=async z=>{const U=l.value.find(J=>J.id===z);if(!U)throw new Error("Group was not found, please reload the page");const le=U.printers.length;le>0&&!confirm(`This group contains ${le} printers, are you sure to delete it?`)||(await Ba.deleteGroup(z),await b.refetch(),t.info("Deleted group"))},q=async(z,U)=>{await Ba.addPrinterToGroup(z,U),await b.refetch(),t.info("Added printer to group")},N=async(z,U)=>{await Ba.deletePrinterFromGroup(z,U),await b.refetch(),t.info("Removed printer from group")},se=async z=>{if(!z.id)throw new Error("Printer ID not set, cant toggle enabled");z.enabled=!z.enabled,await qt.toggleEnabled(z.id,z.enabled)};return(z,U)=>{const le=Pn("v-list-item-group");return F(),ge("div",null,[h(mt,null,{default:g(()=>[h(Zt,null,{default:g(()=>[U[11]||(U[11]=x(" Printers ",-1)),h(yn),m.value&&l.value.length?(F(),ee(ho,{key:0,modelValue:u.value,"onUpdate:modelValue":U[0]||(U[0]=J=>u.value=J),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"])):fe("",!0),h(et,{modelValue:p.value,"onUpdate:modelValue":U[1]||(U[1]=J=>p.value=J),class:"p-2",clearable:"",label:"Printer search","prepend-icon":"search","single-line":""},null,8,["modelValue"])]),_:1}),h(Q(eee),{expanded:v.value,headers:y.value,items:k.value,search:p.value,class:"elevation-1","item-key":"id","show-expand":"","single-expand":"","onClick:row":$},rT({"no-data":g(()=>[E("div",ree,[k.value.length===0?(F(),ge("h3",see," No printer has been created yet. Create one here: ")):(F(),ge("h3",iee," No printer has been found. Adjust your filters or search criteria. ")),h(GD)])]),top:g(()=>[h(ur,{flat:""},{default:g(()=>[h(Tn,null,{default:g(()=>[x(" Showing "+re(k.value.length||0)+" printers ",1)]),_:1}),h(te,{class:"ml-3",type:"button",variant:"outlined",onClick:U[2]||(U[2]=J=>K())},{default:g(()=>[h(Z,null,{default:g(()=>[...U[12]||(U[12]=[x("publish",-1)])]),_:1}),U[13]||(U[13]=x(" Import OctoFarm Printers ",-1))]),_:1}),h(te,{class:"ml-3",type:"button",variant:"outlined",onClick:U[3]||(U[3]=J=>A())},{default:g(()=>[h(Z,null,{default:g(()=>[...U[14]||(U[14]=[x("add",-1)])]),_:1}),U[15]||(U[15]=x(" Create Printer ",-1))]),_:1}),h(te,{class:"ml-3",color:"primary",type:"button",onClick:U[4]||(U[4]=J=>M())},{default:g(()=>[h(Z,null,{default:g(()=>[...U[16]||(U[16]=[x("publish",-1)])]),_:1}),U[17]||(U[17]=x(" Import/Export YAML ",-1))]),_:1}),h(yn)]),_:1})]),"item.enabled":g(({item:J})=>[h(Sh,{modelValue:J.enabled,"onUpdate:modelValue":be=>J.enabled=be,color:"primary",inset:"",onClickCapture:yt(be=>se(J),["stop"])},{default:g(()=>[x(re(J.enabled),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onClickCapture"])]),"item.printerType":g(({item:J})=>[x(re(Q(Yu)(J.printerType)),1)]),"item.name":g(({item:J})=>[h(mn,null,{default:g(()=>[x(re(J.name||J.printerURL),1)]),_:2},1024)]),"item.floor":g(({item:J})=>[J.id?(F(),ee(mn,{key:0},{default:g(()=>[x(re(P(J.id)?.name),1)]),_:2},1024)):fe("",!0)]),"item.actions":g(({item:J})=>[h(tZ,{printer:J},null,8,["printer"]),h(oZ,{printer:J},null,8,["printer"]),h(aZ,{printer:J},null,8,["printer"]),h(lZ,{printer:J},null,8,["printer"]),h(uZ,{printer:J},null,8,["printer"]),h(sZ,{printer:J,"onUpdate:show":be=>I(J)},null,8,["printer","onUpdate:show"])]),"item.socketupdate":g(({item:J})=>[T.value[J.id]?(F(),ge("span",oee," Updated "+re(C(T.value[J.id]))+" seconds ago ",1)):(F(),ge("span",aee," No update received (silence) "))]),"expanded-row":g(({item:J,columns:be})=>[E("td",{colspan:be.length},[h(eZ,{printer:J},null,8,["printer"])],8,lee)]),_:2},[m.value?{name:"item.group",fn:g(({item:J})=>[(F(!0),ge(Ie,null,Ht(R(J.id),be=>(F(),ee(mn,{key:be.id,class:"ml-2",closable:"",size:"small","onClick:close":W=>N(be.id,J.id)},{default:g(()=>[x(re(be.name),1)]),_:2},1032,["onClick:close"]))),128)),h(xp,{"offset-y":""},{activator:g(({props:be})=>[h(mn,de({disabled:!l.value.length,class:"ml-2",size:"small"},be),{default:g(()=>[h(Z,{size:"small"},{default:g(()=>[...U[18]||(U[18]=[x("add",-1)])]),_:1})]),_:1},16,["disabled"])]),default:g(()=>[h(Dt,{density:"compact",style:{border:"1px solid dimgray"}},{default:g(()=>[h(Cr,null,{default:g(()=>[...U[19]||(U[19]=[x(" ADD TO GROUP",-1)])]),_:1}),h(le,null,{default:g(()=>[(F(!0),ge(Ie,null,Ht(w(J.id),(be,W)=>(F(),ee(Ne,{key:W,onClick:pe=>q(be.id,J.id)},{default:g(()=>[h(it,null,{default:g(()=>[x(re(be.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?(F(),ee(mt,{key:0,class:"mt-4"},{default:g(()=>[h(Zt,null,{default:g(()=>[...U[20]||(U[20]=[x(" Printer Groups ",-1)])]),_:1}),h(Gt,null,{default:g(()=>[U[26]||(U[26]=E("h3",null,"Existing groups:",-1)),h(Bn,null,{default:g(()=>[h(dh,{modelValue:f.value,"onUpdate:modelValue":[U[5]||(U[5]=J=>f.value=J),U[6]||(U[6]=J=>j())],column:"","selected-class":"primary--text"},{default:g(()=>[(F(!0),ge(Ie,null,Ht(l.value,J=>(F(),ee(mn,{key:J.id,class:"mr-3",closable:"",size:"small","onClick:close":be=>B(J.id)},{default:g(()=>[x(re(J.name),1)]),_:2},1032,["onClick:close"]))),128))]),_:1},8,["modelValue"])]),_:1}),U[27]||(U[27]=E("h3",{class:"mt-3"},"Update group name",-1)),h(Bn,null,{default:g(()=>[_.value?fe("",!0):(F(),ee(ln,{key:0},{default:g(()=>[...U[21]||(U[21]=[x(" Select a group to update its name. ",-1)])]),_:1})),h(et,{modelValue:d.value,"onUpdate:modelValue":U[7]||(U[7]=J=>d.value=J),disabled:!_.value,label:"Group Name",placeholder:"Type group name here"},{default:g(()=>[...U[22]||(U[22]=[x(" Name ",-1)])]),_:1},8,["modelValue","disabled"]),h(te,{onClick:U[8]||(U[8]=J=>G(_.value))},{default:g(()=>[...U[23]||(U[23]=[x(" Update name ",-1)])]),_:1})]),_:1}),U[28]||(U[28]=E("h3",{class:"mt-3"},"Add group",-1)),h(Bn,null,{default:g(()=>[h(et,{modelValue:c.value,"onUpdate:modelValue":U[9]||(U[9]=J=>c.value=J),label:"Group Name",placeholder:"Type group name here"},{default:g(()=>[...U[24]||(U[24]=[x(" Name ",-1)])]),_:1},8,["modelValue"]),h(te,{onClick:U[10]||(U[10]=J=>L())},{default:g(()=>[...U[25]||(U[25]=[x(" Create new group",-1)])]),_:1})]),_:1})]),_:1})]),_:1})):fe("",!0)])}}}),Ls={grid:"grid",floors:"floors",printer:"printer",emergencyCommands:"emergencyCommands",users:"users",account:"account",serverProtection:"serverProtection",softwareUpgrade:"softwareUpgrade",diagnostics:"diagnostics",experimental:"experimental"},cee={[Ls.grid]:{title:"Grid",icon:"grid_on",path:"/settings/grid",divider:!1},[Ls.floors]:{title:"Floors",icon:"house_siding",path:"/settings/floors",divider:!0},[Ls.printer]:{title:"Printer",icon:"local_print_shop",path:"/settings/printer",divider:!1},[Ls.emergencyCommands]:{title:"Emergency Commands",icon:"warning",path:"/settings/emergency-commands",divider:!0},[Ls.users]:{title:"Users",icon:"group",path:"/settings/user-management",divider:!1},[Ls.account]:{title:"Account",icon:"account_circle",path:"/settings/account",divider:!1},[Ls.serverProtection]:{title:"Server Protection",icon:"security",path:"/settings/server-protection",divider:!0},[Ls.softwareUpgrade]:{title:"Software Upgrade",icon:"upgrade",path:"/settings/software-upgrade",divider:!1},[Ls.diagnostics]:{title:"Diagnostics",icon:"bug_report",path:"/settings/diagnostics",divider:!1},[Ls.experimental]:{title:"Experimental",icon:"settings_applications",path:"/settings/experimental",divider:!1}},dee=Me({__name:"SettingsView",setup(e){const t=H(cee);return(n,r)=>{const s=Pn("router-view");return F(),ge("div",null,[h(Je,{"no-gutters":""},{default:g(()=>[h(TS,{permanent:!0},{default:g(()=>[h(Ne,null,{default:g(()=>[h(it,{class:"text-h6"},{default:g(()=>[...r[0]||(r[0]=[x(" Settings ",-1)])]),_:1}),h(pt,null,{default:g(()=>[...r[1]||(r[1]=[x(" Adjust your FDM Monster ",-1)])]),_:1})]),_:1}),h(en),h(Dt,{density:"compact",nav:""},{default:g(()=>[(F(!0),ge(Ie,null,Ht(Q(t),i=>(F(),ee(Ne,{key:i.title,to:i.path,link:"","prepend-icon":i.icon,title:i.title,"router-link":"",style:De(i.divider?"border-bottom: 1px solid gray":"")},null,8,["to","prepend-icon","title","style"]))),128))]),_:1})]),_:1}),h(Ve,null,{default:g(()=>[h(s)]),_:1})]),_:1})])}}});function fee(e){const t=new Date(e);return new Intl.DateTimeFormat("default",{dateStyle:"long"}).format(t)}const hee={key:0,class:"text--primary float-end mr-5 mt-2"},pee={class:"text-grey-darken-4"},mee={key:0,class:"text-success"},gee={key:1,class:"text-error"},vee={key:0},yee={key:0},bee={key:0},See={key:1},wee={key:0},_ee={key:1},kee=Me({__name:"UserManagementSettings",setup(e){const t=Rt(),n=H(!1),r=H(),s=H([]),i=H([]);async function o(){n.value=!0;try{r.value=await qr.getProfile(),i.value=await qr.listRoles(),s.value=await qr.listUsers()}catch(m){throw n.value=!1,console.error(m),m}return n.value=!1,{users:s,roles:i,profile:r}}const a=Ep({queryKey:["userRolesProfile"],queryFn:o});function l(m){return m.map(y=>i.value.find(S=>S.id==y)?.name)}function u(m){return m.id==r.value?.id}async function c(m){if(confirm(`Are you sure you want to delete ${m.username}?`)){try{n.value=!0,await qr.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 qr.setUserVerified(m.id,y),await a.refetch()}catch(S){throw n.value=!1,console.error(S),S}n.value=!1,t.info(y?`User ${m.username} verified`:`User ${m.username} unverified`)}}async function f(m,y=!0){if(r.value?.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 qr.setRootUser(m.id,y),await a.refetch()}catch(S){throw n.value=!1,console.error(S),S}n.value=!1,t.info(y?`User ${m.username} set to owner`:`User ${m.username} is no longer owner`)}}async function p(m){try{n.value=!0,console.log(m.roles),console.log(m.roles.map(y=>typeof y)),await qr.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 v(){await Kt(Yt.CreateUserDialog).openDialog()}return(m,y)=>{const S=Pn("v-list-item-content");return F(),ee(mt,null,{default:g(()=>[h(ur,{color:"primary"},{default:g(()=>[h(st,null,{default:g(()=>[h(Z,null,{default:g(()=>[...y[1]||(y[1]=[x("settings",-1)])]),_:1})]),_:1}),h(Tn,null,{default:g(()=>[...y[2]||(y[2]=[x(" Users ",-1)])]),_:1}),h(yn),h(te,{disabled:!r.value?.isRootUser,class:"mt-2",color:"primary",onClick:y[0]||(y[0]=b=>v())},{default:g(()=>[h(Z,{class:"mr-2"},{default:g(()=>[...y[3]||(y[3]=[x("verified_user",-1)])]),_:1}),y[4]||(y[4]=E("span",null,"Create verified user",-1))]),_:1},8,["disabled"])]),_:1}),n.value?(F(),ee(qD,{key:0,size:20,color:"#a70015",style:{margin:"250px",position:"absolute"}})):fe("",!0),h(Dt,{lines:"three"},{default:g(()=>[h(Cr,null,{default:g(()=>[...y[5]||(y[5]=[x(" Showing all users ",-1)])]),_:1}),(F(!0),ge(Ie,null,Ht(s.value,(b,k)=>(F(),ee(Ne,{key:k,class:"pl-6",style:{"max-width":"800px","border-top":"1px solid grey","border-bottom":"1px solid grey"}},{default:g(()=>[h(S,{class:Pe(u(b)?"pl-6 grey darken-3":"pl-6 grey darken-4")},{default:g(()=>[h(it,null,{default:g(()=>[x(" User '"+re(b.username)+"' ",1),u(b)?(F(),ge("strong",hee," Your account ")):fe("",!0)]),_:2},1024),h(pt),E("span",pee,[E("ul",null,[E("li",null,[b.isVerified?(F(),ge("span",mee," Account verified ")):(F(),ge("span",gee," Account not verified "))]),E("li",null,"Created at "+re(Q(fee)(b.createdAt)),1),b.isDemoUser?(F(),ge("li",vee,"Demo user account")):fe("",!0),E("li",null,[y[7]||(y[7]=x(" Role(s) ",-1)),E("ul",null,[b.isRootUser?(F(),ge("li",yee,[h(mn,{class:"mb-2 mt-2",size:"small"},{default:g(()=>[...y[6]||(y[6]=[x(" OWNER ",-1)])]),_:1})])):fe("",!0),(F(!0),ge(Ie,null,Ht(l(b.roles),T=>(F(),ge("li",{key:T},[h(mn,{class:"mb-2 mt-2",size:"small"},{default:g(()=>[x(re(T),1)]),_:2},1024)]))),128))])])])])]),_:2},1032,["class"]),h(Il,null,{default:g(()=>[h(te,{disabled:u(b)||b.isRootUser,color:b.isVerified?"error darken-4":"success",onClick:T=>d(b,!b.isVerified)},{default:g(()=>[h(Z,{class:"mr-2"},{default:g(()=>[...y[8]||(y[8]=[x("shield",-1)])]),_:1}),b.isVerified?fe("",!0):(F(),ge("span",bee," Verify account ")),b.isVerified?(F(),ge("span",See," Un-verify account ")):fe("",!0)]),_:2},1032,["disabled","color","onClick"]),h(te,{color:b.isRootUser?"error darken-4":"success",disabled:u(b)||!r.value?.isRootUser,class:"mt-2",onClick:T=>f(b,!b.isRootUser)},{default:g(()=>[h(Z,{class:"mr-2"},{default:g(()=>[...y[9]||(y[9]=[x("key",-1)])]),_:1}),b.isRootUser?(F(),ge("span",wee," Remove owner ")):fe("",!0),b.isRootUser?fe("",!0):(F(),ge("span",_ee," Set owner "))]),_:2},1032,["color","disabled","onClick"]),r.value?.isRootUser?(F(),ee(ho,{key:0,items:i.value.map(T=>({text:T.name,value:T.id})),modelValue:b.roles,"onUpdate:modelValue":T=>b.roles=T,multiple:"",label:"Select roles",onChange:T=>p(b),class:"pt-6",style:{width:"15rem"}},null,8,["items","modelValue","onUpdate:modelValue","onChange"])):fe("",!0),h(te,{disabled:u(b)||b.isRootUser,class:"mt-2",color:"error-darken-2",onClick:T=>c(b)},{default:g(()=>[h(Z,{class:"mr-2"},{default:g(()=>[...y[10]||(y[10]=[x("delete",-1)])]),_:1}),y[11]||(y[11]=x(" Delete ",-1))]),_:1},8,["disabled","onClick"])]),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1})}}}),xee=Me({__name:"PrinterSettings",setup(e){const t=Ts(),n=Jn(),r=Rt(),s=H({autoRemoveOldFilesBeforeUpload:!1,autoRemoveOldFilesAtBoot:!1,autoRemoveOldFilesCriteriumDays:7}),i=H({fileCleanSettings:!1,timeoutSettings:!1,purgeFiles:!1,bulkDisableGCodeAnalysis:!1});gt(async()=>{const c=await pn.getSettings();s.value=c.printerFileClean});async function o(){if(t.settings.timeout.apiTimeout=parseInt(t.settings.timeout.apiTimeout.toString()),t.settings.timeout.apiUploadTimeout=parseInt(t.settings.timeout.apiUploadTimeout.toString()),!t.settings?.timeout?.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 pn.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 bi.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 tM.setGCodeAnalysis(d.id,!1);r.openInfoMessage({title:`Finished disabling GCode analysis for ${c.length} online printers.`})}finally{i.value.bulkDisableGCodeAnalysis=!1}}return(c,d)=>(F(),ee(mt,null,{default:g(()=>[h(ur,{color:"primary"},{default:g(()=>[h(st,null,{default:g(()=>[h(Z,null,{default:g(()=>[...d[10]||(d[10]=[x("settings",-1)])]),_:1})]),_:1}),h(Tn,null,{default:g(()=>[...d[11]||(d[11]=[x(" Printer Settings ",-1)])]),_:1})]),_:1}),h(Dt,{lines:"three"},{default:g(()=>[h(Ne,null,{default:g(()=>[h(it,null,{default:g(()=>[...d[12]||(d[12]=[x(" Pre-upload file cleanup ",-1)])]),_:1}),h(pt,null,{default:g(()=>[d[14]||(d[14]=x(" Automatically cleanup old files to ensure the SD card has enough space. ",-1)),d[15]||(d[15]=E("br",null,null,-1)),h(cn,{modelValue:s.value.autoRemoveOldFilesBeforeUpload,"onUpdate:modelValue":d[0]||(d[0]=f=>s.value.autoRemoveOldFilesBeforeUpload=f),label:"Remove old file before upload"},null,8,["modelValue"]),h(et,{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"]),h(cn,{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"]),h(te,{color:"primary",onClick:d[3]||(d[3]=f=>a())},{default:g(()=>[...d[13]||(d[13]=[x(" save file clean settings ",-1)])]),_:1})]),_:1})]),_:1}),h(Ne,null,{default:g(()=>[h(it,null,{default:g(()=>[...d[16]||(d[16]=[x(" Connection Timeout ",-1)])]),_:1}),Q(t).settings?.timeout?(F(),ee(pt,{key:0},{default:g(()=>[d[18]||(d[18]=x(" Set the server default REST API timeout in milliseconds. ",-1)),h(et,{modelValue:Q(t).settings.timeout.apiTimeout,"onUpdate:modelValue":d[4]||(d[4]=f=>Q(t).settings.timeout.apiTimeout=f),label:"Connection Timeout",min:"0",variant:"outlined",type:"number"},null,8,["modelValue"]),h(te,{color:"primary",onClick:d[5]||(d[5]=f=>o())},{default:g(()=>[...d[17]||(d[17]=[x(" save connection timeout ",-1)])]),_:1})]),_:1})):fe("",!0)]),_:1}),h(Ne,null,{default:g(()=>[h(it,null,{default:g(()=>[...d[19]||(d[19]=[x(" Upload Timeout ",-1)])]),_:1}),Q(t).settings?.timeout?(F(),ee(pt,{key:0},{default:g(()=>[d[21]||(d[21]=x(" Set the server REST API file upload timeout in milliseconds. ",-1)),h(et,{modelValue:Q(t).settings.timeout.apiUploadTimeout,"onUpdate:modelValue":d[6]||(d[6]=f=>Q(t).settings.timeout.apiUploadTimeout=f),label:"Upload Timeout",min:"0",variant:"outlined",type:"number"},null,8,["modelValue"]),h(te,{color:"primary",onClick:d[7]||(d[7]=f=>o())},{default:g(()=>[...d[20]||(d[20]=[x(" save upload timeout ",-1)])]),_:1})]),_:1})):fe("",!0)]),_:1}),h(Ne,null,{default:g(()=>[h(it,null,{default:g(()=>[...d[22]||(d[22]=[x(" Clean file references ",-1)])]),_:1}),h(pt,null,{default:g(()=>[d[24]||(d[24]=x(" Clear out the file references for all printers - this does not remove them from OctoPrint! ",-1)),d[25]||(d[25]=E("br",null,null,-1)),h(te,{color:"primary",onClick:d[8]||(d[8]=f=>l())},{default:g(()=>[...d[23]||(d[23]=[x(" Purge file references ",-1)])]),_:1})]),_:1})]),_:1}),h(Ne,null,{default:g(()=>[h(it,null,{default:g(()=>[...d[26]||(d[26]=[x(" Disable inefficient GCode analysis ",-1)])]),_:1}),h(pt,null,{default:g(()=>[d[28]||(d[28]=x(" Disable GCode analysis on all printers at once, preventing CPU intensive and inaccurate time/size estimates. ",-1)),d[29]||(d[29]=E("br",null,null,-1)),h(te,{color:"primary",onClick:d[9]||(d[9]=f=>u())},{default:g(()=>[...d[27]||(d[27]=[x(" Bulk disable GCode Analysis ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}))}}),EM=Me({__name:"SettingsToolbar",props:["icon","title"],setup(e){const t=e;return(n,r)=>(F(),ee(ur,null,{default:g(()=>[h(st,null,{default:g(()=>[h(Z,null,{default:g(()=>[x(re(t.icon),1)]),_:1})]),_:1}),h(Tn,null,{default:g(()=>[x(re(t.title),1)]),_:1}),Hh(n.$slots,"default")]),_:3}))}}),Eee=Me({name:"FloorSettings",props:{},setup:()=>({printersStore:Vt(),floorStore:Li(),addOrUpdateFloorDialog:Kt(Yt.AddOrUpdateFloorDialog),snackbar:Rt()}),data:()=>({selectedItem:0,editedFloorName:"",editedFloorNumber:0}),computed:{floors(){return this.floorStore.floors},selectedFloor(){return this.floorStore.floors[this.selectedItem]},showAddedPrinters(){return this.selectedFloor.printers?.length+1}},methods:{printerInFloor(e,t){if(!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(){if(!this.selectedFloor?.id)return;const{id:e}=this.selectedFloor;await this.floorStore.updateFloorName({floorId:e,name:this.editedFloorName}),this.snackbar.info("Floor name updated")},async updatePrinterFloorNumber(){if(!this.selectedFloor?.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(){this.selectedFloor?.id&&(await this.floorStore.deleteFloor(this.selectedFloor.id),this.snackbar.info("Floor deleted"))},async deletePrinterFromFloor(e,t){const n=this.printerInFloor(e,t);!e?.id||!n?.id||(await this.floorStore.deletePrinterFromFloor({floorId:e.id,printerId:n.id}),this.snackbar.info("Printer removed from floor"))}}}),Cee={key:1};function Tee(e,t,n,r,s,i){const o=EM,a=Pn("v-list-item-action-text"),l=Pn("v-list-item-group"),u=Pn("v-edit-dialog"),c=Pn("v-list-item-content");return F(),ee(mt,null,{default:g(()=>[h(o,{icon:"house_siding",title:"Floors"}),h(Dt,{subheader:"",lines:"three"},{default:g(()=>[h(Cr,null,{default:g(()=>[...t[7]||(t[7]=[x("Floors",-1)])]),_:1}),h(Ne,null,{default:g(()=>[h(it,null,{default:g(()=>[...t[8]||(t[8]=[x(" Create new floor ",-1)])]),_:1}),h(pt,null,{default:g(()=>[t[10]||(t[10]=x(" Creates an empty department/floor to view printer groups ",-1)),t[11]||(t[11]=E("br",null,null,-1)),h(te,{color:"primary",onClick:t[0]||(t[0]=d=>e.createFloor())},{default:g(()=>[...t[9]||(t[9]=[x(" Create floor ",-1)])]),_:1})]),_:1})]),_:1})]),_:1}),h(en),h(Je,{"no-gutters":""},{default:g(()=>[h(Ve,null,{default:g(()=>[h(Dt,{density:"compact"},{default:g(()=>[h(l,{modelValue:e.selectedItem,"onUpdate:modelValue":t[1]||(t[1]=d=>e.selectedItem=d)},{default:g(()=>[(F(!0),ge(Ie,null,Ht(e.floors,d=>(F(),ee(Ne,{key:d.id},{default:g(()=>[h(it,null,{default:g(()=>[x(re(d.name),1)]),_:2},1024),h(pt,null,{default:g(()=>[x(re(d.printers.length||0)+" assigned ",1)]),_:2},1024),h(a,null,{default:g(()=>[x(" Floor number: "+re(d.floor),1)]),_:2},1024)]),_:2},1024))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),h(Ve,null,{default:g(()=>[h(ur,null,{default:g(()=>[h(nx,null,{default:g(({isHovering:d,props:f})=>[h(Tn,Jg(Mf(f)),{default:g(()=>[e.selectedFloor?(F(),ee(u,{key:0,onOpen:e.setEditedPrinterFloorName,onSave:e.updatePrinterFloorName},{input:g(()=>[h(et,{modelValue:e.editedFloorName,"onUpdate:modelValue":t[2]||(t[2]=p=>e.editedFloorName=p),"return-value":e.editedFloorName,"onUpdate:returnValue":t[3]||(t[3]=p=>e.editedFloorName=p),counter:"",label:"Edit","single-line":""},null,8,["modelValue","return-value"])]),default:g(()=>[h(te,{color:"secondary"},{default:g(()=>[d?(F(),ee(Z,{key:0,size:"small"},{default:g(()=>[...t[12]||(t[12]=[x(" edit ",-1)])]),_:1})):fe("",!0),x(" "+re(e.selectedFloor.name),1)]),_:2},1024)]),_:2},1032,["onOpen","onSave"])):(F(),ge("span",Cee," Select a floor on the left "))]),_:2},1040)]),_:1}),h(nx,null,{default:g(({isHovering:d,props:f})=>[h(Tn,Jg(Mf(f)),{default:g(()=>[e.selectedFloor?(F(),ee(u,{key:0,onOpen:e.setEditedPrinterFloorNumber,onSave:e.updatePrinterFloorNumber},{input:g(()=>[h(et,{modelValue:e.editedFloorNumber,"onUpdate:modelValue":t[4]||(t[4]=p=>e.editedFloorNumber=p),"return-value":e.editedFloorNumber,"onUpdate:returnValue":t[5]||(t[5]=p=>e.editedFloorNumber=p),label:"Edit","single-line":"",type:"number"},null,8,["modelValue","return-value"])]),default:g(()=>[h(te,{color:"secondary"},{default:g(()=>[d?(F(),ee(Z,{key:0,size:"small"},{default:g(()=>[...t[13]||(t[13]=[x(" edit ",-1)])]),_:1})):fe("",!0),x(" "+re(e.selectedFloor.floor),1)]),_:2},1024)]),_:2},1032,["onOpen","onSave"])):fe("",!0)]),_:2},1040)]),_:1}),h(yn),e.selectedFloor?(F(),ee(te,{key:0,color:"primary",onClick:t[6]||(t[6]=d=>e.clickDeleteFloor())},{default:g(()=>[h(Z,null,{default:g(()=>[...t[14]||(t[14]=[x("delete",-1)])]),_:1}),t[15]||(t[15]=x(" Delete floor ",-1))]),_:1})):fe("",!0)]),_:1}),e.selectedFloor?(F(),ee(Dt,{key:0},{default:g(()=>[(F(!0),ge(Ie,null,Ht(e.showAddedPrinters,d=>(F(),ee(Ne,{key:d},{default:g(()=>[e.printerInFloor(e.selectedFloor,d)?(F(),ee(c,{key:0},{default:g(()=>[h(it,null,{default:g(()=>[x(re(e.printerInFloor(e.selectedFloor,d)?.name),1)]),_:2},1024)]),_:2},1024)):fe("",!0),e.printerInFloor(e.selectedFloor,d)?(F(),ee(Il,{key:1},{default:g(()=>[h(te,{onClick:f=>e.deletePrinterFromFloor(e.selectedFloor,d)},{default:g(()=>[h(Z,null,{default:g(()=>[...t[16]||(t[16]=[x("close",-1)])]),_:1}),t[17]||(t[17]=x(" Clear ",-1))]),_:1},8,["onClick"])]),_:2},1024)):fe("",!0)]),_:2},1024))),128))]),_:1})):fe("",!0)]),_:1})]),_:1})]),_:1})}const Ree=Ia(Eee,[["render",Tee]]),Pee="/img/DavidZwart.jpg",CM="0.0.24",Iee={key:0},Aee={key:1},Oee=Me({__name:"AboutView",setup(e){const t=H(""),n=H(""),r=H(CM);return gt(async()=>{const s=await jo.getVersion();t.value=s.version,n.value=s.monsterPi}),(s,i)=>(F(),ee(mt,null,{default:g(()=>[h(Zt,null,{default:g(()=>[...i[0]||(i[0]=[x(" About FDM Monster",-1),E("strong",null," © ",-1)])]),_:1}),h(Gt,null,{default:g(()=>[...i[1]||(i[1]=[x(" The first prototype of FDM Monster",-1),E("strong",null," © ",-1),x(" was created by David Zwart in 2021 in collaboration with ",-1),E("strong",null,[E("a",{href:"https://mtb3d.com"}," MTB3D ")],-1),x(". 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}),h(Gt,null,{default:g(()=>[i[4]||(i[4]=x(" 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]=E("br",null,null,-1)),i[6]||(i[6]=x(" This version uses the famous ",-1)),i[7]||(i[7]=E("a",{href:"https://nodejs.org/en",target:"_blank"},[E("strong",null," Node.js framework ")],-1)),i[8]||(i[8]=x(" together with Awilix and ExpressJS for its server, and ",-1)),i[9]||(i[9]=E("a",{href:"https://vuejs.org/",target:"_blank"},[E("strong",null," Vue 2 ")],-1)),i[10]||(i[10]=x(" and ",-1)),i[11]||(i[11]=E("a",{href:"https://next.vuetifyjs.com/",target:"_blank"},[E("strong",null," Vuetify 2 ")],-1)),i[12]||(i[12]=x(" to set a base for FDM Monster Client",-1)),i[13]||(i[13]=E("strong",null," © ",-1)),i[14]||(i[14]=x(" - the webapp. ",-1)),i[15]||(i[15]=E("br",null,null,-1)),i[16]||(i[16]=E("br",null,null,-1)),E("strong",null," Your server's version is: "+re(t.value),1),i[17]||(i[17]=E("br",null,null,-1)),E("strong",null," Your clients's version is: "+re(r.value),1),i[18]||(i[18]=E("br",null,null,-1)),n.value?(F(),ge("strong",Iee,[x(" Your MonsterPi version is: "+re(n.value),1),i[2]||(i[2]=E("br",null,null,-1))])):(F(),ge("strong",Aee," No MonsterPi distro detected. ")),i[19]||(i[19]=E("br",null,null,-1)),h(te,{class:"mt-3",variant:"outlined",to:"/settings/software-upgrade"},{default:g(()=>[...i[3]||(i[3]=[x(" Visit Upgrade Settings ",-1)])]),_:1})]),_:1}),h(Zt,null,{default:g(()=>[...i[20]||(i[20]=[x(" Documentation ",-1)])]),_:1}),h(Gt,null,{default:g(()=>[E("strong",null,[h(te,{color:"primary",href:"https://docs.fdm-monster.net",style:{color:"white"},target:"_blank"},{default:g(()=>[h(Z,{class:"mr-2"},{default:g(()=>[...i[21]||(i[21]=[x("menu_book",-1)])]),_:1}),i[22]||(i[22]=x(" FDM Monster documentation site ",-1))]),_:1})]),i[23]||(i[23]=E("br",null,null,-1))]),_:1}),h(Zt,null,{default:g(()=>[i[25]||(i[25]=x(" Bug reports ",-1)),h(Z,null,{default:g(()=>[...i[24]||(i[24]=[x("bug",-1)])]),_:1})]),_:1}),h(Gt,null,{default:g(()=>[...i[26]||(i[26]=[x(" Did you find a bug, or a feature that needs work? We would love to hear about it! ",-1),E("br",null,null,-1),E("strong",null," We have multiple ways to report it: ",-1),E("h3",null,[E("ul",{class:"ml-5"},[E("li",null,"Mail to davidzwa@gmail.com"),E("li",null,[E("a",{href:"https://discord.gg/mwA8uP8CMc",style:{color:"white"},target:"_blank"}," Discord server ")]),E("li",null,[E("strong",null,[E("a",{href:"https://github.com/fdm-monster/fdm-monster/issues",style:{color:"white"},target:"_blank"},[x(" FDM Monster "),E("strong",null," © "),x(" Github Issues ")])])]),E("li",null,[E("a",{href:"https://fdm-monster.net",style:{color:"white"},target:"_blank"}," Website ")])])],-1)])]),_:1}),h(Zt,null,{default:g(()=>[...i[27]||(i[27]=[x(" About me ",-1)])]),_:1}),h(Gt,null,{default:g(()=>[...i[28]||(i[28]=[E("img",{src:Pee,width:"150px"},null,-1),E("h4",{class:"mt-2"},[E("a",{href:"https://www.linkedin.com/in/david-zwart-88514083/",style:{color:"white"},target:"_blank"}," LinkedIn "),E("a",{class:"ml-2",href:"https://github.com/davidzwa",style:{color:"white"},target:"_blank"}," Github Profile ")],-1),x(" David Zwart MSc., post-graduate from the TU Delft (Embedded Systems), author of FDM Monster",-1),E("strong",null," © ",-1)])]),_:1})]),_:1}))}});function ld(e){return e+.5|0}const Ki=(e,t,n)=>Math.max(Math.min(e,n),t);function Ou(e){return Ki(ld(e*2.55),0,255)}function to(e){return Ki(ld(e*255),0,255)}function di(e){return Ki(ld(e/2.55)/100,0,1)}function rx(e){return Ki(ld(e*100),0,100)}const Hr={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},Ly=[..."0123456789ABCDEF"],Dee=e=>Ly[e&15],Mee=e=>Ly[(e&240)>>4]+Ly[e&15],Ld=e=>(e&240)>>4===(e&15),Lee=e=>Ld(e.r)&&Ld(e.g)&&Ld(e.b)&&Ld(e.a);function Fee(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&Hr[e[1]]*17,g:255&Hr[e[2]]*17,b:255&Hr[e[3]]*17,a:t===5?Hr[e[4]]*17:255}:(t===7||t===9)&&(n={r:Hr[e[1]]<<4|Hr[e[2]],g:Hr[e[3]]<<4|Hr[e[4]],b:Hr[e[5]]<<4|Hr[e[6]],a:t===9?Hr[e[7]]<<4|Hr[e[8]]:255})),n}const Nee=(e,t)=>e<255?t(e):"";function $ee(e){var t=Lee(e)?Dee:Mee;return e?"#"+t(e.r)+t(e.g)+t(e.b)+Nee(e.a,t):void 0}const Bee=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function TM(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 Vee(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 Uee(e,t,n){const r=TM(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 zee(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 t0(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=zee(n,r,s,c,i),l=l*60+.5),[l|0,u||0,a]}function n0(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(to)}function r0(e,t,n){return n0(TM,e,t,n)}function Hee(e,t,n){return n0(Uee,e,t,n)}function jee(e,t,n){return n0(Vee,e,t,n)}function RM(e){return(e%360+360)%360}function qee(e){const t=Bee.exec(e);let n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?Ou(+t[5]):to(+t[5]));const s=RM(+t[2]),i=+t[3]/100,o=+t[4]/100;return t[1]==="hwb"?r=Hee(s,i,o):t[1]==="hsv"?r=jee(s,i,o):r=r0(s,i,o),{r:r[0],g:r[1],b:r[2],a:n}}function Wee(e,t){var n=t0(e);n[0]=RM(n[0]+t),n=r0(n),e.r=n[0],e.g=n[1],e.b=n[2]}function Gee(e){if(!e)return;const t=t0(e),n=t[0],r=rx(t[1]),s=rx(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${s}%, ${di(e.a)})`:`hsl(${n}, ${r}%, ${s}%)`}const sx={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"},ix={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 Kee(){const e={},t=Object.keys(ix),n=Object.keys(sx);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,sx[i]);i=parseInt(ix[o],16),e[a]=[i>>16&255,i>>8&255,i&255]}return e}let Fd;function Yee(e){Fd||(Fd=Kee(),Fd.transparent=[0,0,0,0]);const t=Fd[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const Xee=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Qee(e){const t=Xee.exec(e);let n=255,r,s,i;if(t){if(t[7]!==r){const o=+t[7];n=t[8]?Ou(o):Ki(o*255,0,255)}return r=+t[1],s=+t[3],i=+t[5],r=255&(t[2]?Ou(r):Ki(r,0,255)),s=255&(t[4]?Ou(s):Ki(s,0,255)),i=255&(t[6]?Ou(i):Ki(i,0,255)),{r,g:s,b:i,a:n}}}function Jee(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${di(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const Km=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,Va=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function Zee(e,t,n){const r=Va(di(e.r)),s=Va(di(e.g)),i=Va(di(e.b));return{r:to(Km(r+n*(Va(di(t.r))-r))),g:to(Km(s+n*(Va(di(t.g))-s))),b:to(Km(i+n*(Va(di(t.b))-i))),a:e.a+n*(t.a-e.a)}}function Nd(e,t,n){if(e){let r=t0(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=r0(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function PM(e,t){return e&&Object.assign(t||{},e)}function ox(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=to(e[3]))):(t=PM(e,{r:0,g:0,b:0,a:1}),t.a=to(t.a)),t}function ete(e){return e.charAt(0)==="r"?Qee(e):qee(e)}class Pc{constructor(t){if(t instanceof Pc)return t;const n=typeof t;let r;n==="object"?r=ox(t):n==="string"&&(r=Fee(t)||Yee(t)||ete(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=PM(this._rgb);return t&&(t.a=di(t.a)),t}set rgb(t){this._rgb=ox(t)}rgbString(){return this._valid?Jee(this._rgb):void 0}hexString(){return this._valid?$ee(this._rgb):void 0}hslString(){return this._valid?Gee(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=Zee(this._rgb,t._rgb,n)),this}clone(){return new Pc(this.rgb)}alpha(t){return this._rgb.a=to(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=ld(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 Nd(this._rgb,2,t),this}darken(t){return Nd(this._rgb,2,-t),this}saturate(t){return Nd(this._rgb,1,t),this}desaturate(t){return Nd(this._rgb,1,-t),this}rotate(t){return Wee(this._rgb,t),this}}function ii(){}const tte=(()=>{let e=0;return()=>e++})();function At(e){return e==null}function xn(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 bt(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function rs(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Fs(e,t){return rs(e)?e:t}function St(e,t){return typeof e>"u"?t:e}const nte=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function jt(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function Ct(e,t,n,r){let s,i,o;if(xn(e))for(i=e.length,s=0;s<i;s++)t.call(n,e[s],s);else if(bt(e))for(o=Object.keys(e),i=o.length,s=0;s<i;s++)t.call(n,e[o[s]],o[s])}function wh(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 _h(e){if(xn(e))return e.map(_h);if(bt(e)){const t=Object.create(null),n=Object.keys(e),r=n.length;let s=0;for(;s<r;++s)t[n[s]]=_h(e[n[s]]);return t}return e}function IM(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function rte(e,t,n,r){if(!IM(e))return;const s=t[e],i=n[e];bt(s)&&bt(i)?Ic(s,i,r):t[e]=_h(i)}function Ic(e,t,n){const r=xn(t)?t:[t],s=r.length;if(!bt(e))return e;n=n||{};const i=n.merger||rte;let o;for(let a=0;a<s;++a){if(o=r[a],!bt(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 Ju(e,t){return Ic(e,t,{merger:ste})}function ste(e,t,n){if(!IM(e))return;const r=t[e],s=n[e];bt(r)&&bt(s)?Ju(r,s):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=_h(s))}const ax={"":e=>e,x:e=>e.x,y:e=>e.y};function ite(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 ote(e){const t=ite(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function Ml(e,t){return(ax[t]||(ax[t]=ote(t)))(e)}function s0(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Ac=e=>typeof e<"u",po=e=>typeof e=="function",lx=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function ate(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const Zn=Math.PI,no=2*Zn,kh=Number.POSITIVE_INFINITY,lte=Zn/180,ps=Zn/2,Io=Zn/4,ux=Zn*2/3,AM=Math.log10,ro=Math.sign;function xf(e,t,n){return Math.abs(e-t)<n}function cx(e){const t=Math.round(e);e=xf(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(AM(e))),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function ute(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 cte(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function xh(e){return!cte(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function dte(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function fte(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 Go(e){return e*(Zn/180)}function hte(e){return e*(180/Zn)}function dx(e){if(!rs(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function pte(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*Zn&&(i+=no),{angle:i,distance:s}}function mte(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function Ao(e){return(e%no+no)%no}function gte(e,t,n,r){const s=Ao(e),i=Ao(t),o=Ao(n),a=Ao(i-s),l=Ao(o-s),u=Ao(s-i),c=Ao(s-o);return s===i||s===o||r||a>l&&u<c}function ms(e,t,n){return Math.max(t,Math.min(n,e))}function vte(e){return ms(e,-32768,32767)}function tl(e,t,n,r=1e-6){return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function i0(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 Fy=(e,t,n,r)=>i0(e,n,r?s=>{const i=e[s][t];return i<n||i===n&&e[s+1][t]===n}:s=>e[s][t]<n),yte=(e,t,n)=>i0(e,n,r=>e[r][t]>=n);function bte(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 OM=["push","pop","shift","splice","unshift"];function Ste(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),OM.forEach(n=>{const r="_onData"+s0(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 fx(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)&&(OM.forEach(i=>{delete e[i]}),delete e._chartjs)}function DM(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const MM=(function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame})();function LM(e,t){let n=[],r=!1;return function(...s){n=s,r||(r=!0,MM.call(window,()=>{r=!1,e.apply(t,n)}))}}function wte(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}const o0=e=>e==="start"?"left":e==="end"?"right":"center",jn=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,_te=(e,t,n,r)=>e===(r?"left":"right")?n:e==="center"?(t+n)/2:t,$d=e=>e===0||e===1,hx=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*no/n)),px=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*no/n)+1,Zu={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*ps)+1,easeOutSine:e=>Math.sin(e*ps),easeInOutSine:e=>-.5*(Math.cos(Zn*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=>$d(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=>$d(e)?e:hx(e,.075,.3),easeOutElastic:e=>$d(e)?e:px(e,.075,.3),easeInOutElastic(e){return $d(e)?e:e<.5?.5*hx(e*2,.1125,.45):.5+.5*px(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-Zu.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?Zu.easeInBounce(e*2)*.5:Zu.easeOutBounce(e*2-1)*.5+.5};function FM(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function mx(e){return FM(e)?e:new Pc(e)}function Ym(e){return FM(e)?e:new Pc(e).saturate(.5).darken(.1).hexString()}const kte=["x","y","borderWidth","radius","tension"],xte=["color","borderColor","backgroundColor"];function Ete(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:xte},numbers:{type:"number",properties:kte}}),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 Cte(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const gx=new Map;function Tte(e,t){t=t||{};const n=e+JSON.stringify(t);let r=gx.get(n);return r||(r=new Intl.NumberFormat(e,t),gx.set(n,r)),r}function NM(e,t,n){return Tte(t,n).format(e)}const Rte={values(e){return xn(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=Pte(e,n)}const o=AM(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),NM(e,r,l)}};function Pte(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 $M={formatters:Rte};function Ite(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:$M.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 wa=Object.create(null),Ny=Object.create(null);function ec(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 Xm(e,t,n){return typeof t=="string"?Ic(ec(e,t),n):Ic(ec(e,""),t)}class Ate{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)=>Ym(s.backgroundColor),this.hoverBorderColor=(r,s)=>Ym(s.borderColor),this.hoverColor=(r,s)=>Ym(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 Xm(this,t,n)}get(t){return ec(this,t)}describe(t,n){return Xm(Ny,t,n)}override(t,n){return Xm(wa,t,n)}route(t,n,r,s){const i=ec(this,t),o=ec(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 bt(l)?Object.assign({},u,l):St(l,u)},set(l){this[a]=l}}})}apply(t){t.forEach(n=>n(this))}}var dn=new Ate({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Ete,Cte,Ite]);function Ote(e){return!e||At(e.size)||At(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function vx(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 Oo(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 yx(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function bx(e,t,n,r){BM(e,t,n,r,null)}function BM(e,t,n,r,s){let i,o,a,l,u,c,d,f;const p=t.pointStyle,v=t.rotation,m=t.radius;let y=(v||0)*lte;if(p&&typeof p=="object"&&(i=p.toString(),i==="[object HTMLImageElement]"||i==="[object HTMLCanvasElement]")){e.save(),e.translate(n,r),e.rotate(y),e.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),e.restore();return}if(!(isNaN(m)||m<=0)){switch(e.beginPath(),p){default:s?e.ellipse(n,r,s/2,m,0,0,no):e.arc(n,r,m,0,no),e.closePath();break;case"triangle":c=s?s/2:m,e.moveTo(n+Math.sin(y)*c,r-Math.cos(y)*m),y+=ux,e.lineTo(n+Math.sin(y)*c,r-Math.cos(y)*m),y+=ux,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+Io)*l,d=Math.cos(y+Io)*(s?s/2-u:l),a=Math.sin(y+Io)*l,f=Math.sin(y+Io)*(s?s/2-u:l),e.arc(n-d,r-a,u,y-Zn,y-ps),e.arc(n+f,r-o,u,y-ps,y),e.arc(n+d,r+a,u,y,y+ps),e.arc(n-f,r+o,u,y+ps,y+Zn),e.closePath();break;case"rect":if(!v){l=Math.SQRT1_2*m,c=s?s/2:l,e.rect(n-c,r-l,2*c,2*l);break}y+=Io;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+=Io;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+=Io,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 VM(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 a0(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function l0(e){e.restore()}function Dte(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),At(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 Mte(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 Lte(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function Oc(e,t,n,r,s,i={}){const o=xn(t)?t:[t],a=i.strokeWidth>0&&i.strokeColor!=="";let l,u;for(e.save(),e.font=s.string,Dte(e,i),l=0;l<o.length;++l)u=o[l],i.backdrop&&Lte(e,i.backdrop),a&&(i.strokeColor&&(e.strokeStyle=i.strokeColor),At(i.strokeWidth)||(e.lineWidth=i.strokeWidth),e.strokeText(u,n,r,i.maxWidth)),e.fillText(u,n,r,i.maxWidth),Mte(e,n,r,u,i),r+=Number(s.lineHeight);e.restore()}function Eh(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*Zn,Zn,!0),e.lineTo(n,r+i-o.bottomLeft),e.arc(n+o.bottomLeft,r+i-o.bottomLeft,o.bottomLeft,Zn,ps,!0),e.lineTo(n+s-o.bottomRight,r+i),e.arc(n+s-o.bottomRight,r+i-o.bottomRight,o.bottomRight,ps,0,!0),e.lineTo(n+s,r+o.topRight),e.arc(n+s-o.topRight,r+o.topRight,o.topRight,0,-ps,!0),e.lineTo(n+o.topLeft,r)}const Fte=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Nte=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function $te(e,t){const n=(""+e).match(Fte);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 Bte=e=>+e||0;function UM(e,t){const n={},r=bt(t),s=r?Object.keys(t):t,i=bt(e)?r?o=>St(e[o],e[t[o]]):o=>e[o]:()=>e;for(const o of s)n[o]=Bte(i(o));return n}function zM(e){return UM(e,{top:"y",right:"x",bottom:"y",left:"x"})}function ul(e){return UM(e,["topLeft","topRight","bottomLeft","bottomRight"])}function ss(e){const t=zM(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Qn(e,t){e=e||{},t=t||dn.font;let n=St(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let r=St(e.style,t.style);r&&!(""+r).match(Nte)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const s={family:St(e.family,t.family),lineHeight:$te(St(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:St(e.weight,t.weight),string:""};return s.string=Ote(s),s}function Bd(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 Vte(e,t,n){const{min:r,max:s}=e,i=nte(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 lu(e,t){return Object.assign(Object.create(e),t)}function u0(e,t=[""],n,r,s=()=>e[0]){const i=n||e;typeof r>"u"&&(r=WM("_fallback",e));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:i,_fallback:r,_getTarget:s,override:a=>u0([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 jM(a,l,()=>Kte(l,t,e,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(a,l){return wx(a).includes(l)},ownKeys(a){return wx(a)},set(a,l,u){const c=a._storage||(a._storage=s());return a[l]=c[l]=u,delete a._keys,!0}})}function Ll(e,t,n,r){const s={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:HM(e,r),setContext:i=>Ll(e,i,n,r),override:i=>Ll(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 jM(i,o,()=>zte(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 HM(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:po(n)?n:()=>n,isIndexable:po(r)?r:()=>r}}const Ute=(e,t)=>e?e+s0(t):t,c0=(e,t)=>bt(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function jM(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const r=n();return e[t]=r,r}function zte(e,t,n){const{_proxy:r,_context:s,_subProxy:i,_descriptors:o}=e;let a=r[t];return po(a)&&o.isScriptable(t)&&(a=Hte(t,a,e,n)),xn(a)&&a.length&&(a=jte(t,a,e,o.isIndexable)),c0(t,a)&&(a=Ll(a,s,i&&i[t],o)),a}function Hte(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),c0(e,l)&&(l=d0(s._scopes,s,e,l)),l}function jte(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(bt(t[0])){const l=t,u=s._scopes.filter(c=>c!==l);t=[];for(const c of l){const d=d0(u,s,e,c);t.push(Ll(d,i,o&&o[e],a))}}return t}function qM(e,t,n){return po(e)?e(t,n):e}const qte=(e,t)=>e===!0?t:typeof e=="string"?Ml(t,e):void 0;function Wte(e,t,n,r,s){for(const i of t){const o=qte(n,i);if(o){e.add(o);const a=qM(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 d0(e,t,n,r){const s=t._rootScopes,i=qM(t._fallback,n,r),o=[...e,...s],a=new Set;a.add(r);let l=Sx(a,o,n,i||n,r);return l===null||typeof i<"u"&&i!==n&&(l=Sx(a,o,i,l,r),l===null)?!1:u0(Array.from(a),[""],s,i,()=>Gte(t,n,r))}function Sx(e,t,n,r,s){for(;n;)n=Wte(e,t,n,r,s);return n}function Gte(e,t,n){const r=e._getTarget();t in r||(r[t]={});const s=r[t];return xn(s)&&bt(n)?n:s||{}}function Kte(e,t,n,r){let s;for(const i of t)if(s=WM(Ute(i,e),n),typeof s<"u")return c0(e,s)?d0(n,r,e,s):s}function WM(e,t){for(const n of t){if(!n)continue;const r=n[e];if(typeof r<"u")return r}}function wx(e){let t=e._keys;return t||(t=e._keys=Yte(e._scopes)),t}function Yte(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 f0(){return typeof window<"u"&&typeof document<"u"}function h0(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function Ch(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 Mp=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function Xte(e,t){return Mp(e).getPropertyValue(t)}const Qte=["top","right","bottom","left"];function aa(e,t,n){const r={};n=n?"-"+n:"";for(let s=0;s<4;s++){const i=Qte[s];r[i]=parseFloat(e[t+"-"+i+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const Jte=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function Zte(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:s,offsetY:i}=r;let o=!1,a,l;if(Jte(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 No(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,s=Mp(n),i=s.boxSizing==="border-box",o=aa(s,"padding"),a=aa(s,"border","width"),{x:l,y:u,box:c}=Zte(e,n),d=o.left+(c&&a.left),f=o.top+(c&&a.top);let{width:p,height:v}=t;return i&&(p-=o.width+a.width,v-=o.height+a.height),{x:Math.round((l-d)/p*n.width/r),y:Math.round((u-f)/v*n.height/r)}}function ene(e,t,n){let r,s;if(t===void 0||n===void 0){const i=e&&h0(e);if(!i)t=e.clientWidth,n=e.clientHeight;else{const o=i.getBoundingClientRect(),a=Mp(i),l=aa(a,"border","width"),u=aa(a,"padding");t=o.width-u.width-l.width,n=o.height-u.height-l.height,r=Ch(a.maxWidth,i,"clientWidth"),s=Ch(a.maxHeight,i,"clientHeight")}}return{width:t,height:n,maxWidth:r||kh,maxHeight:s||kh}}const Yi=e=>Math.round(e*10)/10;function tne(e,t,n,r){const s=Mp(e),i=aa(s,"margin"),o=Ch(s.maxWidth,e,"clientWidth")||kh,a=Ch(s.maxHeight,e,"clientHeight")||kh,l=ene(e,t,n);let{width:u,height:c}=l;if(s.boxSizing==="content-box"){const f=aa(s,"border","width"),p=aa(s,"padding");u-=p.width+f.width,c-=p.height+f.height}return u=Math.max(0,u-i.width),c=Math.max(0,r?u/r:c-i.height),u=Yi(Math.min(u,o,l.maxWidth)),c=Yi(Math.min(c,a,l.maxHeight)),u&&!c&&(c=Yi(u/2)),(t!==void 0||n!==void 0)&&r&&l.height&&c>l.height&&(c=l.height,u=Yi(Math.floor(c*r))),{width:u,height:c}}function _x(e,t,n){const r=t||1,s=Yi(e.height*r),i=Yi(e.width*r);e.height=Yi(e.height),e.width=Yi(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 nne=(function(){let e=!1;try{const t={get passive(){return e=!0,!1}};f0()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e})();function kx(e,t){const n=Xte(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}const rne=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}}},sne=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function cl(e,t,n){return e?rne(t,n):sne()}function GM(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 KM(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function Vd(e,t,n){return e.options.clip?e[n]:t[n]}function ine(e,t){const{xScale:n,yScale:r}=e;return n&&r?{left:Vd(n,t,"left"),right:Vd(n,t,"right"),top:Vd(r,t,"top"),bottom:Vd(r,t,"bottom")}:t}function one(e,t){const n=t._clip;if(n.disabled)return!1;const r=ine(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)}}class ane{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=MM.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 ai=new ane;const xx="transparent",lne={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=mx(e||xx),s=r.valid&&mx(t||xx);return s&&s.valid?s.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class une{constructor(t,n,r,s){const i=n[r];s=Bd([t.to,s,i,t.from]);const o=Bd([t.from,i,s]);this._active=!0,this._fn=t.fn||lne[t.type||typeof o],this._easing=Zu[t.easing]||Zu.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=Bd([t.to,n,s,t.from]),this._from=Bd([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 YM{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!bt(t))return;const n=Object.keys(dn.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(s=>{const i=t[s];if(!bt(i))return;const o={};for(const a of n)o[a]=i[a];(xn(i.properties)&&i.properties||[s]).forEach(a=>{(a===s||!r.has(a))&&r.set(a,o)})})}_animateOptions(t,n){const r=n.options,s=dne(t,r);if(!s)return[];const i=this._createAnimations(s,r);return r.$shared&&cne(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 une(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 ai.add(this._chart,r),!0}}function cne(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 dne(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 Ex(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 fne(e,t,n){if(n===!1)return!1;const r=Ex(e,n),s=Ex(t,n);return{top:s.end,right:r.end,bottom:s.start,left:r.start}}function hne(e){let t,n,r,s;return bt(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 XM(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 Cx(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],rs(u)&&(i||t===0||ro(t)===ro(u))&&(t+=u)}return!c&&!r.all?0:t}function pne(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 Qm(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function mne(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function gne(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 vne(e,t,n){const r=e[t]||(e[t]={});return r[n]||(r[n]={})}function Tx(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 Rx(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=mne(i,o,r),d=t.length;let f;for(let p=0;p<d;++p){const v=t[p],{[l]:m,[u]:y}=v,S=v._stacks||(v._stacks={});f=S[u]=vne(s,c,m),f[a]=y,f._top=Tx(f,o,!0,r.type),f._bottom=Tx(f,o,!1,r.type);const b=f._visualValues||(f._visualValues={});b[a]=y}}function Jm(e,t){const n=e.scales;return Object.keys(n).filter(r=>n[r].axis===t).shift()}function yne(e,t){return lu(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function bne(e,t,n){return lu(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function ku(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 Zm=e=>e==="reset"||e==="none",Px=(e,t)=>t?e:Object.assign({},e),Sne=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:XM(n,!0),values:null};class QM{static defaults={};static datasetElementType=null;static dataElementType=null;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=Qm(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&&ku(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),s=(d,f,p,v)=>d==="x"?f:d==="r"?v:p,i=n.xAxisID=St(r.xAxisID,Jm(t,"x")),o=n.yAxisID=St(r.yAxisID,Jm(t,"y")),a=n.rAxisID=St(r.rAxisID,Jm(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&&fx(this._data,this),t._stacked&&ku(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(bt(n)){const s=this._cachedMeta;this._data=pne(n,s)}else if(r!==n){if(r){fx(r,this);const s=this._cachedMeta;ku(s),s._parsed=[]}n&&Object.isExtensible(n)&&Ste(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=Qm(n.vScale,n),n.stack!==r.stack&&(s=!0,ku(n),n.stack=r.stack),this._resyncElements(t),(s||i!==n._stacked)&&(Rx(this,n._parsed),n._stacked=Qm(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{xn(s[t])?f=this.parseArrayData(r,s,t,n):bt(s[t])?f=this.parseObjectData(r,s,t,n):f=this.parsePrimitiveData(r,s,t,n);const p=()=>d[a]===null||u&&d[a]<u[a];for(c=0;c<n;++c)r._parsed[c+t]=d=f[c],l&&(p()&&(l=!1),u=d);r._sorted=l}o&&Rx(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,p,v;for(f=0,p=s;f<p;++f)v=f+r,d[f]={[a]:c||i.parse(u[v],v),[l]:o.parse(n[v],v)};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,p;for(c=0,d=s;c<d;++c)f=c+r,p=n[f],u[c]={x:i.parse(Ml(p,a),f),y:o.parse(Ml(p,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:XM(s,!0),values:n._stacks[t.axis]._visualValues};return Cx(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=Cx(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=Sne(n,r,this.chart),u={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:d}=gne(a);let f,p;function v(){p=s[f];const m=p[a.axis];return!rs(p[t.axis])||c>m||d<m}for(f=0;f<o&&!(!v()&&(this.updateRangeFromParsed(u,t,p,l),i));++f);if(i){for(f=o-1;f>=0;--f)if(!v()){this.updateRangeFromParsed(u,t,p,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],rs(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=hne(St(this.options.clip,fne(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=bne(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=yne(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&&Ac(r);if(a)return Px(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),p=Object.keys(dn.elements[t]),v=()=>this.getContext(r,s,n),m=u.resolveNamedOptions(f,p,v,d);return m.$shared&&(m.$shared=l,i[o]=Object.freeze(Px(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 YM(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||Zm(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){Zm(s)?Object.assign(t,r):this._resolveAnimations(n,s).update(t,r)}updateSharedOptions(t,n,r){t&&!Zm(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&&ku(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])}}function wne(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=DM(r.sort((s,i)=>s-i))}return e._cache.$bar}function _ne(e){const t=e.iScale,n=wne(t,e.type);let r=t._length,s,i,o,a;const l=()=>{o===32767||o===-32768||(Ac(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 kne(e,t,n,r){const s=n.barThickness;let i,o;return At(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 xne(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 Ene(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 JM(e,t,n,r){return xn(e)?Ene(e,t,n,r):t[n.axis]=n.parse(e,r),t}function Ix(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(JM(f,d,i,u));return l}function eg(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function Cne(e,t,n){return e!==0?ro(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function Tne(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 Rne(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}=Tne(e);s==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===r?s=u:(n._bottom||0)===r?s=c:(i[Ax(c,o,a,l)]=!0,s=u)),i[Ax(s,o,a,l)]=!0,e.borderSkipped=i}function Ax(e,t,n,r){return r?(e=Pne(e,t,n),e=Ox(e,n,t)):e=Ox(e,t,n),e}function Pne(e,t,n){return e===t?n:e===n?t:e}function Ox(e,t,n){return e==="start"?t:e==="end"?n:e}function Ine(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class Ane extends QM{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,n,r,s){return Ix(t,n,r,s)}parseArrayData(t,n,r,s){return Ix(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,p,v,m;for(f=r,p=r+s;f<p;++f)m=n[f],v={},v[i.axis]=i.parse(Ml(m,u),f),d.push(JM(Ml(m,c),v,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=eg(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 p=n;p<n+r;p++){const v=this.getParsed(p),m=i||At(v[a.axis])?{base:l,head:l}:this._calculateBarValuePixels(p),y=this._calculateBarIndexPixels(p,c),S=(v._stacks||{})[a.axis],b={horizontal:u,base:m.base,enableBorderRadius:!S||eg(v._custom)||o===S._top||o===S._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(p,t[p].active?"active":s));const k=b.options||t[p].options;Rne(b,k,S,o),Ine(b,k,c.ratio),this.updateElement(t[p],p,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(p=>p[r.axis]===l),f=d&&d[c.vScale.axis];if(At(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[St(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||_ne(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=eg(u);let d=l[n.axis],f=0,p=r?this.applyStack(n,l,r):d,v,m;p!==d&&(f=p-d,p=d),c&&(d=u.barStart,p=u.barEnd-u.barStart,d!==0&&ro(d)!==ro(u.barEnd)&&(f=0),f+=d);const y=!At(i)&&!c?i:f;let S=n.getPixelForValue(y);if(this.chart.getDataVisibility(t)?v=n.getPixelForValue(f+p):v=S,m=v-S,Math.abs(m)<o){m=Cne(m,n,a)*o,d===a&&(S-=m/2);const b=n.getPixelForDecimal(0),k=n.getPixelForDecimal(1),T=Math.min(b,k),_=Math.max(b,k);S=Math.max(Math.min(S,_),T),v=S+m,r&&!c&&(l._stacks[n.axis]._visualValues[s]=n.getValueForPixel(v)-n.getValueForPixel(S))}if(S===n.getPixelForValue(a)){const b=ro(m)*n.getLineWidthForValue(a)/2;S+=b,m-=b}return{size:m,base:S,head:v,center:v+m/2}}_calculateBarIndexPixels(t,n){const r=n.scale,s=this.options,i=s.skipNull,o=St(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"?xne(t,n,s,c*u):kne(t,n,s,c*u),f=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,p=this._getAxis().indexOf(St(f,this.getFirstScaleIdForIndexAxis())),v=this._getStackIndex(this.index,this._cachedMeta.stack,i?t:void 0)+p;a=d.start+d.chunk*v+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)}}function Do(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class p0{static override(t){Object.assign(p0.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return Do()}parse(){return Do()}format(){return Do()}add(){return Do()}diff(){return Do()}startOf(){return Do()}endOf(){return Do()}}var One={_date:p0};function Dne(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?yte:Fy;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),p=u(i,t,n+d);return{lo:f.lo,hi:p.hi}}}}else{const c=u(i,t,n);if(l){const{vScale:d}=s._cachedMeta,{_parsed:f}=e,p=f.slice(0,c.lo+1).reverse().findIndex(m=>!At(m[d.axis]));c.lo-=Math.max(0,p);const v=f.slice(c.hi).findIndex(m=>!At(m[d.axis]));c.hi+=Math.max(0,v)}return c}}return{lo:0,hi:i.length-1}}function Lp(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}=Dne(i[a],t,o,s);for(let p=d;p<=f;++p){const v=c[p];v.skip||r(v,u,p)}}}function Mne(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 tg(e,t,n,r,s){const i=[];return!s&&!e.isPointInArea(t)||Lp(e,n,t,function(a,l,u){!s&&!VM(a,e.chartArea,0)||a.inRange(t.x,t.y,r)&&i.push({element:a,datasetIndex:l,index:u})},!0),i}function Lne(e,t,n,r){let s=[];function i(o,a,l){const{startAngle:u,endAngle:c}=o.getProps(["startAngle","endAngle"],r),{angle:d}=pte(o,{x:t.x,y:t.y});gte(d,u,c)&&s.push({element:o,datasetIndex:a,index:l})}return Lp(e,n,t,i),s}function Fne(e,t,n,r,s,i){let o=[];const a=Mne(n);let l=Number.POSITIVE_INFINITY;function u(c,d,f){const p=c.inRange(t.x,t.y,s);if(r&&!p)return;const v=c.getCenterPoint(s);if(!(!!i||e.isPointInArea(v))&&!p)return;const y=a(t,v);y<l?(o=[{element:c,datasetIndex:d,index:f}],l=y):y===l&&o.push({element:c,datasetIndex:d,index:f})}return Lp(e,n,t,u),o}function ng(e,t,n,r,s,i){return!i&&!e.isPointInArea(t)?[]:n==="r"&&!r?Lne(e,t,n,s):Fne(e,t,n,r,s,i)}function Dx(e,t,n,r,s){const i=[],o=n==="x"?"inXRange":"inYRange";let a=!1;return Lp(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 Nne={modes:{index(e,t,n,r){const s=No(t,e),i=n.axis||"x",o=n.includeInvisible||!1,a=n.intersect?tg(e,s,i,r,o):ng(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=No(t,e),i=n.axis||"xy",o=n.includeInvisible||!1;let a=n.intersect?tg(e,s,i,r,o):ng(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=No(t,e),i=n.axis||"xy",o=n.includeInvisible||!1;return tg(e,s,i,r,o)},nearest(e,t,n,r){const s=No(t,e),i=n.axis||"xy",o=n.includeInvisible||!1;return ng(e,s,i,n.intersect,r,o)},x(e,t,n,r){const s=No(t,e);return Dx(e,s,"x",n.intersect,r)},y(e,t,n,r){const s=No(t,e);return Dx(e,s,"y",n.intersect,r)}}};const ZM=["left","top","right","bottom"];function xu(e,t){return e.filter(n=>n.pos===t)}function Mx(e,t){return e.filter(n=>ZM.indexOf(n.pos)===-1&&n.box.axis===t)}function Eu(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 $ne(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 Bne(e){const t={};for(const n of e){const{stack:r,pos:s,stackWeight:i}=n;if(!r||!ZM.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 Vne(e,t){const n=Bne(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 Une(e){const t=$ne(e),n=Eu(t.filter(u=>u.box.fullSize),!0),r=Eu(xu(t,"left"),!0),s=Eu(xu(t,"right")),i=Eu(xu(t,"top"),!0),o=Eu(xu(t,"bottom")),a=Mx(t,"x"),l=Mx(t,"y");return{fullSize:n,leftAndTop:r.concat(i),rightAndBottom:s.concat(l).concat(o).concat(a),chartArea:xu(t,"chartArea"),vertical:r.concat(s).concat(l),horizontal:i.concat(o).concat(a)}}function Lx(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function e2(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(!bt(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&&e2(o,i.getPadding());const a=Math.max(0,t.outerWidth-Lx(o,e,"left","right")),l=Math.max(0,t.outerHeight-Lx(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 Hne(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 jne(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 Du(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,jne(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&&Du(s,t,n,r)||c}function Ud(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 Fx(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]||{placed:0,weight:1},c=a.stackWeight/u.weight||1;if(a.horizontal){const d=t.w*c,f=u.size||l.height;Ac(u.start)&&(o=u.start),l.fullSize?Ud(l,s.left,o,n.outerWidth-s.right-s.left,f):Ud(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;Ac(u.start)&&(i=u.start),l.fullSize?Ud(l,i,s.top,f,n.outerHeight-s.bottom-s.top):Ud(l,i,t.top+u.placed,f,d),u.start=i,u.placed+=d,i=l.right}}t.x=i,t.y=o}var Xr={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=ss(e.options.layout.padding),i=Math.max(t-s.width,0),o=Math.max(n-s.height,0),a=Une(e.boxes),l=a.vertical,u=a.horizontal;Ct(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);e2(f,ss(r));const p=Object.assign({maxPadding:f,w:i,h:o,x:s.left,y:s.top},s),v=Vne(l.concat(u),d);Du(a.fullSize,p,d,v),Du(l,p,d,v),Du(u,p,d,v)&&Du(l,p,d,v),Hne(p),Fx(a.leftAndTop,p,d,v),p.x+=p.w,p.y+=p.h,Fx(a.rightAndBottom,p,d,v),e.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},Ct(a.chartArea,m=>{const y=m.box;Object.assign(y,e.chartArea),y.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class t2{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 qne extends t2{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Ef="$chartjs",Wne={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Nx=e=>e===null||e==="";function Gne(e,t){const n=e.style,r=e.getAttribute("height"),s=e.getAttribute("width");if(e[Ef]={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",Nx(s)){const i=kx(e,"width");i!==void 0&&(e.width=i)}if(Nx(r))if(e.style.height==="")e.height=e.width/(t||2);else{const i=kx(e,"height");i!==void 0&&(e.height=i)}return e}const n2=nne?{passive:!0}:!1;function Kne(e,t,n){e&&e.addEventListener(t,n,n2)}function Yne(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,n2)}function Xne(e,t){const n=Wne[e.type]||e.type,{x:r,y:s}=No(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:s!==void 0?s:null}}function Th(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function Qne(e,t,n){const r=e.canvas,s=new MutationObserver(i=>{let o=!1;for(const a of i)o=o||Th(a.addedNodes,r),o=o&&!Th(a.removedNodes,r);o&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}function Jne(e,t,n){const r=e.canvas,s=new MutationObserver(i=>{let o=!1;for(const a of i)o=o||Th(a.removedNodes,r),o=o&&!Th(a.addedNodes,r);o&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}const Dc=new Map;let $x=0;function r2(){const e=window.devicePixelRatio;e!==$x&&($x=e,Dc.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function Zne(e,t){Dc.size||window.addEventListener("resize",r2),Dc.set(e,t)}function ere(e){Dc.delete(e),Dc.size||window.removeEventListener("resize",r2)}function tre(e,t,n){const r=e.canvas,s=r&&h0(r);if(!s)return;const i=LM((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),Zne(e,i),o}function rg(e,t,n){n&&n.disconnect(),t==="resize"&&ere(e)}function nre(e,t,n){const r=e.canvas,s=LM(i=>{e.ctx!==null&&n(Xne(i,e))},e);return Kne(r,t,s),s}class rre extends t2{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(Gne(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[Ef])return!1;const r=n[Ef].initial;["height","width"].forEach(i=>{const o=r[i];At(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[Ef],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const s=t.$proxies||(t.$proxies={}),o={attach:Qne,detach:Jne,resize:tre}[n]||nre;s[n]=o(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),s=r[n];if(!s)return;({attach:rg,detach:rg,resize:rg}[n]||Yne)(t,n,s),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,s){return tne(t,n,r,s)}isAttached(t){const n=t&&h0(t);return!!(n&&n.isConnected)}}function sre(e){return!f0()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?qne:rre}let uu=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return xh(this.x)&&xh(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}};function ire(e,t){const n=e.options.ticks,r=ore(e),s=Math.min(n.maxTicksLimit||r,r),i=n.major.enabled?lre(t):[],o=i.length,a=i[0],l=i[o-1],u=[];if(o>s)return ure(t,u,i,o/s),u;const c=are(i,t,s);if(o>0){let d,f;const p=o>1?Math.round((l-a)/(o-1)):null;for(zd(t,u,c,At(p)?0:a-p,a),d=0,f=o-1;d<f;d++)zd(t,u,c,i[d],i[d+1]);return zd(t,u,c,l,At(p)?t.length:l+p),u}return zd(t,u,c),u}function ore(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 are(e,t,n){const r=cre(e),s=t.length/n;if(!r)return Math.max(s,1);const i=ute(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 lre(e){const t=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}function ure(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 zd(e,t,n,r,s){const i=St(r,0),o=Math.min(St(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 cre(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 dre=e=>e==="left"?"right":e==="right"?"left":e,Bx=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,Vx=(e,t)=>Math.min(t||e,e);function Ux(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 fre(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 hre(e,t){Ct(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 Cu(e){return e.drawTicks?e.tickLength:0}function zx(e,t){if(!e.display)return 0;const n=Qn(e.font,t),r=ss(e.padding);return(xn(e.text)?e.text.length:1)*n.lineHeight+r.height}function pre(e,t){return lu(e,{scale:t,type:"scale"})}function mre(e,t,n){return lu(e,{tick:n,index:t,type:"tick"})}function gre(e,t,n){let r=o0(e);return(n&&t!=="right"||!n&&t==="right")&&(r=dre(r)),r}function vre(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,p,v;const m=o-s,y=a-i;if(e.isHorizontal()){if(p=jn(r,i,a),bt(n)){const S=Object.keys(n)[0],b=n[S];v=c[S].getPixelForValue(b)+m-t}else n==="center"?v=(u.bottom+u.top)/2+m-t:v=Bx(e,n,t);f=a-i}else{if(bt(n)){const S=Object.keys(n)[0],b=n[S];p=c[S].getPixelForValue(b)-y+t}else n==="center"?p=(u.left+u.right)/2-y+t:p=Bx(e,n,t);v=jn(r,o,s),d=n==="left"?-ps:ps}return{titleX:p,titleY:v,maxWidth:f,rotation:d}}class cu extends uu{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=Fs(t,Number.POSITIVE_INFINITY),n=Fs(n,Number.NEGATIVE_INFINITY),r=Fs(r,Number.POSITIVE_INFINITY),s=Fs(s,Number.NEGATIVE_INFINITY),{min:Fs(t,r),max:Fs(n,s),minDefined:rs(t),maxDefined:rs(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:Fs(n,Fs(r,n)),max:Fs(r,Fs(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(){jt(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=Vte(this,i,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?Ux(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=ire(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(){jt(this.options.afterUpdate,[this])}beforeSetDimensions(){jt(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(){jt(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),jt(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){jt(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=jt(n.callback,[i.value,r,t],this)}afterTickToLabelConversion(){jt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){jt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,r=Vx(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,p=ms(this.chart.width-d,0,this.maxWidth);a=t.offset?this.maxWidth/r:p/(r-1),d+6>a&&(a=p/(r-(t.offset?.5:1)),l=this.maxHeight-Cu(t.grid)-n.padding-zx(t.title,this.chart.options.font),u=Math.sqrt(d*d+f*f),o=hte(Math.min(Math.asin(ms((c.highest.height+6)/a,-1,1)),Math.asin(ms(l/u,-1,1))-Math.asin(ms(f/u,-1,1)))),o=Math.max(s,Math.min(i,o))),this.labelRotation=o}afterCalculateLabelRotation(){jt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){jt(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=zx(s,n.options.font);if(a?(t.width=this.maxWidth,t.height=Cu(i)+l):(t.height=this.maxHeight,t.width=Cu(i)+l),r.display&&this.ticks.length){const{first:u,last:c,widest:d,highest:f}=this._getLabelSizes(),p=r.padding*2,v=Go(this.labelRotation),m=Math.cos(v),y=Math.sin(v);if(a){const S=r.mirror?0:y*d.width+m*f.height;t.height=Math.min(this.maxHeight,t.height+S+p)}else{const S=r.mirror?0:m*d.width+y*f.height;t.width=Math.min(this.maxWidth,t.width+S+p)}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,p=0;l?u?(f=s*t.width,p=r*n.height):(f=r*t.height,p=s*n.width):i==="start"?p=n.width:i==="end"?f=t.width:i!=="inner"&&(f=t.width/2,p=n.width/2),this.paddingLeft=Math.max((f-c+o)*this.width/(this.width-c),0),this.paddingRight=Math.max((p-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(){jt(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++)At(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=Ux(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/Vx(n,r));let u=0,c=0,d,f,p,v,m,y,S,b,k,T,_;for(d=0;d<n;d+=l){if(v=t[d].label,m=this._resolveTickFontOptions(d),s.font=y=m.string,S=i[y]=i[y]||{data:{},gc:[]},b=m.lineHeight,k=T=0,!At(v)&&!xn(v))k=vx(s,S.data,S.gc,k,v),T=b;else if(xn(v))for(f=0,p=v.length;f<p;++f)_=v[f],!At(_)&&!xn(_)&&(k=vx(s,S.data,S.gc,k,_),T+=b);o.push(k),a.push(T),u=Math.max(k,u),c=Math.max(T,c)}hre(i,n);const C=o.indexOf(u),R=a.indexOf(c),w=P=>({width:o[P]||0,height:a[P]||0});return{first:w(0),last:w(n-1),widest:w(C),highest:w(R),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 vte(this._alignToPixels?Oo(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=mre(this.getContext(),t,r))}return this.$context||(this.$context=pre(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=Go(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=Cu(i),p=[],v=a.setContext(this.getContext()),m=v.display?v.width:0,y=m/2,S=function(j){return Oo(r,j,m)};let b,k,T,_,C,R,w,P,I,A,$,K;if(o==="top")b=S(this.bottom),R=this.bottom-f,P=b-y,A=S(t.top)+y,K=t.bottom;else if(o==="bottom")b=S(this.top),A=t.top,K=S(t.bottom)-y,R=b+y,P=this.top+f;else if(o==="left")b=S(this.right),C=this.right-f,w=b-y,I=S(t.left)+y,$=t.right;else if(o==="right")b=S(this.left),I=t.left,$=S(t.right)-y,C=b+y,w=this.left+f;else if(n==="x"){if(o==="center")b=S((t.top+t.bottom)/2+.5);else if(bt(o)){const j=Object.keys(o)[0],G=o[j];b=S(this.chart.scales[j].getPixelForValue(G))}A=t.top,K=t.bottom,R=b+y,P=R+f}else if(n==="y"){if(o==="center")b=S((t.left+t.right)/2);else if(bt(o)){const j=Object.keys(o)[0],G=o[j];b=S(this.chart.scales[j].getPixelForValue(G))}C=b-y,w=C-f,I=t.left,$=t.right}const M=St(s.ticks.maxTicksLimit,d),L=Math.max(1,Math.ceil(d/M));for(k=0;k<d;k+=L){const j=this.getContext(k),G=i.setContext(j),B=a.setContext(j),q=G.lineWidth,N=G.color,se=B.dash||[],z=B.dashOffset,U=G.tickWidth,le=G.tickColor,J=G.tickBorderDash||[],be=G.tickBorderDashOffset;T=fre(this,k,l),T!==void 0&&(_=Oo(r,T,q),u?C=w=I=$=_:R=P=A=K=_,p.push({tx1:C,ty1:R,tx2:w,ty2:P,x1:I,y1:A,x2:$,y2:K,width:q,color:N,borderDash:se,borderDashOffset:z,tickWidth:U,tickColor:le,tickBorderDash:J,tickBorderDashOffset:be}))}return this._ticksLength=d,this._borderValue=b,p}_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=Cu(r.grid),p=f+c,v=d?-c:p,m=-Go(this.labelRotation),y=[];let S,b,k,T,_,C,R,w,P,I,A,$,K="middle";if(s==="top")C=this.bottom-v,R=this._getXAxisLabelAlignment();else if(s==="bottom")C=this.top+v,R=this._getXAxisLabelAlignment();else if(s==="left"){const L=this._getYAxisLabelAlignment(f);R=L.textAlign,_=L.x}else if(s==="right"){const L=this._getYAxisLabelAlignment(f);R=L.textAlign,_=L.x}else if(n==="x"){if(s==="center")C=(t.top+t.bottom)/2+p;else if(bt(s)){const L=Object.keys(s)[0],j=s[L];C=this.chart.scales[L].getPixelForValue(j)+p}R=this._getXAxisLabelAlignment()}else if(n==="y"){if(s==="center")_=(t.left+t.right)/2-p;else if(bt(s)){const L=Object.keys(s)[0],j=s[L];_=this.chart.scales[L].getPixelForValue(j)}R=this._getYAxisLabelAlignment(f).textAlign}n==="y"&&(l==="start"?K="top":l==="end"&&(K="bottom"));const M=this._getLabelSizes();for(S=0,b=a.length;S<b;++S){k=a[S],T=k.label;const L=i.setContext(this.getContext(S));w=this.getPixelForTick(S)+i.labelOffset,P=this._resolveTickFontOptions(S),I=P.lineHeight,A=xn(T)?T.length:1;const j=A/2,G=L.color,B=L.textStrokeColor,q=L.textStrokeWidth;let N=R;o?(_=w,R==="inner"&&(S===b-1?N=this.options.reverse?"left":"right":S===0?N=this.options.reverse?"right":"left":N="center"),s==="top"?u==="near"||m!==0?$=-A*I+I/2:u==="center"?$=-M.highest.height/2-j*I+I:$=-M.highest.height+I/2:u==="near"||m!==0?$=I/2:u==="center"?$=M.highest.height/2-j*I:$=M.highest.height-A*I,d&&($*=-1),m!==0&&!L.showLabelBackdrop&&(_+=I/2*Math.sin(m))):(C=w,$=(1-A)*I/2);let se;if(L.showLabelBackdrop){const z=ss(L.backdropPadding),U=M.heights[S],le=M.widths[S];let J=$-z.top,be=0-z.left;switch(K){case"middle":J-=U/2;break;case"bottom":J-=U;break}switch(R){case"center":be-=le/2;break;case"right":be-=le;break;case"inner":S===b-1?be-=le:S>0&&(be-=le/2);break}se={left:be,top:J,width:le+z.width,height:U+z.height,color:L.backdropColor}}y.push({label:T,font:P,textOffset:$,options:{rotation:m,color:G,strokeColor:B,strokeWidth:q,textAlign:N,textBaseline:K,translation:[_,C],backdrop:se}})}return y}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-Go(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=Oo(t,this.left,o)-o/2,c=Oo(t,this.right,a)+a/2,d=f=l):(d=Oo(t,this.top,o)-o/2,f=Oo(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&&a0(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;Oc(r,u,0,c,l,a)}s&&l0(r)}drawTitle(){const{ctx:t,options:{position:n,title:r,reverse:s}}=this;if(!r.display)return;const i=Qn(r.font),o=ss(r.padding),a=r.align;let l=i.lineHeight/2;n==="bottom"||n==="center"||bt(n)?(l+=o.bottom,xn(r.text)&&(l+=i.lineHeight*(r.text.length-1))):l+=o.top;const{titleX:u,titleY:c,maxWidth:d,rotation:f}=vre(this,l,n,a);Oc(t,r.text,0,0,i,{color:r.color,maxWidth:d,rotation:f,textAlign:gre(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=St(t.grid&&t.grid.z,-1),s=St(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==cu.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 Qn(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Hd{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;Sre(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,yre(t,o,r),this.override&&dn.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 dn[s]&&(delete dn[s][r],this.override&&delete wa[r])}}function yre(e,t,n){const r=Ic(Object.create(null),[n?dn.get(n):{},dn.get(t),e.defaults]);dn.set(t,r),e.defaultRoutes&&bre(t,e.defaultRoutes),e.descriptors&&dn.describe(t,e.descriptors)}function bre(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(".");dn.route(i,s,l,a)})}function Sre(e){return"id"in e&&"defaults"in e}class wre{constructor(){this.controllers=new Hd(QM,"datasets",!0),this.elements=new Hd(uu,"elements"),this.plugins=new Hd(Object,"plugins"),this.scales=new Hd(cu,"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):Ct(s,o=>{const a=r||this._getRegistryForType(o);this._exec(t,a,o)})})}_exec(t,n,r){const s=s0(t);jt(r["before"+s],[],r),n[t](r),jt(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 Vs=new wre;class _re{constructor(){this._init=void 0}notify(t,n,r,s){if(n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install")),this._init===void 0)return;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"),this._init=void 0),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(jt(a,l,o)===!1&&s.cancelable)return!1}return!0}invalidate(){At(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=St(r.options&&r.options.plugins,{}),i=kre(r);return s===!1&&!n?[]:Ere(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 kre(e){const t={},n=[],r=Object.keys(Vs.plugins.items);for(let i=0;i<r.length;i++)n.push(Vs.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 xre(e,t){return!t&&e===!1?null:e===!0?{}:e}function Ere(e,{plugins:t,localIds:n},r,s){const i=[],o=e.getContext();for(const a of t){const l=a.id,u=xre(r[l],s);u!==null&&i.push({plugin:a,options:Cre(e.config,{plugin:a,local:n[l]},u,o)})}return i}function Cre(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 $y(e,t){const n=dn.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function Tre(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function Rre(e,t){return e===t?"_index_":"_value_"}function Hx(e){if(e==="x"||e==="y"||e==="r")return e}function Pre(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function By(e,...t){if(Hx(e))return e;for(const n of t){const r=n.axis||Pre(n.position)||e.length>1&&Hx(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function jx(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function Ire(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 jx(e,"x",n[0])||jx(e,"y",n[0])}return{}}function Are(e,t){const n=wa[e.type]||{scales:{}},r=t.scales||{},s=$y(e.type,t),i=Object.create(null);return Object.keys(r).forEach(o=>{const a=r[o];if(!bt(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=By(o,a,Ire(o,e),dn.scales[a.type]),u=Rre(l,s),c=n.scales||{};i[o]=Ju(Object.create(null),[{axis:l},a,c[l],c[u]])}),e.data.datasets.forEach(o=>{const a=o.type||e.type,l=o.indexAxis||$y(a,t),c=(wa[a]||{}).scales||{};Object.keys(c).forEach(d=>{const f=Tre(d,l),p=o[f+"AxisID"]||f;i[p]=i[p]||Object.create(null),Ju(i[p],[{axis:f},r[p],c[d]])})}),Object.keys(i).forEach(o=>{const a=i[o];Ju(a,[dn.scales[a.type],dn.scale])}),i}function s2(e){const t=e.options||(e.options={});t.plugins=St(t.plugins,{}),t.scales=Are(e,t)}function i2(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function Ore(e){return e=e||{},e.data=i2(e.data),s2(e),e}const qx=new Map,o2=new Set;function jd(e,t){let n=qx.get(e);return n||(n=t(),qx.set(e,n),o2.add(n)),n}const Tu=(e,t,n)=>{const r=Ml(t,n);r!==void 0&&e.add(r)};class Dre{constructor(t){this._config=Ore(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=i2(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(),s2(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return jd(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return jd(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return jd(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return jd(`${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=>Tu(l,t,d))),c.forEach(d=>Tu(l,s,d)),c.forEach(d=>Tu(l,wa[i]||{},d)),c.forEach(d=>Tu(l,dn,d)),c.forEach(d=>Tu(l,Ny,d))});const u=Array.from(l);return u.length===0&&u.push(Object.create(null)),o2.has(n)&&o.set(n,u),u}chartOptionScopes(){const{options:t,type:n}=this;return[t,wa[n]||{},dn.datasets[n]||{},{type:n},dn,Ny]}resolveNamedOptions(t,n,r,s=[""]){const i={$shared:!0},{resolver:o,subPrefixes:a}=Wx(this._resolverCache,t,s);let l=o;if(Lre(o,n)){i.$shared=!1,r=po(r)?r():r;const u=this.createResolver(t,r,a);l=Ll(o,r,u)}for(const u of n)i[u]=l[u];return i}createResolver(t,n,r=[""],s){const{resolver:i}=Wx(this._resolverCache,t,r);return bt(n)?Ll(i,n,void 0,s):i}}function Wx(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:u0(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},r.set(s,i)),i}const Mre=e=>bt(e)&&Object.getOwnPropertyNames(e).some(t=>po(e[t]));function Lre(e,t){const{isScriptable:n,isIndexable:r}=HM(e);for(const s of t){const i=n(s),o=r(s),a=(o||i)&&e[s];if(i&&(po(a)||Mre(a))||o&&xn(a))return!0}return!1}var Fre="4.5.1";const Nre=["top","bottom","left","right","chartArea"];function Gx(e,t){return e==="top"||e==="bottom"||Nre.indexOf(e)===-1&&t==="x"}function Kx(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function Yx(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),jt(n&&n.onComplete,[e],t)}function $re(e){const t=e.chart,n=t.options.animation;jt(n&&n.onProgress,[e],t)}function a2(e){return f0()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const Cf={},Xx=e=>{const t=a2(e);return Object.values(Cf).filter(n=>n.canvas===t).pop()};function Bre(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 Vre(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}let Fp=class{static defaults=dn;static instances=Cf;static overrides=wa;static registry=Vs;static version=Fre;static getChart=Xx;static register(...t){Vs.add(...t),Qx()}static unregister(...t){Vs.remove(...t),Qx()}constructor(t,n){const r=this.config=new Dre(n),s=a2(t),i=Xx(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||sre(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=tte(),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 _re,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=wte(d=>this.update(d),o.resizeDelay||0),this._dataChanges=[],Cf[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}ai.listen(this,"complete",Yx),ai.listen(this,"progress",$re),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:s,_aspectRatio:i}=this;return At(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 Vs}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():_x(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return yx(this.canvas,this.ctx),this}stop(){return ai.stop(this),this}resize(t,n){ai.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,_x(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),jt(r.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Ct(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=By(o,a),u=l==="r",c=l==="x";return{options:a,dposition:u?"chartArea":c?"bottom":"left",dtype:u?"radialLinear":c?"category":"linear"}}))),Ct(i,o=>{const a=o.options,l=a.id,u=By(l,a),c=St(a.type,o.dtype);(a.position===void 0||Gx(a.position,u)!==Gx(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=Vs.getScale(c);d=new f({id:l,type:c,ctx:this.ctx,chart:this}),r[d.id]=d}d.init(a,t)}),Ct(s,(o,a)=>{o||delete r[a]}),Ct(r,o=>{Xr.configure(this,o,o.options),Xr.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(Kx("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||$y(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=Vs.getController(a),{datasetElementType:u,dataElementType:c}=dn.datasets[a];Object.assign(l,{dataElementType:Vs.getElement(c),datasetElementType:u&&Vs.getElement(u)}),o.controller=new l(this,r),t.push(o.controller)}}return this._updateMetasets(),t}_resetElements(){Ct(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||Ct(i,u=>{u.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Kx("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){Ct(this.scales,t=>{Xr.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!lx(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;Bre(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(!lx(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;Xr.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],Ct(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,po(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&&(ai.has(this)?this.attached&&!ai.running(this)&&ai.start(this):(this.draw(),Yx({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=one(this,t);this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(s&&a0(n,s),t.controller.draw(),s&&l0(n),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return VM(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,s){const i=Nne.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=lu(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);Ac(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(),ai.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(),yx(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete Cf[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)};Ct(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(){Ct(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},Ct(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}});!wh(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=ate(t),u=Vre(t,this._lastEvent,r,l);r&&(this._lastEvent=null,jt(i.onHover,[t,a,this],this),l&&jt(i.onClick,[t,a,this],this));const c=!wh(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)}};function Qx(){return Ct(Fp.instances,e=>e._plugins.invalidate())}function l2(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 Xi(e,t,n,r){return e?0:ms(t,n,r)}function Ure(e,t,n){const r=e.options.borderWidth,s=e.borderSkipped,i=zM(r);return{t:Xi(s.top,i.top,0,n),r:Xi(s.right,i.right,0,t),b:Xi(s.bottom,i.bottom,0,n),l:Xi(s.left,i.left,0,t)}}function zre(e,t,n){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),s=e.options.borderRadius,i=ul(s),o=Math.min(t,n),a=e.borderSkipped,l=r||bt(s);return{topLeft:Xi(!l||a.top||a.left,i.topLeft,0,o),topRight:Xi(!l||a.top||a.right,i.topRight,0,o),bottomLeft:Xi(!l||a.bottom||a.left,i.bottomLeft,0,o),bottomRight:Xi(!l||a.bottom||a.right,i.bottomRight,0,o)}}function Hre(e){const t=l2(e),n=t.right-t.left,r=t.bottom-t.top,s=Ure(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 sg(e,t,n,r){const s=t===null,i=n===null,a=e&&!(s&&i)&&l2(e,r);return a&&(s||tl(t,a.left,a.right))&&(i||tl(n,a.top,a.bottom))}function jre(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function qre(e,t){e.rect(t.x,t.y,t.w,t.h)}function ig(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 Wre extends uu{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};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}=Hre(this),a=jre(o.radius)?Eh:qre;t.save(),(o.w!==i.w||o.h!==i.h)&&(t.beginPath(),a(t,ig(o,n,i)),t.clip(),a(t,ig(i,-n,o)),t.fillStyle=r,t.fill("evenodd")),t.beginPath(),a(t,ig(i,n)),t.fillStyle=s,t.fill(),t.restore()}inRange(t,n,r){return sg(this,t,n,r)}inXRange(t,n){return sg(this,t,null,n)}inYRange(t,n){return sg(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}}const Jx=(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)}},Gre=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class Zx extends uu{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=jt(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=Qn(r.font),i=s.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=Jx(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,p=-c;return this.legendItems.forEach((v,m)=>{const y=r+n/2+i.measureText(v.text).width;(m===0||u[u.length-1]+y+2*a>o)&&(d+=c,u[u.length-(m>0?0:1)]=0,p+=c,f++),l[m]={left:0,top:p,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,p=0,v=0,m=0;return this.legendItems.forEach((y,S)=>{const{itemWidth:b,itemHeight:k}=Kre(r,n,i,y,s);S>0&&p+k+2*a>c&&(d+=f+a,u.push({width:f,height:p}),v+=f+a,m++,f=p=0),l[S]={left:v,top:p,col:m,width:b,height:k},f=Math.max(f,b),p+=k+a}),d+=f,u.push({width:f,height:p}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:s},rtl:i}}=this,o=cl(i,this.left,this.width);if(this.isHorizontal()){let a=0,l=jn(r,this.left+s,this.right-this.lineWidths[a]);for(const u of n)a!==u.row&&(a=u.row,l=jn(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=jn(r,this.top+t+s,this.bottom-this.columnSizes[a].height);for(const u of n)u.col!==a&&(a=u.col,l=jn(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;a0(t,this),this._draw(),l0(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:s}=this,{align:i,labels:o}=t,a=dn.color,l=cl(t.rtl,this.left,this.width),u=Qn(o.font),{padding:c}=o,d=u.size,f=d/2;let p;this.drawTitle(),s.textAlign=l.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=u.string;const{boxWidth:v,boxHeight:m,itemHeight:y}=Jx(o,d),S=function(C,R,w){if(isNaN(v)||v<=0||isNaN(m)||m<0)return;s.save();const P=St(w.lineWidth,1);if(s.fillStyle=St(w.fillStyle,a),s.lineCap=St(w.lineCap,"butt"),s.lineDashOffset=St(w.lineDashOffset,0),s.lineJoin=St(w.lineJoin,"miter"),s.lineWidth=P,s.strokeStyle=St(w.strokeStyle,a),s.setLineDash(St(w.lineDash,[])),o.usePointStyle){const I={radius:m*Math.SQRT2/2,pointStyle:w.pointStyle,rotation:w.rotation,borderWidth:P},A=l.xPlus(C,v/2),$=R+f;BM(s,I,A,$,o.pointStyleWidth&&v)}else{const I=R+Math.max((d-m)/2,0),A=l.leftForLtr(C,v),$=ul(w.borderRadius);s.beginPath(),Object.values($).some(K=>K!==0)?Eh(s,{x:A,y:I,w:v,h:m,radius:$}):s.rect(A,I,v,m),s.fill(),P!==0&&s.stroke()}s.restore()},b=function(C,R,w){Oc(s,w.text,C,R+y/2,u,{strikethrough:w.hidden,textAlign:l.textAlign(w.textAlign)})},k=this.isHorizontal(),T=this._computeTitleHeight();k?p={x:jn(i,this.left+c,this.right-r[0]),y:this.top+c+T,line:0}:p={x:this.left+c,y:jn(i,this.top+T+c,this.bottom-n[0].height),line:0},GM(this.ctx,t.textDirection);const _=y+c;this.legendItems.forEach((C,R)=>{s.strokeStyle=C.fontColor,s.fillStyle=C.fontColor;const w=s.measureText(C.text).width,P=l.textAlign(C.textAlign||(C.textAlign=o.textAlign)),I=v+f+w;let A=p.x,$=p.y;l.setWidth(this.width),k?R>0&&A+I+c>this.right&&($=p.y+=_,p.line++,A=p.x=jn(i,this.left+c,this.right-r[p.line])):R>0&&$+_>this.bottom&&(A=p.x=A+n[p.line].width+c,p.line++,$=p.y=jn(i,this.top+T+c,this.bottom-n[p.line].height));const K=l.x(A);if(S(K,$,C),A=_te(P,A+v+f,k?A+I:this.right,t.rtl),b(l.x(A),$,C),k)p.x+=I+c;else if(typeof C.text!="string"){const M=u.lineHeight;p.y+=u2(C,M)+c}else p.y+=_}),KM(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=Qn(n.font),s=ss(n.padding);if(!n.display)return;const i=cl(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=jn(t.align,d,this.right-f);else{const v=this.columnSizes.reduce((m,y)=>Math.max(m,y.height),0);c=u+jn(t.align,this.top,this.bottom-v-t.labels.padding-this._computeTitleHeight())}const p=jn(a,d,d+f);o.textAlign=i.textAlign(o0(a)),o.textBaseline="middle",o.strokeStyle=n.color,o.fillStyle=n.color,o.font=r.string,Oc(o,n.text,p,c,r)}_computeTitleHeight(){const t=this.options.title,n=Qn(t.font),r=ss(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,s,i;if(tl(t,this.left,this.right)&&tl(n,this.top,this.bottom)){for(i=this.legendHitBoxes,r=0;r<i.length;++r)if(s=i[r],tl(t,s.left,s.left+s.width)&&tl(n,s.top,s.top+s.height))return this.legendItems[r]}return null}handleEvent(t){const n=this.options;if(!Qre(t.type,n))return;const r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const s=this._hoveredItem,i=Gre(s,r);s&&!i&&jt(n.onLeave,[t,s,this],this),this._hoveredItem=r,r&&!i&&jt(n.onHover,[t,r,this],this)}else r&&jt(n.onClick,[t,r,this],this)}}function Kre(e,t,n,r,s){const i=Yre(r,e,t,n),o=Xre(s,r,t.lineHeight);return{itemWidth:i,itemHeight:o}}function Yre(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 Xre(e,t,n){let r=e;return typeof t.text!="string"&&(r=u2(t,n)),r}function u2(e,t){const n=e.text?e.text.length:0;return t*n}function Qre(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var Jre={id:"legend",_element:Zx,start(e,t,n){const r=e.legend=new Zx({ctx:e.ctx,options:n,chart:e});Xr.configure(e,r,n),Xr.addBox(e,r)},stop(e){Xr.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;Xr.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=ss(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 c2 extends uu{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=xn(r.text)?r.text.length:1;this._padding=ss(r.padding);const i=s*Qn(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=jn(a,r,i),d=n+t,u=i-r):(o.position==="left"?(c=r+t,d=jn(a,s,n),l=Zn*-.5):(c=i-t,d=jn(a,n,s),l=Zn*.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=Qn(n.font),i=r.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:l,rotation:u}=this._drawArgs(i);Oc(t,n.text,0,0,r,{color:n.color,maxWidth:l,rotation:u,textAlign:o0(n.align),textBaseline:"middle",translation:[o,a]})}}function Zre(e,t){const n=new c2({ctx:e.ctx,options:t,chart:e});Xr.configure(e,n,t),Xr.addBox(e,n),e.titleBlock=n}var ese={id:"title",_element:c2,start(e,t,n){Zre(e,n)},stop(e){const t=e.titleBlock;Xr.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;Xr.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 Mu={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=mte(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 $s(e,t){return t&&(xn(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function li(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
53
+ `)>-1?e.split(`
54
+ `):e}function tse(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 eE(e,t){const n=e.chart.ctx,{body:r,footer:s,title:i}=e,{boxWidth:o,boxHeight:a}=t,l=Qn(t.bodyFont),u=Qn(t.titleFont),c=Qn(t.footerFont),d=i.length,f=s.length,p=r.length,v=ss(t.padding);let m=v.height,y=0,S=r.reduce((T,_)=>T+_.before.length+_.lines.length+_.after.length,0);if(S+=e.beforeBody.length+e.afterBody.length,d&&(m+=d*u.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),S){const T=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;m+=p*T+(S-p)*l.lineHeight+(S-1)*t.bodySpacing}f&&(m+=t.footerMarginTop+f*c.lineHeight+(f-1)*t.footerSpacing);let b=0;const k=function(T){y=Math.max(y,n.measureText(T).width+b)};return n.save(),n.font=u.string,Ct(e.title,k),n.font=l.string,Ct(e.beforeBody.concat(e.afterBody),k),b=t.displayColors?o+2+t.boxPadding:0,Ct(r,T=>{Ct(T.before,k),Ct(T.lines,k),Ct(T.after,k)}),b=0,n.font=c.string,Ct(e.footer,k),n.restore(),y+=v.width,{width:y,height:m}}function nse(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function rse(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 sse(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"),rse(u,e,t,n)&&(u="center"),u}function tE(e,t,n){const r=n.yAlign||t.yAlign||nse(e,n);return{xAlign:n.xAlign||t.xAlign||sse(e,t,n,r),yAlign:r}}function ise(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function ose(e,t,n){let{y:r,height:s}=e;return t==="top"?r+=n:t==="bottom"?r-=s+n:r-=s/2,r}function nE(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:p}=ul(o);let v=ise(t,a);const m=ose(t,l,u);return l==="center"?a==="left"?v+=u:a==="right"&&(v-=u):a==="left"?v-=Math.max(c,f)+s:a==="right"&&(v+=Math.max(d,p)+s),{x:ms(v,0,r.width-t.width),y:ms(m,0,r.height-t.height)}}function qd(e,t,n){const r=ss(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function rE(e){return $s([],li(e))}function ase(e,t,n){return lu(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function sE(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const d2={beforeTitle:ii,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:ii,beforeBody:ii,beforeLabel:ii,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 At(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:ii,afterBody:ii,beforeFooter:ii,footer:ii,afterFooter:ii};function gr(e,t,n,r){const s=e[t].call(n,r);return typeof s>"u"?d2[t].call(n,r):s}let iE=class extends uu{static positioners=Mu;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 YM(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(i)),i}getContext(){return this.$context||(this.$context=ase(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,s=gr(r,"beforeTitle",this,t),i=gr(r,"title",this,t),o=gr(r,"afterTitle",this,t);let a=[];return a=$s(a,li(s)),a=$s(a,li(i)),a=$s(a,li(o)),a}getBeforeBody(t,n){return rE(gr(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,s=[];return Ct(t,i=>{const o={before:[],lines:[],after:[]},a=sE(r,i);$s(o.before,li(gr(a,"beforeLabel",this,i))),$s(o.lines,gr(a,"label",this,i)),$s(o.after,li(gr(a,"afterLabel",this,i))),s.push(o)}),s}getAfterBody(t,n){return rE(gr(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,s=gr(r,"beforeFooter",this,t),i=gr(r,"footer",this,t),o=gr(r,"afterFooter",this,t);let a=[];return a=$s(a,li(s)),a=$s(a,li(i)),a=$s(a,li(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(tse(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))),Ct(a,c=>{const d=sE(t.callbacks,c);s.push(gr(d,"labelColor",this,c)),i.push(gr(d,"labelPointStyle",this,c)),o.push(gr(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=Mu[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=eE(this,r),u=Object.assign({},a,l),c=tE(this.chart,r,u),d=nE(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}=ul(a),{x:f,y:p}=t,{width:v,height:m}=n;let y,S,b,k,T,_;return i==="center"?(T=p+m/2,s==="left"?(y=f,S=y-o,k=T+o,_=T-o):(y=f+v,S=y+o,k=T-o,_=T+o),b=y):(s==="left"?S=f+Math.max(l,c)+o:s==="right"?S=f+v-Math.max(u,d)-o:S=this.caretX,i==="top"?(k=p,T=k-o,y=S-o,b=S+o):(k=p+m,T=k+o,y=S+o,b=S-o),_=k),{x1:y,x2:S,x3:b,y1:k,y2:T,y3:_}}drawTitle(t,n,r){const s=this.title,i=s.length;let o,a,l;if(i){const u=cl(r.rtl,this.x,this.width);for(t.x=qd(this,r.titleAlign,r),n.textAlign=u.textAlign(r.titleAlign),n.textBaseline="middle",o=Qn(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=Qn(i.bodyFont),d=qd(this,"left",i),f=s.x(d),p=l<c.lineHeight?(c.lineHeight-l)/2:0,v=n.y+p;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,S=v+l/2;t.strokeStyle=i.multiKeyBackground,t.fillStyle=i.multiKeyBackground,bx(t,m,y,S),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,bx(t,m,y,S)}else{t.lineWidth=bt(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),S=ul(o.borderRadius);Object.values(S).some(b=>b!==0)?(t.beginPath(),t.fillStyle=i.multiKeyBackground,Eh(t,{x:m,y:v,w:u,h:l,radius:S}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),Eh(t,{x:y,y:v+1,w:u-2,h:l-2,radius:S}),t.fill()):(t.fillStyle=i.multiKeyBackground,t.fillRect(m,v,u,l),t.strokeRect(m,v,u,l),t.fillStyle=o.backgroundColor,t.fillRect(y,v+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=Qn(r.bodyFont);let f=d.lineHeight,p=0;const v=cl(r.rtl,this.x,this.width),m=function(w){n.fillText(w,v.x(t.x+p),t.y+f/2),t.y+=f+i},y=v.textAlign(o);let S,b,k,T,_,C,R;for(n.textAlign=o,n.textBaseline="middle",n.font=d.string,t.x=qd(this,y,r),n.fillStyle=r.bodyColor,Ct(this.beforeBody,m),p=a&&y!=="right"?o==="center"?u/2+c:u+2+c:0,T=0,C=s.length;T<C;++T){for(S=s[T],b=this.labelTextColors[T],n.fillStyle=b,Ct(S.before,m),k=S.lines,a&&k.length&&(this._drawColorBox(n,t,T,v,r),f=Math.max(d.lineHeight,l)),_=0,R=k.length;_<R;++_)m(k[_]),f=d.lineHeight;Ct(S.after,m)}p=0,f=d.lineHeight,Ct(this.afterBody,m),t.y-=i}drawFooter(t,n,r){const s=this.footer,i=s.length;let o,a;if(i){const l=cl(r.rtl,this.x,this.width);for(t.x=qd(this,r.footerAlign,r),t.y+=r.footerMarginTop,n.textAlign=l.textAlign(r.footerAlign),n.textBaseline="middle",o=Qn(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:p,bottomRight:v}=ul(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-v),n.quadraticCurveTo(a+u,l+c,a+u-v,l+c),o==="bottom"&&this.drawCaret(t,n,r,s),n.lineTo(a+p,l+c),n.quadraticCurveTo(a,l+c,a,l+c-p),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=Mu[t.position].call(this,this._active,this._eventPosition);if(!o)return;const a=this._size=eE(this,t),l=Object.assign({},o,this._size),u=tE(n,t,l),c=nE(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=ss(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),GM(t,n.textDirection),i.y+=o.top,this.drawTitle(i,t,n),this.drawBody(i,t,n),this.drawFooter(i,t,n),KM(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=!wh(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||!wh(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=Mu[i.position].call(this,t,n);return o!==!1&&(r!==o.x||s!==o.y)}};var lse={id:"tooltip",_element:iE,positioners:Mu,afterInit(e,t,n){n&&(e.tooltip=new iE({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:d2},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 use=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function cse(e,t,n,r){const s=e.indexOf(t);if(s===-1)return use(e,t,n,r);const i=e.lastIndexOf(t);return s!==i?n:s}const dse=(e,t)=>e===null?null:ms(Math.round(e),0,t);function oE(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class fse extends cu{static id="category";static defaults={ticks:{callback:oE}};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(At(t))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===t?n:cse(r,t,St(n,t),this._addedLabels),dse(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 oE.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}}function hse(e,t){const n=[],{bounds:s,step:i,min:o,max:a,precision:l,count:u,maxTicks:c,maxDigits:d,includeBounds:f}=e,p=i||1,v=c-1,{min:m,max:y}=t,S=!At(o),b=!At(a),k=!At(u),T=(y-m)/(d+1);let _=cx((y-m)/v/p)*p,C,R,w,P;if(_<1e-14&&!S&&!b)return[{value:m},{value:y}];P=Math.ceil(y/_)-Math.floor(m/_),P>v&&(_=cx(P*_/v/p)*p),At(l)||(C=Math.pow(10,l),_=Math.ceil(_*C)/C),s==="ticks"?(R=Math.floor(m/_)*_,w=Math.ceil(y/_)*_):(R=m,w=y),S&&b&&i&&dte((a-o)/i,_/1e3)?(P=Math.round(Math.min((a-o)/_,c)),_=(a-o)/P,R=o,w=a):k?(R=S?o:R,w=b?a:w,P=u-1,_=(w-R)/P):(P=(w-R)/_,xf(P,Math.round(P),_/1e3)?P=Math.round(P):P=Math.ceil(P));const I=Math.max(dx(_),dx(R));C=Math.pow(10,At(l)?I:l),R=Math.round(R*C)/C,w=Math.round(w*C)/C;let A=0;for(S&&(f&&R!==o?(n.push({value:o}),R<o&&A++,xf(Math.round((R+A*_)*C)/C,o,aE(o,T,e))&&A++):R<o&&A++);A<P;++A){const $=Math.round((R+A*_)*C)/C;if(b&&$>a)break;n.push({value:$})}return b&&f&&w!==a?n.length&&xf(n[n.length-1].value,a,aE(a,T,e))?n[n.length-1].value=a:n.push({value:a}):(!b||w===a)&&n.push({value:w}),n}function aE(e,t,{horizontal:n,minRotation:r}){const s=Go(r),i=(n?Math.sin(s):Math.cos(s))||.001,o=.75*t*(""+e).length;return Math.min(t/i,o)}class pse extends cu{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 At(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=ro(s),u=ro(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=hse(s,i);return t.bounds==="ticks"&&fte(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 NM(t,this.chart.options.locale,this.options.ticks.format)}}class mse extends pse{static id="linear";static defaults={ticks:{callback:$M.formatters.numeric}};determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=rs(t)?t:0,this.max=rs(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=Go(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}}const Np={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}},br=Object.keys(Np);function lE(e,t){return e-t}function uE(e,t){if(At(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)),rs(o)||(o=typeof r=="string"?n.parse(o,r):n.parse(o)),o===null?null:(s&&(o=s==="week"&&(xh(i)||i===!0)?n.startOf(o,"isoWeek",i):n.startOf(o,s)),+o)}function cE(e,t,n,r){const s=br.length;for(let i=br.indexOf(e);i<s-1;++i){const o=Np[br[i]],a=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((n-t)/(a*o.size))<=r)return br[i]}return br[s-1]}function gse(e,t,n,r,s){for(let i=br.length-1;i>=br.indexOf(n);i--){const o=br[i];if(Np[o].common&&e._adapter.diff(s,r,o)>=t-1)return o}return br[n?br.indexOf(n):0]}function vse(e){for(let t=br.indexOf(e)+1,n=br.length;t<n;++t)if(Np[br[t]].common)return br[t]}function dE(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:r,hi:s}=i0(n,t),i=n[r]>=t?n[r]:n[s];e[i]=!0}}function yse(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 fE(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:yse(e,r,s,n)}class hE extends cu{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};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 One._date(t.adapters.date);s.init(n),Ju(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:uE(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=rs(s)&&!isNaN(s)?s:+n.startOf(Date.now(),r),i=rs(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=bte(s,i,o);return this._unit=n.unit||(r.autoSkip?cE(n.minUnit,this.min,this.max,this._getLabelCapacity(i)):gse(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:vse(this._unit),this.initOffsets(s),t.reverse&&a.reverse(),fE(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=ms(n,0,o),r=ms(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||cE(i.minUnit,n,r,this._getLabelCapacity(n)),a=St(s.ticks.stepSize,1),l=o==="week"?i.isoWeekday:!1,u=xh(l)||l===!0,c={};let d=n,f,p;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 v=s.ticks.source==="data"&&this.getDataTimestamps();for(f=d,p=0;f<r;f=+t.add(f,a,o),p++)dE(c,f,v);return(f===r||s.bounds==="ticks"||p===1)&&dE(c,f,v),Object.keys(c).sort(lE).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 jt(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],p=u&&d&&f&&f.major;return this._adapter.format(t,s||(p?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=Go(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,fE(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(uE(this,s[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return DM(t.sort(lE))}}function Wd(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}=Fy(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}=Fy(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 Boe extends hE{static id="timeseries";static defaults=hE.defaults;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=Wd(n,this.min),this._tableRange=Wd(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(Wd(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return Wd(this._table,r*this._tableRange+this._minPos,!0)}}const f2={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},bse={ariaLabel:{type:String},ariaDescribedby:{type:String}},Sse={type:{type:String,required:!0},destroyDelay:{type:Number,default:0},...f2,...bse},wse=xT[0]==="2"?(e,t)=>Object.assign(e,{attrs:t}):(e,t)=>Object.assign(e,t);function Ua(e){return Fl(e)?Fe(e):e}function _se(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e;return Fl(t)?new Proxy(e,{}):e}function kse(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function h2(e,t){e.labels=t}function p2(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 xse(e,t){const n={labels:[],datasets:[]};return h2(n,e.labels),p2(n,e.datasets,t),n}const Ese=Me({props:Sse,setup(e,t){let{expose:n,slots:r}=t;const s=H(null),i=ke(null);n({chart:i});const o=()=>{if(!s.value)return;const{type:u,data:c,options:d,plugins:f,datasetIdKey:p}=e,v=xse(c,p),m=_se(v,c);i.value=new Fp(s.value,{type:u,data:m,options:{...d},plugins:f})},a=()=>{const u=Fe(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 gt(o),zh(a),we([()=>e.options,()=>e.data],(u,c)=>{let[d,f]=u,[p,v]=c;const m=Fe(i.value);if(!m)return;let y=!1;if(d){const S=Ua(d),b=Ua(p);S&&S!==b&&(kse(m,S),y=!0)}if(f){const S=Ua(f.labels),b=Ua(v.labels),k=Ua(f.datasets),T=Ua(v.datasets);S!==b&&(h2(m.config.data,S),y=!0),k&&k!==T&&(p2(m.config.data,k,e.datasetIdKey),y=!0)}y&&ot(()=>{l(m)})},{deep:!0}),()=>lr("canvas",{role:"img","aria-label":e.ariaLabel,"aria-describedby":e.ariaDescribedby,ref:s},[lr("p",{},[r.default?r.default():""])])}});function Cse(e,t){return Fp.register(t),Me({props:f2,setup(n,r){let{expose:s}=r;const i=ke(null),o=a=>{i.value=a?.chart};return s({chart:i}),()=>lr(Ese,wse({ref:o},{type:e,...n}))}})}const Tse=Cse("bar",Ane);function Rse(e,t){const n=typeof e=="string"?Pn(e):e,r=Pse(n,t);return{mounted:r,updated:r,unmounted(s){MT(null,s)}}}function Pse(e,t){return function(n,r,s){const i=typeof t=="function"?t(r):t,o=r.value?.text??r.value??i?.text,a=pl(r.value)?r.value:{},l=()=>o??n.textContent,u=(s.ctx===r.instance.$?Ise(s,r.instance.$)?.provides:s.ctx?.provides)??r.instance.$.provides,c=lr(e,de(i,a),l);c.appContext=Object.assign(Object.create(null),r.instance.$.appContext,{provides:u}),MT(c,n)}}function Ise(e,t){const n=new Set,r=i=>{for(const o of i){if(!o)continue;if(o===e||o.el&&e.el&&o.el===e.el)return!0;n.add(o);let a;if(o.suspense?a=r([o.ssContent]):Array.isArray(o.children)?a=r(o.children):o.component?.vnode&&(a=r([o.component?.subTree])),a)return a;n.delete(o)}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 Ase=Rse(Ze,e=>({activator:(pl(e.value)?!e.value.text:["",!1,null].includes(e.value))?null:"parent",location:e.arg?.replace("-"," "),text:typeof e.value=="boolean"?void 0:e.value})),Ose={class:"ma-3"},Dse={class:"ml-6"},Mse={class:"ml-7 mt-3"},Lse={key:0},Fse={key:2},Nse=Me({__name:"EmergencyCommands",setup(e){Fp.register(fse,mse,Wre,ese,lse,Jre);const t=Vt(),n=H(!1),r=H(!1),s=H([]),i=H([]),o=H(NaN),a=H(NaN),l=H(NaN),u=H({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=O(()=>t.printers.length===0||t.printers.every(S=>!S.enabled)),f=O(()=>t.printers.length===0||t.printers.every(S=>!!S.enabled));async function p(){try{n.value=!0;const S=t.printers.map(C=>C.id),b=await el.batchSettingsGet(S),k=b.map(C=>C.value?.appearance?.name||"ERROR");i.value=b.filter(C=>!C.success).map(C=>({message:C.error}));const T=b.map(C=>C.time),_=b.map(C=>C.value?.appearance?.name??"");o.value=T.reduce((C,R)=>C+R,0)/T.length,l.value=Math.min(...T),a.value=Math.max(...T),u.value={labels:_,datasets:[{label:"OctoPrint Settings response times (ms)",data:T,borderColor:"#FF6384",backgroundColor:"#ffffff"}]},r.value=!0,s.value=k}finally{n.value=!1}}async function v(S){if(confirm("Are you sure you want to toggle all printers?")){n.value=!0;try{await el.batchToggleEnabled(t.printers.map(b=>b.id),S)}finally{n.value=!1}}}async function m(){if(confirm("Are you sure you want to connect all USBs?"))try{await el.batchConnectUsb(t.printers.map(S=>S.id))}finally{n.value=!1}}async function y(){confirm("Are you sure you want to connect all sockets?")&&(n.value=!0,await el.batchConnectSocket(t.printers.map(S=>S.id)),n.value=!1)}return(S,b)=>(F(),ee(mt,null,{default:g(()=>[h(ur,{color:"primary"},{default:g(()=>[h(st,null,{default:g(()=>[h(Z,null,{default:g(()=>[...b[3]||(b[3]=[x("settings",-1)])]),_:1})]),_:1}),h(Tn,null,{default:g(()=>[...b[4]||(b[4]=[x(" Emergency Commands",-1)])]),_:1})]),_:1}),h(Dt,{lines:"three",subheader:""},{default:g(()=>[h(Cr,null,{default:g(()=>[...b[5]||(b[5]=[x(" Emergency Commands to rectify problematic situations ",-1)])]),_:1}),h(Ne,null,{default:g(()=>[h(it,null,{default:g(()=>[...b[6]||(b[6]=[x(" Batch disabling",-1)])]),_:1}),h(pt,null,{default:g(()=>[b[9]||(b[9]=x(" Disable all printers in batch (will not affect print) ",-1)),b[10]||(b[10]=E("br",null,null,-1)),h(te,{disabled:n.value||d.value,class:"ml-4",color:"primary",onClick:b[0]||(b[0]=k=>v(!1))},{default:g(()=>[...b[7]||(b[7]=[x(" Batch disable ",-1)])]),_:1},8,["disabled"]),n.value?(F(),ee(zs,{key:0,class:"ml-2",indeterminate:"",size:"30",width:"4"})):fe("",!0),d.value?(F(),ee(Z,{key:1,class:"ml-2",color:"warning"},{default:g(()=>[...b[8]||(b[8]=[x(" warning ",-1)])]),_:1})):fe("",!0)]),_:1})]),_:1}),h(Ne,null,{default:g(()=>[h(it,null,{default:g(()=>[...b[11]||(b[11]=[x(" Batch enabling",-1)])]),_:1}),h(pt,null,{default:g(()=>[b[14]||(b[14]=x(" Enabling all printers in batch (will not affect print and it will skip printers in maintenance mode) ",-1)),b[15]||(b[15]=E("br",null,null,-1)),h(te,{disabled:n.value||f.value,class:"ml-4",color:"primary",onClick:b[1]||(b[1]=k=>v(!0))},{default:g(()=>[...b[12]||(b[12]=[x(" Batch enable ",-1)])]),_:1},8,["disabled"]),n.value?(F(),ee(zs,{key:0,class:"ml-2",indeterminate:"",size:"30",width:"4"})):fe("",!0),f.value?Ot((F(),ee(Z,{key:1,class:"ml-2",color:"warning"},{default:g(()=>[...b[13]||(b[13]=[x("warning ",-1)])]),_:1})),[[Ase,"No printers available",void 0,{bottom:!0}]]):fe("",!0)]),_:1})]),_:1}),h(Ne,null,{default:g(()=>[h(it,null,{default:g(()=>[...b[16]||(b[16]=[x(" Batch USB connect",-1)])]),_:1}),h(pt,null,{default:g(()=>[b[19]||(b[19]=x(" Connect all USB devices ",-1)),b[20]||(b[20]=E("br",null,null,-1)),h(te,{disabled:n.value||d.value,class:"ml-4",color:"primary",onClick:m},{default:g(()=>[h(Z,{class:"mr-2"},{default:g(()=>[...b[17]||(b[17]=[x("usb",-1)])]),_:1}),b[18]||(b[18]=x(" Connect USBs ",-1))]),_:1},8,["disabled"]),n.value?(F(),ee(zs,{key:0,class:"ml-2",indeterminate:"",size:"30",width:"4"})):fe("",!0)]),_:1}),h(pt,{class:"mt-2"},{default:g(()=>[b[23]||(b[23]=x(" Connect all Sockets ",-1)),b[24]||(b[24]=E("br",null,null,-1)),h(te,{disabled:n.value||d.value,class:"ml-4",color:"primary",onClick:y},{default:g(()=>[h(Z,{class:"mr-2"},{default:g(()=>[...b[21]||(b[21]=[x("hub",-1)])]),_:1}),b[22]||(b[22]=x(" Connect Sockets ",-1))]),_:1},8,["disabled"])]),_:1}),n.value?(F(),ee(zs,{key:0,class:"ml-2",indeterminate:"",size:"30",width:"4"})):fe("",!0)]),_:1})]),_:1}),E("div",Ose,[h(ln,null,{default:g(()=>[...b[25]||(b[25]=[x(" Test all OctoPrint response times",-1)])]),_:1}),E("div",Dse,[h(te,{loading:n.value,color:"primary",onClick:b[2]||(b[2]=k=>p())},{default:g(()=>[...b[26]||(b[26]=[x(" Measure network response times ",-1)])]),_:1},8,["loading"])]),E("div",Mse,[r.value?(F(),ge("span",Lse," Response times: ")):fe("",!0),r.value?(F(),ee(Q(Tse),{key:1,data:u.value,options:c,height:"100",style:{"background-color":"#272727"}},null,8,["data"])):(F(),ge("span",Fse,"A graph will be shown, presenting the times in milliseconds (ms)")),n.value?(F(),ee(zs,{key:3,class:"ml-2",indeterminate:"",size:"30",width:"4"})):fe("",!0)])])]),_:1}))}}),$se={class:"text-center"},Bse=Me({__name:"NotFoundView",setup(e){const t=_o(),n=()=>{t.go(-1)};return(r,s)=>(F(),ee(Bn,null,{default:g(()=>[s[6]||(s[6]=E("h2",{class:"text-center mt-lg-12"},"This page was not found.",-1)),s[7]||(s[7]=E("h1",{class:"text-center"},": (",-1)),s[8]||(s[8]=E("br",null,null,-1)),E("h4",$se,[h(te,{class:"align-center",color:"primary",to:"/",variant:"elevated"},{default:g(()=>[h(Z,{class:"mr-2"},{default:g(()=>[...s[1]||(s[1]=[x("home",-1)])]),_:1}),s[2]||(s[2]=x(" Go home ",-1))]),_:1}),s[5]||(s[5]=E("span",{class:"pa-5"}," or ",-1)),h(te,{class:"align-center",variant:"elevated",onClick:s[0]||(s[0]=i=>n())},{default:g(()=>[h(Z,{class:"mr-2"},{default:g(()=>[...s[3]||(s[3]=[x("arrow_left",-1)])]),_:1}),s[4]||(s[4]=x(" Go back ",-1))]),_:1})])]),_:1}))}}),Vse={key:0},Use={key:1},zse={key:2},Hse={key:3},jse={key:4},qse=Me({__name:"PermissionDenied",setup(e){const t=PD(),n=O(()=>t.query);return(r,s)=>(F(),ee(Bn,{"fill-height":"",fluid:""},{default:g(()=>[h(jD,{color:"primary"},{default:g(()=>[h(Tn,{class:"text-uppercase text-white"},{default:g(()=>[...s[0]||(s[0]=[E("span",{class:"font-weight-light"}," FDM ",-1),E("strong",null," Monster ",-1)])]),_:1})]),_:1}),s[11]||(s[11]=E("img",{alt:"FDM Monster Background",class:"grid-bg-img align-content-center",src:JS,style:{opacity:"0.06"}},null,-1)),h(Cp,{"align-center":"",column:"","justify-center":""},{default:g(()=>[h(mt,{class:"flex align-center justify-center pa-lg-16 pa-sm-10",style:{width:"80%"}},{default:g(()=>[h(Zt,null,{default:g(()=>[h(Z,{class:"mr-4",size:"50"},{default:g(()=>[...s[1]||(s[1]=[x(" lock ",-1)])]),_:1}),s[2]||(s[2]=E("h3",null,"Permission Denied",-1))]),_:1}),h(Sp,{class:"mt-1"},{default:g(()=>[...s[3]||(s[3]=[x(" You do not have permission to access a specific resource on this page. ",-1)])]),_:1}),n.value?(F(),ee(Gt,{key:0},{default:g(()=>[n.value.page?(F(),ge("div",Vse,[s[4]||(s[4]=x(" Page: ",-1)),E("strong",null,re(n.value?.page),1)])):fe("",!0),n.value.permissions?(F(),ge("div",Use,[s[5]||(s[5]=x(" Required permission(s): ",-1)),(F(!0),ge(Ie,null,Ht(n.value.permissions,i=>(F(),ge("strong",{key:i},re(i),1))),128))])):fe("",!0),n.value.roles?(F(),ge("div",zse,[s[6]||(s[6]=x(" Usable roles: ",-1)),E("strong",null,re(n.value.roles?.join(", ")),1)])):fe("",!0),n.value.url?(F(),ge("div",Hse,[s[7]||(s[7]=x(" Problematic API path: ",-1)),E("strong",null,re(n.value.url),1)])):fe("",!0),n.value.error?(F(),ge("div",jse,[s[8]||(s[8]=x(" Error: ",-1)),E("strong",null,re(n.value.error),1)])):fe("",!0)]),_:1})):fe("",!0),h(An,{class:"mt-6"},{default:g(()=>[h(te,{class:"align-center",color:"primary",to:"/",variant:"elevated"},{default:g(()=>[h(Z,{class:"mr-2"},{default:g(()=>[...s[9]||(s[9]=[x("home",-1)])]),_:1}),s[10]||(s[10]=x(" Go home ",-1))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}))}}),Wse=Me({__name:"Logo",setup(e){return(t,n)=>(F(),ee(ts,{src:Q(YS),class:"shrink mr-1 pt-3 ml-1",contain:"",style:{opacity:"0.85"},width:"150"},null,8,["src"]))}}),Gse=Me({__name:"LoginForm",setup(e){const t=Zr(),n=H(""),r=H(""),s=H(!1),i=H(""),o=_o(),a=PD(),l=H(!1),u=Rn("auth:login"),c=Rt(),d=O(()=>(r.value??"")?.length<3||(i.value??"").length<3);gt(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 v();if(!t.hasRefreshToken)return;await t.verifyOrRefreshLoginOnceOrLogout()&&await v()});async function f(){return await o.push({name:Bt.Registration})}async function p(){try{l.value=!0,await t.login(r.value,i.value),t.lastLogoutReason=null,i.value="",l.value=!1}catch(m){if(l.value=!1,m?.response?.status===401){i.value="";const y=m?.response?.data?.reasonCode,S=Tb(y);y===yr.AccountNotVerified?c.error(S,"Please ask your administrator to verify your account and try again."):y===yr.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 "+m?.response?.status,i.value="";return}return n.value="",u.emit(!0),await v()}async function v(){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:Bt.Home});return}}return(m,y)=>(F(),ee(mt,{class:"pa-4",elevation:"10",style:{"border-radius":"10px"}},{default:g(()=>[h(Gt,null,{default:g(()=>[h(e0,null,{default:g(()=>[y[7]||(y[7]=E("label",null," Username ",-1)),h(et,{modelValue:r.value,"onUpdate:modelValue":y[0]||(y[0]=S=>r.value=S),"prepend-icon":"person",autofocus:"",label:"Username",name:"login",type:"text",variant:"underlined",onKeyup:y[1]||(y[1]=cv(S=>d.value||p(),["enter"]))},null,8,["modelValue"]),h(et,{modelValue:i.value,"onUpdate:modelValue":y[2]||(y[2]=S=>i.value=S),"append-inner-icon":s.value?"visibility_off":"visibility","onClick:appendInner":y[3]||(y[3]=S=>s.value=!s.value),type:s.value?"text":"password",label:"Password",name:"password",password:"","prepend-icon":"lock",variant:"underlined",onKeyup:y[4]||(y[4]=cv(S=>d.value||p(),["enter"]))},null,8,["modelValue","append-inner-icon","type"]),n.value?(F(),ee(ln,{key:0,class:"mt-6",color:"error",density:"compact",variant:"outlined"},{default:g(()=>[x(re(n.value),1)]),_:1})):fe("",!0),Q(t).lastLogoutReason?(F(),ee(ln,{key:1,class:"mt-6",color:"error-darken-1",density:"compact",variant:"outlined"},{default:g(()=>[x(" Reason for automatic logout: "+re(Q(t).lastLogoutReason),1)]),_:1})):fe("",!0)]),_:1})]),_:1}),h(An,null,{default:g(()=>[h(te,{loading:l.value,class:"pa-4",color:"primary",size:"lg",variant:"flat",style:{width:"100%"},onClick:y[5]||(y[5]=S=>p())},{default:g(()=>[...y[8]||(y[8]=[x(" Login ",-1)])]),_:1},8,["loading"])]),_:1}),h(An,null,{default:g(()=>[h(te,{disabled:!Q(t).registration,class:"pa-4",size:"lg",variant:"flat",style:{width:"100%"},onClick:y[6]||(y[6]=S=>f())},{default:g(()=>[x(" Register new account "+re(Q(t).registration?"":"(not enabled)")+" ",1),h(Z,{class:"pl-5",icon:"right"})]),_:1},8,["disabled"])]),_:1})]),_:1}))}}),Kse={class:"d-flex align-center",style:{"min-height":"calc(100vh - 148px)"}},Yse={class:"pt-6 pl-6 d-flex flex-column align-center"},Xse=Me({__name:"LoginView",setup(e){return(t,n)=>{const r=Wse;return F(),ee(Je,{class:"position-relative","no-gutters":""},{default:g(()=>[h(Ve,{cols:"12",lg:"12"},{default:g(()=>[h(Bn,null,{default:g(()=>[E("div",Kse,[h(Je,{justify:"center",class:"align-content-center"},{default:g(()=>[E("div",Yse,[h(r),h(Tn,{class:"text-uppercase text-red"},{default:g(()=>[...n[0]||(n[0]=[E("strong",null," FDM  ",-1),E("strong",null," Monster ",-1)])]),_:1}),h(Tn,{class:"mt-lg-6 mt-sm-5 mb-md-5"},{default:g(()=>[...n[1]||(n[1]=[x(" Login to your account ",-1)])]),_:1}),h(Sp,{class:"text-grey mb-md-5"},{default:g(()=>[...n[2]||(n[2]=[x(" Welcome back! Please enter your details ",-1)])]),_:1})]),h(Ve,{cols:"12",md:"12"},{default:g(()=>[h(Gse,{class:"login-card"})]),_:1})]),_:1})])]),_:1})]),_:1})]),_:1})}}}),Qse={class:"d-flex flex-column align-center"},Jse=Me({__name:"RegistrationForm",setup(e){const t=Zr(),n=_o(),r=H(""),s=H(""),i=H(!1),o=H(!1),a=H(""),l=H(""),u=H(!1),c=Rt();async function d(){return await n.push({name:Bt.Login})}const f=O(()=>(s.value??"")?.length<3||(a.value??"").length<3||a.value!=l.value);gt(async()=>{await t.logout(),await t.checkAuthenticationRequirements(),t.registration||(c.info("Registration is disabled, please contact your administrator"),await n.push({name:Bt.Login}))});async function p(){try{u.value=!0,await Lo.registerAccount(s.value,a.value),u.value=!1}catch(v){if(u.value=!1,v?.response?.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(v,m)=>{const y=Pn("v-flex");return F(),ee(Bn,{"fill-height":"",fluid:""},{default:g(()=>[h(Cp,{"align-content-center":"","justify-center":""},{default:g(()=>[h(y,{class:"d-flex flex-column align-content-center",md4:"",sm8:"",style:{"max-width":"450px","margin-top":"10%"},xs12:""},{default:g(()=>[E("div",Qse,[h(ts,{src:require("@/assets/logo.png"),class:"shrink mr-1 pt-3 ml-1",contain:"",style:{opacity:"0.85"},width:"150"},null,8,["src"]),h(Tn,{class:"text-uppercase text-red"},{default:g(()=>[...m[8]||(m[8]=[E("strong",null," FDM  ",-1),E("strong",null," Monster ",-1)])]),_:1}),h(Tn,{class:"mt-lg-6 mt-sm-5"},{default:g(()=>[...m[9]||(m[9]=[x(" Register new account ",-1)])]),_:1}),h(Sp,{class:"text-grey"},{default:g(()=>[...m[10]||(m[10]=[x(" Welcome! Please register your guest account ",-1)])]),_:1})]),h(mt,{class:"elevation-4 pa-4",style:{"border-radius":"10px"}},{default:g(()=>[h(Gt,null,{default:g(()=>[h(e0,null,{default:g(()=>[m[11]||(m[11]=E("label",null," Username ",-1)),h(et,{modelValue:s.value,"onUpdate:modelValue":m[0]||(m[0]=S=>s.value=S),rules:[S=>!!S||"Username is required",S=>(S?.length??0)>=3||"Username must be of length 3 or greater",S=>!S.toLowerCase().includes("admin")||"Username may not contain the word admin",S=>!S.toLowerCase().includes("root")||"Username may not contain the word root",S=>S.toLowerCase()!=="demo"||"Username may not equal the word demo"],autofocus:"",name:"login",label:"Username","prepend-icon":"person",type:"text"},null,8,["modelValue","rules"]),h(et,{id:"password",modelValue:a.value,"onUpdate:modelValue":m[1]||(m[1]=S=>a.value=S),"append-icon":i.value?"visibility":"visibility_off",type:i.value?"text":"password",label:"Password",name:"password",rules:[S=>!!S||"Password is required",S=>!!S&&S?.length>=8||"Password must be of length 8 or greater"],password:"","prepend-icon":"lock","onClick:append":m[2]||(m[2]=S=>i.value=!i.value)},null,8,["modelValue","append-icon","type","rules"]),h(et,{id:"password",modelValue:l.value,"onUpdate:modelValue":m[3]||(m[3]=S=>l.value=S),"append-icon":o.value?"visibility":"visibility_off",type:o.value?"text":"password",rules:[S=>!!S||"Repeated password is required",S=>S===a.value||"Passwords are not equal"],label:"Repeated Password",name:"password",password:"","prepend-icon":"lock","onClick:append":m[4]||(m[4]=S=>o.value=!o.value),onKeyup:m[5]||(m[5]=cv(S=>f.value||p(),["enter"]))},null,8,["modelValue","append-icon","type","rules"]),r.value?(F(),ee(ln,{key:0,class:"mt-6",color:"error",density:"compact",variant:"outlined"},{default:g(()=>[x(re(r.value),1)]),_:1})):fe("",!0)]),_:1})]),_:1}),h(An,null,{default:g(()=>[h(te,{loading:u.value,class:"pa-4",color:"primary",size:"large",style:{width:"100%"},onClick:m[6]||(m[6]=S=>p())},{default:g(()=>[...m[12]||(m[12]=[x(" Register account ",-1)])]),_:1},8,["loading"])]),_:1}),h(An,null,{default:g(()=>[h(te,{style:{width:"100%"},class:"pa-4",size:"large",onClick:m[7]||(m[7]=S=>d())},{default:g(()=>[h(Z,{class:"mr-2"},{default:g(()=>[...m[13]||(m[13]=[x("arrow_left",-1)])]),_:1}),m[14]||(m[14]=x("Back to Login ",-1))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})}}}),Zse=Me({__name:"RegistrationView",setup(e){return(t,n)=>(F(),ee(Bn,{"fill-height":"",fluid:""},{default:g(()=>[h(Cp,{"align-center":"","justify-center":""},{default:g(()=>[h(Jse)]),_:1})]),_:1}))}}),eie=["src"],tie=Me({__name:"CameraGridView",setup(e){const t=Vt(),n=Kt(Yt.AddOrUpdateCameraDialog),s=Ep({queryKey:["cameraStream"],queryFn:async()=>(await vh.listCameraStreams()).map(c=>({printer:t.printers.find(d=>d.id===c.printerId),cameraStream:c}))}),i=sY({mutationFn:u=>vh.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)=>(F(),ge("div",null,[h(ur,null,{default:g(()=>[h(Tn,{class:"mr-4"},{default:g(()=>[...c[1]||(c[1]=[x(" Camera Overview ",-1)])]),_:1}),h(te,{color:"primary",onClick:c[0]||(c[0]=d=>o())},{default:g(()=>[h(Z,{class:"mr-2"},{default:g(()=>[...c[2]||(c[2]=[x("add",-1)])]),_:1}),c[3]||(c[3]=x(" Add camera ",-1))]),_:1})]),_:1}),h(Je,{class:"ma-0"},{default:g(()=>[(F(!0),ge(Ie,null,Ht(Q(s).data.value,d=>(F(),ge("div",{key:d.cameraStream.id,class:"ma-4",style:{border:"1px solid grey",margin:"0"},width:"300"},[h(mt,{class:"pb-2 pl-2 pr-2",width:"300"},{default:g(()=>[h(Zt,null,{default:g(()=>[d.cameraStream.printerId?(F(),ee(Z,{key:0,class:"mr-2",size:"small"},{default:g(()=>[...c[4]||(c[4]=[x(" print ",-1)])]),_:1})):(F(),ee(Z,{key:1,class:"mr-2",size:"small"},{default:g(()=>[...c[5]||(c[5]=[x(" camera_alt ",-1)])]),_:1})),x(" "+re(d?.cameraStream.name??d?.printer?.name??"Camera"),1)]),_:2},1024),E("img",{src:d.cameraStream?.streamURL,width:"100%"},null,8,eie),c[10]||(c[10]=E("br",null,null,-1)),h(te,{class:"mr-1",size:"small",onClick:f=>a(d.cameraStream.id)},{default:g(()=>[h(Z,{class:"mr-2"},{default:g(()=>[...c[6]||(c[6]=[x("edit",-1)])]),_:1}),c[7]||(c[7]=x(" Update ",-1))]),_:1},8,["onClick"]),h(te,{size:"small",onClick:f=>l(d.cameraStream.id)},{default:g(()=>[h(Z,{class:"mr-2"},{default:g(()=>[...c[8]||(c[8]=[x("delete",-1)])]),_:1}),c[9]||(c[9]=x(" Delete ",-1))]),_:1},8,["onClick"])]),_:2},1024)]))),128))]),_:1})]))}}),nie="/img/OIG.jpg";class rie extends fr{static async postFirstTimeSetup(t){const n=ae.completeFirstTimeSetupRoute;return await this.post(n,t)}}const sie={class:"mt-6 border_all"},iie={class:"d-flex flex-row align-center"},oie={class:"d-flex flex-row align-center"},aie={class:"d-flex flex-row align-center"},lie={class:"d-flex flex-row align-center"},uie={class:"mt-4"},cie={class:"mt-4"},die={class:"mt-14"},fie={class:"mb-5 mt-10"},hie={class:"mt-14"},pie=Me({__name:"FirstTimeSetupView",setup(e){const t=_o(),n=Rt(),r=H(!1),s=Zr(),i=H({loginRequired:!0,registration:!1}),o=H({rootUsername:"admin",rootPassword:"",rootPassword2:""}),a=H(1);gt(async()=>{await s.checkAuthenticationRequirements(),s.wizardState?.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 rie.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=Pn("v-stepper-step"),p=Pn("v-stepper-content"),v=Pn("v-stepper-items");return F(),ee(Bn,null,{default:g(()=>[d[46]||(d[46]=E("img",{alt:"FDM Monster Background",class:"grid-bg-img align-content-center",src:JS,style:{opacity:"0.08"}},null,-1)),h(tD,{modelValue:a.value,"onUpdate:modelValue":d[10]||(d[10]=m=>a.value=m),class:"bg-grey-darken-4"},{default:g(()=>[h(MS,null,{default:g(()=>[h(f,{complete:a.value>1,step:"1"},{default:g(()=>[...d[11]||(d[11]=[x(" Introduction ",-1)])]),_:1},8,["complete"]),h(en),h(f,{complete:a.value>2,step:"2"},{default:g(()=>[...d[12]||(d[12]=[x(" Login and registration ",-1)])]),_:1},8,["complete"]),h(en),h(f,{step:"3"},{default:g(()=>[...d[13]||(d[13]=[x(" Summary ",-1)])]),_:1})]),_:1}),h(v,null,{default:g(()=>[h(p,{class:"align-content-center align-center text-center",step:"1"},{default:g(()=>[d[17]||(d[17]=E("div",{class:"align-content-center align-center text-center"},[E("img",{class:"rounded-pill ma-4",src:nie,style:{opacity:"0.7"},width:"400"}),x(" /> "),E("h1",null,"FDM Monster"),E("small",null," This server is still unconfigured. ")],-1)),h(te,{class:"mt-14 mb-14",color:"primary",onClick:d[0]||(d[0]=m=>a.value=2)},{default:g(()=>[...d[14]||(d[14]=[x(" Start Setup ",-1)])]),_:1}),E("div",sie,[h(Z,{class:"mr-6"},{default:g(()=>[...d[15]||(d[15]=[x("question_mark",-1)])]),_:1}),d[16]||(d[16]=E("small",null,[x(" If you have questions at any point, reach out on "),E("a",{href:"https://github.com/fdm-monster/fdm-monster/issues"}," Github "),x(" or on "),E("a",{href:"https://discord.gg/mwA8uP8CMc"}," Discord "),x(". ")],-1))])]),_:1}),h(p,{class:"align-content-center align-center text-center",step:"2"},{default:g(()=>[E("h4",null,[h(Z,{class:"mr-2"},{default:g(()=>[...d[18]||(d[18]=[x("settings",-1)])]),_:1}),d[19]||(d[19]=x(" Login",-1))]),h(e0,{modelValue:r.value,"onUpdate:modelValue":d[6]||(d[6]=m=>r.value=m)},{default:g(()=>[h(Sh,{modelValue:i.value.loginRequired,"onUpdate:modelValue":d[1]||(d[1]=m=>i.value.loginRequired=m),class:"mt-5"},{message:g(()=>[E("span",iie,[h(Z,{color:i.value.loginRequired?"success":"",disabled:!i.value.loginRequired,class:"ml-3 mr-3"},{default:g(()=>[...d[20]||(d[20]=[x(" check ",-1)])]),_:1},8,["color","disabled"]),d[21]||(d[21]=x(" Login is required. ",-1))]),E("span",oie,[h(Z,{color:i.value.loginRequired?"":"error",disabled:i.value.loginRequired,class:"ml-3 mr-3"},{default:g(()=>[...d[22]||(d[22]=[x(" close ",-1)])]),_:1},8,["color","disabled"]),d[23]||(d[23]=x(" No login is required. The admin role is assumed. ",-1))])]),label:g(()=>[...d[24]||(d[24]=[x(" Enable Login ",-1)])]),_:1},8,["modelValue"]),i.value.loginRequired?fe("",!0):(F(),ee(ln,{key:0,color:"error-darken-4"},{default:g(()=>[...d[25]||(d[25]=[x(" You might be exposing your FDM Monster server publicly. Please take care evaluating the ",-1),E("strong",null," Enable Login ",-1),x(" option. ",-1)])]),_:1})),h(Sh,{modelValue:i.value.registration,"onUpdate:modelValue":d[2]||(d[2]=m=>i.value.registration=m),class:"mt-10 mb-10"},{message:g(()=>[E("span",aie,[h(Z,{color:i.value.registration?"success":"",disabled:!i.value.registration,class:"ml-3 mr-3"},{default:g(()=>[...d[26]||(d[26]=[x(" check ",-1)])]),_:1},8,["color","disabled"]),d[27]||(d[27]=x(" Accounts can be registered with a guest role. ",-1))]),E("span",lie,[h(Z,{color:i.value.registration?"":"error",disabled:i.value.registration,class:"ml-3 mr-3"},{default:g(()=>[...d[28]||(d[28]=[x(" close ",-1)])]),_:1},8,["color","disabled"]),d[29]||(d[29]=x(" No other accounts can be registered. ",-1))])]),label:g(()=>[...d[30]||(d[30]=[x(" Enable Registration ",-1)])]),_:1},8,["modelValue"]),h(en),E("h4",uie,[h(Z,{class:"mr-2"},{default:g(()=>[...d[31]||(d[31]=[x("shield",-1)])]),_:1}),d[32]||(d[32]=x(" Admin account ",-1))]),h(et,{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:g(()=>[h(Z,null,{default:g(()=>[...d[33]||(d[33]=[x("person",-1)])]),_:1})]),_:1},8,["modelValue","rules"]),h(et,{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?.length>=8||"Password must be of length 8 or greater"],class:"mt-5",label:"Password"},{prepend:g(()=>[h(Z,null,{default:g(()=>[...d[34]||(d[34]=[x("password",-1)])]),_:1})]),_:1},8,["modelValue","rules"]),h(et,{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:g(()=>[h(Z,null,{default:g(()=>[...d[35]||(d[35]=[x("password",-1)])]),_:1})]),_:1},8,["modelValue","rules"])]),_:1},8,["modelValue"]),E("div",cie,[h(te,{class:"mr-4",onClick:d[7]||(d[7]=m=>a.value=1)},{default:g(()=>[...d[36]||(d[36]=[x(" Back ",-1)])]),_:1}),h(te,{disabled:!r.value,color:"primary",onClick:d[8]||(d[8]=m=>l())},{default:g(()=>[...d[37]||(d[37]=[x(" Verify & Submit ",-1)])]),_:1},8,["disabled"])]),h(en,{class:"mt-4"}),E("div",die,[h(Z,{class:"mr-6"},{default:g(()=>[...d[38]||(d[38]=[x("question_mark",-1)])]),_:1}),d[39]||(d[39]=E("small",null,[x(" If you have questions at any point, reach out on "),E("a",{href:"https://github.com/fdm-monster/fdm-monster/issues"}," Github "),x(" or on "),E("a",{href:"https://discord.gg/mwA8uP8CMc"}," Discord "),x(". ")],-1))])]),_:1}),h(p,{class:"align-content-center align-center text-center",step:"3"},{default:g(()=>[E("div",fie,[h(Z,{size:"100",class:"mr-5",color:"green circle"},{default:g(()=>[...d[40]||(d[40]=[x(" check_circle ",-1)])]),_:1}),d[41]||(d[41]=x(" Setup Completed ",-1))]),d[45]||(d[45]=E("br",null,null,-1)),h(te,{color:"primary",class:"mr-4",onClick:d[9]||(d[9]=m=>u())},{default:g(()=>[...d[42]||(d[42]=[x(" Let's continue ",-1)])]),_:1}),E("div",hie,[h(Z,{class:"mr-6"},{default:g(()=>[...d[43]||(d[43]=[x("question_mark",-1)])]),_:1}),d[44]||(d[44]=E("small",null,[x(" If you have questions at any point, reach out on "),E("a",{href:"https://github.com/fdm-monster/fdm-monster/issues"}," Github "),x(" or on "),E("a",{href:"https://discord.gg/mwA8uP8CMc"}," Discord "),x(". ")],-1))])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})}}}),mie={class:"ml-4 mb-4"},gie={class:"ml-4 mb-4"},vie=Me({__name:"AccountSettings",setup(e){const t=Ts(),n=HS(),r=Zr(),s=_o(),i=Rt(),o=H(),a=H(""),l=H({username:"",newPassword:"",oldPassword:"",repeatPassword:""});gt(async()=>{await t.loadSettings(),o.value=t.settings?.server.loginRequired,await n.getProfile(),l.value.username=n.username,a.value=n.userId});async function u(){if(!a.value?.toString()?.length){i.openErrorMessage({title:"User not loaded"});return}await qr.changeUsername(a.value,l.value.username),await n.getProfile(),l.value.username=n.username,i.openInfoMessage({title:"Username changed"})}async function c(){if(!a.value?.toString()?.length){i.openErrorMessage({title:"User not loaded"});return}if(l.value.newPassword!==l.value.repeatPassword){i.openErrorMessage({title:"Passwords do not match"});return}await qr.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 ID(s)}return(d,f)=>{const p=Pn("v-list-item-content"),v=Pn("v-list-item-action-text");return F(),ee(mt,null,{default:g(()=>[h(ur,{color:"primary"},{default:g(()=>[h(st,null,{default:g(()=>[h(Z,null,{default:g(()=>[...f[6]||(f[6]=[x("account_circle",-1)])]),_:1})]),_:1}),h(Tn,null,{default:g(()=>[...f[7]||(f[7]=[x(" Account Settings ",-1)])]),_:1})]),_:1}),h(Dt,{subheader:"",lines:"three"},{default:g(()=>[h(Ne,null,{default:g(()=>[o.value?fe("",!0):(F(),ee(p,{key:0},{default:g(()=>[h(ln,{color:"primary"},{default:g(()=>[...f[8]||(f[8]=[x(" 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}),h(Dt,{subheader:"",lines:"three"},{default:g(()=>[h(Ne,null,{default:g(()=>[h(it,null,{default:g(()=>[...f[9]||(f[9]=[x(" Username ",-1)])]),_:1}),h(v,null,{default:g(()=>[h(et,{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}),E("div",mie,[h(te,{disabled:!o.value,color:"primary",onClick:f[1]||(f[1]=m=>u())},{default:g(()=>[...f[10]||(f[10]=[x(" Change username ",-1)])]),_:1},8,["disabled"])]),h(en),f[14]||(f[14]=E("br",null,null,-1)),h(Ne,null,{default:g(()=>[h(it,null,{default:g(()=>[...f[11]||(f[11]=[x(" Old Password ",-1)])]),_:1}),h(v,null,{default:g(()=>[h(et,{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}),h(Ne,null,{default:g(()=>[h(it,null,{default:g(()=>[...f[12]||(f[12]=[x(" New Password ",-1)])]),_:1}),h(v,null,{default:g(()=>[h(et,{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}),h(Ne,null,{default:g(()=>[h(it,null,{default:g(()=>[...f[13]||(f[13]=[x(" Repeat New Password ",-1)])]),_:1}),h(v,null,{default:g(()=>[h(et,{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}),E("div",gie,[h(te,{disabled:!o.value,color:"primary",onClick:f[5]||(f[5]=m=>c())},{default:g(()=>[...f[15]||(f[15]=[x(" Change password ",-1)])]),_:1},8,["disabled"])]),h(en)]),_:1})}}}),yie=Me({__name:"GridSettings",setup(e){return(t,n)=>(F(),ee(Je,null,{default:g(()=>[h(Ve,{cols:"12"},{default:g(()=>[h(mt,null,{default:g(()=>[h(EM,{icon:"grid_on",title:"Grid"}),h(nD)]),_:1})]),_:1})]),_:1}))}}),bie=Me({__name:"ServerProtectionSettings",setup(e){const t=_o(),n=Rt(),r=Zr(),s=H(""),i=H(!1),o=H(!1),a=H(3200),l=H(!1),u=H(-1),c=H(14);async function d(){const S=await pn.getSettings();i.value=S.server.loginRequired,o.value=S.server.registration,s.value=S.connection?.clientIp??"127.0.0.1";const b=await pn.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}gt(async()=>{await d()});function f(){l.value||(u.value=-1)}async function p(){const S=i.value;!S&&!confirm("Disabling login will expose your server. Continue?")||(await pn.updateLoginRequiredSettings(S),await r.logout(!0),await r.checkAuthenticationRequirements(),S?await t.push({name:Bt.Login}):await t.push({name:Bt.Home}),n.info("Login Required settings updated"))}async function v(){await pn.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 pn.updateCredentialSettings(a.value*60,u.value,c.value*24*3600),n.info("Login expiry settings updated")}return(S,b)=>(F(),ee(mt,null,{default:g(()=>[h(ur,{color:"primary"},{default:g(()=>[h(st,null,{default:g(()=>[h(Z,null,{default:g(()=>[...b[11]||(b[11]=[x("settings",-1)])]),_:1})]),_:1}),h(Tn,null,{default:g(()=>[...b[12]||(b[12]=[x(" Server Protection Settings ",-1)])]),_:1})]),_:1}),h(Dt,{lines:"three"},{default:g(()=>[h(Ne,null,{default:g(()=>[h(it,null,{default:g(()=>[...b[13]||(b[13]=[x(" Login Required ",-1)])]),_:1}),h(pt,null,{default:g(()=>[h(Je,null,{default:g(()=>[h(Ve,{cols:"12",md:"2"},{default:g(()=>[h(cn,{modelValue:i.value,"onUpdate:modelValue":b[0]||(b[0]=k=>i.value=k),label:"Require Login"},null,8,["modelValue"])]),_:1})]),_:1}),h(Je,null,{default:g(()=>[h(Ve,null,{default:g(()=>[h(te,{color:"primary",onClick:b[1]||(b[1]=k=>p())},{default:g(()=>[...b[14]||(b[14]=[x(" save login required setting ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),h(Ne,null,{default:g(()=>[h(it,null,{default:g(()=>[...b[15]||(b[15]=[x(" Registration Enabled ",-1)])]),_:1}),h(pt,null,{default:g(()=>[h(Je,null,{default:g(()=>[h(Ve,{cols:"12",md:"2"},{default:g(()=>[h(cn,{modelValue:o.value,"onUpdate:modelValue":b[2]||(b[2]=k=>o.value=k),label:"Enable Registration"},null,8,["modelValue"])]),_:1})]),_:1}),h(Je,null,{default:g(()=>[h(Ve,null,{default:g(()=>[h(te,{color:"primary",onClick:b[3]||(b[3]=k=>v())},{default:g(()=>[...b[16]||(b[16]=[x(" save registration enabled setting ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),h(Ne,null,{default:g(()=>[h(it,null,{default:g(()=>[...b[17]||(b[17]=[x(" Login Expiry Settings (advanced) ",-1)])]),_:1}),h(pt,null,{default:g(()=>[h(Je,null,{default:g(()=>[h(Ve,{cols:"12",md:"2"},{default:g(()=>[h(et,{modelValue:a.value,"onUpdate:modelValue":b[4]||(b[4]=k=>a.value=k),rules:[k=>!!k&&k>=2&&k<=120],label:"JWT Expiry (minutes)"},null,8,["modelValue","rules"])]),_:1})]),_:1}),h(Je,null,{default:g(()=>[h(Ve,{cols:"12",md:"2"},{default:g(()=>[h(cn,{modelValue:l.value,"onUpdate:modelValue":[b[5]||(b[5]=k=>l.value=k),b[6]||(b[6]=k=>f())],label:"Enable Refresh Token Attempts"},null,8,["modelValue"])]),_:1})]),_:1}),h(Je,null,{default:g(()=>[h(Ve,{cols:"12",md:"2"},{default:g(()=>[h(et,{modelValue:u.value,"onUpdate:modelValue":b[7]||(b[7]=k=>u.value=k),disabled:!l.value,rules:[k=>!!k&&k>=1],label:"Refresh Token Attempts (disabled: -1, range: 1 to 50)",type:"number"},null,8,["modelValue","disabled","rules"])]),_:1})]),_:1}),h(Je,null,{default:g(()=>[h(Ve,{cols:"12",md:"2"},{default:g(()=>[h(et,{modelValue:c.value,"onUpdate:modelValue":b[8]||(b[8]=k=>c.value=k),rules:[k=>!!k&&k>=1&&k<=30],label:"Refresh Token Expiry (days)"},null,8,["modelValue","rules"])]),_:1})]),_:1}),h(ln,{color:"secondary"},{default:g(()=>[h(Z,null,{default:g(()=>[...b[18]||(b[18]=[x("info",-1)])]),_:1}),b[19]||(b[19]=x("   Be cautious, setting the wrong expiry could make you lose access to the server or make your user experience highly degraded! ",-1))]),_:1}),h(Je,null,{default:g(()=>[h(Ve,null,{default:g(()=>[h(te,{color:"primary",onClick:b[9]||(b[9]=k=>y())},{default:g(()=>[...b[20]||(b[20]=[x(" save login expiry settings ",-1)])]),_:1}),h(te,{color:"default",onClick:b[10]||(b[10]=k=>m())},{default:g(()=>[...b[21]||(b[21]=[x(" reset to default ",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}))}});var Gd={exports:{}},og,pE;function $p(){if(pE)return og;pE=1;const e="2.0.0",t=256,n=Number.MAX_SAFE_INTEGER||9007199254740991,r=16,s=t-6;return og={MAX_LENGTH:t,MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:s,MAX_SAFE_INTEGER:n,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},og}var ag,mE;function Bp(){if(mE)return ag;mE=1;var e={};return ag=typeof process=="object"&&e&&e.NODE_DEBUG&&/\bsemver\b/i.test(e.NODE_DEBUG)?(...n)=>console.error("SEMVER",...n):()=>{},ag}var gE;function ud(){return gE||(gE=1,(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:s}=$p(),i=Bp();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-]",p=[["\\s",1],["\\d",s],[f,r]],v=y=>{for(const[S,b]of p)y=y.split(`${S}*`).join(`${S}{0,${b}}`).split(`${S}+`).join(`${S}{1,${b}}`);return y},m=(y,S,b)=>{const k=v(S),T=d++;i(y,T,S),c[y]=T,l[T]=S,u[T]=k,o[T]=new RegExp(S,b?"g":void 0),a[T]=new RegExp(k,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*$")})(Gd,Gd.exports)),Gd.exports}var lg,vE;function m0(){if(vE)return lg;vE=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return lg=r=>r?typeof r!="object"?e:r:t,lg}var ug,yE;function m2(){if(yE)return ug;yE=1;const e=/^[0-9]+$/,t=(r,s)=>{if(typeof r=="number"&&typeof s=="number")return r===s?0:r<s?-1:1;const i=e.test(r),o=e.test(s);return i&&o&&(r=+r,s=+s),r===s?0:i&&!o?-1:o&&!i?1:r<s?-1:1};return ug={compareIdentifiers:t,rcompareIdentifiers:(r,s)=>t(s,r)},ug}var cg,bE;function hr(){if(bE)return cg;bE=1;const e=Bp(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:n}=$p(),{safeRe:r,t:s}=ud(),i=m0(),{compareIdentifiers:o}=m2();class a{constructor(u,c){if(c=i(c),u instanceof a){if(u.loose===!!c.loose&&u.includePrerelease===!!c.includePrerelease)return u;u=u.version}else if(typeof u!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof u}".`);if(u.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",u,c),this.options=c,this.loose=!!c.loose,this.includePrerelease=!!c.includePrerelease;const d=u.trim().match(c.loose?r[s.LOOSE]:r[s.FULL]);if(!d)throw new TypeError(`Invalid Version: ${u}`);if(this.raw=u,this.major=+d[1],this.minor=+d[2],this.patch=+d[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");d[4]?this.prerelease=d[4].split(".").map(f=>{if(/^[0-9]+$/.test(f)){const p=+f;if(p>=0&&p<n)return p}return f}):this.prerelease=[],this.build=d[5]?d[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(u){if(e("SemVer.compare",this.version,this.options,u),!(u instanceof a)){if(typeof u=="string"&&u===this.version)return 0;u=new a(u,this.options)}return u.version===this.version?0:this.compareMain(u)||this.comparePre(u)}compareMain(u){return u instanceof a||(u=new a(u,this.options)),this.major<u.major?-1:this.major>u.major?1:this.minor<u.minor?-1:this.minor>u.minor?1:this.patch<u.patch?-1:this.patch>u.patch?1:0}comparePre(u){if(u instanceof a||(u=new a(u,this.options)),this.prerelease.length&&!u.prerelease.length)return-1;if(!this.prerelease.length&&u.prerelease.length)return 1;if(!this.prerelease.length&&!u.prerelease.length)return 0;let c=0;do{const d=this.prerelease[c],f=u.prerelease[c];if(e("prerelease compare",c,d,f),d===void 0&&f===void 0)return 0;if(f===void 0)return 1;if(d===void 0)return-1;if(d===f)continue;return o(d,f)}while(++c)}compareBuild(u){u instanceof a||(u=new a(u,this.options));let c=0;do{const d=this.build[c],f=u.build[c];if(e("build compare",c,d,f),d===void 0&&f===void 0)return 0;if(f===void 0)return 1;if(d===void 0)return-1;if(d===f)continue;return o(d,f)}while(++c)}inc(u,c,d){if(u.startsWith("pre")){if(!c&&d===!1)throw new Error("invalid increment argument: identifier is empty");if(c){const f=`-${c}`.match(this.options.loose?r[s.PRERELEASELOOSE]:r[s.PRERELEASE]);if(!f||f[1]!==c)throw new Error(`invalid identifier: ${c}`)}}switch(u){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",c,d);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",c,d);break;case"prepatch":this.prerelease.length=0,this.inc("patch",c,d),this.inc("pre",c,d);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",c,d),this.inc("pre",c,d);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 f=Number(d)?1:0;if(this.prerelease.length===0)this.prerelease=[f];else{let p=this.prerelease.length;for(;--p>=0;)typeof this.prerelease[p]=="number"&&(this.prerelease[p]++,p=-2);if(p===-1){if(c===this.prerelease.join(".")&&d===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(f)}}if(c){let p=[c,f];d===!1&&(p=[c]),o(this.prerelease[0],c)===0?isNaN(this.prerelease[1])&&(this.prerelease=p):this.prerelease=p}break}default:throw new Error(`invalid increment argument: ${u}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return cg=a,cg}var dg,SE;function du(){if(SE)return dg;SE=1;const e=hr();return dg=(n,r,s=!1)=>{if(n instanceof e)return n;try{return new e(n,r)}catch(i){if(!s)return null;throw i}},dg}var fg,wE;function Sie(){if(wE)return fg;wE=1;const e=du();return fg=(n,r)=>{const s=e(n,r);return s?s.version:null},fg}var hg,_E;function wie(){if(_E)return hg;_E=1;const e=du();return hg=(n,r)=>{const s=e(n.trim().replace(/^[=v]+/,""),r);return s?s.version:null},hg}var pg,kE;function _ie(){if(kE)return pg;kE=1;const e=hr();return pg=(n,r,s,i,o)=>{typeof s=="string"&&(o=i,i=s,s=void 0);try{return new e(n instanceof e?n.version:n,s).inc(r,i,o).version}catch{return null}},pg}var mg,xE;function kie(){if(xE)return mg;xE=1;const e=du();return mg=(n,r)=>{const s=e(n,null,!0),i=e(r,null,!0),o=s.compare(i);if(o===0)return null;const a=o>0,l=a?s:i,u=a?i:s,c=!!l.prerelease.length;if(!!u.prerelease.length&&!c){if(!u.patch&&!u.minor)return"major";if(u.compareMain(l)===0)return u.minor&&!u.patch?"minor":"patch"}const f=c?"pre":"";return s.major!==i.major?f+"major":s.minor!==i.minor?f+"minor":s.patch!==i.patch?f+"patch":"prerelease"},mg}var gg,EE;function xie(){if(EE)return gg;EE=1;const e=hr();return gg=(n,r)=>new e(n,r).major,gg}var vg,CE;function Eie(){if(CE)return vg;CE=1;const e=hr();return vg=(n,r)=>new e(n,r).minor,vg}var yg,TE;function Cie(){if(TE)return yg;TE=1;const e=hr();return yg=(n,r)=>new e(n,r).patch,yg}var bg,RE;function Tie(){if(RE)return bg;RE=1;const e=du();return bg=(n,r)=>{const s=e(n,r);return s&&s.prerelease.length?s.prerelease:null},bg}var Sg,PE;function Rs(){if(PE)return Sg;PE=1;const e=hr();return Sg=(n,r,s)=>new e(n,s).compare(new e(r,s)),Sg}var wg,IE;function Rie(){if(IE)return wg;IE=1;const e=Rs();return wg=(n,r,s)=>e(r,n,s),wg}var _g,AE;function Pie(){if(AE)return _g;AE=1;const e=Rs();return _g=(n,r)=>e(n,r,!0),_g}var kg,OE;function g0(){if(OE)return kg;OE=1;const e=hr();return kg=(n,r,s)=>{const i=new e(n,s),o=new e(r,s);return i.compare(o)||i.compareBuild(o)},kg}var xg,DE;function Iie(){if(DE)return xg;DE=1;const e=g0();return xg=(n,r)=>n.sort((s,i)=>e(s,i,r)),xg}var Eg,ME;function Aie(){if(ME)return Eg;ME=1;const e=g0();return Eg=(n,r)=>n.sort((s,i)=>e(i,s,r)),Eg}var Cg,LE;function Vp(){if(LE)return Cg;LE=1;const e=Rs();return Cg=(n,r,s)=>e(n,r,s)>0,Cg}var Tg,FE;function v0(){if(FE)return Tg;FE=1;const e=Rs();return Tg=(n,r,s)=>e(n,r,s)<0,Tg}var Rg,NE;function g2(){if(NE)return Rg;NE=1;const e=Rs();return Rg=(n,r,s)=>e(n,r,s)===0,Rg}var Pg,$E;function v2(){if($E)return Pg;$E=1;const e=Rs();return Pg=(n,r,s)=>e(n,r,s)!==0,Pg}var Ig,BE;function y0(){if(BE)return Ig;BE=1;const e=Rs();return Ig=(n,r,s)=>e(n,r,s)>=0,Ig}var Ag,VE;function b0(){if(VE)return Ag;VE=1;const e=Rs();return Ag=(n,r,s)=>e(n,r,s)<=0,Ag}var Og,UE;function y2(){if(UE)return Og;UE=1;const e=g2(),t=v2(),n=Vp(),r=y0(),s=v0(),i=b0();return Og=(a,l,u,c)=>{switch(l){case"===":return typeof a=="object"&&(a=a.version),typeof u=="object"&&(u=u.version),a===u;case"!==":return typeof a=="object"&&(a=a.version),typeof u=="object"&&(u=u.version),a!==u;case"":case"=":case"==":return e(a,u,c);case"!=":return t(a,u,c);case">":return n(a,u,c);case">=":return r(a,u,c);case"<":return s(a,u,c);case"<=":return i(a,u,c);default:throw new TypeError(`Invalid operator: ${l}`)}},Og}var Dg,zE;function Oie(){if(zE)return Dg;zE=1;const e=hr(),t=du(),{safeRe:n,t:r}=ud();return Dg=(i,o)=>{if(i instanceof e)return i;if(typeof i=="number"&&(i=String(i)),typeof i!="string")return null;o=o||{};let a=null;if(!o.rtl)a=i.match(o.includePrerelease?n[r.COERCEFULL]:n[r.COERCE]);else{const p=o.includePrerelease?n[r.COERCERTLFULL]:n[r.COERCERTL];let v;for(;(v=p.exec(i))&&(!a||a.index+a[0].length!==i.length);)(!a||v.index+v[0].length!==a.index+a[0].length)&&(a=v),p.lastIndex=v.index+v[1].length+v[2].length;p.lastIndex=-1}if(a===null)return null;const l=a[2],u=a[3]||"0",c=a[4]||"0",d=o.includePrerelease&&a[5]?`-${a[5]}`:"",f=o.includePrerelease&&a[6]?`+${a[6]}`:"";return t(`${l}.${u}.${c}${d}${f}`,o)},Dg}var Mg,HE;function Die(){if(HE)return Mg;HE=1;class e{constructor(){this.max=1e3,this.map=new Map}get(n){const r=this.map.get(n);if(r!==void 0)return this.map.delete(n),this.map.set(n,r),r}delete(n){return this.map.delete(n)}set(n,r){if(!this.delete(n)&&r!==void 0){if(this.map.size>=this.max){const i=this.map.keys().next().value;this.delete(i)}this.map.set(n,r)}return this}}return Mg=e,Mg}var Lg,jE;function Ps(){if(jE)return Lg;jE=1;const e=/\s+/g;class t{constructor(L,j){if(j=s(j),L instanceof t)return L.loose===!!j.loose&&L.includePrerelease===!!j.includePrerelease?L:new t(L.raw,j);if(L instanceof i)return this.raw=L.value,this.set=[[L]],this.formatted=void 0,this;if(this.options=j,this.loose=!!j.loose,this.includePrerelease=!!j.includePrerelease,this.raw=L.trim().replace(e," "),this.set=this.raw.split("||").map(G=>this.parseRange(G.trim())).filter(G=>G.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const G=this.set[0];if(this.set=this.set.filter(B=>!m(B[0])),this.set.length===0)this.set=[G];else if(this.set.length>1){for(const B of this.set)if(B.length===1&&y(B[0])){this.set=[B];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let L=0;L<this.set.length;L++){L>0&&(this.formatted+="||");const j=this.set[L];for(let G=0;G<j.length;G++)G>0&&(this.formatted+=" "),this.formatted+=j[G].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(L){const G=((this.options.includePrerelease&&p)|(this.options.loose&&v))+":"+L,B=r.get(G);if(B)return B;const q=this.options.loose,N=q?l[u.HYPHENRANGELOOSE]:l[u.HYPHENRANGE];L=L.replace(N,$(this.options.includePrerelease)),o("hyphen replace",L),L=L.replace(l[u.COMPARATORTRIM],c),o("comparator trim",L),L=L.replace(l[u.TILDETRIM],d),o("tilde trim",L),L=L.replace(l[u.CARETTRIM],f),o("caret trim",L);let se=L.split(" ").map(J=>b(J,this.options)).join(" ").split(/\s+/).map(J=>A(J,this.options));q&&(se=se.filter(J=>(o("loose invalid filter",J,this.options),!!J.match(l[u.COMPARATORLOOSE])))),o("range list",se);const z=new Map,U=se.map(J=>new i(J,this.options));for(const J of U){if(m(J))return[J];z.set(J.value,J)}z.size>1&&z.has("")&&z.delete("");const le=[...z.values()];return r.set(G,le),le}intersects(L,j){if(!(L instanceof t))throw new TypeError("a Range is required");return this.set.some(G=>S(G,j)&&L.set.some(B=>S(B,j)&&G.every(q=>B.every(N=>q.intersects(N,j)))))}test(L){if(!L)return!1;if(typeof L=="string")try{L=new a(L,this.options)}catch{return!1}for(let j=0;j<this.set.length;j++)if(K(this.set[j],L,this.options))return!0;return!1}}Lg=t;const n=Die(),r=new n,s=m0(),i=Up(),o=Bp(),a=hr(),{safeRe:l,t:u,comparatorTrimReplace:c,tildeTrimReplace:d,caretTrimReplace:f}=ud(),{FLAG_INCLUDE_PRERELEASE:p,FLAG_LOOSE:v}=$p(),m=M=>M.value==="<0.0.0-0",y=M=>M.value==="",S=(M,L)=>{let j=!0;const G=M.slice();let B=G.pop();for(;j&&G.length;)j=G.every(q=>B.intersects(q,L)),B=G.pop();return j},b=(M,L)=>(M=M.replace(l[u.BUILD],""),o("comp",M,L),M=C(M,L),o("caret",M),M=T(M,L),o("tildes",M),M=w(M,L),o("xrange",M),M=I(M,L),o("stars",M),M),k=M=>!M||M.toLowerCase()==="x"||M==="*",T=(M,L)=>M.trim().split(/\s+/).map(j=>_(j,L)).join(" "),_=(M,L)=>{const j=L.loose?l[u.TILDELOOSE]:l[u.TILDE];return M.replace(j,(G,B,q,N,se)=>{o("tilde",M,G,B,q,N,se);let z;return k(B)?z="":k(q)?z=`>=${B}.0.0 <${+B+1}.0.0-0`:k(N)?z=`>=${B}.${q}.0 <${B}.${+q+1}.0-0`:se?(o("replaceTilde pr",se),z=`>=${B}.${q}.${N}-${se} <${B}.${+q+1}.0-0`):z=`>=${B}.${q}.${N} <${B}.${+q+1}.0-0`,o("tilde return",z),z})},C=(M,L)=>M.trim().split(/\s+/).map(j=>R(j,L)).join(" "),R=(M,L)=>{o("caret",M,L);const j=L.loose?l[u.CARETLOOSE]:l[u.CARET],G=L.includePrerelease?"-0":"";return M.replace(j,(B,q,N,se,z)=>{o("caret",M,B,q,N,se,z);let U;return k(q)?U="":k(N)?U=`>=${q}.0.0${G} <${+q+1}.0.0-0`:k(se)?q==="0"?U=`>=${q}.${N}.0${G} <${q}.${+N+1}.0-0`:U=`>=${q}.${N}.0${G} <${+q+1}.0.0-0`:z?(o("replaceCaret pr",z),q==="0"?N==="0"?U=`>=${q}.${N}.${se}-${z} <${q}.${N}.${+se+1}-0`:U=`>=${q}.${N}.${se}-${z} <${q}.${+N+1}.0-0`:U=`>=${q}.${N}.${se}-${z} <${+q+1}.0.0-0`):(o("no pr"),q==="0"?N==="0"?U=`>=${q}.${N}.${se}${G} <${q}.${N}.${+se+1}-0`:U=`>=${q}.${N}.${se}${G} <${q}.${+N+1}.0-0`:U=`>=${q}.${N}.${se} <${+q+1}.0.0-0`),o("caret return",U),U})},w=(M,L)=>(o("replaceXRanges",M,L),M.split(/\s+/).map(j=>P(j,L)).join(" ")),P=(M,L)=>{M=M.trim();const j=L.loose?l[u.XRANGELOOSE]:l[u.XRANGE];return M.replace(j,(G,B,q,N,se,z)=>{o("xRange",M,G,B,q,N,se,z);const U=k(q),le=U||k(N),J=le||k(se),be=J;return B==="="&&be&&(B=""),z=L.includePrerelease?"-0":"",U?B===">"||B==="<"?G="<0.0.0-0":G="*":B&&be?(le&&(N=0),se=0,B===">"?(B=">=",le?(q=+q+1,N=0,se=0):(N=+N+1,se=0)):B==="<="&&(B="<",le?q=+q+1:N=+N+1),B==="<"&&(z="-0"),G=`${B+q}.${N}.${se}${z}`):le?G=`>=${q}.0.0${z} <${+q+1}.0.0-0`:J&&(G=`>=${q}.${N}.0${z} <${q}.${+N+1}.0-0`),o("xRange return",G),G})},I=(M,L)=>(o("replaceStars",M,L),M.trim().replace(l[u.STAR],"")),A=(M,L)=>(o("replaceGTE0",M,L),M.trim().replace(l[L.includePrerelease?u.GTE0PRE:u.GTE0],"")),$=M=>(L,j,G,B,q,N,se,z,U,le,J,be)=>(k(G)?j="":k(B)?j=`>=${G}.0.0${M?"-0":""}`:k(q)?j=`>=${G}.${B}.0${M?"-0":""}`:N?j=`>=${j}`:j=`>=${j}${M?"-0":""}`,k(U)?z="":k(le)?z=`<${+U+1}.0.0-0`:k(J)?z=`<${U}.${+le+1}.0-0`:be?z=`<=${U}.${le}.${J}-${be}`:M?z=`<${U}.${le}.${+J+1}-0`:z=`<=${z}`,`${j} ${z}`.trim()),K=(M,L,j)=>{for(let G=0;G<M.length;G++)if(!M[G].test(L))return!1;if(L.prerelease.length&&!j.includePrerelease){for(let G=0;G<M.length;G++)if(o(M[G].semver),M[G].semver!==i.ANY&&M[G].semver.prerelease.length>0){const B=M[G].semver;if(B.major===L.major&&B.minor===L.minor&&B.patch===L.patch)return!0}return!1}return!0};return Lg}var Fg,qE;function Up(){if(qE)return Fg;qE=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(">")))}}Fg=t;const n=m0(),{safeRe:r,t:s}=ud(),i=y2(),o=Bp(),a=hr(),l=Ps();return Fg}var Ng,WE;function zp(){if(WE)return Ng;WE=1;const e=Ps();return Ng=(n,r,s)=>{try{r=new e(r,s)}catch{return!1}return r.test(n)},Ng}var $g,GE;function Mie(){if(GE)return $g;GE=1;const e=Ps();return $g=(n,r)=>new e(n,r).set.map(s=>s.map(i=>i.value).join(" ").trim().split(" ")),$g}var Bg,KE;function Lie(){if(KE)return Bg;KE=1;const e=hr(),t=Ps();return Bg=(r,s,i)=>{let o=null,a=null,l=null;try{l=new t(s,i)}catch{return null}return r.forEach(u=>{l.test(u)&&(!o||a.compare(u)===-1)&&(o=u,a=new e(o,i))}),o},Bg}var Vg,YE;function Fie(){if(YE)return Vg;YE=1;const e=hr(),t=Ps();return Vg=(r,s,i)=>{let o=null,a=null,l=null;try{l=new t(s,i)}catch{return null}return r.forEach(u=>{l.test(u)&&(!o||a.compare(u)===1)&&(o=u,a=new e(o,i))}),o},Vg}var Ug,XE;function Nie(){if(XE)return Ug;XE=1;const e=hr(),t=Ps(),n=Vp();return Ug=(s,i)=>{s=new t(s,i);let o=new e("0.0.0");if(s.test(o)||(o=new e("0.0.0-0"),s.test(o)))return o;o=null;for(let a=0;a<s.set.length;++a){const l=s.set[a];let u=null;l.forEach(c=>{const d=new e(c.semver.version);switch(c.operator){case">":d.prerelease.length===0?d.patch++:d.prerelease.push(0),d.raw=d.format();case"":case">=":(!u||n(d,u))&&(u=d);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${c.operator}`)}}),u&&(!o||n(o,u))&&(o=u)}return o&&s.test(o)?o:null},Ug}var zg,QE;function $ie(){if(QE)return zg;QE=1;const e=Ps();return zg=(n,r)=>{try{return new e(n,r).range||"*"}catch{return null}},zg}var Hg,JE;function S0(){if(JE)return Hg;JE=1;const e=hr(),t=Up(),{ANY:n}=t,r=Ps(),s=zp(),i=Vp(),o=v0(),a=b0(),l=y0();return Hg=(c,d,f,p)=>{c=new e(c,p),d=new r(d,p);let v,m,y,S,b;switch(f){case">":v=i,m=a,y=o,S=">",b=">=";break;case"<":v=o,m=l,y=i,S="<",b="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(s(c,d,p))return!1;for(let k=0;k<d.set.length;++k){const T=d.set[k];let _=null,C=null;if(T.forEach(R=>{R.semver===n&&(R=new t(">=0.0.0")),_=_||R,C=C||R,v(R.semver,_.semver,p)?_=R:y(R.semver,C.semver,p)&&(C=R)}),_.operator===S||_.operator===b||(!C.operator||C.operator===S)&&m(c,C.semver))return!1;if(C.operator===b&&y(c,C.semver))return!1}return!0},Hg}var jg,ZE;function Bie(){if(ZE)return jg;ZE=1;const e=S0();return jg=(n,r,s)=>e(n,r,">",s),jg}var qg,eC;function Vie(){if(eC)return qg;eC=1;const e=S0();return qg=(n,r,s)=>e(n,r,"<",s),qg}var Wg,tC;function Uie(){if(tC)return Wg;tC=1;const e=Ps();return Wg=(n,r,s)=>(n=new e(n,s),r=new e(r,s),n.intersects(r,s)),Wg}var Gg,nC;function zie(){if(nC)return Gg;nC=1;const e=zp(),t=Rs();return Gg=(n,r,s)=>{const i=[];let o=null,a=null;const l=n.sort((f,p)=>t(f,p,s));for(const f of l)e(f,r,s)?(a=f,o||(o=f)):(a&&i.push([o,a]),a=null,o=null);o&&i.push([o,null]);const u=[];for(const[f,p]of i)f===p?u.push(f):!p&&f===l[0]?u.push("*"):p?f===l[0]?u.push(`<=${p}`):u.push(`${f} - ${p}`):u.push(`>=${f}`);const c=u.join(" || "),d=typeof r.raw=="string"?r.raw:String(r);return c.length<d.length?c:r},Gg}var Kg,rC;function Hie(){if(rC)return Kg;rC=1;const e=Ps(),t=Up(),{ANY:n}=t,r=zp(),s=Rs(),i=(d,f,p={})=>{if(d===f)return!0;d=new e(d,p),f=new e(f,p);let v=!1;e:for(const m of d.set){for(const y of f.set){const S=l(m,y,p);if(v=v||S!==null,S)continue e}if(v)return!1}return!0},o=[new t(">=0.0.0-0")],a=[new t(">=0.0.0")],l=(d,f,p)=>{if(d===f)return!0;if(d.length===1&&d[0].semver===n){if(f.length===1&&f[0].semver===n)return!0;p.includePrerelease?d=o:d=a}if(f.length===1&&f[0].semver===n){if(p.includePrerelease)return!0;f=a}const v=new Set;let m,y;for(const w of d)w.operator===">"||w.operator===">="?m=u(m,w,p):w.operator==="<"||w.operator==="<="?y=c(y,w,p):v.add(w.semver);if(v.size>1)return null;let S;if(m&&y){if(S=s(m.semver,y.semver,p),S>0)return null;if(S===0&&(m.operator!==">="||y.operator!=="<="))return null}for(const w of v){if(m&&!r(w,String(m),p)||y&&!r(w,String(y),p))return null;for(const P of f)if(!r(w,String(P),p))return!1;return!0}let b,k,T,_,C=y&&!p.includePrerelease&&y.semver.prerelease.length?y.semver:!1,R=m&&!p.includePrerelease&&m.semver.prerelease.length?m.semver:!1;C&&C.prerelease.length===1&&y.operator==="<"&&C.prerelease[0]===0&&(C=!1);for(const w of f){if(_=_||w.operator===">"||w.operator===">=",T=T||w.operator==="<"||w.operator==="<=",m){if(R&&w.semver.prerelease&&w.semver.prerelease.length&&w.semver.major===R.major&&w.semver.minor===R.minor&&w.semver.patch===R.patch&&(R=!1),w.operator===">"||w.operator===">="){if(b=u(m,w,p),b===w&&b!==m)return!1}else if(m.operator===">="&&!r(m.semver,String(w),p))return!1}if(y){if(C&&w.semver.prerelease&&w.semver.prerelease.length&&w.semver.major===C.major&&w.semver.minor===C.minor&&w.semver.patch===C.patch&&(C=!1),w.operator==="<"||w.operator==="<="){if(k=c(y,w,p),k===w&&k!==y)return!1}else if(y.operator==="<="&&!r(y.semver,String(w),p))return!1}if(!w.operator&&(y||m)&&S!==0)return!1}return!(m&&T&&!y&&S!==0||y&&_&&!m&&S!==0||R||C)},u=(d,f,p)=>{if(!d)return f;const v=s(d.semver,f.semver,p);return v>0?d:v<0||f.operator===">"&&d.operator===">="?f:d},c=(d,f,p)=>{if(!d)return f;const v=s(d.semver,f.semver,p);return v<0?d:v>0||f.operator==="<"&&d.operator==="<="?f:d};return Kg=i,Kg}var Yg,sC;function jie(){if(sC)return Yg;sC=1;const e=ud(),t=$p(),n=hr(),r=m2(),s=du(),i=Sie(),o=wie(),a=_ie(),l=kie(),u=xie(),c=Eie(),d=Cie(),f=Tie(),p=Rs(),v=Rie(),m=Pie(),y=g0(),S=Iie(),b=Aie(),k=Vp(),T=v0(),_=g2(),C=v2(),R=y0(),w=b0(),P=y2(),I=Oie(),A=Up(),$=Ps(),K=zp(),M=Mie(),L=Lie(),j=Fie(),G=Nie(),B=$ie(),q=S0(),N=Bie(),se=Vie(),z=Uie(),U=zie(),le=Hie();return Yg={parse:s,valid:i,clean:o,inc:a,diff:l,major:u,minor:c,patch:d,prerelease:f,compare:p,rcompare:v,compareLoose:m,compareBuild:y,sort:S,rsort:b,gt:k,lt:T,eq:_,neq:C,gte:R,lte:w,cmp:P,coerce:I,Comparator:A,Range:$,satisfies:K,toComparators:M,maxSatisfying:L,minSatisfying:j,minVersion:G,validRange:B,outside:q,gtr:N,ltr:se,intersects:z,simplifyRange:U,subset:le,SemVer:n,re:e.re,src:e.src,tokens:e.t,SEMVER_SPEC_VERSION:t.SEMVER_SPEC_VERSION,RELEASE_TYPES:t.RELEASE_TYPES,compareIdentifiers:r.compareIdentifiers,rcompareIdentifiers:r.rcompareIdentifiers},Yg}var Ru=jie();const qie={key:0},Wie={key:1},Gie={key:0},Kie=Me({__name:"SoftwareUpgradeSettings",setup(e){const t=H(""),n=H(!0),r=H(!1),s=H(!1),i=H(""),o=H(""),a=H(CM),l=H(),u=H(),c=H(),d=H(!1),f=H([]);gt(async()=>{await p();const w=await jo.getVersion();i.value=w.version,o.value=w.monsterPi?.trim()||""});async function p(){n.value=!0,t.value="",r.value=!1;try{const w=await jo.getGithubRateLimit();if(w.rate.remaining===0){const I=new Date(w.rate.reset).toLocaleTimeString(),A=w.rate.reset*1e3-Date.now(),$=Math.ceil(A/6e4);t.value=`Server has reached a rate limit of the Github API. This limit will be reset at ${I} (in ${$} minutes)`,n.value=!1,r.value=!0;return}}catch{n.value=!1;return}try{const w=await jo.getClientReleases();l.value=w.current,u.value=w.minimum,f.value=w.releases}catch(w){t.value="An error occurred loading the releases: "+w.message}finally{n.value=!1}}const v=O(()=>f.value.filter(w=>{const P=Ru.minor(w.tag_name)===Ru.minor(u.value.tag_name),I=k(w),A=w.draft;return P&&(y()||d.value||!I)&&!A})),m=O(()=>y());function y(){const w=l.value;return k(w)}function S(w){return C(w)||!_(w,l.value)||T(w)}function b(w){const P=k(w)?`${w.tag_name}, unstable`:w.tag_name;return C(w)?`${P}, currently installed`:T(w)?`${P}, below minimum`:_(w,l.value)?P:`${P}, downgrade not allowed`}function k(w){return w?.tag_name?.length?w.prerelease||w.tag_name.includes("rc")||w.tag_name.includes("unstable"):!1}function T(w){return Ru.compare(w.tag_name,u.value.tag_name)===-1}function _(w,P){if(!P)throw new Error("No current release is known, cannot compare.");return s.value?!0:Ru.compare(w.tag_name,P.tag_name)!==-1&&Ru.compare(w.tag_name,u.value.tag_name)!==-1}function C(w){return w.tag_name===l.value?.tag_name}async function R(w){confirm("Are you sure? This might cause breaking changes, if the server is outdated")&&(await jo.updateClientDistGithub(w,s.value),location.reload())}return(w,P)=>(F(),ee(mt,null,{default:g(()=>[h(ur,{color:"primary"},{default:g(()=>[h(st,null,{default:g(()=>[h(Z,null,{default:g(()=>[...P[5]||(P[5]=[x("upgrade",-1)])]),_:1})]),_:1}),h(Tn,null,{default:g(()=>[...P[6]||(P[6]=[x(" Software Upgrade",-1)])]),_:1})]),_:1}),h(Dt,{lines:"three"},{default:g(()=>[h(Ne,null,{default:g(()=>[h(it,null,{default:g(()=>[...P[7]||(P[7]=[x(" Current versions in use:",-1)])]),_:1}),h(pt,null,{default:g(()=>[x(" Your server's version is: "+re(i.value),1)]),_:1}),h(pt,null,{default:g(()=>[x(" Your client's version is: "+re(a.value),1)]),_:1}),h(pt,null,{default:g(()=>[o.value?(F(),ge("div",qie,[P[8]||(P[8]=x(" MonsterPi: ",-1)),P[9]||(P[9]=E("div",null,"Your MonsterPi version is:",-1)),x(" "+re(o.value),1)])):(F(),ge("div",Wie,[...P[10]||(P[10]=[x(" MonsterPi: ",-1),E("div",null,"No MonsterPi distro was detected.",-1)])]))]),_:1})]),_:1})]),_:1}),h(en),h(Dt,{lines:"three",subheader:""},{default:g(()=>[h(Ne,null,{default:g(()=>[h(it,null,{default:g(()=>[...P[11]||(P[11]=[x(" Server upgrade",-1)])]),_:1}),h(pt,null,{default:g(()=>[...P[12]||(P[12]=[x(" Please visit ",-1),E("a",{href:"https://docs.fdm-monster.net/docs/installing/"}," the installation documentation ",-1),x(" for instructions on how to upgrade the server. ",-1)])]),_:1})]),_:1})]),_:1}),h(en),h(Dt,{lines:"three"},{default:g(()=>[h(Ne,null,{default:g(()=>[h(it,null,{default:g(()=>[...P[13]||(P[13]=[x(" Client upgrade",-1)])]),_:1}),h(pt,null,{default:g(()=>[...P[14]||(P[14]=[x(" Please visit ",-1),E("a",{href:"https://docs.fdm-monster.net/docs/configuration/updating_client_bundle"}," the installation documentation ",-1),x(" for instructions on how to upgrade the client bundle. ",-1)])]),_:1}),h(pt,null,{default:g(()=>[...P[15]||(P[15]=[x(" Upgrade the client webapp for quickly retrieving small fixes and features ",-1)])]),_:1})]),_:1}),h(Ne,null,{default:g(()=>[h(it,null,{default:g(()=>[...P[16]||(P[16]=[x(" Select a release to upgrade to:",-1)])]),_:1}),h(pt,{class:"mt-2"},{default:g(()=>[x(" Minimum required version: "+re(u.value?.tag_name),1)]),_:1}),n.value?(F(),ge("span",Gie,[h(ln,null,{default:g(()=>[...P[17]||(P[17]=[x(" Loading releases... ",-1)])]),_:1})])):fe("",!0),!n.value&&!v.value?.length?(F(),ee(ln,{key:1},{default:g(()=>[...P[18]||(P[18]=[x(" No releases to show. ",-1)])]),_:1})):fe("",!0),h(WO,{modelValue:c.value,"onUpdate:modelValue":P[0]||(P[0]=I=>c.value=I)},{default:g(()=>[(F(!0),ge(Ie,null,Ht(v.value,I=>(F(),ee(fy,{key:I.tag_name,disabled:S(I),label:b(I),value:I.tag_name},null,8,["disabled","label","value"]))),128))]),_:1},8,["modelValue"]),E("div",null,[d.value?(F(),ee(ln,{key:0,color:"primary","max-width":"500px"},{default:g(()=>[...P[19]||(P[19]=[x(" You are viewing prereleases, please install such versions at your own risk! ",-1)])]),_:1})):fe("",!0)]),E("div",null,[h(cn,{modelValue:s.value,"onUpdate:modelValue":P[1]||(P[1]=I=>s.value=I),label:"Allow downgrade"},null,8,["modelValue"]),h(cn,{modelValue:d.value,"onUpdate:modelValue":P[2]||(P[2]=I=>d.value=I),disabled:m.value,label:m.value?"Show prerelease versions (Currently already on prerelease version)":"Show prerelease versions"},null,8,["modelValue","disabled","label"])]),h(te,{class:"mt-2 mr-4",color:"secondary",onClick:P[3]||(P[3]=I=>p())},{default:g(()=>[...P[20]||(P[20]=[x(" Reload release version list ",-1)])]),_:1}),h(te,{disabled:!c.value?.length||c.value===l.value?.tag_name,class:"mt-2",color:"primary",variant:"flat",onClick:P[4]||(P[4]=I=>R(c.value))},{default:g(()=>[h(Z,null,{default:g(()=>[...P[21]||(P[21]=[x("upgrade",-1)])]),_:1}),P[22]||(P[22]=x(" Upgrade/downgrade client ",-1))]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1}))}}),Yie=Me({__name:"DiagnosticsSettings",setup(e){const t=Rt(),n=Ts(),r=H(!1);gt(async()=>{await n.loadSettings(),r.value=n.serverSettings?.sentryDiagnosticsEnabled||!1});async function s(){await pn.setSentryDiagnosticsSettings(r.value),WD(r.value)}async function i(){const l=`Test Error ${Date.now()} Sentry enabled: ${r.value}`;try{throw new Error(l)}catch(u){Gs(u),t.openInfoMessage({title:"Test report was sent",subtitle:`Content: ${l}`})}}async function o(){await gh.downloadLogDump()}async function a(){await gh.clearLogFilesOlderThanWeek(),t.openInfoMessage({title:"Action success",subtitle:"Log files older than a week have been deleted"})}return(l,u)=>(F(),ee(mt,null,{default:g(()=>[h(ur,{color:"primary"},{default:g(()=>[h(st,null,{default:g(()=>[h(Z,null,{default:g(()=>[...u[5]||(u[5]=[x("bug_report",-1)])]),_:1})]),_:1}),h(Tn,null,{default:g(()=>[...u[6]||(u[6]=[x(" Diagnostics",-1)])]),_:1})]),_:1}),h(Dt,{lines:"three",subheader:""},{default:g(()=>[h(Cr,null,{default:g(()=>[...u[7]||(u[7]=[x(" Diagnostics to provide bug reports to the developers of this software ",-1)])]),_:1}),h(Ne,null,{default:g(()=>[h(it,null,{default:g(()=>[...u[8]||(u[8]=[x(" Remote Sentry diagnostic reports: ",-1)])]),_:1}),h(pt,null,{default:g(()=>[h(cn,{modelValue:r.value,"onUpdate:modelValue":u[0]||(u[0]=c=>r.value=c),label:"Enable remote Sentry diagnostic reports"},null,8,["modelValue"])]),_:1}),h(pt,null,{default:g(()=>[h(te,{color:"primary",onClick:u[1]||(u[1]=c=>s())},{default:g(()=>[h(Z,{class:"pr-2"},{default:g(()=>[...u[9]||(u[9]=[x("save",-1)])]),_:1}),u[10]||(u[10]=x(" Save ",-1))]),_:1}),h(te,{color:"secondary",onClick:u[2]||(u[2]=c=>i())},{default:g(()=>[h(Z,{class:"pr-2"},{default:g(()=>[...u[11]||(u[11]=[x("bug_report",-1)])]),_:1}),u[12]||(u[12]=x(" Test Error ",-1))]),_:1})]),_:1})]),_:1}),h(en),h(Ne,null,{default:g(()=>[h(it,null,{default:g(()=>[...u[13]||(u[13]=[x(" Logs Dump",-1)])]),_:1}),h(pt,null,{default:g(()=>[...u[14]||(u[14]=[x(" Download a .zip file containing all logs from the server ",-1)])]),_:1}),h(pt,null,{default:g(()=>[u[17]||(u[17]=E("br",null,null,-1)),h(te,{color:"primary",onClick:u[3]||(u[3]=c=>o())},{default:g(()=>[h(Z,null,{default:g(()=>[...u[15]||(u[15]=[x("download",-1)])]),_:1}),u[16]||(u[16]=x(" Download Log Files (.zip) ",-1))]),_:1})]),_:1})]),_:1}),h(Ne,null,{default:g(()=>[h(it,null,{default:g(()=>[...u[18]||(u[18]=[x(" Clear log files",-1)])]),_:1}),h(pt,null,{default:g(()=>[u[21]||(u[21]=E("br",null,null,-1)),h(te,{color:"default",onClick:u[4]||(u[4]=c=>a())},{default:g(()=>[h(Z,null,{default:g(()=>[...u[19]||(u[19]=[x("download",-1)])]),_:1}),u[20]||(u[20]=x(" Clear log files older than a week ",-1))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}))}});class Xie extends fr{static async getCompletions(){const t=`${ae.printCompletionRoute}`;return await this.get(t)}}const b2=Me({__name:"PrintStatistics",setup(e){const t=H([]),n=H([]),r=H(""),s=Vt(),i=Li();gt(async()=>{await o()}),we([()=>r.value],()=>{u()});const o=async()=>{t.value=[],n.value=[],t.value=await Xie.getCompletions(),u()},a=c=>s.printer(c),l=c=>i.floorOfPrinter(c),u=()=>{const c=s.printers.map(p=>p.id),d=c.length?t.value.filter(p=>c.includes(p.printerId)):t.value,f=r.value?.length?d.filter(p=>{const v=s.printers.find(m=>m.id===p.printerId);return v?(v.name+v.printerURL).toLowerCase().includes(r.value.toLowerCase()):!1}):d;n.value=f.sort((p,v)=>p.failureCount===v.failureCount?p.printCount>v.printCount?-1:1:p.failureCount>v.failureCount?-1:1)};return(c,d)=>(F(),ee(Ec,{height:"100%",width:"100%"},{default:g(()=>[h(Bn,null,{default:g(()=>[h(Je,null,{default:g(()=>[h(Ve,null,{default:g(()=>[h(Z,null,{default:g(()=>[...d[2]||(d[2]=[x("filter_list",-1)])]),_:1}),d[3]||(d[3]=x(" Filter by printer name (optional) ",-1))]),_:1}),h(Ve,null,{default:g(()=>[h(et,{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}),h(ln,null,{default:g(()=>[d[5]||(d[5]=x(" Please reload here if you want updated results: ",-1)),h(te,{color:"primary",size:"x-small",onClick:d[1]||(d[1]=f=>o())},{default:g(()=>[...d[4]||(d[4]=[x(" Reload ",-1)])]),_:1})]),_:1}),h(My,{dark:""},{default:g(()=>[d[11]||(d[11]=E("thead",null,[E("tr",null,[E("th",{class:"text-left"},"Printer name"),E("th",{class:"text-left"},"Floor"),E("th",{class:"text-left"},"Fail/ Success/ Total"),E("th",{class:"text-left"},"Last success"),E("th",{class:"text-left"},"Last failure"),E("th",{class:"text-left"},"Successes (week/48H/24H)"),E("th",{class:"text-left"},"Failures (week/48H/24H)")])],-1)),E("tbody",null,[(F(!0),ge(Ie,null,Ht(n.value,f=>(F(),ge("tr",{key:f.printerId},[E("td",null,re(a(f.printerId)?.name??"?"),1),E("td",null,re(l(f.printerId)?.name??"?"),1),E("td",null,[x(" × "+re(f.failureCount)+" / 🗸 "+re(f.successCount)+" ",1),E("strong",null," ~"+re(f.printCount),1)]),E("td",null,re(Date.now()-f.lastSuccess?.createdAt||"-"),1),E("td",null,[h(Ze,{location:"bottom"},rT({default:g(()=>[E("span",null,[x(re(f.lastFailure?.status||"-")+" ",1),d[7]||(d[7]=E("br",null,null,-1)),x(" "+re(f.lastFailure?.createdAt)+" ",1),d[8]||(d[8]=E("br",null,null,-1)),E("small",null,re(f.lastFailure?.fileName),1),d[9]||(d[9]=E("br",null,null,-1)),E("strong",null,re(f.lastFailure?.completionLog),1),d[10]||(d[10]=E("br",null,null,-1))])]),_:2},[f.lastFailure?.status?{name:"activator",fn:g(({props:p})=>[h(Z,de({ref_for:!0},p),{default:g(()=>[...d[6]||(d[6]=[x("info",-1)])]),_:1},16)]),key:"0"}:void 0]),1024)]),E("td",null,re(f.successEventsLastWeek)+" "+re(f.successEventsLast48H)+" "+re(f.successEventsLast24H),1),E("td",null,re(f.failureEventsLastWeek)+" "+re(f.failureEventsLast48H)+" "+re(f.failureEventsLast24H),1)]))),128))])]),_:1})]),_:1}))}}),Qie=Me({name:"PrintStatisticsView",components:{PrintStatistics:b2}});function Jie(e,t,n,r,s,i){const o=b2;return F(),ee(Bn,null,{default:g(()=>[h(o)]),_:1})}const Zie=Ia(Qie,[["render",Jie]]),eoe=Me({__name:"ExperimentalSettings",setup(e){const t=H(!1),n=H(!1),r=H(!1),s=H(!1);async function i(){const u=await pn.getSettings();t.value=u.server.experimentalMoonrakerSupport,n.value=u.server.experimentalPrusaLinkSupport,r.value=u.server.experimentalTypeormSupport,s.value=u.server.experimentalClientSupport}gt(async()=>{await i()});const o=async()=>{await pn.updateExperimentalMoonrakerSupport(t.value),await pn.updateExperimentalPrusaLinkSupport(n.value),await pn.updateExperimentalClientSupport(s.value),await i()},a=async()=>{await pn.updateExperimentalMoonrakerSupport(!1),await pn.updateExperimentalPrusaLinkSupport(!1),await pn.updateExperimentalClientSupport(!1),await i()},l=async()=>{await pn.updateExperimentalClientSupport(s.value),window.location.reload()};return(u,c)=>(F(),ee(Je,null,{default:g(()=>[h(Ve,{cols:"12"},{default:g(()=>[h(mt,null,{default:g(()=>[h(Zt,null,{default:g(()=>[...c[4]||(c[4]=[E("h2",null,"Settings",-1)])]),_:1}),h(Gt,null,{default:g(()=>[h(Je,null,{default:g(()=>[h(Ve,{cols:"12",md:"6"},{default:g(()=>[h(mt,null,{default:g(()=>[h(Zt,null,{default:g(()=>[E("h3",null,[c[7]||(c[7]=x(" Experimental Features ",-1)),h(Ze,{bottom:""},{activator:g(({props:d})=>[h(Z,de({class:"help-icon"},d),{default:g(()=>[...c[5]||(c[5]=[x("help_outline",-1)])]),_:1},16)]),default:g(()=>[c[6]||(c[6]=E("span",{class:"tooltip-content"}," Moonraker support is currently in beta, use at your own risk. ",-1))]),_:1})])]),_:1}),h(Gt,null,{default:g(()=>[h(cn,{modelValue:t.value,"onUpdate:modelValue":c[0]||(c[0]=d=>t.value=d),label:"Enable Experimental Moonraker Support","hide-details":""},{label:g(()=>[...c[8]||(c[8]=[E("span",null,"Enable Experimental Moonraker Support",-1)])]),_:1},8,["modelValue"]),h(cn,{modelValue:n.value,"onUpdate:modelValue":c[1]||(c[1]=d=>n.value=d),label:"Enable Experimental PrusaLink Support","hide-details":""},{label:g(()=>[...c[9]||(c[9]=[E("span",null,"Enable Experimental PrusaLink Support",-1)])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),h(Ve,{cols:"12",md:"6"},{default:g(()=>[h(mt,null,{default:g(()=>[h(Zt,null,{default:g(()=>[E("h3",null,[c[12]||(c[12]=x(" Database Settings ",-1)),h(Ze,{bottom:""},{activator:g(({props:d})=>[h(Z,Jg(Mf(d)),{default:g(()=>[...c[10]||(c[10]=[x("help_outline",-1)])]),_:1},16)]),default:g(()=>[c[11]||(c[11]=E("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}),h(Gt,null,{default:g(()=>[h(cn,{modelValue:r.value,"onUpdate:modelValue":c[2]||(c[2]=d=>r.value=d),label:"Enable TypeORM Support","hide-details":"",disabled:""},{label:g(()=>[...c[13]||(c[13]=[E("span",null,"Enable TypeORM Support",-1)])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),h(Ve,{cols:"12",md:"6"},{default:g(()=>[h(mt,null,{default:g(()=>[h(Zt,null,{default:g(()=>[E("h3",null,[c[16]||(c[16]=x(" Experimental Features ",-1)),h(Ze,{bottom:""},{activator:g(({props:d})=>[h(Z,de({class:"help-icon"},d),{default:g(()=>[...c[14]||(c[14]=[x("help_outline",-1)])]),_:1},16)]),default:g(()=>[c[15]||(c[15]=E("span",{class:"tooltip-content"}," Enables the next version of the FDM Monster UI (experimental). ",-1))]),_:1})])]),_:1}),h(Gt,null,{default:g(()=>[h(cn,{modelValue:s.value,"onUpdate:modelValue":c[3]||(c[3]=d=>s.value=d),label:"Enable Next Client Version (Experimental)","hide-details":"",onChange:l},{label:g(()=>[...c[17]||(c[17]=[E("span",null,"Enable Next Client Version (Experimental)",-1)])]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),h(An,null,{default:g(()=>[h(yn),h(te,{color:"primary",onClick:o},{default:g(()=>[...c[18]||(c[18]=[x("Save Settings",-1)])]),_:1}),h(te,{onClick:a},{default:g(()=>[...c[19]||(c[19]=[x("Reset to Default",-1)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}))}}),Dn={requiresAuth:!0},Xg={requiresAuth:!1},w0=OX({history:cX("/"),routes:[{path:"/",name:Bt.Home,meta:Dn,component:YJ},{path:"/first-time-setup",name:Bt.FirstTimeSetup,meta:Xg,component:pie},{path:"/login",name:Bt.Login,meta:Xg,component:Xse},{path:"/registration",name:Bt.Registration,meta:Xg,component:Zse},{path:"/printers",name:Bt.PrintersView,meta:Dn,component:uee},{path:"/cameras",name:Bt.CameraGridView,meta:Dn,component:tie},{path:"/settings",component:dee,meta:Dn,children:[{path:"",meta:Dn,redirect:"/settings/grid"},{path:"account",meta:Dn,component:vie},{path:"server-protection",meta:Dn,component:bie},{path:"grid",meta:Dn,component:yie},{path:"floors",meta:Dn,component:Ree},{path:"user-management",meta:Dn,component:kee},{path:"printer",meta:Dn,component:xee},{path:"emergency-commands",meta:Dn,component:Nse},{path:"software-upgrade",meta:Dn,component:Kie},{path:"diagnostics",meta:Dn,component:Yie},{path:"experimental",meta:Dn,component:eoe}]},{path:"/statistics",name:Bt.PrintStatistics,meta:Dn,component:Zie},{path:"/about",name:"About",component:Oee},{path:"/permission-denied",name:Bt.PermissionDenied,meta:Dn,component:qse},{path:"/:pathMatch(.*)*",name:"NotFound",component:Bse}]});w0.beforeEach(async(e,t,n)=>{const r=Zr();if(!e?.meta?.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=${e?.meta?.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 toe={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"},noe={component:e=>lr(a$,{...e,class:"material-icons"})},roe={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"},soe={component:e=>lr(dR,{...e,class:"mdi"})};function ioe(){return{svg:{component:cR},class:{component:dR}}}function ooe(e){const t=ioe(),n=e?.defaultSet??"mdi";return n==="mdi"&&!t.mdi&&(t.mdi=soe),Xn({defaultSet:n,sets:t,aliases:{...roe,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)}function S2(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{blueprint:t,...n}=e,r=Xn(t,n),{aliases:s={},components:i={},directives:o={}}=r,a=la();return a.run(()=>{const l=FN(r.defaults),u=Q$(r.display,r.ssr),c=e$(r.theme),d=ooe(r.icons),f=m$(r.locale),p=A7(r.date,f),v=NW(r.goTo,f);function m(S){for(const k in o)S.directive(k,o[k]);for(const k in i)S.component(k,i[k]);for(const k in s)S.component(k,Bl({...s[k],name:k,aliasName:s[k].name}));const b=la();if(b.run(()=>{c.install(S)}),S.onUnmount(()=>b.stop()),S.provide(ml,l),S.provide(Ev,u),S.provide(uc,c),S.provide(bv,d),S.provide(Hf,f),S.provide(I7,p.options),S.provide(pk,p.instance),S.provide(YA,v),kt&&r.ssr)if(S.$nuxt)S.$nuxt.hook("app:suspense:resolve",()=>{u.update()});else{const{mount:k}=S;S.mount=function(){const T=k(...arguments);return ot(()=>u.update()),S.mount=k,T}}S.mixin({computed:{$vuetify(){return on({defaults:za.call(this,ml),display:za.call(this,Ev),theme:za.call(this,uc),icons:za.call(this,bv),locale:za.call(this,Hf),date:za.call(this,pk)})}}})}function y(){a.stop()}return{install:m,unmount:y,defaults:l,display:u,theme:c,icons:d,locale:f,date:p,goTo:v}})}const aoe="3.11.4";S2.version=aoe;function za(e){const t=this.$,n=t.parent?.provides??t.vnode.appContext?.provides;if(n&&e in n)return n[e]}const loe=S2({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:toe,sets:{md:noe}}}),uoe=UF();function coe(e){e.use(loe).use(nY).use(uoe)}const iC=(e,t,n)=>{const r=Vt(),s=QS(),i=Rt();if(t?.length){const o=t.length===1,a=t[0];e.ondrop=async l=>{l.preventDefault(),e.style.border=Rh;const u=l.dataTransfer?.files;if(!u?.length)return;const c=[...Array.from(u)];let d=[];if(o){const f=c.length===1?c[0].name:null;console.debug("Single printer upload mode",t.length,c.length,f),d=$J(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 f=c[0];d=JD(t,f,!0)}s.queueUploads(d),r.clearSelectedPrinters()}}else e.ondrop=async o=>{o.preventDefault(),e.style.border=Rh,i.openInfoMessage({title:"No action performed",subtitle:"Please select one or more printers",warning:!0})}},Rh="1px solid #2b2a27",doe="background-color 0.5s ease",oC="1px solid red";function foe(){return{mounted:(e,t,n)=>{e.style.border=Rh,e.style.transition=doe,e.ondragenter=r=>{r.preventDefault(),e.style.border=oC},e.ondragover=r=>{r.preventDefault(),e.style.border=oC},e.ondragleave=r=>{r.preventDefault(),e.style.border=Rh},iC(e,t.value?.printers,n.appContext)},beforeUpdate:(e,t,n)=>{iC(e,t.value,n.appContext)}}}const Qg="1px solid #2b2a27",hoe="1px solid gray",aC=(e,t,n)=>{const r=t?.printerSet,s=Li();if(r){e.ondrop=null,e.ondragover=null,e.ondragleave=null;return}e.style.border=Qg,e.ondrop=async i=>{if(e.style.border=Qg,i.preventDefault(),!i.dataTransfer)return;const o=i.dataTransfer.getData("text"),a=JSON.parse(o);if(!RJ(a)){console.debug("Drop not recognized",a);return}const u=s.selectedFloor?.id;if(!u)throw new Error("Floor is not set");const c=a.printerId;if(!c)throw new Error("PrinterId was not provided");await Wr.addPrinterToFloor(u,{printerId:c,x:t.x,y:t.y})},e.ondragover=i=>{i?.dataTransfer&&(i.dataTransfer&&Array.from(i.dataTransfer.items).filter(o=>o.kind==="file").length||(e.style.border=hoe,i.preventDefault()))},e.ondragleave=i=>{e.style.border=Qg,i.preventDefault()}};function poe(){return{mounted:(e,t,n)=>{aC(e,t.value,n.appContext)},beforeUpdate:(e,t,n)=>{aC(e,t.value,n.appContext)}}}const ko=$F(gJ);console.log("[DEV: false][PROD: true]","0.0.24");pW({app:ko,dsn:"https://f64683e8d1cb4ac291434993cff1bf9b@o4503975545733120.ingest.sentry.io/4503975546912768",integrations:[vW({router:w0}),D6()],release:"0.0.24",environment:"production",enabled:!0,tracesSampleRate:1,replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1});ko.config.errorHandler=e=>{if(e instanceof dP){console.error(`An error was caught [${e.name}]:
55
+ ${e.message}
56
+ ${e.config?.url}
57
+ ${e.stack}`),Rt().openErrorMessage({title:"An error occurred",subtitle:e.message,timeout:5e3});return}else console.error(`An error was caught [${e.name}]:
58
+ ${e.message}
59
+ ${e.stack}`);Rt().openErrorMessage({title:"An error occurred",subtitle:e.message,timeout:5e3}),Gs(e)};ko.directive("drop-upload",foe());ko.directive("drop-printer-position",poe());coe(ko);ko.provide("appConstants",NX());ko.use(w0);ko.mount("#app");
60
+ //# sourceMappingURL=index-DlsW6Z1X.js.map