@fdm-monster/client-next 0.0.12 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.yarn/install-state.gz +0 -0
- package/RELEASE_NOTES.MD +20 -1
- package/dist/assets/{index-CYOIRHnM.css → index-C8Fdk8eZ.css} +1 -1
- package/dist/assets/index-CSQmSrik.js +90 -0
- package/dist/assets/index-CSQmSrik.js.map +1 -0
- package/dist/index.html +2 -2
- package/package.json +1 -1
- package/dist/assets/index-gnyRPCyk.js +0 -90
- package/dist/assets/index-gnyRPCyk.js.map +0 -1
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
var SD=Object.defineProperty;var _D=(e,t,n)=>t in e?SD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ge=(e,t,n)=>(_D(e,typeof t!="symbol"?t+"":t,n),n),Bm=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var j=(e,t,n)=>(Bm(e,t,"read from private field"),n?n.call(e):t.get(e)),Ne=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Me=(e,t,n,r)=>(Bm(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var Xd=(e,t,n,r)=>({set _(s){Me(e,t,s,n)},get _(){return j(e,t,r)}}),nt=(e,t,n)=>(Bm(e,t,"access private method"),n);(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="8834dcbe-5e7c-4bf3-bcd1-39b59c5aa1a0",e._sentryDebugIdIdentifier="sentry-dbid-8834dcbe-5e7c-4bf3-bcd1-39b59c5aa1a0")}catch{}})();var kD=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};kD.SENTRY_RELEASE={id:"3f22fbd410af7b768593bdcb131c75bc88b08d3a"};(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();/**
|
|
2
|
-
* @vue/shared v3.5.13
|
|
3
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
|
-
* @license MIT
|
|
5
|
-
**//*! #__NO_SIDE_EFFECTS__ */function ub(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const $t={},Cl=[],ri=()=>{},xD=()=>!1,Ep=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),cb=e=>e.startsWith("onUpdate:"),pn=Object.assign,db=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},ED=Object.prototype.hasOwnProperty,Ct=(e,t)=>ED.call(e,t),je=Array.isArray,Tl=e=>Cp(e)==="[object Map]",OE=e=>Cp(e)==="[object Set]",Qe=e=>typeof e=="function",rn=e=>typeof e=="string",Ui=e=>typeof e=="symbol",Gt=e=>e!==null&&typeof e=="object",ME=e=>(Gt(e)||Qe(e))&&Qe(e.then)&&Qe(e.catch),DE=Object.prototype.toString,Cp=e=>DE.call(e),CD=e=>Cp(e).slice(8,-1),$E=e=>Cp(e)==="[object Object]",fb=e=>rn(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,dc=ub(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Tp=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},TD=/-(\w)/g,Pr=Tp(e=>e.replace(TD,(t,n)=>n?n.toUpperCase():"")),RD=/\B([A-Z])/g,Do=Tp(e=>e.replace(RD,"-$1").toLowerCase()),li=Tp(e=>e.charAt(0).toUpperCase()+e.slice(1)),Um=Tp(e=>e?`on${li(e)}`:""),wo=(e,t)=>!Object.is(e,t),Wf=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},LE=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},sv=e=>{const t=parseFloat(e);return isNaN(t)?e:t},PD=e=>{const t=rn(e)?Number(e):NaN;return isNaN(t)?e:t};let IS;const Rp=()=>IS||(IS=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function ii(e){if(je(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],s=rn(r)?MD(r):ii(r);if(s)for(const i in s)t[i]=s[i]}return t}else if(rn(e)||Gt(e))return e}const ID=/;(?![^(]*\))/g,AD=/:([^]+)/,OD=/\/\*[^]*?\*\//g;function MD(e){const t={};return e.replace(OD,"").split(ID).forEach(n=>{if(n){const r=n.split(AD);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function ja(e){let t="";if(rn(e))t=e;else if(je(e))for(let n=0;n<e.length;n++){const r=ja(e[n]);r&&(t+=r+" ")}else if(Gt(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function iv(e){if(!e)return null;let{class:t,style:n}=e;return t&&!rn(t)&&(e.class=ja(t)),n&&(e.style=ii(n)),e}const DD="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",$D=ub(DD);function FE(e){return!!e||e===""}const NE=e=>!!(e&&e.__v_isRef===!0),ie=e=>rn(e)?e:e==null?"":je(e)||Gt(e)&&(e.toString===DE||!Qe(e.toString))?NE(e)?ie(e.value):JSON.stringify(e,VE,2):String(e),VE=(e,t)=>NE(t)?VE(e,t.value):Tl(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,s],i)=>(n[Hm(r,i)+" =>"]=s,n),{})}:OE(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Hm(n))}:Ui(t)?Hm(t):Gt(t)&&!je(t)&&!$E(t)?String(t):t,Hm=(e,t="")=>{var n;return Ui(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
|
|
6
|
-
* @vue/reactivity v3.5.13
|
|
7
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
8
|
-
* @license MIT
|
|
9
|
-
**/let ur;class BE{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=ur,!t&&ur&&(this.index=(ur.scopes||(ur.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=ur;try{return ur=this,t()}finally{ur=n}}}on(){ur=this}off(){ur=this.parent}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 _d(e){return new BE(e)}function Pp(){return ur}function yn(e,t=!1){ur&&ur.cleanups.push(e)}let Ut;const zm=new WeakSet;class UE{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,ur&&ur.active&&ur.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,zm.has(this)&&(zm.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||zE(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,AS(this),jE(this);const t=Ut,n=ks;Ut=this,ks=!0;try{return this.fn()}finally{qE(this),Ut=t,ks=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)mb(t);this.deps=this.depsTail=void 0,AS(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?zm.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){ov(this)&&this.run()}get dirty(){return ov(this)}}let HE=0,fc,hc;function zE(e,t=!1){if(e.flags|=8,t){e.next=hc,hc=e;return}e.next=fc,fc=e}function hb(){HE++}function pb(){if(--HE>0)return;if(hc){let t=hc;for(hc=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;fc;){let t=fc;for(fc=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 jE(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function qE(e){let t,n=e.depsTail,r=n;for(;r;){const s=r.prevDep;r.version===-1?(r===n&&(n=s),mb(r),LD(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}e.deps=t,e.depsTail=n}function ov(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(WE(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function WE(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Oc))return;e.globalVersion=Oc;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!ov(e)){e.flags&=-3;return}const n=Ut,r=ks;Ut=e,ks=!0;try{jE(e);const s=e.fn(e._value);(t.version===0||wo(s,e._value))&&(e._value=s,t.version++)}catch(s){throw t.version++,s}finally{Ut=n,ks=r,qE(e),e.flags&=-3}}function mb(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)mb(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function LD(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let ks=!0;const GE=[];function $o(){GE.push(ks),ks=!1}function Lo(){const e=GE.pop();ks=e===void 0?!0:e}function AS(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Ut;Ut=void 0;try{t()}finally{Ut=n}}}let Oc=0;class FD{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 gb{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}track(t){if(!Ut||!ks||Ut===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Ut)n=this.activeLink=new FD(Ut,this),Ut.deps?(n.prevDep=Ut.depsTail,Ut.depsTail.nextDep=n,Ut.depsTail=n):Ut.deps=Ut.depsTail=n,KE(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=Ut.depsTail,n.nextDep=void 0,Ut.depsTail.nextDep=n,Ut.depsTail=n,Ut.deps===n&&(Ut.deps=r)}return n}trigger(t){this.version++,Oc++,this.notify(t)}notify(t){hb();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{pb()}}}function KE(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)KE(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const xh=new WeakMap,Sa=Symbol(""),av=Symbol(""),Mc=Symbol("");function Kn(e,t,n){if(ks&&Ut){let r=xh.get(e);r||xh.set(e,r=new Map);let s=r.get(n);s||(r.set(n,s=new gb),s.map=r,s.key=n),s.track()}}function Ri(e,t,n,r,s,i){const o=xh.get(e);if(!o){Oc++;return}const a=l=>{l&&l.trigger()};if(hb(),t==="clear")o.forEach(a);else{const l=je(e),u=l&&fb(n);if(l&&n==="length"){const c=Number(r);o.forEach((d,f)=>{(f==="length"||f===Mc||!Ui(f)&&f>=c)&&a(d)})}else switch((n!==void 0||o.has(void 0))&&a(o.get(n)),u&&a(o.get(Mc)),t){case"add":l?u&&a(o.get("length")):(a(o.get(Sa)),Tl(e)&&a(o.get(av)));break;case"delete":l||(a(o.get(Sa)),Tl(e)&&a(o.get(av)));break;case"set":Tl(e)&&a(o.get(Sa));break}}pb()}function ND(e,t){const n=xh.get(e);return n&&n.get(t)}function tl(e){const t=Be(e);return t===e?t:(Kn(t,"iterate",Mc),ss(e)?t:t.map(Yn))}function Ip(e){return Kn(e=Be(e),"iterate",Mc),e}const VD={__proto__:null,[Symbol.iterator](){return jm(this,Symbol.iterator,Yn)},concat(...e){return tl(this).concat(...e.map(t=>je(t)?tl(t):t))},entries(){return jm(this,"entries",e=>(e[1]=Yn(e[1]),e))},every(e,t){return pi(this,"every",e,t,void 0,arguments)},filter(e,t){return pi(this,"filter",e,t,n=>n.map(Yn),arguments)},find(e,t){return pi(this,"find",e,t,Yn,arguments)},findIndex(e,t){return pi(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return pi(this,"findLast",e,t,Yn,arguments)},findLastIndex(e,t){return pi(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return pi(this,"forEach",e,t,void 0,arguments)},includes(...e){return qm(this,"includes",e)},indexOf(...e){return qm(this,"indexOf",e)},join(e){return tl(this).join(e)},lastIndexOf(...e){return qm(this,"lastIndexOf",e)},map(e,t){return pi(this,"map",e,t,void 0,arguments)},pop(){return Hu(this,"pop")},push(...e){return Hu(this,"push",e)},reduce(e,...t){return OS(this,"reduce",e,t)},reduceRight(e,...t){return OS(this,"reduceRight",e,t)},shift(){return Hu(this,"shift")},some(e,t){return pi(this,"some",e,t,void 0,arguments)},splice(...e){return Hu(this,"splice",e)},toReversed(){return tl(this).toReversed()},toSorted(e){return tl(this).toSorted(e)},toSpliced(...e){return tl(this).toSpliced(...e)},unshift(...e){return Hu(this,"unshift",e)},values(){return jm(this,"values",Yn)}};function jm(e,t,n){const r=Ip(e),s=r[t]();return r!==e&&!ss(e)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.value&&(i.value=n(i.value)),i}),s}const BD=Array.prototype;function pi(e,t,n,r,s,i){const o=Ip(e),a=o!==e&&!ss(e),l=o[t];if(l!==BD[t]){const d=l.apply(e,i);return a?Yn(d):d}let u=n;o!==e&&(a?u=function(d,f){return n.call(this,Yn(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 OS(e,t,n,r){const s=Ip(e);let i=n;return s!==e&&(ss(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,Yn(a),l,e)}),s[t](i,...r)}function qm(e,t,n){const r=Be(e);Kn(r,"iterate",Mc);const s=r[t](...n);return(s===-1||s===!1)&&xd(n[0])?(n[0]=Be(n[0]),r[t](...n)):s}function Hu(e,t,n=[]){$o(),hb();const r=Be(e)[t].apply(e,n);return pb(),Lo(),r}const UD=ub("__proto__,__v_isRef,__isVue"),YE=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Ui));function HD(e){Ui(e)||(e=String(e));const t=Be(this);return Kn(t,"has",e),t.hasOwnProperty(e)}class XE{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?JD:eC:i?ZE:JE).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const o=je(t);if(!s){let l;if(o&&(l=VD[n]))return l;if(n==="hasOwnProperty")return HD}const a=Reflect.get(t,n,Xe(t)?t:r);return(Ui(n)?YE.has(n):UD(n))||(s||Kn(t,"get",n),i)?a:Xe(a)?o&&fb(n)?a:a.value:Gt(a)?s?kd(a):mn(a):a}}class QE extends XE{constructor(t=!1){super(!1,t)}set(t,n,r,s){let i=t[n];if(!this._isShallow){const l=Aa(i);if(!ss(r)&&!Aa(r)&&(i=Be(i),r=Be(r)),!je(t)&&Xe(i)&&!Xe(r))return l?!1:(i.value=r,!0)}const o=je(t)&&fb(n)?Number(n)<t.length:Ct(t,n),a=Reflect.set(t,n,r,Xe(t)?t:s);return t===Be(s)&&(o?wo(r,i)&&Ri(t,"set",n,r):Ri(t,"add",n,r)),a}deleteProperty(t,n){const r=Ct(t,n);t[n];const s=Reflect.deleteProperty(t,n);return s&&r&&Ri(t,"delete",n,void 0),s}has(t,n){const r=Reflect.has(t,n);return(!Ui(n)||!YE.has(n))&&Kn(t,"has",n),r}ownKeys(t){return Kn(t,"iterate",je(t)?"length":Sa),Reflect.ownKeys(t)}}class zD extends XE{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const jD=new QE,qD=new zD,WD=new QE(!0);const lv=e=>e,Qd=e=>Reflect.getPrototypeOf(e);function GD(e,t,n){return function(...r){const s=this.__v_raw,i=Be(s),o=Tl(i),a=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,u=s[e](...r),c=n?lv:t?uv:Yn;return!t&&Kn(i,"iterate",l?av:Sa),{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 Jd(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function KD(e,t){const n={get(s){const i=this.__v_raw,o=Be(i),a=Be(s);e||(wo(s,a)&&Kn(o,"get",s),Kn(o,"get",a));const{has:l}=Qd(o),u=t?lv:e?uv:Yn;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&&Kn(Be(s),"iterate",Sa),Reflect.get(s,"size",s)},has(s){const i=this.__v_raw,o=Be(i),a=Be(s);return e||(wo(s,a)&&Kn(o,"has",s),Kn(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=Be(a),u=t?lv:e?uv:Yn;return!e&&Kn(l,"iterate",Sa),a.forEach((c,d)=>s.call(i,u(c),u(d),o))}};return pn(n,e?{add:Jd("add"),set:Jd("set"),delete:Jd("delete"),clear:Jd("clear")}:{add(s){!t&&!ss(s)&&!Aa(s)&&(s=Be(s));const i=Be(this);return Qd(i).has.call(i,s)||(i.add(s),Ri(i,"add",s,s)),this},set(s,i){!t&&!ss(i)&&!Aa(i)&&(i=Be(i));const o=Be(this),{has:a,get:l}=Qd(o);let u=a.call(o,s);u||(s=Be(s),u=a.call(o,s));const c=l.call(o,s);return o.set(s,i),u?wo(i,c)&&Ri(o,"set",s,i):Ri(o,"add",s,i),this},delete(s){const i=Be(this),{has:o,get:a}=Qd(i);let l=o.call(i,s);l||(s=Be(s),l=o.call(i,s)),a&&a.call(i,s);const u=i.delete(s);return l&&Ri(i,"delete",s,void 0),u},clear(){const s=Be(this),i=s.size!==0,o=s.clear();return i&&Ri(s,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=GD(s,e,t)}),n}function vb(e,t){const n=KD(e,t);return(r,s,i)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?r:Reflect.get(Ct(n,s)&&s in r?n:r,s,i)}const YD={get:vb(!1,!1)},XD={get:vb(!1,!0)},QD={get:vb(!0,!1)};const JE=new WeakMap,ZE=new WeakMap,eC=new WeakMap,JD=new WeakMap;function ZD(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function e$(e){return e.__v_skip||!Object.isExtensible(e)?0:ZD(CD(e))}function mn(e){return Aa(e)?e:yb(e,!1,jD,YD,JE)}function Ap(e){return yb(e,!1,WD,XD,ZE)}function kd(e){return yb(e,!0,qD,QD,eC)}function yb(e,t,n,r,s){if(!Gt(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=s.get(e);if(i)return i;const o=e$(e);if(o===0)return e;const a=new Proxy(e,o===2?r:n);return s.set(e,a),a}function So(e){return Aa(e)?So(e.__v_raw):!!(e&&e.__v_isReactive)}function Aa(e){return!!(e&&e.__v_isReadonly)}function ss(e){return!!(e&&e.__v_isShallow)}function xd(e){return e?!!e.__v_raw:!1}function Be(e){const t=e&&e.__v_raw;return t?Be(t):e}function Op(e){return!Ct(e,"__v_skip")&&Object.isExtensible(e)&&LE(e,"__v_skip",!0),e}const Yn=e=>Gt(e)?mn(e):e,uv=e=>Gt(e)?kd(e):e;function Xe(e){return e?e.__v_isRef===!0:!1}function B(e){return tC(e,!1)}function Oe(e){return tC(e,!0)}function tC(e,t){return Xe(e)?e:new t$(e,t)}class t${constructor(t,n){this.dep=new gb,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Be(t),this._value=n?t:Yn(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,r=this.__v_isShallow||ss(t)||Aa(t);t=r?t:Be(t),wo(t,n)&&(this._rawValue=t,this._value=r?t:Yn(t),this.dep.trigger())}}function Q(e){return Xe(e)?e.value:e}const n$={get:(e,t,n)=>t==="__v_raw"?e:Q(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const s=e[t];return Xe(s)&&!Xe(n)?(s.value=n,!0):Reflect.set(e,t,n,r)}};function nC(e){return So(e)?e:new Proxy(e,n$)}function Fo(e){const t=je(e)?new Array(e.length):{};for(const n in e)t[n]=rC(e,n);return t}class r${constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return ND(Be(this._object),this._key)}}class s${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 Te(e,t,n){return Xe(e)?e:Qe(e)?new s$(e):Gt(e)&&arguments.length>1?rC(e,t,n):B(e)}function rC(e,t,n){const r=e[t];return Xe(r)?r:new r$(e,t,n)}class i${constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new gb(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Oc-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&Ut!==this)return zE(this,!0),!0}get value(){const t=this.dep.track();return WE(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function o$(e,t,n=!1){let r,s;return Qe(e)?r=e:(r=e.get,s=e.set),new i$(r,s,n)}const Zd={},Eh=new WeakMap;let ra;function a$(e,t=!1,n=ra){if(n){let r=Eh.get(n);r||Eh.set(n,r=[]),r.push(e)}}function l$(e,t,n=$t){const{immediate:r,deep:s,once:i,scheduler:o,augmentJob:a,call:l}=n,u=C=>s?C:ss(C)||s===!1||s===0?Pi(C,1):Pi(C);let c,d,f,p,g=!1,m=!1;if(Xe(e)?(d=()=>e.value,g=ss(e)):So(e)?(d=()=>u(e),g=!0):je(e)?(m=!0,g=e.some(C=>So(C)||ss(C)),d=()=>e.map(C=>{if(Xe(C))return C.value;if(So(C))return u(C);if(Qe(C))return l?l(C,2):C()})):Qe(e)?t?d=l?()=>l(e,2):e:d=()=>{if(f){$o();try{f()}finally{Lo()}}const C=ra;ra=c;try{return l?l(e,3,[p]):e(p)}finally{ra=C}}:d=ri,t&&s){const C=d,_=s===!0?1/0:s;d=()=>Pi(C(),_)}const y=Pp(),b=()=>{c.stop(),y&&y.active&&db(y.effects,c)};if(i&&t){const C=t;t=(..._)=>{C(..._),b()}}let w=m?new Array(e.length).fill(Zd):Zd;const S=C=>{if(!(!(c.flags&1)||!c.dirty&&!C))if(t){const _=c.run();if(s||g||(m?_.some((R,T)=>wo(R,w[T])):wo(_,w))){f&&f();const R=ra;ra=c;try{const T=[_,w===Zd?void 0:m&&w[0]===Zd?[]:w,p];l?l(t,3,T):t(...T),w=_}finally{ra=R}}}else c.run()};return a&&a(S),c=new UE(d),c.scheduler=o?()=>o(S,!1):S,p=C=>a$(C,!1,c),f=c.onStop=()=>{const C=Eh.get(c);if(C){if(l)l(C,4);else for(const _ of C)_();Eh.delete(c)}},t?r?S(!0):w=c.run():o?o(S.bind(null,!0),!0):c.run(),b.pause=c.pause.bind(c),b.resume=c.resume.bind(c),b.stop=b,b}function Pi(e,t=1/0,n){if(t<=0||!Gt(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,Xe(e))Pi(e.value,t,n);else if(je(e))for(let r=0;r<e.length;r++)Pi(e[r],t,n);else if(OE(e)||Tl(e))e.forEach(r=>{Pi(r,t,n)});else if($E(e)){for(const r in e)Pi(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Pi(e[r],t,n)}return e}/**
|
|
10
|
-
* @vue/runtime-core v3.5.13
|
|
11
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
12
|
-
* @license MIT
|
|
13
|
-
**/function Ed(e,t,n,r){try{return r?e(...r):e()}catch(s){Mp(s,t,n)}}function xs(e,t,n,r){if(Qe(e)){const s=Ed(e,t,n,r);return s&&ME(s)&&s.catch(i=>{Mp(i,t,n)}),s}if(je(e)){const s=[];for(let i=0;i<e.length;i++)s.push(xs(e[i],t,n,r));return s}}function Mp(e,t,n,r=!0){const s=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||$t;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){$o(),Ed(i,null,10,[e,l,u]),Lo();return}}u$(e,n,s,r,o)}function u$(e,t,n,r=!0,s=!1){if(s)throw e;console.error(e)}const cr=[];let qs=-1;const Rl=[];let Ji=null,hl=0;const sC=Promise.resolve();let Ch=null;function At(e){const t=Ch||sC;return e?t.then(this?e.bind(this):e):t}function c$(e){let t=qs+1,n=cr.length;for(;t<n;){const r=t+n>>>1,s=cr[r],i=Dc(s);i<e||i===e&&s.flags&2?t=r+1:n=r}return t}function bb(e){if(!(e.flags&1)){const t=Dc(e),n=cr[cr.length-1];!n||!(e.flags&2)&&t>=Dc(n)?cr.push(e):cr.splice(c$(t),0,e),e.flags|=1,iC()}}function iC(){Ch||(Ch=sC.then(aC))}function d$(e){je(e)?Rl.push(...e):Ji&&e.id===-1?Ji.splice(hl+1,0,e):e.flags&1||(Rl.push(e),e.flags|=1),iC()}function MS(e,t,n=qs+1){for(;n<cr.length;n++){const r=cr[n];if(r&&r.flags&2){if(e&&r.id!==e.uid)continue;cr.splice(n,1),n--,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function oC(e){if(Rl.length){const t=[...new Set(Rl)].sort((n,r)=>Dc(n)-Dc(r));if(Rl.length=0,Ji){Ji.push(...t);return}for(Ji=t,hl=0;hl<Ji.length;hl++){const n=Ji[hl];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Ji=null,hl=0}}const Dc=e=>e.id==null?e.flags&2?-1:1/0:e.id;function aC(e){try{for(qs=0;qs<cr.length;qs++){const t=cr[qs];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Ed(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;qs<cr.length;qs++){const t=cr[qs];t&&(t.flags&=-2)}qs=-1,cr.length=0,oC(),Ch=null,(cr.length||Rl.length)&&aC()}}let kn=null,lC=null;function Th(e){const t=kn;return kn=e,lC=e&&e.type.__scopeId||null,t}function v(e,t=kn,n){if(!t||e._n)return e;const r=(...s)=>{r._d&&WS(-1);const i=Th(t);let o;try{o=e(...s)}finally{Th(i),r._d&&WS(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function Jt(e,t){if(kn===null)return e;const n=Bp(kn),r=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[i,o,a,l=$t]=t[s];i&&(Qe(i)&&(i={mounted:i,updated:i}),i.deep&&Pi(o),r.push({dir:i,instance:n,value:o,oldValue:void 0,arg:a,modifiers:l}))}return e}function Ko(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&&($o(),xs(l,n,8,[e.el,a,e,t]),Lo())}}const uC=Symbol("_vte"),cC=e=>e.__isTeleport,pc=e=>e&&(e.disabled||e.disabled===""),DS=e=>e&&(e.defer||e.defer===""),$S=e=>typeof SVGElement<"u"&&e instanceof SVGElement,LS=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,cv=(e,t)=>{const n=e&&e.to;return rn(n)?t?t(n):null:n},dC={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:g,createText:m,createComment:y}}=u,b=pc(t.props);let{shapeFlag:w,children:S,dynamicChildren:C}=t;if(e==null){const _=t.el=m(""),R=t.anchor=m("");p(_,n,r),p(R,n,r);const T=(E,P)=>{w&16&&(s&&s.isCE&&(s.ce._teleportTarget=E),c(S,E,P,s,i,o,a,l))},x=()=>{const E=t.target=cv(t.props,g),P=fC(E,t,m,p);E&&(o!=="svg"&&$S(E)?o="svg":o!=="mathml"&&LS(E)&&(o="mathml"),b||(T(E,P),Gf(t,!1)))};b&&(T(n,R),Gf(t,!0)),DS(t.props)?lr(()=>{x(),t.el.__isMounted=!0},i):x()}else{if(DS(t.props)&&!e.el.__isMounted){lr(()=>{dC.process(e,t,n,r,s,i,o,a,l,u),delete e.el.__isMounted},i);return}t.el=e.el,t.targetStart=e.targetStart;const _=t.anchor=e.anchor,R=t.target=e.target,T=t.targetAnchor=e.targetAnchor,x=pc(e.props),E=x?n:R,P=x?_:T;if(o==="svg"||$S(R)?o="svg":(o==="mathml"||LS(R))&&(o="mathml"),C?(f(e.dynamicChildren,C,E,s,i,o,a),Tb(e,t,!0)):l||d(e,t,E,P,s,i,o,a,!1),b)x?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):ef(t,n,_,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const M=t.target=cv(t.props,g);M&&ef(t,M,null,u,0)}else x&&ef(t,R,T,u,1);Gf(t,b)}},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||!pc(f);for(let g=0;g<a.length;g++){const m=a[g];r(m,t,n,p,!!m.dynamicChildren)}}},move:ef,hydrate:f$};function ef(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||pc(c))&&l&16)for(let f=0;f<u.length;f++)s(u[f],t,n,2);d&&r(a,t,n)}function f$(e,t,n,r,s,i,{o:{nextSibling:o,parentNode:a,querySelector:l,insert:u,createText:c}},d){const f=t.target=cv(t.props,l);if(f){const p=pc(t.props),g=f._lpa||f.firstChild;if(t.shapeFlag&16)if(p)t.anchor=d(o(e),t,a(e),n,r,s,i),t.targetStart=g,t.targetAnchor=g&&o(g);else{t.anchor=o(e);let m=g;for(;m;){if(m&&m.nodeType===8){if(m.data==="teleport start anchor")t.targetStart=m;else if(m.data==="teleport anchor"){t.targetAnchor=m,f._lpa=t.targetAnchor&&o(t.targetAnchor);break}}m=o(m)}t.targetAnchor||fC(f,t,c,u),d(g&&o(g),t,f,n,r,s,i)}Gf(t,p)}return t.anchor&&o(t.anchor)}const h$=dC;function Gf(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 fC(e,t,n,r){const s=t.targetStart=n(""),i=t.targetAnchor=n("");return s[uC]=i,e&&(r(s,e),r(i,e)),i}const Zi=Symbol("_leaveCb"),tf=Symbol("_enterCb");function hC(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return St(()=>{e.isMounted=!0}),Pn(()=>{e.isUnmounting=!0}),e}const Yr=[Function,Array],pC={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Yr,onEnter:Yr,onAfterEnter:Yr,onEnterCancelled:Yr,onBeforeLeave:Yr,onLeave:Yr,onAfterLeave:Yr,onLeaveCancelled:Yr,onBeforeAppear:Yr,onAppear:Yr,onAfterAppear:Yr,onAppearCancelled:Yr},mC=e=>{const t=e.subTree;return t.component?mC(t.component):t},p$={name:"BaseTransition",props:pC,setup(e,{slots:t}){const n=Ib(),r=hC();return()=>{const s=t.default&&wb(t.default(),!0);if(!s||!s.length)return;const i=gC(s),o=Be(e),{mode:a}=o;if(r.isLeaving)return Wm(i);const l=FS(i);if(!l)return Wm(i);let u=$c(l,o,r,n,d=>u=d);l.type!==Xn&&Oa(l,u);let c=n.subTree&&FS(n.subTree);if(c&&c.type!==Xn&&!aa(l,c)&&mC(n).type!==Xn){let d=$c(c,o,r,n);if(Oa(c,d),a==="out-in"&&l.type!==Xn)return r.isLeaving=!0,d.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,c=void 0},Wm(i);a==="in-out"&&l.type!==Xn?d.delayLeave=(f,p,g)=>{const m=vC(r,c);m[String(c.key)]=c,f[Zi]=()=>{p(),f[Zi]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{g(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return i}}};function gC(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Xn){t=n;break}}return t}const m$=p$;function vC(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 $c(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:g,onLeaveCancelled:m,onBeforeAppear:y,onAppear:b,onAfterAppear:w,onAppearCancelled:S}=t,C=String(e.key),_=vC(n,e),R=(E,P)=>{E&&xs(E,r,9,P)},T=(E,P)=>{const M=P[1];R(E,P),je(E)?E.every(O=>O.length<=1)&&M():E.length<=1&&M()},x={mode:o,persisted:a,beforeEnter(E){let P=l;if(!n.isMounted)if(i)P=y||l;else return;E[Zi]&&E[Zi](!0);const M=_[C];M&&aa(e,M)&&M.el[Zi]&&M.el[Zi](),R(P,[E])},enter(E){let P=u,M=c,O=d;if(!n.isMounted)if(i)P=b||u,M=w||c,O=S||d;else return;let A=!1;const D=E[tf]=H=>{A||(A=!0,H?R(O,[E]):R(M,[E]),x.delayedLeave&&x.delayedLeave(),E[tf]=void 0)};P?T(P,[E,D]):D()},leave(E,P){const M=String(e.key);if(E[tf]&&E[tf](!0),n.isUnmounting)return P();R(f,[E]);let O=!1;const A=E[Zi]=D=>{O||(O=!0,P(),D?R(m,[E]):R(g,[E]),E[Zi]=void 0,_[M]===e&&delete _[M])};_[M]=e,p?T(p,[E,A]):A()},clone(E){const P=$c(E,t,n,r,s);return s&&s(P),P}};return x}function Wm(e){if(Dp(e))return e=Mi(e),e.children=null,e}function FS(e){if(!Dp(e))return cC(e.type)&&e.children?gC(e.children):e;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&Qe(n.default))return n.default()}}function Oa(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Oa(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function wb(e,t=!1,n){let r=[],s=0;for(let i=0;i<e.length;i++){let o=e[i];const a=n==null?o.key:String(n)+String(o.key!=null?o.key:i);o.type===Ce?(o.patchFlag&128&&s++,r=r.concat(wb(o.children,t,a))):(t||o.type!==Xn)&&r.push(a!=null?Mi(o,{key:a}):o)}if(s>1)for(let i=0;i<r.length;i++)r[i].patchFlag=-2;return r}/*! #__NO_SIDE_EFFECTS__ */function De(e,t){return Qe(e)?pn({name:e.name},t,{setup:e}):e}function yC(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Rh(e,t,n,r,s=!1){if(je(e)){e.forEach((g,m)=>Rh(g,t&&(je(t)?t[m]:t),n,r,s));return}if(Pl(r)&&!s){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Rh(e,t,n,r.component.subTree);return}const i=r.shapeFlag&4?Bp(r.component):r.el,o=s?null:i,{i:a,r:l}=e,u=t&&t.r,c=a.refs===$t?a.refs={}:a.refs,d=a.setupState,f=Be(d),p=d===$t?()=>!1:g=>Ct(f,g);if(u!=null&&u!==l&&(rn(u)?(c[u]=null,p(u)&&(d[u]=null)):Xe(u)&&(u.value=null)),Qe(l))Ed(l,a,12,[o,c]);else{const g=rn(l),m=Xe(l);if(g||m){const y=()=>{if(e.f){const b=g?p(l)?d[l]:c[l]:l.value;s?je(b)&&db(b,i):je(b)?b.includes(i)||b.push(i):g?(c[l]=[i],p(l)&&(d[l]=c[l])):(l.value=[i],e.k&&(c[e.k]=l.value))}else g?(c[l]=o,p(l)&&(d[l]=o)):m&&(l.value=o,e.k&&(c[e.k]=o))};o?(y.id=-1,lr(y,n)):y()}}}Rp().requestIdleCallback;Rp().cancelIdleCallback;const Pl=e=>!!e.type.__asyncLoader,Dp=e=>e.type.__isKeepAlive;function bC(e,t){wC(e,"a",t)}function Sb(e,t){wC(e,"da",t)}function wC(e,t,n=An){const r=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if($p(t,r,n),n){let s=n.parent;for(;s&&s.parent;)Dp(s.parent.vnode)&&g$(r,t,n,s),s=s.parent}}function g$(e,t,n,r){const s=$p(t,e,r,!0);Fp(()=>{db(r[t],s)},n)}function $p(e,t,n=An,r=!1){if(n){const s=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{$o();const a=Td(n),l=xs(t,n,e,o);return a(),Lo(),l});return r?s.unshift(i):s.push(i),i}}const Hi=e=>(t,n=An)=>{(!Fc||e==="sp")&&$p(e,(...r)=>t(...r),n)},Lp=Hi("bm"),St=Hi("m"),SC=Hi("bu"),_b=Hi("u"),Pn=Hi("bum"),Fp=Hi("um"),v$=Hi("sp"),y$=Hi("rtg"),b$=Hi("rtc");function w$(e,t=An){$p("ec",e,t)}const kb="components",S$="directives";function Vn(e,t){return xb(kb,e,!0,t)||e}const _$=Symbol.for("v-ndc");function k$(e){return rn(e)&&xb(kb,e,!1)||e}function hr(e){return xb(S$,e)}function xb(e,t,n=!0,r=!1){const s=kn||An;if(s){const i=s.type;if(e===kb){const a=aL(i,!1);if(a&&(a===t||a===Pr(t)||a===li(Pr(t))))return i}const o=NS(s[e]||i[e],t)||NS(s.appContext[e],t);return!o&&r?i:o}}function NS(e,t){return e&&(e[t]||e[Pr(t)]||e[li(Pr(t))])}function qt(e,t,n,r){let s;const i=n,o=je(e);if(o||rn(e)){const a=o&&So(e);let l=!1;a&&(l=!ss(e),e=Ip(e)),s=new Array(e.length);for(let u=0,c=e.length;u<c;u++)s[u]=t(l?Yn(e[u]):e[u],u,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(Gt(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 _C(e,t){for(let n=0;n<t.length;n++){const r=t[n];if(je(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 Np(e,t,n={},r,s){if(kn.ce||kn.parent&&Pl(kn.parent)&&kn.parent.ce)return L(),Z(Ce,null,[h("slot",n,r&&r())],64);let i=e[t];i&&i._c&&(i._d=!1),L();const o=i&&kC(i(n)),a=n.key||o&&o.key,l=Z(Ce,{key:(a&&!Ui(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 kC(e){return e.some(t=>Xl(t)?!(t.type===Xn||t.type===Ce&&!kC(t.children)):!0)?e:null}const dv=e=>e?HC(e)?Bp(e):dv(e.parent):null,mc=pn(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=>dv(e.parent),$root:e=>dv(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Eb(e),$forceUpdate:e=>e.f||(e.f=()=>{bb(e.update)}),$nextTick:e=>e.n||(e.n=At.bind(e.proxy)),$watch:e=>j$.bind(e)}),Gm=(e,t)=>e!==$t&&!e.__isScriptSetup&&Ct(e,t),x$={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:s,props:i,accessCache:o,type:a,appContext:l}=e;let u;if(t[0]!=="$"){const p=o[t];if(p!==void 0)switch(p){case 1:return r[t];case 2:return s[t];case 4:return n[t];case 3:return i[t]}else{if(Gm(r,t))return o[t]=1,r[t];if(s!==$t&&Ct(s,t))return o[t]=2,s[t];if((u=e.propsOptions[0])&&Ct(u,t))return o[t]=3,i[t];if(n!==$t&&Ct(n,t))return o[t]=4,n[t];fv&&(o[t]=0)}}const c=mc[t];let d,f;if(c)return t==="$attrs"&&Kn(e.attrs,"get",""),c(e);if((d=a.__cssModules)&&(d=d[t]))return d;if(n!==$t&&Ct(n,t))return o[t]=4,n[t];if(f=l.config.globalProperties,Ct(f,t))return f[t]},set({_:e},t,n){const{data:r,setupState:s,ctx:i}=e;return Gm(s,t)?(s[t]=n,!0):r!==$t&&Ct(r,t)?(r[t]=n,!0):Ct(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:s,propsOptions:i}},o){let a;return!!n[o]||e!==$t&&Ct(e,o)||Gm(t,o)||(a=i[0])&&Ct(a,o)||Ct(r,o)||Ct(mc,o)||Ct(s.config.globalProperties,o)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Ct(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function VS(e){return je(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let fv=!0;function E$(e){const t=Eb(e),n=e.proxy,r=e.ctx;fv=!1,t.beforeCreate&&BS(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:g,activated:m,deactivated:y,beforeDestroy:b,beforeUnmount:w,destroyed:S,unmounted:C,render:_,renderTracked:R,renderTriggered:T,errorCaptured:x,serverPrefetch:E,expose:P,inheritAttrs:M,components:O,directives:A,filters:D}=t;if(u&&C$(u,r,null),o)for(const Y in o){const q=o[Y];Qe(q)&&(r[Y]=q.bind(n))}if(s){const Y=s.call(n,n);Gt(Y)&&(e.data=mn(Y))}if(fv=!0,i)for(const Y in i){const q=i[Y],V=Qe(q)?q.bind(n,n):Qe(q.get)?q.get.bind(n,n):ri,G=!Qe(q)&&Qe(q.set)?q.set.bind(n):ri,te=I({get:V,set:G});Object.defineProperty(r,Y,{enumerable:!0,configurable:!0,get:()=>te.value,set:W=>te.value=W})}if(a)for(const Y in a)xC(a[Y],r,n,Y);if(l){const Y=Qe(l)?l.call(n):l;Reflect.ownKeys(Y).forEach(q=>{Wt(q,Y[q])})}c&&BS(c,e,"c");function z(Y,q){je(q)?q.forEach(V=>Y(V.bind(n))):q&&Y(q.bind(n))}if(z(Lp,d),z(St,f),z(SC,p),z(_b,g),z(bC,m),z(Sb,y),z(w$,x),z(b$,R),z(y$,T),z(Pn,w),z(Fp,C),z(v$,E),je(P))if(P.length){const Y=e.exposed||(e.exposed={});P.forEach(q=>{Object.defineProperty(Y,q,{get:()=>n[q],set:V=>n[q]=V})})}else e.exposed||(e.exposed={});_&&e.render===ri&&(e.render=_),M!=null&&(e.inheritAttrs=M),O&&(e.components=O),A&&(e.directives=A),E&&yC(e)}function C$(e,t,n=ri){je(e)&&(e=hv(e));for(const r in e){const s=e[r];let i;Gt(s)?"default"in s?i=Ke(s.from||r,s.default,!0):i=Ke(s.from||r):i=Ke(s),Xe(i)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[r]=i}}function BS(e,t,n){xs(je(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function xC(e,t,n,r){let s=r.includes(".")?FC(n,r):()=>n[r];if(rn(e)){const i=t[e];Qe(i)&&xe(s,i)}else if(Qe(e))xe(s,e.bind(n));else if(Gt(e))if(je(e))e.forEach(i=>xC(i,t,n,r));else{const i=Qe(e.handler)?e.handler.bind(n):t[e.handler];Qe(i)&&xe(s,i,e)}}function Eb(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=>Ph(l,u,o,!0)),Ph(l,t,o)),Gt(t)&&i.set(t,l),l}function Ph(e,t,n,r=!1){const{mixins:s,extends:i}=t;i&&Ph(e,i,n,!0),s&&s.forEach(o=>Ph(e,o,n,!0));for(const o in t)if(!(r&&o==="expose")){const a=T$[o]||n&&n[o];e[o]=a?a(e[o],t[o]):t[o]}return e}const T$={data:US,props:HS,emits:HS,methods:sc,computed:sc,beforeCreate:sr,created:sr,beforeMount:sr,mounted:sr,beforeUpdate:sr,updated:sr,beforeDestroy:sr,beforeUnmount:sr,destroyed:sr,unmounted:sr,activated:sr,deactivated:sr,errorCaptured:sr,serverPrefetch:sr,components:sc,directives:sc,watch:P$,provide:US,inject:R$};function US(e,t){return t?e?function(){return pn(Qe(e)?e.call(this,this):e,Qe(t)?t.call(this,this):t)}:t:e}function R$(e,t){return sc(hv(e),hv(t))}function hv(e){if(je(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function sr(e,t){return e?[...new Set([].concat(e,t))]:t}function sc(e,t){return e?pn(Object.create(null),e,t):t}function HS(e,t){return e?je(e)&&je(t)?[...new Set([...e,...t])]:pn(Object.create(null),VS(e),VS(t??{})):t}function P$(e,t){if(!e)return t;if(!t)return e;const n=pn(Object.create(null),e);for(const r in t)n[r]=sr(e[r],t[r]);return n}function EC(){return{app:null,config:{isNativeTag:xD,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 I$=0;function A$(e,t){return function(r,s=null){Qe(r)||(r=pn({},r)),s!=null&&!Gt(s)&&(s=null);const i=EC(),o=new WeakSet,a=[];let l=!1;const u=i.app={_uid:I$++,_component:r,_props:s,_container:null,_context:i,_instance:null,version:jC,get config(){return i.config},set config(c){},use(c,...d){return o.has(c)||(c&&Qe(c.install)?(o.add(c),c.install(u,...d)):Qe(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),d&&t?t(p,c):e(p,c,f),l=!0,u._container=c,c.__vue_app__=u,Bp(p.component)}},onUnmount(c){a.push(c)},unmount(){l&&(xs(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=_a;_a=u;try{return c()}finally{_a=d}}};return u}}let _a=null;function Wt(e,t){if(An){let n=An.provides;const r=An.parent&&An.parent.provides;r===n&&(n=An.provides=Object.create(r)),n[e]=t}}function Ke(e,t,n=!1){const r=An||kn;if(r||_a){const s=_a?_a._context.provides:r?r.parent==null?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&&Qe(t)?t.call(r&&r.proxy):t}}function CC(){return!!(An||kn||_a)}const TC={},RC=()=>Object.create(TC),PC=e=>Object.getPrototypeOf(e)===TC;function O$(e,t,n,r=!1){const s={},i=RC();e.propsDefaults=Object.create(null),IC(e,t,s,i);for(const o in e.propsOptions[0])o in s||(s[o]=void 0);n?e.props=r?s:Ap(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function M$(e,t,n,r){const{props:s,attrs:i,vnode:{patchFlag:o}}=e,a=Be(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(Vp(e.emitsOptions,f))continue;const p=t[f];if(l)if(Ct(i,f))p!==i[f]&&(i[f]=p,u=!0);else{const g=Pr(f);s[g]=pv(l,a,g,p,e,!1)}else p!==i[f]&&(i[f]=p,u=!0)}}}else{IC(e,t,s,i)&&(u=!0);let c;for(const d in a)(!t||!Ct(t,d)&&((c=Do(d))===d||!Ct(t,c)))&&(l?n&&(n[d]!==void 0||n[c]!==void 0)&&(s[d]=pv(l,a,d,void 0,e,!0)):delete s[d]);if(i!==a)for(const d in i)(!t||!Ct(t,d))&&(delete i[d],u=!0)}u&&Ri(e.attrs,"set","")}function IC(e,t,n,r){const[s,i]=e.propsOptions;let o=!1,a;if(t)for(let l in t){if(dc(l))continue;const u=t[l];let c;s&&Ct(s,c=Pr(l))?!i||!i.includes(c)?n[c]=u:(a||(a={}))[c]=u:Vp(e.emitsOptions,l)||(!(l in r)||u!==r[l])&&(r[l]=u,o=!0)}if(i){const l=Be(n),u=a||$t;for(let c=0;c<i.length;c++){const d=i[c];n[d]=pv(s,l,d,u[d],e,!Ct(u,d))}}return o}function pv(e,t,n,r,s,i){const o=e[n];if(o!=null){const a=Ct(o,"default");if(a&&r===void 0){const l=o.default;if(o.type!==Function&&!o.skipFactory&&Qe(l)){const{propsDefaults:u}=s;if(n in u)r=u[n];else{const c=Td(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===Do(n))&&(r=!0))}return r}const D$=new WeakMap;function AC(e,t,n=!1){const r=n?D$:t.propsCache,s=r.get(e);if(s)return s;const i=e.props,o={},a=[];let l=!1;if(!Qe(e)){const c=d=>{l=!0;const[f,p]=AC(d,t,!0);pn(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 Gt(e)&&r.set(e,Cl),Cl;if(je(i))for(let c=0;c<i.length;c++){const d=Pr(i[c]);zS(d)&&(o[d]=$t)}else if(i)for(const c in i){const d=Pr(c);if(zS(d)){const f=i[c],p=o[d]=je(f)||Qe(f)?{type:f}:pn({},f),g=p.type;let m=!1,y=!0;if(je(g))for(let b=0;b<g.length;++b){const w=g[b],S=Qe(w)&&w.name;if(S==="Boolean"){m=!0;break}else S==="String"&&(y=!1)}else m=Qe(g)&&g.name==="Boolean";p[0]=m,p[1]=y,(m||Ct(p,"default"))&&a.push(d)}}const u=[o,a];return Gt(e)&&r.set(e,u),u}function zS(e){return e[0]!=="$"&&!dc(e)}const OC=e=>e[0]==="_"||e==="$stable",Cb=e=>je(e)?e.map(Qs):[Qs(e)],$$=(e,t,n)=>{if(t._n)return t;const r=v((...s)=>Cb(t(...s)),n);return r._c=!1,r},MC=(e,t,n)=>{const r=e._ctx;for(const s in e){if(OC(s))continue;const i=e[s];if(Qe(i))t[s]=$$(s,i,r);else if(i!=null){const o=Cb(i);t[s]=()=>o}}},DC=(e,t)=>{const n=Cb(t);e.slots.default=()=>n},$C=(e,t,n)=>{for(const r in t)(n||r!=="_")&&(e[r]=t[r])},L$=(e,t,n)=>{const r=e.slots=RC();if(e.vnode.shapeFlag&32){const s=t._;s?($C(r,t,n),n&&LE(r,"_",s,!0)):MC(t,r)}else t&&DC(e,t)},F$=(e,t,n)=>{const{vnode:r,slots:s}=e;let i=!0,o=$t;if(r.shapeFlag&32){const a=t._;a?n&&a===1?i=!1:$C(s,t,n):(i=!t.$stable,MC(t,s)),o=t}else t&&(DC(e,t),o={default:1});if(i)for(const a in s)!OC(a)&&o[a]==null&&delete s[a]},lr=Q$;function N$(e){return V$(e)}function V$(e,t){const n=Rp();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=ri,insertStaticContent:g}=e,m=(F,N,K,de=null,le=null,we=null,Ee=void 0,be=null,_e=!!N.dynamicChildren)=>{if(F===N)return;F&&!aa(F,N)&&(de=ee(F),W(F,le,we,!0),F=null),N.patchFlag===-2&&(_e=!1,N.dynamicChildren=null);const{type:fe,ref:Ie,shapeFlag:Se}=N;switch(fe){case Cd:y(F,N,K,de);break;case Xn:b(F,N,K,de);break;case Xm:F==null&&w(N,K,de,Ee);break;case Ce:O(F,N,K,de,le,we,Ee,be,_e);break;default:Se&1?_(F,N,K,de,le,we,Ee,be,_e):Se&6?A(F,N,K,de,le,we,Ee,be,_e):(Se&64||Se&128)&&fe.process(F,N,K,de,le,we,Ee,be,_e,U)}Ie!=null&&le&&Rh(Ie,F&&F.ref,we,N||F,!N)},y=(F,N,K,de)=>{if(F==null)r(N.el=a(N.children),K,de);else{const le=N.el=F.el;N.children!==F.children&&u(le,N.children)}},b=(F,N,K,de)=>{F==null?r(N.el=l(N.children||""),K,de):N.el=F.el},w=(F,N,K,de)=>{[F.el,F.anchor]=g(F.children,N,K,de,F.el,F.anchor)},S=({el:F,anchor:N},K,de)=>{let le;for(;F&&F!==N;)le=f(F),r(F,K,de),F=le;r(N,K,de)},C=({el:F,anchor:N})=>{let K;for(;F&&F!==N;)K=f(F),s(F),F=K;s(N)},_=(F,N,K,de,le,we,Ee,be,_e)=>{N.type==="svg"?Ee="svg":N.type==="math"&&(Ee="mathml"),F==null?R(N,K,de,le,we,Ee,be,_e):E(F,N,le,we,Ee,be,_e)},R=(F,N,K,de,le,we,Ee,be)=>{let _e,fe;const{props:Ie,shapeFlag:Se,transition:$e,dirs:We}=F;if(_e=F.el=o(F.type,we,Ie&&Ie.is,Ie),Se&8?c(_e,F.children):Se&16&&x(F.children,_e,null,de,le,Km(F,we),Ee,be),We&&Ko(F,null,de,"created"),T(_e,F,F.scopeId,Ee,de),Ie){for(const Vt in Ie)Vt!=="value"&&!dc(Vt)&&i(_e,Vt,null,Ie[Vt],we,de);"value"in Ie&&i(_e,"value",null,Ie.value,we),(fe=Ie.onVnodeBeforeMount)&&Ns(fe,de,F)}We&&Ko(F,null,de,"beforeMount");const mt=B$(le,$e);mt&&$e.beforeEnter(_e),r(_e,N,K),((fe=Ie&&Ie.onVnodeMounted)||mt||We)&&lr(()=>{fe&&Ns(fe,de,F),mt&&$e.enter(_e),We&&Ko(F,null,de,"mounted")},le)},T=(F,N,K,de,le)=>{if(K&&p(F,K),de)for(let we=0;we<de.length;we++)p(F,de[we]);if(le){let we=le.subTree;if(N===we||VC(we.type)&&(we.ssContent===N||we.ssFallback===N)){const Ee=le.vnode;T(F,Ee,Ee.scopeId,Ee.slotScopeIds,le.parent)}}},x=(F,N,K,de,le,we,Ee,be,_e=0)=>{for(let fe=_e;fe<F.length;fe++){const Ie=F[fe]=be?eo(F[fe]):Qs(F[fe]);m(null,Ie,N,K,de,le,we,Ee,be)}},E=(F,N,K,de,le,we,Ee)=>{const be=N.el=F.el;let{patchFlag:_e,dynamicChildren:fe,dirs:Ie}=N;_e|=F.patchFlag&16;const Se=F.props||$t,$e=N.props||$t;let We;if(K&&Yo(K,!1),(We=$e.onVnodeBeforeUpdate)&&Ns(We,K,N,F),Ie&&Ko(N,F,K,"beforeUpdate"),K&&Yo(K,!0),(Se.innerHTML&&$e.innerHTML==null||Se.textContent&&$e.textContent==null)&&c(be,""),fe?P(F.dynamicChildren,fe,be,K,de,Km(N,le),we):Ee||q(F,N,be,null,K,de,Km(N,le),we,!1),_e>0){if(_e&16)M(be,Se,$e,K,le);else if(_e&2&&Se.class!==$e.class&&i(be,"class",null,$e.class,le),_e&4&&i(be,"style",Se.style,$e.style,le),_e&8){const mt=N.dynamicProps;for(let Vt=0;Vt<mt.length;Vt++){const Tt=mt[Vt],Lr=Se[Tt],zn=$e[Tt];(zn!==Lr||Tt==="value")&&i(be,Tt,Lr,zn,le,K)}}_e&1&&F.children!==N.children&&c(be,N.children)}else!Ee&&fe==null&&M(be,Se,$e,K,le);((We=$e.onVnodeUpdated)||Ie)&&lr(()=>{We&&Ns(We,K,N,F),Ie&&Ko(N,F,K,"updated")},de)},P=(F,N,K,de,le,we,Ee)=>{for(let be=0;be<N.length;be++){const _e=F[be],fe=N[be],Ie=_e.el&&(_e.type===Ce||!aa(_e,fe)||_e.shapeFlag&70)?d(_e.el):K;m(_e,fe,Ie,null,de,le,we,Ee,!0)}},M=(F,N,K,de,le)=>{if(N!==K){if(N!==$t)for(const we in N)!dc(we)&&!(we in K)&&i(F,we,N[we],null,le,de);for(const we in K){if(dc(we))continue;const Ee=K[we],be=N[we];Ee!==be&&we!=="value"&&i(F,we,be,Ee,le,de)}"value"in K&&i(F,"value",N.value,K.value,le)}},O=(F,N,K,de,le,we,Ee,be,_e)=>{const fe=N.el=F?F.el:a(""),Ie=N.anchor=F?F.anchor:a("");let{patchFlag:Se,dynamicChildren:$e,slotScopeIds:We}=N;We&&(be=be?be.concat(We):We),F==null?(r(fe,K,de),r(Ie,K,de),x(N.children||[],K,Ie,le,we,Ee,be,_e)):Se>0&&Se&64&&$e&&F.dynamicChildren?(P(F.dynamicChildren,$e,K,le,we,Ee,be),(N.key!=null||le&&N===le.subTree)&&Tb(F,N,!0)):q(F,N,K,Ie,le,we,Ee,be,_e)},A=(F,N,K,de,le,we,Ee,be,_e)=>{N.slotScopeIds=be,F==null?N.shapeFlag&512?le.ctx.activate(N,K,de,Ee,_e):D(N,K,de,le,we,Ee,_e):H(F,N,_e)},D=(F,N,K,de,le,we,Ee)=>{const be=F.component=nL(F,de,le);if(Dp(F)&&(be.ctx.renderer=U),rL(be,!1,Ee),be.asyncDep){if(le&&le.registerDep(be,z,Ee),!F.el){const _e=be.subTree=h(Xn);b(null,_e,N,K)}}else z(be,F,N,K,le,we,Ee)},H=(F,N,K)=>{const de=N.component=F.component;if(Y$(F,N,K))if(de.asyncDep&&!de.asyncResolved){Y(de,N,K);return}else de.next=N,de.update();else N.el=F.el,de.vnode=N},z=(F,N,K,de,le,we,Ee)=>{const be=()=>{if(F.isMounted){let{next:Se,bu:$e,u:We,parent:mt,vnode:Vt}=F;{const Fr=LC(F);if(Fr){Se&&(Se.el=Vt.el,Y(F,Se,Ee)),Fr.asyncDep.then(()=>{F.isUnmounted||be()});return}}let Tt=Se,Lr;Yo(F,!1),Se?(Se.el=Vt.el,Y(F,Se,Ee)):Se=Vt,$e&&Wf($e),(Lr=Se.props&&Se.props.onVnodeBeforeUpdate)&&Ns(Lr,mt,Se,Vt),Yo(F,!0);const zn=Ym(F),ms=F.subTree;F.subTree=zn,m(ms,zn,d(ms.el),ee(ms),F,le,we),Se.el=zn.el,Tt===null&&X$(F,zn.el),We&&lr(We,le),(Lr=Se.props&&Se.props.onVnodeUpdated)&&lr(()=>Ns(Lr,mt,Se,Vt),le)}else{let Se;const{el:$e,props:We}=N,{bm:mt,m:Vt,parent:Tt,root:Lr,type:zn}=F,ms=Pl(N);if(Yo(F,!1),mt&&Wf(mt),!ms&&(Se=We&&We.onVnodeBeforeMount)&&Ns(Se,Tt,N),Yo(F,!0),$e&&at){const Fr=()=>{F.subTree=Ym(F),at($e,F.subTree,F,le,null)};ms&&zn.__asyncHydrate?zn.__asyncHydrate($e,F,Fr):Fr()}else{Lr.ce&&Lr.ce._injectChildStyle(zn);const Fr=F.subTree=Ym(F);m(null,Fr,K,de,F,le,we),N.el=Fr.el}if(Vt&&lr(Vt,le),!ms&&(Se=We&&We.onVnodeMounted)){const Fr=N;lr(()=>Ns(Se,Tt,Fr),le)}(N.shapeFlag&256||Tt&&Pl(Tt.vnode)&&Tt.vnode.shapeFlag&256)&&F.a&&lr(F.a,le),F.isMounted=!0,N=K=de=null}};F.scope.on();const _e=F.effect=new UE(be);F.scope.off();const fe=F.update=_e.run.bind(_e),Ie=F.job=_e.runIfDirty.bind(_e);Ie.i=F,Ie.id=F.uid,_e.scheduler=()=>bb(Ie),Yo(F,!0),fe()},Y=(F,N,K)=>{N.component=F;const de=F.vnode.props;F.vnode=N,F.next=null,M$(F,N.props,de,K),F$(F,N.children,K),$o(),MS(F),Lo()},q=(F,N,K,de,le,we,Ee,be,_e=!1)=>{const fe=F&&F.children,Ie=F?F.shapeFlag:0,Se=N.children,{patchFlag:$e,shapeFlag:We}=N;if($e>0){if($e&128){G(fe,Se,K,de,le,we,Ee,be,_e);return}else if($e&256){V(fe,Se,K,de,le,we,Ee,be,_e);return}}We&8?(Ie&16&&oe(fe,le,we),Se!==fe&&c(K,Se)):Ie&16?We&16?G(fe,Se,K,de,le,we,Ee,be,_e):oe(fe,le,we,!0):(Ie&8&&c(K,""),We&16&&x(Se,K,de,le,we,Ee,be,_e))},V=(F,N,K,de,le,we,Ee,be,_e)=>{F=F||Cl,N=N||Cl;const fe=F.length,Ie=N.length,Se=Math.min(fe,Ie);let $e;for($e=0;$e<Se;$e++){const We=N[$e]=_e?eo(N[$e]):Qs(N[$e]);m(F[$e],We,K,null,le,we,Ee,be,_e)}fe>Ie?oe(F,le,we,!0,!1,Se):x(N,K,de,le,we,Ee,be,_e,Se)},G=(F,N,K,de,le,we,Ee,be,_e)=>{let fe=0;const Ie=N.length;let Se=F.length-1,$e=Ie-1;for(;fe<=Se&&fe<=$e;){const We=F[fe],mt=N[fe]=_e?eo(N[fe]):Qs(N[fe]);if(aa(We,mt))m(We,mt,K,null,le,we,Ee,be,_e);else break;fe++}for(;fe<=Se&&fe<=$e;){const We=F[Se],mt=N[$e]=_e?eo(N[$e]):Qs(N[$e]);if(aa(We,mt))m(We,mt,K,null,le,we,Ee,be,_e);else break;Se--,$e--}if(fe>Se){if(fe<=$e){const We=$e+1,mt=We<Ie?N[We].el:de;for(;fe<=$e;)m(null,N[fe]=_e?eo(N[fe]):Qs(N[fe]),K,mt,le,we,Ee,be,_e),fe++}}else if(fe>$e)for(;fe<=Se;)W(F[fe],le,we,!0),fe++;else{const We=fe,mt=fe,Vt=new Map;for(fe=mt;fe<=$e;fe++){const Nr=N[fe]=_e?eo(N[fe]):Qs(N[fe]);Nr.key!=null&&Vt.set(Nr.key,fe)}let Tt,Lr=0;const zn=$e-mt+1;let ms=!1,Fr=0;const Uu=new Array(zn);for(fe=0;fe<zn;fe++)Uu[fe]=0;for(fe=We;fe<=Se;fe++){const Nr=F[fe];if(Lr>=zn){W(Nr,le,we,!0);continue}let Fs;if(Nr.key!=null)Fs=Vt.get(Nr.key);else for(Tt=mt;Tt<=$e;Tt++)if(Uu[Tt-mt]===0&&aa(Nr,N[Tt])){Fs=Tt;break}Fs===void 0?W(Nr,le,we,!0):(Uu[Fs-mt]=fe+1,Fs>=Fr?Fr=Fs:ms=!0,m(Nr,N[Fs],K,null,le,we,Ee,be,_e),Lr++)}const RS=ms?U$(Uu):Cl;for(Tt=RS.length-1,fe=zn-1;fe>=0;fe--){const Nr=mt+fe,Fs=N[Nr],PS=Nr+1<Ie?N[Nr+1].el:de;Uu[fe]===0?m(null,Fs,K,PS,le,we,Ee,be,_e):ms&&(Tt<0||fe!==RS[Tt]?te(Fs,K,PS,2):Tt--)}}},te=(F,N,K,de,le=null)=>{const{el:we,type:Ee,transition:be,children:_e,shapeFlag:fe}=F;if(fe&6){te(F.component.subTree,N,K,de);return}if(fe&128){F.suspense.move(N,K,de);return}if(fe&64){Ee.move(F,N,K,U);return}if(Ee===Ce){r(we,N,K);for(let Se=0;Se<_e.length;Se++)te(_e[Se],N,K,de);r(F.anchor,N,K);return}if(Ee===Xm){S(F,N,K);return}if(de!==2&&fe&1&&be)if(de===0)be.beforeEnter(we),r(we,N,K),lr(()=>be.enter(we),le);else{const{leave:Se,delayLeave:$e,afterLeave:We}=be,mt=()=>r(we,N,K),Vt=()=>{Se(we,()=>{mt(),We&&We()})};$e?$e(we,mt,Vt):Vt()}else r(we,N,K)},W=(F,N,K,de=!1,le=!1)=>{const{type:we,props:Ee,ref:be,children:_e,dynamicChildren:fe,shapeFlag:Ie,patchFlag:Se,dirs:$e,cacheIndex:We}=F;if(Se===-2&&(le=!1),be!=null&&Rh(be,null,K,F,!0),We!=null&&(N.renderCache[We]=void 0),Ie&256){N.ctx.deactivate(F);return}const mt=Ie&1&&$e,Vt=!Pl(F);let Tt;if(Vt&&(Tt=Ee&&Ee.onVnodeBeforeUnmount)&&Ns(Tt,N,F),Ie&6)ae(F.component,K,de);else{if(Ie&128){F.suspense.unmount(K,de);return}mt&&Ko(F,null,N,"beforeUnmount"),Ie&64?F.type.remove(F,N,K,U,de):fe&&!fe.hasOnce&&(we!==Ce||Se>0&&Se&64)?oe(fe,N,K,!1,!0):(we===Ce&&Se&384||!le&&Ie&16)&&oe(_e,N,K),de&&J(F)}(Vt&&(Tt=Ee&&Ee.onVnodeUnmounted)||mt)&&lr(()=>{Tt&&Ns(Tt,N,F),mt&&Ko(F,null,N,"unmounted")},K)},J=F=>{const{type:N,el:K,anchor:de,transition:le}=F;if(N===Ce){pe(K,de);return}if(N===Xm){C(F);return}const we=()=>{s(K),le&&!le.persisted&&le.afterLeave&&le.afterLeave()};if(F.shapeFlag&1&&le&&!le.persisted){const{leave:Ee,delayLeave:be}=le,_e=()=>Ee(K,we);be?be(F.el,we,_e):_e()}else we()},pe=(F,N)=>{let K;for(;F!==N;)K=f(F),s(F),F=K;s(N)},ae=(F,N,K)=>{const{bum:de,scope:le,job:we,subTree:Ee,um:be,m:_e,a:fe}=F;jS(_e),jS(fe),de&&Wf(de),le.stop(),we&&(we.flags|=8,W(Ee,F,N,K)),be&&lr(be,N),lr(()=>{F.isUnmounted=!0},N),N&&N.pendingBranch&&!N.isUnmounted&&F.asyncDep&&!F.asyncResolved&&F.suspenseId===N.pendingId&&(N.deps--,N.deps===0&&N.resolve())},oe=(F,N,K,de=!1,le=!1,we=0)=>{for(let Ee=we;Ee<F.length;Ee++)W(F[Ee],N,K,de,le)},ee=F=>{if(F.shapeFlag&6)return ee(F.component.subTree);if(F.shapeFlag&128)return F.suspense.next();const N=f(F.anchor||F.el),K=N&&N[uC];return K?f(K):N};let me=!1;const ne=(F,N,K)=>{F==null?N._vnode&&W(N._vnode,null,null,!0):m(N._vnode||null,F,N,null,null,null,K),N._vnode=F,me||(me=!0,MS(),oC(),me=!1)},U={p:m,um:W,m:te,r:J,mt:D,mc:x,pc:q,pbc:P,n:ee,o:e};let Fe,at;return{render:ne,hydrate:Fe,createApp:A$(ne,Fe)}}function Km({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 Yo({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function B$(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Tb(e,t,n=!1){const r=e.children,s=t.children;if(je(r)&&je(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]=eo(s[i]),a.el=o.el),!n&&a.patchFlag!==-2&&Tb(o,a)),a.type===Cd&&(a.el=o.el)}}function U$(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 LC(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:LC(t)}function jS(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const H$=Symbol.for("v-scx"),z$=()=>Ke(H$);function Un(e,t){return Rb(e,null,t)}function xe(e,t,n){return Rb(e,t,n)}function Rb(e,t,n=$t){const{immediate:r,deep:s,flush:i,once:o}=n,a=pn({},n),l=t&&r||!t&&i!=="post";let u;if(Fc){if(i==="sync"){const p=z$();u=p.__watcherHandles||(p.__watcherHandles=[])}else if(!l){const p=()=>{};return p.stop=ri,p.resume=ri,p.pause=ri,p}}const c=An;a.call=(p,g,m)=>xs(p,c,g,m);let d=!1;i==="post"?a.scheduler=p=>{lr(p,c&&c.suspense)}:i!=="sync"&&(d=!0,a.scheduler=(p,g)=>{g?p():bb(p)}),a.augmentJob=p=>{t&&(p.flags|=4),d&&(p.flags|=2,c&&(p.id=c.uid,p.i=c))};const f=l$(e,t,a);return Fc&&(u?u.push(f):l&&f()),f}function j$(e,t,n){const r=this.proxy,s=rn(e)?e.includes(".")?FC(r,e):()=>r[e]:e.bind(r,r);let i;Qe(t)?i=t:(i=t.handler,n=t);const o=Td(this),a=Rb(s,i.bind(r),n);return o(),a}function FC(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 q$=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Pr(t)}Modifiers`]||e[`${Do(t)}Modifiers`];function W$(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||$t;let s=n;const i=t.startsWith("update:"),o=i&&q$(r,t.slice(7));o&&(o.trim&&(s=n.map(c=>rn(c)?c.trim():c)),o.number&&(s=n.map(sv)));let a,l=r[a=Um(t)]||r[a=Um(Pr(t))];!l&&i&&(l=r[a=Um(Do(t))]),l&&xs(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,xs(u,e,6,s)}}function NC(e,t,n=!1){const r=t.emitsCache,s=r.get(e);if(s!==void 0)return s;const i=e.emits;let o={},a=!1;if(!Qe(e)){const l=u=>{const c=NC(u,t,!0);c&&(a=!0,pn(o,c))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!i&&!a?(Gt(e)&&r.set(e,null),null):(je(i)?i.forEach(l=>o[l]=null):pn(o,i),Gt(e)&&r.set(e,o),o)}function Vp(e,t){return!e||!Ep(t)?!1:(t=t.slice(2).replace(/Once$/,""),Ct(e,t[0].toLowerCase()+t.slice(1))||Ct(e,Do(t))||Ct(e,t))}function Ym(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:g,inheritAttrs:m}=e,y=Th(e);let b,w;try{if(n.shapeFlag&4){const C=s||r,_=C;b=Qs(u.call(_,C,c,d,p,f,g)),w=a}else{const C=t;b=Qs(C.length>1?C(d,{attrs:a,slots:o,emit:l}):C(d,null)),w=t.props?a:G$(a)}}catch(C){gc.length=0,Mp(C,e,1),b=h(Xn)}let S=b;if(w&&m!==!1){const C=Object.keys(w),{shapeFlag:_}=S;C.length&&_&7&&(i&&C.some(cb)&&(w=K$(w,i)),S=Mi(S,w,!1,!0))}return n.dirs&&(S=Mi(S,null,!1,!0),S.dirs=S.dirs?S.dirs.concat(n.dirs):n.dirs),n.transition&&Oa(S,n.transition),b=S,Th(y),b}const G$=e=>{let t;for(const n in e)(n==="class"||n==="style"||Ep(n))&&((t||(t={}))[n]=e[n]);return t},K$=(e,t)=>{const n={};for(const r in e)(!cb(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function Y$(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?qS(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]&&!Vp(u,f))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:r===o?!1:r?o?qS(r,o,u):!0:!!o;return!1}function qS(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]&&!Vp(n,i))return!0}return!1}function X$({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 VC=e=>e.__isSuspense;function Q$(e,t){t&&t.pendingBranch?je(e)?t.effects.push(...e):t.effects.push(e):d$(e)}const Ce=Symbol.for("v-fgt"),Cd=Symbol.for("v-txt"),Xn=Symbol.for("v-cmt"),Xm=Symbol.for("v-stc"),gc=[];let zr=null;function L(e=!1){gc.push(zr=e?null:[])}function J$(){gc.pop(),zr=gc[gc.length-1]||null}let Lc=1;function WS(e,t=!1){Lc+=e,e<0&&zr&&t&&(zr.hasOnce=!0)}function BC(e){return e.dynamicChildren=Lc>0?zr||Cl:null,J$(),Lc>0&&zr&&zr.push(e),e}function ye(e,t,n,r,s,i){return BC($(e,t,n,r,s,i,!0))}function Z(e,t,n,r,s){return BC(h(e,t,n,r,s,!0))}function Xl(e){return e?e.__v_isVNode===!0:!1}function aa(e,t){return e.type===t.type&&e.key===t.key}const UC=({key:e})=>e??null,Kf=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?rn(e)||Xe(e)||Qe(e)?{i:kn,r:e,k:t,f:!!n}:e:null);function $(e,t=null,n=null,r=0,s=null,i=e===Ce?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&UC(t),ref:t&&Kf(t),scopeId:lC,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:kn};return a?(Pb(l,n),i&128&&e.normalize(l)):n&&(l.shapeFlag|=rn(n)?8:16),Lc>0&&!o&&zr&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&zr.push(l),l}const h=Z$;function Z$(e,t=null,n=null,r=0,s=null,i=!1){if((!e||e===_$)&&(e=Xn),Xl(e)){const a=Mi(e,t,!0);return n&&Pb(a,n),Lc>0&&!i&&zr&&(a.shapeFlag&6?zr[zr.indexOf(e)]=a:zr.push(a)),a.patchFlag=-2,a}if(lL(e)&&(e=e.__vccOpts),t){t=Ih(t);let{class:a,style:l}=t;a&&!rn(a)&&(t.class=ja(a)),Gt(l)&&(xd(l)&&!je(l)&&(l=pn({},l)),t.style=ii(l))}const o=rn(e)?1:VC(e)?128:cC(e)?64:Gt(e)?4:Qe(e)?2:0;return $(e,t,n,r,s,o,i,!0)}function Ih(e){return e?xd(e)||PC(e)?pn({},e):e:null}function Mi(e,t,n=!1,r=!1){const{props:s,ref:i,patchFlag:o,children:a,transition:l}=e,u=t?ve(s||{},t):s,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&UC(u),ref:t&&t.ref?n&&i?je(i)?i.concat(Kf(t)):[i,Kf(t)]:Kf(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!==Ce?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&&Mi(e.ssContent),ssFallback:e.ssFallback&&Mi(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&Oa(c,l.clone(c)),c}function k(e=" ",t=0){return h(Cd,null,e,t)}function he(e="",t=!1){return t?(L(),Z(Xn,null,e)):h(Xn,null,e)}function Qs(e){return e==null||typeof e=="boolean"?h(Xn):je(e)?h(Ce,null,e.slice()):Xl(e)?eo(e):h(Cd,null,String(e))}function eo(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Mi(e)}function Pb(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(je(t))n=16;else if(typeof t=="object")if(r&65){const s=t.default;s&&(s._c&&(s._d=!1),Pb(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!PC(t)?t._ctx=kn:s===3&&kn&&(kn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Qe(t)?(t={default:t,_ctx:kn},n=32):(t=String(t),r&64?(n=16,t=[k(t)]):n=8);e.children=t,e.shapeFlag|=n}function ve(...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=ja([t.class,r.class]));else if(s==="style")t.style=ii([t.style,r.style]);else if(Ep(s)){const i=t[s],o=r[s];o&&i!==o&&!(je(i)&&i.includes(o))&&(t[s]=i?[].concat(i,o):o)}else s!==""&&(t[s]=r[s])}return t}function Ns(e,t,n,r=null){xs(e,t,7,[n,r])}const eL=EC();let tL=0;function nL(e,t,n){const r=e.type,s=(t?t.appContext:e.appContext)||eL,i={uid:tL++,vnode:e,type:r,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new BE(!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:AC(r,s),emitsOptions:NC(r,s),emit:null,emitted:null,propsDefaults:$t,inheritAttrs:r.inheritAttrs,ctx:$t,data:$t,props:$t,attrs:$t,slots:$t,refs:$t,setupState:$t,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=W$.bind(null,i),e.ce&&e.ce(i),i}let An=null;const Ib=()=>An||kn;let Ah,mv;{const e=Rp(),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)}};Ah=t("__VUE_INSTANCE_SETTERS__",n=>An=n),mv=t("__VUE_SSR_SETTERS__",n=>Fc=n)}const Td=e=>{const t=An;return Ah(e),e.scope.on(),()=>{e.scope.off(),Ah(t)}},GS=()=>{An&&An.scope.off(),Ah(null)};function HC(e){return e.vnode.shapeFlag&4}let Fc=!1;function rL(e,t=!1,n=!1){t&&mv(t);const{props:r,children:s}=e.vnode,i=HC(e);O$(e,r,i,t),L$(e,s,n);const o=i?sL(e,t):void 0;return t&&mv(!1),o}function sL(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,x$);const{setup:r}=n;if(r){$o();const s=e.setupContext=r.length>1?oL(e):null,i=Td(e),o=Ed(r,e,0,[e.props,s]),a=ME(o);if(Lo(),i(),(a||e.sp)&&!Pl(e)&&yC(e),a){if(o.then(GS,GS),t)return o.then(l=>{KS(e,l,t)}).catch(l=>{Mp(l,e,0)});e.asyncDep=o}else KS(e,o,t)}else zC(e,t)}function KS(e,t,n){Qe(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Gt(t)&&(e.setupState=nC(t)),zC(e,n)}let YS;function zC(e,t,n){const r=e.type;if(!e.render){if(!t&&YS&&!r.render){const s=r.template||Eb(e).template;if(s){const{isCustomElement:i,compilerOptions:o}=e.appContext.config,{delimiters:a,compilerOptions:l}=r,u=pn(pn({isCustomElement:i,delimiters:a},o),l);r.render=YS(s,u)}}e.render=r.render||ri}{const s=Td(e);$o();try{E$(e)}finally{Lo(),s()}}}const iL={get(e,t){return Kn(e,"get",""),e[t]}};function oL(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,iL),slots:e.slots,emit:e.emit,expose:t}}function Bp(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(nC(Op(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in mc)return mc[n](e)},has(t,n){return n in t||n in mc}})):e.proxy}function aL(e,t=!0){return Qe(e)?e.displayName||e.name:e.name||t&&e.__name}function lL(e){return Qe(e)&&"__vccOpts"in e}const I=(e,t)=>o$(e,t,Fc);function Ir(e,t,n){const r=arguments.length;return r===2?Gt(t)&&!je(t)?Xl(t)?h(e,null,[t]):h(e,t):h(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Xl(n)&&(n=[n]),h(e,t,n))}const jC="3.5.13";/**
|
|
14
|
-
* @vue/runtime-dom v3.5.13
|
|
15
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
16
|
-
* @license MIT
|
|
17
|
-
**/let gv;const XS=typeof window<"u"&&window.trustedTypes;if(XS)try{gv=XS.createPolicy("vue",{createHTML:e=>e})}catch{}const qC=gv?e=>gv.createHTML(e):e=>e,uL="http://www.w3.org/2000/svg",cL="http://www.w3.org/1998/Math/MathML",ki=typeof document<"u"?document:null,QS=ki&&ki.createElement("template"),dL={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"?ki.createElementNS(uL,e):t==="mathml"?ki.createElementNS(cL,e):n?ki.createElement(e,{is:n}):ki.createElement(e);return e==="select"&&r&&r.multiple!=null&&s.setAttribute("multiple",r.multiple),s},createText:e=>ki.createTextNode(e),createComment:e=>ki.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ki.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{QS.innerHTML=qC(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const a=QS.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]}},Wi="transition",zu="animation",Ql=Symbol("_vtc"),WC={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},GC=pn({},pC,WC),fL=e=>(e.displayName="Transition",e.props=GC,e),Po=fL((e,{slots:t})=>Ir(m$,KC(e),t)),Xo=(e,t=[])=>{je(e)?e.forEach(n=>n(...t)):e&&e(...t)},JS=e=>e?je(e)?e.some(t=>t.length>1):e.length>1:!1;function KC(e){const t={};for(const O in e)O in WC||(t[O]=e[O]);if(e.css===!1)return t;const{name:n="v",type:r,duration:s,enterFromClass:i=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=i,appearActiveClass:u=o,appearToClass:c=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,g=hL(s),m=g&&g[0],y=g&&g[1],{onBeforeEnter:b,onEnter:w,onEnterCancelled:S,onLeave:C,onLeaveCancelled:_,onBeforeAppear:R=b,onAppear:T=w,onAppearCancelled:x=S}=t,E=(O,A,D,H)=>{O._enterCancelled=H,Yi(O,A?c:a),Yi(O,A?u:o),D&&D()},P=(O,A)=>{O._isLeaving=!1,Yi(O,d),Yi(O,p),Yi(O,f),A&&A()},M=O=>(A,D)=>{const H=O?T:w,z=()=>E(A,O,D);Xo(H,[A,z]),ZS(()=>{Yi(A,O?l:i),Hs(A,O?c:a),JS(H)||e_(A,r,m,z)})};return pn(t,{onBeforeEnter(O){Xo(b,[O]),Hs(O,i),Hs(O,o)},onBeforeAppear(O){Xo(R,[O]),Hs(O,l),Hs(O,u)},onEnter:M(!1),onAppear:M(!0),onLeave(O,A){O._isLeaving=!0;const D=()=>P(O,A);Hs(O,d),O._enterCancelled?(Hs(O,f),vv()):(vv(),Hs(O,f)),ZS(()=>{O._isLeaving&&(Yi(O,d),Hs(O,p),JS(C)||e_(O,r,y,D))}),Xo(C,[O,D])},onEnterCancelled(O){E(O,!1,void 0,!0),Xo(S,[O])},onAppearCancelled(O){E(O,!0,void 0,!0),Xo(x,[O])},onLeaveCancelled(O){P(O),Xo(_,[O])}})}function hL(e){if(e==null)return null;if(Gt(e))return[Qm(e.enter),Qm(e.leave)];{const t=Qm(e);return[t,t]}}function Qm(e){return PD(e)}function Hs(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Ql]||(e[Ql]=new Set)).add(t)}function Yi(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[Ql];n&&(n.delete(t),n.size||(e[Ql]=void 0))}function ZS(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let pL=0;function e_(e,t,n,r){const s=e._endId=++pL,i=()=>{s===e._endId&&r()};if(n!=null)return setTimeout(i,n);const{type:o,timeout:a,propCount:l}=YC(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 YC(e,t){const n=window.getComputedStyle(e),r=g=>(n[g]||"").split(", "),s=r(`${Wi}Delay`),i=r(`${Wi}Duration`),o=t_(s,i),a=r(`${zu}Delay`),l=r(`${zu}Duration`),u=t_(a,l);let c=null,d=0,f=0;t===Wi?o>0&&(c=Wi,d=o,f=i.length):t===zu?u>0&&(c=zu,d=u,f=l.length):(d=Math.max(o,u),c=d>0?o>u?Wi:zu:null,f=c?c===Wi?i.length:l.length:0);const p=c===Wi&&/\b(transform|all)(,|$)/.test(r(`${Wi}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:p}}function t_(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>n_(n)+n_(e[r])))}function n_(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function vv(){return document.body.offsetHeight}function mL(e,t,n){const r=e[Ql];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Oh=Symbol("_vod"),XC=Symbol("_vsh"),No={beforeMount(e,{value:t},{transition:n}){e[Oh]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):ju(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),ju(e,!0),r.enter(e)):r.leave(e,()=>{ju(e,!1)}):ju(e,t))},beforeUnmount(e,{value:t}){ju(e,t)}};function ju(e,t){e.style.display=t?e[Oh]:"none",e[XC]=!t}const gL=Symbol(""),vL=/(^|;)\s*display\s*:/;function yL(e,t,n){const r=e.style,s=rn(n);let i=!1;if(n&&!s){if(t)if(rn(t))for(const o of t.split(";")){const a=o.slice(0,o.indexOf(":")).trim();n[a]==null&&Yf(r,a,"")}else for(const o in t)n[o]==null&&Yf(r,o,"");for(const o in n)o==="display"&&(i=!0),Yf(r,o,n[o])}else if(s){if(t!==n){const o=r[gL];o&&(n+=";"+o),r.cssText=n,i=vL.test(n)}}else t&&e.removeAttribute("style");Oh in e&&(e[Oh]=i?r.display:"",e[XC]&&(r.display="none"))}const r_=/\s*!important$/;function Yf(e,t,n){if(je(n))n.forEach(r=>Yf(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=bL(e,t);r_.test(n)?e.setProperty(Do(r),n.replace(r_,""),"important"):e[r]=n}}const s_=["Webkit","Moz","ms"],Jm={};function bL(e,t){const n=Jm[t];if(n)return n;let r=Pr(t);if(r!=="filter"&&r in e)return Jm[t]=r;r=li(r);for(let s=0;s<s_.length;s++){const i=s_[s]+r;if(i in e)return Jm[t]=i}return t}const i_="http://www.w3.org/1999/xlink";function o_(e,t,n,r,s,i=$D(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(i_,t.slice(6,t.length)):e.setAttributeNS(i_,t,n):n==null||i&&!FE(n)?e.removeAttribute(t):e.setAttribute(t,i?"":Ui(n)?String(n):n)}function a_(e,t,n,r,s){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?qC(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=FE(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 pl(e,t,n,r){e.addEventListener(t,n,r)}function wL(e,t,n,r){e.removeEventListener(t,n,r)}const l_=Symbol("_vei");function SL(e,t,n,r,s=null){const i=e[l_]||(e[l_]={}),o=i[t];if(r&&o)o.value=r;else{const[a,l]=_L(t);if(r){const u=i[t]=EL(r,s);pl(e,a,u,l)}else o&&(wL(e,a,o,l),i[t]=void 0)}}const u_=/(?:Once|Passive|Capture)$/;function _L(e){let t;if(u_.test(e)){t={};let r;for(;r=e.match(u_);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Do(e.slice(2)),t]}let Zm=0;const kL=Promise.resolve(),xL=()=>Zm||(kL.then(()=>Zm=0),Zm=Date.now());function EL(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;xs(CL(r,n.value),t,5,[r])};return n.value=e,n.attached=xL(),n}function CL(e,t){if(je(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 c_=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,TL=(e,t,n,r,s,i)=>{const o=s==="svg";t==="class"?mL(e,r,o):t==="style"?yL(e,n,r):Ep(t)?cb(t)||SL(e,t,n,r,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):RL(e,t,r,o))?(a_(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&o_(e,t,r,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!rn(r))?a_(e,Pr(t),r,i,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),o_(e,t,r,o))};function RL(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&c_(t)&&Qe(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||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 c_(t)&&rn(n)?!1:t in e}const QC=new WeakMap,JC=new WeakMap,Mh=Symbol("_moveCb"),d_=Symbol("_enterCb"),PL=e=>(delete e.props.mode,e),IL=PL({name:"TransitionGroup",props:pn({},GC,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Ib(),r=hC();let s,i;return _b(()=>{if(!s.length)return;const o=e.moveClass||`${e.name||"v"}-move`;if(!DL(s[0].el,n.vnode.el,o))return;s.forEach(AL),s.forEach(OL);const a=s.filter(ML);vv(),a.forEach(l=>{const u=l.el,c=u.style;Hs(u,o),c.transform=c.webkitTransform=c.transitionDuration="";const d=u[Mh]=f=>{f&&f.target!==u||(!f||/transform$/.test(f.propertyName))&&(u.removeEventListener("transitionend",d),u[Mh]=null,Yi(u,o))};u.addEventListener("transitionend",d)})}),()=>{const o=Be(e),a=KC(o);let l=o.tag||Ce;if(s=[],i)for(let u=0;u<i.length;u++){const c=i[u];c.el&&c.el instanceof Element&&(s.push(c),Oa(c,$c(c,a,r,n)),QC.set(c,c.el.getBoundingClientRect()))}i=t.default?wb(t.default()):[];for(let u=0;u<i.length;u++){const c=i[u];c.key!=null&&Oa(c,$c(c,a,r,n))}return h(l,null,i)}}}),Ab=IL;function AL(e){const t=e.el;t[Mh]&&t[Mh](),t[d_]&&t[d_]()}function OL(e){JC.set(e,e.el.getBoundingClientRect())}function ML(e){const t=QC.get(e),n=JC.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 DL(e,t,n){const r=e.cloneNode(),s=e[Ql];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}=YC(r);return i.removeChild(r),o}const f_=e=>{const t=e.props["onUpdate:modelValue"]||!1;return je(t)?n=>Wf(t,n):t};function $L(e){e.target.composing=!0}function h_(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const eg=Symbol("_assign"),LL={created(e,{modifiers:{lazy:t,trim:n,number:r}},s){e[eg]=f_(s);const i=r||s.props&&s.props.type==="number";pl(e,t?"change":"input",o=>{if(o.target.composing)return;let a=e.value;n&&(a=a.trim()),i&&(a=sv(a)),e[eg](a)}),n&&pl(e,"change",()=>{e.value=e.value.trim()}),t||(pl(e,"compositionstart",$L),pl(e,"compositionend",h_),pl(e,"change",h_))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:s,number:i}},o){if(e[eg]=f_(o),e.composing)return;const a=(i||e.type==="number")&&!/^0\d/.test(e.value)?sv(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))}},FL=["ctrl","shift","alt","meta"],NL={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)=>FL.some(n=>e[`${n}Key`]&&!t.includes(n))},Dt=(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=NL[t[o]];if(a&&a(s,t))return}return e(s,...i)})},VL={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},yv=(e,t)=>{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=s=>{if(!("key"in s))return;const i=Do(s.key);if(t.some(o=>o===i||VL[o]===i))return e(s)})},BL=pn({patchProp:TL},dL);let p_;function UL(){return p_||(p_=N$(BL))}const HL=(...e)=>{const t=UL().createApp(...e),{mount:n}=t;return t.mount=r=>{const s=jL(r);if(!s)return;const i=t._component;!Qe(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const o=n(s,!1,zL(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},t};function zL(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function jL(e){return rn(e)?document.querySelector(e):e}var qL=!1;/*!
|
|
18
|
-
* pinia v2.2.8
|
|
19
|
-
* (c) 2024 Eduardo San Martin Morote
|
|
20
|
-
* @license MIT
|
|
21
|
-
*/let ZC;const Up=e=>ZC=e,eT=Symbol();function bv(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var vc;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(vc||(vc={}));function WL(){const e=_d(!0),t=e.run(()=>B({}));let n=[],r=[];const s=Op({install(i){Up(s),s._a=i,i.provide(eT,s),i.config.globalProperties.$pinia=s,r.forEach(o=>n.push(o)),r=[]},use(i){return!this._a&&!qL?r.push(i):n.push(i),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return s}const tT=()=>{};function m_(e,t,n,r=tT){e.push(t);const s=()=>{const i=e.indexOf(t);i>-1&&(e.splice(i,1),r())};return!n&&Pp()&&yn(s),s}function nl(e,...t){e.slice().forEach(n=>{n(...t)})}const GL=e=>e(),g_=Symbol(),tg=Symbol();function wv(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];bv(s)&&bv(r)&&e.hasOwnProperty(n)&&!Xe(r)&&!So(r)?e[n]=wv(s,r):e[n]=r}return e}const KL=Symbol();function YL(e){return!bv(e)||!e.hasOwnProperty(KL)}const{assign:Xi}=Object;function XL(e){return!!(Xe(e)&&e.effect)}function QL(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=Fo(n.state.value[e]);return Xi(c,i,Object.keys(o||{}).reduce((d,f)=>(d[f]=Op(I(()=>{Up(n);const p=n._s.get(e);return o[f].call(p,p)})),d),{}))}return l=nT(e,u,t,n,r,!0),l}function nT(e,t,n={},r,s,i){let o;const a=Xi({actions:{}},n),l={deep:!0};let u,c,d=[],f=[],p;const g=r.state.value[e];!i&&!g&&(r.state.value[e]={}),B({});let m;function y(x){let E;u=c=!1,typeof x=="function"?(x(r.state.value[e]),E={type:vc.patchFunction,storeId:e,events:p}):(wv(r.state.value[e],x),E={type:vc.patchObject,payload:x,storeId:e,events:p});const P=m=Symbol();At().then(()=>{m===P&&(u=!0)}),c=!0,nl(d,E,r.state.value[e])}const b=i?function(){const{state:E}=n,P=E?E():{};this.$patch(M=>{Xi(M,P)})}:tT;function w(){o.stop(),d=[],f=[],r._s.delete(e)}const S=(x,E="")=>{if(g_ in x)return x[tg]=E,x;const P=function(){Up(r);const M=Array.from(arguments),O=[],A=[];function D(Y){O.push(Y)}function H(Y){A.push(Y)}nl(f,{args:M,name:P[tg],store:_,after:D,onError:H});let z;try{z=x.apply(this&&this.$id===e?this:_,M)}catch(Y){throw nl(A,Y),Y}return z instanceof Promise?z.then(Y=>(nl(O,Y),Y)).catch(Y=>(nl(A,Y),Promise.reject(Y))):(nl(O,z),z)};return P[g_]=!0,P[tg]=E,P},C={_p:r,$id:e,$onAction:m_.bind(null,f),$patch:y,$reset:b,$subscribe(x,E={}){const P=m_(d,x,E.detached,()=>M()),M=o.run(()=>xe(()=>r.state.value[e],O=>{(E.flush==="sync"?c:u)&&x({storeId:e,type:vc.direct,events:p},O)},Xi({},l,E)));return P},$dispose:w},_=mn(C);r._s.set(e,_);const T=(r._a&&r._a.runWithContext||GL)(()=>r._e.run(()=>(o=_d()).run(()=>t({action:S}))));for(const x in T){const E=T[x];if(Xe(E)&&!XL(E)||So(E))i||(g&&YL(E)&&(Xe(E)?E.value=g[x]:wv(E,g[x])),r.state.value[e][x]=E);else if(typeof E=="function"){const P=S(E,x);T[x]=P,a.actions[x]=E}}return Xi(_,T),Xi(Be(_),T),Object.defineProperty(_,"$state",{get:()=>r.state.value[e],set:x=>{y(E=>{Xi(E,x)})}}),r._p.forEach(x=>{Xi(_,o.run(()=>x({store:_,app:r._a,pinia:r,options:a})))}),g&&i&&n.hydrate&&n.hydrate(_.$state,g),u=!0,c=!0,_}/*! #__NO_SIDE_EFFECTS__ */function Ts(e,t,n){let r,s;const i=typeof t=="function";typeof e=="string"?(r=e,s=i?n:t):(s=e,r=e.id);function o(a,l){const u=CC();return a=a||(u?Ke(eT,null):null),a&&Up(a),a=ZC,a._s.has(r)||(i?nT(r,t,s,a):QL(r,s,a)),a._s.get(r)}return o.$id=r,o}const rT=Ts("Dialog",{state:()=>({ids:[],dialogsById:{}}),getters:{dialogs(){return this.ids.map(e=>this.dialogsById[e])},getBeforeOpenedCallback(){return e=>{var t;return(t=this.dialogsById[e])==null?void 0:t.beforeOpenedCallback}},getOpenedCallback(){return e=>{var t;return(t=this.dialogsById[e])==null?void 0:t.openedCallback}},getContext(){return e=>{var t;return(t=this.dialogsById[e])==null?void 0:t.context}},getOutput(){return e=>{var t;return(t=this.dialogsById[e])==null?void 0:t.output}},isDialogOpened(){return e=>{var t;return(t=this.dialogsById[e])==null?void 0:t.opened}}},actions:{openDialogWithContext(e,t){let n=this.dialogsById[e];n||(n=this.registerDialogReference(e)),n.opened=!0,n.context=t,this.dialogsById={...this.dialogsById},console.debug(`[Pinia Dialog ${e}] Opened with context`,t)},closeDialog(e,t){let n=this.dialogsById[e];n||(n=this.registerDialogReference(e)),n.opened=!1,delete n.context,n.output=t,this.dialogsById={...this.dialogsById},console.debug(`[Pinia Dialog ${e}] Closed`)},unregisterDialogReference(e){delete this.dialogsById[e],this.ids=this.ids.filter(t=>t!==e)},registerDialogReference(e,t){if(!e)throw new Error("Cannot unregister undefined dialog reference");console.debug(`[Pinia Dialog ${e}] Registered`);const n=this.dialogsById[e];if(n)return console.debug(`[Pinia Dialog ${e}] Already registered dialog, not registering again`),n;const r={id:e,opened:!1,beforeOpenedCallback:t==null?void 0:t.beforeOpenedCallback,openedCallback:t==null?void 0:t.openedCallback};return this.dialogsById[e]=r,this.ids.push(e),r}}});function Sv(e){return Pp()?(yn(e),!0):!1}function Jl(e){return typeof e=="function"?e():Q(e)}const _v=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const JL=Object.prototype.toString,ZL=e=>JL.call(e)==="[object Object]",eF=()=>{};function tF(e,t=1e3,n={}){const{immediate:r=!0,immediateCallback:s=!1}=n;let i=null;const o=B(!1);function a(){i&&(clearInterval(i),i=null)}function l(){o.value=!1,a()}function u(){const c=Jl(t);c<=0||(o.value=!0,s&&e(),a(),o.value&&(i=setInterval(e,c)))}if(r&&_v&&u(),Xe(t)||typeof t=="function"){const c=xe(t,()=>{o.value&&_v&&u()});Sv(c)}return Sv(l),{isActive:o,pause:l,resume:u}}const sT=_v?window:void 0;function nF(e){var t;const n=Jl(e);return(t=n==null?void 0:n.$el)!=null?t:n}function rF(...e){let t,n,r,s;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,r,s]=e,t=sT):[t,n,r,s]=e,!t)return eF;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const i=[],o=()=>{i.forEach(c=>c()),i.length=0},a=(c,d,f,p)=>(c.addEventListener(d,f,p),()=>c.removeEventListener(d,f,p)),l=xe(()=>[nF(t),Jl(s)],([c,d])=>{if(o(),!c)return;const f=ZL(d)?{...d}:d;i.push(...n.flatMap(p=>r.map(g=>a(c,p,g,f))))},{immediate:!0,flush:"post"}),u=()=>{l(),o()};return Sv(u),u}function sF(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function iF(...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=sT,eventName:i="keydown",passive:o=!1,dedupe:a=!1}=r,l=sF(t);return rF(s,i,c=>{c.repeat&&Jl(a)||l(c)&&n(c)},o)}const qu=new Map;function Ur(e){const t=Pp();function n(a){var l;const u=qu.get(e)||new Set;u.add(a),qu.set(e,u);const c=()=>s(a);return(l=t==null?void 0:t.cleanups)==null||l.push(c),c}function r(a){function l(...u){s(l),a(...u)}return n(l)}function s(a){const l=qu.get(e);l&&(l.delete(a),l.size||i())}function i(){qu.delete(e)}function o(a,l){var u;(u=qu.get(e))==null||u.forEach(c=>c(a,l))}return{on:n,once:r,off:s,emit:o,reset:i}}function en(e){const t=rT();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=>{Un(()=>{t.isDialogOpened(e)||s(t.getOutput(e))})}))}}const kt=typeof window<"u",Ob=kt&&"IntersectionObserver"in window,oF=kt&&("ontouchstart"in window||window.navigator.maxTouchPoints>0);function v_(e,t,n){aF(e,t),t.set(e,n)}function aF(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function lF(e,t,n){return e.set(iT(e,t),n),n}function Qo(e,t){return e.get(iT(e,t))}function iT(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 oT(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 Vo(e,t){if(e===t)return!0;if(e instanceof Date&&t instanceof Date&&e.getTime()!==t.getTime()||e!==Object(e)||t!==Object(t))return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(r=>Vo(e[r],t[r]))}function Ma(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(/^\./,""),oT(e,t.split("."),n))}function Qn(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 Ma(e,t,n);if(Array.isArray(t))return oT(e,t,n);if(typeof t!="function")return n;const r=t(e,n);return typeof r>"u"?n:r}function vl(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Array.from({length:e},(n,r)=>t+r)}function Ve(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"px";if(!(e==null||e===""))return isNaN(+e)?String(e):isFinite(+e)?`${Number(e)}${t}`:void 0}function uF(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function y_(e){let t;return e!==null&&typeof e=="object"&&((t=Object.getPrototypeOf(e))===Object.prototype||t===null)}function Mb(e){if(e&&"$el"in e){const t=e.$el;return(t==null?void 0:t.nodeType)===Node.TEXT_NODE?t.nextElementSibling:t}return e}const b_=Object.freeze({enter:13,tab:9,delete:46,esc:27,space:32,up:38,down:40,left:37,right:39,end:35,home:36,del:46,backspace:8,insert:45,pageup:33,pagedown:34,shift:16}),w_=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 aT(e){return Object.keys(e)}function ng(e,t){return t.every(n=>e.hasOwnProperty(n))}function lT(e,t){const n={},r=new Set(Object.keys(e));for(const s of t)r.has(s)&&(n[s]=e[s]);return n}function kv(e,t,n){const r=Object.create(null),s=Object.create(null);for(const i in e)t.some(o=>o instanceof RegExp?o.test(i):o===i)&&!(n!=null&&n.some(o=>o===i))?r[i]=e[i]:s[i]=e[i];return[r,s]}function Rs(e,t){const n={...e};return t.forEach(r=>delete n[r]),n}function uT(e,t){const n={};return t.forEach(r=>n[r]=e[r]),n}const cT=/^on[^a-z]/,Hp=e=>cT.test(e),cF=["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 qa(e){const[t,n]=kv(e,[cT]),r=Rs(t,cF),[s,i]=kv(n,["class","style","id",/^data-/]);return Object.assign(s,t),Object.assign(i,r),[s,i]}function On(e){return e==null?[]:Array.isArray(e)?e:[e]}function dF(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 Tr(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 S_(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 __(e,t){return(arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0").repeat(Math.max(0,t-e.length))+e}function fF(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 k_(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 Zn(){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(y_(i)&&y_(o)){r[s]=Zn(i,o,n);continue}if(n&&Array.isArray(i)&&Array.isArray(o)){r[s]=n(i,o);continue}r[s]=o}return r}function dT(e){return e.map(t=>t.type===Ce?dT(t.children):t).flat()}function ka(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(ka.cache.has(e))return ka.cache.get(e);const t=e.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return ka.cache.set(e,t),t}ka.cache=new Map;function yl(e,t){if(!t||typeof t!="object")return[];if(Array.isArray(t))return t.map(n=>yl(e,n)).flat(1);if(t.suspense)return yl(e,t.ssContent);if(Array.isArray(t.children))return t.children.map(n=>yl(e,n)).flat(1);if(t.component){if(Object.getOwnPropertySymbols(t.component.provides).includes(e))return[t.component];if(t.component.subTree)return yl(e,t.component.subTree).flat(1)}return[]}var nf=new WeakMap,rl=new WeakMap;class hF{constructor(t){v_(this,nf,[]),v_(this,rl,0),this.size=t}push(t){Qo(nf,this)[Qo(rl,this)]=t,lF(rl,this,(Qo(rl,this)+1)%this.size)}values(){return Qo(nf,this).slice(Qo(rl,this)).concat(Qo(nf,this).slice(0,Qo(rl,this)))}}function Db(e){const t=mn({}),n=I(e);return Un(()=>{for(const r in n.value)t[r]=n.value[r]},{flush:"sync"}),Fo(t)}function Dh(e,t){return e.includes(t)}function fT(e){return e[2].toLowerCase()+e.slice(3)}const Bn=()=>[Function,Array];function x_(e,t){return t="on"+li(t),!!(e[t]||e[`${t}Once`]||e[`${t}Capture`]||e[`${t}OnceCapture`]||e[`${t}CaptureOnce`])}function $b(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 Nc(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const n=["button","[href]",'input:not([type="hidden"])',"select","textarea","[tabindex]"].map(r=>`${r}${t?':not([tabindex="-1"])':""}:not([disabled])`).join(", ");return[...e.querySelectorAll(n)]}function hT(e,t,n){let r,s=e.indexOf(document.activeElement);const i=t==="next"?1:-1;do s+=i,r=e[s];while((!r||r.offsetParent==null||!((n==null?void 0:n(r))??!0))&&s<e.length&&s>=0);return r}function yc(e,t){var r,s,i,o;const n=Nc(e);if(!t)(e===document.activeElement||!e.contains(document.activeElement))&&((r=n[0])==null||r.focus());else if(t==="first")(s=n[0])==null||s.focus();else if(t==="last")(i=n.at(-1))==null||i.focus();else if(typeof t=="number")(o=n[t])==null||o.focus();else{const a=hT(n,t);a?a.focus():yc(e,t==="next"?"first":"last")}}function rf(e){return e==null||typeof e=="string"&&e.trim()===""}function $h(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 pT(e){return e.some(t=>Xl(t)?t.type===Xn?!1:t.type!==Ce||pT(t.children):!0)?e:null}function pF(e,t){if(!kt||e===0)return t(),()=>{};const n=window.setTimeout(t,e);return()=>window.clearTimeout(n)}function mF(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 xv(){const e=Oe(),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:()=>Mb(e.value)}),t}function E_(e){const t=e.key.length===1,n=!e.ctrlKey&&!e.metaKey&&!e.altKey;return t&&n}const mT=["top","bottom"],gF=["start","end","left","right"];function Ev(e,t){let[n,r]=e.split(" ");return r||(r=Dh(mT,n)?"start":Dh(gF,n)?"top":"center"),{side:Cv(n,t),align:Cv(r,t)}}function Cv(e,t){return e==="start"?t?"right":"left":e==="end"?t?"left":"right":e}function rg(e){return{side:{center:"center",top:"bottom",bottom:"top",left:"right",right:"left"}[e.side],align:e.align}}function sg(e){return{side:e.side,align:{center:"center",top:"bottom",bottom:"top",left:"right",right:"left"}[e.align]}}function C_(e){return{side:e.align,align:e.side}}function T_(e){return Dh(mT,e.side)?"y":"x"}class xa{constructor(t){let{x:n,y:r,width:s,height:i}=t;this.x=n,this.y=r,this.width=s,this.height=i}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 R_(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 gT(e){return Array.isArray(e)?new xa({x:e[0],y:e[1],width:0,height:0}):e.getBoundingClientRect()}function Lb(e){const t=e.getBoundingClientRect(),n=getComputedStyle(e),r=n.transform;if(r){let s,i,o,a,l;if(r.startsWith("matrix3d("))s=r.slice(9,-1).split(/, /),i=+s[0],o=+s[5],a=+s[12],l=+s[13];else if(r.startsWith("matrix("))s=r.slice(7,-1).split(/, /),i=+s[0],o=+s[3],a=+s[4],l=+s[5];else return new xa(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 xa({x:c,y:d,width:f,height:p})}else return new xa(t)}function bl(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 Xf=new WeakMap;function vF(e,t){Object.keys(t).forEach(n=>{if(Hp(n)){const r=fT(n),s=Xf.get(e);if(t[n]==null)s==null||s.forEach(i=>{const[o,a]=i;o===r&&(e.removeEventListener(r,a),s.delete(i))});else if(!s||![...s].some(i=>i[0]===r&&i[1]===t[n])){e.addEventListener(r,t[n]);const i=s||new Set;i.add([r,t[n]]),Xf.has(e)||Xf.set(e,i)}}else t[n]==null?e.removeAttribute(n):e.setAttribute(n,t[n])})}function yF(e,t){Object.keys(t).forEach(n=>{if(Hp(n)){const r=fT(n),s=Xf.get(e);s==null||s.forEach(i=>{const[o,a]=i;o===r&&(e.removeEventListener(r,a),s.delete(i))})}else e.removeAttribute(n)})}const sl=2.4,P_=.2126729,I_=.7151522,A_=.072175,bF=.55,wF=.58,SF=.57,_F=.62,sf=.03,O_=1.45,kF=5e-4,xF=1.25,EF=1.25,M_=.078,D_=12.82051282051282,of=.06,$_=.001;function L_(e,t){const n=(e.r/255)**sl,r=(e.g/255)**sl,s=(e.b/255)**sl,i=(t.r/255)**sl,o=(t.g/255)**sl,a=(t.b/255)**sl;let l=n*P_+r*I_+s*A_,u=i*P_+o*I_+a*A_;if(l<=sf&&(l+=(sf-l)**O_),u<=sf&&(u+=(sf-u)**O_),Math.abs(u-l)<kF)return 0;let c;if(u>l){const d=(u**bF-l**wF)*xF;c=d<$_?0:d<M_?d-d*D_*of:d-of}else{const d=(u**_F-l**SF)*EF;c=d>-$_?0:d>-M_?d-d*D_*of:d+of}return c*100}function CF(e,t){t=Array.isArray(t)?t.slice(0,-1).map(n=>`'${n}'`).join(", ")+` or '${t.at(-1)}'`:`'${t}'`}const Lh=.20689655172413793,TF=e=>e>Lh**3?Math.cbrt(e):e/(3*Lh**2)+4/29,RF=e=>e>Lh?e**3:3*Lh**2*(e-4/29);function vT(e){const t=TF,n=t(e[1]);return[116*n-16,500*(t(e[0]/.95047)-n),200*(n-t(e[2]/1.08883))]}function yT(e){const t=RF,n=(e[0]+16)/116;return[t(n+e[1]/500)*.95047,t(n),t(n-e[2]/200)*1.08883]}const PF=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]],IF=e=>e<=.0031308?e*12.92:1.055*e**(1/2.4)-.055,AF=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],OF=e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4;function bT(e){const t=Array(3),n=IF,r=PF;for(let s=0;s<3;++s)t[s]=Math.round(Tr(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 Fb(e){let{r:t,g:n,b:r}=e;const s=[0,0,0],i=OF,o=AF;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 Tv(e){return!!e&&/^(#|var\(--|(rgb|hsl)a?\()/.test(e)}function MF(e){return Tv(e)&&!/^((rgb|hsl)a?\()?var\(--/.test(e)}const F_=/^(?<fn>(?:rgb|hsl)a?)\((?<values>.+)\)/,DF={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)=>N_({h:e,s:t,l:n,a:r}),hsla:(e,t,n,r)=>N_({h:e,s:t,l:n,a:r}),hsv:(e,t,n,r)=>Vc({h:e,s:t,v:n,a:r}),hsva:(e,t,n,r)=>Vc({h:e,s:t,v:n,a:r})};function ei(e){if(typeof e=="number")return{r:(e&16711680)>>16,g:(e&65280)>>8,b:e&255};if(typeof e=="string"&&F_.test(e)){const{groups:t}=e.match(F_),{fn:n,values:r}=t,s=r.split(/,\s*/).map(i=>i.endsWith("%")&&["hsl","hsla","hsv","hsva"].includes(n)?parseFloat(i)/100:parseFloat(i));return DF[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),LF(t)}else if(typeof e=="object"){if(ng(e,["r","g","b"]))return e;if(ng(e,["h","s","l"]))return Vc(wT(e));if(ng(e,["h","s","v"]))return Vc(e)}throw new TypeError(`Invalid color: ${e==null?e:String(e)||e.constructor.name}
|
|
22
|
-
Expected #hex, #hexa, rgb(), rgba(), hsl(), hsla(), object or number`)}function Vc(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 N_(e){return Vc(wT(e))}function wT(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 af(e){const t=Math.round(e).toString(16);return("00".substr(0,2-t.length)+t).toUpperCase()}function $F(e){let{r:t,g:n,b:r,a:s}=e;return`#${[af(t),af(n),af(r),s!==void 0?af(Math.round(s*255)):""].join("")}`}function LF(e){e=FF(e);let[t,n,r,s]=fF(e,2).map(i=>parseInt(i,16));return s=s===void 0?s:s/255,{r:t,g:n,b:r,a:s}}function FF(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=S_(S_(e,6),8,"F")),e}function NF(e,t){const n=vT(Fb(e));return n[0]=n[0]+t*10,bT(yT(n))}function VF(e,t){const n=vT(Fb(e));return n[0]=n[0]-t*10,bT(yT(n))}function BF(e){const t=ei(e);return Fb(t)[1]}function ST(e){const t=Math.abs(L_(ei(0),ei(e)));return Math.abs(L_(ei(16777215),ei(e)))>Math.min(t,50)?"#fff":"#000"}function ce(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=ce({class:[String,Array,Object],style:{type:[String,Array,Object],default:null}},"component");function sn(e,t){const n=Ib();if(!n)throw new Error(`[Vuetify] ${e} must be called from inside a setup function`);return n}function ui(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"composables";const t=sn(e).type;return ka((t==null?void 0:t.aliasName)||(t==null?void 0:t.name))}let _T=0,Qf=new WeakMap;function gr(){const e=sn("getUid");if(Qf.has(e))return Qf.get(e);{const t=_T++;return Qf.set(e,t),t}}gr.reset=()=>{_T=0,Qf=new WeakMap};function UF(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:sn("injectSelf");const{provides:n}=t;if(n&&e in n)return n[e]}const Zl=Symbol.for("vuetify:defaults");function HF(e){return B(e)}function Nb(){const e=Ke(Zl);if(!e)throw new Error("[Vuetify] Could not find defaults instance");return e}function Ar(e,t){const n=Nb(),r=B(e),s=I(()=>{if(Q(t==null?void 0:t.disabled))return n.value;const o=Q(t==null?void 0:t.scoped),a=Q(t==null?void 0:t.reset),l=Q(t==null?void 0:t.root);if(r.value==null&&!(o||a||l))return n.value;let u=Zn(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=Zn(Zn(u,{prev:u}),u[l])),u}return u.prev?Zn(u.prev,u):u});return Wt(Zl,s),s}function zF(e,t){var n,r;return typeof((n=e.props)==null?void 0:n[t])<"u"||typeof((r=e.props)==null?void 0:r[ka(t)])<"u"}function jF(){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]:Nb();const r=sn("useDefaults");if(t=t??r.type.name??r.type.__name,!t)throw new Error("[Vuetify] Could not determine component name");const s=I(()=>{var l;return(l=n.value)==null?void 0:l[e._as??t]}),i=new Proxy(e,{get(l,u){var d,f,p,g,m,y,b;const c=Reflect.get(l,u);return u==="class"||u==="style"?[(d=s.value)==null?void 0:d[u],c].filter(w=>w!=null):typeof u=="string"&&!zF(r.vnode,u)?((f=s.value)==null?void 0:f[u])!==void 0?(p=s.value)==null?void 0:p[u]:((m=(g=n.value)==null?void 0:g.global)==null?void 0:m[u])!==void 0?(b=(y=n.value)==null?void 0:y.global)==null?void 0:b[u]:c:c}}),o=Oe();Un(()=>{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=UF(Zl,r);Wt(Zl,I(()=>o.value?Zn((l==null?void 0:l.value)??{},o.value):l==null?void 0:l.value))}return{props:i,provideSubDefaults:a}}function gu(e){if(e._setup=e._setup??e.setup,!e.name)return e;if(e._setup){e.props=ce(e.props??{},e.name)();const t=Object.keys(e.props).filter(n=>n!=="class"&&n!=="style");e.filterProps=function(r){return lT(r,t)},e.props._as=String,e.setup=function(r,s){const i=Nb();if(!i.value)return e._setup(r,s);const{props:o,provideSubDefaults:a}=jF(r,r._as??e.name,i),l=e._setup(o,s);return a(),l}}return e}function ke(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return t=>(e?gu:De)(t)}function qF(e,t){return t.props=e,t}function vu(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"div",n=arguments.length>2?arguments[2]:void 0;return ke()({name:n??li(Pr(e.replace(/__/g,"-"))),props:{tag:{type:String,default:t},...Ue()},setup(r,s){let{slots:i}=s;return()=>{var o;return Ir(r.tag,{class:[e,r.class],style:r.style},(o=i.default)==null?void 0:o.call(i))}}})}function kT(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 Fh="cubic-bezier(0.4, 0, 0.2, 1)",WF="cubic-bezier(0.0, 0, 0.2, 1)",GF="cubic-bezier(0.4, 0, 1, 1)";function V_(e,t,n){return Object.keys(e).filter(r=>Hp(r)&&r.endsWith(t)).reduce((r,s)=>(r[s.slice(0,-t.length)]=i=>e[s](i,n(i)),r),{})}function xT(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;for(;e;){if(t?KF(e):Vb(e))return e;e=e.parentElement}return document.scrollingElement}function Nh(e,t){const n=[];if(t&&e&&!t.contains(e))return n;for(;e&&(Vb(e)&&n.push(e),e!==t);)e=e.parentElement;return n}function Vb(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)return!1;const t=window.getComputedStyle(e);return t.overflowY==="scroll"||t.overflowY==="auto"&&e.scrollHeight>e.clientHeight}function KF(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)return!1;const t=window.getComputedStyle(e);return["scroll","auto"].includes(t.overflowY)}function YF(e){for(;e;){if(window.getComputedStyle(e).position==="fixed")return!0;e=e.offsetParent}return!1}function Pe(e){const t=sn("useRender");t.render=e}const fs=ce({border:[Boolean,Number,String]},"border");function Ps(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ui();return{borderClasses:I(()=>{const r=Xe(e)?e.value:e.border,s=[];if(r===!0||r==="")s.push(`${t}--border`);else if(typeof r=="string"||r===0)for(const i of String(r).split(" "))s.push(`border-${i}`);return s})}}const XF=[null,"default","comfortable","compact"],Or=ce({density:{type:String,default:"default",validator:e=>XF.includes(e)}},"density");function hs(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ui();return{densityClasses:I(()=>`${t}--density-${e.density}`)}}const ps=ce({elevation:{type:[Number,String],validator(e){const t=parseInt(e);return!isNaN(t)&&t>=0&&t<=24}}},"elevation");function Is(e){return{elevationClasses:I(()=>{const n=Xe(e)?e.value:e.elevation,r=[];return n==null||r.push(`elevation-${n}`),r})}}const $n=ce({rounded:{type:[Boolean,Number,String],default:void 0},tile:Boolean},"rounded");function Hn(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ui();return{roundedClasses:I(()=>{const r=Xe(e)?e.value:e.rounded,s=Xe(e)?e.value:e.tile,i=[];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}`);else(s||r===!1)&&i.push("rounded-0");return i})}}const wt=ce({tag:{type:String,default:"div"}},"tag"),Bc=Symbol.for("vuetify:theme"),Mt=ce({theme:String},"theme");function B_(){return{defaultTheme:"light",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":"#212529","theme-on-kbd":"#FFFFFF","theme-code":"#F5F5F5","theme-on-code":"#000000"}},dark:{dark:!0,colors:{background:"#121212",surface:"#212121","surface-bright":"#ccbfd6","surface-light":"#424242","surface-variant":"#a3a3a3","on-surface-variant":"#424242",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":"#212529","theme-on-kbd":"#FFFFFF","theme-code":"#343434","theme-on-code":"#CCCCCC"}}}}}function QF(){var r,s;let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:B_();const t=B_();if(!e)return{...t,isDisabled:!0};const n={};for(const[i,o]of Object.entries(e.themes??{})){const a=o.dark||i==="dark"?(r=t.themes)==null?void 0:r.dark:(s=t.themes)==null?void 0:s.light;n[i]=Zn(a,o)}return Zn(t,{...e,themes:n})}function JF(e){const t=QF(e),n=B(t.defaultTheme),r=B(t.themes),s=I(()=>{const c={};for(const[d,f]of Object.entries(r.value)){const p=c[d]={...f,colors:{...f.colors}};if(t.variations)for(const g of t.variations.colors){const m=p.colors[g];if(m)for(const y of["lighten","darken"]){const b=y==="lighten"?NF:VF;for(const w of vl(t.variations[y],1))p.colors[`${g}-${y}-${w}`]=$F(b(ei(m),w))}}for(const g of Object.keys(p.colors)){if(/^on-[a-z]/.test(g)||p.colors[`on-${g}`])continue;const m=`on-${g}`,y=ei(p.colors[g]);p.colors[m]=ST(y)}}return c}),i=I(()=>s.value[n.value]),o=I(()=>{var g;const c=[];(g=i.value)!=null&&g.dark&&Jo(c,":root",["color-scheme: dark"]),Jo(c,":root",U_(i.value));for(const[m,y]of Object.entries(s.value))Jo(c,`.v-theme--${m}`,[`color-scheme: ${y.dark?"dark":"normal"}`,...U_(y)]);const d=[],f=[],p=new Set(Object.values(s.value).flatMap(m=>Object.keys(m.colors)));for(const m of p)/^on-[a-z]/.test(m)?Jo(f,`.${m}`,[`color: rgb(var(--v-theme-${m})) !important`]):(Jo(d,`.bg-${m}`,[`--v-theme-overlay-multiplier: var(--v-theme-${m}-overlay-multiplier)`,`background-color: rgb(var(--v-theme-${m})) !important`,`color: rgb(var(--v-theme-on-${m})) !important`]),Jo(f,`.text-${m}`,[`color: rgb(var(--v-theme-${m})) !important`]),Jo(f,`.border-${m}`,[`--v-border-color: var(--v-theme-${m})`]));return c.push(...d,...f),c.map((m,y)=>y===0?m:` ${m}`).join("")});function a(){return{style:[{children:o.value,id:"vuetify-theme-stylesheet",nonce:t.cspNonce||!1}]}}function l(c){if(t.isDisabled)return;const d=c._context.provides.usehead;if(d)if(d.push){const p=d.push(a);kt&&xe(o,()=>{p.patch(a)})}else kt?(d.addHeadObjs(I(a)),Un(()=>d.updateDOM())):d.addHeadObjs(a());else{let g=function(){if(typeof document<"u"&&!p){const m=document.createElement("style");m.type="text/css",m.id="vuetify-theme-stylesheet",t.cspNonce&&m.setAttribute("nonce",t.cspNonce),p=m,document.head.appendChild(p)}p&&(p.innerHTML=o.value)};var f=g;let p=kt?document.getElementById("vuetify-theme-stylesheet"):null;kt?xe(o,g,{immediate:!0}):g()}}const u=I(()=>t.isDisabled?void 0:`v-theme--${n.value}`);return{install:l,isDisabled:t.isDisabled,name:n,themes:r,current:i,computedThemes:s,themeClasses:u,styles:o,global:{name:n,current:i}}}function Kt(e){sn("provideTheme");const t=Ke(Bc,null);if(!t)throw new Error("Could not find Vuetify theme injection");const n=I(()=>e.theme??t.name.value),r=I(()=>t.themes.value[n.value]),s=I(()=>t.isDisabled?void 0:`v-theme--${n.value}`),i={...t,name:n,current:r,themeClasses:s};return Wt(Bc,i),i}function ZF(){sn("useTheme");const e=Ke(Bc,null);if(!e)throw new Error("Could not find Vuetify theme injection");return e}function Jo(e,t,n){e.push(`${t} {
|
|
23
|
-
`,...n.map(r=>` ${r};
|
|
24
|
-
`),`}
|
|
25
|
-
`)}function U_(e){const t=e.dark?2:1,n=e.dark?1:2,r=[];for(const[s,i]of Object.entries(e.colors)){const o=ei(i);r.push(`--v-theme-${s}: ${o.r},${o.g},${o.b}`),s.startsWith("on-")||r.push(`--v-theme-${s}-overlay-multiplier: ${BF(i)>.18?t:n}`)}for(const[s,i]of Object.entries(e.variables)){const o=typeof i=="string"&&i.startsWith("#")?ei(i):void 0,a=o?`${o.r}, ${o.g}, ${o.b}`:void 0;r.push(`--v-${s}: ${a??i}`)}return r}function Bb(e){return Db(()=>{const t=[],n={};if(e.value.background)if(Tv(e.value.background)){if(n.backgroundColor=e.value.background,!e.value.text&&MF(e.value.background)){const r=ei(e.value.background);if(r.a==null||r.a===1){const s=ST(r);n.color=s,n.caretColor=s}}}else t.push(`bg-${e.value.background}`);return e.value.text&&(Tv(e.value.text)?(n.color=e.value.text,n.caretColor=e.value.text):t.push(`text-${e.value.text}`)),{colorClasses:t,colorStyles:n}})}function Es(e,t){const n=I(()=>({text:Xe(e)?e.value:t?e[t]:null})),{colorClasses:r,colorStyles:s}=Bb(n);return{textColorClasses:r,textColorStyles:s}}function fr(e,t){const n=I(()=>({background:Xe(e)?e.value:t?e[t]:null})),{colorClasses:r,colorStyles:s}=Bb(n);return{backgroundColorClasses:r,backgroundColorStyles:s}}const e2=["elevated","flat","tonal","outlined","text","plain"];function Bo(e,t){return h(Ce,null,[e&&h("span",{key:"overlay",class:`${t}__overlay`},null),h("span",{key:"underlay",class:`${t}__underlay`},null)])}const As=ce({color:String,variant:{type:String,default:"elevated",validator:e=>e2.includes(e)}},"variant");function Wa(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ui();const n=I(()=>{const{variant:i}=Q(e);return`${t}--variant-${i}`}),{colorClasses:r,colorStyles:s}=Bb(I(()=>{const{variant:i,color:o}=Q(e);return{[["elevated","flat"].includes(i)?"background":"text"]:o}}));return{colorClasses:r,colorStyles:s,variantClasses:n}}const ET=ce({baseColor:String,divided:Boolean,...fs(),...Ue(),...Or(),...ps(),...$n(),...wt(),...Mt(),...As()},"VBtnGroup"),H_=ke()({name:"VBtnGroup",props:ET(),setup(e,t){let{slots:n}=t;const{themeClasses:r}=Kt(e),{densityClasses:s}=hs(e),{borderClasses:i}=Ps(e),{elevationClasses:o}=Is(e),{roundedClasses:a}=Hn(e);Ar({VBtn:{height:"auto",baseColor:Te(e,"baseColor"),color:Te(e,"color"),density:Te(e,"density"),flat:!0,variant:Te(e,"variant")}}),Pe(()=>h(e.tag,{class:["v-btn-group",{"v-btn-group--divided":e.divided},r.value,i.value,s.value,o.value,a.value,e.class],style:e.style},n))}});function qr(e,t){let n;function r(){n=_d(),n.run(()=>t.length?t(()=>{n==null||n.stop(),r()}):t())}xe(e,s=>{s&&!n?r():s||(n==null||n.stop(),n=void 0)},{immediate:!0}),yn(()=>{n==null||n.stop()})}function rt(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=sn("useProxiedModel"),o=B(e[t]!==void 0?e[t]:n),a=ka(t),u=I(a!==t?()=>{var d,f,p,g;return e[t],!!(((d=i.vnode.props)!=null&&d.hasOwnProperty(t)||(f=i.vnode.props)!=null&&f.hasOwnProperty(a))&&((p=i.vnode.props)!=null&&p.hasOwnProperty(`onUpdate:${t}`)||(g=i.vnode.props)!=null&&g.hasOwnProperty(`onUpdate:${a}`)))}:()=>{var d,f;return e[t],!!((d=i.vnode.props)!=null&&d.hasOwnProperty(t)&&((f=i.vnode.props)!=null&&f.hasOwnProperty(`onUpdate:${t}`)))});qr(()=>!u.value,()=>{xe(()=>e[t],d=>{o.value=d})});const c=I({get(){const d=e[t];return r(u.value?d:o.value)},set(d){const f=s(d),p=Be(u.value?e[t]:o.value);p===f||r(p)===d||(o.value=f,i==null||i.emit(`update:${t}`,f))}});return Object.defineProperty(c,"externalValue",{get:()=>u.value?e[t]:o.value}),c}const Rd=ce({modelValue:{type:null,default:void 0},multiple:Boolean,mandatory:[Boolean,String],max:Number,selectedClass:String,disabled:Boolean},"group"),Pd=ce({value:null,disabled:Boolean,selectedClass:String},"group-item");function Id(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;const r=sn("useGroupItem");if(!r)throw new Error("[Vuetify] useGroupItem composable must be used inside a component setup function");const s=gr();Wt(Symbol.for(`${t.description}:id`),s);const i=Ke(t,null);if(!i){if(!n)return i;throw new Error(`[Vuetify] Could not find useGroup injection with symbol ${t.description}`)}const o=Te(e,"value"),a=I(()=>!!(i.disabled.value||e.disabled));i.register({id:s,value:o,disabled:a},r),Pn(()=>{i.unregister(s)});const l=I(()=>i.isSelected(s)),u=I(()=>i.items.value[0].id===s),c=I(()=>i.items.value[i.items.value.length-1].id===s),d=I(()=>l.value&&[i.selectedClass.value,e.selectedClass]);return xe(l,f=>{r.emit("group:selected",{value:f})},{flush:"sync"}),{id:s,isSelected:l,isFirst:u,isLast:c,toggle:()=>i.select(s,!l.value),select:f=>i.select(s,f),selectedClass:d,value:o,disabled:a,group:i}}function yu(e,t){let n=!1;const r=mn([]),s=rt(e,"modelValue",[],f=>f==null?[]:CT(r,On(f)),f=>{const p=n2(r,f);return e.multiple?p:p[0]}),i=sn("useGroup");function o(f,p){const g=f,m=Symbol.for(`${t.description}:id`),b=yl(m,i==null?void 0:i.vnode).indexOf(p);Q(g.value)==null&&(g.value=b,g.useIndexAsValue=!0),b>-1?r.splice(b,0,g):r.push(g)}function a(f){if(n)return;l();const p=r.findIndex(g=>g.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])}St(()=>{l()}),Pn(()=>{n=!0}),_b(()=>{for(let f=0;f<r.length;f++)r[f].useIndexAsValue&&(r[f].value=f)});function u(f,p){const g=r.find(m=>m.id===f);if(!(p&&(g!=null&&g.disabled)))if(e.multiple){const m=s.value.slice(),y=m.findIndex(w=>w===f),b=~y;if(p=p??!b,b&&e.mandatory&&m.length<=1||!b&&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)return;s.value=p??!m?[f]:[]}}function c(f){if(e.multiple,s.value.length){const p=s.value[0],g=r.findIndex(b=>b.id===p);let m=(g+f)%r.length,y=r[m];for(;y.disabled&&m!==g;)m=(m+f)%r.length,y=r[m];if(y.disabled)return;s.value=[r[m].id]}else{const p=r.find(g=>!g.disabled);p&&(s.value=[p.id])}}const d={register:o,unregister:a,selected:s,select:u,disabled:Te(e,"disabled"),prev:()=>c(r.length-1),next:()=>c(1),isSelected:f=>s.value.includes(f),selectedClass:I(()=>e.selectedClass),items:I(()=>r),getItemIndex:f=>t2(r,f)};return Wt(t,d),d}function t2(e,t){const n=CT(e,[t]);return n.length?e.findIndex(r=>r.id===n[0]):-1}function CT(e,t){const n=[];return t.forEach(r=>{const s=e.find(o=>Vo(r,o.value)),i=e[r];(s==null?void 0:s.value)!=null?n.push(s.id):i!=null&&n.push(i.id)}),n}function n2(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!=null?i.value:s)}}),n}const TT=Symbol.for("vuetify:v-btn-toggle"),r2=ce({...ET(),...Rd()},"VBtnToggle"),RT=ke()({name:"VBtnToggle",props:r2(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{isSelected:r,next:s,prev:i,select:o,selected:a}=yu(e,TT);return Pe(()=>{const l=H_.filterProps(e);return h(H_,ve({class:["v-btn-toggle",e.class]},l,{style:e.style}),{default:()=>{var u;return[(u=n.default)==null?void 0:u.call(n,{isSelected:r,next:s,prev:i,select:o,selected:a})]}})}),{next:s,prev:i,select:o}}}),s2=ce({defaults:Object,disabled:Boolean,reset:[Number,String],root:[Boolean,String],scoped:Boolean},"VDefaultsProvider"),It=ke(!1)({name:"VDefaultsProvider",props:s2(),setup(e,t){let{slots:n}=t;const{defaults:r,disabled:s,reset:i,root:o,scoped:a}=Fo(e);return Ar(r,{reset:i,root:o,scoped:a,disabled:s}),()=>{var l;return(l=n.default)==null?void 0:l.call(n)}}}),i2={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",eyeDropper:"mdi-eyedropper"},o2={component:e=>Ir(IT,{...e,class:"mdi"})},Je=[String,Function,Object,Array],Rv=Symbol.for("vuetify:icons"),zp=ce({icon:{type:Je},tag:{type:String,required:!0}},"icon"),z_=ke()({name:"VComponentIcon",props:zp(),setup(e,t){let{slots:n}=t;return()=>{const r=e.icon;return h(e.tag,null,{default:()=>{var s;return[e.icon?h(r,null,null):(s=n.default)==null?void 0:s.call(n)]}})}}}),PT=gu({name:"VSvgIcon",inheritAttrs:!1,props:zp(),setup(e,t){let{attrs:n}=t;return()=>h(e.tag,ve(n,{style:null}),{default:()=>[h("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)?h("path",{d:r[0],"fill-opacity":r[1]},null):h("path",{d:r},null)):h("path",{d:e.icon},null)])]})}}),a2=gu({name:"VLigatureIcon",props:zp(),setup(e){return()=>h(e.tag,null,{default:()=>[e.icon]})}}),IT=gu({name:"VClassIcon",props:zp(),setup(e){return()=>h(e.tag,{class:e.icon},null)}});function l2(){return{svg:{component:PT},class:{component:IT}}}function u2(e){const t=l2(),n=(e==null?void 0:e.defaultSet)??"mdi";return n==="mdi"&&!t.mdi&&(t.mdi=o2),Zn({defaultSet:n,sets:t,aliases:{...i2,vuetify:["M8.2241 14.2009L12 21L22 3H14.4459L8.2241 14.2009Z",["M7.26303 12.4733L7.00113 12L2 3H12.5261C12.5261 3 12.5261 3 12.5261 3L7.26303 12.4733Z",.6]],"vuetify-outline":"svg:M7.26 12.47 12.53 3H2L7.26 12.47ZM14.45 3 8.22 14.2 12 21 22 3H14.45ZM18.6 5 12 16.88 10.51 14.2 15.62 5ZM7.26 8.35 5.4 5H9.13L7.26 8.35Z","vuetify-play":["m6.376 13.184-4.11-7.192C1.505 4.66 2.467 3 4.003 3h8.532l-.953 1.576-.006.01-.396.677c-.429.732-.214 1.507.194 2.015.404.503 1.092.878 1.869.806a3.72 3.72 0 0 1 1.005.022c.276.053.434.143.523.237.138.146.38.635-.25 2.09-.893 1.63-1.553 1.722-1.847 1.677-.213-.033-.468-.158-.756-.406a4.95 4.95 0 0 1-.8-.927c-.39-.564-1.04-.84-1.66-.846-.625-.006-1.316.27-1.693.921l-.478.826-.911 1.506Z",["M9.093 11.552c.046-.079.144-.15.32-.148a.53.53 0 0 1 .43.207c.285.414.636.847 1.046 1.2.405.35.914.662 1.516.754 1.334.205 2.502-.698 3.48-2.495l.014-.028.013-.03c.687-1.574.774-2.852-.005-3.675-.37-.391-.861-.586-1.333-.676a5.243 5.243 0 0 0-1.447-.044c-.173.016-.393-.073-.54-.257-.145-.18-.127-.316-.082-.392l.393-.672L14.287 3h5.71c1.536 0 2.499 1.659 1.737 2.992l-7.997 13.996c-.768 1.344-2.706 1.344-3.473 0l-3.037-5.314 1.377-2.278.004-.006.004-.007.481-.831Z",.6]]}},e)}const c2=e=>{const t=Ke(Rv);if(!t)throw new Error("Missing Vuetify Icons provide!");return{iconData:I(()=>{var l;const r=Q(e);if(!r)return{component:z_};let s=r;if(typeof s=="string"&&(s=s.trim(),s.startsWith("$")&&(s=(l=t.aliases)==null?void 0:l[s.slice(1)])),Array.isArray(s))return{component:PT,icon:s};if(typeof s!="string")return{component:z_,icon:s};const i=Object.keys(t.sets).find(u=>typeof s=="string"&&s.startsWith(`${u}:`)),o=i?s.slice(i.length+1):s;return{component:t.sets[i??t.defaultSet].component,icon:o}})}},d2=["x-small","small","default","large","x-large"],bu=ce({size:{type:[String,Number],default:"default"}},"size");function Ad(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ui();return Db(()=>{let n,r;return Dh(d2,e.size)?n=`${t}--size-${e.size}`:e.size&&(r={width:Ve(e.size),height:Ve(e.size)}),{sizeClasses:n,sizeStyles:r}})}const f2=ce({color:String,disabled:Boolean,start:Boolean,end:Boolean,icon:Je,...Ue(),...bu(),...wt({tag:"i"}),...Mt()},"VIcon"),X=ke()({name:"VIcon",props:f2(),setup(e,t){let{attrs:n,slots:r}=t;const s=B(),{themeClasses:i}=Kt(e),{iconData:o}=c2(I(()=>s.value||e.icon)),{sizeClasses:a}=Ad(e),{textColorClasses:l,textColorStyles:u}=Es(Te(e,"color"));return Pe(()=>{var f,p;const c=(f=r.default)==null?void 0:f.call(r);c&&(s.value=(p=dT(c).filter(g=>g.type===Cd&&g.children&&typeof g.children=="string")[0])==null?void 0:p.children);const d=!!(n.onClick||n.onClickOnce);return h(o.value.component,{tag:e.tag,icon:o.value.icon,class:["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:[a.value?void 0:{fontSize:Ve(e.size),height:Ve(e.size),width:Ve(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 AT(e,t){const n=B(),r=Oe(!1);if(Ob){const s=new IntersectionObserver(i=>{r.value=!!i.find(o=>o.isIntersecting)},t);Pn(()=>{s.disconnect()}),xe(n,(i,o)=>{o&&(s.unobserve(o),r.value=!1),i&&s.observe(i)},{flush:"post"})}return{intersectionRef:n,isIntersecting:r}}function Da(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"content";const n=xv(),r=B();if(kt){const s=new ResizeObserver(i=>{e==null||e(i,s),i.length&&(t==="content"?r.value=i[0].contentRect:r.value=i[0].target.getBoundingClientRect())});Pn(()=>{s.disconnect()}),xe(()=>n.el,(i,o)=>{o&&(s.unobserve(o),r.value=void 0),i&&s.observe(i)},{flush:"post"})}return{resizeRef:n,contentRect:kd(r)}}const h2=ce({bgColor:String,color:String,indeterminate:[Boolean,String],modelValue:{type:[Number,String],default:0},rotate:{type:[Number,String],default:0},width:{type:[Number,String],default:4},...Ue(),...bu(),...wt({tag:"div"}),...Mt()},"VProgressCircular"),Od=ke()({name:"VProgressCircular",props:h2(),setup(e,t){let{slots:n}=t;const r=20,s=2*Math.PI*r,i=B(),{themeClasses:o}=Kt(e),{sizeClasses:a,sizeStyles:l}=Ad(e),{textColorClasses:u,textColorStyles:c}=Es(Te(e,"color")),{textColorClasses:d,textColorStyles:f}=Es(Te(e,"bgColor")),{intersectionRef:p,isIntersecting:g}=AT(),{resizeRef:m,contentRect:y}=Da(),b=I(()=>Math.max(0,Math.min(100,parseFloat(e.modelValue)))),w=I(()=>Number(e.width)),S=I(()=>l.value?Number(e.size):y.value?y.value.width:Math.max(w.value,32)),C=I(()=>r/(1-w.value/S.value)*2),_=I(()=>w.value/S.value*C.value),R=I(()=>Ve((100-b.value)/100*s));return Un(()=>{p.value=i.value,m.value=i.value}),Pe(()=>h(e.tag,{ref:i,class:["v-progress-circular",{"v-progress-circular--indeterminate":!!e.indeterminate,"v-progress-circular--visible":g.value,"v-progress-circular--disable-shrink":e.indeterminate==="disable-shrink"},o.value,a.value,u.value,e.class],style:[l.value,c.value,e.style],role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":e.indeterminate?void 0:b.value},{default:()=>[h("svg",{style:{transform:`rotate(calc(-90deg + ${Number(e.rotate)}deg))`},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${C.value} ${C.value}`},[h("circle",{class:["v-progress-circular__underlay",d.value],style:f.value,fill:"transparent",cx:"50%",cy:"50%",r,"stroke-width":_.value,"stroke-dasharray":s,"stroke-dashoffset":0},null),h("circle",{class:"v-progress-circular__overlay",fill:"transparent",cx:"50%",cy:"50%",r,"stroke-width":_.value,"stroke-dasharray":s,"stroke-dashoffset":R.value},null)]),n.default&&h("div",{class:"v-progress-circular__content"},[n.default({value:b.value})])]})),{}}}),Mr=ce({height:[Number,String],maxHeight:[Number,String],maxWidth:[Number,String],minHeight:[Number,String],minWidth:[Number,String],width:[Number,String]},"dimension");function Dr(e){return{dimensionStyles:I(()=>{const n={},r=Ve(e.height),s=Ve(e.maxHeight),i=Ve(e.maxWidth),o=Ve(e.minHeight),a=Ve(e.minWidth),l=Ve(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 p2={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"}},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)"},timePicker:{am:"AM",pm:"PM",title:"Select Time"},pagination:{ariaLabel:{root:"Pagination Navigation",next:"Next page",previous:"Previous page",page:"Go to page {0}",currentPage:"Page {0}, Current page",first:"First page",last:"Last page"}},stepper:{next:"Next",prev:"Previous"},rating:{ariaLabel:{item:"Rating {0} of {1}"}},loading:"Loading...",infiniteScroll:{loadMore:"Load more",empty:"No more"}},j_="$vuetify.",q_=(e,t)=>e.replace(/\{(\d+)\}/g,(n,r)=>String(t[+r])),OT=(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(j_))return q_(r,i);const a=r.replace(j_,""),l=e.value&&n.value[e.value],u=t.value&&n.value[t.value];let c=Ma(l,a,null);return c||(`${r}${e.value}`,c=Ma(u,a,null)),c||(c=r),typeof c!="string"&&(c=r),q_(c,i)};function MT(e,t){return(n,r)=>new Intl.NumberFormat([e.value,t.value],r).format(n)}function ig(e,t,n){const r=rt(e,t,e[t]??n.value);return r.value=e[t]??n.value,xe(n,s=>{e[t]==null&&(r.value=n.value)}),r}function DT(e){return t=>{const n=ig(t,"locale",e.current),r=ig(t,"fallback",e.fallback),s=ig(t,"messages",e.messages);return{name:"vuetify",current:n,fallback:r,messages:s,t:OT(n,r,s),n:MT(n,r),provide:DT({current:n,fallback:r,messages:s})}}}function m2(e){const t=Oe((e==null?void 0:e.locale)??"en"),n=Oe((e==null?void 0:e.fallback)??"en"),r=B({en:p2,...e==null?void 0:e.messages});return{name:"vuetify",current:t,fallback:n,messages:r,t:OT(t,n,r),n:MT(t,n),provide:DT({current:t,fallback:n,messages:r})}}const Vh=Symbol.for("vuetify:locale");function g2(e){return e.name!=null}function v2(e){const t=e!=null&&e.adapter&&g2(e==null?void 0:e.adapter)?e==null?void 0:e.adapter:m2(e),n=b2(t,e);return{...t,...n}}function Gr(){const e=Ke(Vh);if(!e)throw new Error("[Vuetify] Could not find injected locale instance");return e}function y2(){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 b2(e,t){const n=B((t==null?void 0:t.rtl)??y2()),r=I(()=>n.value[e.current.value]??!1);return{isRtl:r,rtl:n,rtlClasses:I(()=>`v-locale--is-${r.value?"rtl":"ltr"}`)}}function $r(){const e=Ke(Vh);if(!e)throw new Error("[Vuetify] Could not find injected rtl instance");return{isRtl:e.isRtl,rtlClasses:e.rtlClasses}}const W_={center:"center",top:"bottom",bottom:"top",left:"right",right:"left"},Uo=ce({location:String},"location");function Ga(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2?arguments[2]:void 0;const{isRtl:r}=$r();return{locationStyles:I(()=>{if(!e.location)return{};const{side:i,align:o}=Ev(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[W_[i]]=`calc(100% - ${a(i)}px)`:l[i]=0),o!=="center"?t?l[W_[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 w2=ce({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,...Ue(),...Uo({location:"top"}),...$n(),...wt(),...Mt()},"VProgressLinear"),eu=ke()({name:"VProgressLinear",props:w2(),emits:{"update:modelValue":e=>!0},setup(e,t){var M;let{slots:n}=t;const r=rt(e,"modelValue"),{isRtl:s,rtlClasses:i}=$r(),{themeClasses:o}=Kt(e),{locationStyles:a}=Ga(e),{textColorClasses:l,textColorStyles:u}=Es(e,"color"),{backgroundColorClasses:c,backgroundColorStyles:d}=fr(I(()=>e.bgColor||e.color)),{backgroundColorClasses:f,backgroundColorStyles:p}=fr(I(()=>e.bufferColor||e.bgColor||e.color)),{backgroundColorClasses:g,backgroundColorStyles:m}=fr(e,"color"),{roundedClasses:y}=Hn(e),{intersectionRef:b,isIntersecting:w}=AT(),S=I(()=>parseFloat(e.max)),C=I(()=>parseFloat(e.height)),_=I(()=>Tr(parseFloat(e.bufferValue)/S.value*100,0,100)),R=I(()=>Tr(parseFloat(r.value)/S.value*100,0,100)),T=I(()=>s.value!==e.reverse),x=I(()=>e.indeterminate?"fade-transition":"slide-x-transition"),E=kt&&((M=window.matchMedia)==null?void 0:M.call(window,"(forced-colors: active)").matches);function P(O){if(!b.value)return;const{left:A,right:D,width:H}=b.value.getBoundingClientRect(),z=T.value?H-O.clientX+(D-H):O.clientX-A;r.value=Math.round(z/H*S.value)}return Pe(()=>h(e.tag,{ref:b,class:["v-progress-linear",{"v-progress-linear--absolute":e.absolute,"v-progress-linear--active":e.active&&w.value,"v-progress-linear--reverse":T.value,"v-progress-linear--rounded":e.rounded,"v-progress-linear--rounded-bar":e.roundedBar,"v-progress-linear--striped":e.striped},y.value,o.value,i.value,e.class],style:[{bottom:e.location==="bottom"?0:void 0,top:e.location==="top"?0:void 0,height:e.active?Ve(C.value):0,"--v-progress-linear-height":Ve(C.value),...e.absolute?a.value:{}},e.style],role:"progressbar","aria-hidden":e.active?"false":"true","aria-valuemin":"0","aria-valuemax":e.max,"aria-valuenow":e.indeterminate?void 0:R.value,onClick:e.clickable&&P},{default:()=>[e.stream&&h("div",{key:"stream",class:["v-progress-linear__stream",l.value],style:{...u.value,[T.value?"left":"right"]:Ve(-C.value),borderTop:`${Ve(C.value/2)} dotted`,opacity:parseFloat(e.bufferOpacity),top:`calc(50% - ${Ve(C.value/4)})`,width:Ve(100-_.value,"%"),"--v-progress-linear-stream-to":Ve(C.value*(T.value?1:-1))}},null),h("div",{class:["v-progress-linear__background",E?void 0:c.value],style:[d.value,{opacity:parseFloat(e.bgOpacity),width:e.stream?0:void 0}]},null),h("div",{class:["v-progress-linear__buffer",E?void 0:f.value],style:[p.value,{opacity:parseFloat(e.bufferOpacity),width:Ve(_.value,"%")}]},null),h(Po,{name:x.value},{default:()=>[e.indeterminate?h("div",{class:"v-progress-linear__indeterminate"},[["long","short"].map(O=>h("div",{key:O,class:["v-progress-linear__indeterminate",O,E?void 0:g.value],style:m.value},null))]):h("div",{class:["v-progress-linear__determinate",E?void 0:g.value],style:[m.value,{width:Ve(R.value,"%")}]},null)]}),n.default&&h("div",{class:"v-progress-linear__content"},[n.default({value:R.value,buffer:_.value})])]})),{}}}),jp=ce({loading:[Boolean,String]},"loader");function Md(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ui();return{loaderClasses:I(()=>({[`${t}--loading`]:e.loading}))}}function qp(e,t){var r;let{slots:n}=t;return h("div",{class:`${e.name}__loader`},[((r=n.default)==null?void 0:r.call(n,{color:e.color,isActive:e.active}))||h(eu,{absolute:e.absolute,active:e.active,color:e.color,height:"2",indeterminate:!0},null)])}const S2=["static","relative","fixed","absolute","sticky"],wu=ce({position:{type:String,validator:e=>S2.includes(e)}},"position");function Su(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ui();return{positionClasses:I(()=>e.position?`${t}--${e.position}`:void 0)}}function _2(){const e=sn("useRoute");return I(()=>{var t;return(t=e==null?void 0:e.proxy)==null?void 0:t.$route})}function $T(){var e,t;return(t=(e=sn("useRouter"))==null?void 0:e.proxy)==null?void 0:t.$router}function Wp(e,t){var d,f;const n=k$("RouterLink"),r=I(()=>!!(e.href||e.to)),s=I(()=>(r==null?void 0:r.value)||x_(t,"click")||x_(e,"click"));if(typeof n=="string"||!("useLink"in n)){const p=Te(e,"href");return{isLink:r,isClickable:s,href:p,linkProps:mn({href:p})}}const i=I(()=>({...e,to:Te(()=>e.to||"")})),o=n.useLink(i.value),a=I(()=>e.to?o:void 0),l=_2(),u=I(()=>{var p,g,m;return a.value?e.exact?l.value?((m=a.value.isExactActive)==null?void 0:m.value)&&Vo(a.value.route.value.query,l.value.query):((g=a.value.isExactActive)==null?void 0:g.value)??!1:((p=a.value.isActive)==null?void 0:p.value)??!1:!1}),c=I(()=>{var p;return e.to?(p=a.value)==null?void 0:p.route.value.href:e.href});return{isLink:r,isClickable:s,isActive:u,route:(d=a.value)==null?void 0:d.route,navigate:(f=a.value)==null?void 0:f.navigate,href:c,linkProps:mn({href:c,"aria-current":I(()=>u.value?"page":void 0)})}}const Gp=ce({href:String,replace:Boolean,to:[String,Object],exact:Boolean},"router");let og=!1;function k2(e,t){let n=!1,r,s;kt&&(At(()=>{window.addEventListener("popstate",i),r=e==null?void 0:e.beforeEach((o,a,l)=>{og?n?t(l):l():setTimeout(()=>n?t(l):l()),og=!0}),s=e==null?void 0:e.afterEach(()=>{og=!1})}),yn(()=>{window.removeEventListener("popstate",i),r==null||r(),s==null||s()}));function i(o){var a;(a=o.state)!=null&&a.replaced||(n=!0,setTimeout(()=>n=!1))}}function x2(e,t){xe(()=>{var n;return(n=e.isActive)==null?void 0:n.value},n=>{e.isLink.value&&n&&t&&At(()=>{t(!0)})},{immediate:!0})}const Pv=Symbol("rippleStop"),E2=80;function G_(e,t){e.style.transform=t,e.style.webkitTransform=t}function Iv(e){return e.constructor.name==="TouchEvent"}function LT(e){return e.constructor.name==="KeyboardEvent"}const C2=function(e,t){var d;let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=0,s=0;if(!LT(e)){const f=t.getBoundingClientRect(),p=Iv(e)?e.touches[e.touches.length-1]:e;r=p.clientX-f.left,s=p.clientY-f.top}let i=0,o=.3;(d=t._ripple)!=null&&d.circle?(o=.15,i=t.clientWidth/2,i=n.center?i:i+Math.sqrt((r-i)**2+(s-i)**2)/4):i=Math.sqrt(t.clientWidth**2+t.clientHeight**2)/2;const a=`${(t.clientWidth-i*2)/2}px`,l=`${(t.clientHeight-i*2)/2}px`,u=n.center?a:`${r-i}px`,c=n.center?l:`${s-i}px`;return{radius:i,scale:o,x:u,y:c,centerX:a,centerY:l}},Bh={show(e,t){var p;let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!((p=t==null?void 0:t._ripple)!=null&&p.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}=C2(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"),G_(s,`translate(${a}, ${l}) scale3d(${o},${o},${o})`),s.dataset.activated=String(performance.now()),setTimeout(()=>{s.classList.remove("v-ripple__animation--enter"),s.classList.add("v-ripple__animation--in"),G_(s,`translate(${u}, ${c}) scale3d(1,1,1)`)},0)},hide(e){var i;if(!((i=e==null?void 0:e._ripple)!=null&&i.enabled))return;const t=e.getElementsByClassName("v-ripple__animation");if(t.length===0)return;const n=t[t.length-1];if(n.dataset.isHiding)return;n.dataset.isHiding="true";const r=performance.now()-Number(n.dataset.activated),s=Math.max(250-r,0);setTimeout(()=>{n.classList.remove("v-ripple__animation--in"),n.classList.add("v-ripple__animation--out"),setTimeout(()=>{var a;e.getElementsByClassName("v-ripple__animation").length===1&&e.dataset.previousPosition&&(e.style.position=e.dataset.previousPosition,delete e.dataset.previousPosition),((a=n.parentNode)==null?void 0:a.parentNode)===e&&e.removeChild(n.parentNode)},300)},s)}};function FT(e){return typeof e>"u"||!!e}function Uc(e){const t={},n=e.currentTarget;if(!(!(n!=null&&n._ripple)||n._ripple.touched||e[Pv])){if(e[Pv]=!0,Iv(e))n._ripple.touched=!0,n._ripple.isTouch=!0;else if(n._ripple.isTouch)return;if(t.center=n._ripple.centered||LT(e),n._ripple.class&&(t.class=n._ripple.class),Iv(e)){if(n._ripple.showTimerCommit)return;n._ripple.showTimerCommit=()=>{Bh.show(e,n,t)},n._ripple.showTimer=window.setTimeout(()=>{var r;(r=n==null?void 0:n._ripple)!=null&&r.showTimerCommit&&(n._ripple.showTimerCommit(),n._ripple.showTimerCommit=null)},E2)}else Bh.show(e,n,t)}}function K_(e){e[Pv]=!0}function Hr(e){const t=e.currentTarget;if(t!=null&&t._ripple){if(window.clearTimeout(t._ripple.showTimer),e.type==="touchend"&&t._ripple.showTimerCommit){t._ripple.showTimerCommit(),t._ripple.showTimerCommit=null,t._ripple.showTimer=window.setTimeout(()=>{Hr(e)});return}window.setTimeout(()=>{t._ripple&&(t._ripple.touched=!1)}),Bh.hide(t)}}function NT(e){const t=e.currentTarget;t!=null&&t._ripple&&(t._ripple.showTimerCommit&&(t._ripple.showTimerCommit=null),window.clearTimeout(t._ripple.showTimer))}let Hc=!1;function VT(e){!Hc&&(e.keyCode===b_.enter||e.keyCode===b_.space)&&(Hc=!0,Uc(e))}function BT(e){Hc=!1,Hr(e)}function UT(e){Hc&&(Hc=!1,Hr(e))}function HT(e,t,n){const{value:r,modifiers:s}=t,i=FT(r);if(i||Bh.hide(e),e._ripple=e._ripple??{},e._ripple.enabled=i,e._ripple.centered=s.center,e._ripple.circle=s.circle,uF(r)&&r.class&&(e._ripple.class=r.class),i&&!n){if(s.stop){e.addEventListener("touchstart",K_,{passive:!0}),e.addEventListener("mousedown",K_);return}e.addEventListener("touchstart",Uc,{passive:!0}),e.addEventListener("touchend",Hr,{passive:!0}),e.addEventListener("touchmove",NT,{passive:!0}),e.addEventListener("touchcancel",Hr),e.addEventListener("mousedown",Uc),e.addEventListener("mouseup",Hr),e.addEventListener("mouseleave",Hr),e.addEventListener("keydown",VT),e.addEventListener("keyup",BT),e.addEventListener("blur",UT),e.addEventListener("dragstart",Hr,{passive:!0})}else!i&&n&&zT(e)}function zT(e){e.removeEventListener("mousedown",Uc),e.removeEventListener("touchstart",Uc),e.removeEventListener("touchend",Hr),e.removeEventListener("touchmove",NT),e.removeEventListener("touchcancel",Hr),e.removeEventListener("mouseup",Hr),e.removeEventListener("mouseleave",Hr),e.removeEventListener("keydown",VT),e.removeEventListener("keyup",BT),e.removeEventListener("dragstart",Hr),e.removeEventListener("blur",UT)}function T2(e,t){HT(e,t,!1)}function R2(e){delete e._ripple,zT(e)}function P2(e,t){if(t.value===t.oldValue)return;const n=FT(t.oldValue);HT(e,t,n)}const _u={mounted:T2,unmounted:R2,updated:P2},jT=ce({active:{type:Boolean,default:void 0},activeColor:String,baseColor:String,symbol:{type:null,default:TT},flat:Boolean,icon:[Boolean,String,Function,Object],prependIcon:Je,appendIcon:Je,block:Boolean,readonly:Boolean,slim:Boolean,stacked:Boolean,ripple:{type:[Boolean,Object],default:!0},text:String,...fs(),...Ue(),...Or(),...Mr(),...ps(),...Pd(),...jp(),...Uo(),...wu(),...$n(),...Gp(),...bu(),...wt({tag:"button"}),...Mt(),...As({variant:"elevated"})},"VBtn"),re=ke()({name:"VBtn",props:jT(),emits:{"group:selected":e=>!0},setup(e,t){let{attrs:n,slots:r}=t;const{themeClasses:s}=Kt(e),{borderClasses:i}=Ps(e),{densityClasses:o}=hs(e),{dimensionStyles:a}=Dr(e),{elevationClasses:l}=Is(e),{loaderClasses:u}=Md(e),{locationStyles:c}=Ga(e),{positionClasses:d}=Su(e),{roundedClasses:f}=Hn(e),{sizeClasses:p,sizeStyles:g}=Ad(e),m=Id(e,e.symbol,!1),y=Wp(e,n),b=I(()=>{var M;return e.active!==void 0?e.active:y.isLink.value?(M=y.isActive)==null?void 0:M.value:m==null?void 0:m.isSelected.value}),w=I(()=>b.value?e.activeColor??e.color:e.color),S=I(()=>{var O,A;return{color:(m==null?void 0:m.isSelected.value)&&(!y.isLink.value||((O=y.isActive)==null?void 0:O.value))||!m||((A=y.isActive)==null?void 0:A.value)?w.value??e.baseColor:e.baseColor,variant:e.variant}}),{colorClasses:C,colorStyles:_,variantClasses:R}=Wa(S),T=I(()=>(m==null?void 0:m.disabled.value)||e.disabled),x=I(()=>e.variant==="elevated"&&!(e.disabled||e.flat||e.border)),E=I(()=>{if(!(e.value===void 0||typeof e.value=="symbol"))return Object(e.value)===e.value?JSON.stringify(e.value,null,0):e.value});function P(M){var O;T.value||y.isLink.value&&(M.metaKey||M.ctrlKey||M.shiftKey||M.button!==0||n.target==="_blank")||((O=y.navigate)==null||O.call(y,M),m==null||m.toggle())}return x2(y,m==null?void 0:m.select),Pe(()=>{const M=y.isLink.value?"a":e.tag,O=!!(e.prependIcon||r.prepend),A=!!(e.appendIcon||r.append),D=!!(e.icon&&e.icon!==!0);return Jt(h(M,ve({type:M==="a"?void 0:"button",class:["v-btn",m==null?void 0:m.selectedClass.value,{"v-btn--active":b.value,"v-btn--block":e.block,"v-btn--disabled":T.value,"v-btn--elevated":x.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},s.value,i.value,C.value,o.value,l.value,u.value,d.value,f.value,p.value,R.value,e.class],style:[_.value,a.value,c.value,g.value,e.style],"aria-busy":e.loading?!0:void 0,disabled:T.value||void 0,tabindex:e.loading||e.readonly?-1:void 0,onClick:P,value:E.value},y.linkProps),{default:()=>{var H;return[Bo(!0,"v-btn"),!e.icon&&O&&h("span",{key:"prepend",class:"v-btn__prepend"},[r.prepend?h(It,{key:"prepend-defaults",disabled:!e.prependIcon,defaults:{VIcon:{icon:e.prependIcon}}},r.prepend):h(X,{key:"prepend-icon",icon:e.prependIcon},null)]),h("span",{class:"v-btn__content","data-no-activator":""},[!r.default&&D?h(X,{key:"content-icon",icon:e.icon},null):h(It,{key:"content-defaults",disabled:!D,defaults:{VIcon:{icon:e.icon}}},{default:()=>{var z;return[((z=r.default)==null?void 0:z.call(r))??e.text]}})]),!e.icon&&A&&h("span",{key:"append",class:"v-btn__append"},[r.append?h(It,{key:"append-defaults",disabled:!e.appendIcon,defaults:{VIcon:{icon:e.appendIcon}}},r.append):h(X,{key:"append-icon",icon:e.appendIcon},null)]),!!e.loading&&h("span",{key:"loader",class:"v-btn__loader"},[((H=r.loader)==null?void 0:H.call(r))??h(Od,{color:typeof e.loading=="boolean"?void 0:e.loading,indeterminate:!0,width:"2"},null)])]}}),[[_u,!T.value&&e.ripple,"",{center:!!e.icon}]])}),{group:m}}}),I2=ce({disabled:Boolean,group:Boolean,hideOnLeave:Boolean,leaveAbsolute:Boolean,mode:String,origin:String},"transition");function Kr(e,t,n){return ke()({name:e,props:I2({mode:n,origin:t}),setup(r,s){let{slots:i}=s;const o={onBeforeEnter(a){r.origin&&(a.style.transformOrigin=r.origin)},onLeave(a){if(r.leaveAbsolute){const{offsetTop:l,offsetLeft:u,offsetWidth:c,offsetHeight:d}=a;a._transitionInitialStyles={position:a.style.position,top:a.style.top,left:a.style.left,width:a.style.width,height:a.style.height},a.style.position="absolute",a.style.top=`${l}px`,a.style.left=`${u}px`,a.style.width=`${c}px`,a.style.height=`${d}px`}r.hideOnLeave&&a.style.setProperty("display","none","important")},onAfterLeave(a){if(r.leaveAbsolute&&(a!=null&&a._transitionInitialStyles)){const{position:l,top:u,left:c,width:d,height:f}=a._transitionInitialStyles;delete a._transitionInitialStyles,a.style.position=l||"",a.style.top=u||"",a.style.left=c||"",a.style.width=d||"",a.style.height=f||""}}};return()=>{const a=r.group?Ab:Po;return Ir(a,{name:r.disabled?"":e,css:!r.disabled,...r.group?void 0:{mode:r.mode},...r.disabled?{}:o},i.default)}}})}function qT(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"in-out";return ke()({name:e,props:{mode:{type:String,default:n},disabled:Boolean,group:Boolean},setup(r,s){let{slots:i}=s;const o=r.group?Ab:Po;return()=>Ir(o,{name:r.disabled?"":e,css:!r.disabled,...r.disabled?{}:t},i.default)}})}function WT(){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=Pr(`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;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){const a=o._initialStyle[n];o.style.overflow=o._initialStyle.overflow,a!=null&&(o.style[n]=a),delete o._initialStyle}}const A2=ce({target:[Object,Array]},"v-dialog-transition"),Ub=ke()({name:"VDialogTransition",props:A2(),setup(e,t){let{slots:n}=t;const r={onBeforeEnter(s){s.style.pointerEvents="none",s.style.visibility="hidden"},async onEnter(s,i){var f;await new Promise(p=>requestAnimationFrame(p)),await new Promise(p=>requestAnimationFrame(p)),s.style.visibility="";const{x:o,y:a,sx:l,sy:u,speed:c}=X_(e.target,s),d=bl(s,[{transform:`translate(${o}px, ${a}px) scale(${l}, ${u})`,opacity:0},{}],{duration:225*c,easing:WF});(f=Y_(s))==null||f.forEach(p=>{bl(p,[{opacity:0},{opacity:0,offset:.33},{}],{duration:225*2*c,easing:Fh})}),d.finished.then(()=>i())},onAfterEnter(s){s.style.removeProperty("pointer-events")},onBeforeLeave(s){s.style.pointerEvents="none"},async onLeave(s,i){var f;await new Promise(p=>requestAnimationFrame(p));const{x:o,y:a,sx:l,sy:u,speed:c}=X_(e.target,s);bl(s,[{},{transform:`translate(${o}px, ${a}px) scale(${l}, ${u})`,opacity:0}],{duration:125*c,easing:GF}).finished.then(()=>i()),(f=Y_(s))==null||f.forEach(p=>{bl(p,[{},{opacity:0,offset:.2},{opacity:0}],{duration:125*2*c,easing:Fh})})},onAfterLeave(s){s.style.removeProperty("pointer-events")}};return()=>e.target?h(Po,ve({name:"dialog-transition"},r,{css:!1}),n):h(Po,{name:"dialog-transition"},n)}});function Y_(e){var n;const t=(n=e.querySelector(":scope > .v-card, :scope > .v-sheet, :scope > .v-list"))==null?void 0:n.children;return t&&[...t]}function X_(e,t){const n=gT(e),r=Lb(t),[s,i]=getComputedStyle(t).transformOrigin.split(" ").map(b=>parseFloat(b)),[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,g=d/f||0,m=r.width*r.height/(window.innerWidth*window.innerHeight),y=m>.12?Math.min(1.5,(m-.12)*10+1):1;return{x:l-(s+r.left),y:u-(i+r.top),sx:p,sy:g,speed:y}}Kr("fab-transition","center center","out-in");Kr("dialog-bottom-transition");Kr("dialog-top-transition");const Q_=Kr("fade-transition"),O2=Kr("scale-transition");Kr("scroll-x-transition");Kr("scroll-x-reverse-transition");const M2=Kr("scroll-y-transition");Kr("scroll-y-reverse-transition");Kr("slide-x-transition");Kr("slide-x-reverse-transition");const GT=Kr("slide-y-transition");Kr("slide-y-reverse-transition");const KT=qT("expand-transition",WT()),YT=qT("expand-x-transition",WT("",!0));function ag(e,t){return{x:e.x+t.x,y:e.y+t.y}}function D2(e,t){return{x:e.x-t.x,y:e.y-t.y}}function J_(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 ag({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 ag({x:s,y:i},t)}return ag({x:t.width/2,y:t.height/2},t)}const XT={static:F2,connected:V2},$2=ce({locationStrategy:{type:[String,Function],default:"static",validator:e=>typeof e=="function"||e in XT},location:{type:String,default:"bottom"},origin:{type:String,default:"auto"},offset:[Number,String,Array]},"VOverlay-location-strategies");function L2(e,t){const n=B({}),r=B();kt&&qr(()=>!!(t.isActive.value&&e.locationStrategy),i=>{var o,a;xe(()=>e.locationStrategy,i),yn(()=>{window.removeEventListener("resize",s),r.value=void 0}),window.addEventListener("resize",s,{passive:!0}),typeof e.locationStrategy=="function"?r.value=(o=e.locationStrategy(t,e,n))==null?void 0:o.updateLocation:r.value=(a=XT[e.locationStrategy](t,e,n))==null?void 0:a.updateLocation});function s(i){var o;(o=r.value)==null||o.call(r,i)}return{contentStyles:n,updateLocation:r}}function F2(){}function N2(e,t){const n=Lb(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 V2(e,t,n){(Array.isArray(e.target.value)||YF(e.target.value))&&Object.assign(n.value,{position:"fixed",top:0,[e.isRtl.value?"right":"left"]:0});const{preferredAnchor:s,preferredOrigin:i}=Db(()=>{const g=Ev(t.location,e.isRtl.value),m=t.origin==="overlap"?g:t.origin==="auto"?rg(g):Ev(t.origin,e.isRtl.value);return g.side===m.side&&g.align===sg(m).align?{preferredAnchor:C_(g),preferredOrigin:C_(m)}:{preferredAnchor:g,preferredOrigin:m}}),[o,a,l,u]=["minWidth","minHeight","maxWidth","maxHeight"].map(g=>I(()=>{const m=parseFloat(t[g]);return isNaN(m)?1/0:m})),c=I(()=>{if(Array.isArray(t.offset))return t.offset;if(typeof t.offset=="string"){const g=t.offset.split(" ").map(parseFloat);return g.length<2&&g.push(0),g}return typeof t.offset=="number"?[t.offset,0]:[0,0]});let d=!1;const f=new ResizeObserver(()=>{d&&p()});xe([e.target,e.contentEl],(g,m)=>{let[y,b]=g,[w,S]=m;w&&!Array.isArray(w)&&f.unobserve(w),y&&!Array.isArray(y)&&f.observe(y),S&&f.unobserve(S),b&&f.observe(b)},{immediate:!0}),yn(()=>{f.disconnect()});function p(){if(d=!1,requestAnimationFrame(()=>d=!0),!e.target.value||!e.contentEl.value)return;const g=gT(e.target.value),m=N2(e.contentEl.value,e.isRtl.value),y=Nh(e.contentEl.value),b=12;y.length||(y.push(document.documentElement),e.contentEl.value.style.top&&e.contentEl.value.style.left||(m.x-=parseFloat(document.documentElement.style.getPropertyValue("--v-body-scroll-x")||0),m.y-=parseFloat(document.documentElement.style.getPropertyValue("--v-body-scroll-y")||0)));const w=y.reduce((M,O)=>{const A=O.getBoundingClientRect(),D=new xa({x:O===document.documentElement?0:A.x,y:O===document.documentElement?0:A.y,width:O.clientWidth,height:O.clientHeight});return M?new xa({x:Math.max(M.left,D.left),y:Math.max(M.top,D.top),width:Math.min(M.right,D.right)-Math.max(M.left,D.left),height:Math.min(M.bottom,D.bottom)-Math.max(M.top,D.top)}):D},void 0);w.x+=b,w.y+=b,w.width-=b*2,w.height-=b*2;let S={anchor:s.value,origin:i.value};function C(M){const O=new xa(m),A=J_(M.anchor,g),D=J_(M.origin,O);let{x:H,y:z}=D2(A,D);switch(M.anchor.side){case"top":z-=c.value[0];break;case"bottom":z+=c.value[0];break;case"left":H-=c.value[0];break;case"right":H+=c.value[0];break}switch(M.anchor.align){case"top":z-=c.value[1];break;case"bottom":z+=c.value[1];break;case"left":H-=c.value[1];break;case"right":H+=c.value[1];break}return O.x+=H,O.y+=z,O.width=Math.min(O.width,l.value),O.height=Math.min(O.height,u.value),{overflows:R_(O,w),x:H,y:z}}let _=0,R=0;const T={x:0,y:0},x={x:!1,y:!1};let E=-1;for(;!(E++>10);){const{x:M,y:O,overflows:A}=C(S);_+=M,R+=O,m.x+=M,m.y+=O;{const D=T_(S.anchor),H=A.x.before||A.x.after,z=A.y.before||A.y.after;let Y=!1;if(["x","y"].forEach(q=>{if(q==="x"&&H&&!x.x||q==="y"&&z&&!x.y){const V={anchor:{...S.anchor},origin:{...S.origin}},G=q==="x"?D==="y"?sg:rg:D==="y"?rg:sg;V.anchor=G(V.anchor),V.origin=G(V.origin);const{overflows:te}=C(V);(te[q].before<=A[q].before&&te[q].after<=A[q].after||te[q].before+te[q].after<(A[q].before+A[q].after)/2)&&(S=V,Y=x[q]=!0)}}),Y)continue}A.x.before&&(_+=A.x.before,m.x+=A.x.before),A.x.after&&(_-=A.x.after,m.x-=A.x.after),A.y.before&&(R+=A.y.before,m.y+=A.y.before),A.y.after&&(R-=A.y.after,m.y-=A.y.after);{const D=R_(m,w);T.x=w.width-D.x.before-D.x.after,T.y=w.height-D.y.before-D.y.after,_+=D.x.before,m.x+=D.x.before,R+=D.y.before,m.y+=D.y.before}break}const P=T_(S.anchor);return Object.assign(n.value,{"--v-overlay-anchor-origin":`${S.anchor.side} ${S.anchor.align}`,transformOrigin:`${S.origin.side} ${S.origin.align}`,top:Ve(lg(R)),left:e.isRtl.value?void 0:Ve(lg(_)),right:e.isRtl.value?Ve(lg(-_)):void 0,minWidth:Ve(P==="y"?Math.min(o.value,g.width):o.value),maxWidth:Ve(Z_(Tr(T.x,o.value===1/0?0:o.value,l.value))),maxHeight:Ve(Z_(Tr(T.y,a.value===1/0?0:a.value,u.value)))}),{available:T,contentBox:m}}return xe(()=>[s.value,i.value,t.offset,t.minWidth,t.minHeight,t.maxWidth,t.maxHeight],()=>p()),At(()=>{const g=p();if(!g)return;const{available:m,contentBox:y}=g;y.height>m.y&&requestAnimationFrame(()=>{p(),requestAnimationFrame(()=>{p()})})}),{updateLocation:p}}function lg(e){return Math.round(e*devicePixelRatio)/devicePixelRatio}function Z_(e){return Math.ceil(e*devicePixelRatio)/devicePixelRatio}let Av=!0;const Uh=[];function B2(e){!Av||Uh.length?(Uh.push(e),Ov()):(Av=!1,e(),Ov())}let e1=-1;function Ov(){cancelAnimationFrame(e1),e1=requestAnimationFrame(()=>{const e=Uh.shift();e&&e(),Uh.length?Ov():Av=!0})}const Jf={none:null,close:z2,block:j2,reposition:q2},U2=ce({scrollStrategy:{type:[String,Function],default:"block",validator:e=>typeof e=="function"||e in Jf}},"VOverlay-scroll-strategies");function H2(e,t){if(!kt)return;let n;Un(async()=>{n==null||n.stop(),t.isActive.value&&e.scrollStrategy&&(n=_d(),await new Promise(r=>setTimeout(r)),n.active&&n.run(()=>{var r;typeof e.scrollStrategy=="function"?e.scrollStrategy(t,e,n):(r=Jf[e.scrollStrategy])==null||r.call(Jf,t,e,n)}))}),yn(()=>{n==null||n.stop()})}function z2(e){function t(n){e.isActive.value=!1}QT(e.targetEl.value??e.contentEl.value,t)}function j2(e,t){var o;const n=(o=e.root.value)==null?void 0:o.offsetParent,r=[...new Set([...Nh(e.targetEl.value,t.contained?n:void 0),...Nh(e.contentEl.value,t.contained?n:void 0)])].filter(a=>!a.classList.contains("v-overlay-scroll-blocked")),s=window.innerWidth-document.documentElement.offsetWidth,i=(a=>Vb(a)&&a)(n||document.documentElement);i&&e.root.value.classList.add("v-overlay--scroll-blocked"),r.forEach((a,l)=>{a.style.setProperty("--v-body-scroll-x",Ve(-a.scrollLeft)),a.style.setProperty("--v-body-scroll-y",Ve(-a.scrollTop)),a!==document.documentElement&&a.style.setProperty("--v-scrollbar-offset",Ve(s)),a.classList.add("v-overlay-scroll-blocked")}),yn(()=>{r.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}),i&&e.root.value.classList.remove("v-overlay--scroll-blocked")})}function q2(e,t,n){let r=!1,s=-1,i=-1;function o(a){B2(()=>{var c,d;const l=performance.now();(d=(c=e.updateLocation).value)==null||d.call(c,a),r=(performance.now()-l)/(1e3/60)>2})}i=(typeof requestIdleCallback>"u"?a=>a():requestIdleCallback)(()=>{n.run(()=>{QT(e.targetEl.value??e.contentEl.value,a=>{r?(cancelAnimationFrame(s),s=requestAnimationFrame(()=>{s=requestAnimationFrame(()=>{o(a)})})):o(a)})})}),yn(()=>{typeof cancelIdleCallback<"u"&&cancelIdleCallback(i),cancelAnimationFrame(s)})}function QT(e,t){const n=[document,...Nh(e)];n.forEach(r=>{r.addEventListener("scroll",t,{passive:!0})}),yn(()=>{n.forEach(r=>{r.removeEventListener("scroll",t)})})}const Mv=Symbol.for("vuetify:v-menu"),Hb=ce({closeDelay:[Number,String],openDelay:[Number,String]},"delay");function zb(e,t){let n=()=>{};function r(o){n==null||n();const a=Number(o?e.openDelay:e.closeDelay);return new Promise(l=>{n=pF(a,()=>{t==null||t(o),l(o)})})}function s(){return r(!0)}function i(){return r(!1)}return{clearDelay:n,runOpenDelay:s,runCloseDelay:i}}const W2=ce({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,...Hb()},"VOverlay-activator");function G2(e,t){let{isActive:n,isTop:r,contentEl:s}=t;const i=sn("useActivator"),o=B();let a=!1,l=!1,u=!0;const c=I(()=>e.openOnFocus||e.openOnFocus==null&&e.openOnHover),d=I(()=>e.openOnClick||e.openOnClick==null&&!e.openOnHover&&!c.value),{runOpenDelay:f,runCloseDelay:p}=zb(e,x=>{x===(e.openOnHover&&a||c.value&&l)&&!(e.openOnHover&&n.value&&!r.value)&&(n.value!==x&&(u=!0),n.value=x)}),g=B(),m={onClick:x=>{x.stopPropagation(),o.value=x.currentTarget||x.target,n.value||(g.value=[x.clientX,x.clientY]),n.value=!n.value},onMouseenter:x=>{var E;(E=x.sourceCapabilities)!=null&&E.firesTouchEvents||(a=!0,o.value=x.currentTarget||x.target,f())},onMouseleave:x=>{a=!1,p()},onFocus:x=>{$h(x.target,":focus-visible")!==!1&&(l=!0,x.stopPropagation(),o.value=x.currentTarget||x.target,f())},onBlur:x=>{l=!1,x.stopPropagation(),p()}},y=I(()=>{const x={};return d.value&&(x.onClick=m.onClick),e.openOnHover&&(x.onMouseenter=m.onMouseenter,x.onMouseleave=m.onMouseleave),c.value&&(x.onFocus=m.onFocus,x.onBlur=m.onBlur),x}),b=I(()=>{const x={};if(e.openOnHover&&(x.onMouseenter=()=>{a=!0,f()},x.onMouseleave=()=>{a=!1,p()}),c.value&&(x.onFocusin=()=>{l=!0,f()},x.onFocusout=()=>{l=!1,p()}),e.closeOnContentClick){const E=Ke(Mv,null);x.onClick=()=>{n.value=!1,E==null||E.closeParents()}}return x}),w=I(()=>{const x={};return e.openOnHover&&(x.onMouseenter=()=>{u&&(a=!0,u=!1,f())},x.onMouseleave=()=>{a=!1,p()}),x});xe(r,x=>{var E;x&&(e.openOnHover&&!a&&(!c.value||!l)||c.value&&!l&&(!e.openOnHover||!a))&&!((E=s.value)!=null&&E.contains(document.activeElement))&&(n.value=!1)}),xe(n,x=>{x||setTimeout(()=>{g.value=void 0})},{flush:"post"});const S=xv();Un(()=>{S.value&&At(()=>{o.value=S.el})});const C=xv(),_=I(()=>e.target==="cursor"&&g.value?g.value:C.value?C.el:JT(e.target,i)||o.value),R=I(()=>Array.isArray(_.value)?void 0:_.value);let T;return xe(()=>!!e.activator,x=>{x&&kt?(T=_d(),T.run(()=>{K2(e,i,{activatorEl:o,activatorEvents:y})})):T&&T.stop()},{flush:"post",immediate:!0}),yn(()=>{T==null||T.stop()}),{activatorEl:o,activatorRef:S,target:_,targetEl:R,targetRef:C,activatorEvents:y,contentEvents:b,scrimEvents:w}}function K2(e,t,n){let{activatorEl:r,activatorEvents:s}=n;xe(()=>e.activator,(l,u)=>{if(u&&l!==u){const c=a(u);c&&o(c)}l&&At(()=>i())},{immediate:!0}),xe(()=>e.activatorProps,()=>{i()}),yn(()=>{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&&vF(l,ve(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&&yF(l,ve(s.value,u))}function a(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:e.activator;const u=JT(l,t);return r.value=(u==null?void 0:u.nodeType)===Node.ELEMENT_NODE?u:void 0,r.value}}function JT(e,t){var r,s;if(!e)return;let n;if(e==="parent"){let i=(s=(r=t==null?void 0:t.proxy)==null?void 0:r.$el)==null?void 0:s.parentNode;for(;i!=null&&i.hasAttribute("data-no-activator");)i=i.parentNode;n=i}else typeof e=="string"?n=document.querySelector(e):"$el"in e?n=e.$el:n=e;return n}const Kp=["sm","md","lg","xl","xxl"],Dv=Symbol.for("vuetify:display"),t1={mobileBreakpoint:"lg",thresholds:{xs:0,sm:600,md:960,lg:1280,xl:1920,xxl:2560}},Y2=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t1;return Zn(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(g){return!!t.match(g)}const r=n(/android/i),s=n(/iphone|ipad|ipod/i),i=n(/cordova/i),o=n(/electron/i),a=n(/chrome/i),l=n(/edge/i),u=n(/firefox/i),c=n(/opera/i),d=n(/win/i),f=n(/mac/i),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:oF,ssr:t==="ssr"}}function X2(e,t){const{thresholds:n,mobileBreakpoint:r}=Y2(e),s=Oe(r1(t)),i=Oe(s1(t)),o=mn({}),a=Oe(n1(t));function l(){s.value=r1(),a.value=n1()}function u(){l(),i.value=s1()}return Un(()=>{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),g=a.value<n.xxl&&!(p||f||d||c),m=a.value>=n.xxl,y=c?"xs":d?"sm":f?"md":p?"lg":g?"xl":"xxl",b=typeof r=="number"?r:n[r],w=a.value<b;o.xs=c,o.sm=d,o.md=f,o.lg=p,o.xl=g,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||g||m),o.mdAndDown=!(p||g||m),o.lgAndDown=!(g||m),o.xlAndDown=!m,o.name=y,o.height=s.value,o.width=a.value,o.mobile=w,o.mobileBreakpoint=r,o.platform=i.value,o.thresholds=n}),kt&&window.addEventListener("resize",l,{passive:!0}),{...Fo(o),update:u,ssr:!!t}}const Ka=ce({mobile:{type:Boolean,default:!1},mobileBreakpoint:[Number,String]},"display");function ci(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ui();const n=Ke(Dv);if(!n)throw new Error("Could not find Vuetify display injection");const r=I(()=>{if(e.mobile!=null)return e.mobile;if(!e.mobileBreakpoint)return n.mobile.value;const i=typeof e.mobileBreakpoint=="number"?e.mobileBreakpoint:n.thresholds.value[e.mobileBreakpoint];return n.width.value<i}),s=I(()=>t?{[`${t}--mobile`]:r.value}:{});return{...n,displayClasses:s,mobile:r}}function Q2(){if(!kt)return Oe(!1);const{ssr:e}=ci();if(e){const t=Oe(!1);return St(()=>{t.value=!0}),t}else return Oe(!0)}const ZT=ce({eager:Boolean},"lazy");function eR(e,t){const n=Oe(!1),r=I(()=>n.value||e.eager||t.value);xe(t,()=>n.value=!0);function s(){e.eager||(n.value=!1)}return{isBooted:n,hasContent:r,onAfterLeave:s}}function ku(){const t=sn("useScopeId").vnode.scopeId;return{scopeId:t?{[t]:""}:void 0}}const i1=Symbol.for("vuetify:stack"),Wu=mn([]);function J2(e,t,n){const r=sn("useStack"),s=!n,i=Ke(i1,void 0),o=mn({activeChildren:new Set});Wt(i1,o);const a=Oe(+t.value);qr(e,()=>{var d;const c=(d=Wu.at(-1))==null?void 0:d[1];a.value=c?c+10:+t.value,s&&Wu.push([r.uid,a.value]),i==null||i.activeChildren.add(r.uid),yn(()=>{if(s){const f=Be(Wu).findIndex(p=>p[0]===r.uid);Wu.splice(f,1)}i==null||i.activeChildren.delete(r.uid)})});const l=Oe(!0);s&&Un(()=>{var d;const c=((d=Wu.at(-1))==null?void 0:d[0])===r.uid;setTimeout(()=>l.value=c)});const u=I(()=>!o.activeChildren.size);return{globalTop:kd(l),localTop:u,stackStyles:I(()=>({zIndex:a.value}))}}function Z2(e){return{teleportTarget:I(()=>{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 xu=ce({transition:{type:[Boolean,String,Object],default:"fade-transition",validator:e=>e!==!0}},"transition"),ti=(e,t)=>{let{slots:n}=t;const{transition:r,disabled:s,group:i,...o}=e,{component:a=i?Ab:Po,...l}=typeof r=="object"?r:{};return Ir(a,ve(typeof r=="string"?{name:s?"":r}:l,typeof r=="string"?{}:Object.fromEntries(Object.entries({disabled:s,group:i}).filter(u=>{let[c,d]=u;return d!==void 0})),o),n)};function eN(){return!0}function tR(e,t,n){if(!e||nR(e,n)===!1)return!1;const r=kT(t);if(typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&r.host===e.target)return!1;const s=(typeof n.value=="object"&&n.value.include||(()=>[]))();return s.push(t),!s.some(i=>i==null?void 0:i.contains(e.target))}function nR(e,t){return(typeof t.value=="object"&&t.value.closeConditional||eN)(e)}function tN(e,t,n){const r=typeof n.value=="function"?n.value:n.value.handler;e.shadowTarget=e.target,t._clickOutside.lastMousedownWasOutside&&tR(e,t,n)&&setTimeout(()=>{nR(e,n)&&r&&r(e)},0)}function o1(e,t){const n=kT(e);t(document),typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&t(n)}const nN={mounted(e,t){const n=s=>tN(s,e,t),r=s=>{e._clickOutside.lastMousedownWasOutside=tR(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=>{var i;if(!n||!((i=e._clickOutside)!=null&&i[t.instance.$.uid]))return;const{onClick:r,onMousedown:s}=e._clickOutside[t.instance.$.uid];n.removeEventListener("click",r,!0),n.removeEventListener("mousedown",s,!0)}),delete e._clickOutside[t.instance.$.uid])}};function rN(e){const{modelValue:t,color:n,...r}=e;return h(Po,{name:"fade-transition",appear:!0},{default:()=>[e.modelValue&&h("div",ve({class:["v-overlay__scrim",e.color.backgroundColorClasses.value],style:e.color.backgroundColorStyles.value},r),null)]})}const Dd=ce({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},...W2(),...Ue(),...Mr(),...ZT(),...$2(),...U2(),...Mt(),...xu()},"VOverlay"),Di=ke()({name:"VOverlay",directives:{ClickOutside:nN},inheritAttrs:!1,props:{_disableGlobalStack:Boolean,...Dd()},emits:{"click:outside":e=>!0,"update:modelValue":e=>!0,afterEnter:()=>!0,afterLeave:()=>!0},setup(e,t){let{slots:n,attrs:r,emit:s}=t;const i=sn("VOverlay"),o=B(),a=B(),l=B(),u=rt(e,"modelValue"),c=I({get:()=>u.value,set:oe=>{oe&&e.disabled||(u.value=oe)}}),{themeClasses:d}=Kt(e),{rtlClasses:f,isRtl:p}=$r(),{hasContent:g,onAfterLeave:m}=eR(e,c),y=fr(I(()=>typeof e.scrim=="string"?e.scrim:null)),{globalTop:b,localTop:w,stackStyles:S}=J2(c,Te(e,"zIndex"),e._disableGlobalStack),{activatorEl:C,activatorRef:_,target:R,targetEl:T,targetRef:x,activatorEvents:E,contentEvents:P,scrimEvents:M}=G2(e,{isActive:c,isTop:w,contentEl:l}),{teleportTarget:O}=Z2(()=>{var me,ne,U;const oe=e.attach||e.contained;if(oe)return oe;const ee=((me=C==null?void 0:C.value)==null?void 0:me.getRootNode())||((U=(ne=i.proxy)==null?void 0:ne.$el)==null?void 0:U.getRootNode());return ee instanceof ShadowRoot?ee:!1}),{dimensionStyles:A}=Dr(e),D=Q2(),{scopeId:H}=ku();xe(()=>e.disabled,oe=>{oe&&(c.value=!1)});const{contentStyles:z,updateLocation:Y}=L2(e,{isRtl:p,contentEl:l,target:R,isActive:c});H2(e,{root:o,contentEl:l,targetEl:T,isActive:c,updateLocation:Y});function q(oe){s("click:outside",oe),e.persistent?J():c.value=!1}function V(oe){return c.value&&b.value&&(!e.scrim||oe.target===a.value||oe instanceof MouseEvent&&oe.shadowTarget===a.value)}kt&&xe(c,oe=>{oe?window.addEventListener("keydown",G):window.removeEventListener("keydown",G)},{immediate:!0}),Pn(()=>{kt&&window.removeEventListener("keydown",G)});function G(oe){var ee,me;oe.key==="Escape"&&b.value&&(e.persistent?J():(c.value=!1,(ee=l.value)!=null&&ee.contains(document.activeElement)&&((me=C.value)==null||me.focus())))}const te=$T();qr(()=>e.closeOnBack,()=>{k2(te,oe=>{b.value&&c.value?(oe(!1),e.persistent?J():c.value=!1):oe()})});const W=B();xe(()=>c.value&&(e.absolute||e.contained)&&O.value==null,oe=>{if(oe){const ee=xT(o.value);ee&&ee!==document.scrollingElement&&(W.value=ee.scrollTop)}});function J(){e.noClickAnimation||l.value&&bl(l.value,[{transformOrigin:"center"},{transform:"scale(1.03)"},{transformOrigin:"center"}],{duration:150,easing:Fh})}function pe(){s("afterEnter")}function ae(){m(),s("afterLeave")}return Pe(()=>{var oe;return h(Ce,null,[(oe=n.activator)==null?void 0:oe.call(n,{isActive:c.value,targetRef:x,props:ve({ref:_},E.value,e.activatorProps)}),D.value&&g.value&&h(h$,{disabled:!O.value,to:O.value},{default:()=>[h("div",ve({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:[S.value,{"--v-overlay-opacity":e.opacity,top:Ve(W.value)},e.style],ref:o},H,r),[h(rN,ve({color:y,modelValue:c.value&&!!e.scrim,ref:a},M.value),null),h(ti,{appear:!0,persisted:!0,transition:e.transition,target:R.value,onAfterEnter:pe,onAfterLeave:ae},{default:()=>{var ee;return[Jt(h("div",ve({ref:l,class:["v-overlay__content",e.contentClass],style:[A.value,z.value]},P.value,e.contentProps),[(ee=n.default)==null?void 0:ee.call(n,{isActive:c})]),[[No,c.value],[hr("click-outside"),{handler:q,closeConditional:V,include:()=>[C.value]}]])]}})])]})])}),{activatorEl:C,scrimEl:a,target:R,animateClick:J,contentEl:l,globalTop:b,localTop:w,updateLocation:Y}}}),ug=Symbol("Forwarded refs");function cg(e,t){let n=e;for(;n;){const r=Reflect.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function zi(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[ug]=n,new Proxy(e,{get(s,i){if(Reflect.has(s,i))return Reflect.get(s,i);if(!(typeof i=="symbol"||i.startsWith("$")||i.startsWith("__"))){for(const o of n)if(o.value&&Reflect.has(o.value,i)){const a=Reflect.get(o.value,i);return typeof a=="function"?a.bind(o.value):a}}},has(s,i){if(Reflect.has(s,i))return!0;if(typeof i=="symbol"||i.startsWith("$")||i.startsWith("__"))return!1;for(const o of n)if(o.value&&Reflect.has(o.value,i))return!0;return!1},set(s,i,o){if(Reflect.has(s,i))return Reflect.set(s,i,o);if(typeof i=="symbol"||i.startsWith("$")||i.startsWith("__"))return!1;for(const a of n)if(a.value&&Reflect.has(a.value,i))return Reflect.set(a.value,i,o);return!1},getOwnPropertyDescriptor(s,i){var a;const o=Reflect.getOwnPropertyDescriptor(s,i);if(o)return o;if(!(typeof i=="symbol"||i.startsWith("$")||i.startsWith("__"))){for(const l of n){if(!l.value)continue;const u=cg(l.value,i)??("_"in l.value?cg((a=l.value._)==null?void 0:a.setupState,i):void 0);if(u)return u}for(const l of n){const u=l.value&&l.value[ug];if(!u)continue;const c=u.slice();for(;c.length;){const d=c.shift(),f=cg(d.value,i);if(f)return f;const p=d.value&&d.value[ug];p&&c.push(...p)}}}}})}const sN=ce({fullscreen:Boolean,retainFocus:{type:Boolean,default:!0},scrollable:Boolean,...Dd({origin:"center center",scrollStrategy:"block",transition:{component:Ub},zIndex:2400})},"VDialog"),rR=ke()({name:"VDialog",props:sN(),emits:{"update:modelValue":e=>!0,afterEnter:()=>!0,afterLeave:()=>!0},setup(e,t){let{emit:n,slots:r}=t;const s=rt(e,"modelValue"),{scopeId:i}=ku(),o=B();function a(c){var p,g;const d=c.relatedTarget,f=c.target;if(d!==f&&((p=o.value)!=null&&p.contentEl)&&((g=o.value)!=null&&g.globalTop)&&![document,o.value.contentEl].includes(f)&&!o.value.contentEl.contains(f)){const m=Nc(o.value.contentEl);if(!m.length)return;const y=m[0],b=m[m.length-1];d===y?b.focus():y.focus()}}Pn(()=>{document.removeEventListener("focusin",a)}),kt&&xe(()=>s.value&&e.retainFocus,c=>{c?document.addEventListener("focusin",a):document.removeEventListener("focusin",a)},{immediate:!0});function l(){var c;n("afterEnter"),(c=o.value)!=null&&c.contentEl&&!o.value.contentEl.contains(document.activeElement)&&o.value.contentEl.focus({preventScroll:!0})}function u(){n("afterLeave")}return xe(s,async c=>{var d;c||(await At(),(d=o.value.activatorEl)==null||d.focus({preventScroll:!0}))}),Pe(()=>{const c=Di.filterProps(e),d=ve({"aria-haspopup":"dialog"},e.activatorProps),f=ve({tabindex:-1},e.contentProps);return h(Di,ve({ref:o,class:["v-dialog",{"v-dialog--fullscreen":e.fullscreen,"v-dialog--scrollable":e.scrollable},e.class],style:e.style},c,{modelValue:s.value,"onUpdate:modelValue":p=>s.value=p,"aria-modal":"true",activatorProps:d,contentProps:f,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:l,onAfterLeave:u},i),{activator:r.activator,default:function(){for(var p=arguments.length,g=new Array(p),m=0;m<p;m++)g[m]=arguments[m];return h(It,{root:"VDialog"},{default:()=>{var y;return[(y=r.default)==null?void 0:y.call(r,...g)]}})}})}),zi({},o)}}),iN={class:"pa-3 text--primary"},di=De({__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=rT(),s=t,i=en(n.id);function o(c){return s("opened",c)}function a(c){return s("beforeOpened",c)}St(async()=>{iF("Escape",c=>{l.value&&(c.preventDefault(),u())}),r.registerDialogReference(n.id,{beforeOpenedCallback:a,openedCallback:o})}),Pn(()=>{r.unregisterDialogReference(n.id)});const l=I(()=>{if(!n.id)return;const c=r.isDialogOpened(n.id);return c&&console.debug(`[BaseDialog ${n.id}] Showing dialog: ${i==null?void 0:i.isDialogOpened()}`),c});function u(){s("escape")}return(c,d)=>(L(),Z(rR,{"max-width":e.maxWidth,"retain-focus":!1,"model-value":l.value,persistent:"",onClose:d[1]||(d[1]=f=>u())},{default:v(()=>[Np(c.$slots,"default",{},()=>[$("div",iN,[d[4]||(d[4]=k(" No content defined in dialog. ")),h(re,{onClick:d[0]||(d[0]=f=>Q(i).closeDialog())},{default:v(()=>[h(X,{class:"mr-3"},{default:v(()=>d[2]||(d[2]=[k("close")])),_:1}),d[3]||(d[3]=k("Close "))]),_:1})])])]),_:3},8,["max-width","model-value"]))}});var tn=(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))(tn||{});function sR(e,t){return function(){return e.apply(t,arguments)}}const{toString:oN}=Object.prototype,{getPrototypeOf:jb}=Object,Yp=(e=>t=>{const n=oN.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Os=e=>(e=e.toLowerCase(),t=>Yp(t)===e),Xp=e=>t=>typeof t===e,{isArray:Eu}=Array,zc=Xp("undefined");function aN(e){return e!==null&&!zc(e)&&e.constructor!==null&&!zc(e.constructor)&&Wr(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const iR=Os("ArrayBuffer");function lN(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&iR(e.buffer),t}const uN=Xp("string"),Wr=Xp("function"),oR=Xp("number"),Qp=e=>e!==null&&typeof e=="object",cN=e=>e===!0||e===!1,Zf=e=>{if(Yp(e)!=="object")return!1;const t=jb(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},dN=Os("Date"),fN=Os("File"),hN=Os("Blob"),pN=Os("FileList"),mN=e=>Qp(e)&&Wr(e.pipe),gN=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Wr(e.append)&&((t=Yp(e))==="formdata"||t==="object"&&Wr(e.toString)&&e.toString()==="[object FormData]"))},vN=Os("URLSearchParams"),[yN,bN,wN,SN]=["ReadableStream","Request","Response","Headers"].map(Os),_N=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function $d(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),Eu(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{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 aR(e,t){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 la=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,lR=e=>!zc(e)&&e!==la;function $v(){const{caseless:e}=lR(this)&&this||{},t={},n=(r,s)=>{const i=e&&aR(t,s)||s;Zf(t[i])&&Zf(r)?t[i]=$v(t[i],r):Zf(r)?t[i]=$v({},r):Eu(r)?t[i]=r.slice():t[i]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&$d(arguments[r],n);return t}const kN=(e,t,n,{allOwnKeys:r}={})=>($d(t,(s,i)=>{n&&Wr(s)?e[i]=sR(s,n):e[i]=s},{allOwnKeys:r}),e),xN=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),EN=(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)},CN=(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&&jb(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},TN=(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},RN=e=>{if(!e)return null;if(Eu(e))return e;let t=e.length;if(!oR(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},PN=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&jb(Uint8Array)),IN=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=r.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},AN=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},ON=Os("HTMLFormElement"),MN=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),a1=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),DN=Os("RegExp"),uR=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};$d(n,(s,i)=>{let o;(o=t(s,i,e))!==!1&&(r[i]=o||s)}),Object.defineProperties(e,r)},$N=e=>{uR(e,(t,n)=>{if(Wr(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Wr(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+"'")})}})},LN=(e,t)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return Eu(e)?r(e):r(String(e).split(t)),n},FN=()=>{},NN=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,dg="abcdefghijklmnopqrstuvwxyz",l1="0123456789",cR={DIGIT:l1,ALPHA:dg,ALPHA_DIGIT:dg+dg.toUpperCase()+l1},VN=(e=16,t=cR.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function BN(e){return!!(e&&Wr(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const UN=e=>{const t=new Array(10),n=(r,s)=>{if(Qp(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[s]=r;const i=Eu(r)?[]:{};return $d(r,(o,a)=>{const l=n(o,s+1);!zc(l)&&(i[a]=l)}),t[s]=void 0,i}}return r};return n(e,0)},HN=Os("AsyncFunction"),zN=e=>e&&(Qp(e)||Wr(e))&&Wr(e.then)&&Wr(e.catch),dR=((e,t)=>e?setImmediate:t?((n,r)=>(la.addEventListener("message",({source:s,data:i})=>{s===la&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),la.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Wr(la.postMessage)),jN=typeof queueMicrotask<"u"?queueMicrotask.bind(la):typeof process<"u"&&process.nextTick||dR,ue={isArray:Eu,isArrayBuffer:iR,isBuffer:aN,isFormData:gN,isArrayBufferView:lN,isString:uN,isNumber:oR,isBoolean:cN,isObject:Qp,isPlainObject:Zf,isReadableStream:yN,isRequest:bN,isResponse:wN,isHeaders:SN,isUndefined:zc,isDate:dN,isFile:fN,isBlob:hN,isRegExp:DN,isFunction:Wr,isStream:mN,isURLSearchParams:vN,isTypedArray:PN,isFileList:pN,forEach:$d,merge:$v,extend:kN,trim:_N,stripBOM:xN,inherits:EN,toFlatObject:CN,kindOf:Yp,kindOfTest:Os,endsWith:TN,toArray:RN,forEachEntry:IN,matchAll:AN,isHTMLForm:ON,hasOwnProperty:a1,hasOwnProp:a1,reduceDescriptors:uR,freezeMethods:$N,toObjectSet:LN,toCamelCase:MN,noop:FN,toFiniteNumber:NN,findKey:aR,global:la,isContextDefined:lR,ALPHABET:cR,generateString:VN,isSpecCompliantForm:BN,toJSONObject:UN,isAsyncFn:HN,isThenable:zN,setImmediate:dR,asap:jN};function tt(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}ue.inherits(tt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ue.toJSONObject(this.config),code:this.code,status:this.status}}});const fR=tt.prototype,hR={};["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=>{hR[e]={value:e}});Object.defineProperties(tt,hR);Object.defineProperty(fR,"isAxiosError",{value:!0});tt.from=(e,t,n,r,s,i)=>{const o=Object.create(fR);return ue.toFlatObject(e,o,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),tt.call(o,e.message,t,n,r,s),o.cause=e,o.name=e.name,i&&Object.assign(o,i),o};const qN=null;function Lv(e){return ue.isPlainObject(e)||ue.isArray(e)}function pR(e){return ue.endsWith(e,"[]")?e.slice(0,-2):e}function u1(e,t,n){return e?e.concat(t).map(function(s,i){return s=pR(s),!n&&i?"["+s+"]":s}).join(n?".":""):t}function WN(e){return ue.isArray(e)&&!e.some(Lv)}const GN=ue.toFlatObject(ue,{},null,function(t){return/^is[A-Z]/.test(t)});function Jp(e,t,n){if(!ue.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=ue.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,y){return!ue.isUndefined(y[m])});const r=n.metaTokens,s=n.visitor||c,i=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&ue.isSpecCompliantForm(t);if(!ue.isFunction(s))throw new TypeError("visitor must be a function");function u(g){if(g===null)return"";if(ue.isDate(g))return g.toISOString();if(!l&&ue.isBlob(g))throw new tt("Blob is not supported. Use a Buffer instead.");return ue.isArrayBuffer(g)||ue.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function c(g,m,y){let b=g;if(g&&!y&&typeof g=="object"){if(ue.endsWith(m,"{}"))m=r?m:m.slice(0,-2),g=JSON.stringify(g);else if(ue.isArray(g)&&WN(g)||(ue.isFileList(g)||ue.endsWith(m,"[]"))&&(b=ue.toArray(g)))return m=pR(m),b.forEach(function(S,C){!(ue.isUndefined(S)||S===null)&&t.append(o===!0?u1([m],C,i):o===null?m:m+"[]",u(S))}),!1}return Lv(g)?!0:(t.append(u1(y,m,i),u(g)),!1)}const d=[],f=Object.assign(GN,{defaultVisitor:c,convertValue:u,isVisitable:Lv});function p(g,m){if(!ue.isUndefined(g)){if(d.indexOf(g)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(g),ue.forEach(g,function(b,w){(!(ue.isUndefined(b)||b===null)&&s.call(t,b,ue.isString(w)?w.trim():w,m,f))===!0&&p(b,m?m.concat(w):[w])}),d.pop()}}if(!ue.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 qb(e,t){this._pairs=[],e&&Jp(e,this,t)}const mR=qb.prototype;mR.append=function(t,n){this._pairs.push([t,n])};mR.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 KN(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function gR(e,t,n){if(!t)return e;const r=n&&n.encode||KN;ue.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let i;if(s?i=s(t,n):i=ue.isURLSearchParams(t)?t.toString():new qb(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){ue.forEach(this.handlers,function(r){r!==null&&t(r)})}}const vR={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},YN=typeof URLSearchParams<"u"?URLSearchParams:qb,XN=typeof FormData<"u"?FormData:null,QN=typeof Blob<"u"?Blob:null,JN={isBrowser:!0,classes:{URLSearchParams:YN,FormData:XN,Blob:QN},protocols:["http","https","file","blob","url","data"]},Wb=typeof window<"u"&&typeof document<"u",Fv=typeof navigator=="object"&&navigator||void 0,ZN=Wb&&(!Fv||["ReactNative","NativeScript","NS"].indexOf(Fv.product)<0),eV=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",tV=Wb&&window.location.href||"http://localhost",nV=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Wb,hasStandardBrowserEnv:ZN,hasStandardBrowserWebWorkerEnv:eV,navigator:Fv,origin:tV},Symbol.toStringTag,{value:"Module"})),Jn={...nV,...JN};function rV(e,t){return Jp(e,new Jn.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,i){return Jn.isNode&&ue.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function sV(e){return ue.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 yR(e){function t(n,r,s,i){let o=n[i++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),l=i>=n.length;return o=!o&&ue.isArray(s)?s.length:o,l?(ue.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!a):((!s[o]||!ue.isObject(s[o]))&&(s[o]=[]),t(n,r,s[o],i)&&ue.isArray(s[o])&&(s[o]=iV(s[o])),!a)}if(ue.isFormData(e)&&ue.isFunction(e.entries)){const n={};return ue.forEachEntry(e,(r,s)=>{t(sV(r),s,n,0)}),n}return null}function oV(e,t,n){if(ue.isString(e))try{return(t||JSON.parse)(e),ue.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const Ld={transitional:vR,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=ue.isObject(t);if(i&&ue.isHTMLForm(t)&&(t=new FormData(t)),ue.isFormData(t))return s?JSON.stringify(yR(t)):t;if(ue.isArrayBuffer(t)||ue.isBuffer(t)||ue.isStream(t)||ue.isFile(t)||ue.isBlob(t)||ue.isReadableStream(t))return t;if(ue.isArrayBufferView(t))return t.buffer;if(ue.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return rV(t,this.formSerializer).toString();if((a=ue.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Jp(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||Ld.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(ue.isResponse(t)||ue.isReadableStream(t))return t;if(t&&ue.isString(t)&&(r&&!this.responseType||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(a){if(o)throw a.name==="SyntaxError"?tt.from(a,tt.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:Jn.classes.FormData,Blob:Jn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ue.forEach(["delete","get","head","post","put","patch"],e=>{Ld.headers[e]={}});const aV=ue.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),lV=e=>{const t={};let n,r,s;return e&&e.split(`
|
|
26
|
-
`).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!n||t[n]&&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 Gu(e){return e&&String(e).trim().toLowerCase()}function eh(e){return e===!1||e==null?e:ue.isArray(e)?e.map(eh):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 fg(e,t,n,r,s){if(ue.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!ue.isString(t)){if(ue.isString(r))return t.indexOf(r)!==-1;if(ue.isRegExp(r))return r.test(t)}}function dV(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function fV(e,t){const n=ue.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,i,o){return this[r].call(this,t,s,i,o)},configurable:!0})})}let Rr=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function i(a,l,u){const c=Gu(l);if(!c)throw new Error("header name must be a non-empty string");const d=ue.findKey(s,c);(!d||s[d]===void 0||u===!0||u===void 0&&s[d]!==!1)&&(s[d||l]=eh(a))}const o=(a,l)=>ue.forEach(a,(u,c)=>i(u,c,l));if(ue.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(ue.isString(t)&&(t=t.trim())&&!cV(t))o(lV(t),n);else if(ue.isHeaders(t))for(const[a,l]of t.entries())i(l,a,r);else t!=null&&i(n,t,r);return this}get(t,n){if(t=Gu(t),t){const r=ue.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return uV(s);if(ue.isFunction(n))return n.call(this,s,r);if(ue.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Gu(t),t){const r=ue.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||fg(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function i(o){if(o=Gu(o),o){const a=ue.findKey(r,o);a&&(!n||fg(r,r[a],a,n))&&(delete r[a],s=!0)}}return ue.isArray(t)?t.forEach(i):i(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const i=n[r];(!t||fg(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const n=this,r={};return ue.forEach(this,(s,i)=>{const o=ue.findKey(r,i);if(o){n[o]=eh(s),delete n[i];return}const a=t?dV(i):String(i).trim();a!==i&&delete n[i],n[a]=eh(s),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return ue.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&ue.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
27
|
-
`)}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=Gu(o);r[a]||(fV(s,o),r[a]=!0)}return ue.isArray(t)?t.forEach(i):i(t),this}};Rr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ue.reduceDescriptors(Rr.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});ue.freezeMethods(Rr);function hg(e,t){const n=this||Ld,r=t||n,s=Rr.from(r.headers);let i=r.data;return ue.forEach(e,function(a){i=a.call(n,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function bR(e){return!!(e&&e.__CANCEL__)}function Cu(e,t,n){tt.call(this,e??"canceled",tt.ERR_CANCELED,t,n),this.name="CanceledError"}ue.inherits(Cu,tt,{__CANCEL__:!0});function wR(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new tt("Request failed with status code "+n.status,[tt.ERR_BAD_REQUEST,tt.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.apply(null,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 Hh=(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)=>ue.asap(()=>e(...t)),gV=Jn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Jn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Jn.origin),Jn.navigator&&/(msie|trident)/i.test(Jn.navigator.userAgent)):()=>!0,vV=Jn.hasStandardBrowserEnv?{write(e,t,n,r,s,i){const o=[e+"="+encodeURIComponent(t)];ue.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),ue.isString(r)&&o.push("path="+r),ue.isString(s)&&o.push("domain="+s),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function yV(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function bV(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function SR(e,t){return e&&!yV(t)?bV(e,t):t}const m1=e=>e instanceof Rr?{...e}:e;function $a(e,t){t=t||{};const n={};function r(u,c,d,f){return ue.isPlainObject(u)&&ue.isPlainObject(c)?ue.merge.call({caseless:f},u,c):ue.isPlainObject(c)?ue.merge({},c):ue.isArray(c)?c.slice():c}function s(u,c,d,f){if(ue.isUndefined(c)){if(!ue.isUndefined(u))return r(void 0,u,d,f)}else return r(u,c,d,f)}function i(u,c){if(!ue.isUndefined(c))return r(void 0,c)}function o(u,c){if(ue.isUndefined(c)){if(!ue.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function a(u,c,d){if(d in t)return r(u,c);if(d in e)return r(void 0,u)}const l={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(u,c,d)=>s(m1(u),m1(c),d,!0)};return ue.forEach(Object.keys(Object.assign({},e,t)),function(c){const d=l[c]||s,f=d(e[c],t[c],c);ue.isUndefined(f)&&d!==a||(n[c]=f)}),n}const _R=e=>{const t=$a({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:a}=t;t.headers=o=Rr.from(o),t.url=gR(SR(t.baseURL,t.url),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let l;if(ue.isFormData(n)){if(Jn.hasStandardBrowserEnv||Jn.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((l=o.getContentType())!==!1){const[u,...c]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];o.setContentType([u||"multipart/form-data",...c].join("; "))}}if(Jn.hasStandardBrowserEnv&&(r&&ue.isFunction(r)&&(r=r(t)),r||r!==!1&&gV(t.url))){const u=s&&i&&vV.read(i);u&&o.set(s,u)}return t},wV=typeof XMLHttpRequest<"u",SV=wV&&function(e){return new Promise(function(n,r){const s=_R(e);let i=s.data;const o=Rr.from(s.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=s,c,d,f,p,g;function m(){p&&p(),g&&g(),s.cancelToken&&s.cancelToken.unsubscribe(c),s.signal&&s.signal.removeEventListener("abort",c)}let y=new XMLHttpRequest;y.open(s.method.toUpperCase(),s.url,!0),y.timeout=s.timeout;function b(){if(!y)return;const S=Rr.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),_={data:!a||a==="text"||a==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:S,config:e,request:y};wR(function(T){n(T),m()},function(T){r(T),m()},_),y=null}"onloadend"in y?y.onloadend=b:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(b)},y.onabort=function(){y&&(r(new tt("Request aborted",tt.ECONNABORTED,e,y)),y=null)},y.onerror=function(){r(new tt("Network Error",tt.ERR_NETWORK,e,y)),y=null},y.ontimeout=function(){let C=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const _=s.transitional||vR;s.timeoutErrorMessage&&(C=s.timeoutErrorMessage),r(new tt(C,_.clarifyTimeoutError?tt.ETIMEDOUT:tt.ECONNABORTED,e,y)),y=null},i===void 0&&o.setContentType(null),"setRequestHeader"in y&&ue.forEach(o.toJSON(),function(C,_){y.setRequestHeader(_,C)}),ue.isUndefined(s.withCredentials)||(y.withCredentials=!!s.withCredentials),a&&a!=="json"&&(y.responseType=s.responseType),u&&([f,g]=Hh(u,!0),y.addEventListener("progress",f)),l&&y.upload&&([d,p]=Hh(l),y.upload.addEventListener("progress",d),y.upload.addEventListener("loadend",p)),(s.cancelToken||s.signal)&&(c=S=>{y&&(r(!S||S.type?new Cu(null,e,y):S),y.abort(),y=null)},s.cancelToken&&s.cancelToken.subscribe(c),s.signal&&(s.signal.aborted?c():s.signal.addEventListener("abort",c)));const w=hV(s.url);if(w&&Jn.protocols.indexOf(w)===-1){r(new tt("Unsupported protocol "+w+":",tt.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 tt?c:new Cu(c instanceof Error?c.message:c))}};let o=t&&setTimeout(()=>{o=null,i(new tt(`timeout ${t} of ms exceeded`,tt.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>u.addEventListener("abort",i));const{signal:l}=r;return l.unsubscribe=()=>ue.asap(a),l}},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})},Zp=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",kR=Zp&&typeof ReadableStream=="function",CV=Zp&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),xR=(e,...t)=>{try{return!!e(...t)}catch{return!1}},TV=kR&&xR(()=>{let e=!1;const t=new Request(Jn.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),v1=64*1024,Nv=kR&&xR(()=>ue.isReadableStream(new Response("").body)),zh={stream:Nv&&(e=>e.body)};Zp&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!zh[t]&&(zh[t]=ue.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new tt(`Response type '${t}' is not supported`,tt.ERR_NOT_SUPPORT,r)})})})(new Response);const RV=async e=>{if(e==null)return 0;if(ue.isBlob(e))return e.size;if(ue.isSpecCompliantForm(e))return(await new Request(Jn.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(ue.isArrayBufferView(e)||ue.isArrayBuffer(e))return e.byteLength;if(ue.isURLSearchParams(e)&&(e=e+""),ue.isString(e))return(await CV(e)).byteLength},PV=async(e,t)=>{const n=ue.toFiniteNumber(e.getContentLength());return n??RV(t)},IV=Zp&&(async e=>{let{url:t,method:n,data:r,signal:s,cancelToken:i,timeout:o,onDownloadProgress:a,onUploadProgress:l,responseType:u,headers:c,withCredentials:d="same-origin",fetchOptions:f}=_R(e);u=u?(u+"").toLowerCase():"text";let p=_V([s,i&&i.toAbortSignal()],o),g;const m=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let y;try{if(l&&TV&&n!=="get"&&n!=="head"&&(y=await PV(c,r))!==0){let _=new Request(t,{method:"POST",body:r,duplex:"half"}),R;if(ue.isFormData(r)&&(R=_.headers.get("content-type"))&&c.setContentType(R),_.body){const[T,x]=h1(y,Hh(p1(l)));r=g1(_.body,v1,T,x)}}ue.isString(d)||(d=d?"include":"omit");const b="credentials"in Request.prototype;g=new Request(t,{...f,signal:p,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:b?d:void 0});let w=await fetch(g);const S=Nv&&(u==="stream"||u==="response");if(Nv&&(a||S&&m)){const _={};["status","statusText","headers"].forEach(E=>{_[E]=w[E]});const R=ue.toFiniteNumber(w.headers.get("content-length")),[T,x]=a&&h1(R,Hh(p1(a),!0))||[];w=new Response(g1(w.body,v1,T,()=>{x&&x(),m&&m()}),_)}u=u||"text";let C=await zh[ue.findKey(zh,u)||"text"](w,e);return!S&&m&&m(),await new Promise((_,R)=>{wR(_,R,{data:C,headers:Rr.from(w.headers),status:w.status,statusText:w.statusText,config:e,request:g})})}catch(b){throw m&&m(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new tt("Network Error",tt.ERR_NETWORK,e,g),{cause:b.cause||b}):tt.from(b,b&&b.code,e,g)}}),Vv={http:qN,xhr:SV,fetch:IV};ue.forEach(Vv,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const y1=e=>`- ${e}`,AV=e=>ue.isFunction(e)||e===null||e===!1,ER={getAdapter:e=>{e=ue.isArray(e)?e:[e];const{length:t}=e;let n,r;const s={};for(let i=0;i<t;i++){n=e[i];let o;if(r=n,!AV(n)&&(r=Vv[(o=String(n)).toLowerCase()],r===void 0))throw new tt(`Unknown adapter '${o}'`);if(r)break;s[o||"#"+i]=r}if(!r){const i=Object.entries(s).map(([a,l])=>`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=t?i.length>1?`since :
|
|
28
|
-
`+i.map(y1).join(`
|
|
29
|
-
`):" "+y1(i[0]):"as no adapter specified";throw new tt("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:Vv};function pg(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Cu(null,e)}function b1(e){return pg(e),e.headers=Rr.from(e.headers),e.data=hg.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ER.getAdapter(e.adapter||Ld.adapter)(e).then(function(r){return pg(e),r.data=hg.call(e,e.transformResponse,r),r.headers=Rr.from(r.headers),r},function(r){return bR(r)||(pg(e),r&&r.response&&(r.response.data=hg.call(e,e.transformResponse,r.response),r.response.headers=Rr.from(r.response.headers))),Promise.reject(r)})}const CR="1.7.9",em={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{em[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const w1={};em.transitional=function(t,n,r){function s(i,o){return"[Axios v"+CR+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,a)=>{if(t===!1)throw new tt(s(o," has been removed"+(n?" in "+n:"")),tt.ERR_DEPRECATED);return n&&!w1[o]&&(w1[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}};em.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function OV(e,t,n){if(typeof e!="object")throw new tt("options must be an object",tt.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 tt("option "+i+" must be "+l,tt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new tt("Unknown option "+i,tt.ERR_BAD_OPTION)}}const th={assertOptions:OV,validators:em},Vs=th.validators;let Ea=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+=`
|
|
30
|
-
`+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=$a(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&th.assertOptions(r,{silentJSONParsing:Vs.transitional(Vs.boolean),forcedJSONParsing:Vs.transitional(Vs.boolean),clarifyTimeoutError:Vs.transitional(Vs.boolean)},!1),s!=null&&(ue.isFunction(s)?n.paramsSerializer={serialize:s}:th.assertOptions(s,{encode:Vs.function,serialize:Vs.function},!0)),th.assertOptions(n,{baseUrl:Vs.spelling("baseURL"),withXsrfToken:Vs.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&ue.merge(i.common,i[n.method]);i&&ue.forEach(["delete","get","head","post","put","patch","common"],g=>{delete i[g]}),n.headers=Rr.concat(o,i);const a=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(l=l&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let c,d=0,f;if(!l){const g=[b1.bind(this),void 0];for(g.unshift.apply(g,a),g.push.apply(g,u),f=g.length,c=Promise.resolve(n);d<f;)c=c.then(g[d++],g[d++]);return c}f=a.length;let p=n;for(d=0;d<f;){const g=a[d++],m=a[d++];try{p=g(p)}catch(y){m.call(this,y);break}}try{c=b1.call(this,p)}catch(g){return Promise.reject(g)}for(d=0,f=u.length;d<f;)c=c.then(u[d++],u[d++]);return c}getUri(t){t=$a(this.defaults,t);const n=SR(t.baseURL,t.url);return gR(n,t.params,t.paramsSerializer)}};ue.forEach(["delete","get","head","options"],function(t){Ea.prototype[t]=function(n,r){return this.request($a(r||{},{method:t,url:n,data:(r||{}).data}))}});ue.forEach(["post","put","patch"],function(t){function n(r){return function(i,o,a){return this.request($a(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}Ea.prototype[t]=n(),Ea.prototype[t+"Form"]=n(!0)});let MV=class TR{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 Cu(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 TR(function(s){t=s}),cancel:t}}};function DV(e){return function(n){return e.apply(null,n)}}function $V(e){return ue.isObject(e)&&e.isAxiosError===!0}const Bv={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Bv).forEach(([e,t])=>{Bv[t]=e});function RR(e){const t=new Ea(e),n=sR(Ea.prototype.request,t);return ue.extend(n,Ea.prototype,t,{allOwnKeys:!0}),ue.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return RR($a(e,s))},n}const cn=RR(Ld);cn.Axios=Ea;cn.CanceledError=Cu;cn.CancelToken=MV;cn.isCancel=bR;cn.VERSION=CR;cn.toFormData=Jp;cn.AxiosError=tt;cn.Cancel=cn.CanceledError;cn.all=function(t){return Promise.all(t)};cn.spread=DV;cn.isAxiosError=$V;cn.mergeConfig=$a;cn.AxiosHeaders=Rr;cn.formToJSON=e=>yR(ue.isHTMLForm(e)?new FormData(e):e);cn.getAdapter=ER.getAdapter;cn.HttpStatusCode=Bv;cn.default=cn;const{Axios:coe,AxiosError:PR,CanceledError:doe,isCancel:foe,CancelToken:hoe,VERSION:poe,all:moe,Cancel:goe,isAxiosError:voe,spread:yoe,toFormData:boe,AxiosHeaders:woe,HttpStatusCode:ua,formToJSON:Soe,getAdapter:_oe,mergeConfig:koe}=cn;class ic extends Error{}ic.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 ic("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 ic(`Invalid token specified: missing part #${n+1}`);let s;try{s=FV(r)}catch(i){throw new ic(`Invalid token specified: invalid base64 for part #${n+1} (${i.message})`)}try{return JSON.parse(s)}catch(i){throw new ic(`Invalid token specified: invalid json for part #${n+1} (${i.message})`)}}function VV(e,t={}){const{onError:n,fallbackValue:r=null}=t,s=(a,l)=>{try{return NV(a,l)}catch(u){return n==null||n(u),r}},i=I(()=>s(Jl(e),{header:!0})),o=I(()=>s(Jl(e)));return{header:i,payload:o}}class sa{static async getLoginRequired(){return await(await Gn(!1,!1)).get("/api/auth/login-required")}static async postLogin(t,n){return await(await Gn(!1,!1)).post("/api/auth/login",{username:t,password:n})}static async logout(){return await(await Gn(!0,!1)).post("/api/auth/logout")}static async refreshLogin(t){return await(await Gn(!1,!1)).post("/api/auth/refresh",{refreshToken:t})}static async verifyLogin(){return await(await Gn(!0,!1)).post("/api/auth/verify")}static async registerAccount(t,n){return await(await Gn(!0,!1)).post("/api/auth/register",{username:t,password:n})}}const xr={IncorrectCredentials:"IncorrectCredentials",InvalidOrExpiredRefreshToken:"InvalidOrExpiredRefreshToken",InvalidOrExpiredAuthToken:"InvalidOrExpiredAuthToken",PasswordChangeRequired:"PasswordChangeRequired",LoginRequired:"LoginRequired",AccountNotVerified:"AccountNotVerified"};function Gb(e){switch(e){case xr.IncorrectCredentials:return"Incorrect credentials";case xr.InvalidOrExpiredRefreshToken:return"Invalid or expired refresh token";case xr.InvalidOrExpiredAuthToken:return"Invalid or expired auth token";case xr.PasswordChangeRequired:return"Password change required";case xr.LoginRequired:return"Login required";case xr.AccountNotVerified:return"Account not verified";default:return"Authentication error"}}const as=Ts("auth",{state:()=>({isDemoMode:null,token:null,refreshToken:null,loginRequired:null,registration:null,wizardState:null,lastLogoutReason:null}),actions:{async checkAuthenticationRequirements(){return await sa.getLoginRequired().then(e=>(this.loginRequired=e.data.loginRequired,this.wizardState=e.data.wizardState,this.registration=e.data.registration,this.isDemoMode=e.data.isDemoMode,{loginRequired:this.loginRequired,wizardState:this.wizardState,registration:this.registration})).catch(e=>{var t;throw console.error("authRequired: failed to check login required",(t=e.response)==null?void 0:t.status),e})},async login(e,t){return this.lastLogoutReason=null,await sa.postLogin(e,t).then(n=>(this.setTokens(n.data.token,n.data.refreshToken),n.data)).catch(n=>{var r;throw console.error("login: failed to login",(r=n.response)==null?void 0:r.status),n})},async logout(e=!1,t){if(console.debug(`Logging out (calling server ${e})`),t&&(this.lastLogoutReason=t),e&&this.tokenClaims&&!this.isLoginExpired)try{await sa.logout()}catch(n){console.error("Server could not process logout, but local logout was successful",n)}this.setIdToken(void 0),this.setRefreshToken(void 0)},async verifyOrRefreshLoginOnceOrLogout(){var e,t;try{return await sa.verifyLogin(),{success:!0}}catch(n){console.error("[AuthStore.verifyOrRefreshLoginOnce]: failed to verify login",n);const r=n;if(!r.response||((e=r.response)==null?void 0:e.status)!==ua.Unauthorized)throw console.error("[AuthStore.verifyOrRefreshLoginOnce]: unknown error",r.status),n;const{reasonCode:s,url:i}=this.extractSpecialReasonCode(n);if(s)return await this.logout(!1,Gb(s)),console.error(`[AuthStore] 401 Unauthorized - emitting 'auth:${s}' with reason ${s}`),Ur(`auth:${s}`).emit({url:i,error:r.message,reasonCode:s}),{success:!1,handled:!0};if(!this.hasRefreshToken)return{success:!1,handled:!1};try{await this.refreshLoginToken(),await sa.verifyLogin()}catch(o){const a=o;if(((t=a.response)==null?void 0:t.status)===ua.Unauthorized)return await this.logout(!1),console.error("[AuthStore.verifyOrRefreshLoginOnce]: failed to refresh token",a.status),{success:!1,handled:!1};throw o}return{success:!0,handled:!1}}},extractSpecialReasonCode(e){var n,r,s;const t=(r=(n=e==null?void 0:e.response)==null?void 0:n.data)==null?void 0:r.reasonCode;return t&&console.error("[AuthStore] 401 Unauthorized - Checking received reason code",t),t&&(t===xr.AccountNotVerified||t===xr.PasswordChangeRequired)?{reasonCode:t,url:(s=e==null?void 0:e.config)==null?void 0:s.url}:{reasonCode:null,url:null}},loadTokens(){this.token=localStorage.getItem("token"),this.refreshToken=localStorage.getItem("refreshToken")},async refreshLoginToken(){if(!this.refreshToken)throw new Error("refreshLoginToken: no refresh token");return await sa.refreshLogin(this.refreshToken).then(e=>{var t;return(t=e==null?void 0:e.data)!=null&&t.token&&this.setIdToken(e.data.token),!0}).catch(e=>{var t,n,r;throw((t=e.response)==null?void 0:t.status)==ua.Unauthorized?(this.setTokens(void 0,void 0),console.error("refreshLoginToken: authentication error, failed to refresh tokens",(n=e.response)==null?void 0:n.status)):console.error("refreshLoginToken: unknown error, failed to refresh tokens",(r=e.response)==null?void 0:r.status),e})},setTokens(e,t){this.setIdToken(e),this.setRefreshToken(t)},setIdToken(e){e!=null&&e.length?(localStorage.setItem("token",e),this.token=e):localStorage.removeItem("token")},setRefreshToken(e){e!=null&&e.length?(localStorage.setItem("refreshToken",e),this.refreshToken=e):localStorage.removeItem("refreshToken")}},getters:{hasRefreshToken(){return!!this.refreshToken},isLoginExpired(){const e=this.tokenClaims;return e!=null&&e.exp?e.exp<Date.now()/1e3:!1},hasAuthToken(){return!!this.tokenClaims},tokenClaims(){if(!this.token)return null;const e=VV(this.token,{fallbackValue:null});return e?e.payload.value:null}}}),et=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Ii="8.42.0",pt=globalThis;function tm(e,t,n){const r=pt,s=r.__SENTRY__=r.__SENTRY__||{},i=s[Ii]=s[Ii]||{};return i[e]||(i[e]=t())}const Ho=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,BV="Sentry Logger ",Uv=["debug","info","warn","error","log","assert","trace"],jh={};function Ms(e){if(!("console"in pt))return e();const t=pt.console,n={},r=Object.keys(jh);r.forEach(s=>{const i=jh[s];n[s]=t[s],t[s]=i});try{return e()}finally{r.forEach(s=>{t[s]=n[s]})}}function UV(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return Ho?Uv.forEach(n=>{t[n]=(...r)=>{e&&Ms(()=>{pt.console[n](`${BV}[${n}]:`,...r)})}}):Uv.forEach(n=>{t[n]=()=>{}}),t}const Re=tm("logger",UV),IR=50,La="?",S1=/\(error: (.*)\)/,_1=/captureMessage|captureException/;function AR(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,s=0)=>{const i=[],o=n.split(`
|
|
31
|
-
`);for(let a=r;a<o.length;a++){const l=o[a];if(l.length>1024)continue;const u=S1.test(l)?l.replace(S1,"$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>=IR+s)break}}return zV(i.slice(s))}}function HV(e){return Array.isArray(e)?AR(...e):e}function zV(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(lf(t).function||"")&&t.pop(),t.reverse(),_1.test(lf(t).function||"")&&(t.pop(),_1.test(lf(t).function||"")&&t.pop()),t.slice(0,IR).map(n=>({...n,filename:n.filename||lf(t).filename,function:n.function||La}))}function lf(e){return e[e.length-1]||{}}const mg="<anonymous>";function $i(e){try{return!e||typeof e!="function"?mg:e.name||mg}catch{return mg}}function k1(e){const t=e.exception;if(t){const n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}const nh={},x1={};function zo(e,t){nh[e]=nh[e]||[],nh[e].push(t)}function jo(e,t){if(!x1[e]){x1[e]=!0;try{t()}catch(n){Ho&&Re.error(`Error while instrumenting ${e}`,n)}}}function is(e,t){const n=e&&nh[e];if(n)for(const r of n)try{r(t)}catch(s){Ho&&Re.error(`Error while triggering instrumentation handler.
|
|
32
|
-
Type: ${e}
|
|
33
|
-
Name: ${$i(r)}
|
|
34
|
-
Error:`,s)}}let uf=null;function OR(e){const t="error";zo(t,e),jo(t,jV)}function jV(){uf=pt.onerror,pt.onerror=function(e,t,n,r,s){return is("error",{column:r,error:s,line:n,msg:e,url:t}),uf&&!uf.__SENTRY_LOADER__?uf.apply(this,arguments):!1},pt.onerror.__SENTRY_INSTRUMENTED__=!0}let cf=null;function MR(e){const t="unhandledrejection";zo(t,e),jo(t,qV)}function qV(){cf=pt.onunhandledrejection,pt.onunhandledrejection=function(e){return is("unhandledrejection",e),cf&&!cf.__SENTRY_LOADER__?cf.apply(this,arguments):!0},pt.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function Ya(){return Kb(pt),pt}function Kb(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Ii,t[Ii]=t[Ii]||{}}const DR=Object.prototype.toString;function Yb(e){switch(DR.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Li(e,Error)}}function Tu(e,t){return DR.call(e)===`[object ${t}]`}function $R(e){return Tu(e,"ErrorEvent")}function E1(e){return Tu(e,"DOMError")}function WV(e){return Tu(e,"DOMException")}function Ai(e){return Tu(e,"String")}function Xb(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Qb(e){return e===null||Xb(e)||typeof e!="object"&&typeof e!="function"}function tu(e){return Tu(e,"Object")}function nm(e){return typeof Event<"u"&&Li(e,Event)}function GV(e){return typeof Element<"u"&&Li(e,Element)}function KV(e){return Tu(e,"RegExp")}function rm(e){return!!(e&&e.then&&typeof e.then=="function")}function YV(e){return tu(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function Li(e,t){try{return e instanceof t}catch{return!1}}function LR(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}const Il=pt,XV=80;function Fi(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||XV;for(;n&&i++<r&&(u=QV(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 QV(e,t){const n=e,r=[];if(!n||!n.tagName)return"";if(Il.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&&t.length?t.filter(o=>n.getAttribute(o)).map(o=>[o,n.getAttribute(o)]):null;if(s&&s.length)s.forEach(o=>{r.push(`[${o[0]}="${o[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const o=n.className;if(o&&Ai(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 FR(){try{return Il.document.location.href}catch{return""}}function JV(e){return Il.document&&Il.document.querySelector?Il.document.querySelector(e):null}function NR(e){if(!Il.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 Al(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function C1(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const s=e[r];try{LR(s)?n.push("[VueViewModel]"):n.push(String(s))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function ZV(e,t,n=!1){return Ai(e)?KV(t)?t.test(e):Ai(t)?n?e===t:e.includes(t):!1:!1}function _o(e,t=[],n=!1){return t.some(r=>ZV(e,r,n))}function Cr(e,t,n){if(!(t in e))return;const r=e[t],s=n(r);typeof s=="function"&&VR(s,r);try{e[t]=s}catch{Ho&&Re.log(`Failed to replace method "${t}" in object`,e)}}function ls(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{Ho&&Re.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function VR(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,ls(e,"__sentry_original__",t)}catch{}}function Jb(e){return e.__sentry_original__}function BR(e){if(Yb(e))return{message:e.message,name:e.name,stack:e.stack,...R1(e)};if(nm(e)){const t={type:e.type,target:T1(e.target),currentTarget:T1(e.currentTarget),...R1(e)};return typeof CustomEvent<"u"&&Li(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function T1(e){try{return GV(e)?Fi(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function R1(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 eB(e,t=40){const n=Object.keys(BR(e));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return Al(r,t);for(let s=n.length;s>0;s--){const i=n.slice(0,s).join(", ");if(!(i.length>t))return s===n.length?i:Al(i,t)}return""}function xn(e){return Hv(e,new Map)}function Hv(e,t){if(tB(e)){const n=t.get(e);if(n!==void 0)return n;const r={};t.set(e,r);for(const s of Object.getOwnPropertyNames(e))typeof e[s]<"u"&&(r[s]=Hv(e[s],t));return r}if(Array.isArray(e)){const n=t.get(e);if(n!==void 0)return n;const r=[];return t.set(e,r),e.forEach(s=>{r.push(Hv(s,t))}),r}return e}function tB(e){if(!tu(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const UR=1e3;function Fd(){return Date.now()/UR}function nB(){const{performance:e}=pt;if(!e||!e.now)return Fd;const t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/UR}const tr=nB(),pr=(()=>{const{performance:e}=pt;if(!e||!e.now)return;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&&e.timing.navigationStart,l=typeof o=="number"?Math.abs(o+n-r):t,u=l<t;return i||u?s<=l?e.timeOrigin:o:r})();function Cn(){const e=pt,t=e.crypto||e.msCrypto;let n=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const r=new Uint8Array(1);return t.getRandomValues(r),r[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function HR(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function to(e){const{message:t,event_id:n}=e;if(t)return t;const r=HR(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function zv(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 jc(e,t){const n=HR(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&&s.data,...t.data};n.mechanism.data=i}}function P1(e){if(rB(e))return!0;try{ls(e,"__sentry_captured__",!0)}catch{}return!1}function rB(e){try{return e.__sentry_captured__}catch{}}var xi;(function(e){e[e.PENDING=0]="PENDING";const n=1;e[e.RESOLVED=n]="RESOLVED";const r=2;e[e.REJECTED=r]="REJECTED"})(xi||(xi={}));function Ni(e){return new ts(t=>{t(e)})}function qh(e){return new ts((t,n)=>{n(e)})}class ts{constructor(t){ts.prototype.__init.call(this),ts.prototype.__init2.call(this),ts.prototype.__init3.call(this),ts.prototype.__init4.call(this),this._state=xi.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new ts((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 ts((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)})})}__init(){this._resolve=t=>{this._setResult(xi.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(xi.REJECTED,t)}}__init3(){this._setResult=(t,n)=>{if(this._state===xi.PENDING){if(rm(n)){n.then(this._resolve,this._reject);return}this._state=t,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===xi.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===xi.RESOLVED&&n[1](this._value),this._state===xi.REJECTED&&n[2](this._value),n[0]=!0)})}}}function sB(e){const t=tr(),n={sid:Cn(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>oB(n)};return e&&nu(n,e),n}function nu(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||tr(),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:Cn()),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 iB(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),nu(e,n)}function oB(e){return xn({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 qc(){return Cn()}function Wh(){return Cn().substring(16)}function sm(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&t&&Object.keys(t).length===0)return e;const r={...e};for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=sm(r[s],t[s],n-1));return r}const jv="_sentrySpan";function Wc(e,t){t?ls(e,jv,t):delete e[jv]}function Gh(e){return e[jv]}const aB=100;class Zb{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:qc(),spanId:Wh()}}clone(){const t=new Zb;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},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._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,Wc(t,Gh(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&&nu(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n=typeof t=="function"?t(this):t,[r,s]=n instanceof Io?[n.getScopeData(),n.getRequestSession()]:tu(n)?[t,t.requestSession]:[],{tags:i,extra:o,user:a,contexts:l,level:u,fingerprint:c=[],propagationContext:d}=r||{};return this._tags={...this._tags,...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),s&&(this._requestSession=s),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,Wc(this,void 0),this._attachments=[],this.setPropagationContext({traceId:qc()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:aB;if(r<=0)return this;const s={timestamp:Fd(),...t},i=this._breadcrumbs;return i.push(s),this._breadcrumbs=i.length>r?i.slice(-r):i,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Gh(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=sm(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext={spanId:Wh(),...t},this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n&&n.event_id?n.event_id:Cn();if(!this._client)return 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&&r.event_id?r.event_id:Cn();if(!this._client)return Re.warn("No client configured on scope - will not capture message!"),s;const i=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:i,...r,event_id:s},this),s}captureEvent(t,n){const r=n&&n.event_id?n.event_id:Cn();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(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)}}const Io=Zb;function lB(){return tm("defaultCurrentScope",()=>new Io)}function uB(){return tm("defaultIsolationScope",()=>new Io)}class cB{constructor(t,n){let r;t?r=t:r=new Io;let s;n?s=n:s=new Io,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 rm(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 ru(){const e=Ya(),t=Kb(e);return t.stack=t.stack||new cB(lB(),uB())}function dB(e){return ru().withScope(e)}function fB(e,t){const n=ru();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function I1(e){return ru().withScope(()=>e(ru().getIsolationScope()))}function hB(){return{withIsolationScope:I1,withScope:dB,withSetScope:fB,withSetIsolationScope:(e,t)=>I1(t),getCurrentScope:()=>ru().getScope(),getIsolationScope:()=>ru().getIsolationScope()}}function Ru(e){const t=Kb(e);return t.acs?t.acs:hB()}function Nt(){const e=Ya();return Ru(e).getCurrentScope()}function fi(){const e=Ya();return Ru(e).getIsolationScope()}function pB(){return tm("globalScope",()=>new Io)}function ew(...e){const t=Ya(),n=Ru(t);if(e.length===2){const[r,s]=e;return r?n.withSetScope(r,s):n.withScope(s)}return n.withScope(e[0])}function dt(){return Nt().getClient()}function mB(e){const t=e.getPropagationContext(),{traceId:n,spanId:r,parentSpanId:s}=t;return xn({trace_id:n,span_id:r,parent_span_id:s})}const gB="_sentryMetrics";function qv(e){const t=e[gB];if(!t)return;const n={};for(const[,[r,s]]of t)(n[r]||(n[r]=[])).push(xn(s));return n}const jr="sentry.source",zR="sentry.sample_rate",Fa="sentry.op",an="sentry.origin",Wv="sentry.idle_span_finish_reason",im="sentry.measurement_unit",om="sentry.measurement_value",vB="sentry.profile_id",tw="sentry.exclusive_time",yB=0,jR=1,In=2;function bB(e){if(e<400&&e>=100)return{code:jR};if(e>=400&&e<500)switch(e){case 401:return{code:In,message:"unauthenticated"};case 403:return{code:In,message:"permission_denied"};case 404:return{code:In,message:"not_found"};case 409:return{code:In,message:"already_exists"};case 413:return{code:In,message:"failed_precondition"};case 429:return{code:In,message:"resource_exhausted"};case 499:return{code:In,message:"cancelled"};default:return{code:In,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:In,message:"unimplemented"};case 503:return{code:In,message:"unavailable"};case 504:return{code:In,message:"deadline_exceeded"};default:return{code:In,message:"internal_error"}}return{code:In,message:"unknown_error"}}function qR(e,t){e.setAttribute("http.response.status_code",t);const n=bB(t);n.message!=="unknown_error"&&e.setStatus(n)}const nw="sentry-",wB=/^sentry-/,SB=8192;function WR(e){const t=kB(e);if(!t)return;const n=Object.entries(t).reduce((r,[s,i])=>{if(s.match(wB)){const o=s.slice(nw.length);r[o]=i}return r},{});if(Object.keys(n).length>0)return n}function _B(e){if(!e)return;const t=Object.entries(e).reduce((n,[r,s])=>(s&&(n[`${nw}${r}`]=s),n),{});return xB(t)}function kB(e){if(!(!e||!Ai(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=A1(n);return Object.entries(r).forEach(([s,i])=>{t[s]=i}),t},{}):A1(e)}function A1(e){return e.split(",").map(t=>t.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function xB(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>SB?(Ho&&Re.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):o},"")}const GR=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function EB(e){if(!e)return;const t=e.match(GR);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 CB(e,t){const n=EB(e),r=WR(t);if(!n||!n.traceId)return{traceId:qc(),spanId:Wh()};const{traceId:s,parentSpanId:i,parentSampled:o}=n,a=Wh();return{traceId:s,parentSpanId:i,spanId:a,sampled:o,dsc:r||{}}}function KR(e=Cn(),t=Cn().substring(16),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}const YR=0,XR=1;let O1=!1;function TB(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:s,parent_span_id:i,status:o,origin:a}=yt(e);return xn({parent_span_id:i,span_id:t,trace_id:n,data:r,op:s,status:o,origin:a})}function RB(e){const{spanId:t,traceId:n}=e.spanContext(),{parent_span_id:r}=yt(e);return xn({parent_span_id:r,span_id:t,trace_id:n})}function PB(e){const{traceId:t,spanId:n}=e.spanContext(),r=Xa(e);return KR(t,n,r)}function Ca(e){return typeof e=="number"?M1(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?M1(e.getTime()):tr()}function M1(e){return e>9999999999?e/1e3:e}function yt(e){if(AB(e))return e.getSpanJSON();try{const{spanId:t,traceId:n}=e.spanContext();if(IB(e)){const{attributes:r,startTime:s,name:i,endTime:o,parentSpanId:a,status:l}=e;return xn({span_id:t,trace_id:n,data:r,description:i,parent_span_id:a,start_timestamp:Ca(s),timestamp:Ca(o)||void 0,status:QR(l),op:r[Fa],origin:r[an],_metrics_summary:qv(e)})}return{span_id:t,trace_id:n}}catch{return{}}}function IB(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function AB(e){return typeof e.getSpanJSON=="function"}function Xa(e){const{traceFlags:t}=e.spanContext();return t===XR}function QR(e){if(!(!e||e.code===yB))return e.code===jR?"ok":e.message||"unknown_error"}const Ta="_sentryChildSpans",Gv="_sentryRootSpan";function JR(e,t){const n=e[Gv]||e;ls(t,Gv,n),e[Ta]?e[Ta].add(t):ls(e,Ta,new Set([t]))}function OB(e,t){e[Ta]&&e[Ta].delete(t)}function rh(e){const t=new Set;function n(r){if(!t.has(r)&&Xa(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 Mn(e){return e[Gv]||e}function bn(){const e=Ya(),t=Ru(e);return t.getActiveSpan?t.getActiveSpan():Gh(Nt())}function ZR(){O1||(Ms(()=>{console.warn("[Sentry] Deprecation warning: Returning null from `beforeSendSpan` will be disallowed from SDK version 9.0.0 onwards. The callback will only support mutating spans. To drop certain spans, configure the respective integrations directly.")}),O1=!0)}let D1=!1;function MB(){D1||(D1=!0,OR(Kv),MR(Kv))}function Kv(){const e=bn(),t=e&&Mn(e);if(t){const n="internal_error";et&&Re.log(`[Tracing] Root span: ${n} -> Global error occurred`),t.setStatus({code:In,message:n})}}Kv.tag="sentry_tracingErrorCallback";const eP="_sentryScope",tP="_sentryIsolationScope";function DB(e,t,n){e&&(ls(e,tP,n),ls(e,eP,t))}function $1(e){return{scope:e[eP],isolationScope:e[tP]}}function Vi(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=dt(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}class Pu{constructor(t={}){this._traceId=t.traceId||Cn(),this._spanId=t.spanId||Cn().substring(16)}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:YR}}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){}}const rw="production",nP="_frozenDsc";function L1(e,t){ls(e,nP,t)}function rP(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},s=xn({environment:n.environment||rw,release:n.release,public_key:r,trace_id:e});return t.emit("createDsc",s),s}function sP(e,t){const n=t.getPropagationContext();return n.dsc||rP(n.traceId,e)}function Qa(e){const t=dt();if(!t)return{};const n=Mn(e),r=n[nP];if(r)return r;const s=n.spanContext().traceState,i=s&&s.get("sentry.dsc"),o=i&&WR(i);if(o)return o;const a=rP(e.spanContext().traceId,t),l=yt(n),u=l.data||{},c=u[zR];c!=null&&(a.sample_rate=`${c}`);const d=u[jr],f=l.description;return d!=="url"&&f&&(a.transaction=f),Vi()&&(a.sampled=String(Xa(n))),t.emit("createDsc",a,n),a}function $B(e){if(!et)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=yt(e),{spanId:s}=e.spanContext(),i=Xa(e),o=Mn(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}=yt(o);u.push(`root ID: ${o.spanContext().spanId}`),c&&u.push(`root op: ${c}`),d&&u.push(`root description: ${d}`)}Re.log(`${l}
|
|
35
|
-
${u.join(`
|
|
36
|
-
`)}`)}function LB(e){if(!et)return;const{description:t="< unknown name >",op:n="< unknown op >"}=yt(e),{spanId:r}=e.spanContext(),i=Mn(e)===e,o=`[Tracing] Finishing "${n}" ${i?"root ":""}span "${t}" with ID ${r}`;Re.log(o)}function Kh(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){et&&Re.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`);return}return t}function FB(e,t){if(!Vi(e))return[!1];let n;typeof e.tracesSampler=="function"?n=e.tracesSampler(t):t.parentSampled!==void 0?n=t.parentSampled:typeof e.tracesSampleRate<"u"?n=e.tracesSampleRate:n=1;const r=Kh(n);return r===void 0?(et&&Re.warn("[Tracing] Discarding transaction because of invalid sample rate."),[!1]):r?Math.random()<r?[!0,r]:(et&&Re.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(n)})`),[!1,r]):(et&&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,r])}const NB=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function VB(e){return e==="http"||e==="https"}function Nd(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 BB(e){const t=NB.exec(e);if(!t){Ms(()=>{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 iP({host:i,pass:s,path:l,projectId:u,port:o,protocol:n,publicKey:r})}function iP(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function UB(e){if(!Ho)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+$/)?VB(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 HB(e){const t=typeof e=="string"?BB(e):iP(e);if(!(!t||!UB(t)))return t}function zB(){const e=typeof WeakSet=="function",t=e?new WeakSet:[];function n(s){if(e)return t.has(s)?!0:(t.add(s),!1);for(let i=0;i<t.length;i++)if(t[i]===s)return!0;return t.push(s),!1}function r(s){if(e)t.delete(s);else for(let i=0;i<t.length;i++)if(t[i]===s){t.splice(i,1);break}}return[n,r]}function Js(e,t=100,n=1/0){try{return Yv("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function oP(e,t=3,n=100*1024){const r=Js(e,t);return GB(r)>n?oP(e,t-1,n):r}function Yv(e,t,n=1/0,r=1/0,s=zB()){const[i,o]=s;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const a=jB(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 Yv("",p,l-1,r,s)}catch{}const c=Array.isArray(t)?[]:{};let d=0;const f=BR(t);for(const p in f){if(!Object.prototype.hasOwnProperty.call(f,p))continue;if(d>=r){c[p]="[MaxProperties ~]";break}const g=f[p];c[p]=Yv(p,g,l-1,r,s),d++}return o(t),c}function jB(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(LR(t))return"[VueViewModel]";if(YV(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${$i(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=qB(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function qB(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function WB(e){return~-encodeURI(e).split(/%..|./).length}function GB(e){return WB(JSON.stringify(e))}function Ja(e,t=[]){return[e,t]}function KB(e,t){const[n,r]=e;return[n,[...r,t]]}function F1(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 Xv(e){return pt.__SENTRY__&&pt.__SENTRY__.encodePolyfill?pt.__SENTRY__.encodePolyfill(e):new TextEncoder().encode(e)}function YB(e){const[t,n]=e;let r=JSON.stringify(t);function s(i){typeof r=="string"?r=typeof i=="string"?r+i:[Xv(r),i]:r.push(typeof i=="string"?Xv(i):i)}for(const i of n){const[o,a]=i;if(s(`
|
|
37
|
-
${JSON.stringify(o)}
|
|
38
|
-
`),typeof a=="string"||a instanceof Uint8Array)s(a);else{let l;try{l=JSON.stringify(a)}catch{l=JSON.stringify(Js(a))}s(l)}}return typeof r=="string"?r:XB(r)}function XB(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 QB(e){return[{type:"span"},e]}function JB(e){const t=typeof e.data=="string"?Xv(e.data):e.data;return[xn({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const ZB={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",statsd:"metric_bucket"};function N1(e){return ZB[e]}function sw(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function aP(e,t,n,r){const s=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Nd(r)},...s&&{trace:xn({...s})}}}function eU(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function tU(e,t,n,r){const s=sw(n),i={sent_at:new Date().toISOString(),...s&&{sdk:s},...!!r&&t&&{dsn:Nd(t)}},o="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return Ja(i,[o])}function nU(e,t,n,r){const s=sw(n),i=e.type&&e.type!=="replay_event"?e.type:"event";eU(e,n&&n.sdk);const o=aP(e,s,r,t);return delete e.sdkProcessingMetadata,Ja(o,[[{type:i},e]])}function rU(e,t){function n(c){return!!c.trace_id&&!!c.public_key}const r=Qa(e[0]),s=t&&t.getDsn(),i=t&&t.getOptions().tunnel,o={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!i&&s&&{dsn:Nd(s)}},a=t&&t.getOptions().beforeSendSpan,l=a?c=>{const d=a(yt(c));return d||ZR(),d}:c=>yt(c),u=[];for(const c of e){const d=l(c);d&&u.push(QB(d))}return Ja(o,u)}function sU(e,t,n,r=bn()){const s=r&&Mn(r);s&&(et&&Re.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),s.addEvent(e,{[om]:t,[im]:n}))}function V1(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},s=r[im],i=r[om];typeof s=="string"&&typeof i=="number"&&(t[n.name]={value:i,unit:s})}),t}const B1=1e3;class iw{constructor(t={}){this._traceId=t.traceId||Cn(),this._spanId=t.spanId||Cn().substring(16),this._startTime=t.startTimestamp||tr(),this._attributes={},this.setAttributes({[an]:"manual",[Fa]: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}addLinks(t){return this}recordException(t,n){}spanContext(){const{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?XR:YR}}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=Ca(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute(jr,"custom"),this}end(t){this._endTime||(this._endTime=Ca(t),LB(this),this._onSpanEnded())}getSpanJSON(){return xn({data:this._attributes,description:this._name,op:this._attributes[Fa],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:QR(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[an],_metrics_summary:qv(this),profile_id:this._attributes[vB],exclusive_time:this._attributes[tw],measurements:V1(this._events),is_segment:this._isStandaloneSpan&&Mn(this)===this||void 0,segment_id:this._isStandaloneSpan?Mn(this).spanContext().spanId:void 0})}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){et&&Re.log("[Tracing] Adding an event to span:",t);const s=U1(n)?n:r||tr(),i=U1(n)?{}:n||{},o={name:t,time:Ca(s),attributes:i};return this._events.push(o),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=dt();if(t&&t.emit("spanEnd",this),!(this._isStandaloneSpan||this===Mn(this)))return;if(this._isStandaloneSpan){this._sampled?oU(rU([this],t)):(et&&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&&($1(this).scope||Nt()).captureEvent(r)}_convertSpanToTransaction(){if(!H1(yt(this)))return;this._name||(et&&Re.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:t,isolationScope:n}=$1(this),s=(t||Nt()).getClient()||dt();if(this._sampled!==!0){et&&Re.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),s&&s.recordDroppedEvent("sample_rate","transaction");return}const o=rh(this).filter(d=>d!==this&&!iU(d)).map(d=>yt(d)).filter(H1),a=this._attributes[jr],l={contexts:{trace:TB(this)},spans:o.length>B1?o.sort((d,f)=>d.start_timestamp-f.start_timestamp).slice(0,B1):o,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,...xn({dynamicSamplingContext:Qa(this)})},_metrics_summary:qv(this),...a&&{transaction_info:{source:a}}},u=V1(this._events);return u&&Object.keys(u).length&&(et&&Re.log("[Measurements] Adding measurements to transaction event",JSON.stringify(u,void 0,2)),l.measurements=u),l}}function U1(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function H1(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function iU(e){return e instanceof iw&&e.isStandaloneSpan()}function oU(e){const t=dt();if(!t)return;const n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}const lP="__SENTRY_SUPPRESS_TRACING__";function Na(e){const t=cP();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=lU(e),{forceTransaction:r,parentSpan:s}=e;return(e.scope?o=>ew(e.scope,o):s!==void 0?o=>uP(s,o):o=>o())(()=>{const o=Nt(),a=cU(o);return e.onlyIfParent&&!a?new Pu:aU({parentSpan:a,spanArguments:n,forceTransaction:r,scope:o})})}function uP(e,t){const n=cP();return n.withActiveSpan?n.withActiveSpan(e,t):ew(r=>(Wc(r,e||void 0),t(r)))}function aU({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!Vi())return new Pu;const s=fi();let i;if(e&&!n)i=uU(e,r,t),JR(e,i);else if(e){const o=Qa(e),{traceId:a,spanId:l}=e.spanContext(),u=Xa(e);i=z1({traceId:a,parentSpanId:l,...t},r,u),L1(i,o)}else{const{traceId:o,dsc:a,parentSpanId:l,sampled:u}={...s.getPropagationContext(),...r.getPropagationContext()};i=z1({traceId:o,parentSpanId:l,...t},r,u),a&&L1(i,a)}return $B(i),DB(i,r,s),i}function lU(e){const n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const r={...n};return r.startTimestamp=Ca(e.startTime),delete r.startTime,r}return n}function cP(){const e=Ya();return Ru(e)}function z1(e,t,n){const r=dt(),s=r&&r.getOptions()||{},{name:i="",attributes:o}=e,[a,l]=t.getScopeData().sdkProcessingMetadata[lP]?[!1]:FB(s,{name:i,parentSampled:n,attributes:o,transactionContext:{name:i,parentSampled:n}}),u=new iw({...e,attributes:{[jr]:"custom",...e.attributes},sampled:a});return l!==void 0&&u.setAttribute(zR,l),r&&r.emit("spanStart",u),u}function uU(e,t,n){const{spanId:r,traceId:s}=e.spanContext(),i=t.getScopeData().sdkProcessingMetadata[lP]?!1:Xa(e),o=i?new iw({...n,parentSpanId:r,traceId:s,sampled:i}):new Pu({traceId:s});JR(e,o);const a=dt();return a&&(a.emit("spanStart",o),n.endTimestamp&&a.emit("spanEnd",o)),o}function cU(e){const t=Gh(e);if(!t)return;const n=dt();return(n?n.getOptions():{}).parentSpanIsAlwaysRootSpan?Mn(t):t}const sh={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},dU="heartbeatFailed",fU="idleTimeout",hU="finalTimeout",pU="externalFinish";function dP(e,t={}){const n=new Map;let r=!1,s,i=pU,o=!t.disableAutoFinish;const a=[],{idleTimeout:l=sh.idleTimeout,finalTimeout:u=sh.finalTimeout,childSpanTimeout:c=sh.childSpanTimeout,beforeSpanEnd:d}=t,f=dt();if(!f||!Vi())return new Pu;const p=Nt(),g=bn(),m=mU(e);m.end=new Proxy(m.end,{apply(R,T,x){d&&d(m);const[E,...P]=x,M=E||tr(),O=Ca(M),A=rh(m).filter(q=>q!==m);if(!A.length)return _(O),Reflect.apply(R,T,[O,...P]);const D=A.map(q=>yt(q).timestamp).filter(q=>!!q),H=D.length?Math.max(...D):void 0,z=yt(m).start_timestamp,Y=Math.min(z?z+u/1e3:1/0,Math.max(z||-1/0,Math.min(O,H||1/0)));return _(Y),Reflect.apply(R,T,[Y,...P])}});function y(){s&&(clearTimeout(s),s=void 0)}function b(R){y(),s=setTimeout(()=>{!r&&n.size===0&&o&&(i=fU,m.end(R))},l)}function w(R){s=setTimeout(()=>{!r&&o&&(i=dU,m.end(R))},c)}function S(R){y(),n.set(R,!0);const T=tr();w(T+c/1e3)}function C(R){if(n.has(R)&&n.delete(R),n.size===0){const T=tr();b(T+l/1e3)}}function _(R){r=!0,n.clear(),a.forEach(O=>O()),Wc(p,g);const T=yt(m),{start_timestamp:x}=T;if(!x)return;(T.data||{})[Wv]||m.setAttribute(Wv,i),Re.log(`[Tracing] Idle span "${T.op}" finished`);const P=rh(m).filter(O=>O!==m);let M=0;P.forEach(O=>{O.isRecording()&&(O.setStatus({code:In,message:"cancelled"}),O.end(R),et&&Re.log("[Tracing] Cancelling span since span ended early",JSON.stringify(O,void 0,2)));const A=yt(O),{timestamp:D=0,start_timestamp:H=0}=A,z=H<=R,Y=(u+l)/1e3,q=D-H<=Y;if(et){const V=JSON.stringify(O,void 0,2);z?q||Re.log("[Tracing] Discarding span since it finished after idle span final timeout",V):Re.log("[Tracing] Discarding span since it happened after idle span was finished",V)}(!q||!z)&&(OB(m,O),M++)}),M>0&&m.setAttribute("sentry.idle_span_discarded_spans",M)}return a.push(f.on("spanStart",R=>{if(r||R===m||yt(R).timestamp)return;rh(m).includes(R)&&S(R.spanContext().spanId)})),a.push(f.on("spanEnd",R=>{r||C(R.spanContext().spanId)})),a.push(f.on("idleSpanEnableAutoFinish",R=>{R===m&&(o=!0,b(),n.size&&w())})),t.disableAutoFinish||b(),setTimeout(()=>{r||(m.setStatus({code:In,message:"deadline_exceeded"}),i=hU,m.end())},u),m}function mU(e){const t=Na(e);return Wc(Nt(),t),et&&Re.log("[Tracing] Started span is an idle span"),t}function Qv(e,t,n,r=0){return new ts((s,i)=>{const o=e[r];if(t===null||typeof o!="function")s(t);else{const a=o({...t},n);et&&o.id&&a===null&&Re.log(`Event processor "${o.id}" dropped event`),rm(a)?a.then(l=>Qv(e,l,n,r+1).then(s)).then(null,i):Qv(e,a,n,r+1).then(s).then(null,i)}})}let df,j1,ff;function gU(e){const t=pt._sentryDebugIds;if(!t)return{};const n=Object.keys(t);return ff&&n.length===j1||(j1=n.length,ff=n.reduce((r,s)=>{df||(df={});const i=df[s];if(i)r[i[0]]=i[1];else{const o=e(s);for(let a=o.length-1;a>=0;a--){const l=o[a],u=l&&l.filename,c=t[s];if(u&&c){r[u]=c,df[s]=[u,c];break}}}return r},{})),ff}function vU(e,t){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:i}=t;yU(e,t),r&&SU(e,r),_U(e,n),bU(e,s),wU(e,i)}function q1(e,t){const{extra:n,tags:r,user:s,contexts:i,level:o,sdkProcessingMetadata:a,breadcrumbs:l,fingerprint:u,eventProcessors:c,attachments:d,propagationContext:f,transactionName:p,span:g}=t;hf(e,"extra",n),hf(e,"tags",r),hf(e,"user",s),hf(e,"contexts",i),e.sdkProcessingMetadata=sm(e.sdkProcessingMetadata,a,2),o&&(e.level=o),p&&(e.transactionName=p),g&&(e.span=g),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),c.length&&(e.eventProcessors=[...e.eventProcessors,...c]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...f}}function hf(e,t,n){e[t]=sm(e[t],n,1)}function yU(e,t){const{extra:n,tags:r,user:s,contexts:i,level:o,transactionName:a}=t,l=xn(n);l&&Object.keys(l).length&&(e.extra={...l,...e.extra});const u=xn(r);u&&Object.keys(u).length&&(e.tags={...u,...e.tags});const c=xn(s);c&&Object.keys(c).length&&(e.user={...c,...e.user});const d=xn(i);d&&Object.keys(d).length&&(e.contexts={...d,...e.contexts}),o&&(e.level=o),a&&e.type!=="transaction"&&(e.transaction=a)}function bU(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function wU(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function SU(e,t){e.contexts={trace:RB(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Qa(t),...e.sdkProcessingMetadata};const n=Mn(t),r=yt(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function _U(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}function fP(e,t,n,r,s,i){const{normalizeDepth:o=3,normalizeMaxBreadth:a=1e3}=e,l={...t,event_id:t.event_id||n.event_id||Cn(),timestamp:t.timestamp||Fd()},u=n.integrations||e.integrations.map(y=>y.name);kU(l,e),CU(l,u),s&&s.emit("applyFrameMetadata",t),t.type===void 0&&xU(l,e.stackParser);const c=RU(r,n.captureContext);n.mechanism&&jc(l,n.mechanism);const d=s?s.getEventProcessors():[],f=pB().getScopeData();if(i){const y=i.getScopeData();q1(f,y)}if(c){const y=c.getScopeData();q1(f,y)}const p=[...n.attachments||[],...f.attachments];p.length&&(n.attachments=p),vU(l,f);const g=[...d,...f.eventProcessors];return Qv(g,l,n).then(y=>(y&&EU(y),typeof o=="number"&&o>0?TU(y,o,a):y))}function kU(e,t){const{environment:n,release:r,dist:s,maxValueLength:i=250}=t;e.environment=e.environment||n||rw,!e.release&&r&&(e.release=r),!e.dist&&s&&(e.dist=s),e.message&&(e.message=Al(e.message,i));const o=e.exception&&e.exception.values&&e.exception.values[0];o&&o.value&&(o.value=Al(o.value,i));const a=e.request;a&&a.url&&(a.url=Al(a.url,i))}function xU(e,t){const n=gU(t);try{e.exception.values.forEach(r=>{r.stacktrace.frames.forEach(s=>{n&&s.filename&&(s.debug_id=n[s.filename])})})}catch{}}function EU(e){const t={};try{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)})})}catch{}if(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 CU(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function TU(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(s=>({...s,...s.data&&{data:Js(s.data,t,n)}}))},...e.user&&{user:Js(e.user,t,n)},...e.contexts&&{contexts:Js(e.contexts,t,n)},...e.extra&&{extra:Js(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Js(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(s=>({...s,...s.data&&{data:Js(s.data,t,n)}}))),r}function RU(e,t){if(!t)return e;const n=e?e.clone():new Io;return n.update(t),n}function PU(e){if(e)return IU(e)?{captureContext:e}:OU(e)?{captureContext:e}:e}function IU(e){return e instanceof Io||typeof e=="function"}const AU=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function OU(e){return Object.keys(e).some(t=>AU.includes(t))}function si(e,t){return Nt().captureException(e,PU(t))}function hP(e,t){return Nt().captureEvent(e,t)}function MU(e,t){fi().setContext(e,t)}function DU(){const e=dt();return!!e&&e.getOptions().enabled!==!1&&!!e.getTransport()}function $U(e){fi().addEventProcessor(e)}function W1(e){const t=dt(),n=fi(),r=Nt(),{release:s,environment:i=rw}=t&&t.getOptions()||{},{userAgent:o}=pt.navigator||{},a=sB({release:s,environment:i,user:r.getUser()||n.getUser(),...o&&{userAgent:o},...e}),l=n.getSession();return l&&l.status==="ok"&&nu(l,{status:"exited"}),pP(),n.setSession(a),r.setSession(a),a}function pP(){const e=fi(),t=Nt(),n=t.getSession()||e.getSession();n&&iB(n),mP(),e.setSession(),t.setSession()}function mP(){const e=fi(),t=Nt(),n=dt(),r=t.getSession()||e.getSession();r&&n&&n.captureSession(r)}function G1(e=!1){if(e){pP();return}mP()}const LU="7";function FU(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function NU(e){return`${FU(e)}${e.projectId}/envelope/`}function VU(e,t){const n={sentry_version:LU};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function BU(e,t,n){return t||`${NU(e)}?${VU(e,n)}`}const K1=[];function UU(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 HU(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(o=>{o.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){const o=n(t);r=Array.isArray(o)?o:[o]}else r=t;const s=UU(r),i=s.findIndex(o=>o.name==="Debug");if(i>-1){const[o]=s.splice(i,1);s.push(o)}return s}function zU(e,t){const n={};return t.forEach(r=>{r&&gP(e,r,n)}),n}function Y1(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function gP(e,t,n){if(n[t.name]){et&&Re.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,K1.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),K1.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)}et&&Re.log(`Integration installed: ${t.name}`)}function jU(e,t,n){const r=[{type:"client_report"},{timestamp:Fd(),discarded_events:e}];return Ja(t?{dsn:t}:{},[r])}class Zs extends Error{constructor(t,n="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}}const X1="Not capturing exception because it's already been captured.";class qU{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=HB(t.dsn):et&&Re.warn("No DSN provided, client will not send events."),this._dsn){const s=BU(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:s})}const r=["enableTracing","tracesSampleRate","tracesSampler"].find(s=>s in t&&t[s]==null);r&&Ms(()=>{console.warn(`[Sentry] Deprecation warning: \`${r}\` is set to undefined, which leads to tracing being enabled. In v9, a value of \`undefined\` will result in tracing being disabled.`)})}captureException(t,n,r){const s=Cn();if(P1(t))return et&&Re.log(X1),s;const i={event_id:s,...n};return this._process(this.eventFromException(t,i).then(o=>this._captureEvent(o,i,r))),i.event_id}captureMessage(t,n,r,s){const i={event_id:Cn(),...r},o=Xb(t)?t:String(t),a=Qb(t)?this.eventFromMessage(o,n,i):this.eventFromException(t,i);return this._process(a.then(l=>this._captureEvent(l,i,s))),i.event_id}captureEvent(t,n,r){const s=Cn();if(n&&n.originalException&&P1(n.originalException))return et&&Re.log(X1),s;const i={event_id:s,...n},a=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,i,a||r)),i.event_id}captureSession(t){typeof t.release!="string"?et&&Re.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),nu(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const n=this._transport;return n?(this.emit("flush"),this._isClientDoneProcessing(t).then(r=>n.flush(t).then(s=>r&&s))):Ni(!0)}close(t){return this.flush(t).then(n=>(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];gP(this,t,this._integrations),n||Y1(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=nU(t,this._dsn,this._options._metadata,this._options.tunnel);for(const i of n.attachments||[])r=KB(r,JB(i));const s=this.sendEnvelope(r);s&&s.then(i=>this.emit("afterSendEvent",t,i),null)}sendSession(t){const n=tU(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(n)}recordDroppedEvent(t,n,r){if(this._options.sendClientReports){const s=typeof r=="number"?r:1,i=`${t}:${n}`;et&&Re.log(`Recording outcome: "${i}"${s>1?` (${s} times)`:""}`),this._outcomes[i]=(this._outcomes[i]||0)+s}}on(t,n){const r=this._hooks[t]=this._hooks[t]||[];return r.push(n),()=>{const s=r.indexOf(n);s>-1&&r.splice(s,1)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(s=>s(...n))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,n=>(et&&Re.error("Error while sending envelope:",n),n)):(et&&Re.error("Transport disabled"),Ni({}))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=zU(this,t),Y1(this,t)}_updateSessionFromEvent(t,n){let r=!1,s=!1;const i=n.exception&&n.exception.values;if(i){s=!0;for(const l of i){const u=l.mechanism;if(u&&u.handled===!1){r=!0;break}}}const o=t.status==="ok";(o&&t.errors===0||o&&r)&&(nu(t,{...r&&{status:"crashed"},errors:t.errors||Number(s||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new ts(n=>{let r=0;const s=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),n(!0)):(r+=s,t&&r>=t&&(clearInterval(i),n(!1)))},s)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r=Nt(),s=fi()){const i=this.getOptions(),o=Object.keys(this._integrations);return!n.integrations&&o.length>0&&(n.integrations=o),this.emit("preprocessEvent",t,n),t.type||s.setLastEventId(t.event_id||n.event_id),fP(i,t,n,r,this,s).then(a=>{if(a===null)return a;a.contexts={trace:mB(r),...a.contexts};const l=sP(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:l,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},r){return this._processEvent(t,n,r).then(s=>s.event_id,s=>{if(et){const i=s;i.logLevel==="log"?Re.log(i.message):Re.warn(i)}})}_processEvent(t,n,r){const s=this.getOptions(),{sampleRate:i}=s,o=yP(t),a=vP(t),l=t.type||"error",u=`before send for type \`${l}\``,c=typeof i>"u"?void 0:Kh(i);if(a&&typeof c=="number"&&Math.random()>c)return this.recordDroppedEvent("sample_rate","error",t),qh(new Zs(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const d=l==="replay_event"?"replay":l,p=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,n,r,p).then(g=>{if(g===null)throw this.recordDroppedEvent("event_processor",d,t),new Zs("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return g;const y=GU(this,s,g,n);return WU(y,u)}).then(g=>{if(g===null){if(this.recordDroppedEvent("before_send",d,t),o){const w=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",w)}throw new Zs(`${u} returned \`null\`, will not send event.`,"log")}const m=r&&r.getSession();if(!o&&m&&this._updateSessionFromEvent(m,g),o){const b=g.sdkProcessingMetadata&&g.sdkProcessingMetadata.spanCountBeforeProcessing||0,w=g.spans?g.spans.length:0,S=b-w;S>0&&this.recordDroppedEvent("before_send","span",S)}const y=g.transaction_info;if(o&&y&&g.transaction!==t.transaction){const b="custom";g.transaction_info={...y,source:b}}return this.sendEvent(g,n),g}).then(null,g=>{throw g instanceof Zs?g:(this.captureException(g,{data:{__sentry__:!0},originalException:g}),new Zs(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
39
|
-
Reason: ${g}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[s,i]=n.split(":");return{reason:s,category:i,quantity:r}})}_flushOutcomes(){et&&Re.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){et&&Re.log("No outcomes to send");return}if(!this._dsn){et&&Re.log("No dsn provided, will not send outcomes");return}et&&Re.log("Sending outcomes:",t);const n=jU(t,this._options.tunnel&&Nd(this._dsn));this.sendEnvelope(n)}}function WU(e,t){const n=`${t} must return \`null\` or a valid event.`;if(rm(e))return e.then(r=>{if(!tu(r)&&r!==null)throw new Zs(n);return r},r=>{throw new Zs(`${t} rejected with ${r}`)});if(!tu(e)&&e!==null)throw new Zs(n);return e}function GU(e,t,n,r){const{beforeSend:s,beforeSendTransaction:i,beforeSendSpan:o}=t;if(vP(n)&&s)return s(n,r);if(yP(n)){if(n.spans&&o){const a=[];for(const l of n.spans){const u=o(l);u?a.push(u):(ZR(),e.recordDroppedEvent("before_send","span"))}n.spans=a}if(i){if(n.spans){const a=n.spans.length;n.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:a}}return i(n,r)}}return n}function vP(e){return e.type===void 0}function yP(e){return e.type==="transaction"}function KU(e,t){t.debug===!0&&(et?Re.enable():Ms(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Nt().update(t.initialScope);const r=new e(t);return YU(r),r.init(),r}function YU(e){Nt().setClient(e)}function XU(e){const t=[];function n(){return e===void 0||t.length<e}function r(o){return t.splice(t.indexOf(o),1)[0]||Promise.resolve(void 0)}function s(o){if(!n())return qh(new Zs("Not adding Promise because buffer limit was reached."));const a=o();return t.indexOf(a)===-1&&t.push(a),a.then(()=>r(a)).then(null,()=>r(a).then(null,()=>{})),a}function i(o){return new ts((a,l)=>{let u=t.length;if(!u)return a(!0);const c=setTimeout(()=>{o&&o>0&&a(!1)},o);t.forEach(d=>{Ni(d).then(()=>{--u||(clearTimeout(c),a(!0))},l)})})}return{$:t,add:s,drain:i}}const QU=60*1e3;function JU(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?QU:r-t}function ZU(e,t){return e[t]||e.all||0}function bP(e,t,n=Date.now()){return ZU(e,t)>n}function wP(e,{statusCode:t,headers:n},r=Date.now()){const s={...e},i=n&&n["x-sentry-rate-limits"],o=n&&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+JU(o,r):t===429&&(s.all=r+60*1e3);return s}const e3=64;function t3(e,t,n=XU(e.bufferSize||e3)){let r={};const s=o=>n.drain(o);function i(o){const a=[];if(F1(o,(d,f)=>{const p=N1(f);if(bP(r,p)){const g=Q1(d,f);e.recordDroppedEvent("ratelimit_backoff",p,g)}else a.push(d)}),a.length===0)return Ni({});const l=Ja(o[0],a),u=d=>{F1(l,(f,p)=>{const g=Q1(f,p);e.recordDroppedEvent(d,N1(p),g)})},c=()=>t({body:YB(l)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&et&&Re.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=wP(r,d),d),d=>{throw u("network_error"),d});return n.add(c).then(d=>d,d=>{if(d instanceof Zs)return et&&Re.error("Skipped sending event because buffer is full."),u("queue_overflow"),Ni({});throw d})}return{send:i,flush:s}}function Q1(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}function n3(e,t){const n=t&&t.getDsn(),r=t&&t.getOptions().tunnel;return s3(e,n)||r3(e,r)}function r3(e,t){return t?J1(e)===J1(t):!1}function s3(e,t){return t?e.includes(t.host):!1}function J1(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function i3(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:Ii})),version:Ii}),e._metadata=s}function SP(e={}){const t=dt();if(!DU()||!t)return{};const n=Ya(),r=Ru(n);if(r.getTraceData)return r.getTraceData(e);const s=Nt(),i=e.span||bn(),o=i?PB(i):o3(s),a=i?Qa(i):sP(t,s),l=_B(a);return GR.test(o)?{"sentry-trace":o,baggage:l}:(Re.warn("Invalid sentry-trace data. Cannot generate trace data"),{})}function o3(e){const{traceId:t,sampled:n,spanId:r}=e.getPropagationContext();return KR(t,r,n)}const a3=100;function Ao(e,t){const n=dt(),r=fi();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:i=a3}=n.getOptions();if(i<=0)return;const a={timestamp:Fd(),...e},l=s?Ms(()=>s(a,t)):a;l!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",l,t),r.addBreadcrumb(l,i))}let Z1;const l3="FunctionToString",e0=new WeakMap,u3=()=>({name:l3,setupOnce(){Z1=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Jb(this),n=e0.has(dt())&&t!==void 0?t:this;return Z1.apply(n,e)}}catch{}},setup(e){e0.set(e,!0)}}),c3=u3,d3=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",`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"],f3="InboundFilters",h3=(e={})=>({name:f3,processEvent(t,n,r){const s=r.getOptions(),i=m3(e,s);return g3(t,i)?null:t}}),p3=h3;function m3(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:d3],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function g3(e,t){return t.ignoreInternal&&_3(e)?(et&&Re.warn(`Event dropped due to being internal Sentry Error.
|
|
40
|
-
Event: ${to(e)}`),!0):v3(e,t.ignoreErrors)?(et&&Re.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
41
|
-
Event: ${to(e)}`),!0):x3(e)?(et&&Re.warn(`Event dropped due to not having an error message, error type or stacktrace.
|
|
42
|
-
Event: ${to(e)}`),!0):y3(e,t.ignoreTransactions)?(et&&Re.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
43
|
-
Event: ${to(e)}`),!0):b3(e,t.denyUrls)?(et&&Re.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
44
|
-
Event: ${to(e)}.
|
|
45
|
-
Url: ${Yh(e)}`),!0):w3(e,t.allowUrls)?!1:(et&&Re.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
46
|
-
Event: ${to(e)}.
|
|
47
|
-
Url: ${Yh(e)}`),!0)}function v3(e,t){return e.type||!t||!t.length?!1:S3(e).some(n=>_o(n,t))}function y3(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;const n=e.transaction;return n?_o(n,t):!1}function b3(e,t){if(!t||!t.length)return!1;const n=Yh(e);return n?_o(n,t):!1}function w3(e,t){if(!t||!t.length)return!0;const n=Yh(e);return n?_o(n,t):!0}function S3(e){const t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch{}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),t}function _3(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function k3(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 Yh(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?k3(t):null}catch{return et&&Re.error(`Cannot extract url for event ${to(e)}`),null}}function x3(e){return e.type||!e.exception||!e.exception.values||e.exception.values.length===0?!1:!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value)}function E3(e,t,n=250,r,s,i,o){if(!i.exception||!i.exception.values||!o||!Li(o.originalException,Error))return;const a=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;a&&(i.exception.values=C3(Jv(e,t,s,o.originalException,r,i.exception.values,a,0),n))}function Jv(e,t,n,r,s,i,o,a){if(i.length>=n+1)return i;let l=[...i];if(Li(r[s],Error)){t0(o,a);const u=e(t,r[s]),c=l.length;n0(u,s,c,a),l=Jv(e,t,n,r[s],s,[u,...l],u,c)}return Array.isArray(r.errors)&&r.errors.forEach((u,c)=>{if(Li(u,Error)){t0(o,a);const d=e(t,u),f=l.length;n0(d,`errors[${c}]`,f,a),l=Jv(e,t,n,u,s,[d,...l],d,f)}}),l}function t0(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function n0(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function C3(e,t){return e.map(n=>(n.value&&(n.value=Al(n.value,t)),n))}function Ra(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 T3(e){const t="console";zo(t,e),jo(t,R3)}function R3(){"console"in pt&&Uv.forEach(function(e){e in pt.console&&Cr(pt.console,e,function(t){return jh[e]=t,function(...n){is("console",{args:n,level:e});const s=jh[e];s&&s.apply(pt.console,n)}})})}function _P(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const P3="Dedupe",I3=()=>{let e;return{name:P3,processEvent(t){if(t.type)return t;try{if(O3(t,e))return et&&Re.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},A3=I3;function O3(e,t){return t?!!(M3(e,t)||D3(e,t)):!1}function M3(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!xP(e,t)||!kP(e,t))}function D3(e,t){const n=r0(t),r=r0(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!xP(e,t)||!kP(e,t))}function kP(e,t){let n=k1(e),r=k1(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 xP(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 r0(e){return e.exception&&e.exception.values&&e.exception.values[0]}function $3(e,t,n,r,s="auto.http.browser"){if(!e.fetchData)return;const i=Vi()&&t(e.fetchData.url);if(e.endTimestamp&&i){const f=e.fetchData.__span;if(!f)return;const p=r[f];p&&(N3(p,e),delete r[f]);return}const{method:o,url:a}=e.fetchData,l=F3(a),u=l?Ra(l).host:void 0,c=!!bn(),d=i&&c?Na({name:`${o} ${a}`,attributes:{url:a,type:"fetch","http.method":o,"http.url":l,"server.address":u,[an]:s,[Fa]:"http.client"}}):new Pu;if(e.fetchData.__span=d.spanContext().spanId,r[d.spanContext().spanId]=d,n(e.fetchData.url)){const f=e.args[0],p=e.args[1]||{},g=L3(f,p,Vi()&&c?d:void 0);g&&(e.args[1]=p,p.headers=g)}return d}function L3(e,t,n){const r=SP({span:n}),s=r["sentry-trace"],i=r.baggage;if(!s)return;const o=t.headers||(V3(e)?e.headers:void 0);if(o)if(B3(o)){const a=new Headers(o);if(a.set("sentry-trace",s),i){const l=a.get("baggage");if(l){const u=pf(l);a.set("baggage",u?`${u},${i}`:i)}else a.set("baggage",i)}return a}else if(Array.isArray(o)){const a=[...o.filter(l=>!(Array.isArray(l)&&l[0]==="sentry-trace")).map(l=>{if(Array.isArray(l)&&l[0]==="baggage"&&typeof l[1]=="string"){const[u,c,...d]=l;return[u,pf(c),...d]}else return l}),["sentry-trace",s]];return i&&a.push(["baggage",i]),a}else{const a="baggage"in o?o.baggage:void 0;let l=[];return Array.isArray(a)?l=a.map(u=>typeof u=="string"?pf(u):u).filter(u=>u===""):a&&l.push(pf(a)),i&&l.push(i),{...o,"sentry-trace":s,baggage:l.length>0?l.join(","):void 0}}else return{...r}}function F3(e){try{return new URL(e).href}catch{return}}function N3(e,t){if(t.response){qR(e,t.response.status);const n=t.response&&t.response.headers&&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:In,message:"internal_error"});e.end()}function pf(e){return e.split(",").filter(t=>!t.split("=")[0].startsWith(nw)).join(",")}function V3(e){return typeof Request<"u"&&Li(e,Request)}function B3(e){return typeof Headers<"u"&&Li(e,Headers)}function EP(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const Zv=pt;function CP(){if(!("fetch"in Zv))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function ey(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function U3(){if(typeof EdgeRuntime=="string")return!0;if(!CP())return!1;if(ey(Zv.fetch))return!0;let e=!1;const t=Zv.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=ey(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){Ho&&Re.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function TP(e,t){const n="fetch";zo(n,e),jo(n,()=>RP(void 0,t))}function H3(e){const t="fetch-body-resolved";zo(t,e),jo(t,()=>RP(j3))}function RP(e,t=!1){t&&!U3()||Cr(pt,"fetch",function(n){return function(...r){const{method:s,url:i}=q3(r),o={args:r,fetchData:{method:s,url:i},startTimestamp:tr()*1e3};e||is("fetch",{...o});const a=new Error().stack;return n.apply(pt,r).then(async l=>(e?e(l):is("fetch",{...o,endTimestamp:tr()*1e3,response:l}),l),l=>{throw is("fetch",{...o,endTimestamp:tr()*1e3,error:l}),Yb(l)&&l.stack===void 0&&(l.stack=a,ls(l,"framesToPop",1)),l})}})}async function z3(e,t){if(e&&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 j3(e){let t;try{t=e.clone()}catch{return}z3(t,()=>{is("fetch-body-resolved",{endTimestamp:tr()*1e3,response:e})})}function ty(e,t){return!!e&&typeof e=="object"&&!!e[t]}function s0(e){return typeof e=="string"?e:e?ty(e,"url")?e.url:e.toString?e.toString():"":""}function q3(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:s0(n),method:ty(r,"method")?String(r.method).toUpperCase():"GET"}}const t=e[0];return{url:s0(t),method:ty(t,"method")?String(t.method).toUpperCase():"GET"}}function W3(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function G3(){return"npm"}function K3(){return!W3()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function i0(){return typeof window<"u"&&(!K3()||Y3())}function Y3(){const e=pt.process;return!!e&&e.type==="renderer"}const mf=pt;function X3(){const e=mf.chrome,t=e&&e.app&&e.app.runtime,n="history"in mf&&!!mf.history.pushState&&!!mf.history.replaceState;return!t&&n}function Q3(e,t){return e??t()}function ih(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}const Ze=pt;let ny=0;function PP(){return ny>0}function J3(){ny++,setTimeout(()=>{ny--})}function su(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(Jb(e))return e}catch{return e}const r=function(...s){try{const i=s.map(o=>su(o,t));return e.apply(this,i)}catch(i){throw J3(),ew(o=>{o.addEventProcessor(a=>(t.mechanism&&(zv(a,void 0),jc(a,t.mechanism)),a.extra={...a.extra,arguments:s},a)),si(i)}),i}};try{for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])}catch{}VR(r,e),ls(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}const oi=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function ow(e,t){const n=aw(e,t),r={type:rH(t),value:sH(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function Z3(e,t,n,r){const s=dt(),i=s&&s.getOptions().normalizeDepth,o=uH(t),a={__serialized__:oP(t,i)};if(o)return{exception:{values:[ow(e,o)]},extra:a};const l={exception:{values:[{type:nm(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:aH(t,{isUnhandledRejection:r})}]},extra:a};if(n){const u=aw(e,n);u.length&&(l.exception.values[0].stacktrace={frames:u})}return l}function gg(e,t){return{exception:{values:[ow(e,t)]}}}function aw(e,t){const n=t.stacktrace||t.stack||"",r=tH(t),s=nH(t);try{return e(n,r,s)}catch{}return[]}const eH=/Minified React error #\d+;/i;function tH(e){return e&&eH.test(e.message)?1:0}function nH(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function IP(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function rH(e){const t=e&&e.name;return!t&&IP(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function sH(e){const t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:IP(e)&&Array.isArray(e.message)&&e.message.length==2?e.message[1]:t:"No error message"}function iH(e,t,n,r){const s=n&&n.syntheticException||void 0,i=lw(e,t,s,r);return jc(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),Ni(i)}function oH(e,t,n="info",r,s){const i=r&&r.syntheticException||void 0,o=ry(e,t,i,s);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),Ni(o)}function lw(e,t,n,r,s){let i;if($R(t)&&t.error)return gg(e,t.error);if(E1(t)||WV(t)){const o=t;if("stack"in t)i=gg(e,t);else{const a=o.name||(E1(o)?"DOMError":"DOMException"),l=o.message?`${a}: ${o.message}`:a;i=ry(e,l,n,r),zv(i,l)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}return Yb(t)?gg(e,t):tu(t)||nm(t)?(i=Z3(e,t,n,s),jc(i,{synthetic:!0}),i):(i=ry(e,t,n,r),zv(i,`${t}`),jc(i,{synthetic:!0}),i)}function ry(e,t,n,r){const s={};if(r&&n){const i=aw(e,n);i.length&&(s.exception={values:[{value:t,stacktrace:{frames:i}}]})}if(Xb(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 aH(e,{isUnhandledRejection:t}){const n=eB(e),r=t?"promise rejection":"exception";return $R(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:nm(e)?`Event \`${lH(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function lH(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function uH(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}function cH(e,{metadata:t,tunnel:n,dsn:r}){const s={event_id:e.event_id,sent_at:new Date().toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:Nd(r)}},i=dH(e);return Ja(s,[i])}function dH(e){return[{type:"user_report"},e]}class fH extends qU{constructor(t){const n={parentSpanIsAlwaysRootSpan:!0,...t},r=Ze.SENTRY_SDK_SOURCE||G3();i3(n,"browser",["browser"],r),super(n),n.sendClientReports&&Ze.document&&Ze.document.addEventListener("visibilitychange",()=>{Ze.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,n){return iH(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return oH(this._options.stackParser,t,n,r,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){oi&&Re.warn("SDK not enabled, will not capture user feedback.");return}const n=cH(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(n)}_prepareEvent(t,n,r){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r)}}const uw=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,hH=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",Iu=(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=hH(t.value,n),e(t)))}},ze=pt,pH=()=>`v4-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,Vd=(e=!0)=>{const t=ze.performance&&ze.performance.getEntriesByType&&ze.performance.getEntriesByType("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},Bd=()=>{const e=Vd();return e&&e.activationStart||0},Au=(e,t)=>{const n=Vd();let r="navigate";return n&&(ze.document&&ze.document.prerendering||Bd()>0?r="prerender":ze.document&&ze.document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:typeof t>"u"?-1:t,rating:"good",delta:0,entries:[],id:pH(),navigationType:r}},Za=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(s=>{Promise.resolve().then(()=>{t(s.getEntries())})});return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}},Ou=e=>{const t=n=>{(n.type==="pagehide"||ze.document&&ze.document.visibilityState==="hidden")&&e(n)};ze.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))},am=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let bc=-1;const mH=()=>ze.document.visibilityState==="hidden"&&!ze.document.prerendering?0:1/0,Xh=e=>{ze.document.visibilityState==="hidden"&&bc>-1&&(bc=e.type==="visibilitychange"?e.timeStamp:0,vH())},gH=()=>{addEventListener("visibilitychange",Xh,!0),addEventListener("prerenderingchange",Xh,!0)},vH=()=>{removeEventListener("visibilitychange",Xh,!0),removeEventListener("prerenderingchange",Xh,!0)},lm=()=>(ze.document&&bc<0&&(bc=mH(),gH()),{get firstHiddenTime(){return bc}}),Ud=e=>{ze.document&&ze.document.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},yH=[1800,3e3],bH=(e,t={})=>{Ud(()=>{const n=lm(),r=Au("FCP");let s;const o=Za("paint",a=>{a.forEach(l=>{l.name==="first-contentful-paint"&&(o.disconnect(),l.startTime<n.firstHiddenTime&&(r.value=Math.max(l.startTime-Bd(),0),r.entries.push(l),s(!0)))})});o&&(s=Iu(e,r,yH,t.reportAllChanges))})},wH=[.1,.25],SH=(e,t={})=>{bH(am(()=>{const n=Au("CLS",0);let r,s=0,i=[];const o=l=>{l.forEach(u=>{if(!u.hadRecentInput){const c=i[0],d=i[i.length-1];s&&c&&d&&u.startTime-d.startTime<1e3&&u.startTime-c.startTime<5e3?(s+=u.value,i.push(u)):(s=u.value,i=[u])}}),s>n.value&&(n.value=s,n.entries=i,r())},a=Za("layout-shift",o);a&&(r=Iu(e,n,wH,t.reportAllChanges),Ou(()=>{o(a.takeRecords()),r(!0)}),setTimeout(r,0))}))},_H=[100,300],kH=(e,t={})=>{Ud(()=>{const n=lm(),r=Au("FID");let s;const i=l=>{l.startTime<n.firstHiddenTime&&(r.value=l.processingStart-l.startTime,r.entries.push(l),s(!0))},o=l=>{l.forEach(i)},a=Za("first-input",o);s=Iu(e,r,_H,t.reportAllChanges),a&&Ou(am(()=>{o(a.takeRecords()),a.disconnect()}))})};let AP=0,vg=1/0,gf=0;const xH=e=>{e.forEach(t=>{t.interactionId&&(vg=Math.min(vg,t.interactionId),gf=Math.max(gf,t.interactionId),AP=gf?(gf-vg)/7+1:0)})};let sy;const EH=()=>sy?AP:performance.interactionCount||0,CH=()=>{"interactionCount"in performance||sy||(sy=Za("event",xH,{type:"event",buffered:!0,durationThreshold:0}))},Ei=[],yg=new Map,TH=40;let RH=0;const PH=()=>EH()-RH,IH=()=>{const e=Math.min(Ei.length-1,Math.floor(PH()/50));return Ei[e]},bg=10,AH=[],OH=e=>{if(AH.forEach(r=>r(e)),!(e.interactionId||e.entryType==="first-input"))return;const t=Ei[Ei.length-1],n=yg.get(e.interactionId);if(n||Ei.length<bg||t&&e.duration>t.latency){if(n)e.duration>n.latency?(n.entries=[e],n.latency=e.duration):e.duration===n.latency&&e.startTime===(n.entries[0]&&n.entries[0].startTime)&&n.entries.push(e);else{const r={id:e.interactionId,latency:e.duration,entries:[e]};yg.set(r.id,r),Ei.push(r)}Ei.sort((r,s)=>s.latency-r.latency),Ei.length>bg&&Ei.splice(bg).forEach(r=>yg.delete(r.id))}},OP=e=>{const t=ze.requestIdleCallback||ze.setTimeout;let n=-1;return e=am(e),ze.document&&ze.document.visibilityState==="hidden"?e():(n=t(e),Ou(e)),n},MH=[200,500],DH=(e,t={})=>{"PerformanceEventTiming"in ze&&"interactionId"in PerformanceEventTiming.prototype&&Ud(()=>{CH();const n=Au("INP");let r;const s=o=>{OP(()=>{o.forEach(OH);const a=IH();a&&a.latency!==n.value&&(n.value=a.latency,n.entries=a.entries,r())})},i=Za("event",s,{durationThreshold:t.durationThreshold!=null?t.durationThreshold:TH});r=Iu(e,n,MH,t.reportAllChanges),i&&(i.observe({type:"first-input",buffered:!0}),Ou(()=>{s(i.takeRecords()),r(!0)}))})},$H=[2500,4e3],o0={},LH=(e,t={})=>{Ud(()=>{const n=lm(),r=Au("LCP");let s;const i=a=>{t.reportAllChanges||(a=a.slice(-1)),a.forEach(l=>{l.startTime<n.firstHiddenTime&&(r.value=Math.max(l.startTime-Bd(),0),r.entries=[l],s())})},o=Za("largest-contentful-paint",i);if(o){s=Iu(e,r,$H,t.reportAllChanges);const a=am(()=>{o0[r.id]||(i(o.takeRecords()),o.disconnect(),o0[r.id]=!0,s(!0))});["keydown","click"].forEach(l=>{ze.document&&addEventListener(l,()=>OP(a),{once:!0,capture:!0})}),Ou(a)}})},FH=[800,1800],iy=e=>{ze.document&&ze.document.prerendering?Ud(()=>iy(e)):ze.document&&ze.document.readyState!=="complete"?addEventListener("load",()=>iy(e),!0):setTimeout(e,0)},NH=(e,t={})=>{const n=Au("TTFB"),r=Iu(e,n,FH,t.reportAllChanges);iy(()=>{const s=Vd();s&&(n.value=Math.max(s.responseStart-Bd(),0),n.entries=[s],r(!0))})},wc={},Qh={};let MP,DP,$P,LP,FP;function cw(e,t=!1){return Hd("cls",e,BH,MP,t)}function NP(e,t=!1){return Hd("lcp",e,HH,$P,t)}function VP(e){return Hd("fid",e,UH,DP)}function VH(e){return Hd("ttfb",e,zH,LP)}function BP(e){return Hd("inp",e,jH,FP)}function iu(e,t){return UP(e,t),Qh[e]||(qH(e),Qh[e]=!0),HP(e,t)}function Mu(e,t){const n=wc[e];if(!(!n||!n.length))for(const r of n)try{r(t)}catch(s){uw&&Re.error(`Error while triggering instrumentation handler.
|
|
48
|
-
Type: ${e}
|
|
49
|
-
Name: ${$i(r)}
|
|
50
|
-
Error:`,s)}}function BH(){return SH(e=>{Mu("cls",{metric:e}),MP=e},{reportAllChanges:!0})}function UH(){return kH(e=>{Mu("fid",{metric:e}),DP=e})}function HH(){return LH(e=>{Mu("lcp",{metric:e}),$P=e},{reportAllChanges:!0})}function zH(){return NH(e=>{Mu("ttfb",{metric:e}),LP=e})}function jH(){return DH(e=>{Mu("inp",{metric:e}),FP=e})}function Hd(e,t,n,r,s=!1){UP(e,t);let i;return Qh[e]||(i=n(),Qh[e]=!0),r&&t({metric:r}),HP(e,t,s?i:void 0)}function qH(e){const t={};e==="event"&&(t.durationThreshold=0),Za(e,n=>{Mu(e,{entries:n})},t)}function UP(e,t){wc[e]=wc[e]||[],wc[e].push(t)}function HP(e,t,n){return()=>{n&&n();const r=wc[e];if(!r)return;const s=r.indexOf(t);s!==-1&&r.splice(s,1)}}function WH(e){return"duration"in e}function wg(e){return typeof e=="number"&&isFinite(e)}function Bi(e,t,n,{...r}){const s=yt(e).start_timestamp;return s&&s>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),uP(e,()=>{const i=Na({startTime:t,...r});return i&&i.end(n),i})}function zP(e){const t=dt();if(!t)return;const{name:n,transaction:r,attributes:s,startTime:i}=e,{release:o,environment:a}=t.getOptions(),l=t.getIntegrationByName("Replay"),u=l&&l.getReplayId(),c=Nt(),d=c.getUser(),f=d!==void 0?d.email||d.id||d.ip_address:void 0;let p;try{p=c.getScopeData().contexts.profile.profile_id}catch{}const g={release:o,environment:a,user:f||void 0,profile_id:p||void 0,replay_id:u||void 0,transaction:r,"user_agent.original":ze.navigator&&ze.navigator.userAgent,...s};return Na({name:n,attributes:g,startTime:i,experimental:{standalone:!0}})}function dw(){return ze&&ze.addEventListener&&ze.performance}function dn(e){return e/1e3}function GH(){let e=0,t,n;if(!YH())return;let r=!1;function s(){r||(r=!0,n&&KH(e,t,n),i())}const i=cw(({metric:o})=>{const a=o.entries[o.entries.length-1];a&&(e=o.value,t=a)},!0);Ou(()=>{s()}),setTimeout(()=>{const o=dt();if(!o)return;const a=o.on("startNavigationSpan",()=>{s(),a&&a()}),l=bn(),u=l&&Mn(l),c=u&&yt(u);c&&c.op==="pageload"&&(n=u.spanContext().spanId)},0)}function KH(e,t,n){uw&&Re.log(`Sending CLS span (${e})`);const r=dn((pr||0)+(t&&t.startTime||0)),s=Nt().getScopeData().transactionName,i=t?Fi(t.sources[0]&&t.sources[0].node):"Layout shift",o=xn({[an]:"auto.http.browser.cls",[Fa]:"ui.webvital.cls",[tw]:t&&t.duration||0,"sentry.pageload.span_id":n}),a=zP({name:i,transaction:s,attributes:o,startTime:r});a&&(a.addEvent("cls",{[im]:"",[om]:e}),a.end(r))}function YH(){try{return PerformanceObserver.supportedEntryTypes.includes("layout-shift")}catch{return!1}}const XH=2147483647;let a0=0,Ln={},wr,Sc;function QH({recordClsStandaloneSpans:e}){const t=dw();if(t&&pr){t.mark&&ze.performance.mark("sentry-tracing-init");const n=rz(),r=nz(),s=sz(),i=e?GH():tz();return()=>{n(),r(),s(),i&&i()}}return()=>{}}function JH(){iu("longtask",({entries:e})=>{const t=bn();if(!t)return;const{op:n,start_timestamp:r}=yt(t);for(const s of e){const i=dn(pr+s.startTime),o=dn(s.duration);n==="navigation"&&r&&i<r||Bi(t,i,i+o,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[an]:"auto.ui.browser.metrics"}})}})}function ZH(){new PerformanceObserver(t=>{const n=bn();if(n)for(const r of t.getEntries()){if(!r.scripts[0])continue;const s=dn(pr+r.startTime),{start_timestamp:i,op:o}=yt(n);if(o==="navigation"&&i&&s<i)continue;const a=dn(r.duration),l={[an]:"auto.ui.browser.metrics"},u=r.scripts[0],{invoker:c,invokerType:d,sourceURL:f,sourceFunctionName:p,sourceCharPosition:g}=u;l["browser.script.invoker"]=c,l["browser.script.invoker_type"]=d,f&&(l["code.filepath"]=f),p&&(l["code.function"]=p),g!==-1&&(l["browser.script.source_char_position"]=g),Bi(n,s,s+a,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:l})}}).observe({type:"long-animation-frame",buffered:!0})}function ez(){iu("event",({entries:e})=>{const t=bn();if(t){for(const n of e)if(n.name==="click"){const r=dn(pr+n.startTime),s=dn(n.duration),i={name:Fi(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[an]:"auto.ui.browser.metrics"}},o=NR(n.target);o&&(i.attributes["ui.component_name"]=o),Bi(t,r,r+s,i)}}})}function tz(){return cw(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Ln.cls={value:e.value,unit:""},Sc=t)},!0)}function nz(){return NP(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Ln.lcp={value:e.value,unit:"millisecond"},wr=t)},!0)}function rz(){return VP(({metric:e})=>{const t=e.entries[e.entries.length-1];if(!t)return;const n=dn(pr),r=dn(t.startTime);Ln.fid={value:e.value,unit:"millisecond"},Ln["mark.fid"]={value:n+r,unit:"second"}})}function sz(){return VH(({metric:e})=>{e.entries[e.entries.length-1]&&(Ln.ttfb={value:e.value,unit:"millisecond"})})}function iz(e,t){const n=dw();if(!n||!ze.performance.getEntries||!pr)return;const r=dn(pr),s=n.getEntries(),{op:i,start_timestamp:o}=yt(e);if(s.slice(a0).forEach(a=>{const l=dn(a.startTime),u=dn(Math.max(0,a.duration));if(!(i==="navigation"&&o&&r+l<o))switch(a.entryType){case"navigation":{az(e,a,r);break}case"mark":case"paint":case"measure":{oz(e,a,l,u,r);const c=lm(),d=a.startTime<c.firstHiddenTime;a.name==="first-paint"&&d&&(Ln.fp={value:a.startTime,unit:"millisecond"}),a.name==="first-contentful-paint"&&d&&(Ln.fcp={value:a.startTime,unit:"millisecond"});break}case"resource":{uz(e,a,a.name,l,u,r);break}}}),a0=Math.max(s.length-1,0),cz(e),i==="pageload"){fz(Ln);const a=Ln["mark.fid"];a&&Ln.fid&&(Bi(e,a.value,a.value+dn(Ln.fid.value),{name:"first input delay",op:"ui.action",attributes:{[an]:"auto.ui.browser.metrics"}}),delete Ln["mark.fid"]),(!("fcp"in Ln)||!t.recordClsOnPageloadSpan)&&delete Ln.cls,Object.entries(Ln).forEach(([l,u])=>{sU(l,u.value,u.unit)}),e.setAttribute("performance.timeOrigin",r),e.setAttribute("performance.activationStart",Bd()),dz(e)}wr=void 0,Sc=void 0,Ln={}}function oz(e,t,n,r,s){const i=Vd(!1),o=dn(i?i.requestStart:0),a=s+Math.max(n,o),l=s+n,u=l+r,c={[an]:"auto.resource.browser.metrics"};return a!==l&&(c["sentry.browser.measure_happened_before_request"]=!0,c["sentry.browser.measure_start_time"]=a),Bi(e,a,u,{name:t.name,op:t.entryType,attributes:c}),a}function az(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{vf(e,t,r,n)}),vf(e,t,"secureConnection",n,"TLS/SSL","connectEnd"),vf(e,t,"fetch",n,"cache","domainLookupStart"),vf(e,t,"domainLookup",n,"DNS"),lz(e,t,n)}function vf(e,t,n,r,s,i){const o=i?t[i]:t[`${n}End`],a=t[`${n}Start`];!a||!o||Bi(e,r+dn(a),r+dn(o),{op:`browser.${s||n}`,name:t.name,attributes:{[an]:"auto.ui.browser.metrics"}})}function lz(e,t,n){const r=n+dn(t.requestStart),s=n+dn(t.responseEnd),i=n+dn(t.responseStart);t.responseEnd&&(Bi(e,r,s,{op:"browser.request",name:t.name,attributes:{[an]:"auto.ui.browser.metrics"}}),Bi(e,i,s,{op:"browser.response",name:t.name,attributes:{[an]:"auto.ui.browser.metrics"}}))}function uz(e,t,n,r,s,i){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const o=Ra(n),a={[an]:"auto.resource.browser.metrics"};Sg(a,t,"transferSize","http.response_transfer_size"),Sg(a,t,"encodedBodySize","http.response_content_length"),Sg(a,t,"decodedBodySize","http.decoded_response_content_length"),t.deliveryType!=null&&(a["http.response_delivery_type"]=t.deliveryType),"renderBlockingStatus"in t&&(a["resource.render_blocking_status"]=t.renderBlockingStatus),o.protocol&&(a["url.scheme"]=o.protocol.split(":").pop()),o.host&&(a["server.address"]=o.host),a["url.same_origin"]=n.includes(ze.location.origin);const l=i+r,u=l+s;Bi(e,l,u,{name:n.replace(ze.location.origin,""),op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",attributes:a})}function cz(e){const t=ze.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute("connectionType",n.type),wg(n.rtt)&&(Ln["connection.rtt"]={value:n.rtt,unit:"millisecond"})),wg(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),wg(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}function dz(e){wr&&(wr.element&&e.setAttribute("lcp.element",Fi(wr.element)),wr.id&&e.setAttribute("lcp.id",wr.id),wr.url&&e.setAttribute("lcp.url",wr.url.trim().slice(0,200)),wr.loadTime!=null&&e.setAttribute("lcp.loadTime",wr.loadTime),wr.renderTime!=null&&e.setAttribute("lcp.renderTime",wr.renderTime),e.setAttribute("lcp.size",wr.size)),Sc&&Sc.sources&&Sc.sources.forEach((t,n)=>e.setAttribute(`cls.source.${n+1}`,Fi(t.node)))}function Sg(e,t,n,r){const s=t[n];s!=null&&s<XH&&(e[r]=s)}function fz(e){const t=Vd(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}const hz=1e3;let l0,oy,ay;function jP(e){const t="dom";zo(t,e),jo(t,pz)}function pz(){if(!ze.document)return;const e=is.bind(null,"dom"),t=u0(e,!0);ze.document.addEventListener("click",t,!1),ze.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const s=ze[n],i=s&&s.prototype;!i||!i.hasOwnProperty||!i.hasOwnProperty("addEventListener")||(Cr(i,"addEventListener",function(o){return function(a,l,u){if(a==="click"||a=="keypress")try{const c=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},d=c[a]=c[a]||{refCount:0};if(!d.handler){const f=u0(e);d.handler=f,o.call(this,a,f,u)}d.refCount++}catch{}return o.call(this,a,l,u)}}),Cr(i,"removeEventListener",function(o){return function(a,l,u){if(a==="click"||a=="keypress")try{const c=this.__sentry_instrumentation_handlers__||{},d=c[a];d&&(d.refCount--,d.refCount<=0&&(o.call(this,a,d.handler,u),d.handler=void 0,delete c[a]),Object.keys(c).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return o.call(this,a,l,u)}}))})}function mz(e){if(e.type!==oy)return!1;try{if(!e.target||e.target._sentryId!==ay)return!1}catch{}return!0}function gz(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function u0(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=vz(n);if(gz(n.type,r))return;ls(n,"_sentryCaptured",!0),r&&!r._sentryId&&ls(r,"_sentryId",Cn());const s=n.type==="keypress"?"input":n.type;mz(n)||(e({event:n,name:s,global:t}),oy=n.type,ay=r?r._sentryId:void 0),clearTimeout(l0),l0=ze.setTimeout(()=>{ay=void 0,oy=void 0},hz)}}function vz(e){try{return e.target}catch{return null}}let yf;function um(e){const t="history";zo(t,e),jo(t,yz)}function yz(){if(!X3())return;const e=ze.onpopstate;ze.onpopstate=function(...n){const r=ze.location.href,s=yf;if(yf=r,is("history",{from:s,to:r}),e)try{return e.apply(this,n)}catch{}};function t(n){return function(...r){const s=r.length>2?r[2]:void 0;if(s){const i=yf,o=String(s);yf=o,is("history",{from:i,to:o})}return n.apply(this,r)}}Cr(ze.history,"pushState",t),Cr(ze.history,"replaceState",t)}const oh={};function qP(e){const t=oh[e];if(t)return t;let n=ze[e];if(ey(n))return oh[e]=n.bind(ze);const r=ze.document;if(r&&typeof r.createElement=="function")try{const s=r.createElement("iframe");s.hidden=!0,r.head.appendChild(s);const i=s.contentWindow;i&&i[e]&&(n=i[e]),r.head.removeChild(s)}catch(s){uw&&Re.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,s)}return n&&(oh[e]=n.bind(ze))}function c0(e){oh[e]=void 0}function ou(...e){return qP("setTimeout")(...e)}const ca="__sentry_xhr_v3__";function WP(e){const t="xhr";zo(t,e),jo(t,bz)}function bz(){if(!ze.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const s=tr()*1e3,i=Ai(r[0])?r[0].toUpperCase():void 0,o=wz(r[1]);if(!i||!o)return t.apply(n,r);n[ca]={method:i,url:o,request_headers:{}},i==="POST"&&o.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const a=()=>{const l=n[ca];if(l&&n.readyState===4){try{l.status_code=n.status}catch{}const u={endTimestamp:tr()*1e3,startTimestamp:s,xhr:n};is("xhr",u)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(l,u,c){return a(),l.apply(u,c)}}):n.addEventListener("readystatechange",a),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(l,u,c){const[d,f]=c,p=u[ca];return p&&Ai(d)&&Ai(f)&&(p.request_headers[d.toLowerCase()]=f),l.apply(u,c)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const s=n[ca];if(!s)return t.apply(n,r);r[0]!==void 0&&(s.body=r[0]);const i={startTimestamp:tr()*1e3,xhr:n};return is("xhr",i),t.apply(n,r)}})}function wz(e){if(Ai(e))return e;try{return e.toString()}catch{}}const _g=[],ah=new Map;function Sz(){if(dw()&&pr){const t=_z();return()=>{t()}}return()=>{}}const d0={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 _z(){return BP(({metric:e})=>{if(e.value==null)return;const t=e.entries.find(g=>g.duration===e.value&&d0[g.name]);if(!t)return;const{interactionId:n}=t,r=d0[t.name],s=dn(pr+t.startTime),i=dn(e.value),o=bn(),a=o?Mn(o):void 0,u=(n!=null?ah.get(n):void 0)||a,c=u?yt(u).description:Nt().getScopeData().transactionName,d=Fi(t.target),f=xn({[an]:"auto.http.browser.inp",[Fa]:`ui.interaction.${r}`,[tw]:t.duration}),p=zP({name:d,transaction:c,attributes:f,startTime:s});p&&(p.addEvent("inp",{[im]:"millisecond",[om]:e.value}),p.end(s+i))})}function kz(e){const t=({entries:n})=>{const r=bn(),s=r&&Mn(r);n.forEach(i=>{if(!WH(i)||!s)return;const o=i.interactionId;if(o!=null&&!ah.has(o)){if(_g.length>10){const a=_g.shift();ah.delete(a)}_g.push(o),ah.set(o,s)}})};iu("event",t),iu("first-input",t)}function xz(e,t=qP("fetch")){let n=0,r=0;function s(i){const o=i.body.length;n+=o,r++;const a={body:i.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return c0("fetch"),qh("No fetch implementation available");try{return t(e.url,a).then(l=>(n-=o,r--,{statusCode:l.status,headers:{"x-sentry-rate-limits":l.headers.get("X-Sentry-Rate-Limits"),"retry-after":l.headers.get("Retry-After")}}))}catch(l){return c0("fetch"),n-=o,r--,qh(l)}}return t3(e,s)}const Ez=30,Cz=50;function ly(e,t,n,r){const s={filename:e,function:t==="<anonymous>"?La:t,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}const Tz=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Rz=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Pz=/\((\S*)(?::(\d+))(?::(\d+))\)/,Iz=e=>{const t=Tz.exec(e);if(t){const[,r,s,i]=t;return ly(r,La,+s,+i)}const n=Rz.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){const o=Pz.exec(n[2]);o&&(n[2]=o[1],n[3]=o[2],n[4]=o[3])}const[s,i]=GP(n[1]||La,n[2]);return ly(i,s,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},Az=[Ez,Iz],Oz=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Mz=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Dz=e=>{const t=Oz.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const i=Mz.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]||La;return[s,r]=GP(s,r),ly(r,s,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},$z=[Cz,Dz],Lz=[Az,$z],Fz=AR(...Lz),GP=(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]:La,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},bf=1024,Nz="Breadcrumbs",Vz=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:Nz,setup(n){t.console&&T3(zz(n)),t.dom&&jP(Hz(n,t.dom)),t.xhr&&WP(jz(n)),t.fetch&&TP(qz(n)),t.history&&um(Wz(n)),t.sentry&&n.on("beforeSendEvent",Uz(n))}}},Bz=Vz;function Uz(e){return function(n){dt()===e&&Ao({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:to(n)},{event:n})}}function Hz(e,t){return function(r){if(dt()!==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>bf&&(oi&&Re.warn(`\`dom.maxStringLength\` cannot exceed ${bf}, but a value of ${a} was configured. Sentry will use ${bf} instead.`),a=bf),typeof o=="string"&&(o=[o]);try{const u=r.event,c=Gz(u)?u.target:u;s=Fi(c,{keyAttrs:o,maxStringLength:a}),i=NR(c)}catch{s="<unknown>"}if(s.length===0)return;const l={category:`ui.${r.name}`,message:s};i&&(l.data={"ui.component_name":i}),Ao(l,{event:r.event,name:r.name,global:r.global})}}function zz(e){return function(n){if(dt()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:_P(n.level),message:C1(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${C1(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;Ao(r,{input:n.args,level:n.level})}}function jz(e){return function(n){if(dt()!==e)return;const{startTimestamp:r,endTimestamp:s}=n,i=n.xhr[ca];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=EP(l);Ao({category:"xhr",data:c,type:"http",level:f},d)}}function qz(e){return function(n){if(dt()!==e)return;const{startTimestamp:r,endTimestamp:s}=n;if(s&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const i=n.fetchData,o={data:n.error,input:n.args,startTimestamp:r,endTimestamp:s};Ao({category:"fetch",data:i,level:"error",type:"http"},o)}else{const i=n.response,o={...n.fetchData,status_code:i&&i.status},a={input:n.args,response:i,startTimestamp:r,endTimestamp:s},l=EP(o.status_code);Ao({category:"fetch",data:o,type:"http",level:l},a)}}}function Wz(e){return function(n){if(dt()!==e)return;let r=n.from,s=n.to;const i=Ra(Ze.location.href);let o=r?Ra(r):void 0;const a=Ra(s);(!o||!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),Ao({category:"navigation",data:{from:r,to:s}})}}function Gz(e){return!!e&&!!e.target}const Kz=["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"],Yz="BrowserApiErrors",Xz=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:Yz,setupOnce(){t.setTimeout&&Cr(Ze,"setTimeout",f0),t.setInterval&&Cr(Ze,"setInterval",f0),t.requestAnimationFrame&&Cr(Ze,"requestAnimationFrame",Jz),t.XMLHttpRequest&&"XMLHttpRequest"in Ze&&Cr(XMLHttpRequest.prototype,"send",Zz);const n=t.eventTarget;n&&(Array.isArray(n)?n:Kz).forEach(e4)}}},Qz=Xz;function f0(e){return function(...t){const n=t[0];return t[0]=su(n,{mechanism:{data:{function:$i(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function Jz(e){return function(t){return e.apply(this,[su(t,{mechanism:{data:{function:"requestAnimationFrame",handler:$i(e)},handled:!1,type:"instrument"}})])}}function Zz(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&Cr(n,s,function(i){const o={mechanism:{data:{function:s,handler:$i(i)},handled:!1,type:"instrument"}},a=Jb(i);return a&&(o.mechanism.data.handler=$i(a)),su(i,o)})}),e.apply(this,t)}}function e4(e){const n=Ze[e],r=n&&n.prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(Cr(r,"addEventListener",function(s){return function(i,o,a){try{t4(o)&&(o.handleEvent=su(o.handleEvent,{mechanism:{data:{function:"handleEvent",handler:$i(o),target:e},handled:!1,type:"instrument"}}))}catch{}return s.apply(this,[i,su(o,{mechanism:{data:{function:"addEventListener",handler:$i(o),target:e},handled:!1,type:"instrument"}}),a])}}),Cr(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 t4(e){return typeof e.handleEvent=="function"}const n4="GlobalHandlers",r4=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:n4,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(i4(n),h0("onerror")),t.onunhandledrejection&&(o4(n),h0("onunhandledrejection"))}}},s4=r4;function i4(e){OR(t=>{const{stackParser:n,attachStacktrace:r}=KP();if(dt()!==e||PP())return;const{msg:s,url:i,line:o,column:a,error:l}=t,u=u4(lw(n,l||s,void 0,r,!1),i,o,a);u.level="error",hP(u,{originalException:l,mechanism:{handled:!1,type:"onerror"}})})}function o4(e){MR(t=>{const{stackParser:n,attachStacktrace:r}=KP();if(dt()!==e||PP())return;const s=a4(t),i=Qb(s)?l4(s):lw(n,s,void 0,r,!0);i.level="error",hP(i,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function a4(e){if(Qb(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 l4(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function u4(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=isNaN(parseInt(r,10))?void 0:r,c=isNaN(parseInt(n,10))?void 0:n,d=Ai(t)&&t.length>0?t:FR();return l.length===0&&l.push({colno:u,filename:d,function:La,in_app:!0,lineno:c}),e}function h0(e){oi&&Re.log(`Global Handler attached: ${e}`)}function KP(){const e=dt();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const c4=()=>({name:"HttpContext",preprocessEvent(e){if(!Ze.navigator&&!Ze.location&&!Ze.document)return;const t=e.request&&e.request.url||Ze.location&&Ze.location.href,{referrer:n}=Ze.document||{},{userAgent:r}=Ze.navigator||{},s={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},i={...e.request,...t&&{url:t},headers:s};e.request=i}}),d4="cause",f4=5,h4="LinkedErrors",p4=(e={})=>{const t=e.limit||f4,n=e.key||d4;return{name:h4,preprocessEvent(r,s,i){const o=i.getOptions();E3(ow,o.stackParser,o.maxValueLength,n,t,r,s)}}},m4=p4;function YP(e){return[p3(),c3(),Qz(),Bz(),s4(),m4(),A3(),c4()]}function g4(e={}){const t={defaultIntegrations:YP(),release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:Ze.SENTRY_RELEASE&&Ze.SENTRY_RELEASE.id?Ze.SENTRY_RELEASE.id:void 0,autoSessionTracking:!0,sendClientReports:!0};return e.defaultIntegrations==null&&delete e.defaultIntegrations,{...t,...e}}function v4(){const e=typeof Ze.window<"u"&&Ze;if(!e)return!1;const t=e.chrome?"chrome":"browser",n=e[t],r=n&&n.runtime&&n.runtime.id,s=Ze.location&&Ze.location.href||"",i=["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"],o=!!r&&Ze===Ze.top&&i.some(l=>s.startsWith(`${l}//`)),a=typeof e.nw<"u";return!!r&&!o&&!a}function y4(e={}){const t=g4(e);if(!t.skipBrowserExtensionCheck&&v4()){Ms(()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")});return}oi&&(CP()||Re.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill."));const n={...t,stackParser:HV(t.stackParser||Fz),integrations:HU(t),transport:t.transport||xz},r=KU(fH,n);return t.autoSessionTracking&&b4(),r}function b4(){if(typeof Ze.document>"u"){oi&&Re.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}W1({ignoreDuration:!0}),G1(),um(({from:e,to:t})=>{e!==void 0&&e!==t&&(W1({ignoreDuration:!0}),G1())})}const Ht=pt,fw="sentryReplaySession",w4="replay_event",hw="Unable to send Replay",S4=3e5,_4=9e5,k4=5e3,x4=5500,E4=6e4,C4=5e3,T4=3,p0=15e4,wf=5e3,R4=3e3,P4=300,pw=2e7,I4=4999,A4=15e3,m0=36e5;function uy(e,t){return e??t()}function Gc(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}var wn;(function(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"})(wn||(wn={}));function O4(e){return e.nodeType===e.ELEMENT_NODE}function _c(e){const t=Gc([e,"optionalAccess",n=>n.host]);return Gc([t,"optionalAccess",n=>n.shadowRoot])===e}function kc(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function M4(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 D4(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 Jh(e){try{const t=e.rules||e.cssRules;return t?M4(Array.from(t,XP).join("")):null}catch{return null}}function XP(e){let t;if(L4(e))try{t=Jh(e.styleSheet)||D4(e)}catch{}else if(F4(e)&&e.selectorText.includes(":"))return $4(e.cssText);return t||e.cssText}function $4(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function L4(e){return"styleSheet"in e}function F4(e){return"selectorText"in e}class QP{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(t){if(!t)return-1;const n=Gc([this,"access",r=>r.getMeta,"call",r=>r(t),"optionalAccess",r=>r.id]);return uy(n,()=>-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 N4(){return new QP}function cm({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 Kc({isMasked:e,element:t,value:n,maskInputFn:r}){let s=n||"";return e?(r&&(s=r(s,t)),"*".repeat(s.length)):s}function au(e){return e.toLowerCase()}function cy(e){return e.toUpperCase()}const g0="__rrweb_original__";function V4(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=g0 in i?i[g0]: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 mw(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?au(t):null}function Zh(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function JP(e,t){let n;try{n=new URL(e,uy(t,()=>window.location.href))}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i,s=n.pathname.match(r);return uy(Gc([s,"optionalAccess",i=>i[1]]),()=>null)}const v0={};function ZP(e){const t=v0[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 v0[e]=r.bind(window)}function dy(...e){return ZP("setTimeout")(...e)}function eI(...e){return ZP("clearTimeout")(...e)}let B4=1;const U4=new RegExp("[^a-z0-9-_:]"),Yc=-2;function gw(){return B4++}function H4(e){if(e instanceof HTMLFormElement)return"form";const t=au(e.tagName);return U4.test(t)?"div":t}function z4(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let il,y0;const j4=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,q4=/^(?:[a-z+]+:)?\/\//i,W4=/^www\..*/i,G4=/^(data:)([^,]*),(.*)/i;function ep(e,t){return(e||"").replace(j4,(n,r,s,i,o,a)=>{const l=s||o||a,u=r||i||"";if(!l)return n;if(q4.test(l)||W4.test(l))return`url(${u}${l}${u})`;if(G4.test(l))return`url(${u}${l}${u})`;if(l[0]==="/")return`url(${u}${z4(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 K4=/^[^ \t\n\r\u000c]+/,Y4=/^[, \t\n\r\u000c]+/;function X4(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(Y4),!(n>=t.length);){let i=r(K4);if(i.slice(-1)===",")i=wl(e,i.substring(0,i.length-1)),s.push(i);else{let o="";i=wl(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 b0=new WeakMap;function wl(e,t){return!t||t.trim()===""?t:dm(e,t)}function Q4(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function dm(e,t){let n=b0.get(e);if(n||(n=e.createElement("a"),b0.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function tI(e,t,n,r,s,i){return r&&(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&(t==="table"||t==="td"||t==="th")?wl(e,r):n==="srcset"?X4(e,r):n==="style"?ep(r,dm(e)):t==="object"&&n==="data"?wl(e,r):typeof i=="function"?i(n,r,s):r)}function nI(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function J4(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 Z4(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function da(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:da(e.parentNode,t,n,r+1)}function Sl(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(Z4(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function lu(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=da(o,Sl(r,s)),l<0)return!0;a=da(o,Sl(t,n),l>=0?l:1/0)}else{if(a=da(o,Sl(t,n)),a<0)return!1;l=da(o,Sl(r,s),a>=0?a:1/0)}return a>=0?l>=0?a<=l:!0:l>=0?!1:!!i}catch{}return!!i}function e5(e,t,n){const r=e.contentWindow;if(!r)return;let s=!1,i;try{i=r.document.readyState}catch{return}if(i!=="complete"){const a=dy(()=>{s||(t(),s=!0)},n);e.addEventListener("load",()=>{eI(a),s=!0,t()});return}const o="about:blank";if(r.location.href!==o||e.src===o||e.src==="")return dy(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function t5(e,t,n){let r=!1,s;try{s=e.sheet}catch{return}if(s)return;const i=dy(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{eI(i),r=!0,t()})}function n5(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:g={},maskTextFn:m,maskInputFn:y,dataURLOptions:b={},inlineImages:w,recordCanvas:S,keepIframeSrcFn:C,newlyAddedElement:_=!1}=t,R=r5(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:wn.Document,childNodes:[],compatMode:e.compatMode}:{type:wn.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:wn.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:R};case e.ELEMENT_NODE:return i5(e,{doc:n,blockClass:s,blockSelector:i,unblockSelector:o,inlineStylesheet:p,maskAttributeFn:l,maskInputOptions:g,maskInputFn:y,dataURLOptions:b,inlineImages:w,recordCanvas:S,keepIframeSrcFn:C,newlyAddedElement:_,rootId:R,maskAllText:a,maskTextClass:u,unmaskTextClass:c,maskTextSelector:d,unmaskTextSelector:f});case e.TEXT_NODE:return s5(e,{doc:n,maskAllText:a,maskTextClass:u,unmaskTextClass:c,maskTextSelector:d,unmaskTextSelector:f,maskTextFn:m,maskInputOptions:g,maskInputFn:y,rootId:R});case e.CDATA_SECTION_NODE:return{type:wn.CDATA,textContent:"",rootId:R};case e.COMMENT_NODE:return{type:wn.Comment,textContent:e.textContent||"",rootId:R};default:return!1}}function r5(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function s5(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,g=d==="SCRIPT"?!0:void 0,m=d==="TEXTAREA"?!0:void 0;if(p&&f){try{e.nextSibling||e.previousSibling||Gc([e,"access",b=>b.parentNode,"access",b=>b.sheet,"optionalAccess",b=>b.cssRules])&&(f=Jh(e.parentNode.sheet))}catch(b){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${b}`,e)}f=ep(f,dm(t.doc))}g&&(f="SCRIPT_PLACEHOLDER");const y=lu(e,r,i,s,o,n);if(!p&&!g&&!m&&f&&y&&(f=a?a(f,e.parentElement):f.replace(/[\S]/g,"*")),m&&f&&(l.textarea||y)&&(f=u?u(f,e.parentNode):f.replace(/[\S]/g,"*")),d==="OPTION"&&f){const b=cm({type:null,tagName:d,maskInputOptions:l});f=Kc({isMasked:lu(e,r,i,s,o,b),element:e,value:f,maskInputFn:u})}return{type:wn.Text,textContent:f||"",isStyle:p,rootId:c}}function i5(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:g=!1,rootId:m,maskAllText:y,maskTextClass:b,unmaskTextClass:w,maskTextSelector:S,unmaskTextSelector:C}=t,_=J4(e,r,s,i),R=H4(e);let T={};const x=e.attributes.length;for(let P=0;P<x;P++){const M=e.attributes[P];M.name&&!nI(R,M.name,M.value)&&(T[M.name]=tI(n,R,au(M.name),M.value,e,l))}if(R==="link"&&o){const P=Array.from(n.styleSheets).find(O=>O.href===e.href);let M=null;P&&(M=Jh(P)),M&&(delete T.rel,delete T.href,T._cssText=ep(M,P.href))}if(R==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const P=Jh(e.sheet);P&&(T._cssText=ep(P,dm(n)))}if(R==="input"||R==="textarea"||R==="select"||R==="option"){const P=e,M=mw(P),O=Zh(P,cy(R),M),A=P.checked;if(M!=="submit"&&M!=="button"&&O){const D=lu(P,b,S,w,C,cm({type:M,tagName:cy(R),maskInputOptions:a}));T.value=Kc({isMasked:D,element:P,value:O,maskInputFn:u})}A&&(T.checked=A)}if(R==="option"&&(e.selected&&!a.select?T.selected=!0:delete T.selected),R==="canvas"&&f){if(e.__context==="2d")V4(e)||(T.rr_dataURL=e.toDataURL(c.type,c.quality));else if(!("__context"in e)){const P=e.toDataURL(c.type,c.quality),M=n.createElement("canvas");M.width=e.width,M.height=e.height;const O=M.toDataURL(c.type,c.quality);P!==O&&(T.rr_dataURL=P)}}if(R==="img"&&d){il||(il=n.createElement("canvas"),y0=il.getContext("2d"));const P=e,M=P.currentSrc||P.getAttribute("src")||"<unknown-src>",O=P.crossOrigin,A=()=>{P.removeEventListener("load",A);try{il.width=P.naturalWidth,il.height=P.naturalHeight,y0.drawImage(P,0,0),T.rr_dataURL=il.toDataURL(c.type,c.quality)}catch(D){if(P.crossOrigin!=="anonymous"){P.crossOrigin="anonymous",P.complete&&P.naturalWidth!==0?A():P.addEventListener("load",A);return}else console.warn(`Cannot inline img src=${M}! Error: ${D}`)}P.crossOrigin==="anonymous"&&(O?T.crossOrigin=O:P.removeAttribute("crossorigin"))};P.complete&&P.naturalWidth!==0?A():P.addEventListener("load",A)}if((R==="audio"||R==="video")&&(T.rr_mediaState=e.paused?"paused":"played",T.rr_mediaCurrentTime=e.currentTime),g||(e.scrollLeft&&(T.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(T.rr_scrollTop=e.scrollTop)),_){const{width:P,height:M}=e.getBoundingClientRect();T={class:T.class,rr_width:`${P}px`,rr_height:`${M}px`}}R==="iframe"&&!p(T.src)&&(!_&&!e.contentDocument&&(T.rr_src=T.src),delete T.src);let E;try{customElements.get(R)&&(E=!0)}catch{}return{type:wn.Element,tagName:R,attributes:T,childNodes:[],isSVG:Q4(e)||void 0,needBlock:_,rootId:m,isCustom:E}}function Bt(e){return e==null?"":e.toLowerCase()}function o5(e,t){if(t.comment&&e.type===wn.Comment)return!0;if(e.type===wn.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")&&e.attributes.as==="script"||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&JP(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(Bt(e.attributes.name).match(/^msapplication-tile(image|color)$/)||Bt(e.attributes.name)==="application-name"||Bt(e.attributes.rel)==="icon"||Bt(e.attributes.rel)==="apple-touch-icon"||Bt(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&Bt(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Bt(e.attributes.property).match(/^(og|twitter|fb):/)||Bt(e.attributes.name).match(/^(og|twitter):/)||Bt(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(Bt(e.attributes.name)==="robots"||Bt(e.attributes.name)==="googlebot"||Bt(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(Bt(e.attributes.name)==="author"||Bt(e.attributes.name)==="generator"||Bt(e.attributes.name)==="framework"||Bt(e.attributes.name)==="publisher"||Bt(e.attributes.name)==="progid"||Bt(e.attributes.property).match(/^article:/)||Bt(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(Bt(e.attributes.name)==="google-site-verification"||Bt(e.attributes.name)==="yandex-verification"||Bt(e.attributes.name)==="csrf-token"||Bt(e.attributes.name)==="p:domain_verify"||Bt(e.attributes.name)==="verify-v1"||Bt(e.attributes.name)==="verification"||Bt(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function _l(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:g={},maskAttributeFn:m,maskTextFn:y,maskInputFn:b,slimDOMOptions:w,dataURLOptions:S={},inlineImages:C=!1,recordCanvas:_=!1,onSerialize:R,onIframeLoad:T,iframeLoadTimeout:x=5e3,onStylesheetLoad:E,stylesheetLoadTimeout:P=5e3,keepIframeSrcFn:M=()=>!1,newlyAddedElement:O=!1}=t;let{preserveWhiteSpace:A=!0}=t;const D=n5(e,{doc:n,mirror:r,blockClass:s,blockSelector:i,maskAllText:a,unblockSelector:o,maskTextClass:l,unmaskTextClass:u,maskTextSelector:c,unmaskTextSelector:d,inlineStylesheet:p,maskInputOptions:g,maskAttributeFn:m,maskTextFn:y,maskInputFn:b,dataURLOptions:S,inlineImages:C,recordCanvas:_,keepIframeSrcFn:M,newlyAddedElement:O});if(!D)return console.warn(e,"not serialized"),null;let H;r.hasNode(e)?H=r.getId(e):o5(D,w)||!A&&D.type===wn.Text&&!D.isStyle&&!D.textContent.replace(/^\s+|\s+$/gm,"").length?H=Yc:H=gw();const z=Object.assign(D,{id:H});if(r.add(e,z),H===Yc)return null;R&&R(e);let Y=!f;if(z.type===wn.Element){Y=Y&&!z.needBlock,delete z.needBlock;const q=e.shadowRoot;q&&kc(q)&&(z.isShadowHost=!0)}if((z.type===wn.Document||z.type===wn.Element)&&Y){w.headWhitespace&&z.type===wn.Element&&z.tagName==="head"&&(A=!1);const q={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:g,maskAttributeFn:m,maskTextFn:y,maskInputFn:b,slimDOMOptions:w,dataURLOptions:S,inlineImages:C,recordCanvas:_,preserveWhiteSpace:A,onSerialize:R,onIframeLoad:T,iframeLoadTimeout:x,onStylesheetLoad:E,stylesheetLoadTimeout:P,keepIframeSrcFn:M};for(const V of Array.from(e.childNodes)){const G=_l(V,q);G&&z.childNodes.push(G)}if(O4(e)&&e.shadowRoot)for(const V of Array.from(e.shadowRoot.childNodes)){const G=_l(V,q);G&&(kc(e.shadowRoot)&&(G.isShadow=!0),z.childNodes.push(G))}}return e.parentNode&&_c(e.parentNode)&&kc(e.parentNode)&&(z.isShadow=!0),z.type===wn.Element&&z.tagName==="iframe"&&e5(e,()=>{const q=e.contentDocument;if(q&&T){const V=_l(q,{doc:q,mirror:r,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:a,maskTextClass:l,unmaskTextClass:u,maskTextSelector:c,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:g,maskAttributeFn:m,maskTextFn:y,maskInputFn:b,slimDOMOptions:w,dataURLOptions:S,inlineImages:C,recordCanvas:_,preserveWhiteSpace:A,onSerialize:R,onIframeLoad:T,iframeLoadTimeout:x,onStylesheetLoad:E,stylesheetLoadTimeout:P,keepIframeSrcFn:M});V&&T(e,V)}},x),z.type===wn.Element&&z.tagName==="link"&&typeof z.attributes.rel=="string"&&(z.attributes.rel==="stylesheet"||z.attributes.rel==="preload"&&typeof z.attributes.href=="string"&&JP(z.attributes.href)==="css")&&t5(e,()=>{if(E){const q=_l(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:g,maskAttributeFn:m,maskTextFn:y,maskInputFn:b,slimDOMOptions:w,dataURLOptions:S,inlineImages:C,recordCanvas:_,preserveWhiteSpace:A,onSerialize:R,onIframeLoad:T,iframeLoadTimeout:x,onStylesheetLoad:E,stylesheetLoadTimeout:P,keepIframeSrcFn:M});q&&E(e,q)}},P),z}function a5(e,t){const{mirror:n=new QP,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:g=!1,maskAttributeFn:m,maskTextFn:y,maskInputFn:b,slimDOM:w=!1,dataURLOptions:S,preserveWhiteSpace:C,onSerialize:_,onIframeLoad:R,iframeLoadTimeout:T,onStylesheetLoad:x,stylesheetLoadTimeout:E,keepIframeSrcFn:P=()=>!1}=t||{};return _l(e,{doc:e,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,maskAllText:o,maskTextClass:a,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:c,skipChild:!1,inlineStylesheet:d,maskInputOptions:g===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:g===!1?{}:g,maskAttributeFn:m,maskTextFn:y,maskInputFn:b,slimDOMOptions:w===!0||w==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:w==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:w===!1?{}:w,dataURLOptions:S,inlineImages:f,recordCanvas:p,preserveWhiteSpace:C,onSerialize:_,onIframeLoad:R,iframeLoadTimeout:T,onStylesheetLoad:x,stylesheetLoadTimeout:E,keepIframeSrcFn:P,newlyAddedElement:!1})}function no(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}function dr(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const ml=`Please stop import mirror directly. Instead of that,\r
|
|
51
|
-
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
52
|
-
or you can use record.mirror to access the mirror instance during recording.`;let w0={map:{},getId(){return console.error(ml),-1},getNode(){return console.error(ml),null},removeNodeFromMap(){console.error(ml)},has(){return console.error(ml),!1},reset(){console.error(ml)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(w0=new Proxy(w0,{get(e,t,n){return t==="map"&&console.error(ml),Reflect.get(e,t,n)}}));function Xc(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&&(p5(r),r=null),s=o,e.apply(l,i)):!r&&n.trailing!==!1&&(r=fm(()=>{s=n.leading===!1?0:Date.now(),r=null,e.apply(l,i)},a))}}function rI(e,t,n,r,s=window){const i=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,r?n:{set(o){fm(()=>{n.set.call(this,o)},0),i&&i.set&&i.set.call(this,o)}}),()=>rI(e,t,i||{},!0)}function vw(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 tp=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(tp=()=>new Date().getTime());function sI(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:no([t,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollLeft])||no([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollLeft])||no([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollLeft])||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:no([t,"optionalAccess",n=>n.documentElement,"access",n=>n.scrollTop])||no([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.parentElement,"optionalAccess",n=>n.scrollTop])||no([t,"optionalAccess",n=>n.body,"optionalAccess",n=>n.scrollTop])||0}}function iI(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function oI(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function aI(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function Br(e,t,n,r,s){if(!e)return!1;const i=aI(e);if(!i)return!1;const o=Sl(t,n);if(!s){const u=r&&i.matches(r);return o(i)&&!u}const a=da(i,o);let l=-1;return a<0?!1:(r&&(l=da(i,Sl(null,r))),a>-1&&l<0?!0:a<l)}function l5(e,t){return t.getId(e)!==-1}function kg(e,t){return t.getId(e)===Yc}function lI(e,t){if(_c(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?lI(e.parentNode,t):!0:!0}function fy(e){return!!e.changedTouches}function u5(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 uI(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function cI(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function hy(e){return!!no([e,"optionalAccess",t=>t.shadowRoot])}class c5{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return Q3(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 dI(e){let t=null;return no([e,"access",n=>n.getRootNode,"optionalCall",n=>n(),"optionalAccess",n=>n.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function d5(e){let t=e,n;for(;n=dI(t);)t=n;return t}function f5(e){const t=e.ownerDocument;if(!t)return!1;const n=d5(e);return t.contains(n)}function fI(e){const t=e.ownerDocument;return t?t.contains(e)||f5(e):!1}const S0={};function yw(e){const t=S0[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 S0[e]=r.bind(window)}function h5(...e){return yw("requestAnimationFrame")(...e)}function fm(...e){return yw("setTimeout")(...e)}function p5(...e){return yw("clearTimeout")(...e)}var it=(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))(it||{}),Ye=(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))(Ye||{}),ir=(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))(ir||{}),bi=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(bi||{});function m5(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}function _0(e){return"__ln"in e}class g5{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=m5([n,"optionalAccess",s=>s.next])||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&_0(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&&_0(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 k0=(e,t)=>`${e}@${t}`;class v5{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 g5,s=l=>{let u=l,c=Yc;for(;c===Yc;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},i=l=>{if(!l.parentNode||!fI(l))return;const u=_c(l.parentNode)?this.mirror.getId(dI(l)):this.mirror.getId(l.parentNode),c=s(l);if(u===-1||c===-1)return r.addNode(l);const d=_l(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=>{uI(f,this.mirror)&&!Br(f,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(f),cI(f,this.mirror)&&this.stylesheetManager.trackLinkElement(f),hy(l)&&this.shadowDomManager.addShadowRoot(l.shadowRoot,this.doc)},onIframeLoad:(f,p)=>{Br(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)}});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)x0(this.removes,l,this.mirror)&&!this.movedSet.has(l.parentNode)||i(l);for(const l of this.addedSet)!E0(this.droppedSet,l)&&!x0(this.removes,l,this.mirror)||E0(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 g=p.parentNode.host;if(this.mirror.getId(g)!==-1){l=c;break}}}}}}if(!l){for(;r.head;)r.removeNode(r.head.value);break}o=l.previous,r.removeNode(l.value),i(l.value)}const a={texts:this.texts.map(l=>({id:this.mirror.getId(l.node),value:l.value})).filter(l=>!n.has(l.id)).filter(l=>this.mirror.has(l.id)),attributes:this.attributes.map(l=>{const{attributes:u}=l;if(typeof u.style=="string"){const c=JSON.stringify(l.styleDiff),d=JSON.stringify(l._unchangedStyles);c.length<u.style.length&&(c+d).split("var(").length===u.style.split("var(").length&&(u.style=l.styleDiff)}return{id:this.mirror.getId(l.node),attributes:u}}).filter(l=>!n.has(l.id)).filter(l=>this.mirror.has(l.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=t=>{if(!kg(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!Br(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:lu(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,aI(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=mw(n),a=n.tagName;s=Zh(n,a,o);const l=cm({maskInputOptions:this.maskInputOptions,tagName:a,type:o}),u=lu(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,l);s=Kc({isMasked:u,element:n,value:s,maskInputFn:this.maskInputFn})}if(Br(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(!n.contentDocument)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"),!nI(n.tagName,r)&&(i.attributes[r]=tI(this.doc,au(n.tagName),au(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(Br(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=_c(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Br(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||kg(n,this.mirror)||!l5(n,this.mirror)||(this.addedSet.has(n)?(py(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||lI(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[k0(r,s)]?py(this.movedSet,n):this.removes.push({parentId:s,id:r,isShadow:_c(t.target)&&kc(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(kg(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[k0(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Br(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes.forEach(r=>this.genAdds(r)),hy(t)&&t.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,t)}))}}}init(t){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(n=>{this[n]=t[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function py(e,t){e.delete(t),t.childNodes.forEach(n=>py(e,n))}function x0(e,t,n){return e.length===0?!1:y5(e,t,n)}function y5(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 E0(e,t){return e.size===0?!1:hI(e,t)}function hI(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:hI(e,n):!1}let xc;function b5(e){xc=e}function w5(){xc=void 0}const gt=e=>xc?(...n)=>{try{return e(...n)}catch(r){if(xc&&xc(r)===!0)return()=>{};throw r}}:e;function bs(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}const kl=[];function zd(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 pI(e,t){const n=new v5;kl.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const s=bs([window,"optionalAccess",o=>o.Zone,"optionalAccess",o=>o.__symbol__,"optionalCall",o=>o("MutationObserver")]);s&&window[s]&&(r=window[s]);const i=new r(gt(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 S5({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=Xc(gt(d=>{const f=Date.now()-a;e(o.map(p=>(p.timeOffset-=f,p)),d),o=[],a=null}),i),u=gt(Xc(gt(d=>{const f=zd(d),{clientX:p,clientY:g}=fy(d)?d.changedTouches[0]:d;a||(a=tp()),o.push({x:p,y:g,id:r.getId(f),timeOffset:tp()-a}),l(typeof DragEvent<"u"&&d instanceof DragEvent?Ye.Drag:d instanceof MouseEvent?Ye.MouseMove:Ye.TouchMove)}),s,{trailing:!1})),c=[dr("mousemove",u,n),dr("touchmove",u,n),dr("drag",u,n)];return gt(()=>{c.forEach(d=>d())})}function _5({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=zd(f);if(Br(p,r,s,i,!0))return;let g=null,m=d;if("pointerType"in f){switch(f.pointerType){case"mouse":g=bi.Mouse;break;case"touch":g=bi.Touch;break;case"pen":g=bi.Pen;break}g===bi.Touch?ir[d]===ir.MouseDown?m="TouchStart":ir[d]===ir.MouseUp&&(m="TouchEnd"):bi.Pen}else fy(f)&&(g=bi.Touch);g!==null?(u=g,(m.startsWith("Touch")&&g===bi.Touch||m.startsWith("Mouse")&&g===bi.Mouse)&&(g=null)):ir[d]===ir.Click&&(g=u,u=null);const y=fy(f)?f.changedTouches[0]:f;if(!y)return;const b=n.getId(p),{clientX:w,clientY:S}=y;gt(e)({type:ir[m],id:b,x:w,y:S,...g!==null&&{pointerType:g}})};return Object.keys(ir).filter(d=>Number.isNaN(Number(d))&&!d.endsWith("_Departed")&&a[d]!==!1).forEach(d=>{let f=au(d);const p=c(d);if(window.PointerEvent)switch(ir[d]){case ir.MouseDown:case ir.MouseUp:f=f.replace("mouse","pointer");break;case ir.TouchStart:case ir.TouchEnd:return}l.push(dr(f,p,t))}),gt(()=>{l.forEach(d=>d())})}function mI({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,sampling:o}){const a=gt(Xc(gt(l=>{const u=zd(l);if(!u||Br(u,r,s,i,!0))return;const c=n.getId(u);if(u===t&&t.defaultView){const d=sI(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 dr("scroll",a,t)}function k5({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const s=gt(Xc(gt(()=>{const i=iI(),o=oI();(n!==i||r!==o)&&(e({width:Number(o),height:Number(i)}),n=i,r=o)}),200));return dr("resize",s,t)}const x5=["INPUT","TEXTAREA","SELECT"],C0=new WeakMap;function E5({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:g,unmaskTextSelector:m}){function y(T){let x=zd(T);const E=T.isTrusted,P=x&&cy(x.tagName);if(P==="OPTION"&&(x=x.parentElement),!x||!P||x5.indexOf(P)<0||Br(x,r,s,i,!0))return;const M=x;if(M.classList.contains(o)||a&&M.matches(a))return;const O=mw(x);let A=Zh(M,P,O),D=!1;const H=cm({maskInputOptions:l,tagName:P,type:O}),z=lu(x,f,g,p,m,H);(O==="radio"||O==="checkbox")&&(D=x.checked),A=Kc({isMasked:z,element:x,value:A,maskInputFn:u}),b(x,d?{text:A,isChecked:D,userTriggered:E}:{text:A,isChecked:D});const Y=x.name;O==="radio"&&Y&&D&&t.querySelectorAll(`input[type="radio"][name="${Y}"]`).forEach(q=>{if(q!==x){const V=Kc({isMasked:z,element:q,value:Zh(q,P,O),maskInputFn:u});b(q,d?{text:V,isChecked:!D,userTriggered:!1}:{text:V,isChecked:!D})}})}function b(T,x){const E=C0.get(T);if(!E||E.text!==x.text||E.isChecked!==x.isChecked){C0.set(T,x);const P=n.getId(T);gt(e)({...x,id:P})}}const S=(c.input==="last"?["change"]:["input","change"]).map(T=>dr(T,gt(y),t)),C=t.defaultView;if(!C)return()=>{S.forEach(T=>T())};const _=C.Object.getOwnPropertyDescriptor(C.HTMLInputElement.prototype,"value"),R=[[C.HTMLInputElement.prototype,"value"],[C.HTMLInputElement.prototype,"checked"],[C.HTMLSelectElement.prototype,"value"],[C.HTMLTextAreaElement.prototype,"value"],[C.HTMLSelectElement.prototype,"selectedIndex"],[C.HTMLOptionElement.prototype,"selected"]];return _&&_.set&&S.push(...R.map(T=>rI(T[0],T[1],{set(){gt(y)({target:this,isTrusted:!1})}},!1,C))),gt(()=>{S.forEach(T=>T())})}function np(e){const t=[];function n(r,s){if(Sf("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Sf("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Sf("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Sf("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 ro(e,t,n){let r,s;return e?(e.ownerNode?r=t.getId(e.ownerNode):s=n.getId(e),{styleId:s,id:r}):{}}function C5({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:gt((c,d,f)=>{const[p,g]=f,{id:m,styleId:y}=ro(d,t,n.styleMirror);return(m&&m!==-1||y&&y!==-1)&&e({id:m,styleId:y,adds:[{rule:p,index:g}]}),c.apply(d,f)})});const i=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:gt((c,d,f)=>{const[p]=f,{id:g,styleId:m}=ro(d,t,n.styleMirror);return(g&&g!==-1||m&&m!==-1)&&e({id:g,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:gt((c,d,f)=>{const[p]=f,{id:g,styleId:m}=ro(d,t,n.styleMirror);return(g&&g!==-1||m&&m!==-1)&&e({id:g,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:gt((c,d,f)=>{const[p]=f,{id:g,styleId:m}=ro(d,t,n.styleMirror);return(g&&g!==-1||m&&m!==-1)&&e({id:g,styleId:m,replaceSync:p}),c.apply(d,f)})}));const l={};_f("CSSGroupingRule")?l.CSSGroupingRule=r.CSSGroupingRule:(_f("CSSMediaRule")&&(l.CSSMediaRule=r.CSSMediaRule),_f("CSSConditionRule")&&(l.CSSConditionRule=r.CSSConditionRule),_f("CSSSupportsRule")&&(l.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(l).forEach(([c,d])=>{u[c]={insertRule:d.prototype.insertRule,deleteRule:d.prototype.deleteRule},d.prototype.insertRule=new Proxy(u[c].insertRule,{apply:gt((f,p,g)=>{const[m,y]=g,{id:b,styleId:w}=ro(p.parentStyleSheet,t,n.styleMirror);return(b&&b!==-1||w&&w!==-1)&&e({id:b,styleId:w,adds:[{rule:m,index:[...np(p),y||0]}]}),f.apply(p,g)})}),d.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:gt((f,p,g)=>{const[m]=g,{id:y,styleId:b}=ro(p.parentStyleSheet,t,n.styleMirror);return(y&&y!==-1||b&&b!==-1)&&e({id:y,styleId:b,removes:[{index:[...np(p),m]}]}),f.apply(p,g)})})}),gt(()=>{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 gI({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"?bs([n,"access",o=>o.defaultView,"optionalAccess",o=>o.Document]):bs([n,"access",o=>o.ownerDocument,"optionalAccess",o=>o.defaultView,"optionalAccess",o=>o.ShadowRoot]),i=bs([s,"optionalAccess",o=>o.prototype])?Object.getOwnPropertyDescriptor(bs([s,"optionalAccess",o=>o.prototype]),"adoptedStyleSheets"):void 0;return r===null||r===-1||!s||!i?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get(){return bs([i,"access",o=>o.get,"optionalAccess",o=>o.call,"call",o=>o(this)])},set(o){const a=bs([i,"access",l=>l.set,"optionalAccess",l=>l.call,"call",l=>l(this,o)]);if(r!==null&&r!==-1)try{t.adoptStyleSheets(o,r)}catch{}return a}}),gt(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))}function T5({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:s}){const i=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:gt((a,l,u)=>{const[c,d,f]=u;if(n.has(c))return i.apply(l,[c,d,f]);const{id:p,styleId:g}=ro(bs([l,"access",m=>m.parentRule,"optionalAccess",m=>m.parentStyleSheet]),t,r.styleMirror);return(p&&p!==-1||g&&g!==-1)&&e({id:p,styleId:g,set:{property:c,value:d,priority:f},index:np(l.parentRule)}),a.apply(l,u)})});const o=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:gt((a,l,u)=>{const[c]=u;if(n.has(c))return o.apply(l,[c]);const{id:d,styleId:f}=ro(bs([l,"access",p=>p.parentRule,"optionalAccess",p=>p.parentStyleSheet]),t,r.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,remove:{property:c},index:np(l.parentRule)}),a.apply(l,u)})}),gt(()=>{s.CSSStyleDeclaration.prototype.setProperty=i,s.CSSStyleDeclaration.prototype.removeProperty=o})}function R5({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:s,sampling:i,doc:o}){const a=gt(u=>Xc(gt(c=>{const d=zd(c);if(!d||Br(d,t,n,r,!0))return;const{currentTime:f,volume:p,muted:g,playbackRate:m}=d;e({type:u,id:s.getId(d),currentTime:f,volume:p,muted:g,playbackRate:m})}),i.media||500)),l=[dr("play",a(0),o),dr("pause",a(1),o),dr("seeked",a(2),o),dr("volumechange",a(3),o),dr("ratechange",a(4),o)];return gt(()=>{l.forEach(u=>u())})}function P5({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=vw(t.fonts,"add",function(a){return function(l){return fm(gt(()=>{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),gt(()=>{r.forEach(a=>a())})}function I5(e){const{doc:t,mirror:n,blockClass:r,blockSelector:s,unblockSelector:i,selectionCb:o}=e;let a=!0;const l=gt(()=>{const u=t.getSelection();if(!u||a&&bs([u,"optionalAccess",f=>f.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:g,startOffset:m,endContainer:y,endOffset:b}=p;Br(g,r,s,i,!0)||Br(y,r,s,i,!0)||c.push({start:n.getId(g),startOffset:m,end:n.getId(y),endOffset:b})}o({ranges:c})});return l(),dr("selectionchange",l)}function A5({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:vw(n.customElements,"define",function(s){return function(i,o,a){try{t({define:{name:i}})}catch{}return s.apply(this,[i,o,a])}})}function O5(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=pI(e,e.doc));const s=S5(e),i=_5(e),o=mI(e),a=k5(e,{win:n}),l=E5(e),u=R5(e);let c=()=>{},d=()=>{},f=()=>{},p=()=>{};e.recordDOM&&(c=C5(e,{win:n}),d=gI(e,e.doc),f=T5(e,{win:n}),e.collectFonts&&(p=P5(e)));const g=I5(e),m=A5(e),y=[];for(const b of e.plugins)y.push(b.observer(b.callback,n,b.options));return gt(()=>{kl.forEach(b=>b.reset()),bs([r,"optionalAccess",b=>b.disconnect,"call",b=>b()]),s(),i(),o(),a(),l(),u(),c(),d(),f(),p(),g(),m(),y.forEach(b=>b())})}function Sf(e){return typeof window[e]<"u"}function _f(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class my{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}}function T0(e){let t,n=e[0],r=1;for(;r<e.length;){const s=e[r],i=e[r+1];if(r+=2,(s==="optionalAccess"||s==="optionalCall")&&n==null)return;s==="access"||s==="optionalAccess"?(t=n,n=i(n)):(s==="call"||s==="optionalCall")&&(n=i((...o)=>n.call(t,...o)),t=void 0)}return n}class M5{constructor(){this.crossOriginIframeMirror=new my(gw),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class D5{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new my(gw),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new my(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}),T0([this,"access",r=>r.loadListener,"optionalCall",r=>r(t)]),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}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 it.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:it.IncrementalSnapshot,data:{source:Ye.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case it.Meta:case it.Load:case it.DomContentLoaded:return!1;case it.Plugin:return n;case it.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case it.IncrementalSnapshot:switch(n.data.source){case Ye.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 Ye.Drag:case Ye.TouchMove:case Ye.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case Ye.ViewportResize:return!1;case Ye.MediaInteraction:case Ye.MouseInteraction:case Ye.Scroll:case Ye.CanvasMutation:case Ye.Input:return this.replaceIds(n.data,t,["id"]),n;case Ye.StyleSheetRule:case Ye.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case Ye.Font:return n;case Ye.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,t,["start","end"])}),n;case Ye.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),T0([n,"access",r=>r.data,"access",r=>r.styles,"optionalAccess",r=>r.forEach,"call",r=>r(s=>{this.replaceStyleIds(s,t,["styleId"])})]),n}}return!1}replace(t,n,r,s){for(const i of s)!Array.isArray(n[i])&&typeof n[i]!="number"||(Array.isArray(n[i])?n[i]=t.getIds(r,n[i]):n[i]=t.getId(r,n[i]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(t,n){t.type!==wn.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class $5{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class L5{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(!kc(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const r=pI({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(mI({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),fm(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(gI({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(vw(t.prototype,"attachShadow",function(s){return function(i){const o=s.call(this,i);return this.shadowRoot&&fI(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()}}class R0{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class F5{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new c5,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:XP(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 N5{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,h5(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}destroy(){}}let ln,rp;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=ih([e,"access",t=>t.contentWindow,"optionalAccess",t=>t.Array,"access",t=>t.from])||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const gs=N4();function Oi(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:g=!0,maskAllInputs:m,maskInputOptions:y,slimDOMOptions:b,maskAttributeFn:w,maskInputFn:S,maskTextFn:C,maxCanvasSize:_=null,packFn:R,sampling:T={},dataURLOptions:x={},mousemoveWait:E,recordDOM:P=!0,recordCanvas:M=!1,recordCrossOriginIframes:O=!1,recordAfter:A=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:D=!1,collectFonts:H=!1,inlineImages:z=!1,plugins:Y,keepIframeSrcFn:q=()=>!1,ignoreCSSAttributes:V=new Set([]),errorHandler:G,onMutation:te,getCanvasManager:W}=e;b5(G);const J=O?window.parent===window:!0;let pe=!1;if(!J)try{window.parent.document&&(pe=!1)}catch{pe=!0}if(J&&!t)throw new Error("emit function is required");if(!J&&!pe)return()=>{};E!==void 0&&T.mousemove===void 0&&(T.mousemove=E),gs.reset();const ae=m===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:y!==void 0?y:{},oe=b===!0||b==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:b==="all",headMetaDescKeywords:b==="all"}:b||{};u5();let ee,me=0;const ne=be=>{for(const _e of Y||[])_e.eventProcessor&&(be=_e.eventProcessor(be));return R&&!pe&&(be=R(be)),be};ln=(be,_e)=>{const fe=be;if(fe.timestamp=tp(),ih([kl,"access",Ie=>Ie[0],"optionalAccess",Ie=>Ie.isFrozen,"call",Ie=>Ie()])&&fe.type!==it.FullSnapshot&&!(fe.type===it.IncrementalSnapshot&&fe.data.source===Ye.Mutation)&&kl.forEach(Ie=>Ie.unfreeze()),J)ih([t,"optionalCall",Ie=>Ie(ne(fe),_e)]);else if(pe){const Ie={type:"rrweb",event:ne(fe),origin:window.location.origin,isCheckout:_e};window.parent.postMessage(Ie,"*")}if(fe.type===it.FullSnapshot)ee=fe,me=0;else if(fe.type===it.IncrementalSnapshot){if(fe.data.source===Ye.Mutation&&fe.data.isAttachIframe)return;me++;const Ie=r&&me>=r,Se=n&&ee&&fe.timestamp-ee.timestamp>n;(Ie||Se)&&Ee(!0)}};const U=be=>{ln({type:it.IncrementalSnapshot,data:{source:Ye.Mutation,...be}})},Fe=be=>ln({type:it.IncrementalSnapshot,data:{source:Ye.Scroll,...be}}),at=be=>ln({type:it.IncrementalSnapshot,data:{source:Ye.CanvasMutation,...be}}),F=be=>ln({type:it.IncrementalSnapshot,data:{source:Ye.AdoptedStyleSheet,...be}}),N=new F5({mutationCb:U,adoptedStyleSheetCb:F}),K=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new M5:new D5({mirror:gs,mutationCb:U,stylesheetManager:N,recordCrossOriginIframes:O,wrappedEmit:ln});for(const be of Y||[])be.getMirror&&be.getMirror({nodeMirror:gs,crossOriginIframeMirror:K.crossOriginIframeMirror,crossOriginIframeStyleMirror:K.crossOriginIframeStyleMirror});const de=new N5,le=B5(W,{mirror:gs,win:window,mutationCb:be=>ln({type:it.IncrementalSnapshot,data:{source:Ye.CanvasMutation,...be}}),recordCanvas:M,blockClass:s,blockSelector:i,unblockSelector:o,maxCanvasSize:_,sampling:T.canvas,dataURLOptions:x,errorHandler:G}),we=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new $5:new L5({mutationCb:U,scrollCb:Fe,bypassOptions:{onMutation:te,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:c,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:g,maskInputOptions:ae,dataURLOptions:x,maskAttributeFn:w,maskTextFn:C,maskInputFn:S,recordCanvas:M,inlineImages:z,sampling:T,slimDOMOptions:oe,iframeManager:K,stylesheetManager:N,canvasManager:le,keepIframeSrcFn:q,processedNodeManager:de},mirror:gs}),Ee=(be=!1)=>{if(!P)return;ln({type:it.Meta,data:{href:window.location.href,width:oI(),height:iI()}},be),N.reset(),we.init(),kl.forEach(fe=>fe.lock());const _e=a5(document,{mirror:gs,blockClass:s,blockSelector:i,unblockSelector:o,maskAllText:u,maskTextClass:c,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:g,maskAllInputs:ae,maskAttributeFn:w,maskInputFn:S,maskTextFn:C,slimDOM:oe,dataURLOptions:x,recordCanvas:M,inlineImages:z,onSerialize:fe=>{uI(fe,gs)&&K.addIframe(fe),cI(fe,gs)&&N.trackLinkElement(fe),hy(fe)&&we.addShadowRoot(fe.shadowRoot,document)},onIframeLoad:(fe,Ie)=>{K.attachIframe(fe,Ie),fe.contentWindow&&le.addWindow(fe.contentWindow),we.observeAttachShadow(fe)},onStylesheetLoad:(fe,Ie)=>{N.attachLinkElement(fe,Ie)},keepIframeSrcFn:q});if(!_e)return console.warn("Failed to snapshot the document");ln({type:it.FullSnapshot,data:{node:_e,initialOffset:sI(window)}}),kl.forEach(fe=>fe.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&N.adoptStyleSheets(document.adoptedStyleSheets,gs.getId(document))};rp=Ee;try{const be=[],_e=Ie=>gt(O5)({onMutation:te,mutationCb:U,mousemoveCb:(Se,$e)=>ln({type:it.IncrementalSnapshot,data:{source:$e,positions:Se}}),mouseInteractionCb:Se=>ln({type:it.IncrementalSnapshot,data:{source:Ye.MouseInteraction,...Se}}),scrollCb:Fe,viewportResizeCb:Se=>ln({type:it.IncrementalSnapshot,data:{source:Ye.ViewportResize,...Se}}),inputCb:Se=>ln({type:it.IncrementalSnapshot,data:{source:Ye.Input,...Se}}),mediaInteractionCb:Se=>ln({type:it.IncrementalSnapshot,data:{source:Ye.MediaInteraction,...Se}}),styleSheetRuleCb:Se=>ln({type:it.IncrementalSnapshot,data:{source:Ye.StyleSheetRule,...Se}}),styleDeclarationCb:Se=>ln({type:it.IncrementalSnapshot,data:{source:Ye.StyleDeclaration,...Se}}),canvasMutationCb:at,fontCb:Se=>ln({type:it.IncrementalSnapshot,data:{source:Ye.Font,...Se}}),selectionCb:Se=>{ln({type:it.IncrementalSnapshot,data:{source:Ye.Selection,...Se}})},customElementCb:Se=>{ln({type:it.IncrementalSnapshot,data:{source:Ye.CustomElement,...Se}})},blockClass:s,ignoreClass:a,ignoreSelector:l,maskAllText:u,maskTextClass:c,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,maskInputOptions:ae,inlineStylesheet:g,sampling:T,recordDOM:P,recordCanvas:M,inlineImages:z,userTriggeredOnInput:D,collectFonts:H,doc:Ie,maskAttributeFn:w,maskInputFn:S,maskTextFn:C,keepIframeSrcFn:q,blockSelector:i,unblockSelector:o,slimDOMOptions:oe,dataURLOptions:x,mirror:gs,iframeManager:K,stylesheetManager:N,shadowDomManager:we,processedNodeManager:de,canvasManager:le,ignoreCSSAttributes:V,plugins:ih([Y,"optionalAccess",Se=>Se.filter,"call",Se=>Se($e=>$e.observer),"optionalAccess",Se=>Se.map,"call",Se=>Se($e=>({observer:$e.observer,options:$e.options,callback:We=>ln({type:it.Plugin,data:{plugin:$e.name,payload:We}})}))])||[]},{});K.addLoadListener(Ie=>{try{be.push(_e(Ie.contentDocument))}catch(Se){console.warn(Se)}});const fe=()=>{Ee(),be.push(_e(document))};return document.readyState==="interactive"||document.readyState==="complete"?fe():(be.push(dr("DOMContentLoaded",()=>{ln({type:it.DomContentLoaded,data:{}}),A==="DOMContentLoaded"&&fe()})),be.push(dr("load",()=>{ln({type:it.Load,data:{}}),A==="load"&&fe()},window))),()=>{be.forEach(Ie=>Ie()),de.destroy(),rp=void 0,w5()}}catch(be){console.warn(be)}}function V5(e){if(!rp)throw new Error("please take full snapshot after start recording");rp(e)}Oi.mirror=gs;Oi.takeFullSnapshot=V5;function B5(e,t){try{return e?e(t):new R0}catch{return console.warn("Unable to initialize CanvasManager"),new R0}}const U5=3,H5=5;function bw(e){return e>9999999999?e:e*1e3}function xg(e){return e>9999999999?e/1e3:e}function jd(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:it.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:Js(t,10,1e3)}}),t.category==="console")))}const z5="button,a";function vI(e){return e.closest(z5)||e}function yI(e){const t=bI(e);return!t||!(t instanceof Element)?t:vI(t)}function bI(e){return j5(e)?e.target:e}function j5(e){return typeof e=="object"&&!!e&&"target"in e}let so;function q5(e){return so||(so=[],W5()),so.push(e),()=>{const t=so?so.indexOf(e):-1;t>-1&&so.splice(t,1)}}function W5(){Cr(Ht,"open",function(e){return function(...t){if(so)try{so.forEach(n=>n())}catch{}return e.apply(Ht,t)}})}const G5=new Set([Ye.Mutation,Ye.StyleSheetRule,Ye.StyleDeclaration,Ye.AdoptedStyleSheet,Ye.CanvasMutation,Ye.Selection,Ye.MediaInteraction]);function K5(e,t,n){e.handleClick(t,n)}class Y5{constructor(t,n,r=jd){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=q5(()=>{this._lastMutation=P0()});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(Q5(n,this._ignoreSelector)||!J5(t))return;const r={timestamp:xg(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=xg(t)}registerScroll(t=Date.now()){this._lastScroll=xg(t)}registerClick(t){const n=vI(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=P0();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:Ht.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:Ht.location.href,route:n.getCurrentRoute(),clickCount:o,metric:!0}};this._addBreadcrumbEvent(n,l)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=ou(()=>this._checkClicks(),1e3)}}const X5=["A","BUTTON","INPUT"];function Q5(e,t){return!!(!X5.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 J5(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function P0(){return Date.now()/1e3}function Z5(e,t){try{if(!ej(t))return;const{source:n}=t.data;if(G5.has(n)&&e.registerMutation(t.timestamp),n===Ye.Scroll&&e.registerScroll(t.timestamp),tj(t)){const{type:r,id:s}=t.data,i=Oi.mirror.getNode(s);i instanceof HTMLElement&&r===ir.Click&&e.registerClick(i)}}catch{}}function ej(e){return e.type===U5}function tj(e){return e.data.source===Ye.MouseInteraction}function ni(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var sp;(function(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"})(sp||(sp={}));const nj=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function rj(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(nj.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}const sj=e=>t=>{if(!e.isEnabled())return;const n=ij(t);if(!n)return;const r=t.name==="click",s=r?t.event:void 0;r&&e.clickDetector&&s&&s.target&&!s.altKey&&!s.metaKey&&!s.ctrlKey&&!s.shiftKey&&K5(e.clickDetector,n,yI(t.event)),jd(e,n)};function wI(e,t){const n=Oi.mirror.getId(e),r=n&&Oi.mirror.getNode(n),s=r&&Oi.mirror.getMeta(r),i=s&&aj(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===sp.Text&&o.textContent).filter(Boolean).map(o=>o.trim()).join(""),attributes:rj(i.attributes)}}:{}}}function ij(e){const{target:t,message:n}=oj(e);return ni({category:`ui.${e.name}`,...wI(t,n)})}function oj(e){const t=e.name==="click";let n,r=null;try{r=t?yI(e.event):bI(e.event),n=Fi(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function aj(e){return e.type===sp.Element}function lj(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=uj(t);n&&jd(e,n)}function uj(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:i,target:o}=e;if(!o||cj(o)||!i)return null;const a=t||r||s,l=i.length===1;if(!a&&l)return null;const u=Fi(o,{maxStringLength:200})||"<unknown>",c=wI(o,u);return ni({category:"ui.keyDown",message:u,data:{...c.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:s,key:i}})}function cj(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const dj={resource:gj,paint:pj,navigation:mj};function kf(e,t){return({metric:n})=>void t.replayPerformanceEntries.push(e(n))}function fj(e){return e.map(hj).filter(Boolean)}function hj(e){const t=dj[e.entryType];return t?t(e):null}function uu(e){return((pr||Ht.performance.timeOrigin)+e)/1e3}function pj(e){const{duration:t,entryType:n,name:r,startTime:s}=e,i=uu(s);return{type:n,name:r,start:i,end:i+t,data:void 0}}function mj(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:g,type:m}=e;return s===0?null:{type:`${t}.${m}`,start:uu(p),end:uu(i),name:n,data:{size:g,decodedBodySize:r,encodedBodySize:o,duration:s,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:l,loadEventStart:c,loadEventEnd:d,domComplete:i,redirectCount:f}}}function gj(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:uu(i),end:uu(s),name:r,data:{size:u,statusCode:l,decodedBodySize:o,encodedBodySize:a}}}function vj(e){const t=e.entries[e.entries.length-1],n=t&&t.element?[t.element]:void 0;return hm(e,"largest-contentful-paint",n)}function yj(e){return e.sources!==void 0}function bj(e){const t=[],n=[];for(const r of e.entries)if(yj(r)){const s=[];for(const i of r.sources)if(i.node){n.push(i.node);const o=Oi.mirror.getId(i.node);o&&s.push(o)}t.push({value:r.value,nodeIds:s.length?s:void 0})}return hm(e,"cumulative-layout-shift",n,t)}function wj(e){const t=e.entries[e.entries.length-1],n=t&&t.target?[t.target]:void 0;return hm(e,"first-input-delay",n)}function Sj(e){const t=e.entries[e.entries.length-1],n=t&&t.target?[t.target]:void 0;return hm(e,"interaction-to-next-paint",n)}function hm(e,t,n,r){const s=e.value,i=e.rating,o=uu(s);return{type:"web-vital",name:t,start:o,end:o,data:{value:s,size:s,rating:i,nodeIds:n?n.map(a=>Oi.mirror.getId(a)):void 0,attributions:r}}}function _j(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(iu(s,n))}),r.push(NP(kf(vj,e)),cw(kf(bj,e)),VP(kf(wj,e)),BP(kf(Sj,e))),()=>{r.forEach(s=>s())}}const qe=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,kj='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]),a=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,e){for(var i=new n(31),a=0;a<31;++a)i[a]=e+=1<<t[a-1];var s=new r(i[30]);for(a=1;a<30;++a)for(var o=i[a];o<i[a+1];++o)s[o]=o-i[a]<<5|a;return{b:i,r:s}},o=s(e,2),f=o.b,h=o.r;f[28]=258,h[258]=28;for(var l=s(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,a=0,s=new n(r);a<i;++a)t[a]&&++s[t[a]-1];var o,f=new n(r);for(a=1;a<r;++a)f[a]=f[a-1]+s[a-1]<<1;if(e){o=new n(1<<r);var h=15-r;for(a=0;a<i;++a)if(t[a])for(var l=a<<4|t[a],c=r-t[a],v=f[t[a]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>h]=l}else for(o=new n(i),a=0;a<i;++a)t[a]&&(o[a]=u[f[t[a]-1]++]>>15-t[a]);return o},g=new t(288);for(c=0;c<144;++c)g[c]=8;for(c=144;c<256;++c)g[c]=9;for(c=256;c<280;++c)g[c]=7;for(c=280;c<288;++c)g[c]=8;var w=new t(32);for(c=0;c<32;++c)w[c]=5;var p=d(g,9,0),y=d(w,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=[],a=0;a<r.length;++a)r[a]&&i.push({s:a,f:r[a]});var s=i.length,o=i.slice();if(!s)return{t:F,l:0};if(1==s){var f=new t(i[0].s+1);return f[i[0].s]=1,{t:f,l:1}}i.sort((function(t,n){return t.f-n.f})),i.push({s:-1,f:25001});var h=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:h.f+l.f,l:h,r:l};c!=s-1;)h=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:h.f+l.f,l:h,r:l};var d=o[0].s;for(a=1;a<s;++a)o[a].s>d&&(d=o[a].s);var g=new n(d+1),w=A(i[c-1],g,0);if(w>e){a=0;var p=0,y=w-e,m=1<<y;for(o.sort((function(t,n){return g[n.s]-g[t.s]||t.f-n.f}));a<s;++a){var b=o[a].s;if(!(g[b]>e))break;p+=m-(1<<w-g[b]),g[b]=e}for(p>>=y;p>0;){var M=o[a].s;g[M]<e?p-=1<<e-g[M]++-1:++a}for(;a>=0&&p;--a){var E=o[a].s;g[E]==e&&(--g[E],++p)}w=e}return{t:new t(g),l:w}},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,a=t[0],s=1,o=function(t){e[i++]=t},f=1;f<=r;++f)if(t[f]==a&&f!=r)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=t[f]}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 a=0;a<e;++a)t[i+a+4]=r[a];return 8*(i+4+e)},U=function(t,r,s,o,f,h,l,u,c,v,m){z(r,m++,s),++f[256];for(var b=x(f,15),M=b.t,E=b.l,A=x(h,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[a[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(f,g)+T(h,w)+l,X=T(f,M)+T(h,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[a[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=p,P=g,Q=y,R=w;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;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}}},L=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,a=0|r.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s<o;++s)i+=e+=r[s];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}}},O=function(a,s,o,f,u){if(!u&&(u={l:1},s.dictionary)){var c=s.dictionary.subarray(-32768),v=new t(c.length+a.length);v.set(c),v.set(a,c.length),a=v,u.w=c.length}return function(a,s,o,f,u,c){var v=c.z||a.length,d=new t(f+v+5*(1+Math.ceil(v/7e3))+u),g=d.subarray(f,d.length-u),w=c.l,p=7&(c.r||0);if(s){p&&(g[0]=c.r>>3);for(var y=C[s-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(a[t]^a[t+1]<<A^a[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||!w)){p=U(a,g,0,F,I,S,O,q,G,j-G,p),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(a[j+Q]==a[j+Q-W]){for(var $=0;$<Z&&a[j+$]==a[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|h[Q]<<18|l[R];var it=31&h[Q],at=31&l[R];O+=e[it]+i[at],++I[257+it],++S[at],B=j+Q,++L}else F[q++]=a[j],++I[a[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=a[j],++I[a[j]];p=U(a,g,w,F,I,S,O,q,G,j-G,p),w||(c.r=7&p|g[p/8|0]<<3,p-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+w;j+=65535){var st=j+65535;st>=v&&(g[p/8|0]=w,st=v),p=k(g,p+1,a.subarray(j,st))}c.i=v}return b(d,0,f+m(p)+u)}(a,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o,f,u)},j=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},q=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&&j(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)}},B=function(t){return 10+(t.filename?t.filename.length+1:0)},G=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(O(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 a=this.b.length-this.s.z;a&&(this.b.set(n.subarray(0,a),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(a),32768),this.s.z=n.length-a+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}();var H=function(){function t(t,n){this.c=L(),this.v=1,G.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),G.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=O(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=L();i.p(n.dictionary),j(t,2,i.d())}}(r,this.o),this.v=0),n&&j(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),J="undefined"!=typeof TextEncoder&&new TextEncoder,K="undefined"!=typeof TextDecoder&&new TextDecoder;try{K.decode(F,{stream:!0})}catch(t){}var N=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(P(t),this.d=n||!1)},t}();function P(n,r){if(J)return J.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),a=0,s=function(t){i[a++]=t},o=0;o<e;++o){if(a+5>i.length){var f=new t(a+8+(e-o<<1));f.set(i),i=f}var h=n.charCodeAt(o);h<128||r?s(h):h<2048?(s(192|h>>6),s(128|63&h)):h>55295&&h<57344?(s(240|(h=65536+(1047552&h)|1023&n.charCodeAt(++o))>>18),s(128|h>>12&63),s(128|h>>6&63),s(128|63&h)):(s(224|h>>12),s(128|h>>6&63),s(128|63&h))}return b(i,0,a)}function Q(t){return function(t,n){n||(n={});var r=S(),e=t.length;r.p(t);var i=O(t,n,B(n),8),a=i.length;return q(i,n),j(i,a-8,r.d()),j(i,a-4,e),i}(P(t))}const R=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 H,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new N(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},V={clear:()=>{R.clear()},addEvent:t=>R.addEvent(t),finish:()=>R.finish(),compress:t=>Q(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in V&&"function"==typeof V[n])try{const t=V[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 xj(){const e=new Blob([kj]);return URL.createObjectURL(e)}const I0=["info","warn","error","log"],lh="[Replay] ";function Eg(e,t="info"){Ao({category:"console",data:{logger:"replay"},level:t,message:`${lh}${e}`},{level:t})}function Ej(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:r=>{e=r.captureExceptions,t=r.traceInternals}};return qe?(I0.forEach(r=>{n[r]=(...s)=>{Re[r](lh,...s),t&&Eg(s.join(""),_P(r))}}),n.exception=(r,...s)=>{s.length&&n.error&&n.error(...s),Re.error(lh,r),e?si(r):t&&Eg(r,"error")},n.infoTick=(...r)=>{Re.info(lh,...r),t&&setTimeout(()=>Eg(r[0]),0)}):I0.forEach(r=>{n[r]=()=>{}}),n}const Ge=Ej();class ww extends Error{constructor(){super(`Event buffer exceeded maximum size of ${pw}.`)}}class SI{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>pw)throw new ww;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?bw(t):null}}class Cj{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&&Ge.info("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&&Ge.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 Tj{constructor(t){this._worker=new Cj(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=bw(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>pw?Promise.reject(new ww):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&&Ge.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 Rj{constructor(t){this._fallback=new SI,this._compression=new Tj(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&&Ge.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&&Ge.exception(i,"Failed to add events when switching buffers.")}}}function Pj({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=Ij(t);if(n)return n}return qe&&Ge.info("Using simple buffer"),new SI}function Ij(e){try{const t=e||Aj();if(!t)return;qe&&Ge.info(`Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new Rj(n)}catch(t){qe&&Ge.exception(t,"Failed to create compression worker")}}function Aj(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?xj():""}function Sw(){try{return"sessionStorage"in Ht&&!!Ht.sessionStorage}catch{return!1}}function Oj(e){Mj(),e.session=void 0}function Mj(){if(Sw())try{Ht.sessionStorage.removeItem(fw)}catch{}}function _I(e){return e===void 0?!1:Math.random()<e}function kI(e){const t=Date.now(),n=e.id||Cn(),r=e.started||t,s=e.lastActivity||t,i=e.segmentId||0,o=e.sampled,a=e.previousSessionId;return{id:n,started:r,lastActivity:s,segmentId:i,sampled:o,previousSessionId:a}}function _w(e){if(Sw())try{Ht.sessionStorage.setItem(fw,JSON.stringify(e))}catch{}}function Dj(e,t){return _I(e)?"session":t?"buffer":!1}function A0({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const s=Dj(e,t),i=kI({sampled:s,previousSessionId:r});return n&&_w(i),i}function $j(){if(!Sw())return null;try{const e=Ht.sessionStorage.getItem(fw);if(!e)return null;const t=JSON.parse(e);return qe&&Ge.infoTick("Loading existing session"),kI(t)}catch{return null}}function gy(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function xI(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return gy(e.started,t,r)||gy(e.lastActivity,n,r)}function EI(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!xI(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function Cg({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const s=r.stickySession&&$j();return s?EI(s,{sessionIdleExpire:e,maxReplayDuration:t})?(qe&&Ge.infoTick("Session in sessionStorage is expired, creating new one..."),A0(r,{previousSessionId:s.id})):s:(qe&&Ge.infoTick("Creating new session"),A0(r,{previousSessionId:n}))}function Lj(e){return e.type===it.Custom}function kw(e,t,n){return TI(e,t)?(CI(e,t,n),!0):!1}function Fj(e,t,n){return TI(e,t)?CI(e,t,n):Promise.resolve(null)}async function CI(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=Nj(t,i.beforeAddRecordingEvent);return o?await r.addEvent(o):void 0}catch(i){const o=i&&i instanceof ww,a=o?"addEventSizeExceeded":"addEvent";if(o&&s)return r.clear(),r.waitForCheckout=!0,null;e.handleException(i),await e.stop({reason:a});const l=dt();l&&l.recordDroppedEvent("internal_sdk_error","replay")}}function TI(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=bw(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(qe&&Ge.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function Nj(e,t){try{if(typeof t=="function"&&Lj(e))return t(e)}catch(n){return qe&&Ge.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function xw(e){return!e.type}function vy(e){return e.type==="transaction"}function Vj(e){return e.type==="replay_event"}function O0(e){return e.type==="feedback"}function Bj(e){return(t,n)=>{if(!e.isEnabled()||!xw(t)&&!vy(t))return;const r=n&&n.statusCode;if(!(!r||r<200||r>=300)){if(vy(t)){Uj(e,t);return}Hj(e,t)}}}function Uj(e,t){const n=e.getContext();t.contexts&&t.contexts.trace&&t.contexts.trace.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function Hj(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)||ou(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(s){e.handleException(s)}})}function zj(e){return t=>{!e.isEnabled()||!xw(t)||jj(e,t)}}function jj(e,t){const n=t.exception&&t.exception.values&&t.exception.values[0]&&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=ni({category:"replay.hydrate-error",data:{url:FR()}});jd(e,r)}}function qj(e){const t=dt();t&&t.on("beforeAddBreadcrumb",n=>Wj(e,n))}function Wj(e,t){if(!e.isEnabled()||!RI(t))return;const n=Gj(t);n&&jd(e,n)}function Gj(e){return!RI(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?Kj(e):ni(e)}function Kj(e){const t=e.data&&e.data.arguments;if(!Array.isArray(t)||t.length===0)return ni(e);let n=!1;const r=t.map(s=>{if(!s)return s;if(typeof s=="string")return s.length>wf?(n=!0,`${s.slice(0,wf)}…`):s;if(typeof s=="object")try{const i=Js(s,7);return JSON.stringify(i).length>wf?(n=!0,`${JSON.stringify(i,null,2).slice(0,wf)}…`):i}catch{}return s});return ni({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function RI(e){return!!e.category}function Yj(e,t){return e.type||!e.exception||!e.exception.values||!e.exception.values.length?!1:!!(t.originalException&&t.originalException.__rrweb__)}function PI(){const e=Nt().getPropagationContext().dsc;e&&delete e.replay_id;const t=bn();if(t){const n=Qa(t);delete n.replay_id}}function Xj(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:it.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 Qj(e,t){return e.recordingMode!=="buffer"||t.message===hw||!t.exception||t.type?!1:_I(e.getOptions().errorSampleRate)}function Jj(e){return Object.assign((t,n)=>!e.isEnabled()||e.isPaused()?t:Vj(t)?(delete t.breadcrumbs,t):!xw(t)&&!vy(t)&&!O0(t)?t:e.checkAndHandleExpiredSession()?O0(t)?(e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),Xj(e,t),t):Yj(t,n)&&!e.getOptions()._experiments.captureExceptions?(qe&&Ge.log("Ignoring error from rrweb internals",t),null):((Qj(e,t)||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),t):(PI(),t),{id:"Replay"})}function pm(e,t){return t.map(({type:n,start:r,end:s,name:i,data:o})=>{const a=e.throttledAddEvent({type:it.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 Zj(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 e8(e){return t=>{if(!e.isEnabled())return;const n=Zj(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(pm(e,[n]),!1)))}}function t8(e,t){return qe&&e.getOptions()._experiments.traceInternals?!1:n3(t,dt())}function II(e,t){e.isEnabled()&&t!==null&&(t8(e,t.name)||e.addUpdate(()=>(pm(e,[t]),!0)))}function mm(e){if(!e)return;const t=new TextEncoder;try{if(typeof e=="string")return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=DI(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function AI(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function OI(e){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[DI(e)];if(!e)return[void 0]}catch(t){return qe&&Ge.exception(t,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return qe&&Ge.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function ip(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 MI(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:xn({method:i,statusCode:o,request:a,response:l})}}function Qc(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function ko(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}=n8(n);return r.body=s,i&&i.length>0&&(r._meta={warnings:i}),r}function yy(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 DI(e){return new URLSearchParams(e).toString()}function n8(e){if(!e||typeof e!="string")return{body:e};const t=e.length>p0,n=r8(e);if(t){const r=e.slice(0,p0);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 r8(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function op(e,t){const n=s8(e);return _o(n,t)}function s8(e,t=Ht.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(Ht.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 i8(e,t,n){try{const r=await a8(e,t,n),s=MI("resource.fetch",r);II(n.replay,s)}catch(r){qe&&Ge.exception(r,"Failed to capture fetch breadcrumb")}}function o8(e,t){const{input:n,response:r}=t,s=n?$I(n):void 0,i=mm(s),o=r?AI(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 a8(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=op(o,n.networkDetailAllowUrls)&&!op(o,n.networkDetailDenyUrls),f=d?l8(n,t.input,u):Qc(u),p=await u8(d,n,t.response,c);return{startTimestamp:s,endTimestamp:i,url:o,method:a,statusCode:l,request:f,response:p}}function l8({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const s=n?f8(n,t):{};if(!e)return ko(s,r,void 0);const i=$I(n),[o,a]=OI(i),l=ko(s,r,o);return a?ip(l,a):l}async function u8(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,s){if(!e&&s!==void 0)return Qc(s);const i=r?LI(r.headers,n):{};if(!r||!t&&s!==void 0)return ko(i,s,void 0);const[o,a]=await d8(r),l=c8(o,{networkCaptureBodies:t,responseBodySize:s,captureDetails:e,headers:i});return a?ip(l,a):l}function c8(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:s}){try{const i=e&&e.length&&n===void 0?mm(e):n;return r?t?ko(s,i,e):ko(s,i,void 0):Qc(i)}catch(i){return qe&&Ge.exception(i,"Failed to serialize response body"),ko(s,n,void 0)}}async function d8(e){const t=h8(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await p8(t)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(qe&&Ge.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(qe&&Ge.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function $I(e=[]){if(!(e.length!==2||typeof e[1]!="object"))return e[1].body}function LI(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function f8(e,t){return e.length===1&&typeof e[0]!="string"?M0(e[0],t):e.length===2?M0(e[1],t):{}}function M0(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?LI(n,t):Array.isArray(n)?{}:yy(n,t):{}}function h8(e){try{return e.clone()}catch(t){qe&&Ge.exception(t,"Failed to clone response body")}}function p8(e){return new Promise((t,n)=>{const r=ou(()=>n(new Error("Timeout while trying to read response body")),500);m8(e).then(s=>t(s),s=>n(s)).finally(()=>clearTimeout(r))})}async function m8(e){return await e.text()}async function g8(e,t,n){try{const r=y8(e,t,n),s=MI("resource.xhr",r);II(n.replay,s)}catch(r){qe&&Ge.exception(r,"Failed to capture xhr breadcrumb")}}function v8(e,t){const{xhr:n,input:r}=t;if(!n)return;const s=mm(r),i=n.getResponseHeader("content-length")?AI(n.getResponseHeader("content-length")):_8(n.response,n.responseType);s!==void 0&&(e.data.request_body_size=s),i!==void 0&&(e.data.response_body_size=i)}function y8(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||!op(l,n.networkDetailAllowUrls)||op(l,n.networkDetailDenyUrls)){const R=Qc(d),T=Qc(f);return{startTimestamp:s,endTimestamp:i,url:l,method:u,statusCode:c,request:R,response:T}}const p=a[ca],g=p?yy(p.request_headers,n.networkRequestHeaders):{},m=yy(b8(a),n.networkResponseHeaders),[y,b]=n.networkCaptureBodies?OI(o):[void 0],[w,S]=n.networkCaptureBodies?w8(a):[void 0],C=ko(g,d,y),_=ko(m,f,w);return{startTimestamp:s,endTimestamp:i,url:l,method:u,statusCode:c,request:b?ip(C,b):C,response:S?ip(_,S):_}}function b8(e){const t=e.getAllResponseHeaders();return t?t.split(`\r
|
|
53
|
-
`).reduce((n,r)=>{const[s,i]=r.split(": ");return i&&(n[s.toLowerCase()]=i),n},{}):{}}function w8(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return S8(e.response,e.responseType)}catch(n){t.push(n)}return qe&&Ge.warn("Failed to get xhr response body",...t),[void 0]}function S8(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&&Ge.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return qe&&Ge.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function _8(e,t){try{const n=t==="json"&&e&&typeof e=="object"?JSON.stringify(e):e;return mm(n)}catch{return}}function k8(e){const t=dt();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)=>x8(a,l,u))}catch{}}function x8(e,t,n){if(t.data)try{E8(t)&&T8(n)&&(v8(t,n),g8(t,n,e)),C8(t)&&R8(n)&&(o8(t,n),i8(t,n,e))}catch(r){qe&&Ge.exception(r,"Error when enriching network breadcrumb")}}function E8(e){return e.category==="xhr"}function C8(e){return e.category==="fetch"}function T8(e){return e&&e.xhr}function R8(e){return e&&e.response}function P8(e){const t=dt();jP(sj(e)),um(e8(e)),qj(e),k8(e);const n=Jj(e);$U(n),t&&(t.on("beforeSendEvent",zj(e)),t.on("afterSendEvent",Bj(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",(r,s)=>{const i=e.getSessionId();s&&s.includeReplay&&e.isEnabled()&&i&&r.contexts&&r.contexts.feedback&&(r.contexts.feedback.replay_id=i)}))}async function I8(e){try{return Promise.all(pm(e,[A8(Ht.performance.memory)]))}catch{return[]}}function A8(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 O8(e,t,n){let r,s,i;const o=n&&n.maxWait?Math.max(n.maxWait,t):0;function a(){return l(),r=e(),r}function l(){s!==void 0&&clearTimeout(s),i!==void 0&&clearTimeout(i),s=i=void 0}function u(){return s!==void 0||i!==void 0?a():r}function c(){return s&&clearTimeout(s),s=ou(a,t),o&&i===void 0&&(i=ou(a,o)),r}return c.cancel=l,c.flush=u,c}function M8(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){qe&&Ge.warn("Received replay event after session expired.");return}const s=r||!t;t=!0,e.clickDetector&&Z5(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&s&&e.setInitialState(),!kw(e,n,s))return!0;if(!s)return!1;const i=e.session;if($8(e,s),e.recordingMode==="buffer"&&i&&e.eventBuffer){const o=e.eventBuffer.getEarliestTimestamp();o&&(qe&&Ge.info(`Updating session start time to earliest event in buffer to ${new Date(o)}`),i.started=o,e.getOptions().stickySession&&_w(i))}return i&&i.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}}function D8(e){const t=e.getOptions();return{type:it.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 $8(e,t){!t||!e.session||e.session.segmentId!==0||kw(e,D8(e),!1)}function L8(e,t,n,r){return Ja(aP(e,sw(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function F8({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}
|
|
54
|
-
`;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 N8({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 fP(e.getOptions(),r,i,t,e,fi());if(!o)return null;o.platform=o.platform||"javascript";const a=e.getSdkMetadata(),{name:l,version:u}=a&&a.sdk||{};return o.sdk={...o.sdk,name:l||"sentry.javascript.unknown",version:u||"0.0.0"},o}async function V8({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:s,session:i}){const o=F8({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:l,traceIds:u,initialTimestamp:c}=r,d=dt(),f=Nt(),p=d&&d.getTransport(),g=d&&d.getDsn();if(!d||!p||!g||!i.sampled)return Ni({});const m={type:w4,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 N8({scope:f,client:d,replayId:t,event:m});if(!y)return d.recordDroppedEvent("event_processor","replay",m),qe&&Ge.info("An event processor returned `null`, will not send event."),Ni({});delete y.sdkProcessingMetadata;const b=L8(y,o,g,d.getOptions().tunnel);let w;try{w=await p.send(b)}catch(C){const _=new Error(hw);try{_.cause=C}catch{}throw _}if(typeof w.statusCode=="number"&&(w.statusCode<200||w.statusCode>=300))throw new FI(w.statusCode);const S=wP({},w);if(bP(S,"replay"))throw new Ew(S);return w}class FI extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class Ew extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}async function NI(e,t={count:0,interval:C4}){const{recordingData:n,onError:r}=e;if(n.length)try{return await V8(e),!0}catch(s){if(s instanceof FI||s instanceof Ew)throw s;if(MU("Replays",{_retryCount:t.count}),r&&r(s),t.count>=T4){const i=new Error(`${hw} - max retries exceeded`);try{i.cause=s}catch{}throw i}return t.interval*=++t.count,new Promise((i,o)=>{ou(async()=>{try{await NI(e,t),i(!0)}catch(a){o(a)}},t.interval)})}}const VI="__THROTTLED",B8="__SKIPPED";function U8(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?B8:VI}o=!1;const u=r.get(l)||0;return r.set(l,u+1),e(...a)}}class io{constructor({options:t,recordingOptions:n}){io.prototype.__init.call(this),io.prototype.__init2.call(this),io.prototype.__init3.call(this),io.prototype.__init4.call(this),io.prototype.__init5.call(this),io.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:S4,sessionIdleExpire:_4},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=O8(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=U8((o,a)=>Fj(this,o,a),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:s}=this.getOptions(),i=r?{threshold:Math.min(R4,r),timeout:r,scrollTimeout:P4,ignoreSelector:s?s.join(","):""}:void 0;if(i&&(this.clickDetector=new Y5(this,i)),qe){const o=t._experiments;Ge.setConfig({captureExceptions:!!o.captureExceptions,traceInternals:!!o.traceInternals})}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){qe&&Ge.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&&Ge.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&&Ge.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){qe&&Ge.info("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){qe&&Ge.info("Buffering is in progress, call `flush()` to save the replay");return}qe&&Ge.infoTick("Starting replay in session mode"),this._updateUserActivity();const t=Cg({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this._initializeRecording()}startBuffering(){if(this._isEnabled){qe&&Ge.info("Buffering is in progress, call `flush()` to save the replay");return}qe&&Ge.infoTick("Starting replay in buffer mode");const t=Cg({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=Oi({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:E4}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:M8(this),onMutation:this._onMutationHandler,...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;try{qe&&Ge.info(`Stopping Replay${n?` triggered by ${n}`:""}`),PI(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,Oj(this)}catch(r){this.handleException(r)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),qe&&Ge.info("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),qe&&Ge.info("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();qe&&Ge.info("Converting buffer to session"),await this.flushImmediate();const r=this.stopRecording();!t||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession()),this.startRecording())}addUpdate(t){const n=t();this.recordingMode!=="buffer"&&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(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(this._lastActivity&&gy(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&this.session.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${Ht.location.pathname}${Ht.location.hash}${Ht.location.search}`,n=`${Ht.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===VI){const s=ni({category:"replay.throttled"});this.addUpdate(()=>!kw(this,{type:H5,timestamp:s.timestamp||0,data:{tag:"breadcrumb",payload:s,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastActiveSpan||bn(),n=t&&Mn(t),s=(n&&yt(n).data||{})[jr];if(!(!n||!s||!["route","custom"].includes(s)))return yt(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=Pj({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=Cg({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 EI(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{Ht.document.addEventListener("visibilitychange",this._handleVisibilityChange),Ht.addEventListener("blur",this._handleWindowBlur),Ht.addEventListener("focus",this._handleWindowFocus),Ht.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(P8(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=_j(this)}_removeListeners(){try{Ht.document.removeEventListener("visibilitychange",this._handleVisibilityChange),Ht.removeEventListener("blur",this._handleWindowBlur),Ht.removeEventListener("focus",this._handleWindowFocus),Ht.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}__init(){this._handleVisibilityChange=()=>{Ht.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{const t=ni({category:"ui.blur"});this._doChangeToBackgroundTasks(t)}}__init3(){this._handleWindowFocus=()=>{const t=ni({category:"ui.focus"});this._doChangeToForegroundTasks(t)}}__init4(){this._handleKeyboardEvent=t=>{lj(this,t)}}_doChangeToBackgroundTasks(t){!this.session||xI(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&&Ge.info("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:it.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=fj(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(pm(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&&Ge.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!(!this.eventBuffer||!this.eventBuffer.hasEvents)&&(await I8(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 NI({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=dt();if(r){const s=n instanceof Ew?"ratelimit_backoff":"send_error";r.recordDroppedEvent(s,"replay")}}}__init5(){this._flush=async({force:t=!1}={})=>{if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){qe&&Ge.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&&Ge.info(`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&&Ge.info("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&&_w(this.session)}__init6(){this._onMutationHandler=t=>{const n=t.length,r=this._options.mutationLimit,s=this._options.mutationBreadcrumbLimit,i=r&&n>r;if(n>s||i){const o=ni({category:"replay.mutations",data:{count:n,limit:i}});this._createCustomBreadcrumb(o)}return i?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}}function Ku(e,t){return[...e,...t].join(",")}function H8({mask:e,unmask:t,block:n,unblock:r,ignore:s}){const i=['base[href="/"]'],o=Ku(e,[".sentry-mask","[data-sentry-mask]"]),a=Ku(t,[]);return{maskTextSelector:o,unmaskTextSelector:a,blockSelector:Ku(n,[".sentry-block","[data-sentry-block]",...i]),unblockSelector:Ku(r,[]),ignoreSelector:Ku(s,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function z8({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 D0='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',j8=["content-length","content-type","accept"];let $0=!1;const q8=e=>new gm(e);class gm{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:t=k4,flushMaxDelay:n=x4,minReplayDuration:r=I4,maxReplayDuration:s=m0,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:g=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:y=[],networkDetailDenyUrls:b=[],networkCaptureBodies:w=!0,networkRequestHeaders:S=[],networkResponseHeaders:C=[],mask:_=[],maskAttributes:R=["title","placeholder"],unmask:T=[],block:x=[],unblock:E=[],ignore:P=[],maskFn:M,beforeAddRecordingEvent:O,beforeErrorSampling:A,onError:D}={}){this.name=gm.id;const H=H8({mask:_,unmask:T,block:x,unblock:E,ignore:P});if(this._recordingOptions={maskAllInputs:c,maskAllText:u,maskInputOptions:{password:!0},maskTextFn:M,maskInputFn:M,maskAttributeFn:(z,Y,q)=>z8({maskAttributes:R,maskAllText:u,privacyOptions:H,key:z,value:Y,el:q}),...H,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:z=>{try{z.__rrweb__=!0}catch{}}},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,A4),maxReplayDuration:Math.min(s,m0),stickySession:i,useCompression:o,workerUrl:a,blockAllMedia:d,maskAllInputs:c,maskAllText:u,mutationBreadcrumbLimit:f,mutationLimit:p,slowClickTimeout:g,slowClickIgnoreSelectors:m,networkDetailAllowUrls:y,networkDetailDenyUrls:b,networkCaptureBodies:w,networkRequestHeaders:L0(S),networkResponseHeaders:L0(C),beforeAddRecordingEvent:O,beforeErrorSampling:A,onError:D,_experiments:l},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${D0}`:D0),this._isInitialized&&i0())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return $0}set _isInitialized(t){$0=t}afterAllSetup(t){!i0()||this._replay||(this._setup(t),this._initialize(t))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode==="session"}):Promise.resolve()}flush(t){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(){if(!(!this._replay||!this._replay.isEnabled()))return this._replay.getSessionId()}getRecordingMode(){if(!(!this._replay||!this._replay.isEnabled()))return this._replay.recordingMode}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){const n=W8(this._initialOptions,t);this._replay=new io({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}gm.__initStatic();function W8(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...xn(e)},s=Kh(n.replaysSessionSampleRate),i=Kh(n.replaysOnErrorSampleRate);return s==null&&i==null&&Ms(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),s!=null&&(r.sessionSampleRate=s),i!=null&&(r.errorSampleRate=i),r}function L0(e){return[...j8,...e.map(t=>t.toLowerCase())]}const F0=new WeakMap,Tg=new Map,uh={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function G8(e,t){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:s,shouldCreateSpanForRequest:i,enableHTTPTimings:o,tracePropagationTargets:a}={traceFetch:uh.traceFetch,traceXHR:uh.traceXHR,trackFetchStreamPerformance:uh.trackFetchStreamPerformance,...t},l=typeof i=="function"?i:d=>!0,u=d=>Q8(d,a),c={};n&&(e.addEventProcessor(d=>(d.type==="transaction"&&d.spans&&d.spans.forEach(f=>{if(f.op==="http.client"){const p=Tg.get(f.span_id);p&&(f.timestamp=p/1e3,Tg.delete(f.span_id))}}),d)),s&&H3(d=>{if(d.response){const f=F0.get(d.response);f&&d.endTimestamp&&Tg.set(f,d.endTimestamp)}}),TP(d=>{const f=$3(d,l,u,c);if(d.response&&d.fetchData.__span&&F0.set(d.response,d.fetchData.__span),f){const p=BI(d.fetchData.url),g=p?Ra(p).host:void 0;f.setAttributes({"http.url":p,"server.address":g})}o&&f&&N0(f)})),r&&WP(d=>{const f=J8(d,l,u,c);o&&f&&N0(f)})}function K8(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function N0(e){const{url:t}=yt(e).data||{};if(!t||typeof t!="string")return;const n=iu("resource",({entries:r})=>{r.forEach(s=>{K8(s)&&s.name.endsWith(t)&&(X8(s).forEach(o=>e.setAttribute(...o)),setTimeout(n))})})}function Y8(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 Bs(e=0){return((pr||performance.timeOrigin)+e)/1e3}function X8(e){const{name:t,version:n}=Y8(e.nextHopProtocol),r=[];return r.push(["network.protocol.version",n],["network.protocol.name",t]),pr?[...r,["http.request.redirect_start",Bs(e.redirectStart)],["http.request.fetch_start",Bs(e.fetchStart)],["http.request.domain_lookup_start",Bs(e.domainLookupStart)],["http.request.domain_lookup_end",Bs(e.domainLookupEnd)],["http.request.connect_start",Bs(e.connectStart)],["http.request.secure_connection_start",Bs(e.secureConnectionStart)],["http.request.connection_end",Bs(e.connectEnd)],["http.request.request_start",Bs(e.requestStart)],["http.request.response_start",Bs(e.responseStart)],["http.request.response_end",Bs(e.responseEnd)]]:r}function Q8(e,t){const n=Ze.location&&Ze.location.href;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?_o(r.toString(),t)||i&&_o(r.pathname,t):i}else{const r=!!e.match(/^\/(?!\/)/);return t?_o(e,t):r}}function J8(e,t,n,r){const s=e.xhr,i=s&&s[ca];if(!s||s.__sentry_own_request__||!i)return;const o=Vi()&&t(i.url);if(e.endTimestamp&&o){const d=s.__sentry_xhr_span_id__;if(!d)return;const f=r[d];f&&i.status_code!==void 0&&(qR(f,i.status_code),f.end(),delete r[d]);return}const a=BI(i.url),l=a?Ra(a).host:void 0,u=!!bn(),c=o&&u?Na({name:`${i.method} ${i.url}`,attributes:{type:"xhr","http.method":i.method,"http.url":a,url:i.url,"server.address":l,[an]:"auto.http.browser",[Fa]:"http.client"}}):new Pu;return s.__sentry_xhr_span_id__=c.spanContext().spanId,r[s.__sentry_xhr_span_id__]=c,n(i.url)&&Z8(s,Vi()&&u?c:void 0),c}function Z8(e,t){const{"sentry-trace":n,baggage:r}=SP({span:t});n&&eq(e,n,r)}function eq(e,t,n){try{e.setRequestHeader("sentry-trace",t),n&&e.setRequestHeader("baggage",n)}catch{}}function BI(e){try{return new URL(e,Ze.location.origin).href}catch{return}}function tq(){Ze&&Ze.document?Ze.document.addEventListener("visibilitychange",()=>{const e=bn();if(!e)return;const t=Mn(e);if(Ze.document.hidden&&t){const n="cancelled",{op:r,status:s}=yt(t);oi&&Re.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),s||t.setStatus({code:In,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):oi&&Re.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const nq="BrowserTracing",rq={...sh,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,_experiments:{},...uh},V0=(e={})=>{MB();const{enableInp:t,enableLongTask:n,enableLongAnimationFrame:r,_experiments:{enableInteractions:s,enableStandaloneClsSpans:i},beforeStartSpan:o,idleTimeout:a,finalTimeout:l,childSpanTimeout:u,markBackgroundSpan:c,traceFetch:d,traceXHR:f,trackFetchStreamPerformance:p,shouldCreateSpanForRequest:g,enableHTTPTimings:m,instrumentPageLoad:y,instrumentNavigation:b}={...rq,...e},w=QH({recordClsStandaloneSpans:i||!1});t&&Sz(),r&&pt.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?ZH():n&&JH(),s&&ez();const S={name:void 0,source:void 0};function C(_,R){const T=R.op==="pageload",x=o?o(R):R,E=x.attributes||{};R.name!==x.name&&(E[jr]="custom",x.attributes=E),S.name=x.name,S.source=E[jr];const P=dP(x,{idleTimeout:a,finalTimeout:l,childSpanTimeout:u,disableAutoFinish:T,beforeSpanEnd:O=>{w(),iz(O,{recordClsOnPageloadSpan:!i})}});function M(){["interactive","complete"].includes(Ze.document.readyState)&&_.emit("idleSpanEnableAutoFinish",P)}return T&&Ze.document&&(Ze.document.addEventListener("readystatechange",()=>{M()}),M()),P}return{name:nq,afterAllSetup(_){let R,T=Ze.location&&Ze.location.href;function x(){R&&!yt(R).timestamp&&(oi&&Re.log(`[Tracing] Finishing current active span with op: ${yt(R).op}`),R.end())}_.on("startNavigationSpan",E=>{dt()===_&&(x(),R=C(_,{op:"navigation",...E}))}),_.on("startPageLoadSpan",(E,P={})=>{if(dt()!==_)return;x();const M=P.sentryTrace||B0("sentry-trace"),O=P.baggage||B0("baggage"),A=CB(M,O);Nt().setPropagationContext(A),R=C(_,{op:"pageload",...E})}),_.on("spanEnd",E=>{const P=yt(E).op;if(E!==Mn(E)||P!=="navigation"&&P!=="pageload")return;const M=Nt(),O=M.getPropagationContext();M.setPropagationContext({...O,sampled:O.sampled!==void 0?O.sampled:Xa(E),dsc:O.dsc||Qa(E)})}),Ze.location&&(y&&sq(_,{name:Ze.location.pathname,startTime:pr?pr/1e3:void 0,attributes:{[jr]:"url",[an]:"auto.pageload.browser"}}),b&&um(({to:E,from:P})=>{if(P===void 0&&T&&T.indexOf(E)!==-1){T=void 0;return}P!==E&&(T=void 0,UI(_,{name:Ze.location.pathname,attributes:{[jr]:"url",[an]:"auto.navigation.browser"}}))})),c&&tq(),s&&iq(a,l,u,S),t&&kz(),G8(_,{traceFetch:d,traceXHR:f,trackFetchStreamPerformance:p,tracePropagationTargets:_.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:g,enableHTTPTimings:m})}}};function sq(e,t,n){e.emit("startPageLoadSpan",t,n),Nt().setTransactionName(t.name);const r=bn();return(r&&yt(r).op)==="pageload"?r:void 0}function UI(e,t){fi().setPropagationContext({traceId:qc()}),Nt().setPropagationContext({traceId:qc()}),e.emit("startNavigationSpan",t),Nt().setTransactionName(t.name);const n=bn();return(n&&yt(n).op)==="navigation"?n:void 0}function B0(e){const t=JV(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}function iq(e,t,n,r){let s;const i=()=>{const o="ui.action.click",a=bn(),l=a&&Mn(a);if(l){const u=yt(l).op;if(["navigation","pageload"].includes(u)){oi&&Re.warn(`[Tracing] Did not create ${o} span because a pageload or navigation span is in progress.`);return}}if(s&&(s.setAttribute(Wv,"interactionInterrupted"),s.end(),s=void 0),!r.name){oi&&Re.warn(`[Tracing] Did not create ${o} transaction because _latestRouteName is missing.`);return}s=dP({name:r.name,op:o,attributes:{[jr]:r.source||"url"}},{idleTimeout:e,finalTimeout:t,childSpanTimeout:n})};Ze.document&&addEventListener("click",i,{once:!1,capture:!0})}const HI=["activate","mount","update"],zI=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,oq=/(?:^|[-_])(\w)/g,aq=e=>e.replace(oq,t=>t.toUpperCase()).replace(/[-_]/g,""),lq="<Root>",Rg="<Anonymous>",uq=(e,t)=>e.repeat(t),Ec=(e,t)=>{if(!e)return Rg;if(e.$root===e)return lq;if(!e.$options)return Rg;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?`<${aq(r)}>`:Rg)+(s&&t!==!1?` at ${s}`:"")},cq=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`
|
|
55
|
-
|
|
56
|
-
found in
|
|
57
|
-
|
|
58
|
-
${t.map((s,i)=>`${(i===0?"---> ":uq(" ",5+i*2))+(Array.isArray(s)?`${Ec(s[0])}... (${s[1]} recursive calls)`:Ec(s))}`).join(`
|
|
59
|
-
`)}`}return`
|
|
60
|
-
|
|
61
|
-
(found in ${Ec(e)})`},dq=(e,t)=>{const{errorHandler:n,warnHandler:r,silent:s}=e.config;e.config.errorHandler=(i,o,a)=>{const l=Ec(o,!1),u=o?cq(o):"",c={componentName:l,lifecycleHook:a,trace:u};if(t.attachProps&&o&&(o.$options&&o.$options.propsData?c.propsData=o.$options.propsData:o.$props&&(c.propsData=o.$props)),setTimeout(()=>{si(i,{captureContext:{contexts:{vue:c}},mechanism:{handled:!1}})}),typeof n=="function"&&e.config.errorHandler&&n.call(e,i,o,a),t.logErrors){const d=typeof console<"u",f=`Error in ${a}: "${i&&i.toString()}"`;r?r.call(null,f,o,u):d&&!s&&Ms(()=>{console.error(`[Vue warn]: ${f}${u}`)})}}},U0="ui.vue",fq={activate:["activated","deactivated"],create:["beforeCreate","created"],unmount:["beforeUnmount","unmounted"],destroy:["beforeDestroy","destroyed"],mount:["beforeMount","mounted"],update:["beforeUpdate","updated"]};function hq(e,t,n){e.$_sentryRootSpanTimer&&clearTimeout(e.$_sentryRootSpanTimer),e.$_sentryRootSpanTimer=setTimeout(()=>{e.$root&&e.$root.$_sentryRootSpan&&(e.$root.$_sentryRootSpan.end(t),e.$root.$_sentryRootSpan=void 0)},n)}function pq(e,t){function n(s){return s.replace(/^<([^\s]*)>(?: at [^\s]*)?$/,"$1")}return e.some(s=>n(t)===n(s))}const mq=e=>{const t=(e.hooks||[]).concat(HI).filter((r,s,i)=>i.indexOf(r)===s),n={};for(const r of t){const s=fq[r];if(!s){zI&&Re.warn(`Unknown hook: ${r}`);continue}for(const i of s)n[i]=function(){const o=this.$root===this;o&&(this.$_sentryRootSpan=this.$_sentryRootSpan||Na({name:"Application Render",op:`${U0}.render`,attributes:{[an]:"auto.ui.vue"},onlyIfParent:!0}));const a=Ec(this,!1),l=Array.isArray(e.trackComponents)?pq(e.trackComponents,a):e.trackComponents;if(!(!o&&!l))if(this.$_sentrySpans=this.$_sentrySpans||{},i==s[0]){if(this.$root&&this.$root.$_sentryRootSpan||bn()){const c=this.$_sentrySpans[r];c&&c.end(),this.$_sentrySpans[r]=Na({name:`Vue ${a}`,op:`${U0}.${r}`,attributes:{[an]:"auto.ui.vue"},onlyIfParent:!0})}}else{const u=this.$_sentrySpans[r];if(!u)return;u.end(),hq(this,tr(),e.timeout)}}}return n},gq=pt,vq={Vue:gq.Vue,attachProps:!0,logErrors:!0,attachErrorHandler:!0,hooks:HI,timeout:2e3,trackComponents:!1},yq="Vue",bq=(e={})=>({name:yq,setup(t){const n={...vq,...t.getOptions(),...e};if(!n.Vue&&!n.app){Ms(()=>{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=>H0(s,n)):n.Vue&&H0(n.Vue,n)}}),H0=(e,t)=>{if(zI){const n=e;(n._instance&&n._instance.isMounted)===!0&&Ms(()=>{console.warn("[@sentry/vue]: Misconfigured SDK. Vue app is already mounted. Make sure to call `app.mount()` after `Sentry.init()`.")})}t.attachErrorHandler&&dq(e,t),Vi(t)&&e.mixin(mq({...t,...t.tracingOptions}))};function wq(e={}){const t={_metadata:{sdk:{name:"sentry.javascript.vue",packages:[{name:"npm:@sentry/vue",version:Ii}],version:Ii}},defaultIntegrations:[...YP(),bq()],...e};return y4(t)}function Sq(e,t,n){let r=!0;e.onError(s=>si(s,{mechanism:{handled:!1}})),e.beforeEach((s,i,o)=>{const a=i.name==null&&i.matched.length===0||i.name===void 0&&r;r&&(r=!1);const l={[an]:"auto.navigation.vue"};for(const d of Object.keys(s.params))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"}if(Nt().setTransactionName(u),t.instrumentPageLoad&&a){const d=_q();d&&((yt(d).data||{})[jr]!=="custom"&&(d.updateName(u),d.setAttribute(jr,c)),d.setAttributes({...l,[an]:"auto.pageload.vue"}))}t.instrumentNavigation&&!a&&(l[jr]=c,l[an]="auto.navigation.vue",n({name:u,op:"navigation",attributes:l})),o&&o()})}function _q(){const e=bn(),t=e&&Mn(e);if(!t)return;const n=yt(t).op;return n==="navigation"||n==="pageload"?t:void 0}function kq(e={}){if(!e.router)return V0(e);const t=V0({...e,instrumentNavigation:!1}),{router:n,instrumentNavigation:r=!0,instrumentPageLoad:s=!0,routeLabel:i="name"}=e;return{...t,afterAllSetup(o){t.afterAllSetup(o),Sq(n,{routeLabel:i,instrumentNavigation:r,instrumentPageLoad:s},l=>{UI(o,l)})}}}async function jI(){return"/"}async function Gn(e=!0,t=!0){const n=cn.create({baseURL:await jI()});return n.interceptors.request.use(r=>{var s,i;return console.debug(`${(s=r.method)==null?void 0:s.toUpperCase().padEnd(6)} ${(i=r.url)==null?void 0:i.padEnd(25)} WithAuth: ${e==null?void 0:e.toString().padEnd(7)} AutoHandle401: ${t==null?void 0:t.toString().padEnd(7)} BaseURL: ${r.baseURL}`),r}),e&&n.interceptors.request.use(async r=>{const s=as();return s.loadTokens(),s.hasAuthToken&&(r.headers.Authorization=`Bearer ${s.token}`),r},r=>(console.error("Error in axios request interceptor",r),Promise.reject(r))),t&&n.interceptors.response.use(r=>r,async r=>{var d;const{response:s,config:i}=r;if(!s)return console.error("No response was returned by axios",r),Promise.reject({message:`No response was returned by axios - URL ${i==null?void 0:i.url}`,stack:r.stack});if(s.status===ua.FailedDependency)return Promise.reject(r);if(![ua.Unauthorized,ua.Forbidden].includes(s.status))return console.error("Error in axios response interceptor which is not 401 or 403",r),si(r),Promise.reject({message:`${r.message} - URL ${i==null?void 0:i.url}`,stack:r.stack});if(s.status===ua.Forbidden){const f=(d=r==null?void 0:r.response)==null?void 0:d.data;return console.error("[HttpClient] 403 Forbidden",f),Ur("auth:permission-denied").emit({roles:f==null?void 0:f.roles,permissions:f==null?void 0:f.permissions,error:f==null?void 0:f.error,url:i==null?void 0:i.url}),Promise.reject(r)}const o=as();o.loadTokens();const{reasonCode:a,url:l}=o.extractSpecialReasonCode(r);if(a)return await o.logout(!1,Gb(a)),console.error(`[AuthStore] 401 Unauthorized - emitting 'auth:${a}' with reason ${a}`),Ur(`auth:${a}`).emit({url:l,error:r.message,reasonCode:a}),Promise.reject(r);await o.checkAuthenticationRequirements();const{success:u,handled:c}=await o.verifyOrRefreshLoginOnceOrLogout();if(c)return Promise.reject(r);if(u){if(!(i!=null&&i.url))throw new Error("No URL in axios config, cannot retry");console.debug("Redoing request without interceptors",i==null?void 0:i.url);const f=i;return f.headers||(f.headers={}),f.headers.Authorization=`Bearer ${o.token}`,cn(f)}return console.error("[HttpClient] 401 Unauthorized - emitting 'auth:failure'"),Ur("auth:failure").emit({url:i==null?void 0:i.url,error:r.message}),Promise.reject(r)}),n}class vr{static async get(t){return(await(await Gn(!0)).get(t)).data}static async put(t,n){return(await(await Gn(!0)).put(t,n)).data}static async post(t,n){return(await(await Gn(!0)).post(t,n)).data}static async postUpload(t,n,r){return await(await Gn(!0)).post(t,n,r)}static async getDownload(t,n){return await(await Gn(!0)).request({method:"GET",url:t,data:n,responseType:"arraybuffer"})}static async delete(t,n){return(await(await Gn(!0)).request({url:t,method:"delete",data:n})).data}static async patch(t,n){return(await(await Gn(!0)).patch(t,n)).data}}const se=class se{};ge(se,"base","/api"),ge(se,"firstTimeSetupRoute",`${se.base}/first-time-setup`),ge(se,"completeFirstTimeSetupRoute",`${se.firstTimeSetupRoute}/complete`),ge(se,"printerRoute",`${se.base}/printer`),ge(se,"printerBatchRoute",`${se.printerRoute}/batch`),ge(se,"printerTestConnectionRoute",`${se.printerRoute}/test-connection`),ge(se,"printerSettingsRoute",`${se.base}/printer-settings`),ge(se,"floorRoute",`${se.base}/floor`),ge(se,"batchRoute",`${se.base}/batch`),ge(se,"batchGetLastPrintedFilesRoute",`${se.batchRoute}/reprint/list`),ge(se,"batchReprintFilesRoute",`${se.batchRoute}/reprint/execute`),ge(se,"printCompletionRoute",`${se.base}/print-completion`),ge(se,"printerFilesRoute",`${se.base}/printer-files`),ge(se,"printerFilesPurgeRoute",`${se.printerFilesRoute}/purge`),ge(se,"printerGroupRoute",`${se.base}/printer-group`),ge(se,"createGroupRoute",`${se.base}/printer-group`),ge(se,"deleteGroupRoute",t=>`${se.base}/printer-group/${t}`),ge(se,"updateGroupNameRoute",t=>`${se.base}/printer-group/${t}/name`),ge(se,"addPrinterToGroupRoute",t=>`${se.base}/printer-group/${t}/printer`),ge(se,"deletePrinterFromGroupRoute",se.addPrinterToGroupRoute),ge(se,"customGCodeRoute",`${se.base}/custom-gcode`),ge(se,"userRoute",`${se.base}/user`),ge(se,"rolesRoute",`${se.base}/user/roles`),ge(se,"userProfileRoute",`${se.userRoute}/profile`),ge(se,"settingsRoute",`${se.base}/settings`),ge(se,"settingsSensitiveRoute",`${se.settingsRoute}/sensitive`),ge(se,"updateLoginRequiredRoute",`${se.settingsRoute}/login-required`),ge(se,"updateRegistrationEnabledRoute",`${se.settingsRoute}/registration-enabled`),ge(se,"updateCredentialSettings",`${se.settingsRoute}/credential`),ge(se,"serverSettingsRoute",`${se.settingsRoute}/server`),ge(se,"fileCleanSettingsRoute",`${se.settingsRoute}/file-clean`),ge(se,"updateFrontendSettingsRoute",`${se.settingsRoute}/frontend`),ge(se,"updateTimeoutSettingRoute",`${se.settingsRoute}/timeout`),ge(se,"serverSentryDiagnosticsSettingRoute",`${se.settingsRoute}/sentry-diagnostics`),ge(se,"updateExperimentalMoonrakerSupportRoute",`${se.settingsRoute}/experimental-moonraker-support`),ge(se,"updateExperimentalClientSupportRoute",`${se.settingsRoute}/experimental-client-support`),ge(se,"serverPrivateRoute",`${se.base}/server`),ge(se,"serverRestartCommandRoute",`${se.serverPrivateRoute}/restart`),ge(se,"pluginRoute",`${se.base}/plugin`),ge(se,"pluginFirmwareUpdateRoute",`${se.pluginRoute}/firmware-update`),ge(se,"pluginFirmwareReleasesRoute",`${se.pluginFirmwareUpdateRoute}/releases`),ge(se,"getPrinterRoute",t=>`${se.printerRoute}/${t}`),ge(se,"postPrinterDisabledReasonRoute",t=>`${se.printerRoute}/${t}/disabled-reason`),ge(se,"getPrinterLoginDetailsRoute",t=>`${se.getPrinterRoute(t)}/login-details`),ge(se,"restartOctoPrintRoute",t=>`${se.getPrinterRoute(t)}/restart-octoprint`),ge(se,"refreshSocketRoute",t=>`${se.getPrinterRoute(t)}/refresh-socket`),ge(se,"getPrinterSettingsRoute",t=>`${se.printerSettingsRoute}/${t}`),ge(se,"setPrinterSettingsGCodeAnalysisRoute",t=>`${se.getPrinterSettingsRoute(t)}/gcode-analysis`),ge(se,"syncPrinterNameSettingRoute",t=>`${se.getPrinterSettingsRoute(t)}/sync-printername`),ge(se,"getFloorRoute",t=>`${se.floorRoute}/${t}`),ge(se,"setSelectedFloorRoute",t=>`${se.floorRoute}/selected-floor/${t}`),ge(se,"addOrRemovePrinterFromFloorRoute",t=>`${se.getFloorRoute(t)}/printer`),ge(se,"sendQuickStopM112Route",t=>`${se.customGCodeRoute}/send-emergency-m112/${t}`),ge(se,"installFirmwareUpdatePluginRoute",t=>`${se.pluginFirmwareUpdateRoute}/${t}/install-firmware-update-plugin`),ge(se,"configurePluginSettingsRoute",t=>`${se.pluginFirmwareUpdateRoute}/${t}/configure-plugin-settings`),ge(se,"flashFirmwareRoute",t=>`${se.pluginFirmwareUpdateRoute}/${t}/flash-firmware`),ge(se,"updatePrinterFloorNameRoute",t=>`${se.getFloorRoute(t)}/name`),ge(se,"updatePrinterFloorNumberRoute",t=>`${se.getFloorRoute(t)}/floor-number`),ge(se,"printerFilesClearRoute",t=>`${se.printerFilesRoute}/${t}/clear`),ge(se,"printerFilesSelectAndPrintRoute",t=>`${se.printerFilesRoute}/${t}/select`),ge(se,"printerFilesUploadRoute",t=>`${se.printerFilesRoute}/${t}/upload`),ge(se,"printerFilesCacheRoute",t=>`${se.printerFilesRoute}/${t}/cache`),ge(se,"printerEnabledRoute",t=>`${se.getPrinterRoute(t)}/enabled`),ge(se,"printerSerialConnectRoute",t=>`${se.getPrinterRoute(t)}/serial-connect`),ge(se,"printerJogCommandRoute",t=>`${se.getPrinterRoute(t)}/jog`),ge(se,"printerHomeCommandRoute",t=>`${se.getPrinterRoute(t)}/home`),ge(se,"printerSerialDisconnectRoute",t=>`${se.getPrinterRoute(t)}/serial-disconnect`),ge(se,"printerJobRoute",t=>`${se.getPrinterRoute(t)}/job`),ge(se,"printerStopJobRoute",t=>`${se.printerJobRoute(t)}/stop`),ge(se,"printerPauseJobRoute",t=>`${se.printerJobRoute(t)}/pause`),ge(se,"printerResumeJobRoute",t=>`${se.printerJobRoute(t)}/resume`),ge(se,"userChangeUsernameRoute",t=>`${se.userRoute}/${t}/change-username`),ge(se,"userChangePasswordRoute",t=>`${se.userRoute}/${t}/change-password`),ge(se,"userDeleteRoute",t=>`${se.userRoute}/${t}`),ge(se,"userSetVerifiedRoute",t=>`${se.userRoute}/${t}/set-verified`),ge(se,"userSetRootUserRoute",t=>`${se.userRoute}/${t}/set-root-user`),ge(se,"userSetUserRolesRoute",t=>`${se.userRoute}/${t}/set-user-roles`);let Ae=se;const xq=Symbol("Progress snackbar message event symbol"),Eq=Symbol("Info snackbar message event symbol"),Cq=Symbol("Error snackbar message event symbol");function Ot(){const{emit:e,on:t}=Ur(xq),{emit:n,on:r}=Ur(Eq),{emit:s,on:i}=Ur(Cq);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 by(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 xo extends vr{static async getFiles(t){const n=`${Ae.printerFilesRoute}/${t}`;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.printerFilesSelectAndPrintRoute(t);return await this.post(s,{filePath:n,print:r})}static async uploadFile(t,n){const r=Ae.printerFilesUploadRoute(t.id),s=new FormData;return s.append("files[0]",n),this.postUpload(r,s,{onUploadProgress:i=>{Ot().openProgressMessage("single-file-upload",`Uploading file ${n.name}`,100*i.loaded/i.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);by(s.data,n)}}const Tq=["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"],Rq=["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 z0(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}function Va(){const e=Math.round(Math.random()*1124),t=Math.round(Math.random()*3260);return`${z0(Tq[e])} ${z0(Rq[t])}`}function vm(e){var n,r;if(!(e!=null&&e.trim().length))return"?";const t=(r=(n=e==null?void 0:e.trim())==null?void 0:n.replace(/[^a-zA-Z ]/g,""))==null?void 0:r.split(" ").map(s=>s.length?s:"").slice(0,3).reduce((s,i)=>s+i[0],"");return t==null?void 0:t.replace("undefined","")}const wy=()=>({id:void 0,name:Va(),apiKey:"",printerURL:"",printerType:0,enabled:!0});class jt extends vr{static applyLoginDetailsPatchForm(t,n){n.name=t.name||Va(),n.apiKey=t.apiKey}static convertPrinterToCreateForm(t){const n=wy();return n.id=t.id,n.printerURL=t.printerURL,n.name=t.name||Va(),n.apiKey=t.apiKey,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 Fn extends vr{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 updateExperimentalClientSupport(t){const n=Ae.updateExperimentalClientSupportRoute;return await this.put(n,{enabled:t})}}class ch extends vr{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 Ds=Ts({id:"Settings",state:()=>({settings:void 0,frontendDebugSettings:{showPrinterStateUpdateSideNav:!1,showInterpretedPrinterState:!1,showJobsRendered:!1}}),actions:{async loadSettings(){const e=await Fn.getSettings();return this.settings=e,e},async updateFrontendSettings(e){const t=await Fn.updateFrontendSettings(e);return this.settings=t,t},async updateTimeoutSettings(e){const t=await Fn.updateTimeoutSettings(e);return this.settings=t,t}},getters:{serverSettings(){var e;return(e=this.settings)==null?void 0:e.server},largeTiles(){var e,t;return((t=(e=this.settings)==null?void 0:e.frontend)==null?void 0:t.largeTiles)||!1},gridCols(){var e,t;return((t=(e=this.settings)==null?void 0:e.frontend)==null?void 0:t.gridCols)||8},gridRows(){var e,t;return((t=(e=this.settings)==null?void 0:e.frontend)==null?void 0:t.gridRows)||8}}}),mi={danger:"danger",dark:"dark",secondary:"secondary",success:"success"},gi={DarkBlue:"#050c2e",Black:"#000000",DarkGray:"#262626",LightBrown:"#583c0e",Brown:"#580e47",Red:"#2e0905"},ol={Disabled:"Disabled",Maintenance:"Maintenance",Offline:"Offline",Finding:"Finding",Disconnected:"Disconnected",Error:"Error",Paused:"Paused",Operational:"Operational",Printing:"Printing"};function qI(e,t,n){var f,p,g,m;const s=Ds().frontendDebugSettings.showInterpretedPrinterState,i={};if(!e.enabled)return(f=e.disabledReason)!=null&&f.length?{...i,color:mi.danger,rgb:gi.Black,text:ol.Maintenance}:{...i,color:mi.secondary,rgb:gi.DarkBlue,text:ol.Disabled};const o=(t==null?void 0:t.api)==="responding",a=(t==null?void 0:t.api)==="authFail";if(!o||!t){const y=(t==null?void 0:t.api)==="noResponse";return{...i,color:mi.secondary,rgb:gi.Red,text:a?"API key wrong":y?"API unreachable":(t==null?void 0:t.api)||"-"}}if(!o)return{...i,color:mi.danger,rgb:gi.Red,text:a?"API key wrong":"No API connection"};const l=t.socket==="authenticated",u=t.socket==="authenticating",c=(g=(p=n==null?void 0:n.current)==null?void 0:p.payload)==null?void 0:g.state,d=c==null?void 0:c.flags;if(!l||!d)return s&&console.debug(`Socket opened ${l?1:0}, socketAuthing ${u?1:0} printerState ${n?1:0},
|
|
62
|
-
currentState: ${c}, FLAGS ${d}`),{...i,color:mi.danger,rgb:gi.Red,text:n?"Awaiting state":"No USB"};if(!d){console.error("No flags",d);return}return d.error||d.closedOrError?{...i,color:mi.danger,rgb:gi.Red,text:((m=c.text)==null?void 0:m.replace("Offline","Disconnected"))||ol.Error,description:c.error}:d.paused||d.pausing?{...i,color:mi.success,rgb:gi.Brown,text:ol.Paused}:d.printing?{...i,color:mi.success,rgb:gi.LightBrown,text:ol.Printing}:{...i,color:mi.dark,rgb:gi.DarkGray,text:ol.Operational,description:c.error}}const Pa=e=>{var t,n;return(n=(t=e==null?void 0:e.current)==null?void 0:t.payload)==null?void 0:n.state},Pq=e=>{var t;return(t=Pa(e))==null?void 0:t.flags.printing},Iq=(e,t)=>{var n,r,s;return!ym(e)&&(e==null?void 0:e.enabled)&&!((n=Pa(t))!=null&&n.flags.operational)||((r=Pa(t))==null?void 0:r.flags.error)||((s=Pa(t))==null?void 0:s.flags.closedOrError)},WI=e=>!ym(e)&&!(e!=null&&e.enabled),ym=e=>{var t;return!(e!=null&&e.enabled)&&((t=e==null?void 0:e.disabledReason)==null?void 0:t.length)},Aq=(e,t)=>{var n,r,s;return((n=Pa(t))==null?void 0:n.flags)&&!((r=Pa(t))!=null&&r.flags.printing)&&((s=Pa(t))==null?void 0:s.flags.operational)&&!WI(e)&&!ym(e)},nr=Ts("PrinterState",{state:()=>({printerIds:[],printerEventsById:{},socketStatesById:{}}),getters:{operationalPrintersById(){const e=Lt(),t={};return this.printerIds.forEach(n=>{var s,i,o,a;const r=this.printerEventsById[n];if((a=(o=(i=(s=r==null?void 0:r.current)==null?void 0:s.payload)==null?void 0:i.state)==null?void 0:o.flags)!=null&&a.operational){const l=e.printer(n);if(l)t[n]=l;else throw new Error(`PrinterStore contains no printer with id ${n} but events are known`)}}),t},isPrinterOperational(){return e=>!!this.operationalPrintersById[e]},printingPrintersById(){const e={};return this.printerIds.forEach(t=>{var r,s,i,o;const n=this.printerEventsById[t];(o=(i=(s=(r=n==null?void 0:n.current)==null?void 0:r.payload)==null?void 0:s.state)==null?void 0:i.flags)!=null&&o.printing&&(e[t]=n)}),e},isPrinterPrinting(){return e=>!!this.printingPrintersById[e]},isPrinterStoppable(){return e=>{var r,s,i;const t=this.printerEventsById[e];if(!t)return!1;const n=(i=(s=(r=t==null?void 0:t.current)==null?void 0:r.payload)==null?void 0:s.state)==null?void 0:i.flags;return(n==null?void 0:n.printing)||(n==null?void 0:n.paused)}},isPrinterPaused(){return e=>{var r,s,i;const t=this.printerEventsById[e];if(!t)return!1;const n=(i=(s=(r=t==null?void 0:t.current)==null?void 0:r.payload)==null?void 0:s.state)==null?void 0:i.flags;return n==null?void 0:n.paused}},printerCurrentEventReceivedAtById(){const e={};return this.printerIds.forEach(t=>{var r;const n=this.printerEventsById[t];(r=n==null?void 0:n.current)!=null&&r.receivedAt&&(e[t]=n.current.receivedAt)}),e},onlinePrinters(){const e=Lt(),t={};return this.printerIds.forEach(n=>{const r=this.socketStatesById[n];if((r==null?void 0:r.api)==="responding"){const s=e.printer(n);if(s)t[n]=s;else throw new Error(`PrinterStore contains no printer with id ${n} but socket state is opened`)}}),t},onlinePrintersWithStates(){return Object.values(this.onlinePrinters).map(e=>({printer:e,printerState:this.printerEventsById[e.id]}))},printingCount(){const e=nr();return Object.values(e.onlinePrintersWithStates).filter(t=>Pq(t.printerState)).length},operationalNotPrintingCount(){return this.onlinePrintersWithStates.filter(e=>Aq(e.printer,e.printerState)).length},isApiResponding(){return e=>Object.keys(this.onlinePrinters).includes(e.toString())},isPrinterNotOnline(){return e=>!this.isApiResponding(e)},printerJobsById(){const e=Lt(),t=Ds().frontendDebugSettings.showJobsRendered,n={};return this.printerIds.forEach(r=>{var o,a,l,u;const s=this.printerEventsById[r],i=(l=(a=(o=s==null?void 0:s.current)==null?void 0:o.payload)==null?void 0:a.state)==null?void 0:l.flags;if(i!=null&&i.printing||i!=null&&i.paused){const c=e.printer(r);if(c)n[c.id]=(u=s==null?void 0:s.current)==null?void 0:u.payload;else throw new Error(`PrinterStore contains no printer with id ${r} but events are known`)}}),t&&console.debug("[PrinterStateStore] rendered printerJobsById",n),n},printersWithJob(){const e=Lt(),t=[];return this.printerIds.forEach(n=>{var i,o,a,l;const r=this.printerEventsById[n],s=(a=(o=(i=r==null?void 0:r.current)==null?void 0:i.payload)==null?void 0:o.state)==null?void 0:a.flags;if(s!=null&&s.printing||s!=null&&s.paused){const u=e.printer(n);if(u)t.push({printer:u,job:(l=r==null?void 0:r.current)==null?void 0:l.payload});else throw new Error(`PrinterStore contains no printer with id ${n} but events are known`)}}),t},printingFilePathsByPrinterId(){const e={};return this.printerIds.forEach(t=>{var s,i,o,a,l,u,c;const n=this.printerEventsById[t],r=(o=(i=(s=n==null?void 0:n.current)==null?void 0:s.payload)==null?void 0:i.state)==null?void 0:o.flags;(r!=null&&r.printing||r!=null&&r.paused)&&(e[t]=(c=(u=(l=(a=n==null?void 0:n.current)==null?void 0:a.payload)==null?void 0:l.job)==null?void 0:u.file)==null?void 0:c.path)}),e}},actions:{setSocketStates(e){this.socketStatesById=e,this.printerIds=Object.keys(e)},setPrinterEvents(e){this.printerEventsById=e},deletePrinterEvents(e){delete this.printerEventsById[e],this.printerIds=Object.keys(this.printerEventsById)},async selectAndPrintFile({printerId:e,fullPath:t}){if(!(!e||!Lt().printer(e))){if(this.isPrinterPrinting(e)){alert("This printer is printing or not connected! Either way printing is not an option.");return}await xo.selectAndPrintFile(e,t,!0)}}}}),Lt=Ts("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(WI).length},disconnectedCount(){const e=nr();return this.printers.filter(t=>Iq(t,e.printerEventsById[t.id])).length},maintenanceCount(){return this.printers.filter(e=>ym(e)).length}},actions:{async createPrinter(e,t){const n=await jt.createPrinter(e,t);return this.printers.push(n),this.printers.sort((r,s)=>{var i,o,a;return(a=(i=r.name)==null?void 0:i.toLowerCase())!=null&&a.localeCompare((o=s==null?void 0:s.name)==null?void 0:o.toLowerCase())?1:-1}),n},toggleSelectedPrinter(e){const t=nr(),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 jt.updatePrinter(e,t,n);return this._replacePrinter({printerId:e,printer:r}),r},async loadPrinters(){const e=await jt.getPrinters();return this.setPrinters(e),e},async deletePrinter(e){const t=await jt.deletePrinter(e);return this._popPrinter(e),t},setPrinters(e){var n;if(!(e!=null&&e.length)){this.printers=[];return}const t=(n=this.sideNavPrinter)==null?void 0:n.id;t&&(this.sideNavPrinter=e.find(r=>r.id===t)),this.printers=e.sort((r,s)=>{var i,o,a;return(a=(i=r.name)==null?void 0:i.toLowerCase())!=null&&a.localeCompare((o=s==null?void 0:s.name)==null?void 0:o.toLowerCase())?1:-1})},_popPrinter(e){const t=this.printers.findIndex(n=>n.id===e);t!==-1?this.printers.splice(t,1):console.warn("Printer was not popped as it did not occur in state",e)},_replacePrinter({printerId:e,printer:t}){const n=this.printers.findIndex(r=>r.id===e);n!==-1?this.printers[n]=t:console.warn("Printer was not purged as it did not occur in state",e)},async clearPrinterFiles(e){if(!e)throw new Error("No printerId was provided");const t=await xo.clearFiles(e);if(!(t!=null&&t.failedFiles))throw new Error("No failed files were returned");this.printerFileCache[e]&&(this.printerFileCache[e]=t.failedFiles)},async loadPrinterFiles(e){const t=await xo.getFiles(e);return t.sort((n,r)=>n.date<r.date?1:-1),this.printerFileCache[e]=t,t},async deletePrinterFile(e,t){await xo.deleteFileOrFolder(e,t);const n=this.printerFileCache[e];if(!(n!=null&&n.length)){console.warn("Printer file list was nonexistent",e);return}const r=n.findIndex(s=>s.path===t);return r!==-1?n.splice(r,1):console.warn("File was not purged as it did not occur in state",t),this.printerFiles(e)},async sendStopJobCommand(e){const t=nr();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 ch.stopPrintJob(n.id)}}}),Dn=ke()({name:"VCardActions",props:Ue(),setup(e,t){let{slots:n}=t;return Ar({VBtn:{slim:!0,variant:"text"}}),Pe(()=>{var r;return h("div",{class:["v-card-actions",e.class],style:e.style},[(r=n.default)==null?void 0:r.call(n)])}),{}}}),Oq=ce({opacity:[Number,String],...Ue(),...wt()},"VCardSubtitle"),bm=ke()({name:"VCardSubtitle",props:Oq(),setup(e,t){let{slots:n}=t;return Pe(()=>h(e.tag,{class:["v-card-subtitle",e.class],style:[{"--v-card-subtitle-opacity":e.opacity},e.style]},n)),{}}}),on=vu("v-card-title");function Mq(e){return{aspectStyles:I(()=>{const t=Number(e.aspectRatio);return t?{paddingBottom:String(1/t*100)+"%"}:void 0})}}const GI=ce({aspectRatio:[String,Number],contentClass:null,inline:Boolean,...Ue(),...Mr()},"VResponsive"),j0=ke()({name:"VResponsive",props:GI(),setup(e,t){let{slots:n}=t;const{aspectStyles:r}=Mq(e),{dimensionStyles:s}=Dr(e);return Pe(()=>{var i;return h("div",{class:["v-responsive",{"v-responsive--inline":e.inline},e.class],style:[s.value,e.style]},[h("div",{class:"v-responsive__sizer",style:r.value},null),(i=n.additional)==null?void 0:i.call(n),n.default&&h("div",{class:["v-responsive__content",e.contentClass]},[n.default()])])}),{}}});function Dq(e,t){if(!Ob)return;const n=t.modifiers||{},r=t.value,{handler:s,options:i}=typeof r=="object"?r:{handler:r,options:{}},o=new IntersectionObserver(function(){var d;let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],l=arguments.length>1?arguments[1]:void 0;const u=(d=e._observe)==null?void 0:d[t.instance.$.uid];if(!u)return;const c=a.some(f=>f.isIntersecting);s&&(!n.quiet||u.init)&&(!n.once||c||u.init)&&s(c,a,l),c&&n.once?KI(e,t):u.init=!0},i);e._observe=Object(e._observe),e._observe[t.instance.$.uid]={init:!1,observer:o},o.observe(e)}function KI(e,t){var r;const n=(r=e._observe)==null?void 0:r[t.instance.$.uid];n&&(n.observer.unobserve(e),delete e._observe[t.instance.$.uid])}const Cw={mounted:Dq,unmounted:KI},$q=ce({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,...GI(),...Ue(),...$n(),...xu()},"VImg"),hi=ke()({name:"VImg",directives:{intersect:Cw},props:$q(),emits:{loadstart:e=>!0,load:e=>!0,error:e=>!0},setup(e,t){let{emit:n,slots:r}=t;const{backgroundColorClasses:s,backgroundColorStyles:i}=fr(Te(e,"color")),{roundedClasses:o}=Hn(e),a=sn("VImg"),l=Oe(""),u=B(),c=Oe(e.eager?"loading":"idle"),d=Oe(),f=Oe(),p=I(()=>e.src&&typeof e.src=="object"?{src:e.src.src,srcset:e.srcset||e.src.srcset,lazySrc:e.lazySrc||e.src.lazySrc,aspect:Number(e.aspectRatio||e.src.aspect||0)}:{src:e.src,srcset:e.srcset,lazySrc:e.lazySrc,aspect:Number(e.aspectRatio||0)}),g=I(()=>p.value.aspect||d.value/f.value||0);xe(()=>e.src,()=>{m(c.value!=="idle")}),xe(g,(O,A)=>{!O&&A&&u.value&&C(u.value)}),Lp(()=>m());function m(O){if(!(e.eager&&O)&&!(Ob&&!O&&!e.eager)){if(c.value="loading",p.value.lazySrc){const A=new Image;A.src=p.value.lazySrc,C(A,null)}p.value.src&&At(()=>{var A;n("loadstart",((A=u.value)==null?void 0:A.currentSrc)||p.value.src),setTimeout(()=>{var D;if(!a.isUnmounted)if((D=u.value)!=null&&D.complete){if(u.value.naturalWidth||b(),c.value==="error")return;g.value||C(u.value,null),c.value==="loading"&&y()}else g.value||C(u.value),w()})})}}function y(){var O;a.isUnmounted||(w(),C(u.value),c.value="loaded",n("load",((O=u.value)==null?void 0:O.currentSrc)||p.value.src))}function b(){var O;a.isUnmounted||(c.value="error",n("error",((O=u.value)==null?void 0:O.currentSrc)||p.value.src))}function w(){const O=u.value;O&&(l.value=O.currentSrc||O.src)}let S=-1;Pn(()=>{clearTimeout(S)});function C(O){let A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:100;const D=()=>{if(clearTimeout(S),a.isUnmounted)return;const{naturalHeight:H,naturalWidth:z}=O;H||z?(d.value=z,f.value=H):!O.complete&&c.value==="loading"&&A!=null?S=window.setTimeout(D,A):(O.currentSrc.endsWith(".svg")||O.currentSrc.startsWith("data:image/svg+xml"))&&(d.value=1,f.value=1)};D()}const _=I(()=>({"v-img__img--cover":e.cover,"v-img__img--contain":!e.cover})),R=()=>{var D;if(!p.value.src||c.value==="idle")return null;const O=h("img",{class:["v-img__img",_.value],style:{objectPosition:e.position},src:p.value.src,srcset:p.value.srcset,alt:e.alt,crossorigin:e.crossorigin,referrerpolicy:e.referrerpolicy,draggable:e.draggable,sizes:e.sizes,ref:u,onLoad:y,onError:b},null),A=(D=r.sources)==null?void 0:D.call(r);return h(ti,{transition:e.transition,appear:!0},{default:()=>[Jt(A?h("picture",{class:"v-img__picture"},[A,O]):O,[[No,c.value==="loaded"]])]})},T=()=>h(ti,{transition:e.transition},{default:()=>[p.value.lazySrc&&c.value!=="loaded"&&h("img",{class:["v-img__img","v-img__img--preload",_.value],style:{objectPosition:e.position},src:p.value.lazySrc,alt:e.alt,crossorigin:e.crossorigin,referrerpolicy:e.referrerpolicy,draggable:e.draggable},null)]}),x=()=>r.placeholder?h(ti,{transition:e.transition,appear:!0},{default:()=>[(c.value==="loading"||c.value==="error"&&!r.error)&&h("div",{class:"v-img__placeholder"},[r.placeholder()])]}):null,E=()=>r.error?h(ti,{transition:e.transition,appear:!0},{default:()=>[c.value==="error"&&h("div",{class:"v-img__error"},[r.error()])]}):null,P=()=>e.gradient?h("div",{class:"v-img__gradient",style:{backgroundImage:`linear-gradient(${e.gradient})`}},null):null,M=Oe(!1);{const O=xe(g,A=>{A&&(requestAnimationFrame(()=>{requestAnimationFrame(()=>{M.value=!0})}),O())})}return Pe(()=>{const O=j0.filterProps(e);return Jt(h(j0,ve({class:["v-img",{"v-img--absolute":e.absolute,"v-img--booting":!M.value},s.value,o.value,e.class],style:[{width:Ve(e.width==="auto"?d.value:e.width)},i.value,e.style]},O,{aspectRatio:g.value,"aria-label":e.alt,role:e.alt?"img":void 0}),{additional:()=>h(Ce,null,[h(R,null,null),h(T,null,null),h(P,null,null),h(x,null,null),h(E,null,null)]),default:r.default}),[[hr("intersect"),{handler:m,options:e.options},null,{once:!0}]])}),{currentSrc:l,image:u,state:c,naturalWidth:d,naturalHeight:f}}}),Lq=ce({start:Boolean,end:Boolean,icon:Je,image:String,text:String,...fs(),...Ue(),...Or(),...$n(),...bu(),...wt(),...Mt(),...As({variant:"flat"})},"VAvatar"),lt=ke()({name:"VAvatar",props:Lq(),setup(e,t){let{slots:n}=t;const{themeClasses:r}=Kt(e),{borderClasses:s}=Ps(e),{colorClasses:i,colorStyles:o,variantClasses:a}=Wa(e),{densityClasses:l}=hs(e),{roundedClasses:u}=Hn(e),{sizeClasses:c,sizeStyles:d}=Ad(e);return Pe(()=>h(e.tag,{class:["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:[o.value,d.value,e.style]},{default:()=>[n.default?h(It,{key:"content-defaults",defaults:{VImg:{cover:!0,src:e.image},VIcon:{icon:e.icon}}},{default:()=>[n.default()]}):e.image?h(hi,{key:"image",src:e.image,alt:"",cover:!0},null):e.icon?h(X,{key:"icon",icon:e.icon},null):e.text,Bo(!1,"v-avatar")]})),{}}}),Fq=ce({appendAvatar:String,appendIcon:Je,prependAvatar:String,prependIcon:Je,subtitle:[String,Number],title:[String,Number],...Ue(),...Or()},"VCardItem"),Nq=ke()({name:"VCardItem",props:Fq(),setup(e,t){let{slots:n}=t;return Pe(()=>{var u;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("div",{class:["v-card-item",e.class],style:e.style},[s&&h("div",{key:"prepend",class:"v-card-item__prepend"},[n.prepend?h(It,{key:"prepend-defaults",disabled:!r,defaults:{VAvatar:{density:e.density,image:e.prependAvatar},VIcon:{density:e.density,icon:e.prependIcon}}},n.prepend):h(Ce,null,[e.prependAvatar&&h(lt,{key:"prepend-avatar",density:e.density,image:e.prependAvatar},null),e.prependIcon&&h(X,{key:"prepend-icon",density:e.density,icon:e.prependIcon},null)])]),h("div",{class:"v-card-item__content"},[a&&h(on,{key:"title"},{default:()=>{var c;return[((c=n.title)==null?void 0:c.call(n))??e.title]}}),l&&h(bm,{key:"subtitle"},{default:()=>{var c;return[((c=n.subtitle)==null?void 0:c.call(n))??e.subtitle]}}),(u=n.default)==null?void 0:u.call(n)]),o&&h("div",{key:"append",class:"v-card-item__append"},[n.append?h(It,{key:"append-defaults",disabled:!i,defaults:{VAvatar:{density:e.density,image:e.appendAvatar},VIcon:{density:e.density,icon:e.appendIcon}}},n.append):h(Ce,null,[e.appendIcon&&h(X,{key:"append-icon",density:e.density,icon:e.appendIcon},null),e.appendAvatar&&h(lt,{key:"append-avatar",density:e.density,image:e.appendAvatar},null)])])])}),{}}}),Vq=ce({opacity:[Number,String],...Ue(),...wt()},"VCardText"),Zt=ke()({name:"VCardText",props:Vq(),setup(e,t){let{slots:n}=t;return Pe(()=>h(e.tag,{class:["v-card-text",e.class],style:[{"--v-card-text-opacity":e.opacity},e.style]},n)),{}}}),Bq=ce({appendAvatar:String,appendIcon:Je,disabled:Boolean,flat:Boolean,hover:Boolean,image:String,link:{type:Boolean,default:void 0},prependAvatar:String,prependIcon:Je,ripple:{type:[Boolean,Object],default:!0},subtitle:[String,Number],text:[String,Number],title:[String,Number],...fs(),...Ue(),...Or(),...Mr(),...ps(),...jp(),...Uo(),...wu(),...$n(),...Gp(),...wt(),...Mt(),...As({variant:"elevated"})},"VCard"),bt=ke()({name:"VCard",directives:{Ripple:_u},props:Bq(),setup(e,t){let{attrs:n,slots:r}=t;const{themeClasses:s}=Kt(e),{borderClasses:i}=Ps(e),{colorClasses:o,colorStyles:a,variantClasses:l}=Wa(e),{densityClasses:u}=hs(e),{dimensionStyles:c}=Dr(e),{elevationClasses:d}=Is(e),{loaderClasses:f}=Md(e),{locationStyles:p}=Ga(e),{positionClasses:g}=Su(e),{roundedClasses:m}=Hn(e),y=Wp(e,n),b=I(()=>e.link!==!1&&y.isLink.value),w=I(()=>!e.disabled&&e.link!==!1&&(e.link||y.isClickable.value));return Pe(()=>{const S=b.value?"a":e.tag,C=!!(r.title||e.title!=null),_=!!(r.subtitle||e.subtitle!=null),R=C||_,T=!!(r.append||e.appendAvatar||e.appendIcon),x=!!(r.prepend||e.prependAvatar||e.prependIcon),E=!!(r.image||e.image),P=R||x||T,M=!!(r.text||e.text!=null);return Jt(h(S,ve({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":w.value},s.value,i.value,o.value,u.value,d.value,f.value,g.value,m.value,l.value,e.class],style:[a.value,c.value,p.value,e.style],onClick:w.value&&y.navigate,tabindex:e.disabled?-1:void 0},y.linkProps),{default:()=>{var O;return[E&&h("div",{key:"image",class:"v-card__image"},[r.image?h(It,{key:"image-defaults",disabled:!e.image,defaults:{VImg:{cover:!0,src:e.image}}},r.image):h(hi,{key:"image-img",cover:!0,src:e.image},null)]),h(qp,{name:"v-card",active:!!e.loading,color:typeof e.loading=="boolean"?void 0:e.loading},{default:r.loader}),P&&h(Nq,{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}),M&&h(Zt,{key:"text"},{default:()=>{var A;return[((A=r.text)==null?void 0:A.call(r))??e.text]}}),(O=r.default)==null?void 0:O.call(r),r.actions&&h(Dn,null,{default:r.actions}),Bo(w.value,"v-card")]}}),[[hr("ripple"),w.value&&e.ripple]])}),{}}}),YI=Symbol.for("vuetify:goto");function XI(){return{container:void 0,duration:300,layout:!1,offset:0,easing:"easeInOutCubic",patterns:{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}}}function Uq(e){return Tw(e)??(document.scrollingElement||document.body)}function Tw(e){return typeof e=="string"?document.querySelector(e):Mb(e)}function Pg(e,t,n){if(typeof e=="number")return t&&n?-e:e;let r=Tw(e),s=0;for(;r;)s+=t?r.offsetLeft:r.offsetTop,r=r.offsetParent;return s}function Hq(e,t){return{rtl:t.isRtl,options:Zn(XI(),e)}}async function q0(e,t,n,r){const s=n?"scrollLeft":"scrollTop",i=Zn((r==null?void 0:r.options)??XI(),t),o=r==null?void 0:r.rtl.value,a=(typeof e=="number"?e:Tw(e))??0,l=i.container==="parent"&&a instanceof HTMLElement?a.parentElement:Uq(i.container),u=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=Pg(a,n,o);else if(c=Pg(a,n,o)-Pg(l,n,o),i.layout){const g=window.getComputedStyle(a).getPropertyValue("--v-layout-top");g&&(c-=parseInt(g,10))}c+=i.offset,c=jq(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 g(m){const b=(m-f)/i.duration,w=Math.floor(d+(c-d)*u(Tr(b,0,1)));if(l[s]=w,b>=1&&Math.abs(w-l[s])<10)return p(c);if(b>2)return p(l[s]);requestAnimationFrame(g)}))}function zq(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=Ke(YI),{isRtl:n}=$r();if(!t)throw new Error("[Vuetify] Could not find injected goto instance");const r={...t,rtl:I(()=>t.rtl.value||n.value)};async function s(i,o){return q0(i,Zn(e,o),!1,r)}return s.horizontal=async(i,o)=>q0(i,Zn(e,o),!0,r),s}function jq(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),Math.max(Math.min(t,u),l)}function qq(e){let{selectedElement:t,containerElement:n,isRtl:r,isHorizontal:s}=e;const i=Jc(s,n),o=QI(s,r,n),a=Jc(s,t),l=JI(s,t),u=a*.4;return o>l?l-u:o+i<l+a?l-i+a+u:o}function Wq(e){let{selectedElement:t,containerElement:n,isHorizontal:r}=e;const s=Jc(r,n),i=JI(r,t),o=Jc(r,t);return i-s/2+o/2}function W0(e,t){const n=e?"scrollWidth":"scrollHeight";return(t==null?void 0:t[n])||0}function Gq(e,t){const n=e?"clientWidth":"clientHeight";return(t==null?void 0:t[n])||0}function QI(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 Jc(e,t){const n=e?"offsetWidth":"offsetHeight";return(t==null?void 0:t[n])||0}function JI(e,t){const n=e?"offsetLeft":"offsetTop";return(t==null?void 0:t[n])||0}const Kq=Symbol.for("vuetify:v-slide-group"),ZI=ce({centerActive:Boolean,direction:{type:String,default:"horizontal"},symbol:{type:null,default:Kq},nextIcon:{type:Je,default:"$next"},prevIcon:{type:Je,default:"$prev"},showArrows:{type:[Boolean,String],validator:e=>typeof e=="boolean"||["always","desktop","mobile"].includes(e)},...Ue(),...Ka({mobile:null}),...wt(),...Rd({selectedClass:"v-slide-group-item--active"})},"VSlideGroup"),G0=ke()({name:"VSlideGroup",props:ZI(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{isRtl:r}=$r(),{displayClasses:s,mobile:i}=ci(e),o=yu(e,e.symbol),a=Oe(!1),l=Oe(0),u=Oe(0),c=Oe(0),d=I(()=>e.direction==="horizontal"),{resizeRef:f,contentRect:p}=Da(),{resizeRef:g,contentRect:m}=Da(),y=zq(),b=I(()=>({container:f.el,duration:200,easing:"easeOutQuart"})),w=I(()=>o.selected.value.length?o.items.value.findIndex(G=>G.id===o.selected.value[0]):-1),S=I(()=>o.selected.value.length?o.items.value.findIndex(G=>G.id===o.selected.value[o.selected.value.length-1]):-1);if(kt){let G=-1;xe(()=>[o.selected.value,p.value,m.value,d.value],()=>{cancelAnimationFrame(G),G=requestAnimationFrame(()=>{if(p.value&&m.value){const te=d.value?"width":"height";u.value=p.value[te],c.value=m.value[te],a.value=u.value+1<c.value}if(w.value>=0&&g.el){const te=g.el.children[S.value];_(te,e.centerActive)}})})}const C=Oe(!1);function _(G,te){let W=0;te?W=Wq({containerElement:f.el,isHorizontal:d.value,selectedElement:G}):W=qq({containerElement:f.el,isHorizontal:d.value,isRtl:r.value,selectedElement:G}),R(W)}function R(G){if(!kt||!f.el)return;const te=Jc(d.value,f.el),W=QI(d.value,r.value,f.el);if(!(W0(d.value,f.el)<=te||Math.abs(G-W)<16)){if(d.value&&r.value&&f.el){const{scrollWidth:pe,offsetWidth:ae}=f.el;G=pe-ae-G}d.value?y.horizontal(G,b.value):y(G,b.value)}}function T(G){const{scrollTop:te,scrollLeft:W}=G.target;l.value=d.value?W:te}function x(G){if(C.value=!0,!(!a.value||!g.el)){for(const te of G.composedPath())for(const W of g.el.children)if(W===te){_(W);return}}}function E(G){C.value=!1}let P=!1;function M(G){var te;!P&&!C.value&&!(G.relatedTarget&&((te=g.el)!=null&&te.contains(G.relatedTarget)))&&D(),P=!1}function O(){P=!0}function A(G){if(!g.el)return;function te(W){G.preventDefault(),D(W)}d.value?G.key==="ArrowRight"?te(r.value?"prev":"next"):G.key==="ArrowLeft"&&te(r.value?"next":"prev"):G.key==="ArrowDown"?te("next"):G.key==="ArrowUp"&&te("prev"),G.key==="Home"?te("first"):G.key==="End"&&te("last")}function D(G){var W,J;if(!g.el)return;let te;if(!G)te=Nc(g.el)[0];else if(G==="next"){if(te=(W=g.el.querySelector(":focus"))==null?void 0:W.nextElementSibling,!te)return D("first")}else if(G==="prev"){if(te=(J=g.el.querySelector(":focus"))==null?void 0:J.previousElementSibling,!te)return D("last")}else G==="first"?te=g.el.firstElementChild:G==="last"&&(te=g.el.lastElementChild);te&&te.focus({preventScroll:!0})}function H(G){const te=d.value&&r.value?-1:1,W=(G==="prev"?-te:te)*u.value;let J=l.value+W;if(d.value&&r.value&&f.el){const{scrollWidth:pe,offsetWidth:ae}=f.el;J+=pe-ae}R(J)}const z=I(()=>({next:o.next,prev:o.prev,select:o.select,isSelected:o.isSelected})),Y=I(()=>{switch(e.showArrows){case"always":return!0;case"desktop":return!i.value;case!0:return a.value||Math.abs(l.value)>0;case"mobile":return i.value||a.value||Math.abs(l.value)>0;default:return!i.value&&(a.value||Math.abs(l.value)>0)}}),q=I(()=>Math.abs(l.value)>1),V=I(()=>{if(!f.value)return!1;const G=W0(d.value,f.el),te=Gq(d.value,f.el);return G-te-Math.abs(l.value)>1});return Pe(()=>h(e.tag,{class:["v-slide-group",{"v-slide-group--vertical":!d.value,"v-slide-group--has-affixes":Y.value,"v-slide-group--is-overflowing":a.value},s.value,e.class],style:e.style,tabindex:C.value||o.selected.value.length?-1:0,onFocus:M},{default:()=>{var G,te,W;return[Y.value&&h("div",{key:"prev",class:["v-slide-group__prev",{"v-slide-group__prev--disabled":!q.value}],onMousedown:O,onClick:()=>q.value&&H("prev")},[((G=n.prev)==null?void 0:G.call(n,z.value))??h(Q_,null,{default:()=>[h(X,{icon:r.value?e.nextIcon:e.prevIcon},null)]})]),h("div",{key:"container",ref:f,class:"v-slide-group__container",onScroll:T},[h("div",{ref:g,class:"v-slide-group__content",onFocusin:x,onFocusout:E,onKeydown:A},[(te=n.default)==null?void 0:te.call(n,z.value)])]),Y.value&&h("div",{key:"next",class:["v-slide-group__next",{"v-slide-group__next--disabled":!V.value}],onMousedown:O,onClick:()=>V.value&&H("next")},[((W=n.next)==null?void 0:W.call(n,z.value))??h(Q_,null,{default:()=>[h(X,{icon:r.value?e.prevIcon:e.nextIcon},null)]})])]}})),{selected:o.selected,scrollTo:H,scrollOffset:l,focus:D,hasPrev:q,hasNext:V}}}),eA=Symbol.for("vuetify:v-chip-group"),Yq=ce({column:Boolean,filter:Boolean,valueComparator:{type:Function,default:Vo},...ZI(),...Ue(),...Rd({selectedClass:"v-chip--selected"}),...wt(),...Mt(),...As({variant:"tonal"})},"VChipGroup"),ap=ke()({name:"VChipGroup",props:Yq(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{themeClasses:r}=Kt(e),{isSelected:s,select:i,next:o,prev:a,selected:l}=yu(e,eA);return Ar({VChip:{color:Te(e,"color"),disabled:Te(e,"disabled"),filter:Te(e,"filter"),variant:Te(e,"variant")}}),Pe(()=>{const u=G0.filterProps(e);return h(G0,ve(u,{class:["v-chip-group",{"v-chip-group--column":e.column},r.value,e.class],style:e.style}),{default:()=>{var c;return[(c=n.default)==null?void 0:c.call(n,{isSelected:s,select:i,next:o,prev:a,selected:l.value})]}})}),{}}}),Xq=ce({activeClass:String,appendAvatar:String,appendIcon:Je,closable:Boolean,closeIcon:{type:Je,default:"$delete"},closeLabel:{type:String,default:"$vuetify.close"},draggable:Boolean,filter:Boolean,filterIcon:{type:String,default:"$complete"},label:Boolean,link:{type:Boolean,default:void 0},pill:Boolean,prependAvatar:String,prependIcon:Je,ripple:{type:[Boolean,Object],default:!0},text:String,modelValue:{type:Boolean,default:!0},onClick:Bn(),onClickOnce:Bn(),...fs(),...Ue(),...Or(),...ps(),...Pd(),...$n(),...Gp(),...bu(),...wt({tag:"span"}),...Mt(),...As({variant:"tonal"})},"VChip"),Sn=ke()({name:"VChip",directives:{Ripple:_u},props:Xq(),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}=Gr(),{borderClasses:o}=Ps(e),{colorClasses:a,colorStyles:l,variantClasses:u}=Wa(e),{densityClasses:c}=hs(e),{elevationClasses:d}=Is(e),{roundedClasses:f}=Hn(e),{sizeClasses:p}=Ad(e),{themeClasses:g}=Kt(e),m=rt(e,"modelValue"),y=Id(e,eA,!1),b=Wp(e,n),w=I(()=>e.link!==!1&&b.isLink.value),S=I(()=>!e.disabled&&e.link!==!1&&(!!y||e.link||b.isClickable.value)),C=I(()=>({"aria-label":i(e.closeLabel),onClick(T){T.preventDefault(),T.stopPropagation(),m.value=!1,r("click:close",T)}}));function _(T){var x;r("click",T),S.value&&((x=b.navigate)==null||x.call(b,T),y==null||y.toggle())}function R(T){(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),_(T))}return()=>{const T=b.isLink.value?"a":e.tag,x=!!(e.appendIcon||e.appendAvatar),E=!!(x||s.append),P=!!(s.close||e.closable),M=!!(s.filter||e.filter)&&y,O=!!(e.prependIcon||e.prependAvatar),A=!!(O||s.prepend),D=!y||y.isSelected.value;return m.value&&Jt(h(T,ve({class:["v-chip",{"v-chip--disabled":e.disabled,"v-chip--label":e.label,"v-chip--link":S.value,"v-chip--filter":M,"v-chip--pill":e.pill},g.value,o.value,D?a.value:void 0,c.value,d.value,f.value,p.value,u.value,y==null?void 0:y.selectedClass.value,e.class],style:[D?l.value:void 0,e.style],disabled:e.disabled||void 0,draggable:e.draggable,tabindex:S.value?0:void 0,onClick:_,onKeydown:S.value&&!w.value&&R},b.linkProps),{default:()=>{var H;return[Bo(S.value,"v-chip"),M&&h(YT,{key:"filter"},{default:()=>[Jt(h("div",{class:"v-chip__filter"},[s.filter?h(It,{key:"filter-defaults",disabled:!e.filterIcon,defaults:{VIcon:{icon:e.filterIcon}}},s.filter):h(X,{key:"filter-icon",icon:e.filterIcon},null)]),[[No,y.isSelected.value]])]}),A&&h("div",{key:"prepend",class:"v-chip__prepend"},[s.prepend?h(It,{key:"prepend-defaults",disabled:!O,defaults:{VAvatar:{image:e.prependAvatar,start:!0},VIcon:{icon:e.prependIcon,start:!0}}},s.prepend):h(Ce,null,[e.prependIcon&&h(X,{key:"prepend-icon",icon:e.prependIcon,start:!0},null),e.prependAvatar&&h(lt,{key:"prepend-avatar",image:e.prependAvatar,start:!0},null)])]),h("div",{class:"v-chip__content","data-no-activator":""},[((H=s.default)==null?void 0:H.call(s,{isSelected:y==null?void 0:y.isSelected.value,selectedClass:y==null?void 0:y.selectedClass.value,select:y==null?void 0:y.select,toggle:y==null?void 0:y.toggle,value:y==null?void 0:y.value.value,disabled:e.disabled}))??e.text]),E&&h("div",{key:"append",class:"v-chip__append"},[s.append?h(It,{key:"append-defaults",disabled:!x,defaults:{VAvatar:{end:!0,image:e.appendAvatar},VIcon:{end:!0,icon:e.appendIcon}}},s.append):h(Ce,null,[e.appendIcon&&h(X,{key:"append-icon",end:!0,icon:e.appendIcon},null),e.appendAvatar&&h(lt,{key:"append-avatar",end:!0,image:e.appendAvatar},null)])]),P&&h("button",ve({key:"close",class:"v-chip__close",type:"button","data-testid":"close-chip"},C.value),[s.close?h(It,{key:"close-defaults",defaults:{VIcon:{icon:e.closeIcon,size:"x-small"}}},s.close):h(X,{key:"close-icon",icon:e.closeIcon,size:"x-small"},null)])]}}),[[hr("ripple"),S.value&&e.ripple,null]])}}}),Qq=ce({fluid:{type:Boolean,default:!1},...Ue(),...Mr(),...wt()},"VContainer"),Tn=ke()({name:"VContainer",props:Qq(),setup(e,t){let{slots:n}=t;const{rtlClasses:r}=$r(),{dimensionStyles:s}=Dr(e);return Pe(()=>h(e.tag,{class:["v-container",{"v-container--fluid":e.fluid},r.value,e.class],style:[s.value,e.style]},n)),{}}}),tA=Kp.reduce((e,t)=>(e[t]={type:[Boolean,String,Number],default:!1},e),{}),nA=Kp.reduce((e,t)=>{const n="offset"+li(t);return e[n]={type:[String,Number],default:null},e},{}),rA=Kp.reduce((e,t)=>{const n="order"+li(t);return e[n]={type:[String,Number],default:null},e},{}),K0={col:Object.keys(tA),offset:Object.keys(nA),order:Object.keys(rA)};function Jq(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 Zq=["auto","start","end","center","baseline","stretch"],eW=ce({cols:{type:[Boolean,String,Number],default:!1},...tA,offset:{type:[String,Number],default:null},...nA,order:{type:[String,Number],default:null},...rA,alignSelf:{type:String,default:null,validator:e=>Zq.includes(e)},...Ue(),...wt()},"VCol"),He=ke()({name:"VCol",props:eW(),setup(e,t){let{slots:n}=t;const r=I(()=>{const s=[];let i;for(i in K0)K0[i].forEach(a=>{const l=e[a],u=Jq(i,a,l);u&&s.push(u)});const o=s.some(a=>a.startsWith("v-col-"));return s.push({"v-col":!o||!e.cols,[`v-col-${e.cols}`]:e.cols,[`offset-${e.offset}`]:e.offset,[`order-${e.order}`]:e.order,[`align-self-${e.alignSelf}`]:e.alignSelf}),s});return()=>{var s;return Ir(e.tag,{class:[r.value,e.class],style:e.style},(s=n.default)==null?void 0:s.call(n))}}}),Rw=["start","end","center"],sA=["space-between","space-around","space-evenly"];function Pw(e,t){return Kp.reduce((n,r)=>{const s=e+li(r);return n[s]=t(),n},{})}const tW=[...Rw,"baseline","stretch"],iA=e=>tW.includes(e),oA=Pw("align",()=>({type:String,default:null,validator:iA})),nW=[...Rw,...sA],aA=e=>nW.includes(e),lA=Pw("justify",()=>({type:String,default:null,validator:aA})),rW=[...Rw,...sA,"stretch"],uA=e=>rW.includes(e),cA=Pw("alignContent",()=>({type:String,default:null,validator:uA})),Y0={align:Object.keys(oA),justify:Object.keys(lA),alignContent:Object.keys(cA)},sW={align:"align",justify:"justify",alignContent:"align-content"};function iW(e,t,n){let r=sW[e];if(n!=null){if(t){const s=t.replace(e,"");r+=`-${s}`}return r+=`-${n}`,r.toLowerCase()}}const oW=ce({dense:Boolean,noGutters:Boolean,align:{type:String,default:null,validator:iA},...oA,justify:{type:String,default:null,validator:aA},...lA,alignContent:{type:String,default:null,validator:uA},...cA,...Ue(),...wt()},"VRow"),ot=ke()({name:"VRow",props:oW(),setup(e,t){let{slots:n}=t;const r=I(()=>{const s=[];let i;for(i in Y0)Y0[i].forEach(o=>{const a=e[o],l=iW(i,o,a);l&&s.push(l)});return s.push({"v-row--no-gutters":e.noGutters,"v-row--dense":e.dense,[`align-${e.align}`]:e.align,[`justify-${e.justify}`]:e.justify,[`align-content-${e.alignContent}`]:e.alignContent}),s});return()=>{var s;return Ir(e.tag,{class:["v-row",r.value,e.class],style:e.style},(s=n.default)==null?void 0:s.call(n))}}}),vn=vu("v-spacer","div","VSpacer"),aW=De({__name:"PrinterControlDialog",setup(e){const t=en(tn.PrinterControlDialog),n=Lt(),r=nr(),s=I(()=>{var d;return(d=t.context())==null?void 0:d.printerId}),i=I(()=>{if(s.value)return n.printer(s.value)}),o=B(10),a=I(()=>{var f,p,g,m,y,b,w,S,C,_;const d=r.printerEventsById[s.value];return(g=(p=(f=d==null?void 0:d.current)==null?void 0:f.payload)==null?void 0:p.temps)!=null&&g.length&&((w=(b=(y=(m=d==null?void 0:d.current)==null?void 0:m.payload)==null?void 0:y.temps[0])==null?void 0:b.tool0)!=null&&w.actual)?(_=(C=(S=d==null?void 0:d.current)==null?void 0:S.payload)==null?void 0:C.temps[0])==null?void 0:_.tool0:null}),l=async(d,f,p)=>{await jt.sendPrinterJogCommand(s.value,{x:d*o.value,y:f*o.value,z:p*o.value})},u=async d=>{await jt.sendPrinterHomeCommand(s.value,d)},c=()=>{t.closeDialog()};return(d,f)=>{const p=di;return L(),Z(p,{id:Q(t).dialogId,"max-width":"700px",onEscape:f[14]||(f[14]=g=>c())},{default:v(()=>[h(bt,null,{default:v(()=>[h(on,null,{default:v(()=>f[15]||(f[15]=[k(" Printer Controls ")])),_:1}),h(Zt,null,{default:v(()=>[i.value?(L(),Z(Tn,{key:0},{default:v(()=>[h(ot,null,{default:v(()=>[h(He,{cols:12},{default:v(()=>{var g;return[k(" Printer: "+ie((g=i.value)==null?void 0:g.name)+" ",1),f[16]||(f[16]=$("br",null,null,-1)),h(Sn,{color:"primary"},{default:v(()=>{var m,y;return[k(ie((m=a.value)==null?void 0:m.actual)+"C / "+ie((y=a.value)==null?void 0:y.target)+"C ",1)]}),_:1})]}),_:1})]),_:1}),h(ot,null,{default:v(()=>[h(He,{cols:8},{default:v(()=>[f[26]||(f[26]=k(" X/Y ")),f[27]||(f[27]=$("br",null,null,-1)),h(re,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[0]||(f[0]=g=>l(-1,1,0))},{default:v(()=>[h(X,null,{default:v(()=>f[17]||(f[17]=[k("north_west")])),_:1})]),_:1}),h(re,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[1]||(f[1]=g=>l(0,1,0))},{default:v(()=>[h(X,null,{default:v(()=>f[18]||(f[18]=[k("north")])),_:1})]),_:1}),h(re,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[2]||(f[2]=g=>l(1,1,0))},{default:v(()=>[h(X,null,{default:v(()=>f[19]||(f[19]=[k("north_east")])),_:1})]),_:1}),f[28]||(f[28]=$("br",null,null,-1)),h(re,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[3]||(f[3]=g=>l(-1,0,0))},{default:v(()=>[h(X,null,{default:v(()=>f[20]||(f[20]=[k("west")])),_:1})]),_:1}),h(re,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[4]||(f[4]=g=>u(["x","y"]))},{default:v(()=>[h(X,null,{default:v(()=>f[21]||(f[21]=[k("home")])),_:1})]),_:1}),h(re,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[5]||(f[5]=g=>l(1,0,0))},{default:v(()=>[h(X,null,{default:v(()=>f[22]||(f[22]=[k("east")])),_:1})]),_:1}),f[29]||(f[29]=$("br",null,null,-1)),h(re,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[6]||(f[6]=g=>l(-1,-1,0))},{default:v(()=>[h(X,null,{default:v(()=>f[23]||(f[23]=[k("south_west")])),_:1})]),_:1}),h(re,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[7]||(f[7]=g=>l(0,-1,0))},{default:v(()=>[h(X,null,{default:v(()=>f[24]||(f[24]=[k("south")])),_:1})]),_:1}),h(re,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[8]||(f[8]=g=>l(1,-1,0))},{default:v(()=>[h(X,null,{default:v(()=>f[25]||(f[25]=[k("south_east")])),_:1})]),_:1})]),_:1}),h(He,{cols:"4"},{default:v(()=>[f[33]||(f[33]=k(" Z ")),f[34]||(f[34]=$("br",null,null,-1)),h(re,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[9]||(f[9]=g=>l(0,0,1))},{default:v(()=>[h(X,null,{default:v(()=>f[30]||(f[30]=[k("north")])),_:1})]),_:1}),f[35]||(f[35]=$("br",null,null,-1)),h(re,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[10]||(f[10]=g=>u(["z"]))},{default:v(()=>[h(X,null,{default:v(()=>f[31]||(f[31]=[k("home")])),_:1})]),_:1}),f[36]||(f[36]=$("br",null,null,-1)),h(re,{class:"bg-primary",variant:"outlined",size:"x-large",onClick:f[11]||(f[11]=g=>l(1,0,1))},{default:v(()=>[h(X,null,{default:v(()=>f[32]||(f[32]=[k("south")])),_:1})]),_:1})]),_:1})]),_:1}),h(ot,null,{default:v(()=>[h(He,{cols:"12"},{default:v(()=>[h(RT,{modelValue:o.value,"onUpdate:modelValue":f[12]||(f[12]=g=>o.value=g)},{default:v(()=>[h(re,{value:.1},{default:v(()=>f[37]||(f[37]=[k(" 0.1 ")])),_:1}),h(re,{value:1},{default:v(()=>f[38]||(f[38]=[k(" 1 ")])),_:1}),h(re,{value:10},{default:v(()=>f[39]||(f[39]=[k(" 10 ")])),_:1}),h(re,{value:100},{default:v(()=>f[40]||(f[40]=[k(" 100 ")])),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1})):he("",!0)]),_:1}),h(Dn,null,{default:v(()=>[h(vn),h(re,{variant:"text",onClick:f[13]||(f[13]=g=>c())},{default:v(()=>f[41]||(f[41]=[k(" Close ")])),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}});class xl extends vr{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 ia=(e=>(e[e.PrinterNotAvailable=0]="PrinterNotAvailable",e[e.NoLastPrint=1]="NoLastPrint",e[e.LastPrintReady=2]="LastPrintReady",e))(ia||{});function lW(e){return e.message?`${e.message}
|
|
63
|
-
${e.stack}`:`'${e}'`}const uW=vu("v-alert-title"),cW=["success","info","warning","error"],dW=ce({border:{type:[Boolean,String],validator:e=>typeof e=="boolean"||["top","end","bottom","start"].includes(e)},borderColor:String,closable:Boolean,closeIcon:{type:Je,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=>cW.includes(e)},...Ue(),...Or(),...Mr(),...ps(),...Uo(),...wu(),...$n(),...wt(),...Mt(),...As({variant:"flat"})},"VAlert"),nn=ke()({name:"VAlert",props:dW(),emits:{"click:close":e=>!0,"update:modelValue":e=>!0},setup(e,t){let{emit:n,slots:r}=t;const s=rt(e,"modelValue"),i=I(()=>{if(e.icon!==!1)return e.type?e.icon??`$${e.type}`:e.icon}),o=I(()=>({color:e.color??e.type,variant:e.variant})),{themeClasses:a}=Kt(e),{colorClasses:l,colorStyles:u,variantClasses:c}=Wa(o),{densityClasses:d}=hs(e),{dimensionStyles:f}=Dr(e),{elevationClasses:p}=Is(e),{locationStyles:g}=Ga(e),{positionClasses:m}=Su(e),{roundedClasses:y}=Hn(e),{textColorClasses:b,textColorStyles:w}=Es(Te(e,"borderColor")),{t:S}=Gr(),C=I(()=>({"aria-label":S(e.closeLabel),onClick(_){s.value=!1,n("click:close",_)}}));return()=>{const _=!!(r.prepend||i.value),R=!!(r.title||e.title),T=!!(r.close||e.closable);return s.value&&h(e.tag,{class:["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:[u.value,f.value,g.value,e.style],role:"alert"},{default:()=>{var x,E;return[Bo(!1,"v-alert"),e.border&&h("div",{key:"border",class:["v-alert__border",b.value],style:w.value},null),_&&h("div",{key:"prepend",class:"v-alert__prepend"},[r.prepend?h(It,{key:"prepend-defaults",disabled:!i.value,defaults:{VIcon:{density:e.density,icon:i.value,size:e.prominent?44:28}}},r.prepend):h(X,{key:"prepend-icon",density:e.density,icon:i.value,size:e.prominent?44:28},null)]),h("div",{class:"v-alert__content"},[R&&h(uW,{key:"title"},{default:()=>{var P;return[((P=r.title)==null?void 0:P.call(r))??e.title]}}),((x=r.text)==null?void 0:x.call(r))??e.text,(E=r.default)==null?void 0:E.call(r)]),r.append&&h("div",{key:"append",class:"v-alert__append"},[r.append()]),T&&h("div",{key:"close",class:"v-alert__close"},[r.close?h(It,{key:"close-defaults",defaults:{VBtn:{icon:e.closeIcon,size:"x-small",variant:"text"}}},{default:()=>{var P;return[(P=r.close)==null?void 0:P.call(r,{props:C.value})]}}):h(re,ve({key:"close-btn",icon:e.closeIcon,size:"x-small",variant:"text"},C.value),null)])]}})}}}),Sy=Symbol.for("vuetify:list");function dA(){const e=Ke(Sy,{hasPrepend:Oe(!1),updateHasPrepend:()=>null}),t={hasPrepend:Oe(!1),updateHasPrepend:n=>{n&&(t.hasPrepend.value=n)}};return Wt(Sy,t),e}function fA(){return Ke(Sy,null)}const Iw=e=>{const t={activate:n=>{let{id:r,value:s,activated:i}=n;return r=Be(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 On(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},hA=e=>{const t=Iw(e);return{activate:r=>{let{activated:s,id:i,...o}=r;i=Be(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=On(r);a.length&&(o=t.in(a.slice(0,1),s,i))}return o},out:(r,s,i)=>t.out(r,s,i)}},fW=e=>{const t=Iw(e);return{activate:r=>{let{id:s,activated:i,children:o,...a}=r;return s=Be(s),o.has(s)?i:t.activate({id:s,activated:i,children:o,...a})},in:t.in,out:t.out}},hW=e=>{const t=hA(e);return{activate:r=>{let{id:s,activated:i,children:o,...a}=r;return s=Be(s),o.has(s)?i:t.activate({id:s,activated:i,children:o,...a})},in:t.in,out:t.out}},pW={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},pA={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},mW={open:pA.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)}},Aw=e=>{const t={select:n=>{let{id:r,value:s,selected:i}=n;if(r=Be(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)=>{let i=new Map;for(const o of n||[])i=t.select({id:o,value:!0,selected:new Map(i),children:r,parents:s});return i},out:n=>{const r=[];for(const[s,i]of n.entries())i==="on"&&r.push(s);return r}};return t},mA=e=>{const t=Aw(e);return{select:r=>{let{selected:s,id:i,...o}=r;i=Be(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)=>{let o=new Map;return r!=null&&r.length&&(o=t.in(r.slice(0,1),s,i)),o},out:(r,s,i)=>t.out(r,s,i)}},gW=e=>{const t=Aw(e);return{select:r=>{let{id:s,selected:i,children:o,...a}=r;return s=Be(s),o.has(s)?i:t.select({id:s,selected:i,children:o,...a})},in:t.in,out:t.out}},vW=e=>{const t=mA(e);return{select:r=>{let{id:s,selected:i,children:o,...a}=r;return s=Be(s),o.has(s)?i:t.select({id:s,selected:i,children:o,...a})},in:t.in,out:t.out}},yW=e=>{const t={select:n=>{let{id:r,value:s,selected:i,children:o,parents:a}=n;r=Be(r);const l=new Map(i),u=[r];for(;u.length;){const d=u.shift();i.set(Be(d),s?"on":"off"),o.has(d)&&u.push(...o.get(d))}let c=Be(a.get(r));for(;c;){const d=o.get(c),f=d.every(g=>i.get(Be(g))==="on"),p=d.every(g=>!i.has(Be(g))||i.get(Be(g))==="off");i.set(c,f?"on":p?"off":"indeterminate"),c=Be(a.get(c))}return e&&!s&&Array.from(i.entries()).reduce((f,p)=>{let[g,m]=p;return m==="on"&&f.push(g),f},[]).length===0?l:i},in:(n,r,s)=>{let i=new Map;for(const o of n||[])i=t.select({id:o,value:!0,selected:new Map(i),children:r,parents:s});return i},out:(n,r)=>{const s=[];for(const[i,o]of n.entries())o==="on"&&!r.has(i)&&s.push(i);return s}};return t},Zc=Symbol.for("vuetify:nested"),gA={id:Oe(),root:{register:()=>null,unregister:()=>null,parents:B(new Map),children:B(new Map),open:()=>null,openOnSelect:()=>null,activate:()=>null,select:()=>null,activatable:B(!1),selectable:B(!1),opened:B(new Set),activated:B(new Set),selected:B(new Map),selectedValues:B([]),getPath:()=>[]}},bW=ce({activatable:Boolean,selectable:Boolean,activeStrategy:[String,Function,Object],selectStrategy:[String,Function,Object],openStrategy:[String,Object],opened:null,activated:null,selected:null,mandatory:Boolean},"nested"),wW=e=>{let t=!1;const n=B(new Map),r=B(new Map),s=rt(e,"opened",e.opened,g=>new Set(g),g=>[...g.values()]),i=I(()=>{if(typeof e.activeStrategy=="object")return e.activeStrategy;if(typeof e.activeStrategy=="function")return e.activeStrategy(e.mandatory);switch(e.activeStrategy){case"leaf":return fW(e.mandatory);case"single-leaf":return hW(e.mandatory);case"independent":return Iw(e.mandatory);case"single-independent":default:return hA(e.mandatory)}}),o=I(()=>{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 vW(e.mandatory);case"leaf":return gW(e.mandatory);case"independent":return Aw(e.mandatory);case"single-independent":return mA(e.mandatory);case"classic":default:return yW(e.mandatory)}}),a=I(()=>{if(typeof e.openStrategy=="object")return e.openStrategy;switch(e.openStrategy){case"list":return mW;case"single":return pW;case"multiple":default:return pA}}),l=rt(e,"activated",e.activated,g=>i.value.in(g,n.value,r.value),g=>i.value.out(g,n.value,r.value)),u=rt(e,"selected",e.selected,g=>o.value.in(g,n.value,r.value),g=>o.value.out(g,n.value,r.value));Pn(()=>{t=!0});function c(g){const m=[];let y=g;for(;y!=null;)m.unshift(y),y=r.value.get(y);return m}const d=sn("nested"),f=new Set,p={id:Oe(),root:{opened:s,activatable:Te(e,"activatable"),selectable:Te(e,"selectable"),activated:l,selected:u,selectedValues:I(()=>{const g=[];for(const[m,y]of u.value.entries())y==="on"&&g.push(m);return g}),register:(g,m,y)=>{if(f.has(g)){c(g).map(String).join(" -> "),c(m).concat(g).map(String).join(" -> ");return}else f.add(g);m&&g!==m&&r.value.set(g,m),y&&n.value.set(g,[]),m!=null&&n.value.set(m,[...n.value.get(m)||[],g])},unregister:g=>{if(t)return;f.delete(g),n.value.delete(g);const m=r.value.get(g);if(m){const y=n.value.get(m)??[];n.value.set(m,y.filter(b=>b!==g))}r.value.delete(g)},open:(g,m,y)=>{d.emit("click:open",{id:g,value:m,path:c(g),event:y});const b=a.value.open({id:g,value:m,opened:new Set(s.value),children:n.value,parents:r.value,event:y});b&&(s.value=b)},openOnSelect:(g,m,y)=>{const b=a.value.select({id:g,value:m,selected:new Map(u.value),opened:new Set(s.value),children:n.value,parents:r.value,event:y});b&&(s.value=b)},select:(g,m,y)=>{d.emit("click:select",{id:g,value:m,path:c(g),event:y});const b=o.value.select({id:g,value:m,selected:new Map(u.value),children:n.value,parents:r.value,event:y});b&&(u.value=b),p.root.openOnSelect(g,m,y)},activate:(g,m,y)=>{if(!e.activatable)return p.root.select(g,!0,y);d.emit("click:activate",{id:g,value:m,path:c(g),event:y});const b=i.value.activate({id:g,value:m,activated:new Set(l.value),children:n.value,parents:r.value,event:y});b&&(l.value=b)},children:n,parents:r,getPath:c}};return Wt(Zc,p),p.root},vA=(e,t)=>{const n=Ke(Zc,gA),r=Symbol(gr()),s=I(()=>e.value!==void 0?e.value:r),i={...n,id:s,open:(o,a)=>n.root.open(s.value,o,a),openOnSelect:(o,a)=>n.root.openOnSelect(s.value,o,a),isOpen:I(()=>n.root.opened.value.has(s.value)),parent:I(()=>n.root.parents.value.get(s.value)),activate:(o,a)=>n.root.activate(s.value,o,a),isActivated:I(()=>n.root.activated.value.has(Be(s.value))),select:(o,a)=>n.root.select(s.value,o,a),isSelected:I(()=>n.root.selected.value.get(Be(s.value))==="on"),isIndeterminate:I(()=>n.root.selected.value.get(s.value)==="indeterminate"),isLeaf:I(()=>!n.root.children.value.get(s.value)),isGroupActivator:n.isGroupActivator};return!n.isGroupActivator&&n.root.register(s.value,n.id.value,t),Pn(()=>{!n.isGroupActivator&&n.root.unregister(s.value)}),t&&Wt(Zc,i),i},SW=()=>{const e=Ke(Zc,gA);Wt(Zc,{...e,isGroupActivator:!0})};function qd(){const e=Oe(!1);return St(()=>{window.requestAnimationFrame(()=>{e.value=!0})}),{ssrBootStyles:I(()=>e.value?void 0:{transition:"none !important"}),isBooted:kd(e)}}const _W=gu({name:"VListGroupActivator",setup(e,t){let{slots:n}=t;return SW(),()=>{var r;return(r=n.default)==null?void 0:r.call(n)}}}),kW=ce({activeColor:String,baseColor:String,color:String,collapseIcon:{type:Je,default:"$collapse"},expandIcon:{type:Je,default:"$expand"},prependIcon:Je,appendIcon:Je,fluid:Boolean,subgroup:Boolean,title:String,value:null,...Ue(),...wt()},"VListGroup"),_y=ke()({name:"VListGroup",props:kW(),setup(e,t){let{slots:n}=t;const{isOpen:r,open:s,id:i}=vA(Te(e,"value"),!0),o=I(()=>`v-list-group--id-${String(i.value)}`),a=fA(),{isBooted:l}=qd();function u(p){p.stopPropagation(),s(!r.value,p)}const c=I(()=>({onClick:u,class:"v-list-group__header",id:o.value})),d=I(()=>r.value?e.collapseIcon:e.expandIcon),f=I(()=>({VListItem:{active:r.value,activeColor:e.activeColor,baseColor:e.baseColor,color:e.color,prependIcon:e.prependIcon||e.subgroup&&d.value,appendIcon:e.appendIcon||!e.subgroup&&d.value,title:e.title,value:e.value}}));return Pe(()=>h(e.tag,{class:["v-list-group",{"v-list-group--prepend":a==null?void 0:a.hasPrepend.value,"v-list-group--fluid":e.fluid,"v-list-group--subgroup":e.subgroup,"v-list-group--open":r.value},e.class],style:e.style},{default:()=>[n.activator&&h(It,{defaults:f.value},{default:()=>[h(_W,null,{default:()=>[n.activator({props:c.value,isOpen:r.value})]})]}),h(ti,{transition:{component:KT},disabled:!l.value},{default:()=>{var p;return[Jt(h("div",{class:"v-list-group__items",role:"group","aria-labelledby":o.value},[(p=n.default)==null?void 0:p.call(n)]),[[No,r.value]])]}})]})),{isOpen:r}}}),xW=ce({opacity:[Number,String],...Ue(),...wt()},"VListItemSubtitle"),vt=ke()({name:"VListItemSubtitle",props:xW(),setup(e,t){let{slots:n}=t;return Pe(()=>h(e.tag,{class:["v-list-item-subtitle",e.class],style:[{"--v-list-item-subtitle-opacity":e.opacity},e.style]},n)),{}}}),ut=vu("v-list-item-title"),EW=ce({active:{type:Boolean,default:void 0},activeClass:String,activeColor:String,appendAvatar:String,appendIcon:Je,baseColor:String,disabled:Boolean,lines:[Boolean,String],link:{type:Boolean,default:void 0},nav:Boolean,prependAvatar:String,prependIcon:Je,ripple:{type:[Boolean,Object],default:!0},slim:Boolean,subtitle:[String,Number],title:[String,Number],value:null,onClick:Bn(),onClickOnce:Bn(),...fs(),...Ue(),...Or(),...Mr(),...ps(),...$n(),...Gp(),...wt(),...Mt(),...As({variant:"text"})},"VListItem"),Le=ke()({name:"VListItem",directives:{Ripple:_u},props:EW(),emits:{click:e=>!0},setup(e,t){let{attrs:n,slots:r,emit:s}=t;const i=Wp(e,n),o=I(()=>e.value===void 0?i.href.value:e.value),{activate:a,isActivated:l,select:u,isOpen:c,isSelected:d,isIndeterminate:f,isGroupActivator:p,root:g,parent:m,openOnSelect:y,id:b}=vA(o,!1),w=fA(),S=I(()=>{var W;return e.active!==!1&&(e.active||((W=i.isActive)==null?void 0:W.value)||(g.activatable.value?l.value:d.value))}),C=I(()=>e.link!==!1&&i.isLink.value),_=I(()=>!e.disabled&&e.link!==!1&&(e.link||i.isClickable.value||!!w&&(g.selectable.value||g.activatable.value||e.value!=null))),R=I(()=>e.rounded||e.nav),T=I(()=>e.color??e.activeColor),x=I(()=>({color:S.value?T.value??e.baseColor:e.baseColor,variant:e.variant}));xe(()=>{var W;return(W=i.isActive)==null?void 0:W.value},W=>{W&&m.value!=null&&g.open(m.value,!0),W&&y(W)},{immediate:!0});const{themeClasses:E}=Kt(e),{borderClasses:P}=Ps(e),{colorClasses:M,colorStyles:O,variantClasses:A}=Wa(x),{densityClasses:D}=hs(e),{dimensionStyles:H}=Dr(e),{elevationClasses:z}=Is(e),{roundedClasses:Y}=Hn(R),q=I(()=>e.lines?`v-list-item--${e.lines}-line`:void 0),V=I(()=>({isActive:S.value,select:u,isOpen:c.value,isSelected:d.value,isIndeterminate:f.value}));function G(W){var J;s("click",W),_.value&&((J=i.navigate)==null||J.call(i,W),!p&&(g.activatable.value?a(!l.value,W):(g.selectable.value||e.value!=null)&&u(!d.value,W)))}function te(W){(W.key==="Enter"||W.key===" ")&&(W.preventDefault(),W.target.dispatchEvent(new MouseEvent("click",W)))}return Pe(()=>{const W=C.value?"a":e.tag,J=r.title||e.title!=null,pe=r.subtitle||e.subtitle!=null,ae=!!(e.appendAvatar||e.appendIcon),oe=!!(ae||r.append),ee=!!(e.prependAvatar||e.prependIcon),me=!!(ee||r.prepend);return w==null||w.updateHasPrepend(me),e.activeColor&&CF("active-color",["color","base-color"]),Jt(h(W,ve({class:["v-list-item",{"v-list-item--active":S.value,"v-list-item--disabled":e.disabled,"v-list-item--link":_.value,"v-list-item--nav":e.nav,"v-list-item--prepend":!me&&(w==null?void 0:w.hasPrepend.value),"v-list-item--slim":e.slim,[`${e.activeClass}`]:e.activeClass&&S.value},E.value,P.value,M.value,D.value,z.value,q.value,Y.value,A.value,e.class],style:[O.value,H.value,e.style],tabindex:_.value?w?-2:0:void 0,"aria-selected":g.activatable.value?l.value:d.value,onClick:G,onKeydown:_.value&&!C.value&&te},i.linkProps),{default:()=>{var ne;return[Bo(_.value||S.value,"v-list-item"),me&&h("div",{key:"prepend",class:"v-list-item__prepend"},[r.prepend?h(It,{key:"prepend-defaults",disabled:!ee,defaults:{VAvatar:{density:e.density,image:e.prependAvatar},VIcon:{density:e.density,icon:e.prependIcon},VListItemAction:{start:!0}}},{default:()=>{var U;return[(U=r.prepend)==null?void 0:U.call(r,V.value)]}}):h(Ce,null,[e.prependAvatar&&h(lt,{key:"prepend-avatar",density:e.density,image:e.prependAvatar},null),e.prependIcon&&h(X,{key:"prepend-icon",density:e.density,icon:e.prependIcon},null)]),h("div",{class:"v-list-item__spacer"},null)]),h("div",{class:"v-list-item__content","data-no-activator":""},[J&&h(ut,{key:"title"},{default:()=>{var U;return[((U=r.title)==null?void 0:U.call(r,{title:e.title}))??e.title]}}),pe&&h(vt,{key:"subtitle"},{default:()=>{var U;return[((U=r.subtitle)==null?void 0:U.call(r,{subtitle:e.subtitle}))??e.subtitle]}}),(ne=r.default)==null?void 0:ne.call(r,V.value)]),oe&&h("div",{key:"append",class:"v-list-item__append"},[r.append?h(It,{key:"append-defaults",disabled:!ae,defaults:{VAvatar:{density:e.density,image:e.appendAvatar},VIcon:{density:e.density,icon:e.appendIcon},VListItemAction:{end:!0}}},{default:()=>{var U;return[(U=r.append)==null?void 0:U.call(r,V.value)]}}):h(Ce,null,[e.appendIcon&&h(X,{key:"append-icon",density:e.density,icon:e.appendIcon},null),e.appendAvatar&&h(lt,{key:"append-avatar",density:e.density,image:e.appendAvatar},null)]),h("div",{class:"v-list-item__spacer"},null)])]}}),[[hr("ripple"),_.value&&e.ripple]])}),{activate:a,isActivated:l,isGroupActivator:p,isSelected:d,list:w,select:u,root:g,id:b}}}),CW=ce({color:String,inset:Boolean,sticky:Boolean,title:String,...Ue(),...wt()},"VListSubheader"),os=ke()({name:"VListSubheader",props:CW(),setup(e,t){let{slots:n}=t;const{textColorClasses:r,textColorStyles:s}=Es(Te(e,"color"));return Pe(()=>{const i=!!(n.default||e.title);return h(e.tag,{class:["v-list-subheader",{"v-list-subheader--inset":e.inset,"v-list-subheader--sticky":e.sticky},r.value,e.class],style:[{textColorStyles:s},e.style]},{default:()=>{var o;return[i&&h("div",{class:"v-list-subheader__text"},[((o=n.default)==null?void 0:o.call(n))??e.title])]}})}),{}}}),TW=ce({color:String,inset:Boolean,length:[Number,String],opacity:[Number,String],thickness:[Number,String],vertical:Boolean,...Ue(),...Mt()},"VDivider"),fn=ke()({name:"VDivider",props:TW(),setup(e,t){let{attrs:n,slots:r}=t;const{themeClasses:s}=Kt(e),{textColorClasses:i,textColorStyles:o}=Es(Te(e,"color")),a=I(()=>{const l={};return e.length&&(l[e.vertical?"height":"width"]=Ve(e.length)),e.thickness&&(l[e.vertical?"borderRightWidth":"borderTopWidth"]=Ve(e.thickness)),l});return Pe(()=>{const l=h("hr",{class:[{"v-divider":!0,"v-divider--inset":e.inset,"v-divider--vertical":e.vertical},s.value,i.value,e.class],style:[a.value,o.value,{"--v-border-opacity":e.opacity},e.style],"aria-orientation":!n.role||n.role==="separator"?e.vertical?"vertical":"horizontal":void 0,role:`${n.role||"separator"}`},null);return r.default?h("div",{class:["v-divider__wrapper",{"v-divider__wrapper--vertical":e.vertical,"v-divider__wrapper--inset":e.inset}]},[l,h("div",{class:"v-divider__content"},[r.default()]),l]):l}),{}}}),RW=ce({items:Array,returnObject:Boolean},"VListChildren"),yA=ke()({name:"VListChildren",props:RW(),setup(e,t){let{slots:n}=t;return dA(),()=>{var r,s;return((r=n.default)==null?void 0:r.call(n))??((s=e.items)==null?void 0:s.map(i=>{var f,p;let{children:o,props:a,type:l,raw:u}=i;if(l==="divider")return((f=n.divider)==null?void 0:f.call(n,{props:a}))??h(fn,a,null);if(l==="subheader")return((p=n.subheader)==null?void 0:p.call(n,{props:a}))??h(os,a,null);const c={subtitle:n.subtitle?g=>{var m;return(m=n.subtitle)==null?void 0:m.call(n,{...g,item:u})}:void 0,prepend:n.prepend?g=>{var m;return(m=n.prepend)==null?void 0:m.call(n,{...g,item:u})}:void 0,append:n.append?g=>{var m;return(m=n.append)==null?void 0:m.call(n,{...g,item:u})}:void 0,title:n.title?g=>{var m;return(m=n.title)==null?void 0:m.call(n,{...g,item:u})}:void 0},d=_y.filterProps(a);return o?h(_y,ve({value:a==null?void 0:a.value},d),{activator:g=>{let{props:m}=g;const y={...a,...m,value:e.returnObject?u:a.value};return n.header?n.header({props:y}):h(Le,y,c)},default:()=>h(yA,{items:o,returnObject:e.returnObject},n)}):n.item?n.item({props:a}):h(Le,ve(a,{value:e.returnObject?u:a.value}),c)}))}}}),bA=ce({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"},returnObject:Boolean,valueComparator:{type:Function,default:Vo}},"list-items");function ky(e,t){const n=Qn(t,e.itemTitle,t),r=Qn(t,e.itemValue,n),s=Qn(t,e.itemChildren),i=e.itemProps===!0?typeof t=="object"&&t!=null&&!Array.isArray(t)?"children"in t?Rs(t,["children"]):t:void 0:Qn(t,e.itemProps),o={title:n,value:r,...i};return{title:String(o.title??""),value:o.value,props:o,children:Array.isArray(s)?wA(e,s):void 0,raw:t}}function wA(e,t){const n=[];for(const r of t)n.push(ky(e,r));return n}function PW(e){const t=I(()=>wA(e,e.items)),n=I(()=>t.value.some(i=>i.value===null));function r(i){return n.value||(i=i.filter(o=>o!==null)),i.map(o=>e.returnObject&&typeof o=="string"?ky(e,o):t.value.find(a=>e.valueComparator(o,a.value))||ky(e,o))}function s(i){return e.returnObject?i.map(o=>{let{raw:a}=o;return a}):i.map(o=>{let{value:a}=o;return a})}return{items:t,transformIn:r,transformOut:s}}function IW(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function AW(e,t){const n=Qn(t,e.itemType,"item"),r=IW(t)?t:Qn(t,e.itemTitle),s=Qn(t,e.itemValue,void 0),i=Qn(t,e.itemChildren),o=e.itemProps===!0?Rs(t,["children"]):Qn(t,e.itemProps),a={title:r,value:s,...o};return{type:n,title:a.title,value:a.value,props:a,children:n==="item"&&i?SA(e,i):void 0,raw:t}}function SA(e,t){const n=[];for(const r of t)n.push(AW(e,r));return n}function OW(e){return{items:I(()=>SA(e,e.items))}}const MW=ce({baseColor:String,activeColor:String,activeClass:String,bgColor:String,disabled:Boolean,expandIcon:String,collapseIcon:String,lines:{type:[Boolean,String],default:"one"},slim:Boolean,nav:Boolean,"onClick:open":Bn(),"onClick:select":Bn(),"onUpdate:opened":Bn(),...bW({selectStrategy:"single-leaf",openStrategy:"list"}),...fs(),...Ue(),...Or(),...Mr(),...ps(),itemType:{type:String,default:"type"},...bA(),...$n(),...wt(),...Mt(),...As({variant:"text"})},"VList"),Ft=ke()({name:"VList",props:MW(),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}=OW(e),{themeClasses:s}=Kt(e),{backgroundColorClasses:i,backgroundColorStyles:o}=fr(Te(e,"bgColor")),{borderClasses:a}=Ps(e),{densityClasses:l}=hs(e),{dimensionStyles:u}=Dr(e),{elevationClasses:c}=Is(e),{roundedClasses:d}=Hn(e),{children:f,open:p,parents:g,select:m,getPath:y}=wW(e),b=I(()=>e.lines?`v-list--${e.lines}-line`:void 0),w=Te(e,"activeColor"),S=Te(e,"baseColor"),C=Te(e,"color");dA(),Ar({VListGroup:{activeColor:w,baseColor:S,color:C,expandIcon:Te(e,"expandIcon"),collapseIcon:Te(e,"collapseIcon")},VListItem:{activeClass:Te(e,"activeClass"),activeColor:w,baseColor:S,color:C,density:Te(e,"density"),disabled:Te(e,"disabled"),lines:Te(e,"lines"),nav:Te(e,"nav"),slim:Te(e,"slim"),variant:Te(e,"variant")}});const _=Oe(!1),R=B();function T(A){_.value=!0}function x(A){_.value=!1}function E(A){var D;!_.value&&!(A.relatedTarget&&((D=R.value)!=null&&D.contains(A.relatedTarget)))&&O()}function P(A){const D=A.target;if(!(!R.value||["INPUT","TEXTAREA"].includes(D.tagName))){if(A.key==="ArrowDown")O("next");else if(A.key==="ArrowUp")O("prev");else if(A.key==="Home")O("first");else if(A.key==="End")O("last");else return;A.preventDefault()}}function M(A){_.value=!0}function O(A){if(R.value)return yc(R.value,A)}return Pe(()=>h(e.tag,{ref:R,class:["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,b.value,d.value,e.class],style:[o.value,u.value,e.style],tabindex:e.disabled||_.value?-1:0,role:"listbox","aria-activedescendant":void 0,onFocusin:T,onFocusout:x,onFocus:E,onKeydown:P,onMousedown:M},{default:()=>[h(yA,{items:r.value,returnObject:e.returnObject},n)]})),{open:p,select:m,focus:O,children:f,parents:g,getPath:y}}}),DW=ce({start:Boolean,end:Boolean,...Ue(),...wt()},"VListItemAction"),cu=ke()({name:"VListItemAction",props:DW(),setup(e,t){let{slots:n}=t;return Pe(()=>h(e.tag,{class:["v-list-item-action",{"v-list-item-action--start":e.start,"v-list-item-action--end":e.end},e.class],style:e.style},n)),{}}}),$W=ce({start:Boolean,end:Boolean,...Ue(),...wt()},"VListItemMedia"),LW=ke()({name:"VListItemMedia",props:$W(),setup(e,t){let{slots:n}=t;return Pe(()=>h(e.tag,{class:["v-list-item-media",{"v-list-item-media--start":e.start,"v-list-item-media--end":e.end},e.class],style:e.style},n)),{}}}),FW={key:1},NW={key:2},VW={class:"mt-3"},BW={key:0},UW={key:1},HW={key:2},zW=De({__name:"BatchReprintDialog",setup(e){const t=Lt(),n=B(),r=en(tn.BatchReprintDialog),s=B(!1),i=B(!1),o=B([]),a=B([]),l=B(""),u=Ot();function c(g){s.value=!0}async function d(g){n.value=g;try{const m=await xl.batchGetLastPrintedFiles(n.value);o.value=m,a.value=m.filter(y=>y.connectionState==="Operational"&&y.reprintState==ia.LastPrintReady)}catch(m){l.value=m.code.toString()??""}s.value=!1}async function f(){i.value=!0;try{await xl.batchReprintFiles(a.value.filter(g=>{var m;return(m=g.file)==null?void 0:m.path}).map(g=>{var m;return{printerId:g.printerId,path:((m=g.file)==null?void 0:m.path)||""}})),t.clearSelectedPrinters(),u.info("Action completed","Your reprinted jobs are starting",5e3),p()}catch(g){l.value=lW(g)}finally{i.value=!1}}function p(){r.closeDialog(r.context())}return(g,m)=>{const y=di;return L(),Z(y,{id:Q(r).dialogId,"max-width":"1000px",onBeforeOpened:c,onEscape:m[3]||(m[3]=b=>p()),onOpened:d},{default:v(()=>[h(bt,{class:"pa-4"},{default:v(()=>[h(on,null,{default:v(()=>m[4]||(m[4]=[$("span",{class:"text-h5"}," Batch - Submit Reprint Jobs ",-1)])),_:1}),h(Zt,null,{default:v(()=>{var b;return[(b=l.value)!=null&&b.length?(L(),Z(nn,{key:0,color:"error"},{default:v(()=>[k(ie(l.value),1)]),_:1})):he("",!0),s.value?(L(),ye("span",FW," Loading... ")):(L(),ye("div",NW,[h(Ft,{density:"compact"},{default:v(()=>[h(os,null,{default:v(()=>m[5]||(m[5]=[k(" Reprinted Files - Select from list ")])),_:1}),h(_y,{modelValue:a.value,"onUpdate:modelValue":m[0]||(m[0]=w=>a.value=w),multiple:""},{default:v(()=>[(L(!0),ye(Ce,null,qt(o.value,(w,S)=>(L(),Z(Le,{key:S,value:w,disabled:w.connectionState!=="Operational"||w.reprintState!==Q(ia).LastPrintReady},{prepend:v(()=>[w.reprintState==Q(ia).LastPrintReady?(L(),Z(X,{key:0},{default:v(()=>m[6]||(m[6]=[k("checklist")])),_:1})):he("",!0),w.reprintState==Q(ia).NoLastPrint?(L(),Z(X,{key:1},{default:v(()=>m[7]||(m[7]=[k(" question_mark ")])),_:1})):he("",!0),w.reprintState==Q(ia).PrinterNotAvailable?(L(),Z(X,{key:2},{default:v(()=>m[8]||(m[8]=[k(" signal_disconnected ")])),_:1})):he("",!0)]),default:v(()=>{var C,_;return[(_=(C=w.file)==null?void 0:C.path)!=null&&_.length?(L(),Z(ut,{key:0},{default:v(()=>{var R;return[k(ie((R=w.file)==null?void 0:R.path)+" ",1),w.connectionState!=="Operational"?(L(),Z(Sn,{key:0},{default:v(()=>m[9]||(m[9]=[k(" Printer busy ")])),_:1})):he("",!0)]}),_:2},1024)):w.reprintState==Q(ia).NoLastPrint?(L(),Z(ut,{key:1},{default:v(()=>m[10]||(m[10]=[k(" No file is present to print again ")])),_:1})):(L(),Z(ut,{key:2},{default:v(()=>m[11]||(m[11]=[k(" OctoPrint cant be reached ")])),_:1})),h(vt,null,{default:v(()=>{var R;return[k(" Printer '"+ie(((R=Q(t).printer(w.printerId))==null?void 0:R.name)??"Unknown printer")+"' ",1)]}),_:2},1024)]}),_:2},1032,["value","disabled"]))),128))]),_:1},8,["modelValue"])]),_:1})])),$("div",VW,[i.value?(L(),ye("div",BW,[h(Od,{class:"ma-3",indeterminate:"",color:"blue"}),m[12]||(m[12]=k(" Submitting "))])):a.value.length>0?(L(),ye("div",UW,ie(a.value.length)+" reprint selected ",1)):(L(),ye("div",HW,"Must select at least one file"))]),m[14]||(m[14]=$("br",null,null,-1)),h(re,{disabled:i.value||a.value.length===0,onClick:m[1]||(m[1]=w=>f())},{default:v(()=>m[13]||(m[13]=[k(" Submit Batch Reprint ")])),_:1},8,["disabled"])]}),_:1}),h(Dn,null,{default:v(()=>[h(vn),h(re,{variant:"text",onClick:m[2]||(m[2]=b=>Q(r).closeDialog())},{default:v(()=>m[15]||(m[15]=[k(" Close ")])),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}}),jW="/img/octoprint-tentacle.svg";function _A(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]}class vo extends vr{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 Gn(!1,!1)).get("/api/test")}}const ji=Ts("Feature",{state:()=>({features:void 0}),getters:{getFeatures(){return this.features},getFeature:e=>t=>{if(!e.features){console.debug("Feature store not loaded");return}return e.features[t]},hasFeature:e=>t=>{if(!e.features)return console.debug("Feature store not loaded"),!1;const n=e.features[t];return n?n==null?void 0:n.available:(console.debug(`Feature ${t} not defined. Options:`,Object.keys(e.features)),!1)}},actions:{async loadFeatures(){try{const e=await vo.getFeatures();this.setFeatures(e)}catch{this.features={}}},setFeatures(e){this.features=e}}});function kA(e){return e===0}function xA(e){return e===1}function EA(e){return kA(e)?"OctoPrint":xA(e)?"Moonraker":"Unknown"}function qW(e){let{rootEl:t,isSticky:n,layoutItemStyles:r}=e;const s=Oe(!1),i=Oe(0),o=I(()=>{const u=typeof s.value=="boolean"?"top":s.value;return[n.value?{top:"auto",bottom:"auto",height:void 0}:void 0,s.value?{[u]:Ve(i.value)}:{top:r.value.top}]});St(()=>{xe(n,u=>{u?window.addEventListener("scroll",l,{passive:!0}):window.removeEventListener("scroll",l)},{immediate:!0})}),Pn(()=>{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,g=parseFloat(getComputedStyle(t.value).getPropertyValue("--v-body-scroll-y"))||0;c.height<window.innerHeight-d?(s.value="top",i.value=d):u==="up"&&s.value==="bottom"||u==="down"&&s.value==="top"?(i.value=window.scrollY+c.top-g,s.value=!0):u==="down"&&p<=0?(i.value=0,s.value="bottom"):u==="up"&&f<=0&&(g?s.value!=="top"&&(i.value=-f+g+d,s.value="top"):(i.value=c.top+f,s.value="top")),a=window.scrollY}return{isStuck:s,stickyStyles:o}}const WW=100,GW=20;function X0(e){return(e<0?-1:1)*Math.sqrt(Math.abs(e))*1.41421356237}function Q0(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=X0(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 X0(t)*1e3}function KW(){const e={};function t(s){Array.from(s.changedTouches).forEach(i=>{(e[i.identifier]??(e[i.identifier]=new hF(GW))).push([s.timeStamp,i])})}function n(s){Array.from(s.changedTouches).forEach(i=>{delete e[i.identifier]})}function r(s){var u;const i=(u=e[s])==null?void 0:u.values().reverse();if(!i)throw new Error(`No samples for touch id ${s}`);const o=i[0],a=[],l=[];for(const c of i){if(o[0]-c[0]>WW)break;a.push({t:c[0],d:c[1].clientX}),l.push({t:c[0],d:c[1].clientY})}return{x:Q0(a),y:Q0(l),get direction(){const{x:c,y:d}=this,[f,p]=[Math.abs(c),Math.abs(d)];return f>p&&c>=0?"right":f>p&&c<=0?"left":p>f&&d>=0?"down":p>f&&d<=0?"up":YW()}}}return{addMovement:t,endTouch:n,getVelocity:r}}function YW(){throw new Error}function XW(e){let{el:t,isActive:n,isTemporary:r,width:s,touchless:i,position:o}=e;St(()=>{window.addEventListener("touchstart",w,{passive:!0}),window.addEventListener("touchmove",S,{passive:!1}),window.addEventListener("touchend",C,{passive:!0})}),Pn(()=>{window.removeEventListener("touchstart",w),window.removeEventListener("touchmove",S),window.removeEventListener("touchend",C)});const a=I(()=>["left","right"].includes(o.value)),{addMovement:l,endTouch:u,getVelocity:c}=KW();let d=!1;const f=Oe(!1),p=Oe(0),g=Oe(0);let m;function y(R,T){return(o.value==="left"?R:o.value==="right"?document.documentElement.clientWidth-R:o.value==="top"?R:o.value==="bottom"?document.documentElement.clientHeight-R:al())-(T?s.value:0)}function b(R){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const x=o.value==="left"?(R-g.value)/s.value:o.value==="right"?(document.documentElement.clientWidth-R-g.value)/s.value:o.value==="top"?(R-g.value)/s.value:o.value==="bottom"?(document.documentElement.clientHeight-R-g.value)/s.value:al();return T?Math.max(0,Math.min(1,x)):x}function w(R){if(i.value)return;const T=R.changedTouches[0].clientX,x=R.changedTouches[0].clientY,E=25,P=o.value==="left"?T<E:o.value==="right"?T>document.documentElement.clientWidth-E:o.value==="top"?x<E:o.value==="bottom"?x>document.documentElement.clientHeight-E:al(),M=n.value&&(o.value==="left"?T<s.value:o.value==="right"?T>document.documentElement.clientWidth-s.value:o.value==="top"?x<s.value:o.value==="bottom"?x>document.documentElement.clientHeight-s.value:al());(P||M||n.value&&r.value)&&(m=[T,x],g.value=y(a.value?T:x,n.value),p.value=b(a.value?T:x),d=g.value>-20&&g.value<80,u(R),l(R))}function S(R){const T=R.changedTouches[0].clientX,x=R.changedTouches[0].clientY;if(d){if(!R.cancelable){d=!1;return}const P=Math.abs(T-m[0]),M=Math.abs(x-m[1]);(a.value?P>M&&P>3:M>P&&M>3)?(f.value=!0,d=!1):(a.value?M:P)>3&&(d=!1)}if(!f.value)return;R.preventDefault(),l(R);const E=b(a.value?T:x,!1);p.value=Math.max(0,Math.min(1,E)),E>1?g.value=y(a.value?T:x,!0):E<0&&(g.value=y(a.value?T:x,!1))}function C(R){if(d=!1,!f.value)return;l(R),f.value=!1;const T=c(R.changedTouches[0].identifier),x=Math.abs(T.x),E=Math.abs(T.y);(a.value?x>E&&x>400:E>x&&E>3)?n.value=T.direction===({left:"right",right:"left",top:"down",bottom:"up"}[o.value]||al()):n.value=p.value>.5}const _=I(()=>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))`:al(),transition:"none"}:void 0);return qr(f,()=>{var x,E;const R=((x=t.value)==null?void 0:x.style.transform)??null,T=((E=t.value)==null?void 0:E.style.transition)??null;Un(()=>{var P,M,O,A;(M=t.value)==null||M.style.setProperty("transform",((P=_.value)==null?void 0:P.transform)||"none"),(A=t.value)==null||A.style.setProperty("transition",((O=_.value)==null?void 0:O.transition)||null)}),yn(()=>{var P,M;(P=t.value)==null||P.style.setProperty("transform",R),(M=t.value)==null||M.style.setProperty("transition",T)})}),{isDragging:f,dragProgress:p,dragStyles:_}}function al(){throw new Error}const wm={"001":1,AD:1,AE:6,AF:6,AG:0,AI:1,AL:1,AM:1,AN:1,AR:1,AS:0,AT:1,AU:1,AX:1,AZ:1,BA:1,BD:0,BE:1,BG:1,BH:6,BM:1,BN:1,BR:0,BS:0,BT:0,BW:0,BY:1,BZ:0,CA:0,CH:1,CL:1,CM:1,CN:1,CO:0,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DM:0,DO:0,DZ:6,EC:1,EE:1,EG:6,ES:1,ET:0,FI:1,FJ:1,FO:1,FR:1,GB:1,"GB-alt-variant":0,GE:1,GF:1,GP:1,GR:1,GT:0,GU:0,HK:0,HN:0,HR:1,HU:1,ID:0,IE:1,IL:0,IN:0,IQ:6,IR:6,IS:1,IT:1,JM:0,JO:6,JP:0,KE:0,KG:1,KH:0,KR:0,KW:6,KZ:1,LA:0,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MH:0,MK:1,MM:0,MN:1,MO:0,MQ:1,MT:0,MV:5,MX:0,MY:1,MZ:0,NI:0,NL:1,NO:1,NP:0,NZ:1,OM:6,PA:0,PE:0,PH:0,PK:0,PL:1,PR:0,PT:0,PY:0,QA:6,RE:1,RO:1,RS:1,RU:1,SA:0,SD:6,SE:1,SG:0,SI:1,SK:1,SM:1,SV:0,SY:6,TH:0,TJ:1,TM:1,TR:1,TT:0,TW:0,UA:1,UM:0,US:0,UY:1,UZ:1,VA:1,VE:0,VI:0,VN:1,WS:0,XK:1,YE:0,ZA:0,ZW:0};function QW(e,t,n){const r=[];let s=[];const i=CA(e),o=TA(e),a=n??wm[t.slice(-2).toUpperCase()]??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 JW(e,t,n){const r=n??wm[t.slice(-2).toUpperCase()]??0,s=new Date(e);for(;s.getDay()!==r;)s.setDate(s.getDate()-1);return s}function ZW(e,t){const n=new Date(e),r=((wm[t.slice(-2).toUpperCase()]??0)+6)%7;for(;n.getDay()!==r;)n.setDate(n.getDate()+1);return n}function CA(e){return new Date(e.getFullYear(),e.getMonth(),1)}function TA(e){return new Date(e.getFullYear(),e.getMonth()+1,0)}function e6(e){const t=e.split("-").map(Number);return new Date(t[0],t[1]-1,t[2])}const t6=/^([12]\d{3}-([1-9]|0[1-9]|1[0-2])-([1-9]|0[1-9]|[12]\d|3[01]))$/;function RA(e){if(e==null)return new Date;if(e instanceof Date)return e;if(typeof e=="string"){let t;if(t6.test(e))return e6(e);if(t=Date.parse(e),!isNaN(t))return new Date(t)}return null}const J0=new Date(2e3,0,2);function n6(e,t){const n=t??wm[e.slice(-2).toUpperCase()]??0;return vl(7).map(r=>{const s=new Date(J0);return s.setDate(J0.getDate()+n+r),new Intl.DateTimeFormat(e,{weekday:"narrow"}).format(s)})}function r6(e,t,n,r){const s=RA(e)??new Date,i=r==null?void 0:r[t];if(typeof i=="function")return i(s,t,n);let o={};switch(t){case"fullDate":o={year:"numeric",month:"long",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",second:"numeric",hour12:!0};break;case"fullTime12h":o={hour:"numeric",minute:"numeric",second:"numeric",hour12:!0};break;case"fullTime24h":o={hour:"numeric",minute:"numeric",second:"numeric",hour12:!1};break;case"fullDateTime":o={year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!0};break;case"fullDateTime12h":o={year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!0};break;case"fullDateTime24h":o={year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1};break;case"keyboardDate":o={year:"numeric",month:"2-digit",day:"2-digit"};break;case"keyboardDateTime":o={year:"numeric",month:"2-digit",day:"2-digit",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1};break;case"keyboardDateTime12h":o={year:"numeric",month:"2-digit",day:"2-digit",hour:"numeric",minute:"numeric",second:"numeric",hour12:!0};break;case"keyboardDateTime24h":o={year:"numeric",month:"2-digit",day:"2-digit",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1};break;default:o=i??{timeZone:"UTC",timeZoneName:"short"}}return new Intl.DateTimeFormat(n,o).format(s)}function s6(e,t){const n=e.toJsDate(t),r=n.getFullYear(),s=__(String(n.getMonth()+1),2,"0"),i=__(String(n.getDate()),2,"0");return`${r}-${s}-${i}`}function i6(e){const[t,n,r]=e.split("-").map(Number);return new Date(t,n-1,r)}function o6(e,t){const n=new Date(e);return n.setMinutes(n.getMinutes()+t),n}function a6(e,t){const n=new Date(e);return n.setHours(n.getHours()+t),n}function l6(e,t){const n=new Date(e);return n.setDate(n.getDate()+t),n}function u6(e,t){const n=new Date(e);return n.setDate(n.getDate()+t*7),n}function c6(e,t){const n=new Date(e);return n.setDate(1),n.setMonth(n.getMonth()+t),n}function d6(e){return e.getFullYear()}function f6(e){return e.getMonth()}function h6(e){return e.getDate()}function p6(e){return new Date(e.getFullYear(),e.getMonth()+1,1)}function m6(e){return new Date(e.getFullYear(),e.getMonth()-1,1)}function g6(e){return e.getHours()}function v6(e){return e.getMinutes()}function y6(e){return new Date(e.getFullYear(),0,1)}function b6(e){return new Date(e.getFullYear(),11,31)}function w6(e,t){return lp(e,t[0])&&k6(e,t[1])}function S6(e){const t=new Date(e);return t instanceof Date&&!isNaN(t.getTime())}function lp(e,t){return e.getTime()>t.getTime()}function _6(e,t){return lp(xy(e),xy(t))}function k6(e,t){return e.getTime()<t.getTime()}function Z0(e,t){return e.getTime()===t.getTime()}function x6(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}function E6(e,t){return e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}function C6(e,t){return e.getFullYear()===t.getFullYear()}function T6(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 R6(e,t){const n=new Date(e);return n.setHours(t),n}function P6(e,t){const n=new Date(e);return n.setMinutes(t),n}function I6(e,t){const n=new Date(e);return n.setMonth(t),n}function A6(e,t){const n=new Date(e);return n.setDate(t),n}function O6(e,t){const n=new Date(e);return n.setFullYear(t),n}function xy(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0,0)}function M6(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),23,59,59,999)}class D6{constructor(t){this.locale=t.locale,this.formats=t.formats}date(t){return RA(t)}toJsDate(t){return t}toISO(t){return s6(this,t)}parseISO(t){return i6(t)}addMinutes(t,n){return o6(t,n)}addHours(t,n){return a6(t,n)}addDays(t,n){return l6(t,n)}addWeeks(t,n){return u6(t,n)}addMonths(t,n){return c6(t,n)}getWeekArray(t,n){return QW(t,this.locale,n?Number(n):void 0)}startOfWeek(t,n){return JW(t,this.locale,n?Number(n):void 0)}endOfWeek(t){return ZW(t,this.locale)}startOfMonth(t){return CA(t)}endOfMonth(t){return TA(t)}format(t,n){return r6(t,n,this.locale,this.formats)}isEqual(t,n){return Z0(t,n)}isValid(t){return S6(t)}isWithinRange(t,n){return w6(t,n)}isAfter(t,n){return lp(t,n)}isAfterDay(t,n){return _6(t,n)}isBefore(t,n){return!lp(t,n)&&!Z0(t,n)}isSameDay(t,n){return x6(t,n)}isSameMonth(t,n){return E6(t,n)}isSameYear(t,n){return C6(t,n)}setMinutes(t,n){return P6(t,n)}setHours(t,n){return R6(t,n)}setMonth(t,n){return I6(t,n)}setDate(t,n){return A6(t,n)}setYear(t,n){return O6(t,n)}getDiff(t,n,r){return T6(t,n,r)}getWeekdays(t){return n6(this.locale,t?Number(t):void 0)}getYear(t){return d6(t)}getMonth(t){return f6(t)}getDate(t){return h6(t)}getNextMonth(t){return p6(t)}getPreviousMonth(t){return m6(t)}getHours(t){return g6(t)}getMinutes(t){return v6(t)}startOfDay(t){return xy(t)}endOfDay(t){return M6(t)}startOfYear(t){return y6(t)}endOfYear(t){return b6(t)}}const $6=Symbol.for("vuetify:date-options"),ek=Symbol.for("vuetify:date-adapter");function L6(e,t){const n=Zn({adapter:D6,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:F6(n,t)}}function F6(e,t){const n=mn(typeof e.adapter=="function"?new e.adapter({locale:e.locale[t.current.value]??t.current.value,formats:e.formats}):e.adapter);return xe(t.current,r=>{n.locale=e.locale[r]??r??n.locale}),n}const ed=Symbol.for("vuetify:layout"),PA=Symbol.for("vuetify:layout-item"),tk=1e3,IA=ce({overlaps:{type:Array,default:()=>[]},fullHeight:Boolean},"layout"),AA=ce({name:{type:String},order:{type:[Number,String],default:0},absolute:Boolean},"layout-item");function OA(){const e=Ke(ed);if(!e)throw new Error("[Vuetify] Could not find injected layout");return{getLayoutItem:e.getLayoutItem,mainRect:e.mainRect,mainStyles:e.mainStyles}}function MA(e){const t=Ke(ed);if(!t)throw new Error("[Vuetify] Could not find injected layout");const n=e.id??`layout-item-${gr()}`,r=sn("useLayoutItem");Wt(PA,{id:n});const s=Oe(!1);Sb(()=>s.value=!0),bC(()=>s.value=!1);const{layoutItemStyles:i,layoutItemScrimStyles:o}=t.register(r,{...e,active:I(()=>s.value?!1:e.active.value),id:n});return Pn(()=>t.unregister(n)),{layoutItemStyles:i,layoutRect:t.layoutRect,layoutItemScrimStyles:o}}const N6=(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 DA(e){const t=Ke(ed,null),n=I(()=>t?t.rootZIndex.value-100:tk),r=B([]),s=mn(new Map),i=mn(new Map),o=mn(new Map),a=mn(new Map),l=mn(new Map),{resizeRef:u,contentRect:c}=Da(),d=I(()=>{const R=new Map,T=e.overlaps??[];for(const x of T.filter(E=>E.includes(":"))){const[E,P]=x.split(":");if(!r.value.includes(E)||!r.value.includes(P))continue;const M=s.get(E),O=s.get(P),A=i.get(E),D=i.get(P);!M||!O||!A||!D||(R.set(P,{position:M.value,amount:parseInt(A.value,10)}),R.set(E,{position:O.value,amount:-parseInt(D.value,10)}))}return R}),f=I(()=>{const R=[...new Set([...o.values()].map(x=>x.value))].sort((x,E)=>x-E),T=[];for(const x of R){const E=r.value.filter(P=>{var M;return((M=o.get(P))==null?void 0:M.value)===x});T.push(...E)}return N6(T,s,i,a)}),p=I(()=>!Array.from(l.values()).some(R=>R.value)),g=I(()=>f.value[f.value.length-1].layer),m=I(()=>({"--v-layout-left":Ve(g.value.left),"--v-layout-right":Ve(g.value.right),"--v-layout-top":Ve(g.value.top),"--v-layout-bottom":Ve(g.value.bottom),...p.value?void 0:{transition:"none"}})),y=I(()=>f.value.slice(1).map((R,T)=>{let{id:x}=R;const{layer:E}=f.value[T],P=i.get(x),M=s.get(x);return{id:x,...E,size:Number(P.value),position:M.value}})),b=R=>y.value.find(T=>T.id===R),w=sn("createLayout"),S=Oe(!1);St(()=>{S.value=!0}),Wt(ed,{register:(R,T)=>{let{id:x,order:E,position:P,layoutSize:M,elementSize:O,active:A,disableTransitions:D,absolute:H}=T;o.set(x,E),s.set(x,P),i.set(x,M),a.set(x,A),D&&l.set(x,D);const Y=yl(PA,w==null?void 0:w.vnode).indexOf(R);Y>-1?r.value.splice(Y,0,x):r.value.push(x);const q=I(()=>y.value.findIndex(W=>W.id===x)),V=I(()=>n.value+f.value.length*2-q.value*2),G=I(()=>{const W=P.value==="left"||P.value==="right",J=P.value==="right",pe=P.value==="bottom",ae=O.value??M.value,oe=ae===0?"%":"px",ee={[P.value]:0,zIndex:V.value,transform:`translate${W?"X":"Y"}(${(A.value?0:-(ae===0?100:ae))*(J||pe?-1:1)}${oe})`,position:H.value||n.value!==tk?"absolute":"fixed",...p.value?void 0:{transition:"none"}};if(!S.value)return ee;const me=y.value[q.value];if(!me)throw new Error(`[Vuetify] Could not find layout item "${x}"`);const ne=d.value.get(x);return ne&&(me[ne.position]+=ne.amount),{...ee,height:W?`calc(100% - ${me.top}px - ${me.bottom}px)`:O.value?`${O.value}px`:void 0,left:J?void 0:`${me.left}px`,right:J?`${me.right}px`:void 0,top:P.value!=="bottom"?`${me.top}px`:void 0,bottom:P.value!=="top"?`${me.bottom}px`:void 0,width:W?O.value?`${O.value}px`:void 0:`calc(100% - ${me.left}px - ${me.right}px)`}}),te=I(()=>({zIndex:V.value-1}));return{layoutItemStyles:G,layoutItemScrimStyles:te,zIndex:V}},unregister:R=>{o.delete(R),s.delete(R),i.delete(R),a.delete(R),l.delete(R),r.value=r.value.filter(T=>T!==R)},mainRect:g,mainStyles:m,getLayoutItem:b,items:y,layoutRect:c,rootZIndex:n});const C=I(()=>["v-layout",{"v-layout--full-height":e.fullHeight}]),_=I(()=>({zIndex:t?n.value:void 0,position:t?"relative":void 0,overflow:t?"hidden":void 0}));return{layoutClasses:C,layoutStyles:_,getLayoutItem:b,items:y,layoutRect:c,layoutRef:u}}const V6=["start","end","left","right","top","bottom"],B6=ce({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=>V6.includes(e)},sticky:Boolean,...fs(),...Ue(),...Hb(),...Ka({mobile:null}),...ps(),...AA(),...$n(),...wt({tag:"nav"}),...Mt()},"VNavigationDrawer"),Ow=ke()({name:"VNavigationDrawer",props:B6(),emits:{"update:modelValue":e=>!0,"update:rail":e=>!0},setup(e,t){let{attrs:n,emit:r,slots:s}=t;const{isRtl:i}=$r(),{themeClasses:o}=Kt(e),{borderClasses:a}=Ps(e),{backgroundColorClasses:l,backgroundColorStyles:u}=fr(Te(e,"color")),{elevationClasses:c}=Is(e),{displayClasses:d,mobile:f}=ci(e),{roundedClasses:p}=Hn(e),g=$T(),m=rt(e,"modelValue",null,te=>!!te),{ssrBootStyles:y}=qd(),{scopeId:b}=ku(),w=B(),S=Oe(!1),{runOpenDelay:C,runCloseDelay:_}=zb(e,te=>{S.value=te}),R=I(()=>e.rail&&e.expandOnHover&&S.value?Number(e.width):Number(e.rail?e.railWidth:e.width)),T=I(()=>Cv(e.location,i.value)),x=I(()=>e.persistent),E=I(()=>!e.permanent&&(f.value||e.temporary)),P=I(()=>e.sticky&&!E.value&&T.value!=="bottom");qr(()=>e.expandOnHover&&e.rail!=null,()=>{xe(S,te=>r("update:rail",!te))}),qr(()=>!e.disableResizeWatcher,()=>{xe(E,te=>!e.permanent&&At(()=>m.value=!te))}),qr(()=>!e.disableRouteWatcher&&!!g,()=>{xe(g.currentRoute,()=>E.value&&(m.value=!1))}),xe(()=>e.permanent,te=>{te&&(m.value=!0)}),e.modelValue==null&&!E.value&&(m.value=e.permanent||!f.value);const{isDragging:M,dragProgress:O}=XW({el:w,isActive:m,isTemporary:E,width:R,touchless:Te(e,"touchless"),position:T}),A=I(()=>{const te=E.value?0:e.rail&&e.expandOnHover?Number(e.railWidth):R.value;return M.value?te*O.value:te}),D=I(()=>["top","bottom"].includes(e.location)?0:R.value),{layoutItemStyles:H,layoutItemScrimStyles:z}=MA({id:e.name,order:I(()=>parseInt(e.order,10)),position:T,layoutSize:A,elementSize:D,active:I(()=>m.value||M.value),disableTransitions:I(()=>M.value),absolute:I(()=>e.absolute||P.value&&typeof Y.value!="string")}),{isStuck:Y,stickyStyles:q}=qW({rootEl:w,isSticky:P,layoutItemStyles:H}),V=fr(I(()=>typeof e.scrim=="string"?e.scrim:null)),G=I(()=>({...M.value?{opacity:O.value*.2,transition:"none"}:void 0,...z.value}));return Ar({VList:{bgColor:"transparent"}}),Pe(()=>{const te=s.image||e.image;return h(Ce,null,[h(e.tag,ve({ref:w,onMouseenter:C,onMouseleave:_,class:["v-navigation-drawer",`v-navigation-drawer--${T.value}`,{"v-navigation-drawer--expand-on-hover":e.expandOnHover,"v-navigation-drawer--floating":e.floating,"v-navigation-drawer--is-hovering":S.value,"v-navigation-drawer--rail":e.rail,"v-navigation-drawer--temporary":E.value,"v-navigation-drawer--persistent":x.value,"v-navigation-drawer--active":m.value,"v-navigation-drawer--sticky":P.value},o.value,l.value,a.value,d.value,c.value,p.value,e.class],style:[u.value,H.value,y.value,q.value,e.style,["top","bottom"].includes(T.value)?{height:"auto"}:{}]},b,n),{default:()=>{var W,J,pe;return[te&&h("div",{key:"image",class:"v-navigation-drawer__img"},[s.image?h(It,{key:"image-defaults",disabled:!e.image,defaults:{VImg:{alt:"",cover:!0,height:"inherit",src:e.image}}},s.image):h(hi,{key:"image-img",alt:"",cover:!0,height:"inherit",src:e.image},null)]),s.prepend&&h("div",{class:"v-navigation-drawer__prepend"},[(W=s.prepend)==null?void 0:W.call(s)]),h("div",{class:"v-navigation-drawer__content"},[(J=s.default)==null?void 0:J.call(s)]),s.append&&h("div",{class:"v-navigation-drawer__append"},[(pe=s.append)==null?void 0:pe.call(s)])]}}),h(Po,{name:"fade-transition"},{default:()=>[E.value&&(M.value||m.value)&&!!e.scrim&&h("div",ve({class:["v-navigation-drawer__scrim",V.backgroundColorClasses.value],style:[G.value,V.backgroundColorStyles.value],onClick:()=>{x.value||(m.value=!1)}},b),null)]})])}),{isStuck:Y}}}),U6=ce({active:Boolean,disabled:Boolean,max:[Number,String],value:{type:[Number,String],default:0},...Ue(),...xu({transition:{component:GT}})},"VCounter"),Mw=ke()({name:"VCounter",functional:!0,props:U6(),setup(e,t){let{slots:n}=t;const r=I(()=>e.max?`${e.value} / ${e.max}`:String(e.value));return Pe(()=>h(ti,{transition:e.transition},{default:()=>[Jt(h("div",{class:["v-counter",{"text-error":e.max&&!e.disabled&&parseFloat(e.value)>parseFloat(e.max)},e.class],style:e.style},[n.default?n.default({counter:r.value,max:e.max,value:e.value}):r.value]),[[No,e.active]])]})),{}}}),H6=ce({text:String,onClick:Bn(),...Ue(),...Mt()},"VLabel"),Dw=ke()({name:"VLabel",props:H6(),setup(e,t){let{slots:n}=t;return Pe(()=>{var r;return h("label",{class:["v-label",{"v-label--clickable":!!e.onClick},e.class],style:e.style,onClick:e.onClick},[e.text,(r=n.default)==null?void 0:r.call(n)])}),{}}}),z6=ce({floating:Boolean,...Ue()},"VFieldLabel"),xf=ke()({name:"VFieldLabel",props:z6(),setup(e,t){let{slots:n}=t;return Pe(()=>h(Dw,{class:["v-field-label",{"v-field-label--floating":e.floating},e.class],style:e.style,"aria-hidden":e.floating||void 0},n)),{}}});function $A(e){const{t}=Gr();function n(r){let{name:s}=r;const i={prepend:"prependAction",prependInner:"prependAction",append:"appendAction",appendInner:"appendAction",clear:"clear"}[s],o=e[`onClick:${s}`],a=o&&i?t(`$vuetify.input.${i}`,e.label??""):void 0;return h(X,{icon:e[`${s}Icon`],"aria-label":a,onClick:o},null)}return{InputIcon:n}}const LA=ce({focused:Boolean,"onUpdate:focused":Bn()},"focus");function Du(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ui();const n=rt(e,"focused"),r=I(()=>({[`${t}--focused`]:n.value}));function s(){n.value=!0}function i(){n.value=!1}return{focusClasses:r,isFocused:n,focus:s,blur:i}}const j6=["underlined","outlined","filled","solo","solo-inverted","solo-filled","plain"],Sm=ce({appendInnerIcon:Je,bgColor:String,clearable:Boolean,clearIcon:{type:Je,default:"$clear"},active:Boolean,centerAffix:{type:Boolean,default:void 0},color:String,baseColor:String,dirty:Boolean,disabled:{type:Boolean,default:null},error:Boolean,flat:Boolean,label:String,persistentClear:Boolean,prependInnerIcon:Je,reverse:Boolean,singleLine:Boolean,variant:{type:String,default:"filled",validator:e=>j6.includes(e)},"onClick:clear":Bn(),"onClick:appendInner":Bn(),"onClick:prependInner":Bn(),...Ue(),...jp(),...$n(),...Mt()},"VField"),_m=ke()({name:"VField",inheritAttrs:!1,props:{id:String,...LA(),...Sm()},emits:{"update:focused":e=>!0,"update:modelValue":e=>!0},setup(e,t){let{attrs:n,emit:r,slots:s}=t;const{themeClasses:i}=Kt(e),{loaderClasses:o}=Md(e),{focusClasses:a,isFocused:l,focus:u,blur:c}=Du(e),{InputIcon:d}=$A(e),{roundedClasses:f}=Hn(e),{rtlClasses:p}=$r(),g=I(()=>e.dirty||e.active),m=I(()=>!e.singleLine&&!!(e.label||s.label)),y=gr(),b=I(()=>e.id||`input-${y}`),w=I(()=>`${b.value}-messages`),S=B(),C=B(),_=B(),R=I(()=>["plain","underlined"].includes(e.variant)),{backgroundColorClasses:T,backgroundColorStyles:x}=fr(Te(e,"bgColor")),{textColorClasses:E,textColorStyles:P}=Es(I(()=>e.error||e.disabled?void 0:g.value&&l.value?e.color:e.baseColor));xe(g,D=>{if(m.value){const H=S.value.$el,z=C.value.$el;requestAnimationFrame(()=>{const Y=Lb(H),q=z.getBoundingClientRect(),V=q.x-Y.x,G=q.y-Y.y-(Y.height/2-q.height/2),te=q.width/.75,W=Math.abs(te-Y.width)>1?{maxWidth:Ve(te)}:void 0,J=getComputedStyle(H),pe=getComputedStyle(z),ae=parseFloat(J.transitionDuration)*1e3||150,oe=parseFloat(pe.getPropertyValue("--v-field-label-scale")),ee=pe.getPropertyValue("color");H.style.visibility="visible",z.style.visibility="hidden",bl(H,{transform:`translate(${V}px, ${G}px) scale(${oe})`,color:ee,...W},{duration:ae,easing:Fh,direction:D?"normal":"reverse"}).finished.then(()=>{H.style.removeProperty("visibility"),z.style.removeProperty("visibility")})})}},{flush:"post"});const M=I(()=>({isActive:g,isFocused:l,controlRef:_,blur:c,focus:u}));function O(D){D.target!==document.activeElement&&D.preventDefault()}function A(D){var H;D.key!=="Enter"&&D.key!==" "||(D.preventDefault(),D.stopPropagation(),(H=e["onClick:clear"])==null||H.call(e,new MouseEvent("click")))}return Pe(()=>{var V,G,te;const D=e.variant==="outlined",H=!!(s["prepend-inner"]||e.prependInnerIcon),z=!!(e.clearable||s.clear),Y=!!(s["append-inner"]||e.appendInnerIcon||z),q=()=>s.label?s.label({...M.value,label:e.label,props:{for:b.value}}):e.label;return h("div",ve({class:["v-field",{"v-field--active":g.value,"v-field--appended":Y,"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--flat":e.flat,"v-field--has-background":!!e.bgColor,"v-field--persistent-clear":e.persistentClear,"v-field--prepended":H,"v-field--reverse":e.reverse,"v-field--single-line":e.singleLine,"v-field--no-label":!q(),[`v-field--variant-${e.variant}`]:!0},i.value,T.value,a.value,o.value,f.value,p.value,e.class],style:[x.value,e.style],onClick:O},n),[h("div",{class:"v-field__overlay"},null),h(qp,{name:"v-field",active:!!e.loading,color:e.error?"error":typeof e.loading=="string"?e.loading:e.color},{default:s.loader}),H&&h("div",{key:"prepend",class:"v-field__prepend-inner"},[e.prependInnerIcon&&h(d,{key:"prepend-icon",name:"prependInner"},null),(V=s["prepend-inner"])==null?void 0:V.call(s,M.value)]),h("div",{class:"v-field__field","data-no-activator":""},[["filled","solo","solo-inverted","solo-filled"].includes(e.variant)&&m.value&&h(xf,{key:"floating-label",ref:C,class:[E.value],floating:!0,for:b.value,style:P.value},{default:()=>[q()]}),h(xf,{ref:S,for:b.value},{default:()=>[q()]}),(G=s.default)==null?void 0:G.call(s,{...M.value,props:{id:b.value,class:"v-field__input","aria-describedby":w.value},focus:u,blur:c})]),z&&h(YT,{key:"clear"},{default:()=>[Jt(h("div",{class:"v-field__clearable",onMousedown:W=>{W.preventDefault(),W.stopPropagation()}},[h(It,{defaults:{VIcon:{icon:e.clearIcon}}},{default:()=>[s.clear?s.clear({...M.value,props:{onKeydown:A,onFocus:u,onBlur:c,onClick:e["onClick:clear"]}}):h(d,{name:"clear",onKeydown:A,onFocus:u,onBlur:c},null)]})]),[[No,e.dirty]])]}),Y&&h("div",{key:"append",class:"v-field__append-inner"},[(te=s["append-inner"])==null?void 0:te.call(s,M.value),e.appendInnerIcon&&h(d,{key:"append-icon",name:"appendInner"},null)]),h("div",{class:["v-field__outline",E.value],style:P.value},[D&&h(Ce,null,[h("div",{class:"v-field__outline__start"},null),m.value&&h("div",{class:"v-field__outline__notch"},[h(xf,{ref:C,floating:!0,for:b.value},{default:()=>[q()]})]),h("div",{class:"v-field__outline__end"},null)]),R.value&&m.value&&h(xf,{ref:C,floating:!0,for:b.value},{default:()=>[q()]})])])}),{controlRef:_}}});function $w(e){const t=Object.keys(_m.props).filter(n=>!Hp(n)&&n!=="class"&&n!=="style");return lT(e,t)}const q6=ce({active:Boolean,color:String,messages:{type:[Array,String],default:()=>[]},...Ue(),...xu({transition:{component:GT,leaveAbsolute:!0,group:!0}})},"VMessages"),W6=ke()({name:"VMessages",props:q6(),setup(e,t){let{slots:n}=t;const r=I(()=>On(e.messages)),{textColorClasses:s,textColorStyles:i}=Es(I(()=>e.color));return Pe(()=>h(ti,{transition:e.transition,tag:"div",class:["v-messages",s.value,e.class],style:[i.value,e.style],role:"alert","aria-live":"polite"},{default:()=>[e.active&&r.value.map((o,a)=>h("div",{class:"v-messages__message",key:`${a}-${r.value}`},[n.message?n.message({message:o}):o]))]})),{}}}),FA=Symbol.for("vuetify:form"),G6=ce({disabled:Boolean,fastFail:Boolean,readonly:Boolean,modelValue:{type:Boolean,default:null},validateOn:{type:String,default:"input"}},"form");function K6(e){const t=rt(e,"modelValue"),n=I(()=>e.disabled),r=I(()=>e.readonly),s=Oe(!1),i=B([]),o=B([]);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 xe(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"}),Wt(FA,{register:c=>{let{id:d,vm:f,validate:p,reset:g,resetValidation:m}=c;i.value.some(y=>y.id===d),i.value.push({id:d,validate:p,reset:g,resetValidation:m,vm:Op(f),isValid:null,errorMessages:[]})},unregister:c=>{i.value=i.value.filter(d=>d.id!==c)},update:(c,d,f)=>{const p=i.value.find(g=>g.id===c);p&&(p.isValid=d,p.errorMessages=f)},isDisabled:n,isReadonly:r,isValidating:s,isValid:t,items:i,validateOn:Te(e,"validateOn")}),{errors:o,isDisabled:n,isReadonly:r,isValidating:s,isValid:t,items:i,validate:a,reset:l,resetValidation:u}}function NA(){return Ke(FA,null)}const Y6=ce({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,...LA()},"validation");function X6(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ui(),n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:gr();const r=rt(e,"modelValue"),s=I(()=>e.validationValue===void 0?r.value:e.validationValue),i=NA(),o=B([]),a=Oe(!0),l=I(()=>!!(On(r.value===""?null:r.value).length||On(s.value===""?null:s.value).length)),u=I(()=>!!(e.disabled??(i==null?void 0:i.isDisabled.value))),c=I(()=>!!(e.readonly??(i==null?void 0:i.isReadonly.value))),d=I(()=>{var _;return(_=e.errorMessages)!=null&&_.length?On(e.errorMessages).concat(o.value).slice(0,Math.max(0,+e.maxErrors)):o.value}),f=I(()=>{let _=(e.validateOn??(i==null?void 0:i.validateOn.value))||"input";_==="lazy"&&(_="input lazy"),_==="eager"&&(_="input eager");const R=new Set((_==null?void 0:_.split(" "))??[]);return{input:R.has("input"),blur:R.has("blur")||R.has("input")||R.has("invalid-input"),invalidInput:R.has("invalid-input"),lazy:R.has("lazy"),eager:R.has("eager")}}),p=I(()=>{var _;return e.error||(_=e.errorMessages)!=null&&_.length?!1:e.rules.length?a.value?o.value.length||f.value.lazy?null:!0:!o.value.length:!0}),g=Oe(!1),m=I(()=>({[`${t}--error`]:p.value===!1,[`${t}--dirty`]:l.value,[`${t}--disabled`]:u.value,[`${t}--readonly`]:c.value})),y=sn("validation"),b=I(()=>e.name??Q(n));Lp(()=>{i==null||i.register({id:b.value,vm:y,validate:C,reset:w,resetValidation:S})}),Pn(()=>{i==null||i.unregister(b.value)}),St(async()=>{f.value.lazy||await C(!f.value.eager),i==null||i.update(b.value,p.value,d.value)}),qr(()=>f.value.input||f.value.invalidInput&&p.value===!1,()=>{xe(s,()=>{if(s.value!=null)C();else if(e.focused){const _=xe(()=>e.focused,R=>{R||C(),_()})}})}),qr(()=>f.value.blur,()=>{xe(()=>e.focused,_=>{_||C()})}),xe([p,d],()=>{i==null||i.update(b.value,p.value,d.value)});async function w(){r.value=null,await At(),await S()}async function S(){a.value=!0,f.value.lazy?o.value=[]:await C(!f.value.eager)}async function C(){let _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const R=[];g.value=!0;for(const T of e.rules){if(R.length>=+(e.maxErrors??1))break;const E=await(typeof T=="function"?T:()=>T)(s.value);if(E!==!0){if(E!==!1&&typeof E!="string"){console.warn(`${E} is not a valid value. Rule functions must return boolean true or a string.`);continue}R.push(E||"")}}return o.value=R,g.value=!1,a.value=_,o.value}return{errorMessages:d,isDirty:l,isDisabled:u,isReadonly:c,isPristine:a,isValid:p,isValidating:g,reset:w,resetValidation:S,validate:C,validationClasses:m}}const el=ce({id:String,appendIcon:Je,centerAffix:{type:Boolean,default:!0},prependIcon:Je,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":Bn(),"onClick:append":Bn(),...Ue(),...Or(),...uT(Mr(),["maxWidth","minWidth","width"]),...Mt(),...Y6()},"VInput"),us=ke()({name:"VInput",props:{...el()},emits:{"update:modelValue":e=>!0},setup(e,t){let{attrs:n,slots:r,emit:s}=t;const{densityClasses:i}=hs(e),{dimensionStyles:o}=Dr(e),{themeClasses:a}=Kt(e),{rtlClasses:l}=$r(),{InputIcon:u}=$A(e),c=gr(),d=I(()=>e.id||`input-${c}`),f=I(()=>`${d.value}-messages`),{errorMessages:p,isDirty:g,isDisabled:m,isReadonly:y,isPristine:b,isValid:w,isValidating:S,reset:C,resetValidation:_,validate:R,validationClasses:T}=X6(e,"v-input",d),x=I(()=>({id:d,messagesId:f,isDirty:g,isDisabled:m,isReadonly:y,isPristine:b,isValid:w,isValidating:S,reset:C,resetValidation:_,validate:R})),E=I(()=>{var P;return(P=e.errorMessages)!=null&&P.length||!b.value&&p.value.length?p.value:e.hint&&(e.persistentHint||e.focused)?e.hint:e.messages});return Pe(()=>{var D,H,z,Y;const P=!!(r.prepend||e.prependIcon),M=!!(r.append||e.appendIcon),O=E.value.length>0,A=!e.hideDetails||e.hideDetails==="auto"&&(O||!!r.details);return h("div",{class:["v-input",`v-input--${e.direction}`,{"v-input--center-affix":e.centerAffix,"v-input--hide-spin-buttons":e.hideSpinButtons},i.value,a.value,l.value,T.value,e.class],style:[o.value,e.style]},[P&&h("div",{key:"prepend",class:"v-input__prepend"},[(D=r.prepend)==null?void 0:D.call(r,x.value),e.prependIcon&&h(u,{key:"prepend-icon",name:"prepend"},null)]),r.default&&h("div",{class:"v-input__control"},[(H=r.default)==null?void 0:H.call(r,x.value)]),M&&h("div",{key:"append",class:"v-input__append"},[e.appendIcon&&h(u,{key:"append-icon",name:"append"},null),(z=r.append)==null?void 0:z.call(r,x.value)]),A&&h("div",{class:"v-input__details"},[h(W6,{id:f.value,active:O,messages:E.value},{message:r.message}),(Y=r.details)==null?void 0:Y.call(r,x.value)])])}),{reset:C,resetValidation:_,validate:R,isValid:w,errorMessages:p}}}),Q6=["color","file","time","date","datetime-local","week","month"],VA=ce({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,...el(),...Sm()},"VTextField"),ct=ke()({name:"VTextField",directives:{Intersect:Cw},inheritAttrs:!1,props:VA(),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=rt(e,"modelValue"),{isFocused:o,focus:a,blur:l}=Du(e),u=I(()=>typeof e.counterValue=="function"?e.counterValue(i.value):typeof e.counterValue=="number"?e.counterValue:(i.value??"").toString().length),c=I(()=>{if(n.maxlength)return n.maxlength;if(!(!e.counter||typeof e.counter!="number"&&typeof e.counter!="string"))return e.counter}),d=I(()=>["plain","underlined"].includes(e.variant));function f(R,T){var x,E;!e.autofocus||!R||(E=(x=T[0].target)==null?void 0:x.focus)==null||E.call(x)}const p=B(),g=B(),m=B(),y=I(()=>Q6.includes(e.type)||e.persistentPlaceholder||o.value||e.active);function b(){var R;m.value!==document.activeElement&&((R=m.value)==null||R.focus()),o.value||a()}function w(R){r("mousedown:control",R),R.target!==m.value&&(b(),R.preventDefault())}function S(R){b(),r("click:control",R)}function C(R){R.stopPropagation(),b(),At(()=>{i.value=null,$b(e["onClick:clear"],R)})}function _(R){var x;const T=R.target;if(i.value=T.value,(x=e.modelModifiers)!=null&&x.trim&&["text","search","password","tel","url"].includes(e.type)){const E=[T.selectionStart,T.selectionEnd];At(()=>{T.selectionStart=E[0],T.selectionEnd=E[1]})}}return Pe(()=>{const R=!!(s.counter||e.counter!==!1&&e.counter!=null),T=!!(R||s.details),[x,E]=qa(n),{modelValue:P,...M}=us.filterProps(e),O=$w(e);return h(us,ve({ref:p,modelValue:i.value,"onUpdate:modelValue":A=>i.value=A,class:["v-text-field",{"v-text-field--prefixed":e.prefix,"v-text-field--suffixed":e.suffix,"v-input--plain-underlined":d.value},e.class],style:e.style},x,M,{centerAffix:!d.value,focused:o.value}),{...s,default:A=>{let{id:D,isDisabled:H,isDirty:z,isReadonly:Y,isValid:q}=A;return h(_m,ve({ref:g,onMousedown:w,onClick:S,"onClick:clear":C,"onClick:prependInner":e["onClick:prependInner"],"onClick:appendInner":e["onClick:appendInner"],role:e.role},O,{id:D.value,active:y.value||z.value,dirty:z.value||e.dirty,disabled:H.value,focused:o.value,error:q.value===!1}),{...s,default:V=>{let{props:{class:G,...te}}=V;const W=Jt(h("input",ve({ref:m,value:i.value,onInput:_,autofocus:e.autofocus,readonly:Y.value,disabled:H.value,name:e.name,placeholder:e.placeholder,size:1,type:e.type,onFocus:b,onBlur:l},te,E),null),[[hr("intersect"),{handler:f},null,{once:!0}]]);return h(Ce,null,[e.prefix&&h("span",{class:"v-text-field__prefix"},[h("span",{class:"v-text-field__prefix__text"},[e.prefix])]),s.default?h("div",{class:G,"data-no-activator":""},[s.default(),W]):Mi(W,{class:G}),e.suffix&&h("span",{class:"v-text-field__suffix"},[h("span",{class:"v-text-field__suffix__text"},[e.suffix])])])}})},details:T?A=>{var D;return h(Ce,null,[(D=s.details)==null?void 0:D.call(s,A),R&&h(Ce,null,[h("span",null,null),h(Mw,{active:e.persistentCounter||o.value,value:u.value,max:c.value,disabled:e.disabled},s.counter)])])}:void 0})}),zi({},p,g,m)}}),J6=ce({id:String,text:String,...Rs(Dd({closeOnBack:!1,location:"end",locationStrategy:"connected",eager:!0,minWidth:0,offset:10,openOnClick:!1,openOnHover:!0,origin:"auto",scrim:!1,scrollStrategy:"reposition",transition:!1}),["absolute","persistent"])},"VTooltip"),xt=ke()({name:"VTooltip",props:J6(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=rt(e,"modelValue"),{scopeId:s}=ku(),i=gr(),o=I(()=>e.id||`v-tooltip-${i}`),a=B(),l=I(()=>e.location.split(" ").length>1?e.location:e.location+" center"),u=I(()=>e.origin==="auto"||e.origin==="overlap"||e.origin.split(" ").length>1||e.location.split(" ").length>1?e.origin:e.origin+" center"),c=I(()=>e.transition?e.transition:r.value?"scale-transition":"fade-transition"),d=I(()=>ve({"aria-describedby":o.value},e.activatorProps));return Pe(()=>{const f=Di.filterProps(e);return h(Di,ve({ref:a,class:["v-tooltip",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,persistent:!0,role:"tooltip",activatorProps:d.value,_disableGlobalStack:!0},s),{activator:n.activator,default:function(){var y;for(var p=arguments.length,g=new Array(p),m=0;m<p;m++)g[m]=arguments[m];return((y=n.default)==null?void 0:y.call(n,...g))??e.text}})}),zi({},a)}}),Z6={key:0,class:"d-flex justify-center static-disabled"},eG={key:1,class:"pulsating-red d-flex justify-center"},tG={key:0,class:"d-flex justify-center"},nG={key:0},rG={key:1},sG={key:1},iG={key:0},oG={key:1},aG={key:0},lG={key:1},uG={key:0},cG={key:1},dG={key:2},fG=De({__name:"FileExplorerSideNav",setup(e){const t=Lt(),n=nr(),r=ji(),s=B(36),i=B(void 0),o=B(void 0),a=B(!1),l=B(!0),u=I(()=>t.sideNavPrinter),c=I(()=>{var ne;return(ne=u.value)==null?void 0:ne.id}),d=I(()=>c.value?n.isApiResponding(c.value):!1),f=I(()=>{var ne;return kA((ne=u.value)==null?void 0:ne.printerType)}),p=I(()=>{var ne;return xA((ne=u.value)==null?void 0:ne.printerType)}),g=I(()=>{var ne;return EA((ne=u.value)==null?void 0:ne.printerType)}),m=I(()=>c.value?n.isPrinterOperational(c.value):!1),y=I(()=>{var ne;return(ne=u.value)==null?void 0:ne.enabled}),b=I(()=>{var ne,U;return!!((U=(ne=u.value)==null?void 0:ne.disabledReason)!=null&&U.length)}),w=I(()=>c.value?n.isPrinterPrinting(c.value):!1),S=I(()=>{var ne;return(ne=o.value)!=null&&ne.length?o.value.filter(U=>{var Fe;return(Fe=i.value)!=null&&Fe.length?`${U.path}`.toLowerCase().includes(i.value):!0})||[]:[]}),C=I(()=>!u.value||!c.value?!1:n.isPrinterStoppable(c.value)),_=I(()=>!u.value||!c.value?!1:n.isPrinterPaused(c.value)),R=I(()=>{var ne;return c.value?((ne=o.value)==null?void 0:ne.length)&&n.isApiResponding(c.value):!1}),T=I(()=>{if(!c.value)throw new Error("Printer ID not set, cannot get current job");return n.printerJobsById[c.value]}),x=I(()=>{if(!c.value)throw new Error("Printer ID not set, cannot get current printing file name");return n.printingFilePathsByPrinterId[c.value]}),E=I(()=>{var F;if(!c.value||!u.value)return null;const ne=n.printerEventsById[c.value],U=n.socketStatesById[c.value],Fe=qI(u.value,U,ne);return((F=Ds().frontendDebugSettings)==null?void 0:F.showInterpretedPrinterState)&&console.debug("[FileExplorerSideNav] rendered for printerId",c.value,Fe==null?void 0:Fe.text,Fe==null?void 0:Fe.color,Fe==null?void 0:Fe.rgb),Fe}),P=async()=>{var U;l.value=!0;const ne=(U=u.value)==null?void 0:U.id;if(ne)try{n.isApiResponding(ne)?o.value=await t.loadPrinterFiles(ne):o.value=await xo.getFileCache(ne)}finally{l.value=!1}},M=async ne=>{c.value&&await t.deletePrinterFile(c.value,ne.path)};xe(u,async(ne,U)=>{a.value=!!ne;const Fe=ne==null?void 0:ne.id;!ne||!Fe||(!o.value||ne.id!==(U==null?void 0:U.id)||!U)&&await P()}),xe(a,ne=>{ne||t.setSideNavPrinter(void 0)});function O(ne){return ne?ne==null?void 0:ne.toFixed(1):""}function A(ne){return c.value?n.printingFilePathsByPrinterId[c.value]===ne.path:!1}function D(){const ne=u.value;if(ne&&a.value)return vm(ne.name)}function H(){u.value&&(jt.openPrinterURL(u.value.printerURL),me())}function z(){if(!u.value)return;const ne=new URL(u.value.printerURL);ne.port="8080",jt.openPrinterURL(ne.toString()),me()}async function Y(){if(c.value){if(n.isPrinterOperational(c.value))return await jt.sendPrinterDisconnectCommand(c.value);await jt.sendPrinterConnectCommand(c.value)}}async function q(){if(!c.value)throw new Error("Printer ID not set, cant toggle enabled");if(!u.value)throw new Error("Cant toggle enabled, sidenav printer unset");const ne=!u.value.enabled;await jt.toggleEnabled(c.value,ne)}async function V(){if(!c.value)throw new Error("Printer ID not set, cant toggle maintenance");if(!u.value)throw new Error("Cant toggle enabled, sidenav printer unset");if(b.value){await jt.updatePrinterMaintenance(c.value);return}t.setMaintenanceDialogPrinter(u.value),await en(tn.PrinterMaintenanceDialog).openDialog(),me()}async function G(){c.value&&await jt.refreshSocket(c.value)}async function te(){c.value&&confirm("Are you sure to cancel the current print job?")&&await ch.stopPrintJob(c.value)}async function W(){c.value&&await ch.pausePrintJob(c.value)}async function J(){c.value&&await ch.resumePrintJob(c.value)}async function pe(){c.value&&(l.value=!0,await t.clearPrinterFiles(c.value),l.value=!1,o.value=t.printerFiles(c.value))}function ae(){u.value&&(t.setUpdateDialogPrinter(u.value),en(tn.AddOrUpdatePrinterDialog).openDialog(),me())}async function oe(ne){c.value&&await n.selectAndPrintFile({printerId:c.value,fullPath:ne.path})}function ee(ne){c.value&&xo.downloadFile(c.value,ne)}function me(){t.setSideNavPrinter(void 0)}return(ne,U)=>{const Fe=hr("drop-upload");return L(),Z(Ow,{modelValue:a.value,"onUpdate:modelValue":U[14]||(U[14]=at=>a.value=at),loading:"true",absolute:"",location:"right",scrim:"white",temporary:"",width:"700",onClose:U[15]||(U[15]=at=>me())},{default:v(()=>{var at,F,N;return[u.value?(L(),Z(Le,{key:0,lines:"two"},{prepend:v(()=>[h(xt,{location:"left"},{activator:v(({props:K})=>[h(re,ve({size:s.value},K,{icon:"",class:"mr-4 mt-1",color:"primary",onClick:U[0]||(U[0]=de=>H()),onMouseup:U[1]||(U[1]=Dt(de=>H(),["middle"]))}),{default:v(()=>[h(lt,{size:s.value,class:"font-weight-bold",color:"primary"},{default:v(()=>[k(ie(D()),1)]),_:1},8,["size"])]),_:2},1040,["size"])]),default:v(()=>[$("span",null," Visit the "+ie(g.value)+" associated to this printer ",1)]),_:1})]),default:v(()=>[h(ut,{class:"font-weight-bold"},{default:v(()=>[k(ie(u.value.name),1)]),_:1}),h(vt),h(LW,null,{default:v(()=>{var K,de,le,we;return[!y.value||!d.value?(L(),ye("strong",Z6,ie(y.value?"Enabled":"Disabled")+" - "+ie(d.value?(de=(K=E.value)==null?void 0:K.text)==null?void 0:de.toUpperCase():"Offline"),1)):he("",!0),y.value&&((le=E.value)!=null&&le.text)&&m.value&&d.value?(L(),ye("strong",eG," Enabled - "+ie((we=E.value)==null?void 0:we.text),1)):he("",!0)]}),_:1}),T.value?(L(),Z(vt,{key:0},{default:v(()=>{var K,de,le,we;return[(K=T.value)!=null&&K.progress?(L(),ye("span",tG," Progress: "+ie(O((de=T.value)==null?void 0:de.progress.completion))+"% ",1)):he("",!0),(le=T.value)!=null&&le.progress?(L(),Z(eu,{key:1,"model-value":O((we=T.value.progress)==null?void 0:we.completion),class:"mt-1 mb-1",height:"8px"},null,8,["model-value"])):he("",!0),h(xt,{location:"bottom"},{activator:v(({props:Ee})=>[h(re,ve({variant:"outlined",size:"small"},Ee),{default:v(()=>[k(ie(x.value),1)]),_:2},1040)]),default:v(()=>[$("span",null,ie(x.value),1)]),_:1})]}),_:1})):he("",!0)]),_:1})):he("",!0),!y.value||!d.value?(L(),Z(nn,{key:1,color:"primary"},{default:v(()=>[y.value?(L(),ye("span",rG,[k(" This "+ie(g.value)+" seems unreachable... Will keep trying for you ",1),h(X,null,{default:v(()=>U[16]||(U[16]=[k("hourglass_top")])),_:1})])):(L(),ye("span",nG," Disabled "+ie(g.value)+", enable it first to get live updates ",1))]),_:1})):he("",!0),!((at=u.value)!=null&&at.enabled)&&!((F=u.value)!=null&&F.disabledReason)?(L(),Z(nn,{key:2,color:"secondary"},{default:v(()=>[k(" This "+ie(g.value)+" was disabled without reason. ",1)]),_:1})):he("",!0),(N=u.value)!=null&&N.disabledReason?(L(),Z(nn,{key:3,color:"black"},{default:v(()=>{var K;return[k(" This "+ie(g.value)+" was disabled for maintenance: ",1),U[17]||(U[17]=$("br",null,null,-1)),$("small",null," "+ie((K=u.value)==null?void 0:K.disabledReason),1)]}),_:1})):he("",!0),h(fn),Jt((L(),Z(Ft,{density:"compact"},{default:v(()=>[h(os,{inset:""},{default:v(()=>U[18]||(U[18]=[k(" Manage FDM Monster instance ")])),_:1}),h(xt,{location:"left"},{activator:v(({props:K})=>[h(Le,ve({class:"extra-dense-list-item",link:""},K,{onClick:U[2]||(U[2]=Dt(de=>H(),["prevent","stop"]))}),{prepend:v(()=>[h(lt,{class:"ml-3 mr-6 ma-5",size:s.value},{default:v(()=>[f.value?(L(),Z(hi,{key:0,src:jW})):(L(),ye("span",sG,"MO"))]),_:1},8,["size"])]),default:v(()=>[$("span",null," Open "+ie(g.value),1)]),_:2},1040)]),default:v(()=>[$("span",null," Visit the "+ie(g.value)+" associated to this printer ",1)]),_:1}),p.value?(L(),Z(xt,{key:0,location:"left"},{activator:v(({props:K})=>[h(Le,ve({class:"extra-dense-list-item",link:""},K,{onClick:U[3]||(U[3]=Dt(de=>z(),["prevent","stop"]))}),{prepend:v(()=>[h(lt,{class:"ml-3 mr-6 ma-5",size:s.value},{default:v(()=>U[19]||(U[19]=[$("span",null,"MA",-1)])),_:1},8,["size"])]),default:v(()=>[U[20]||(U[20]=$("span",null," Open Mainsail ",-1))]),_:2},1040)]),default:v(()=>[U[21]||(U[21]=$("span",null," Visit the Mainsail for this printer ",-1))]),_:1})):he("",!0),h(xt,{location:"left"},{activator:v(({props:K})=>[h(Le,ve({class:"extra-dense-list-item",link:""},K,{onClick:U[4]||(U[4]=Dt(de=>q(),["prevent","stop"]))}),{prepend:v(()=>[h(lt,{size:s.value,color:"grey-lighten-1"},{default:v(()=>[h(X,{color:y.value?"primary":"green"},{default:v(()=>U[22]||(U[22]=[k(" dns ")])),_:1},8,["color"])]),_:1},8,["size"])]),default:v(()=>[y.value?(L(),ye("span",iG," Disable Printer Location ")):y.value?he("",!0):(L(),ye("span",oG," Enable Printer Location "))]),_:2},1040)]),default:v(()=>[U[23]||(U[23]=$("span",null," Deactivate connection, without impacting print ",-1))]),_:1}),h(xt,{location:"left"},{activator:v(({props:K})=>[h(Le,ve({class:"extra-dense-list-item",link:""},K,{onClick:U[5]||(U[5]=Dt(de=>V(),["prevent","stop"]))}),{default:v(()=>[h(lt,{size:s.value,color:"grey-lighten-1"},{default:v(()=>[h(X,{color:b.value?"green":"primary"},{default:v(()=>U[24]||(U[24]=[k(" construction ")])),_:1},8,["color"])]),_:1},8,["size"]),b.value?b.value?(L(),ye("span",lG," Complete Maintenance ")):he("",!0):(L(),ye("span",aG," Enable Maintenance "))]),_:2},1040)]),default:v(()=>[U[25]||(U[25]=$("span",null," Deactivate, set under repair, without impacting print ",-1))]),_:1}),h(xt,{location:"left"},{activator:v(({props:K})=>[h(Le,ve({class:"extra-dense-list-item",link:""},K,{onClick:U[6]||(U[6]=Dt(de=>G(),["prevent","stop"]))}),{default:v(()=>[h(lt,{size:s.value},{default:v(()=>[h(X,{color:b.value?"green":"primary",class:"grey-lighten-1"},{default:v(()=>U[26]||(U[26]=[k(" autorenew ")])),_:1},8,["color"])]),_:1},8,["size"]),U[27]||(U[27]=$("span",null,[k(" Refresh State "),$("small",null," - this does not affect the print! ")],-1))]),_:2},1040)]),default:v(()=>[U[28]||(U[28]=$("span",null," Let FDM Monster know you are experiencing inconsistencies, reset all volatile states ",-1))]),_:1}),h(fn),h(os,{inset:""},{default:v(()=>U[29]||(U[29]=[k(" Commands ")])),_:1}),h(xt,{location:"left"},{activator:v(({props:K})=>{var de;return[h(Le,ve({disabled:!((de=u.value)!=null&&de.enabled)||!d.value,class:"extra-dense-list-item",link:""},K,{onClick:U[7]||(U[7]=Dt(le=>Y(),["prevent","stop"]))}),{default:v(()=>[h(lt,{size:s.value},{default:v(()=>[h(X,null,{default:v(()=>U[30]||(U[30]=[k(" usb ")])),_:1})]),_:1},8,["size"]),C.value?(L(),ye("span",uG," Disconnect USB & Stop Print ")):m.value?(L(),ye("span",cG," Disconnect USB ")):(L(),ye("span",dG," Connect USB "))]),_:2},1040,["disabled"])]}),default:v(()=>[U[31]||(U[31]=$("span",null," Disconnect USB, disrupting any print ",-1))]),_:1}),Q(r).hasFeature("pauseResumePrinterCommand")?(L(),Z(xt,{key:1,location:"left"},{activator:v(({props:K})=>[h(Le,ve({disabled:!d.value||!w.value,class:"extra-dense-list-item",link:""},K,{onClick:U[8]||(U[8]=Dt(de=>_.value?J():W(),["prevent","stop"]))}),{default:v(()=>[h(lt,{size:s.value},{default:v(()=>[_.value?he("",!0):(L(),Z(X,{key:0},{default:v(()=>U[32]||(U[32]=[k(" pause ")])),_:1})),_.value?(L(),Z(X,{key:1},{default:v(()=>U[33]||(U[33]=[k(" play_circle_outline ")])),_:1})):he("",!0)]),_:1},8,["size"]),k(" "+ie(_.value?"Resume print":"Pause print"),1)]),_:2},1040,["disabled"])]),default:v(()=>[U[34]||(U[34]=$("span",null," Send Pause or Resume command ",-1))]),_:1})):he("",!0),h(xt,{location:"left"},{activator:v(({props:K})=>[h(Le,ve({disabled:!C.value,class:"extra-dense-list-item",link:""},K,{onClick:U[9]||(U[9]=Dt(de=>te(),["prevent","stop"]))}),{default:v(()=>[h(lt,{size:s.value},{default:v(()=>[h(X,null,{default:v(()=>U[35]||(U[35]=[k(" stop ")])),_:1})]),_:1},8,["size"]),U[36]||(U[36]=k(" Cancel print "))]),_:2},1040,["disabled"])]),default:v(()=>[U[37]||(U[37]=$("span",null," Cancel print gracefully ",-1))]),_:1}),h(xt,{location:"left"},{activator:v(({props:K})=>[h(Le,ve({disabled:!R.value,class:"extra-dense-list-item",link:""},K,{onClick:U[10]||(U[10]=Dt(de=>pe(),["prevent","stop"]))}),{default:v(()=>[h(lt,{size:s.value},{default:v(()=>[h(X,null,{default:v(()=>U[38]||(U[38]=[k(" delete ")])),_:1})]),_:1},8,["size"]),U[39]||(U[39]=k(" Delete files "))]),_:2},1040,["disabled"])]),default:v(()=>[U[40]||(U[40]=$("span",null," Clear all files present on OctoPrint (local) ",-1))]),_:1}),h(xt,{location:"left"},{activator:v(({props:K})=>[h(Le,ve({class:"extra-dense-list-item",link:""},K,{onClick:U[11]||(U[11]=Dt(de=>P(),["prevent","stop"]))}),{default:v(()=>[h(lt,{size:s.value},{default:v(()=>[h(X,null,{default:v(()=>U[41]||(U[41]=[k(" refresh ")])),_:1})]),_:1},8,["size"]),U[42]||(U[42]=k(" Refresh files "))]),_:2},1040)]),default:v(()=>[U[43]||(U[43]=$("span",null," Rebuild the file list on OctoPrint (local) ",-1))]),_:1}),h(xt,{location:"left"},{activator:v(({props:K})=>[h(Le,ve({class:"extra-dense-list-item",link:""},K,{onClick:U[12]||(U[12]=Dt(de=>ae(),["prevent","stop"]))}),{default:v(()=>[h(lt,{size:s.value},{default:v(()=>[h(X,null,{default:v(()=>U[44]||(U[44]=[k(" settings ")])),_:1})]),_:1},8,["size"]),U[45]||(U[45]=k(" Settings "))]),_:2},1040)]),default:v(()=>[U[46]||(U[46]=$("span",null," Edit the printer settings ",-1))]),_:1})]),_:1})),[[Fe,{printers:[u.value]}]]),h(fn),Jt((L(),Z(Ft,{density:"compact"},{default:v(()=>[h(os,{inset:""},{default:v(()=>U[47]||(U[47]=[k(" Files - drag 'n drop! ")])),_:1}),h(ct,{modelValue:i.value,"onUpdate:modelValue":U[13]||(U[13]=K=>i.value=K),class:"ml-5 mr-5",clearable:"",label:"Search files...","prepend-icon":"search"},null,8,["modelValue"]),S.value.length?he("",!0):(L(),Z(Le,{key:0},{default:v(()=>[h(lt,{size:s.value},{default:v(()=>[h(X,null,{default:v(()=>U[48]||(U[48]=[k(" clear ")])),_:1})]),_:1},8,["size"]),h(ut,null,{default:v(()=>U[49]||(U[49]=[k(" No files to show ")])),_:1})]),_:1})),l.value?(L(),Z(eu,{key:1,indeterminate:""})):he("",!0),(L(!0),ye(Ce,null,qt(S.value,(K,de)=>(L(),Z(Le,{key:de,density:"compact",link:"",style:{"padding-top":"0"}},{default:v(()=>[h(lt,{size:s.value},{default:v(()=>[h(xt,{location:"left"},{activator:v(({props:le})=>[h(re,ve({ref_for:!0},le,{onClick:we=>ee(K.path)}),{default:v(()=>[h(X,null,{default:v(()=>U[50]||(U[50]=[k(" download ")])),_:1})]),_:2},1040,["onClick"])]),default:v(()=>[U[51]||(U[51]=$("span",null," Download GCode ",-1))]),_:2},1024)]),_:2},1032,["size"]),h(cu,null,{default:v(()=>[h(xt,{location:"left"},{activator:v(({props:le})=>[h(re,ve({disabled:A(K),icon:"",ref_for:!0},le,{onClick:we=>oe(K)}),{default:v(()=>[h(X,null,{default:v(()=>U[52]||(U[52]=[k(" play_arrow ")])),_:1})]),_:2},1040,["disabled","onClick"])]),default:v(()=>[U[53]||(U[53]=$("span",null," Select & Print ",-1))]),_:2},1024)]),_:2},1024),h(xt,{location:"left"},{activator:v(({props:le})=>[$("span",ve({class:{"current-file-print":A(K)},ref_for:!0},le),ie(K.path),17)]),default:v(()=>[$("span",null,[k(" File: "+ie(K.path)+" ",1),U[54]||(U[54]=$("br",null,null,-1)),k(" Size: "+ie(Q(_A)(K.size))+" ",1),U[55]||(U[55]=$("br",null,null,-1)),$("strong",null,ie(A(K)?"Printing":"Unused"),1)])]),_:2},1024),h(cu,null,{default:v(()=>[h(xt,{location:"left"},{activator:v(({props:le})=>[h(re,ve({disabled:A(K),ref_for:!0},le,{onClick:we=>M(K)}),{default:v(()=>[h(X,{color:"grey-lighten-1"},{default:v(()=>U[56]||(U[56]=[k(" delete ")])),_:1})]),_:2},1040,["disabled","onClick"])]),default:v(()=>[U[57]||(U[57]=$("span",null," Delete file ",-1))]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))]),_:1})),[[Fe,{printers:[u.value]}]])]}),_:1},8,["modelValue"])}}});class td extends vr{static async restartServer(){const t=Ae.serverRestartCommandRoute;return await this.post(t)}static async downloadYamlExport(t){const r=await(await Gn()).request({method:"POST",url:"api/server/export-printers-floors-yaml",data:t,responseType:"arraybuffer"});by(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 Gn()).request({method:"POST",url:"api/server/dump-fdm-monster-logs",responseType:"arraybuffer"});by(n.data,"logs-fdm-monster-"+Date.now()+".zip")}static async clearLogFilesOlderThanWeek(){return await this.delete("api/server/clear-outdated-fdm-monster-logs")}}const BA=Symbol.for("vuetify:selection-control-group"),Lw=ce({color:String,disabled:{type:Boolean,default:null},defaultsTarget:String,error:Boolean,id:String,inline:Boolean,falseIcon:Je,trueIcon:Je,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:Vo},...Ue(),...Or(),...Mt()},"SelectionControlGroup"),hG=ce({...Lw({defaultsTarget:"VSelectionControl"})},"VSelectionControlGroup"),pG=ke()({name:"VSelectionControlGroup",props:hG(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=rt(e,"modelValue"),s=gr(),i=I(()=>e.id||`v-selection-control-group-${s}`),o=I(()=>e.name||i.value),a=new Set;return Wt(BA,{modelValue:r,forceUpdate:()=>{a.forEach(l=>l())},onForceUpdate:l=>{a.add(l),yn(()=>{a.delete(l)})}}),Ar({[e.defaultsTarget]:{color:Te(e,"color"),disabled:Te(e,"disabled"),density:Te(e,"density"),error:Te(e,"error"),inline:Te(e,"inline"),modelValue:r,multiple:I(()=>!!e.multiple||e.multiple==null&&Array.isArray(r.value)),name:o,falseIcon:Te(e,"falseIcon"),trueIcon:Te(e,"trueIcon"),readonly:Te(e,"readonly"),ripple:Te(e,"ripple"),type:Te(e,"type"),valueComparator:Te(e,"valueComparator")}}),Pe(()=>{var l;return h("div",{class:["v-selection-control-group",{"v-selection-control-group--inline":e.inline},e.class],style:e.style,role:e.type==="radio"?"radiogroup":void 0},[(l=n.default)==null?void 0:l.call(n)])}),{}}}),km=ce({label:String,baseColor:String,trueValue:null,falseValue:null,value:null,...Ue(),...Lw()},"VSelectionControl");function mG(e){const t=Ke(BA,void 0),{densityClasses:n}=hs(e),r=rt(e,"modelValue"),s=I(()=>e.trueValue!==void 0?e.trueValue:e.value!==void 0?e.value:!0),i=I(()=>e.falseValue!==void 0?e.falseValue:!1),o=I(()=>!!e.multiple||e.multiple==null&&Array.isArray(r.value)),a=I({get(){const p=t?t.modelValue.value:r.value;return o.value?On(p).some(g=>e.valueComparator(g,s.value)):e.valueComparator(p,s.value)},set(p){if(e.readonly)return;const g=p?s.value:i.value;let m=g;o.value&&(m=p?[...On(r.value),g]:On(r.value).filter(y=>!e.valueComparator(y,s.value))),t?t.modelValue.value=m:r.value=m}}),{textColorClasses:l,textColorStyles:u}=Es(I(()=>{if(!(e.error||e.disabled))return a.value?e.color:e.baseColor})),{backgroundColorClasses:c,backgroundColorStyles:d}=fr(I(()=>a.value&&!e.error&&!e.disabled?e.color:e.baseColor)),f=I(()=>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 Ba=ke()({name:"VSelectionControl",directives:{Ripple:_u},inheritAttrs:!1,props:km(),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}=mG(e),p=gr(),g=Oe(!1),m=Oe(!1),y=B(),b=I(()=>e.id||`input-${p}`),w=I(()=>!e.disabled&&!e.readonly);s==null||s.onForceUpdate(()=>{y.value&&(y.value.checked=a.value)});function S(T){w.value&&(g.value=!0,$h(T.target,":focus-visible")!==!1&&(m.value=!0))}function C(){g.value=!1,m.value=!1}function _(T){T.stopPropagation()}function R(T){if(!w.value){y.value&&(y.value.checked=a.value);return}e.readonly&&s&&At(()=>s.forceUpdate()),a.value=T.target.checked}return Pe(()=>{var M,O;const T=r.label?r.label({label:e.label,props:{for:b.value}}):e.label,[x,E]=qa(n),P=h("input",ve({ref:y,checked:a.value,disabled:!!e.disabled,id:b.value,onBlur:C,onFocus:S,onInput:R,"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},E),null);return h("div",ve({class:["v-selection-control",{"v-selection-control--dirty":a.value,"v-selection-control--disabled":e.disabled,"v-selection-control--error":e.error,"v-selection-control--focused":g.value,"v-selection-control--focus-visible":m.value,"v-selection-control--inline":e.inline},i.value,e.class]},x,{style:e.style}),[h("div",{class:["v-selection-control__wrapper",l.value],style:u.value},[(M=r.default)==null?void 0:M.call(r,{backgroundColorClasses:c,backgroundColorStyles:d}),Jt(h("div",{class:["v-selection-control__input"]},[((O=r.input)==null?void 0:O.call(r,{model:a,textColorClasses:l,textColorStyles:u,backgroundColorClasses:c,backgroundColorStyles:d,inputNode:P,icon:o.value,props:{onFocus:S,onBlur:C,id:b.value}}))??h(Ce,null,[o.value&&h(X,{key:"icon",icon:o.value},null),P])]),[[hr("ripple"),e.ripple&&[!e.disabled&&!e.readonly,null,["center","circle"]]]])]),T&&h(Dw,{for:b.value,onClick:_},{default:()=>[T]})])}),{isFocused:g,input:y}}}),UA=ce({indeterminate:Boolean,indeterminateIcon:{type:Je,default:"$checkboxIndeterminate"},...km({falseIcon:"$checkboxOff",trueIcon:"$checkboxOn"})},"VCheckboxBtn"),du=ke()({name:"VCheckboxBtn",props:UA(),emits:{"update:modelValue":e=>!0,"update:indeterminate":e=>!0},setup(e,t){let{slots:n}=t;const r=rt(e,"indeterminate"),s=rt(e,"modelValue");function i(l){r.value&&(r.value=!1)}const o=I(()=>r.value?e.indeterminateIcon:e.falseIcon),a=I(()=>r.value?e.indeterminateIcon:e.trueIcon);return Pe(()=>{const l=Rs(Ba.filterProps(e),["modelValue"]);return h(Ba,ve(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)}),{}}}),gG=ce({...el(),...Rs(UA(),["inline"])},"VCheckbox"),En=ke()({name:"VCheckbox",inheritAttrs:!1,props:gG(),emits:{"update:modelValue":e=>!0,"update:focused":e=>!0},setup(e,t){let{attrs:n,slots:r}=t;const s=rt(e,"modelValue"),{isFocused:i,focus:o,blur:a}=Du(e),l=gr(),u=I(()=>e.id||`checkbox-${l}`);return Pe(()=>{const[c,d]=qa(n),f=us.filterProps(e),p=du.filterProps(e);return h(us,ve({class:["v-checkbox",e.class]},c,f,{modelValue:s.value,"onUpdate:modelValue":g=>s.value=g,id:u.value,focused:i.value,style:e.style}),{...r,default:g=>{let{id:m,messagesId:y,isDisabled:b,isReadonly:w,isValid:S}=g;return h(du,ve(p,{id:m.value,"aria-describedby":y.value,disabled:b.value,readonly:w.value},d,{error:S.value===!1,modelValue:s.value,"onUpdate:modelValue":C=>s.value=C,onFocus:o,onBlur:a}),r)}})}),{}}}),vG=ce({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))},...el({prependIcon:"$file"}),modelValue:{type:[Array,Object],default:e=>e.multiple?[]:null,validator:e=>On(e).every(t=>t!=null&&typeof t=="object")},...Sm({clearable:!0})},"VFileInput"),HA=ke()({name:"VFileInput",inheritAttrs:!1,props:vG(),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{t:i}=Gr(),o=rt(e,"modelValue",e.modelValue,E=>On(E),E=>!e.multiple&&Array.isArray(E)?E[0]:E),{isFocused:a,focus:l,blur:u}=Du(e),c=I(()=>typeof e.showSize!="boolean"?e.showSize:void 0),d=I(()=>(o.value??[]).reduce((E,P)=>{let{size:M=0}=P;return E+M},0)),f=I(()=>k_(d.value,c.value)),p=I(()=>(o.value??[]).map(E=>{const{name:P="",size:M=0}=E;return e.showSize?`${P} (${k_(M,c.value)})`:P})),g=I(()=>{var P;const E=((P=o.value)==null?void 0:P.length)??0;return e.showSize?i(e.counterSizeString,E,f.value):i(e.counterString,E)}),m=B(),y=B(),b=B(),w=I(()=>a.value||e.active),S=I(()=>["plain","underlined"].includes(e.variant));function C(){var E;b.value!==document.activeElement&&((E=b.value)==null||E.focus()),a.value||l()}function _(E){var P;(P=b.value)==null||P.click()}function R(E){r("mousedown:control",E)}function T(E){var P;(P=b.value)==null||P.click(),r("click:control",E)}function x(E){E.stopPropagation(),C(),At(()=>{o.value=[],$b(e["onClick:clear"],E)})}return xe(o,E=>{(!Array.isArray(E)||!E.length)&&b.value&&(b.value.value="")}),Pe(()=>{const E=!!(s.counter||e.counter),P=!!(E||s.details),[M,O]=qa(n),{modelValue:A,...D}=us.filterProps(e),H=$w(e);return h(us,ve({ref:m,modelValue:o.value,"onUpdate:modelValue":z=>o.value=z,class:["v-file-input",{"v-file-input--chips":!!e.chips,"v-file-input--hide":e.hideInput,"v-input--plain-underlined":S.value},e.class],style:e.style,"onClick:prepend":_},M,D,{centerAffix:!S.value,focused:a.value}),{...s,default:z=>{let{id:Y,isDisabled:q,isDirty:V,isReadonly:G,isValid:te}=z;return h(_m,ve({ref:y,"prepend-icon":e.prependIcon,onMousedown:R,onClick:T,"onClick:clear":x,"onClick:prependInner":e["onClick:prependInner"],"onClick:appendInner":e["onClick:appendInner"]},H,{id:Y.value,active:w.value||V.value,dirty:V.value||e.dirty,disabled:q.value,focused:a.value,error:te.value===!1}),{...s,default:W=>{var ae;let{props:{class:J,...pe}}=W;return h(Ce,null,[h("input",ve({ref:b,type:"file",readonly:G.value,disabled:q.value,multiple:e.multiple,name:e.name,onClick:oe=>{oe.stopPropagation(),G.value&&oe.preventDefault(),C()},onChange:oe=>{if(!oe.target)return;const ee=oe.target;o.value=[...ee.files??[]]},onFocus:C,onBlur:u},pe,O),null),h("div",{class:J},[!!((ae=o.value)!=null&&ae.length)&&!e.hideInput&&(s.selection?s.selection({fileNames:p.value,totalBytes:d.value,totalBytesReadable:f.value}):e.chips?p.value.map(oe=>h(Sn,{key:oe,size:"small",text:oe},null)):p.value.join(", "))])])}})},details:P?z=>{var Y,q;return h(Ce,null,[(Y=s.details)==null?void 0:Y.call(s,z),E&&h(Ce,null,[h("span",null,null),h(Mw,{active:!!((q=o.value)!=null&&q.length),value:g.value,disabled:e.disabled},s.counter)])])}:void 0})}),zi({},m,y,b)}}),yG=ce({...km({falseIcon:"$radioOff",trueIcon:"$radioOn"})},"VRadio"),Ey=ke()({name:"VRadio",props:yG(),setup(e,t){let{slots:n}=t;return Pe(()=>{const r=Ba.filterProps(e);return h(Ba,ve(r,{class:["v-radio",e.class],style:e.style,type:"radio"}),n)}),{}}}),bG=ce({height:{type:[Number,String],default:"auto"},...el(),...Rs(Lw(),["multiple"]),trueIcon:{type:Je,default:"$radioOn"},falseIcon:{type:Je,default:"$radioOff"},type:{type:String,default:"radio"}},"VRadioGroup"),zA=ke()({name:"VRadioGroup",inheritAttrs:!1,props:bG(),emits:{"update:modelValue":e=>!0},setup(e,t){let{attrs:n,slots:r}=t;const s=gr(),i=I(()=>e.id||`radio-group-${s}`),o=rt(e,"modelValue");return Pe(()=>{const[a,l]=qa(n),u=us.filterProps(e),c=Ba.filterProps(e),d=r.label?r.label({label:e.label,props:{for:i.value}}):e.label;return h(us,ve({class:["v-radio-group",e.class],style:e.style},a,u,{modelValue:o.value,"onUpdate:modelValue":f=>o.value=f,id:i.value}),{...r,default:f=>{let{id:p,messagesId:g,isDisabled:m,isReadonly:y}=f;return h(Ce,null,[d&&h(Dw,{id:p.value},{default:()=>[d]}),h(pG,ve(c,{id:p.value,"aria-describedby":g.value,defaultsTarget:"VRadio",trueIcon:e.trueIcon,falseIcon:e.falseIcon,type:e.type,disabled:m.value,readonly:y.value,"aria-labelledby":d?p.value:void 0,multiple:!1},l,{modelValue:o.value,"onUpdate:modelValue":b=>o.value=b}),r)])}})}),{}}}),wG=ce({autoGrow:Boolean,autofocus:Boolean,counter:[Boolean,Number,String],counterValue:Function,prefix:String,placeholder:String,persistentPlaceholder:Boolean,persistentCounter:Boolean,noResize:Boolean,rows:{type:[Number,String],default:5,validator:e=>!isNaN(parseFloat(e))},maxRows:{type:[Number,String],validator:e=>!isNaN(parseFloat(e))},suffix:String,modelModifiers:Object,...el(),...Sm()},"VTextarea"),jA=ke()({name:"VTextarea",directives:{Intersect:Cw},inheritAttrs:!1,props:wG(),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=rt(e,"modelValue"),{isFocused:o,focus:a,blur:l}=Du(e),u=I(()=>typeof e.counterValue=="function"?e.counterValue(i.value):(i.value||"").toString().length),c=I(()=>{if(n.maxlength)return n.maxlength;if(!(!e.counter||typeof e.counter!="number"&&typeof e.counter!="string"))return e.counter});function d(M,O){var A,D;!e.autofocus||!M||(D=(A=O[0].target)==null?void 0:A.focus)==null||D.call(A)}const f=B(),p=B(),g=Oe(""),m=B(),y=I(()=>e.persistentPlaceholder||o.value||e.active);function b(){var M;m.value!==document.activeElement&&((M=m.value)==null||M.focus()),o.value||a()}function w(M){b(),r("click:control",M)}function S(M){r("mousedown:control",M)}function C(M){M.stopPropagation(),b(),At(()=>{i.value="",$b(e["onClick:clear"],M)})}function _(M){var A;const O=M.target;if(i.value=O.value,(A=e.modelModifiers)!=null&&A.trim){const D=[O.selectionStart,O.selectionEnd];At(()=>{O.selectionStart=D[0],O.selectionEnd=D[1]})}}const R=B(),T=B(+e.rows),x=I(()=>["plain","underlined"].includes(e.variant));Un(()=>{e.autoGrow||(T.value=+e.rows)});function E(){e.autoGrow&&At(()=>{if(!R.value||!p.value)return;const M=getComputedStyle(R.value),O=getComputedStyle(p.value.$el),A=parseFloat(M.getPropertyValue("--v-field-padding-top"))+parseFloat(M.getPropertyValue("--v-input-padding-top"))+parseFloat(M.getPropertyValue("--v-field-padding-bottom")),D=R.value.scrollHeight,H=parseFloat(M.lineHeight),z=Math.max(parseFloat(e.rows)*H+A,parseFloat(O.getPropertyValue("--v-input-control-height"))),Y=parseFloat(e.maxRows)*H+A||1/0,q=Tr(D??0,z,Y);T.value=Math.floor((q-A)/H),g.value=Ve(q)})}St(E),xe(i,E),xe(()=>e.rows,E),xe(()=>e.maxRows,E),xe(()=>e.density,E);let P;return xe(R,M=>{M?(P=new ResizeObserver(E),P.observe(R.value)):P==null||P.disconnect()}),Pn(()=>{P==null||P.disconnect()}),Pe(()=>{const M=!!(s.counter||e.counter||e.counterValue),O=!!(M||s.details),[A,D]=qa(n),{modelValue:H,...z}=us.filterProps(e),Y=$w(e);return h(us,ve({ref:f,modelValue:i.value,"onUpdate:modelValue":q=>i.value=q,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":x.value},e.class],style:e.style},A,z,{centerAffix:T.value===1&&!x.value,focused:o.value}),{...s,default:q=>{let{id:V,isDisabled:G,isDirty:te,isReadonly:W,isValid:J}=q;return h(_m,ve({ref:p,style:{"--v-textarea-control-height":g.value},onClick:w,onMousedown:S,"onClick:clear":C,"onClick:prependInner":e["onClick:prependInner"],"onClick:appendInner":e["onClick:appendInner"]},Y,{id:V.value,active:y.value||te.value,centerAffix:T.value===1&&!x.value,dirty:te.value||e.dirty,disabled:G.value,focused:o.value,error:J.value===!1}),{...s,default:pe=>{let{props:{class:ae,...oe}}=pe;return h(Ce,null,[e.prefix&&h("span",{class:"v-text-field__prefix"},[e.prefix]),Jt(h("textarea",ve({ref:m,class:ae,value:i.value,onInput:_,autofocus:e.autofocus,readonly:W.value,disabled:G.value,placeholder:e.placeholder,rows:e.rows,name:e.name,onFocus:b,onBlur:l},oe,D),null),[[hr("intersect"),{handler:d},null,{once:!0}]]),e.autoGrow&&Jt(h("textarea",{class:[ae,"v-textarea__sizer"],id:`${oe.id}-sizer`,"onUpdate:modelValue":ee=>i.value=ee,ref:R,readonly:!0,"aria-hidden":"true"},null),[[LL,i.value]]),e.suffix&&h("span",{class:"v-text-field__suffix"},[e.suffix])])}})},details:O?q=>{var V;return h(Ce,null,[(V=s.details)==null?void 0:V.call(s,q),M&&h(Ce,null,[h("span",null,null),h(Mw,{active:e.persistentCounter||o.value,value:u.value,max:c.value,disabled:e.disabled},s.counter)])])}:void 0})}),zi({},f,p,m)}}),SG={key:0,class:"pl-2"},_G={key:1},kG=De({__name:"YamlImportExportDialog",setup(e){const t=ji(),n=en(tn.YamlImportExport),r=Ot(),s=B(""),i=B(""),o=B(0),a=B(!0),l=B(!0),u=B(!0),c=B(!0),d=B(void 0),f=B(""),p=I(()=>!t.hasFeature("printerGroupsApi")),g=I(()=>!!d.value),m=I(()=>o.value===0),y=async()=>{await t.loadFeatures(),u.value=t.hasFeature("printerGroupsApi")},b=async()=>{l.value&&(c.value=!0),await td.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=""},w=async()=>{if(s.value="",i.value="",!d.value){s.value="The import file was not specified";return}try{await td.uploadAndImportYaml(d.value),d.value=void 0,r.openInfoMessage({title:"Imported the YAML file"}),S()}catch(C){s.value="An error occurred uring import",i.value=C.message.toString(),d.value=void 0}},S=()=>{d.value=void 0,n.closeDialog()};return(C,_)=>{const R=di;return L(),Z(R,{id:Q(n).dialogId,"max-width":"700px",onBeforeOpened:y,onEscape:_[10]||(_[10]=T=>S())},{default:v(()=>[h(bt,{class:"pa-4"},{default:v(()=>[h(on,null,{default:v(()=>_[11]||(_[11]=[$("span",{class:"text-h5"}," YAML export and import ",-1)])),_:1}),h(Zt,null,{default:v(()=>[_[18]||(_[18]=$("div",null,"Choose mode:",-1)),h(ot,null,{default:v(()=>[_[12]||(_[12]=$("br",null,null,-1)),h(zA,{modelValue:Q(o),"onUpdate:modelValue":_[0]||(_[0]=T=>Xe(o)?o.value=T:null),class:"ml-3",inline:""},{default:v(()=>[h(Ey,{value:0,label:"Import YAML"}),h(Ey,{value:1,label:"Export YAML"})]),_:1},8,["modelValue"])]),_:1}),$("div",null,[Q(m)?(L(),ye("div",SG,[h(HA,{modelValue:Q(d),"onUpdate:modelValue":_[1]||(_[1]=T=>Xe(d)?d.value=T:null),accept:".yaml",label:"Select a YAML file for import *"},null,8,["modelValue"])])):(L(),ye("div",_G,[h(En,{modelValue:Q(a),"onUpdate:modelValue":_[2]||(_[2]=T=>Xe(a)?a.value=T:null),class:"pa-0 ma-0 mt-2 ml-2",label:"Include floors"},null,8,["modelValue"]),h(En,{modelValue:Q(u),"onUpdate:modelValue":_[3]||(_[3]=T=>Xe(u)?u.value=T:null),disabled:Q(p),class:"pa-0 ma-0 mt-2 ml-2",label:"Include groups"},null,8,["modelValue","disabled"]),h(En,{modelValue:Q(c),"onUpdate:modelValue":_[4]||(_[4]=T=>Xe(c)?c.value=T:null),class:"pa-0 ma-0 ml-2",label:"Include printers"},null,8,["modelValue"]),h(En,{modelValue:Q(l),"onUpdate:modelValue":_[5]||(_[5]=T=>Xe(l)?l.value=T:null),class:"pa-0 ma-0 ml-2",label:"Include grid positions (auto-includes printers)"},null,8,["modelValue"]),_[13]||(_[13]=k(" Include notes (for yourself): ")),h(jA,{modelValue:Q(f),"onUpdate:modelValue":_[6]||(_[6]=T=>Xe(f)?f.value=T:null),rows:"1"},null,8,["modelValue"])])),Q(m)?he("",!0):(L(),Z(re,{key:2,onClick:_[7]||(_[7]=T=>b())},{default:v(()=>[h(X,null,{default:v(()=>_[14]||(_[14]=[k("download")])),_:1}),_[15]||(_[15]=k(" Export YAML file "))]),_:1})),Q(m)?(L(),Z(re,{key:3,disabled:!Q(g),onClick:_[8]||(_[8]=T=>w())},{default:v(()=>[h(X,null,{default:v(()=>_[16]||(_[16]=[k("upload")])),_:1}),_[17]||(_[17]=k(" Import YAML data "))]),_:1},8,["disabled"])):he("",!0)])]),_:1}),h(Dn,null,{default:v(()=>[_[20]||(_[20]=$("em",{class:"text-red"}," * indicates required field ",-1)),h(vn),h(re,{variant:"text",onClick:_[9]||(_[9]=T=>S())},{default:v(()=>_[19]||(_[19]=[k(" Close ")])),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}}),xG="/assets/octofarm-printer-export-Dw0Zh14I.gif",Fw=Symbol.for("vuetify:v-stepper"),qA=ce({color:String,disabled:{type:[Boolean,String],default:!1},prevText:{type:String,default:"$vuetify.stepper.prev"},nextText:{type:String,default:"$vuetify.stepper.next"}},"VStepperActions"),EG=ke()({name:"VStepperActions",props:qA(),emits:{"click:prev":()=>!0,"click:next":()=>!0},setup(e,t){let{emit:n,slots:r}=t;const{t:s}=Gr();function i(){n("click:prev")}function o(){n("click:next")}return Pe(()=>{const a={onClick:i},l={onClick:o};return h("div",{class:"v-stepper-actions"},[h(It,{defaults:{VBtn:{disabled:["prev",!0].includes(e.disabled),text:s(e.prevText),variant:"text"}}},{default:()=>{var u;return[((u=r.prev)==null?void 0:u.call(r,{props:a}))??h(re,a,null)]}}),h(It,{defaults:{VBtn:{color:e.color,disabled:["next",!0].includes(e.disabled),text:s(e.nextText),variant:"tonal"}}},{default:()=>{var u;return[((u=r.next)==null?void 0:u.call(r,{props:l}))??h(re,l,null)]}})])}),{}}}),Nw=vu("v-stepper-header"),CG=ce({color:String,title:String,subtitle:String,complete:Boolean,completeIcon:{type:String,default:"$complete"},editable:Boolean,editIcon:{type:String,default:"$edit"},error:Boolean,errorIcon:{type:String,default:"$error"},icon:String,ripple:{type:[Boolean,Object],default:!0},rules:{type:Array,default:()=>[]}},"StepperItem"),TG=ce({...CG(),...Pd()},"VStepperItem"),dh=ke()({name:"VStepperItem",directives:{Ripple:_u},props:TG(),emits:{"group:selected":e=>!0},setup(e,t){let{slots:n}=t;const r=Id(e,Fw,!0),s=I(()=>(r==null?void 0:r.value.value)??e.value),i=I(()=>e.rules.every(f=>f()===!0)),o=I(()=>!e.disabled&&e.editable),a=I(()=>!e.disabled&&e.editable),l=I(()=>e.error||!i.value),u=I(()=>e.complete||e.rules.length>0&&i.value),c=I(()=>l.value?e.errorIcon:u.value?e.completeIcon:r.isSelected.value&&e.editable?e.editIcon:e.icon),d=I(()=>({canEdit:a.value,hasError:l.value,hasCompleted:u.value,title:e.title,subtitle:e.subtitle,step:s.value,value:e.value}));return Pe(()=>{var y,b,w;const f=(!r||r.isSelected.value||u.value||a.value)&&!l.value&&!e.disabled,p=!!(e.title!=null||n.title),g=!!(e.subtitle!=null||n.subtitle);function m(){r==null||r.toggle()}return Jt(h("button",{class:["v-stepper-item",{"v-stepper-item--complete":u.value,"v-stepper-item--disabled":e.disabled,"v-stepper-item--error":l.value},r==null?void 0:r.selectedClass.value],disabled:!e.editable,onClick:m},[o.value&&Bo(!0,"v-stepper-item"),h(lt,{key:"stepper-avatar",class:"v-stepper-item__avatar",color:f?e.color:void 0,size:24},{default:()=>{var S;return[((S=n.icon)==null?void 0:S.call(n,d.value))??(c.value?h(X,{icon:c.value},null):s.value)]}}),h("div",{class:"v-stepper-item__content"},[p&&h("div",{key:"title",class:"v-stepper-item__title"},[((y=n.title)==null?void 0:y.call(n,d.value))??e.title]),g&&h("div",{key:"subtitle",class:"v-stepper-item__subtitle"},[((b=n.subtitle)==null?void 0:b.call(n,d.value))??e.subtitle]),(w=n.default)==null?void 0:w.call(n,d.value)])]),[[hr("ripple"),e.ripple&&e.editable,null]])}),{}}}),RG=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 PG(e,t){var r;const n=e.changedTouches[0];t.touchstartX=n.clientX,t.touchstartY=n.clientY,(r=t.start)==null||r.call(t,{originalEvent:e,...t})}function IG(e,t){var r;const n=e.changedTouches[0];t.touchendX=n.clientX,t.touchendY=n.clientY,(r=t.end)==null||r.call(t,{originalEvent:e,...t}),RG(t)}function AG(e,t){var r;const n=e.changedTouches[0];t.touchmoveX=n.clientX,t.touchmoveY=n.clientY,(r=t.move)==null||r.call(t,{originalEvent:e,...t})}function OG(){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=>PG(n,t),touchend:n=>IG(n,t),touchmove:n=>AG(n,t)}}function MG(e,t){var a;const n=t.value,r=n!=null&&n.parent?e.parentElement:e,s=(n==null?void 0:n.options)??{passive:!0},i=(a=t.instance)==null?void 0:a.$.uid;if(!r||!i)return;const o=OG(t.value);r._touchHandlers=r._touchHandlers??Object.create(null),r._touchHandlers[i]=o,aT(o).forEach(l=>{r.addEventListener(l,o[l],s)})}function DG(e,t){var i,o;const n=(i=t.value)!=null&&i.parent?e.parentElement:e,r=(o=t.instance)==null?void 0:o.$.uid;if(!(n!=null&&n._touchHandlers)||!r)return;const s=n._touchHandlers[r];aT(s).forEach(a=>{n.removeEventListener(a,s[a])}),delete n._touchHandlers[r]}const WA={mounted:MG,unmounted:DG},GA=Symbol.for("vuetify:v-window"),KA=Symbol.for("vuetify:v-window-group"),YA=ce({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"},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"},...Ue(),...wt(),...Mt()},"VWindow"),nk=ke()({name:"VWindow",directives:{Touch:WA},props:YA(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{themeClasses:r}=Kt(e),{isRtl:s}=$r(),{t:i}=Gr(),o=yu(e,KA),a=B(),l=I(()=>s.value?!e.reverse:e.reverse),u=Oe(!1),c=I(()=>{const C=e.direction==="vertical"?"y":"x",R=(l.value?!u.value:u.value)?"-reverse":"";return`v-window-${C}${R}-transition`}),d=Oe(0),f=B(void 0),p=I(()=>o.items.value.findIndex(C=>o.selected.value.includes(C.id)));xe(p,(C,_)=>{const R=o.items.value.length,T=R-1;R<=2?u.value=C<_:C===T&&_===0?u.value=!0:C===0&&_===T?u.value=!1:u.value=C<_}),Wt(GA,{transition:c,isReversed:u,transitionCount:d,transitionHeight:f,rootRef:a});const g=I(()=>e.continuous||p.value!==0),m=I(()=>e.continuous||p.value!==o.items.value.length-1);function y(){g.value&&o.prev()}function b(){m.value&&o.next()}const w=I(()=>{const C=[],_={icon:s.value?e.nextIcon:e.prevIcon,class:`v-window__${l.value?"right":"left"}`,onClick:o.prev,"aria-label":i("$vuetify.carousel.prev")};C.push(g.value?n.prev?n.prev({props:_}):h(re,_,null):h("div",null,null));const R={icon:s.value?e.prevIcon:e.nextIcon,class:`v-window__${l.value?"left":"right"}`,onClick:o.next,"aria-label":i("$vuetify.carousel.next")};return C.push(m.value?n.next?n.next({props:R}):h(re,R,null):h("div",null,null)),C}),S=I(()=>e.touch===!1?e.touch:{...{left:()=>{l.value?y():b()},right:()=>{l.value?b():y()},start:_=>{let{originalEvent:R}=_;R.stopPropagation()}},...e.touch===!0?{}:e.touch});return Pe(()=>Jt(h(e.tag,{ref:a,class:["v-window",{"v-window--show-arrows-on-hover":e.showArrows==="hover"},r.value,e.class],style:e.style},{default:()=>{var C,_;return[h("div",{class:"v-window__container",style:{height:f.value}},[(C=n.default)==null?void 0:C.call(n,{group:o}),e.showArrows!==!1&&h("div",{class:"v-window__controls"},[w.value])]),(_=n.additional)==null?void 0:_.call(n,{group:o})]}}),[[hr("touch"),S.value]])),{group:o}}}),$G=ce({...Rs(YA(),["continuous","nextIcon","prevIcon","showArrows","touch","mandatory"])},"VStepperWindow"),XA=ke()({name:"VStepperWindow",props:$G(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=Ke(Fw,null),s=rt(e,"modelValue"),i=I({get(){var o;return s.value!=null||!r?s.value:(o=r.items.value.find(a=>r.selected.value.includes(a.id)))==null?void 0:o.value},set(o){s.value=o}});return Pe(()=>{const o=nk.filterProps(e);return h(nk,ve({_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)}),{}}}),QA=ce({reverseTransition:{type:[Boolean,String],default:void 0},transition:{type:[Boolean,String],default:void 0},...Ue(),...Pd(),...ZT()},"VWindowItem"),rk=ke()({name:"VWindowItem",directives:{Touch:WA},props:QA(),emits:{"group:selected":e=>!0},setup(e,t){let{slots:n}=t;const r=Ke(GA),s=Id(e,KA),{isBooted:i}=qd();if(!r||!s)throw new Error("[Vuetify] VWindowItem must be used inside VWindow");const o=Oe(!1),a=I(()=>i.value&&(r.isReversed.value?e.reverseTransition!==!1:e.transition!==!1));function l(){!o.value||!r||(o.value=!1,r.transitionCount.value>0&&(r.transitionCount.value-=1,r.transitionCount.value===0&&(r.transitionHeight.value=void 0)))}function u(){var g;o.value||!r||(o.value=!0,r.transitionCount.value===0&&(r.transitionHeight.value=Ve((g=r.rootRef.value)==null?void 0:g.clientHeight)),r.transitionCount.value+=1)}function c(){l()}function d(g){o.value&&At(()=>{!a.value||!o.value||!r||(r.transitionHeight.value=Ve(g.clientHeight))})}const f=I(()=>{const g=r.isReversed.value?e.reverseTransition:e.transition;return a.value?{name:typeof g!="string"?r.transition.value:g,onBeforeEnter:u,onAfterEnter:l,onEnterCancelled:c,onBeforeLeave:u,onAfterLeave:l,onLeaveCancelled:c,onEnter:d}:!1}),{hasContent:p}=eR(e,s.isSelected);return Pe(()=>h(ti,{transition:f.value,disabled:!i.value},{default:()=>{var g;return[Jt(h("div",{class:["v-window-item",s.selectedClass.value,e.class],style:e.style},[p.value&&((g=n.default)==null?void 0:g.call(n))]),[[No,s.isSelected.value]])]}})),{groupItem:s}}}),LG=ce({...QA()},"VStepperWindowItem"),fh=ke()({name:"VStepperWindowItem",props:LG(),setup(e,t){let{slots:n}=t;return Pe(()=>{const r=rk.filterProps(e);return h(rk,ve({_as:"VStepperWindowItem"},r,{class:["v-stepper-window-item",e.class],style:e.style}),n)}),{}}}),JA=ce({color:String,...fs(),...Ue(),...Mr(),...ps(),...Uo(),...wu(),...$n(),...wt(),...Mt()},"VSheet"),up=ke()({name:"VSheet",props:JA(),setup(e,t){let{slots:n}=t;const{themeClasses:r}=Kt(e),{backgroundColorClasses:s,backgroundColorStyles:i}=fr(Te(e,"color")),{borderClasses:o}=Ps(e),{dimensionStyles:a}=Dr(e),{elevationClasses:l}=Is(e),{locationStyles:u}=Ga(e),{positionClasses:c}=Su(e),{roundedClasses:d}=Hn(e);return Pe(()=>h(e.tag,{class:["v-sheet",r.value,s.value,o.value,l.value,c.value,d.value,e.class],style:[i.value,a.value,u.value,e.style]},n)),{}}}),FG=ce({altLabels:Boolean,bgColor:String,completeIcon:String,editIcon:String,editable:Boolean,errorIcon:String,hideActions:Boolean,items:{type:Array,default:()=>[]},itemTitle:{type:String,default:"title"},itemValue:{type:String,default:"value"},nonLinear:Boolean,flat:Boolean,...Ka()},"Stepper"),NG=ce({...FG(),...Rd({mandatory:"force",selectedClass:"v-stepper-item--selected"}),...JA(),...uT(qA(),["prevText","nextText"])},"VStepper"),ZA=ke()({name:"VStepper",props:NG(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{items:r,next:s,prev:i,selected:o}=yu(e,Fw),{displayClasses:a,mobile:l}=ci(e),{completeIcon:u,editIcon:c,errorIcon:d,color:f,editable:p,prevText:g,nextText:m}=Fo(e),y=I(()=>e.items.map((S,C)=>{const _=Qn(S,e.itemTitle,S),R=Qn(S,e.itemValue,C+1);return{title:_,value:R,raw:S}})),b=I(()=>r.value.findIndex(S=>o.value.includes(S.id))),w=I(()=>e.disabled?e.disabled:b.value===0?"prev":b.value===r.value.length-1?"next":!1);return Ar({VStepperItem:{editable:p,errorIcon:d,completeIcon:u,editIcon:c,prevText:g,nextText:m},VStepperActions:{color:f,disabled:w,prevText:g,nextText:m}}),Pe(()=>{const S=up.filterProps(e),C=!!(n.header||e.items.length),_=e.items.length>0,R=!e.hideActions&&!!(_||n.actions);return h(up,ve(S,{color:e.bgColor,class:["v-stepper",{"v-stepper--alt-labels":e.altLabels,"v-stepper--flat":e.flat,"v-stepper--non-linear":e.nonLinear,"v-stepper--mobile":l.value},a.value,e.class],style:e.style}),{default:()=>{var T,x;return[C&&h(Nw,{key:"stepper-header"},{default:()=>[y.value.map((E,P)=>{let{raw:M,...O}=E;return h(Ce,null,[!!P&&h(fn,null,null),h(dh,O,{default:n[`header-item.${O.value}`]??n.header,icon:n.icon,title:n.title,subtitle:n.subtitle})])})]}),_&&h(XA,{key:"stepper-window"},{default:()=>[y.value.map(E=>h(fh,{value:E.value},{default:()=>{var P,M;return((P=n[`item.${E.value}`])==null?void 0:P.call(n,E))??((M=n.item)==null?void 0:M.call(n,E))}}))]}),(T=n.default)==null?void 0:T.call(n,{prev:i,next:s}),R&&(((x=n.actions)==null?void 0:x.call(n,{next:s,prev:i}))??h(EG,{key:"stepper-actions","onClick:prev":i,"onClick:next":s},n))]}})}),{prev:i,next:s}}}),VG={class:"my-3"},BG={key:0},UG={key:1},HG={class:"my-2"},zG={key:0},jG={class:"mr-4"},qG={class:"mr-4"},WG={class:"mr-4"},GG={class:"my-3"},KG={key:0,class:"mb-5 mt-10"},YG={key:1},XG={class:"ml-5 mt-2"},QG={key:0,class:"ml-5 mt-2"},JG=De({__name:"OctoFarmImportDialog",setup(e){const t=B(),n=B(!1),r=B(!1),s=B(""),i=B(""),o=B(),a=B(0),l=B([]),u=B([]),c=B(!1),d=en(tn.ImportOctoFarmDialog);function f(){}async function p(){}const g=async()=>{if(!o.value){n.value=!1;return}const C=JSON.parse(await o.value.text());if(!C||!Array.isArray(C))return[];if(!(C!=null&&C.length))return[];let _=C;C.length===1&&Array.isArray(C[0])&&(_=C[0]),_=_.map(x=>{var E,P;return x._id&&delete x._id,x.apikey&&(x.apiKey=x.apikey,delete x.apikey),x.settingsApperance&&(x.settingsAppearance=x.settingsApperance,delete x.settingsApperance),(E=x.settingsAppearance)!=null&&E.name?(x.name=(P=x.settingsAppearance)==null?void 0:P.name,delete x.settingsAppearance):x.name=x.printerURL,{enabled:!x.disabled,apiKey:x.apiKey,printerURL:x.printerURL,name:x.name}});let R=!1;const T=[];s.value="",i.value="";for(const x of _){const E=Object.keys(x);E.includes("enabled")&&(x.enabled===!1||x.enabled===!0)&&E.includes("apiKey")&&x.apiKey.length&&E.includes("printerURL")&&x.printerURL.length&&E.includes("name")&&x.name||(T.push(x.name||x.printerURL||"No name known for printer"),R||(R=!0))}return n.value=!R,R&&(s.value="Imported file failed the validation step",i.value="These printers failed validation: "+T.join(", ")),_},m=async()=>{const C=await g();C!=null&&C.length&&(u.value=[...Array(C.length)].map((_,R)=>R),l.value=C||[],t.value=2)},y=()=>{u.value.length?u.value=[]:u.value=[...Array(l.value.length)].map((_,R)=>R)},b=async()=>{var C;a.value=((C=await g())==null?void 0:C.length)||0},w=async()=>{t.value=3;const C=l.value.filter((_,R)=>u.value.includes(R));if(C!=null&&C.length)try{await jt.batchImportPrinters(C),c.value=!0}catch(_){c.value=!1,o.value=void 0,s.value="An error occurred",i.value=_.message.toString()}},S=()=>{o.value=void 0,d.closeDialog(),t.value=1};return(C,_)=>{const R=Vn("v-subheader"),T=Vn("v-list-item-content"),x=Vn("v-list-item-group"),E=di;return L(),Z(E,{id:Q(d).dialogId,"max-width":"700px",onBeforeOpened:_[8]||(_[8]=P=>void 0),onEscape:_[9]||(_[9]=P=>S()),onOpened:_[10]||(_[10]=P=>p())},{default:v(()=>[h(bt,{class:"pa-4"},{default:v(()=>[h(on,null,{default:v(()=>_[11]||(_[11]=[$("span",{class:"text-h5"}," Import OctoFarm Printers ",-1)])),_:1}),h(Zt,null,{default:v(()=>[h(ot,null,{default:v(()=>[h(He,{cols:"12"},{default:v(()=>[h(ZA,{modelValue:Q(t),"onUpdate:modelValue":_[6]||(_[6]=P=>Xe(t)?t.value=P:null),"non-linear":""},{default:v(()=>[h(Nw,null,{default:v(()=>[h(dh,{complete:Q(t)>1,value:"1",editable:""},{default:v(()=>_[12]||(_[12]=[k(" Export PrintersDB from OctoFarm ")])),_:1},8,["complete"]),h(dh,{complete:Q(t)>2,value:"2",editable:""},{default:v(()=>_[13]||(_[13]=[k(" Show printers & decide ")])),_:1},8,["complete"]),h(dh,{complete:Q(t)>3,value:"3",editable:""},{default:v(()=>_[14]||(_[14]=[k(" Import printers into FDM Monster ")])),_:1},8,["complete"])]),_:1}),h(XA,null,{default:v(()=>[h(fh,{value:"1"},{default:v(()=>[h(HA,{class:"mt-2",style:{"max-width":"400px"},modelValue:Q(o),"onUpdate:modelValue":_[0]||(_[0]=P=>Xe(o)?o.value=P:null),filled:"",accept:".json",clearable:"",label:"Upload PrintersDB.json file",onChange:_[1]||(_[1]=P=>b())},null,8,["modelValue"]),$("ol",null,[$("li",null,[$("h4",null,[h(X,null,{default:v(()=>_[15]||(_[15]=[k("navigation")])),_:1}),_[16]||(_[16]=k(" Go to your OctoFarm System page "))])]),$("li",null,[$("h4",null,[h(X,null,{default:v(()=>_[17]||(_[17]=[k("mouse")])),_:1}),_[18]||(_[18]=k(" Click 'Database' "))])]),$("li",null,[$("h4",null,[h(X,null,{default:v(()=>_[19]||(_[19]=[k("mouse")])),_:1}),_[20]||(_[20]=k(" Click the button 'Export Printers' "))])]),$("li",null,[$("h4",null,[h(X,null,{default:v(()=>_[21]||(_[21]=[k("upload")])),_:1}),_[22]||(_[22]=k(" Upload 'PrintersDB.json' above "))])])]),$("div",VG,[h(X,{class:"pr-2"},{default:v(()=>_[23]||(_[23]=[k("info")])),_:1}),_[25]||(_[25]=k(' OctoFarm printers should be exported as a JSON file. Please upload the correct "PrintersDB.json" database file using the steps provided. ')),h(re,{small:"",class:"ml-2",color:"success",onClick:_[2]||(_[2]=P=>r.value=!Q(r))},{default:v(()=>[h(X,{class:"pr-2"},{default:v(()=>_[24]||(_[24]=[k("gif")])),_:1}),Q(r)?(L(),ye("span",UG,"Hide GIF")):(L(),ye("span",BG,"Show GIF"))]),_:1})]),Q(r)?(L(),Z(hi,{key:0,class:"my-4",src:Q(xG),style:{border:"3px solid dimgray","max-width":"800px"},elevation:"10"},null,8,["src"])):he("",!0),_[27]||(_[27]=$("br",null,null,-1)),h(re,{color:"primary",onClick:_[3]||(_[3]=P=>m()),disabled:!Q(o)},{default:v(()=>_[26]||(_[26]=[k(" Validate ")])),_:1},8,["disabled"])]),_:1}),h(fh,{value:"2"},{default:v(()=>{var P;return[$("div",HG,[h(X,{class:"pr-2"},{default:v(()=>_[28]||(_[28]=[k("info")])),_:1}),k(" Import state: "+ie(Q(n)?"success":"failed")+" - "+ie(Q(a))+" printer(s) found ",1)]),Q(s)?(L(),Z(nn,{key:0,class:"my-2",type:"error"},{default:v(()=>{var M,O;return[k(ie(Q(s))+" ",1),_[29]||(_[29]=$("br",null,null,-1)),k(" Details: "+ie((M=Q(i))==null?void 0:M.slice(0,75))+" ",1),((O=Q(i))==null?void 0:O.length)>75?(L(),ye("span",zG,"...")):he("",!0)]}),_:1})):he("",!0),h(fn,{class:"mt-2"}),h(Ft,{"two-line":"",flat:"",subheader:"",dense:"",class:"mt-2"},{default:v(()=>[h(R,null,{default:v(()=>_[30]||(_[30]=[k("Found printers")])),_:1}),h(x,{modelValue:Q(u),"onUpdate:modelValue":_[4]||(_[4]=M=>Xe(u)?u.value=M:null),multiple:""},{default:v(()=>[(L(!0),ye(Ce,null,qt(Q(l),M=>(L(),Z(Le,{dense:"",key:M.name,title:M.name},{default:v(({isActive:O})=>[h(cu,null,{default:v(()=>[h(En,{"input-value":O},null,8,["input-value"])]),_:2},1024),h(T,null,{default:v(()=>[h(ut,null,{default:v(()=>[k(ie(M.name),1)]),_:2},1024),h(vt,null,{default:v(()=>[$("span",jG,"URL: "+ie(M.printerURL),1),$("span",qG,"Enabled: "+ie(M.enabled),1),$("span",WG,"API Key: "+ie(M.apiKey),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["title"]))),128))]),_:1},8,["modelValue"]),h(R,null,{default:v(()=>[h(re,{onClick:y,class:"my-2",small:""},{default:v(()=>[h(X,{class:"mr-2"},{default:v(()=>_[31]||(_[31]=[k("check")])),_:1}),_[32]||(_[32]=k(" Toggle selection "))]),_:1})]),_:1})]),_:1}),$("div",GG,[h(X,{class:"pr-2"},{default:v(()=>_[33]||(_[33]=[k("info")])),_:1}),_[34]||(_[34]=k(" At this moment, the following properties will be imported: enabled, name, printerURL and apiKey "))]),h(re,{class:"my-2",color:"primary",onClick:_[5]||(_[5]=M=>w()),disabled:!((P=Q(u))!=null&&P.length)},{default:v(()=>{var M;return[k(" Submit "+ie((M=Q(u))==null?void 0:M.length)+" printers ",1)]}),_:1},8,["disabled"])]}),_:1}),h(fh,{value:"3"},{default:v(()=>{var P,M;return[Q(c)?(L(),ye("div",KG,[h(X,{size:"100",class:"mr-5",color:"green circle"},{default:v(()=>_[35]||(_[35]=[k("check_circle")])),_:1}),_[36]||(_[36]=k(" Import Completed "))])):(L(),ye("div",YG,[h(X,{size:"100",class:"mr-5",color:"red circle"},{default:v(()=>_[37]||(_[37]=[k("error")])),_:1}),k(" Something went wrong: "+ie(Q(s))+" ",1),_[38]||(_[38]=$("br",null,null,-1)),$("span",XG," Details: "+ie((P=Q(i))==null?void 0:P.slice(0,75)),1),((M=Q(i))==null?void 0:M.length)>75?(L(),ye("span",QG,"...")):he("",!0)]))]}),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1}),h(re,{class:"mt-2"},{default:v(()=>_[39]||(_[39]=[k(" Validate printers ")])),_:1})]),_:1}),h(Dn,null,{default:v(()=>[h(vn),h(re,{onClick:_[7]||(_[7]=P=>S())},{default:v(()=>[h(X,{class:"mr-2"},{default:v(()=>_[40]||(_[40]=[k("close")])),_:1}),_[41]||(_[41]=k(" Close "))]),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}}),ZG=ce({id:String,submenu:Boolean,...Rs(Dd({closeDelay:250,closeOnContentClick:!0,locationStrategy:"connected",location:void 0,openDelay:300,scrim:!1,scrollStrategy:"reposition",transition:{component:Ub}}),["absolute"])},"VMenu"),Wd=ke()({name:"VMenu",props:ZG(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=rt(e,"modelValue"),{scopeId:s}=ku(),{isRtl:i}=$r(),o=gr(),a=I(()=>e.id||`v-menu-${o}`),l=B(),u=Ke(Mv,null),c=Oe(new Set);Wt(Mv,{register(){c.value.add(o)},unregister(){c.value.delete(o)},closeParents(y){setTimeout(()=>{var b;!c.value.size&&!e.persistent&&(y==null||(b=l.value)!=null&&b.contentEl&&!mF(y,l.value.contentEl))&&(r.value=!1,u==null||u.closeParents())},40)}}),Pn(()=>{u==null||u.unregister(),document.removeEventListener("focusin",d)}),Sb(()=>r.value=!1);async function d(y){var S,C,_;const b=y.relatedTarget,w=y.target;await At(),r.value&&b!==w&&((S=l.value)!=null&&S.contentEl)&&((C=l.value)!=null&&C.globalTop)&&![document,l.value.contentEl].includes(w)&&!l.value.contentEl.contains(w)&&((_=Nc(l.value.contentEl)[0])==null||_.focus())}xe(r,y=>{y?(u==null||u.register(),kt&&document.addEventListener("focusin",d,{once:!0})):(u==null||u.unregister(),kt&&document.removeEventListener("focusin",d))},{immediate:!0});function f(y){u==null||u.closeParents(y)}function p(y){var b,w,S,C,_;if(!e.disabled)if(y.key==="Tab"||y.key==="Enter"&&!e.closeOnContentClick){if(y.key==="Enter"&&(y.target instanceof HTMLTextAreaElement||y.target instanceof HTMLInputElement&&y.target.closest("form")))return;y.key==="Enter"&&y.preventDefault(),hT(Nc((b=l.value)==null?void 0:b.contentEl,!1),y.shiftKey?"prev":"next",T=>T.tabIndex>=0)||(r.value=!1,(S=(w=l.value)==null?void 0:w.activatorEl)==null||S.focus())}else e.submenu&&y.key===(i.value?"ArrowRight":"ArrowLeft")&&(r.value=!1,(_=(C=l.value)==null?void 0:C.activatorEl)==null||_.focus())}function g(y){var w;if(e.disabled)return;const b=(w=l.value)==null?void 0:w.contentEl;b&&r.value?y.key==="ArrowDown"?(y.preventDefault(),y.stopImmediatePropagation(),yc(b,"next")):y.key==="ArrowUp"?(y.preventDefault(),y.stopImmediatePropagation(),yc(b,"prev")):e.submenu&&(y.key===(i.value?"ArrowRight":"ArrowLeft")?r.value=!1:y.key===(i.value?"ArrowLeft":"ArrowRight")&&(y.preventDefault(),yc(b,"first"))):(e.submenu?y.key===(i.value?"ArrowLeft":"ArrowRight"):["ArrowDown","ArrowUp"].includes(y.key))&&(r.value=!0,y.preventDefault(),setTimeout(()=>setTimeout(()=>g(y))))}const m=I(()=>ve({"aria-haspopup":"menu","aria-expanded":String(r.value),"aria-owns":a.value,onKeydown:g},e.activatorProps));return Pe(()=>{const y=Di.filterProps(e);return h(Di,ve({ref:l,id:a.value,class:["v-menu",e.class],style:e.style},y,{modelValue:r.value,"onUpdate:modelValue":b=>r.value=b,absolute:!0,activatorProps:m.value,location:e.location??(e.submenu?"end":"bottom"),"onClick:outside":f,onKeydown:p},s),{activator:n.activator,default:function(){for(var b=arguments.length,w=new Array(b),S=0;S<b;S++)w[S]=arguments[S];return h(It,{root:"VMenu"},{default:()=>{var C;return[(C=n.default)==null?void 0:C.call(n,...w)]}})}})}),zi({id:a,ΨopenChildren:c},l)}}),e7=ce({renderless:Boolean,...Ue()},"VVirtualScrollItem"),t7=ke()({name:"VVirtualScrollItem",inheritAttrs:!1,props:e7(),emits:{"update:height":e=>!0},setup(e,t){let{attrs:n,emit:r,slots:s}=t;const{resizeRef:i,contentRect:o}=Da(void 0,"border");xe(()=>{var a;return(a=o.value)==null?void 0:a.height},a=>{a!=null&&r("update:height",a)}),Pe(()=>{var a,l;return e.renderless?h(Ce,null,[(a=s.default)==null?void 0:a.call(s,{itemRef:i})]):h("div",ve({ref:i,class:["v-virtual-scroll__item",e.class],style:e.style},n),[(l=s.default)==null?void 0:l.call(s)])})}}),n7=-1,r7=1,Ig=100,s7=ce({itemHeight:{type:[Number,String],default:null},height:[Number,String]},"virtual");function i7(e,t){const n=ci(),r=Oe(0);Un(()=>{r.value=parseFloat(e.itemHeight||0)});const s=Oe(0),i=Oe(Math.ceil((parseInt(e.height)||n.height.value)/(r.value||16))||1),o=Oe(0),a=Oe(0),l=B(),u=B();let c=0;const{resizeRef:d,contentRect:f}=Da();Un(()=>{d.value=l.value});const p=I(()=>{var V;return l.value===document.documentElement?n.height.value:((V=f.value)==null?void 0:V.height)||parseInt(e.height)||0}),g=I(()=>!!(l.value&&u.value&&p.value&&r.value));let m=Array.from({length:t.value.length}),y=Array.from({length:t.value.length});const b=Oe(0);let w=-1;function S(V){return m[V]||r.value}const C=dF(()=>{const V=performance.now();y[0]=0;const G=t.value.length;for(let te=1;te<=G-1;te++)y[te]=(y[te-1]||0)+S(te-1);b.value=Math.max(b.value,performance.now()-V)},b),_=xe(g,V=>{V&&(_(),c=u.value.offsetTop,C.immediate(),H(),~w&&At(()=>{kt&&window.requestAnimationFrame(()=>{Y(w),w=-1})}))});yn(()=>{C.clear()});function R(V,G){const te=m[V],W=r.value;r.value=W?Math.min(r.value,G):G,(te!==G||W!==r.value)&&(m[V]=G,C())}function T(V){return V=Tr(V,0,t.value.length-1),y[V]||0}function x(V){return o7(y,V)}let E=0,P=0,M=0;xe(p,(V,G)=>{G&&(H(),V<G&&requestAnimationFrame(()=>{P=0,H()}))});function O(){if(!l.value||!u.value)return;const V=l.value.scrollTop,G=performance.now();G-M>500?(P=Math.sign(V-E),c=u.value.offsetTop):P=V-E,E=V,M=G,H()}function A(){!l.value||!u.value||(P=0,M=0,H())}let D=-1;function H(){cancelAnimationFrame(D),D=requestAnimationFrame(z)}function z(){if(!l.value||!p.value)return;const V=E-c,G=Math.sign(P),te=Math.max(0,V-Ig),W=Tr(x(te),0,t.value.length),J=V+p.value+Ig,pe=Tr(x(J)+1,W+1,t.value.length);if((G!==n7||W<s.value)&&(G!==r7||pe>i.value)){const ae=T(s.value)-T(W),oe=T(pe)-T(i.value);Math.max(ae,oe)>Ig?(s.value=W,i.value=pe):(W<=0&&(s.value=W),pe>=t.value.length&&(i.value=pe))}o.value=T(s.value),a.value=T(t.value.length)-T(i.value)}function Y(V){const G=T(V);!l.value||V&&!G?w=V:l.value.scrollTop=G}const q=I(()=>t.value.slice(s.value,i.value).map((V,G)=>({raw:V,index:G+s.value})));return xe(t,()=>{m=Array.from({length:t.value.length}),y=Array.from({length:t.value.length}),C.immediate(),H()},{deep:!0}),{calculateVisibleItems:H,containerRef:l,markerRef:u,computedItems:q,paddingTop:o,paddingBottom:a,scrollToIndex:Y,handleScroll:O,handleScrollend:A,handleItemResize:R}}function o7(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 a7=ce({items:{type:Array,default:()=>[]},renderless:Boolean,...s7(),...Ue(),...Mr()},"VVirtualScroll"),l7=ke()({name:"VVirtualScroll",props:a7(),setup(e,t){let{slots:n}=t;const r=sn("VVirtualScroll"),{dimensionStyles:s}=Dr(e),{calculateVisibleItems:i,containerRef:o,markerRef:a,handleScroll:l,handleScrollend:u,handleItemResize:c,scrollToIndex:d,paddingTop:f,paddingBottom:p,computedItems:g}=i7(e,Te(e,"items"));return qr(()=>e.renderless,()=>{function m(){var w,S;const b=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)?"addEventListener":"removeEventListener";o.value===document.documentElement?(document[b]("scroll",l,{passive:!0}),document[b]("scrollend",u)):((w=o.value)==null||w[b]("scroll",l,{passive:!0}),(S=o.value)==null||S[b]("scrollend",u))}St(()=>{o.value=xT(r.vnode.el,!0),m(!0)}),yn(m)}),Pe(()=>{const m=g.value.map(y=>h(t7,{key:y.index,renderless:e.renderless,"onUpdate:height":b=>c(y.index,b)},{default:b=>{var w;return(w=n.default)==null?void 0:w.call(n,{item:y.raw,index:y.index,...b})}}));return e.renderless?h(Ce,null,[h("div",{ref:a,class:"v-virtual-scroll__spacer",style:{paddingTop:Ve(f.value)}},null),m,h("div",{class:"v-virtual-scroll__spacer",style:{paddingBottom:Ve(p.value)}},null)]):h("div",{ref:o,class:["v-virtual-scroll",e.class],onScrollPassive:l,onScrollend:u,style:[s.value,e.style]},[h("div",{ref:a,class:"v-virtual-scroll__container",style:{paddingTop:Ve(f.value),paddingBottom:Ve(p.value)}},[m])])}),{calculateVisibleItems:i,scrollToIndex:d}}});function u7(e,t){const n=Oe(!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=xe(n,()=>{l(),a()})}else a()})}async function o(a){var c,d;if(a.key==="Tab"&&((c=t.value)==null||c.focus()),!["PageDown","PageUp","Home","End"].includes(a.key))return;const l=(d=e.value)==null?void 0:d.$el;if(!l)return;(a.key==="Home"||a.key==="End")&&l.scrollTo({top:a.key==="Home"?0:l.scrollHeight,behavior:"smooth"}),await i();const u=l.querySelectorAll(":scope > :not(.v-virtual-scroll__spacer)");if(a.key==="PageDown"||a.key==="Home"){const f=l.getBoundingClientRect().top;for(const p of u)if(p.getBoundingClientRect().top>=f){p.focus();break}}else{const f=l.getBoundingClientRect().bottom;for(const p of[...u].reverse())if(p.getBoundingClientRect().bottom<=f){p.focus();break}}}return{onScrollPassive:s,onKeydown:o}}const c7=ce({chips:Boolean,closableChips:Boolean,closeText:{type:String,default:"$vuetify.close"},openText:{type:String,default:"$vuetify.open"},eager:Boolean,hideNoData:Boolean,hideSelected:Boolean,listProps:{type:Object},menu:Boolean,menuIcon:{type:Je,default:"$dropdown"},menuProps:{type:Object},multiple:Boolean,noDataText:{type:String,default:"$vuetify.noDataText"},openOnClear:Boolean,itemColor:String,...bA({itemChildren:!1})},"Select"),d7=ce({...c7(),...Rs(VA({modelValue:null,role:"combobox"}),["validationValue","dirty","appendInnerIcon"]),...xu({transition:{component:Ub}})},"VSelect"),Oo=ke()({name:"VSelect",props:d7(),emits:{"update:focused":e=>!0,"update:modelValue":e=>!0,"update:menu":e=>!0},setup(e,t){let{slots:n}=t;const{t:r}=Gr(),s=B(),i=B(),o=B(),a=rt(e,"menu"),l=I({get:()=>a.value,set:V=>{var G;a.value&&!V&&((G=i.value)!=null&&G.ΨopenChildren.size)||(a.value=V)}}),{items:u,transformIn:c,transformOut:d}=PW(e),f=rt(e,"modelValue",[],V=>c(V===null?[null]:On(V)),V=>{const G=d(V);return e.multiple?G:G[0]??null}),p=I(()=>typeof e.counterValue=="function"?e.counterValue(f.value):typeof e.counterValue=="number"?e.counterValue:f.value.length),g=NA(),m=I(()=>f.value.map(V=>V.value)),y=Oe(!1),b=I(()=>l.value?e.closeText:e.openText);let w="",S;const C=I(()=>e.hideSelected?u.value.filter(V=>!f.value.some(G=>e.valueComparator(G,V))):u.value),_=I(()=>e.hideNoData&&!C.value.length||e.readonly||(g==null?void 0:g.isReadonly.value)),R=I(()=>{var V;return{...e.menuProps,activatorProps:{...((V=e.menuProps)==null?void 0:V.activatorProps)||{},"aria-haspopup":"listbox"}}}),T=B(),x=u7(T,s);function E(V){e.openOnClear&&(l.value=!0)}function P(){_.value||(l.value=!l.value)}function M(V){E_(V)&&O(V)}function O(V){var J,pe;if(!V.key||e.readonly||g!=null&&g.isReadonly.value)return;["Enter"," ","ArrowDown","ArrowUp","Home","End"].includes(V.key)&&V.preventDefault(),["Enter","ArrowDown"," "].includes(V.key)&&(l.value=!0),["Escape","Tab"].includes(V.key)&&(l.value=!1),V.key==="Home"?(J=T.value)==null||J.focus("first"):V.key==="End"&&((pe=T.value)==null||pe.focus("last"));const G=1e3;if(e.multiple||!E_(V))return;const te=performance.now();te-S>G&&(w=""),w+=V.key.toLowerCase(),S=te;const W=u.value.find(ae=>ae.title.toLowerCase().startsWith(w));if(W!==void 0){f.value=[W];const ae=C.value.indexOf(W);kt&&window.requestAnimationFrame(()=>{var oe;ae>=0&&((oe=o.value)==null||oe.scrollToIndex(ae))})}}function A(V){let G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!V.props.disabled)if(e.multiple){const te=f.value.findIndex(J=>e.valueComparator(J.value,V.value)),W=G??!~te;if(~te){const J=W?[...f.value,V]:[...f.value];J.splice(te,1),f.value=J}else W&&(f.value=[...f.value,V])}else{const te=G!==!1;f.value=te?[V]:[],At(()=>{l.value=!1})}}function D(V){var G;(G=T.value)!=null&&G.$el.contains(V.relatedTarget)||(l.value=!1)}function H(){var V;e.eager&&((V=o.value)==null||V.calculateVisibleItems())}function z(){var V;y.value&&((V=s.value)==null||V.focus())}function Y(V){y.value=!0}function q(V){if(V==null)f.value=[];else if($h(s.value,":autofill")||$h(s.value,":-webkit-autofill")){const G=u.value.find(te=>te.title===V);G&&A(G)}else s.value&&(s.value.value="")}return xe(l,()=>{if(!e.hideSelected&&l.value&&f.value.length){const V=C.value.findIndex(G=>f.value.some(te=>e.valueComparator(te.value,G.value)));kt&&window.requestAnimationFrame(()=>{var G;V>=0&&((G=o.value)==null||G.scrollToIndex(V))})}}),xe(()=>e.items,(V,G)=>{l.value||y.value&&!G.length&&V.length&&(l.value=!0)}),Pe(()=>{const V=!!(e.chips||n.chip),G=!!(!e.hideNoData||C.value.length||n["prepend-item"]||n["append-item"]||n["no-data"]),te=f.value.length>0,W=ct.filterProps(e),J=te||!y.value&&e.label&&!e.persistentPlaceholder?void 0:e.placeholder;return h(ct,ve({ref:s},W,{modelValue:f.value.map(pe=>pe.props.value).join(", "),"onUpdate:modelValue":q,focused:y.value,"onUpdate:focused":pe=>y.value=pe,validationValue:f.externalValue,counterValue:p.value,dirty:te,class:["v-select",{"v-select--active-menu":l.value,"v-select--chips":!!e.chips,[`v-select--${e.multiple?"multiple":"single"}`]:!0,"v-select--selected":f.value.length,"v-select--selection-slot":!!n.selection},e.class],style:e.style,inputmode:"none",placeholder:J,"onClick:clear":E,"onMousedown:control":P,onBlur:D,onKeydown:O,"aria-label":r(b.value),title:r(b.value)}),{...n,default:()=>h(Ce,null,[h(Wd,ve({ref:i,modelValue:l.value,"onUpdate:modelValue":pe=>l.value=pe,activator:"parent",contentClass:"v-select__content",disabled:_.value,eager:e.eager,maxHeight:310,openOnClick:!1,closeOnContentClick:!1,transition:e.transition,onAfterEnter:H,onAfterLeave:z},R.value),{default:()=>[G&&h(Ft,ve({ref:T,selected:m.value,selectStrategy:e.multiple?"independent":"single-independent",onMousedown:pe=>pe.preventDefault(),onKeydown:M,onFocusin:Y,tabindex:"-1","aria-live":"polite",color:e.itemColor??e.color},x,e.listProps),{default:()=>{var pe,ae,oe;return[(pe=n["prepend-item"])==null?void 0:pe.call(n),!C.value.length&&!e.hideNoData&&(((ae=n["no-data"])==null?void 0:ae.call(n))??h(Le,{title:r(e.noDataText)},null)),h(l7,{ref:o,renderless:!0,items:C.value},{default:ee=>{var at;let{item:me,index:ne,itemRef:U}=ee;const Fe=ve(me.props,{ref:U,key:ne,onClick:()=>A(me,null)});return((at=n.item)==null?void 0:at.call(n,{item:me,index:ne,props:Fe}))??h(Le,ve(Fe,{role:"option"}),{prepend:F=>{let{isSelected:N}=F;return h(Ce,null,[e.multiple&&!e.hideSelected?h(du,{key:me.value,modelValue:N,ripple:!1,tabindex:"-1"},null):void 0,me.props.prependAvatar&&h(lt,{image:me.props.prependAvatar},null),me.props.prependIcon&&h(X,{icon:me.props.prependIcon},null)])}})}}),(oe=n["append-item"])==null?void 0:oe.call(n)]}})]}),f.value.map((pe,ae)=>{function oe(U){U.stopPropagation(),U.preventDefault(),A(pe,!1)}const ee={"onClick:close":oe,onKeydown(U){U.key!=="Enter"&&U.key!==" "||(U.preventDefault(),U.stopPropagation(),oe(U))},onMousedown(U){U.preventDefault(),U.stopPropagation()},modelValue:!0,"onUpdate:modelValue":void 0},me=V?!!n.chip:!!n.selection,ne=me?pT(V?n.chip({item:pe,index:ae,props:ee}):n.selection({item:pe,index:ae})):void 0;if(!(me&&!ne))return h("div",{key:pe.value,class:"v-select__selection"},[V?n.chip?h(It,{key:"chip-defaults",defaults:{VChip:{closable:e.closableChips,size:"small",text:pe.title}}},{default:()=>[ne]}):h(Sn,ve({key:"chip",closable:e.closableChips,size:"small",text:pe.title,disabled:pe.props.disabled},ee),null):ne??h("span",{class:"v-select__selection-text"},[pe.title,e.multiple&&ae<f.value.length-1&&h("span",{class:"v-select__selection-comma"},[k(",")])])])})]),"append-inner":function(){var ee;for(var pe=arguments.length,ae=new Array(pe),oe=0;oe<pe;oe++)ae[oe]=arguments[oe];return h(Ce,null,[(ee=n["append-inner"])==null?void 0:ee.call(n,...ae),e.menuIcon?h(X,{class:"v-select__menu-icon",icon:e.menuIcon},null):void 0])}})}),zi({isFocused:y,menu:l,select:A},s)}}),f7={class:"text-h5"},h7=De({__name:"PrinterMaintenanceDialog",setup(e){const t=B([]),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=B({}),s=Lt(),i=en(tn.PrinterMaintenanceDialog),o=I(()=>s.maintenanceDialogPrinter),a=()=>{r.value.disabledReason=t.value.join(", ")},l=async()=>{var f;const c=(f=o.value)==null?void 0:f.id;if(!c){r.value={},u();return}const d=r.value.disabledReason;await jt.updatePrinterMaintenance(c,d),r.value={},u()},u=()=>{t.value=[],i.closeDialog(),s.setMaintenanceDialogPrinter()};return(c,d)=>{const f=di;return L(),Z(f,{id:Q(i).dialogId,"max-width":"700px",onEscape:d[5]||(d[5]=p=>u())},{default:v(()=>[h(bt,{class:"pa-4"},{default:v(()=>[h(on,null,{default:v(()=>{var p;return[$("span",f7," Mark '"+ie((p=o.value)==null?void 0:p.name)+"' for maintenance ",1)]}),_:1}),h(nn,{color:"secondary"},{default:v(()=>d[6]||(d[6]=[k(" Keep this info clear and stick to convention ")])),_:1}),h(Zt,null,{default:v(()=>[h(ot,null,{default:v(()=>[h(He,{cols:"12"},{default:v(()=>[h(Oo,{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(jA,{modelValue:r.value.disabledReason,"onUpdate:modelValue":d[2]||(d[2]=p=>r.value.disabledReason=p),"data-vv-validate-on":"change|blur"},{label:v(()=>d[7]||(d[7]=[$("div",null,"Type the reason*",-1)])),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),h(Dn,null,{default:v(()=>[d[10]||(d[10]=$("em",{class:"text-red"}," * indicates required field ",-1)),h(vn),h(re,{variant:"text",onClick:d[3]||(d[3]=p=>u())},{default:v(()=>d[8]||(d[8]=[k(" Close ")])),_:1}),h(re,{color:"blue-darken-1",variant:"text",onClick:d[4]||(d[4]=p=>l())},{default:v(()=>d[9]||(d[9]=[k(" Save ")])),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}}),p7=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],m7=[1,2,3,4,5,6,7,8,9,10,11,12],eO=De({__name:"GridSettingsList",setup(e){const t=Ds(),n=Ot(),r=I(()=>t.largeTiles);async function s(a){if(a)return o(t.gridRows,a)}async function i(a){if(a)return o(a,t.gridCols)}async function o(a,l){await t.updateFrontendSettings({gridRows:a,gridCols:l,largeTiles:r.value}),n.info("Grid settings updated")}return(a,l)=>(L(),ye("div",null,[h(Zt,null,{default:v(()=>[h(Ft,{subheader:"",lines:"three"},{default:v(()=>{var u;return[h(os,null,{default:v(()=>l[1]||(l[1]=[k(" Grid Rows and Columns ")])),_:1}),(u=Q(t).settings)!=null&&u.frontend?(L(),Z(Le,{key:0},{default:v(()=>[h(ot,null,{default:v(()=>[h(He,{cols:"3"},{default:v(()=>[h(Oo,{type:"number","onUpdate:modelValue":i,value:Q(t).settings.frontend.gridRows,items:Q(p7),label:"Set the grid rows"},null,8,["value","items"])]),_:1}),h(He,{cols:"3"},{default:v(()=>[h(Oo,{type:"number","onUpdate:modelValue":s,value:Q(t).settings.frontend.gridCols,items:Q(m7),label:"Set the grid columns"},null,8,["value","items"])]),_:1})]),_:1})]),_:1})):he("",!0)]}),_:1}),h(fn),h(Ft,{subheader:"",lines:"three"},{default:v(()=>[h(os,null,{default:v(()=>l[2]||(l[2]=[k(" Large or Compact Tiles ")])),_:1}),h(Le,null,{default:v(()=>{var u;return[(u=Q(t).settings)!=null&&u.frontend?(L(),Z(ot,{key:0},{default:v(()=>[h(He,{cols:"5"},{default:v(()=>[h(En,{onChange:o,modelValue:Q(t).settings.frontend.largeTiles,"onUpdate:modelValue":l[0]||(l[0]=c=>Q(t).settings.frontend.largeTiles=c),label:"Large tiles"},null,8,["modelValue"])]),_:1})]),_:1})):he("",!0)]}),_:1})]),_:1})]),_:1})]))}}),g7={class:"text-h5"},v7=De({__name:"GridSettingsDialog",setup(e){const t=en(tn.GridSettingsDialog);function n(){t.closeDialog(t.context())}return(r,s)=>{const i=di;return L(),Z(i,{id:Q(t).dialogId,"max-width":"1000px",onEscape:s[1]||(s[1]=o=>n())},{default:v(()=>[h(bt,{class:"pa-4"},{default:v(()=>[h(on,null,{default:v(()=>[$("span",g7,[s[4]||(s[4]=k(" Grid Settings ")),h(xt,{top:""},{activator:v(({props:o})=>[h(re,ve(o,{class:"ma-2",fab:"","x-small":""}),{default:v(()=>[h(X,null,{default:v(()=>s[2]||(s[2]=[k("question_mark")])),_:1})]),_:2},1040)]),default:v(()=>s[3]||(s[3]=[k(" Change your grid rows, columns and tile settings. ")])),_:1})])]),_:1}),h(eO),h(Dn,null,{default:v(()=>[h(vn),h(re,{onClick:s[0]||(s[0]=o=>Q(t).closeDialog())},{default:v(()=>s[5]||(s[5]=[k("Close")])),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}});class Zr extends vr{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 y7={class:"text-h5"},b7={class:"pl-5"},w7=De({__name:"CreateUserDialog",setup(e){const t=en(tn.CreateUserDialog),n=Ke("appConstants"),r=Ot(),s=B({username:"",password:"",roleIds:[]}),i=B(""),o=B([]),a=I(()=>{var f,p;return(p=(f=s.value)==null?void 0:f.username)!=null&&p.length?vm(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 Zr.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 St(async()=>{try{o.value=await Zr.listRoles()}catch(f){r.openErrorMessage({title:"Failed to load roles",subtitle:f instanceof Error?f.message:"Unknown error"})}}),(f,p)=>{const g=di;return L(),Z(g,{id:Q(t).dialogId,"max-width":"700px",onEscape:d},{default:v(()=>[h(bt,{class:"pa-4"},{default:v(()=>[h(on,null,{default:v(()=>[$("span",y7,[h(lt,{color:"primary",size:"56"},{default:v(()=>[k(ie(a.value),1)]),_:1}),$("span",b7,[p[6]||(p[6]=k("New verified User ")),h(xt,{top:""},{activator:v(({props:m})=>[h(re,ve({class:"ma-2",fab:""},m,{"x-small":""}),{default:v(()=>[h(X,null,{default:v(()=>p[4]||(p[4]=[k("question_mark")])),_:1})]),_:2},1040)]),default:v(()=>p[5]||(p[5]=[k(" The user will be set to verified and assigned roles. Please share the username and password with them manually. ")])),_:1})])])]),_:1}),h(Zt,null,{default:v(()=>[h(ot,null,{default:v(()=>[h(He,{cols:12},{default:v(()=>[h(Tn,null,{default:v(()=>[h(ot,null,{default:v(()=>[h(He,{cols:"12",md:"6"},{default:v(()=>[h(ct,{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(ct,{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(ct,{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(Oo,{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(Dn,null,{default:v(()=>[p[9]||(p[9]=$("em",{class:"text-red"}," * indicates required field ",-1)),h(vn),h(re,{variant:"text",onClick:d},{default:v(()=>p[7]||(p[7]=[k("Close")])),_:1}),h(re,{color:"blue-darken-1",variant:"text",onClick:c},{default:v(()=>p[8]||(p[8]=[k("Create")])),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}}),tO=()=>({id:void 0,name:Va(),floor:"1",printers:[]});class es extends vr{static convertPrinterFloorToCreateForm(t){const n=tO();return n.id=t==null?void 0:t.id,n.name=(t==null?void 0:t.name)||Va(),n.printers=[],n.floor=((t==null?void 0:t.floor)||1).toString(),n}static convertCreateFormToFloor(t){const n={...t};if(n.floor=parseInt(n.floor),Number.isNaN(n.floor))throw new Error("Floor number did not convert to number.");return n}static async getFloors(){const t=`${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 qi=Ts("Floors",{state:()=>({floors:[],selectedFloor:null}),getters:{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 Lt().printers.filter(n=>!e.floors.find(r=>r.printers.find(s=>s.printerId===n.id)))},gridSortedPrinters(){const e=Ds(),t=e.gridCols,n=e.gridRows,s=Lt().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 es.getFloors();return this.saveFloors(e),e},async createFloor(e){const t=await es.createFloor(e);return this.floors.push(t),t},saveFloors(e){var r;if(!(e!=null&&e.length))return;this.floors=e.sort((s,i)=>s.floor-i.floor);const t=(r=this.selectedFloor)==null?void 0:r.id,n=this.floors.find(s=>s.id===t);this.selectedFloor=n||this.floors[0]},async deleteFloor(e){await es.deleteFloor(e),this._popPrinterFloor(e)},async updateFloorName({floorId:e,name:t}){const n=await es.updateFloorName(e,t);return this._replaceFloor(n),n},async updateFloorNumber({floorId:e,floorNumber:t}){const n=await es.updateFloorNumber(e,t);return this._replaceFloor(n),n},async addPrinterToFloor({floorId:e,printerId:t,x:n,y:r}){const s=await es.addPrinterToFloor(e,{printerId:t,x:n,y:r});this._replaceFloor(s)},async changeSelectedFloorByIndex(e){var n;if(!((n=this.floors)!=null&&n.length)||this.floors.length<=e)return;const t=this.floors[e];if(t)return this.selectedFloor=t,t},async deletePrinterFromFloor({floorId:e,printerId:t}){const n=await es.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)}}}),S7={class:"text-h5"},_7=De({__name:"AddOrUpdateFloorDialog",setup(e){const t=en(tn.AddOrUpdateFloorDialog),n=qi(),r=Ke("appConstants"),s=Ot(),i=B(tO()),o=I(()=>{var d;return(d=t.context())==null?void 0:d.printerFloorId}),a=I(()=>i.value?vm(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=es.convertCreateFormToFloor(i.value);await n.createFloor(d),s.openInfoMessage({title:`Floor ${d.name} created`}),i.value.name=Va();const f=Math.max(...n.floors.map(p=>p.floor))+1;i.value.floor=f.toString(),c()},c=()=>{t.closeDialog()};return xe(o,d=>{if(d){const f=n.floor(d);i.value=es.convertPrinterFloorToCreateForm(f)}}),St(()=>{var d;if(o.value){const f=n.floor(o.value);i.value=es.convertPrinterFloorToCreateForm(f)}else if((d=n.floors)!=null&&d.length){const f=Math.max(...n.floors.map(p=>p.floor))+1;i.value.floor=f.toString()}}),(d,f)=>{const p=di;return L(),Z(p,{id:Q(t).dialogId,"max-width":"700px",onEscape:c},{default:v(()=>[h(bt,null,{default:v(()=>[h(on,null,{default:v(()=>[$("span",S7,[h(lt,{color:"primary",size:"56"},{default:v(()=>[k(ie(a.value),1)]),_:1}),f[2]||(f[2]=k(" New Floor "))])]),_:1}),h(Zt,null,{default:v(()=>[h(ot,null,{default:v(()=>[h(He,{cols:12},{default:v(()=>[h(Tn,null,{default:v(()=>[h(ot,null,{default:v(()=>[i.value?(L(),Z(He,{key:0,cols:"12",md:"6"},{default:v(()=>[h(ct,{modelValue:i.value.name,"onUpdate:modelValue":f[0]||(f[0]=g=>i.value.name=g),autofocus:"",label:"Floor name*",required:""},null,8,["modelValue"]),h(ct,{modelValue:i.value.floor,"onUpdate:modelValue":f[1]||(f[1]=g=>i.value.floor=g),label:"Floor number",required:"",type:"number"},null,8,["modelValue"])]),_:1})):he("",!0)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),h(Dn,null,{default:v(()=>[f[5]||(f[5]=$("em",{class:"text-red"}," * indicates required field ",-1)),h(vn),h(re,{variant:"text",onClick:c},{default:v(()=>f[3]||(f[3]=[k("Close")])),_:1}),h(re,{color:"blue-darken-1",variant:"text",onClick:u},{default:v(()=>f[4]||(f[4]=[k("Create")])),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}});class cp extends vr{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 $u=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(){}},Ua=typeof window>"u"||"Deno"in globalThis;function Jr(){}function k7(e,t){return typeof e=="function"?e(t):e}function Cy(e){return typeof e=="number"&&e>=0&&e!==1/0}function nO(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ol(e,t){return typeof e=="function"?e(t):e}function ws(e,t){return typeof e=="function"?e(t):e}function sk(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==Vw(o,t.options))return!1}else if(!nd(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 ik(e,t){const{exact:n,status:r,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Ha(t.options.mutationKey)!==Ha(i))return!1}else if(!nd(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function Vw(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ha)(e)}function Ha(e){return JSON.stringify(e,(t,n)=>Ty(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function nd(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!nd(e[n],t[n])):!1}function rO(e,t){if(e===t)return e;const n=ok(e)&&ok(t);if(n||Ty(e)&&Ty(t)){const r=n?e:Object.keys(e),s=r.length,i=n?t:Object.keys(t),o=i.length,a=n?[]:{};let l=0;for(let u=0;u<o;u++){const c=n?u:i[u];(!n&&r.includes(c)||n)&&e[c]===void 0&&t[c]===void 0?(a[c]=void 0,l++):(a[c]=rO(e[c],t[c]),a[c]===e[c]&&e[c]!==void 0&&l++)}return s===o&&l===s?e:a}return t}function dp(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 ok(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ty(e){if(!ak(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!ak(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function ak(e){return Object.prototype.toString.call(e)==="[object Object]"}function x7(e){return new Promise(t=>{setTimeout(t,e)})}function Ry(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?rO(e,t):t}function E7(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function C7(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Bw=Symbol();function sO(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Bw?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var ha,ao,Ll,_E,T7=(_E=class extends $u{constructor(){super();Ne(this,ha,void 0);Ne(this,ao,void 0);Ne(this,Ll,void 0);Me(this,Ll,t=>{if(!Ua&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){j(this,ao)||this.setEventListener(j(this,Ll))}onUnsubscribe(){var t;this.hasListeners()||((t=j(this,ao))==null||t.call(this),Me(this,ao,void 0))}setEventListener(t){var n;Me(this,Ll,t),(n=j(this,ao))==null||n.call(this),Me(this,ao,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){j(this,ha)!==t&&(Me(this,ha,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof j(this,ha)=="boolean"?j(this,ha):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ha=new WeakMap,ao=new WeakMap,Ll=new WeakMap,_E),Uw=new T7,Fl,lo,Nl,kE,R7=(kE=class extends $u{constructor(){super();Ne(this,Fl,!0);Ne(this,lo,void 0);Ne(this,Nl,void 0);Me(this,Nl,t=>{if(!Ua&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){j(this,lo)||this.setEventListener(j(this,Nl))}onUnsubscribe(){var t;this.hasListeners()||((t=j(this,lo))==null||t.call(this),Me(this,lo,void 0))}setEventListener(t){var n;Me(this,Nl,t),(n=j(this,lo))==null||n.call(this),Me(this,lo,t(this.setOnline.bind(this)))}setOnline(t){j(this,Fl)!==t&&(Me(this,Fl,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return j(this,Fl)}},Fl=new WeakMap,lo=new WeakMap,Nl=new WeakMap,kE),fp=new R7;function Py(){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}function P7(e){return Math.min(1e3*2**e,3e4)}function iO(e){return(e??"online")==="online"?fp.isOnline():!0}var oO=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Ag(e){return e instanceof oO}function aO(e){let t=!1,n=0,r=!1,s;const i=Py(),o=m=>{var y;r||(f(new oO(m)),(y=e.abort)==null||y.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>Uw.isFocused()&&(e.networkMode==="always"||fp.isOnline())&&e.canRun(),c=()=>iO(e.networkMode)&&e.canRun(),d=m=>{var y;r||(r=!0,(y=e.onSuccess)==null||y.call(e,m),s==null||s(),i.resolve(m))},f=m=>{var y;r||(r=!0,(y=e.onError)==null||y.call(e,m),s==null||s(),i.reject(m))},p=()=>new Promise(m=>{var y;s=b=>{(r||u())&&m(b)},(y=e.onPause)==null||y.call(e)}).then(()=>{var m;s=void 0,r||(m=e.onContinue)==null||m.call(e)}),g=()=>{if(r)return;let m;const y=n===0?e.initialPromise:void 0;try{m=y??e.fn()}catch(b){m=Promise.reject(b)}Promise.resolve(m).then(d).catch(b=>{var R;if(r)return;const w=e.retry??(Ua?0:3),S=e.retryDelay??P7,C=typeof S=="function"?S(n,b):S,_=w===!0||typeof w=="number"&&n<w||typeof w=="function"&&w(n,b);if(t||!_){f(b);return}n++,(R=e.onFail)==null||R.call(e,n,b),x7(C).then(()=>u()?void 0:p()).then(()=>{t?f(b):g()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:a,continueRetry:l,canStart:c,start:()=>(c()?g():p().then(g),i)}}function I7(){let e=[],t=0,n=a=>{a()},r=a=>{a()},s=a=>setTimeout(a,0);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 Nn=I7(),pa,xE,lO=(xE=class{constructor(){Ne(this,pa,void 0)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Cy(this.gcTime)&&Me(this,pa,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ua?1/0:5*60*1e3))}clearGcTimeout(){j(this,pa)&&(clearTimeout(j(this,pa)),Me(this,pa,void 0))}},pa=new WeakMap,xE),Vl,Bl,Qr,qn,cd,ma,vs,wi,EE,A7=(EE=class extends lO{constructor(t){super();Ne(this,vs);Ne(this,Vl,void 0);Ne(this,Bl,void 0);Ne(this,Qr,void 0);Ne(this,qn,void 0);Ne(this,cd,void 0);Ne(this,ma,void 0);Me(this,ma,!1),Me(this,cd,t.defaultOptions),this.setOptions(t.options),this.observers=[],Me(this,Qr,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Me(this,Vl,O7(this.options)),this.state=t.state??j(this,Vl),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=j(this,qn))==null?void 0:t.promise}setOptions(t){this.options={...j(this,cd),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&j(this,Qr).remove(this)}setData(t,n){const r=Ry(this.state.data,t,this.options);return nt(this,vs,wi).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){nt(this,vs,wi).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=j(this,qn))==null?void 0:r.promise;return(s=j(this,qn))==null||s.cancel(t),n?n.then(Jr).catch(Jr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(j(this,Vl))}isActive(){return this.observers.some(t=>ws(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Bw||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!nO(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=j(this,qn))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=j(this,qn))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),j(this,Qr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(j(this,qn)&&(j(this,ma)?j(this,qn).cancel({revert:!0}):j(this,qn).cancelRetry()),this.scheduleGc()),j(this,Qr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||nt(this,vs,wi).call(this,{type:"invalidate"})}fetch(t,n){var l,u,c;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(j(this,qn))return j(this,qn).continueRetry(),j(this,qn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const d=this.observers.find(f=>f.options.queryFn);d&&this.setOptions(d.options)}const r=new AbortController,s=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(Me(this,ma,!0),r.signal)})},i=()=>{const d=sO(this.options,n),f={queryKey:this.queryKey,meta:this.meta};return s(f),Me(this,ma,!1),this.options.persister?this.options.persister(d,f,this):d(f)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:i};s(o),(l=this.options.behavior)==null||l.onFetch(o,this),Me(this,Bl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=o.fetchOptions)==null?void 0:u.meta))&&nt(this,vs,wi).call(this,{type:"fetch",meta:(c=o.fetchOptions)==null?void 0:c.meta});const a=d=>{var f,p,g,m;Ag(d)&&d.silent||nt(this,vs,wi).call(this,{type:"error",error:d}),Ag(d)||((p=(f=j(this,Qr).config).onError)==null||p.call(f,d,this),(m=(g=j(this,Qr).config).onSettled)==null||m.call(g,this.state.data,d,this)),this.scheduleGc()};return Me(this,qn,aO({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:d=>{var f,p,g,m;if(d===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(d)}catch(y){a(y);return}(p=(f=j(this,Qr).config).onSuccess)==null||p.call(f,d,this),(m=(g=j(this,Qr).config).onSettled)==null||m.call(g,d,this.state.error,this),this.scheduleGc()},onError:a,onFail:(d,f)=>{nt(this,vs,wi).call(this,{type:"failed",failureCount:d,error:f})},onPause:()=>{nt(this,vs,wi).call(this,{type:"pause"})},onContinue:()=>{nt(this,vs,wi).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),j(this,qn).start()}},Vl=new WeakMap,Bl=new WeakMap,Qr=new WeakMap,qn=new WeakMap,cd=new WeakMap,ma=new WeakMap,vs=new WeakSet,wi=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...uO(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return Ag(s)&&s.revert&&j(this,Bl)?{...j(this,Bl),fetchStatus:"idle"}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Nn.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),j(this,Qr).notify({query:this,type:"updated",action:t})})},EE);function uO(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:iO(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function O7(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 Gs,CE,cO=(CE=class extends $u{constructor(n={}){super();Ne(this,Gs,void 0);this.config=n,Me(this,Gs,new Map)}build(n,r,s){const i=r.queryKey,o=r.queryHash??Vw(i,r);let a=this.get(o);return a||(a=new A7({cache:this,queryKey:i,queryHash:o,options:n.defaultQueryOptions(r),state:s,defaultOptions:n.getQueryDefaults(i)}),this.add(a)),a}add(n){j(this,Gs).has(n.queryHash)||(j(this,Gs).set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const r=j(this,Gs).get(n.queryHash);r&&(n.destroy(),r===n&&j(this,Gs).delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){Nn.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return j(this,Gs).get(n)}getAll(){return[...j(this,Gs).values()]}find(n){const r={exact:!0,...n};return this.getAll().find(s=>sk(r,s))}findAll(n={}){const r=this.getAll();return Object.keys(n).length>0?r.filter(s=>sk(n,s)):r}notify(n){Nn.batch(()=>{this.listeners.forEach(r=>{r(n)})})}onFocus(){Nn.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){Nn.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},Gs=new WeakMap,CE),Ks,or,ga,Ys,Qi,TE,M7=(TE=class extends lO{constructor(t){super();Ne(this,Ys);Ne(this,Ks,void 0);Ne(this,or,void 0);Ne(this,ga,void 0);this.mutationId=t.mutationId,Me(this,or,t.mutationCache),Me(this,Ks,[]),this.state=t.state||dO(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){j(this,Ks).includes(t)||(j(this,Ks).push(t),this.clearGcTimeout(),j(this,or).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Me(this,Ks,j(this,Ks).filter(n=>n!==t)),this.scheduleGc(),j(this,or).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){j(this,Ks).length||(this.state.status==="pending"?this.scheduleGc():j(this,or).remove(this))}continue(){var t;return((t=j(this,ga))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,i,o,a,l,u,c,d,f,p,g,m,y,b,w,S,C,_,R,T;Me(this,ga,aO({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(x,E)=>{nt(this,Ys,Qi).call(this,{type:"failed",failureCount:x,error:E})},onPause:()=>{nt(this,Ys,Qi).call(this,{type:"pause"})},onContinue:()=>{nt(this,Ys,Qi).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>j(this,or).canRun(this)}));const n=this.state.status==="pending",r=!j(this,ga).canStart();try{if(!n){nt(this,Ys,Qi).call(this,{type:"pending",variables:t,isPaused:r}),await((i=(s=j(this,or).config).onMutate)==null?void 0:i.call(s,t,this));const E=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));E!==this.state.context&&nt(this,Ys,Qi).call(this,{type:"pending",context:E,variables:t,isPaused:r})}const x=await j(this,ga).start();return await((u=(l=j(this,or).config).onSuccess)==null?void 0:u.call(l,x,t,this.state.context,this)),await((d=(c=this.options).onSuccess)==null?void 0:d.call(c,x,t,this.state.context)),await((p=(f=j(this,or).config).onSettled)==null?void 0:p.call(f,x,null,this.state.variables,this.state.context,this)),await((m=(g=this.options).onSettled)==null?void 0:m.call(g,x,null,t,this.state.context)),nt(this,Ys,Qi).call(this,{type:"success",data:x}),x}catch(x){try{throw await((b=(y=j(this,or).config).onError)==null?void 0:b.call(y,x,t,this.state.context,this)),await((S=(w=this.options).onError)==null?void 0:S.call(w,x,t,this.state.context)),await((_=(C=j(this,or).config).onSettled)==null?void 0:_.call(C,void 0,x,this.state.variables,this.state.context,this)),await((T=(R=this.options).onSettled)==null?void 0:T.call(R,void 0,x,t,this.state.context)),x}finally{nt(this,Ys,Qi).call(this,{type:"error",error:x})}}finally{j(this,or).runNext(this)}}},Ks=new WeakMap,or=new WeakMap,ga=new WeakMap,Ys=new WeakSet,Qi=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Nn.batch(()=>{j(this,Ks).forEach(r=>{r.onMutationUpdate(t)}),j(this,or).notify({mutation:this,type:"updated",action:t})})},TE);function dO(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Vr,dd,RE,fO=(RE=class extends $u{constructor(n={}){super();Ne(this,Vr,void 0);Ne(this,dd,void 0);this.config=n,Me(this,Vr,new Map),Me(this,dd,Date.now())}build(n,r,s){const i=new M7({mutationCache:this,mutationId:++Xd(this,dd)._,options:n.defaultMutationOptions(r),state:s});return this.add(i),i}add(n){const r=Ef(n),s=j(this,Vr).get(r)??[];s.push(n),j(this,Vr).set(r,s),this.notify({type:"added",mutation:n})}remove(n){var s;const r=Ef(n);if(j(this,Vr).has(r)){const i=(s=j(this,Vr).get(r))==null?void 0:s.filter(o=>o!==n);i&&(i.length===0?j(this,Vr).delete(r):j(this,Vr).set(r,i))}this.notify({type:"removed",mutation:n})}canRun(n){var s;const r=(s=j(this,Vr).get(Ef(n)))==null?void 0:s.find(i=>i.state.status==="pending");return!r||r===n}runNext(n){var s;const r=(s=j(this,Vr).get(Ef(n)))==null?void 0:s.find(i=>i!==n&&i.state.isPaused);return(r==null?void 0:r.continue())??Promise.resolve()}clear(){Nn.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}getAll(){return[...j(this,Vr).values()].flat()}find(n){const r={exact:!0,...n};return this.getAll().find(s=>ik(r,s))}findAll(n={}){return this.getAll().filter(r=>ik(n,r))}notify(n){Nn.batch(()=>{this.listeners.forEach(r=>{r(n)})})}resumePausedMutations(){const n=this.getAll().filter(r=>r.state.isPaused);return Nn.batch(()=>Promise.all(n.map(r=>r.continue().catch(Jr))))}},Vr=new WeakMap,dd=new WeakMap,RE);function Ef(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function lk(e){return{onFetch:(t,n)=>{var c,d,f,p,g;const r=t.options,s=(f=(d=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,i=((p=t.state.data)==null?void 0:p.pages)||[],o=((g=t.state.data)==null?void 0:g.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let m=!1;const y=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},b=sO(t.options,t.fetchOptions),w=async(S,C,_)=>{if(m)return Promise.reject();if(C==null&&S.pages.length)return Promise.resolve(S);const R={queryKey:t.queryKey,pageParam:C,direction:_?"backward":"forward",meta:t.options.meta};y(R);const T=await b(R),{maxPages:x}=t.options,E=_?C7:E7;return{pages:E(S.pages,T,x),pageParams:E(S.pageParams,C,x)}};if(s&&i.length){const S=s==="backward",C=S?D7:uk,_={pages:i,pageParams:o},R=C(r,_);a=await w(_,R,S)}else{const S=e??i.length;do{const C=l===0?o[0]??r.initialPageParam:uk(r,a);if(l>0&&C==null)break;a=await w(a,C),l++}while(l<S)}return a};t.options.persister?t.fetchFn=()=>{var m,y;return(y=(m=t.options).persister)==null?void 0:y.call(m,u,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function uk(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 D7(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var un,uo,co,Ul,Hl,fo,zl,jl,PE,$7=(PE=class{constructor(t={}){Ne(this,un,void 0);Ne(this,uo,void 0);Ne(this,co,void 0);Ne(this,Ul,void 0);Ne(this,Hl,void 0);Ne(this,fo,void 0);Ne(this,zl,void 0);Ne(this,jl,void 0);Me(this,un,t.queryCache||new cO),Me(this,uo,t.mutationCache||new fO),Me(this,co,t.defaultOptions||{}),Me(this,Ul,new Map),Me(this,Hl,new Map),Me(this,fo,0)}mount(){Xd(this,fo)._++,j(this,fo)===1&&(Me(this,zl,Uw.subscribe(async t=>{t&&(await this.resumePausedMutations(),j(this,un).onFocus())})),Me(this,jl,fp.subscribe(async t=>{t&&(await this.resumePausedMutations(),j(this,un).onOnline())})))}unmount(){var t,n;Xd(this,fo)._--,j(this,fo)===0&&((t=j(this,zl))==null||t.call(this),Me(this,zl,void 0),(n=j(this,jl))==null||n.call(this),Me(this,jl,void 0))}isFetching(t){return j(this,un).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return j(this,uo).findAll({...t,status:"pending"}).length}getQueryData(t){var r;const n=this.defaultQueryOptions({queryKey:t});return(r=j(this,un).get(n.queryHash))==null?void 0:r.state.data}ensureQueryData(t){const n=this.getQueryData(t.queryKey);if(n===void 0)return this.fetchQuery(t);{const r=this.defaultQueryOptions(t),s=j(this,un).build(this,r);return t.revalidateIfStale&&s.isStaleByTime(Ol(r.staleTime,s))&&this.prefetchQuery(r),Promise.resolve(n)}}getQueriesData(t){return j(this,un).findAll(t).map(({queryKey:n,state:r})=>{const s=r.data;return[n,s]})}setQueryData(t,n,r){const s=this.defaultQueryOptions({queryKey:t}),i=j(this,un).get(s.queryHash),o=i==null?void 0:i.state.data,a=k7(n,o);if(a!==void 0)return j(this,un).build(this,s).setData(a,{...r,manual:!0})}setQueriesData(t,n,r){return Nn.batch(()=>j(this,un).findAll(t).map(({queryKey:s})=>[s,this.setQueryData(s,n,r)]))}getQueryState(t){var r;const n=this.defaultQueryOptions({queryKey:t});return(r=j(this,un).get(n.queryHash))==null?void 0:r.state}removeQueries(t){const n=j(this,un);Nn.batch(()=>{n.findAll(t).forEach(r=>{n.remove(r)})})}resetQueries(t,n){const r=j(this,un),s={type:"active",...t};return Nn.batch(()=>(r.findAll(t).forEach(i=>{i.reset()}),this.refetchQueries(s,n)))}cancelQueries(t,n={}){const r={revert:!0,...n},s=Nn.batch(()=>j(this,un).findAll(t).map(i=>i.cancel(r)));return Promise.all(s).then(Jr).catch(Jr)}invalidateQueries(t,n={}){return Nn.batch(()=>{if(j(this,un).findAll(t).forEach(s=>{s.invalidate()}),(t==null?void 0:t.refetchType)==="none")return Promise.resolve();const r={...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"};return this.refetchQueries(r,n)})}refetchQueries(t,n={}){const r={...n,cancelRefetch:n.cancelRefetch??!0},s=Nn.batch(()=>j(this,un).findAll(t).filter(i=>!i.isDisabled()).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=j(this,un).build(this,n);return r.isStaleByTime(Ol(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=lk(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Jr).catch(Jr)}ensureInfiniteQueryData(t){return t.behavior=lk(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return fp.isOnline()?j(this,uo).resumePausedMutations():Promise.resolve()}getQueryCache(){return j(this,un)}getMutationCache(){return j(this,uo)}getDefaultOptions(){return j(this,co)}setDefaultOptions(t){Me(this,co,t)}setQueryDefaults(t,n){j(this,Ul).set(Ha(t),{queryKey:t,defaultOptions:n})}getQueryDefaults(t){const n=[...j(this,Ul).values()],r={};return n.forEach(s=>{nd(t,s.queryKey)&&Object.assign(r,s.defaultOptions)}),r}setMutationDefaults(t,n){j(this,Hl).set(Ha(t),{mutationKey:t,defaultOptions:n})}getMutationDefaults(t){const n=[...j(this,Hl).values()];let r={};return n.forEach(s=>{nd(t,s.mutationKey)&&(r={...r,...s.defaultOptions})}),r}defaultQueryOptions(t){if(t._defaulted)return t;const n={...j(this,co).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return n.queryHash||(n.queryHash=Vw(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.enabled!==!0&&n.queryFn===Bw&&(n.enabled=!1),n}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...j(this,co).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){j(this,un).clear(),j(this,uo).clear()}},un=new WeakMap,uo=new WeakMap,co=new WeakMap,Ul=new WeakMap,Hl=new WeakMap,fo=new WeakMap,zl=new WeakMap,jl=new WeakMap,PE),Sr,ft,fd,ar,va,ql,ho,Xs,hd,Wl,Gl,ya,ba,po,Kl,wa,oc,pd,Iy,md,Ay,gd,Oy,vd,My,yd,Dy,bd,$y,wd,Ly,xp,hO,IE,L7=(IE=class extends $u{constructor(t,n){super();Ne(this,wa);Ne(this,pd);Ne(this,md);Ne(this,gd);Ne(this,vd);Ne(this,yd);Ne(this,bd);Ne(this,wd);Ne(this,xp);Ne(this,Sr,void 0);Ne(this,ft,void 0);Ne(this,fd,void 0);Ne(this,ar,void 0);Ne(this,va,void 0);Ne(this,ql,void 0);Ne(this,ho,void 0);Ne(this,Xs,void 0);Ne(this,hd,void 0);Ne(this,Wl,void 0);Ne(this,Gl,void 0);Ne(this,ya,void 0);Ne(this,ba,void 0);Ne(this,po,void 0);Ne(this,Kl,new Set);this.options=n,Me(this,Sr,t),Me(this,Xs,null),Me(this,ho,Py()),this.options.experimental_prefetchInRender||j(this,ho).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(j(this,ft).addObserver(this),ck(j(this,ft),this.options)?nt(this,wa,oc).call(this):this.updateResult(),nt(this,vd,My).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Fy(j(this,ft),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Fy(j(this,ft),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,nt(this,yd,Dy).call(this),nt(this,bd,$y).call(this),j(this,ft).removeObserver(this)}setOptions(t,n){const r=this.options,s=j(this,ft);if(this.options=j(this,Sr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ws(this.options.enabled,j(this,ft))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");nt(this,wd,Ly).call(this),j(this,ft).setOptions(this.options),r._defaulted&&!dp(this.options,r)&&j(this,Sr).getQueryCache().notify({type:"observerOptionsUpdated",query:j(this,ft),observer:this});const i=this.hasListeners();i&&dk(j(this,ft),s,this.options,r)&&nt(this,wa,oc).call(this),this.updateResult(n),i&&(j(this,ft)!==s||ws(this.options.enabled,j(this,ft))!==ws(r.enabled,j(this,ft))||Ol(this.options.staleTime,j(this,ft))!==Ol(r.staleTime,j(this,ft)))&&nt(this,pd,Iy).call(this);const o=nt(this,md,Ay).call(this);i&&(j(this,ft)!==s||ws(this.options.enabled,j(this,ft))!==ws(r.enabled,j(this,ft))||o!==j(this,po))&&nt(this,gd,Oy).call(this,o)}getOptimisticResult(t){const n=j(this,Sr).getQueryCache().build(j(this,Sr),t),r=this.createResult(n,t);return N7(this,r)&&(Me(this,ar,r),Me(this,ql,this.options),Me(this,va,j(this,ft).state)),r}getCurrentResult(){return j(this,ar)}trackResult(t,n){const r={};return Object.keys(t).forEach(s=>{Object.defineProperty(r,s,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(s),n==null||n(s),t[s])})}),r}trackProp(t){j(this,Kl).add(t)}getCurrentQuery(){return j(this,ft)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=j(this,Sr).defaultQueryOptions(t),r=j(this,Sr).getQueryCache().build(j(this,Sr),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return nt(this,wa,oc).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),j(this,ar)))}createResult(t,n){var x;const r=j(this,ft),s=this.options,i=j(this,ar),o=j(this,va),a=j(this,ql),u=t!==r?t.state:j(this,fd),{state:c}=t;let d={...c},f=!1,p;if(n._optimisticResults){const E=this.hasListeners(),P=!E&&ck(t,n),M=E&&dk(t,r,n,s);(P||M)&&(d={...d,...uO(c.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:g,errorUpdatedAt:m,status:y}=d;if(n.select&&d.data!==void 0)if(i&&d.data===(o==null?void 0:o.data)&&n.select===j(this,hd))p=j(this,Wl);else try{Me(this,hd,n.select),p=n.select(d.data),p=Ry(i==null?void 0:i.data,p,n),Me(this,Wl,p),Me(this,Xs,null)}catch(E){Me(this,Xs,E)}else p=d.data;if(n.placeholderData!==void 0&&p===void 0&&y==="pending"){let E;if(i!=null&&i.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))E=i.data;else if(E=typeof n.placeholderData=="function"?n.placeholderData((x=j(this,Gl))==null?void 0:x.state.data,j(this,Gl)):n.placeholderData,n.select&&E!==void 0)try{E=n.select(E),Me(this,Xs,null)}catch(P){Me(this,Xs,P)}E!==void 0&&(y="success",p=Ry(i==null?void 0:i.data,E,n),f=!0)}j(this,Xs)&&(g=j(this,Xs),p=j(this,Wl),m=Date.now(),y="error");const b=d.fetchStatus==="fetching",w=y==="pending",S=y==="error",C=w&&b,_=p!==void 0,T={status:y,fetchStatus:d.fetchStatus,isPending:w,isSuccess:y==="success",isError:S,isInitialLoading:C,isLoading:C,data:p,dataUpdatedAt:d.dataUpdatedAt,error:g,errorUpdatedAt:m,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>u.dataUpdateCount||d.errorUpdateCount>u.errorUpdateCount,isFetching:b,isRefetching:b&&!w,isLoadingError:S&&!_,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:S&&_,isStale:Hw(t,n),refetch:this.refetch,promise:j(this,ho)};if(this.options.experimental_prefetchInRender){const E=O=>{T.status==="error"?O.reject(T.error):T.data!==void 0&&O.resolve(T.data)},P=()=>{const O=Me(this,ho,T.promise=Py());E(O)},M=j(this,ho);switch(M.status){case"pending":t.queryHash===r.queryHash&&E(M);break;case"fulfilled":(T.status==="error"||T.data!==M.value)&&P();break;case"rejected":(T.status!=="error"||T.error!==M.reason)&&P();break}}return T}updateResult(t){const n=j(this,ar),r=this.createResult(j(this,ft),this.options);if(Me(this,va,j(this,ft).state),Me(this,ql,this.options),j(this,va).data!==void 0&&Me(this,Gl,j(this,ft)),dp(r,n))return;Me(this,ar,r);const s={},i=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!j(this,Kl).size)return!0;const l=new Set(a??j(this,Kl));return this.options.throwOnError&&l.add("error"),Object.keys(j(this,ar)).some(u=>{const c=u;return j(this,ar)[c]!==n[c]&&l.has(c)})};(t==null?void 0:t.listeners)!==!1&&i()&&(s.listeners=!0),nt(this,xp,hO).call(this,{...s,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&nt(this,vd,My).call(this)}},Sr=new WeakMap,ft=new WeakMap,fd=new WeakMap,ar=new WeakMap,va=new WeakMap,ql=new WeakMap,ho=new WeakMap,Xs=new WeakMap,hd=new WeakMap,Wl=new WeakMap,Gl=new WeakMap,ya=new WeakMap,ba=new WeakMap,po=new WeakMap,Kl=new WeakMap,wa=new WeakSet,oc=function(t){nt(this,wd,Ly).call(this);let n=j(this,ft).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Jr)),n},pd=new WeakSet,Iy=function(){nt(this,yd,Dy).call(this);const t=Ol(this.options.staleTime,j(this,ft));if(Ua||j(this,ar).isStale||!Cy(t))return;const r=nO(j(this,ar).dataUpdatedAt,t)+1;Me(this,ya,setTimeout(()=>{j(this,ar).isStale||this.updateResult()},r))},md=new WeakSet,Ay=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(j(this,ft)):this.options.refetchInterval)??!1},gd=new WeakSet,Oy=function(t){nt(this,bd,$y).call(this),Me(this,po,t),!(Ua||ws(this.options.enabled,j(this,ft))===!1||!Cy(j(this,po))||j(this,po)===0)&&Me(this,ba,setInterval(()=>{(this.options.refetchIntervalInBackground||Uw.isFocused())&&nt(this,wa,oc).call(this)},j(this,po)))},vd=new WeakSet,My=function(){nt(this,pd,Iy).call(this),nt(this,gd,Oy).call(this,nt(this,md,Ay).call(this))},yd=new WeakSet,Dy=function(){j(this,ya)&&(clearTimeout(j(this,ya)),Me(this,ya,void 0))},bd=new WeakSet,$y=function(){j(this,ba)&&(clearInterval(j(this,ba)),Me(this,ba,void 0))},wd=new WeakSet,Ly=function(){const t=j(this,Sr).getQueryCache().build(j(this,Sr),this.options);if(t===j(this,ft))return;const n=j(this,ft);Me(this,ft,t),Me(this,fd,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},xp=new WeakSet,hO=function(t){Nn.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(j(this,ar))}),j(this,Sr).getQueryCache().notify({query:j(this,ft),type:"observerResultsUpdated"})})},IE);function F7(e,t){return ws(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function ck(e,t){return F7(e,t)||e.state.data!==void 0&&Fy(e,t,t.refetchOnMount)}function Fy(e,t,n){if(ws(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Hw(e,t)}return!1}function dk(e,t,n,r){return(e!==t||ws(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Hw(e,n)}function Hw(e,t){return ws(t.enabled,e)!==!1&&e.isStaleByTime(Ol(t.staleTime,e))}function N7(e,t){return!dp(e.getCurrentResult(),t)}var mo,go,_r,Ti,Yl,hh,Sd,Ny,AE,V7=(AE=class extends $u{constructor(n,r){super();Ne(this,Yl);Ne(this,Sd);Ne(this,mo,void 0);Ne(this,go,void 0);Ne(this,_r,void 0);Ne(this,Ti,void 0);Me(this,mo,n),this.setOptions(r),this.bindMethods(),nt(this,Yl,hh).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var s;const r=this.options;this.options=j(this,mo).defaultMutationOptions(n),dp(this.options,r)||j(this,mo).getMutationCache().notify({type:"observerOptionsUpdated",mutation:j(this,_r),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Ha(r.mutationKey)!==Ha(this.options.mutationKey)?this.reset():((s=j(this,_r))==null?void 0:s.state.status)==="pending"&&j(this,_r).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=j(this,_r))==null||n.removeObserver(this)}onMutationUpdate(n){nt(this,Yl,hh).call(this),nt(this,Sd,Ny).call(this,n)}getCurrentResult(){return j(this,go)}reset(){var n;(n=j(this,_r))==null||n.removeObserver(this),Me(this,_r,void 0),nt(this,Yl,hh).call(this),nt(this,Sd,Ny).call(this)}mutate(n,r){var s;return Me(this,Ti,r),(s=j(this,_r))==null||s.removeObserver(this),Me(this,_r,j(this,mo).getMutationCache().build(j(this,mo),this.options)),j(this,_r).addObserver(this),j(this,_r).execute(n)}},mo=new WeakMap,go=new WeakMap,_r=new WeakMap,Ti=new WeakMap,Yl=new WeakSet,hh=function(){var r;const n=((r=j(this,_r))==null?void 0:r.state)??dO();Me(this,go,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Sd=new WeakSet,Ny=function(n){Nn.batch(()=>{var r,s,i,o,a,l,u,c;if(j(this,Ti)&&this.hasListeners()){const d=j(this,go).variables,f=j(this,go).context;(n==null?void 0:n.type)==="success"?((s=(r=j(this,Ti)).onSuccess)==null||s.call(r,n.data,d,f),(o=(i=j(this,Ti)).onSettled)==null||o.call(i,n.data,null,d,f)):(n==null?void 0:n.type)==="error"&&((l=(a=j(this,Ti)).onError)==null||l.call(a,n.error,d,f),(c=(u=j(this,Ti)).onSettled)==null||c.call(u,void 0,n.error,d,f))}this.listeners.forEach(d=>{d(j(this,go))})})},AE),B7="VUE_QUERY_CLIENT";function pO(e){const t=e?`:${e}`:"";return`${B7}${t}`}function Vy(e,t){Object.keys(e).forEach(n=>{e[n]=t[n]})}function By(e,t,n="",r=0){if(t){const s=t(e,n,r);if(s===void 0&&Xe(e)||s!==void 0)return s}if(Array.isArray(e))return e.map((s,i)=>By(s,t,String(i),r+1));if(typeof e=="object"&&H7(e)){const s=Object.entries(e).map(([i,o])=>[i,By(o,t,i,r+1)]);return Object.fromEntries(s)}return e}function U7(e,t){return By(e,t)}function st(e,t=!1){return U7(e,(n,r,s)=>{if(s===1&&r==="queryKey")return st(n,!0);if(t&&z7(n))return st(n(),t);if(Xe(n))return st(Q(n),t)})}function H7(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function z7(e){return typeof e=="function"}function Uy(e,t){return typeof e=="function"?e(...t):!!e}function zw(e=""){if(!CC())throw new Error("vue-query hooks can only be used inside setup() function or functions that support injection context.");const t=pO(e),n=Ke(t);if(!n)throw new Error("No 'queryClient' found in Vue context, use 'VueQueryPlugin' to properly initialize the library.");return n}var j7=class extends cO{find(e){return super.find(st(e))}findAll(e={}){return super.findAll(st(e))}},q7=class extends fO{find(e){return super.find(st(e))}findAll(e={}){return super.findAll(st(e))}},W7=class extends $7{constructor(e={}){const t={defaultOptions:e.defaultOptions,queryCache:e.queryCache||new j7,mutationCache:e.mutationCache||new q7};super(t),this.isRestoring=B(!1)}isFetching(e={}){return super.isFetching(st(e))}isMutating(e={}){return super.isMutating(st(e))}getQueryData(e){return super.getQueryData(st(e))}ensureQueryData(e){return super.ensureQueryData(st(e))}getQueriesData(e){return super.getQueriesData(st(e))}setQueryData(e,t,n={}){return super.setQueryData(st(e),t,st(n))}setQueriesData(e,t,n={}){return super.setQueriesData(st(e),t,st(n))}getQueryState(e){return super.getQueryState(st(e))}removeQueries(e={}){return super.removeQueries(st(e))}resetQueries(e={},t={}){return super.resetQueries(st(e),st(t))}cancelQueries(e={},t={}){return super.cancelQueries(st(e),st(t))}invalidateQueries(e={},t={}){const n=st(e),r=st(t);if(super.invalidateQueries({...n,refetchType:"none"},r),n.refetchType==="none")return Promise.resolve();const s={...n,type:n.refetchType??n.type??"active"};return At().then(()=>super.refetchQueries(s,r))}refetchQueries(e={},t={}){return super.refetchQueries(st(e),st(t))}fetchQuery(e){return super.fetchQuery(st(e))}prefetchQuery(e){return super.prefetchQuery(st(e))}fetchInfiniteQuery(e){return super.fetchInfiniteQuery(st(e))}prefetchInfiniteQuery(e){return super.prefetchInfiniteQuery(st(e))}setDefaultOptions(e){super.setDefaultOptions(st(e))}setQueryDefaults(e,t){super.setQueryDefaults(st(e),st(t))}getQueryDefaults(e){return super.getQueryDefaults(st(e))}setMutationDefaults(e,t){super.setMutationDefaults(st(e),st(t))}getMutationDefaults(e){return super.getMutationDefaults(st(e))}},G7={install:(e,t={})=>{const n=pO(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 W7(o)}Ua||r.mount();let s=()=>{};if(t.clientPersister){r.isRestoring.value=!0;const[o,a]=t.clientPersister(r);s=o,a.then(()=>{var l;r.isRestoring.value=!1,(l=t.clientPersisterOnSuccess)==null||l.call(t,r)})}const i=()=>{r.unmount(),s()};if(e.onUnmount)e.onUnmount(i);else{const o=e.unmount;e.unmount=function(){i(),o()}}e.provide(n,r)}};function K7(e,t,n){const r=zw(),s=I(()=>{const p=st(t);typeof p.enabled=="function"&&(p.enabled=p.enabled());const g=r.defaultQueryOptions(p);return g._optimisticResults=r.isRestoring.value?"isRestoring":"optimistic",g}),i=new e(r,s.value),o=Ap(i.getCurrentResult());let a=()=>{};xe(r.isRestoring,p=>{p||(a(),a=i.subscribe(g=>{Vy(o,g)}))},{immediate:!0});const l=()=>{i.setOptions(s.value),Vy(o,i.getCurrentResult())};xe(s,l),yn(()=>{a()});const u=(...p)=>(l(),o.refetch(...p)),c=()=>new Promise((p,g)=>{let m=()=>{};const y=()=>{if(s.value.enabled!==!1){i.setOptions(s.value);const b=i.getOptimisticResult(s.value);b.isStale?(m(),i.fetchOptimistic(s.value).then(p,w=>{Uy(s.value.throwOnError,[w,i.getCurrentQuery()])?g(w):p(i.getCurrentResult())})):(m(),p(b))}};y(),m=xe(s,y)});xe(()=>o.error,p=>{if(o.isError&&!o.isFetching&&Uy(s.value.throwOnError,[p,i.getCurrentQuery()]))throw p});const f=Fo(o);for(const p in o)typeof o[p]=="function"&&(f[p]=o[p]);return f.suspense=c,f.refetch=u,f}function jw(e,t){return K7(L7,e)}function Y7(e,t){const n=zw(),r=I(()=>n.defaultMutationOptions(st(e))),s=new V7(n,r.value),i=Ap(s.getCurrentResult()),o=s.subscribe(c=>{Vy(i,c)}),a=(c,d)=>{s.mutate(c,d).catch(()=>{})};xe(r,()=>{s.setOptions(r.value)}),yn(()=>{o()});const u=Fo(i);return xe(()=>i.error,c=>{if(c&&Uy(r.value.throwOnError,[c]))throw c}),{...u,mutate:a,mutateAsync:i.mutate,reset:i.reset}}const X7=ce({...Ue(),...Mr(),...IA()},"VLayout"),xm=ke()({name:"VLayout",props:X7(),setup(e,t){let{slots:n}=t;const{layoutClasses:r,layoutStyles:s,getLayoutItem:i,items:o,layoutRef:a}=DA(e),{dimensionStyles:l}=Dr(e);return Pe(()=>{var u;return h("div",{ref:a,class:[r.value,e.class],style:[l.value,s.value,e.style]},[(u=n.default)==null?void 0:u.call(n)])}),{getLayoutItem:i,items:o}}}),Q7={class:"text-h5"},J7={key:0},Z7={key:1},eK=De({__name:"AddOrUpdateCameraStreamDialog",setup(e){const t=zw(),n=en(tn.AddOrUpdateCameraDialog),r=I(()=>"C"),s=B({name:"",streamURL:""}),i=()=>{var d;return((d=n.context())==null?void 0:d.addOrUpdate)==="update"},o=I(()=>i());xe(()=>n.context(),d=>{var p;if(!d||(d==null?void 0:d.addOrUpdate)!=="update"){s.value.streamURL="",s.value.name="";return}const f=(p=t.getQueryData(["cameraStream"]))==null?void 0:p.find(g=>g.cameraStream.id===d.cameraId);s.value.name=f==null?void 0:f.cameraStream.name,s.value.streamURL=(f==null?void 0:f.cameraStream.streamURL)||""});function a(){n.closeDialog()}async function l(){await cp.createCameraStream({streamURL:s.value.streamURL,name:s.value.name}),await t.refetchQueries({queryKey:["cameraStream"]}),n.closeDialog()}async function u(){var d;await cp.updateCameraStream((d=n.context())==null?void 0:d.cameraId,{streamURL:s.value.streamURL,name:s.value.name}),await t.refetchQueries({queryKey:["cameraStream"]}),n.closeDialog()}function c(){n.closeDialog()}return(d,f)=>{const p=di;return L(),Z(p,{id:Q(n).dialogId,"max-width":"800px",onEscape:f[3]||(f[3]=g=>a())},{default:v(()=>[h(bt,null,{default:v(()=>[h(on,null,{default:v(()=>[$("span",Q7,[h(lt,{class:"mr-2",color:"primary",size:"56"},{default:v(()=>[k(ie(r.value),1)]),_:1}),o.value?(L(),ye("span",J7," Updating Camera ")):(L(),ye("span",Z7," New Camera "))])]),_:1}),h(Zt,null,{default:v(()=>[h(Tn,{"grid-list-md":""},{default:v(()=>[h(xm,{wrap:""},{default:v(()=>[h(ct,{modelValue:s.value.name,"onUpdate:modelValue":f[0]||(f[0]=g=>s.value.name=g),label:"Name",required:""},null,8,["modelValue"]),h(ct,{modelValue:s.value.streamURL,"onUpdate:modelValue":f[1]||(f[1]=g=>s.value.streamURL=g),label:"Url (MJPEG)",required:""},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),h(Dn,null,{default:v(()=>[h(vn),h(re,{color:"primary-darken-2",onClick:c},{default:v(()=>f[4]||(f[4]=[k(" Cancel ")])),_:1}),h(re,{color:"primary",onClick:f[2]||(f[2]=g=>o.value?u():l())},{default:v(()=>[k(ie(o.value?"Update":"Create"),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["id"])}}}),qw=Ts("TestPrinter",{state:()=>({currentCorrelationToken:void 0,testPrinter:void 0,testPrinterEvents:[]}),getters:{getEvents(){return()=>{var e;return(((e=this.testPrinterEvents)==null?void 0:e.filter(t=>t.correlationToken===this.currentCorrelationToken))||[]).filter(t=>(t.event!=="API_STATE_UPDATED"||t.payload!=="unset")&&(t.event!=="WS_STATE_UPDATED"||t.payload!=="unopened")).map(t=>{var r,s,i;return{event:t.event.startsWith("WS_")?"Socket":"API",payload:(s=(r=t.payload)==null?void 0:r.toString())==null?void 0:s.replace("noResponse","unreachable").replace("authFail","authentication failure"),failure:["authFail","noResponse","aborted","globalKey","error","connection error","closed","connection closed"].includes((i=t.payload)==null?void 0:i.toString())}})}}},actions:{clearEvents(){this.testPrinterEvents=[]},async createTestPrinter(e){return this.testPrinter=e,await jt.testConnection(e)},saveEvent(e){var t;(t=this.testPrinterEvents)==null||t.push(e)}}}),tK="error",nK="success",rK=De({__name:"PrinterChecksPanel",setup(e){const t=qw(),n=B(4);function r(){return t.getEvents().map(s=>({label:s.event,text:s.payload,color:s.failure?tK:nK}))}return(s,i)=>(L(),Z(He,{cols:Q(n)},{default:v(()=>[i[0]||(i[0]=$("strong",null," Checks: ",-1)),(L(!0),ye(Ce,null,qt(r(),(o,a)=>(L(),Z(nn,{key:a,type:o.color,density:"compact"},{default:v(()=>[$("small",null,ie(o.label)+" "+ie(o.text),1)]),_:2},1032,["type"]))),128))]),_:1},8,["cols"]))}}),sK="/assets/klipper-logo-B1Hu-a1R.svg",fk="/assets/octoprint-tentacle-D_4slObB.svg",mO=Symbol.for("vuetify:v-item-group"),iK=ce({...Ue(),...Rd({selectedClass:"v-item--selected"}),...wt(),...Mt()},"VItemGroup"),oK=ke()({name:"VItemGroup",props:iK(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const{themeClasses:r}=Kt(e),{isSelected:s,select:i,next:o,prev:a,selected:l}=yu(e,mO);return()=>h(e.tag,{class:["v-item-group",r.value,e.class],style:e.style},{default:()=>{var u;return[(u=n.default)==null?void 0:u.call(n,{isSelected:s,select:i,next:o,prev:a,selected:l.value})]}})}}),aK=ke()({name:"VItem",props:Pd(),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}=Id(e,mO);return()=>{var u;return(u=n.default)==null?void 0:u.call(n,{isSelected:r.value,selectedClass:o.value,select:s,toggle:i,value:a.value,disabled:l.value})}}}),lK={class:"text-h5"},uK={key:0},cK={key:1},dK={class:"ml-3 align-center"},fK=De({__name:"AddOrUpdatePrinterDialog",setup(e){const t=en(tn.AddOrUpdatePrinterDialog),n=Lt(),r=qw(),s=ji(),i=Ke("appConstants"),o=Ot(),a=B(null),l=B(!1),u=B(!1),c=B(!1),d=B(""),f=B(wy()),p=I(()=>{var A,D;if(s.hasFeature("multiplePrinterServices")){const H=s.getFeature("multiplePrinterServices");if((D=(A=H==null?void 0:H.subFeatures)==null?void 0:A.types)==null?void 0:D.includes("klipper"))return[{name:"OctoPrint",logo:fk,height:"75px"},{name:"Klipper",logo:sK,height:"75px"}]}return[{name:"OctoPrint",logo:fk,height:"75px"}]}),g=I(()=>{var A;return(A=n.updateDialogPrinter)==null?void 0:A.id});St(async()=>{if(g.value){const A=n.printer(g.value);f.value=jt.convertPrinterToCreateForm(A)}}),xe(g,A=>{if(!A)return;const D=n.printer(A);f.value=jt.convertPrinterToCreateForm(D)});const m=I(()=>n.updateDialogPrinter),y=I(()=>!!m.value),b=I(()=>y?"Save":"Create"),w=I(()=>{var A;return f?vm((A=f.value)==null?void 0:A.name):"?"}),S=I(()=>({required:!0,max:i.maxPrinterNameLength})),C=I(()=>({required:!0,length:i.apiKeyLength,alpha_num:!0}));function _(){f.value=wy()}function R(){c.value=!0}async function T(){if(!f)return;r.clearEvents(),R();const{correlationToken:A}=await r.createTestPrinter(f.value);r.currentCorrelationToken=A}async function x(A){await n.createPrinter(A,u.value),o.openInfoMessage({title:`Printer ${A.name} created`})}async function E(A){const D=A.id;await n.updatePrinter({printerId:D,updatedPrinter:A},u.value),o.openInfoMessage({title:`Printer ${A.name} updated`})}async function P(){var D,H,z,Y,q;if(!f)return;a.value=null,l.value=!0,(D=f.value.printerURL)!=null&&D.length&&!((H=f.value.printerURL)!=null&&H.startsWith("http://"))&&!((z=f.value.printerURL)!=null&&z.startsWith("https://"))&&(f.value.printerURL+="https://");const A=f.value;try{y.value?await E(A):await x(A),O()}catch(V){V instanceof PR?(a.value=((q=(Y=V.response)==null?void 0:Y.data)==null?void 0:q.error)||V.message,o.error("Validation Failed",V.message)):(a.value=V.message,o.error("Error",V.message))}finally{l.value=!1,u.value=!1}}async function M(){f.value.name=Va(),n.updateDialogPrinter=void 0,a.value=null,u.value=!1,a.value=null}function O(){t.closeDialog(),u.value=!1,a.value=null,c.value=!1,r.clearEvents(),_(),n.updateDialogPrinter=void 0,d.value=""}return(A,D)=>{const H=rK,z=di;return L(),Z(z,{id:Q(t).dialogId,"max-width":Q(c)?"900px":"700px",onEscape:D[11]||(D[11]=Y=>O())},{default:v(()=>[h(bt,{class:"pa-4"},{default:v(()=>[h(on,null,{default:v(()=>[$("span",lK,[h(lt,{color:"primary",size:"56"},{default:v(()=>[k(ie(Q(w)),1)]),_:1}),Q(y)?(L(),ye("span",uK," Updating Printer ")):(L(),ye("span",cK," New Printer "))])]),_:1}),h(Zt,null,{default:v(()=>{var Y;return[D[14]||(D[14]=$("h4",null,"Printer type",-1)),h(oK,{modelValue:Q(f).printerType,"onUpdate:modelValue":D[0]||(D[0]=q=>Q(f).printerType=q),mandatory:""},{default:v(()=>[h(Tn,null,{default:v(()=>[h(ot,null,{default:v(()=>[(L(!0),ye(Ce,null,qt(Q(p),q=>(L(),Z(He,{key:q.name,cols:"12",md:"6"},{default:v(()=>[h(aK,null,{default:v(({isSelected:V,toggle:G})=>[h(bt,{color:V?"primary":"blue-grey darken-4",class:"d-flex align-center justify-center elevation-8",height:"75px",width:"225px",onClick:G},{default:v(()=>[h(hi,{src:q.logo,height:q.height,"max-width":"125px",width:"125px"},null,8,["src","height"]),h(M2,null,{default:v(()=>[$("h3",dK,ie(q.name),1)]),_:2},1024)]),_:2},1032,["color","onClick"])]),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"]),h(ot,null,{default:v(()=>[h(He,{cols:Q(c)?8:12},{default:v(()=>[Q(f)?(L(),Z(ot,{key:0},{default:v(()=>[h(He,null,{default:v(()=>[h(ct,{modelValue:Q(f).name,"onUpdate:modelValue":D[1]||(D[1]=q=>Q(f).name=q),counter:Q(S).max,autofocus:"",class:"ma-1",label:"Printer name*",required:""},null,8,["modelValue","counter"])]),_:1}),h(He,null,{default:v(()=>[h(En,{modelValue:Q(f).enabled,"onUpdate:modelValue":D[2]||(D[2]=q=>Q(f).enabled=q),hint:"Disabling makes the printer passive",label:"Enabled*","persistent-hint":"",required:""},null,8,["modelValue"])]),_:1})]),_:1})):he("",!0),h(ct,{modelValue:Q(f).printerURL,"onUpdate:modelValue":D[3]||(D[3]=q=>Q(f).printerURL=q),class:"ma-1",hint:"F.e. 'octopi.local' or 'https://my.printer.com'",label:"Printer URL*"},null,8,["modelValue"]),h(ct,{modelValue:Q(f).apiKey,"onUpdate:modelValue":D[4]||(D[4]=q=>Q(f).apiKey=q),counter:Q(C).length,class:"ma-1",hint:"User or Application Key with 32 or 43 characters (Global API key will fail)",label:"API Key*","persistent-hint":"",required:""},null,8,["modelValue","counter"])]),_:1},8,["cols"]),Q(c)?(L(),Z(H,{key:0,cols:4},{default:v(()=>[h(re,{onClick:D[5]||(D[5]=q=>c.value=!1)},{default:v(()=>D[12]||(D[12]=[k(" Hide checks ")])),_:1})]),_:1})):he("",!0)]),_:1}),(Y=Q(a))!=null&&Y.length?(L(),Z(nn,{key:0,color:"primary",class:"my-3"},{default:v(()=>[k(ie(Q(a))+" ",1),h(En,{color:"warning",modelValue:Q(u),"onUpdate:modelValue":D[6]||(D[6]=q=>Xe(u)?u.value=q:null),label:"Force save"},null,8,["modelValue"])]),_:1})):he("",!0),Q(l)?(L(),Z(nn,{key:1,class:"my-3"},{default:v(()=>[D[13]||(D[13]=k(" Validating printer ")),h(Od,{indeterminate:""})]),_:1})):he("",!0)]}),_:1}),h(Dn,null,{default:v(()=>[D[18]||(D[18]=$("em",{class:"text-red"}," * indicates required field ",-1)),h(vn),h(re,{variant:"text",onClick:D[7]||(D[7]=Y=>O())},{default:v(()=>D[15]||(D[15]=[k(" Close ")])),_:1}),Q(y)?(L(),Z(re,{key:0,color:"gray",variant:"text",onClick:D[8]||(D[8]=Y=>M())},{default:v(()=>D[16]||(D[16]=[k(" Duplicate ")])),_:1})):he("",!0),h(re,{color:"warning",variant:"text",onClick:D[9]||(D[9]=Y=>T())},{default:v(()=>D[17]||(D[17]=[k(" Test connection ")])),_:1}),h(re,{color:"blue-darken-1",variant:"text",onClick:D[10]||(D[10]=Y=>P())},{default:v(()=>[k(ie(Q(b)),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["id","max-width"])}}}),hK=ce({text:String,...Ue(),...wt()},"VToolbarTitle"),Rn=ke()({name:"VToolbarTitle",props:hK(),setup(e,t){let{slots:n}=t;return Pe(()=>{const r=!!(n.default||n.text||e.text);return h(e.tag,{class:["v-toolbar-title",e.class],style:e.style},{default:()=>{var s;return[r&&h("div",{class:"v-toolbar-title__placeholder"},[n.text?n.text():e.text,(s=n.default)==null?void 0:s.call(n)])]}})}),{}}}),pK=[null,"prominent","default","comfortable","compact"],gO=ce({absolute:Boolean,collapse:Boolean,color:String,density:{type:String,default:"default",validator:e=>pK.includes(e)},extended:Boolean,extensionHeight:{type:[Number,String],default:48},flat:Boolean,floating:Boolean,height:{type:[Number,String],default:64},image:String,title:String,...fs(),...Ue(),...ps(),...$n(),...wt({tag:"header"}),...Mt()},"VToolbar"),mr=ke()({name:"VToolbar",props:gO(),setup(e,t){var p;let{slots:n}=t;const{backgroundColorClasses:r,backgroundColorStyles:s}=fr(Te(e,"color")),{borderClasses:i}=Ps(e),{elevationClasses:o}=Is(e),{roundedClasses:a}=Hn(e),{themeClasses:l}=Kt(e),{rtlClasses:u}=$r(),c=Oe(!!(e.extended||(p=n.extension)!=null&&p.call(n))),d=I(()=>parseInt(Number(e.height)+(e.density==="prominent"?Number(e.height):0)-(e.density==="comfortable"?8:0)-(e.density==="compact"?16:0),10)),f=I(()=>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 Ar({VBtn:{variant:"text"}}),Pe(()=>{var b;const g=!!(e.title||n.title),m=!!(n.image||e.image),y=(b=n.extension)==null?void 0:b.call(n);return c.value=!!(e.extended||y),h(e.tag,{class:["v-toolbar",{"v-toolbar--absolute":e.absolute,"v-toolbar--collapse":e.collapse,"v-toolbar--flat":e.flat,"v-toolbar--floating":e.floating,[`v-toolbar--density-${e.density}`]:!0},r.value,i.value,o.value,a.value,l.value,u.value,e.class],style:[s.value,e.style]},{default:()=>[m&&h("div",{key:"image",class:"v-toolbar__image"},[n.image?h(It,{key:"image-defaults",disabled:!e.image,defaults:{VImg:{cover:!0,src:e.image}}},n.image):h(hi,{key:"image-img",cover:!0,src:e.image},null)]),h(It,{defaults:{VTabs:{height:Ve(d.value)}}},{default:()=>{var w,S,C;return[h("div",{class:"v-toolbar__content",style:{height:Ve(d.value)}},[n.prepend&&h("div",{class:"v-toolbar__prepend"},[(w=n.prepend)==null?void 0:w.call(n)]),g&&h(Rn,{key:"title",text:e.title},{text:n.title}),(S=n.default)==null?void 0:S.call(n),n.append&&h("div",{class:"v-toolbar__append"},[(C=n.append)==null?void 0:C.call(n)])])]}}),h(It,{defaults:{VTabs:{height:Ve(f.value)}}},{default:()=>[h(KT,null,{default:()=>[c.value&&h("div",{class:"v-toolbar__extension",style:{height:Ve(f.value)}},[y])]})]})]})}),{contentHeight:d,extensionHeight:f}}}),mK=De({__name:"HelpOverlay",setup(e){const t=B(!1);return(n,r)=>(L(),Z(rR,{modelValue:Q(t),"onUpdate:modelValue":r[0]||(r[0]=s=>Xe(t)?t.value=s:null),fullscreen:"",eager:"",transition:"dialog-bottom-transition",width:"100%"},{activator:v(({props:s})=>[h(xt,{location:"top"},{activator:v(({props:i})=>[h(re,ve({icon:"help"},{...s,...i}),{default:v(()=>[h(X,null,{default:v(()=>r[1]||(r[1]=[k("help")])),_:1})]),_:2},1040)]),default:v(()=>[r[2]||(r[2]=$("span",null," Load the online documentation webpage ",-1))]),_:2},1024)]),default:v(({isActive:s})=>[h(bt,{height:"100%",width:"100%"},{default:v(()=>[h(mr,{color:"primary"},{default:v(()=>[h(X,{class:"ml-5"},{default:v(()=>r[3]||(r[3]=[k("help")])),_:1}),r[6]||(r[6]=$("h2",{class:"ml-10"},"FDM Monster Documentation",-1)),h(vn),r[7]||(r[7]=$("span",{class:"mr-10"}," docs.fdm-monster.net ",-1)),h(re,{variant:"flat",onClick:i=>s.value=!1},{default:v(()=>[h(X,{class:"mr-2"},{default:v(()=>r[4]||(r[4]=[k("close")])),_:1}),r[5]||(r[5]=k(" Close help "))]),_:2},1032,["onClick"])]),_:2},1024),r[8]||(r[8]=$("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"]))}}),gK=De({__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)=>(L(),Z(xt,{location:t.location},{activator:v(({props:s})=>[h(re,ve(s,{variant:"outlined",class:"ml-2",color:n.color,onClick:r[0]||(r[0]=i=>n.$emit("click"))}),{default:v(()=>[Np(n.$slots,"default",{},()=>{var i;return[(i=t.icon)!=null&&i.length?(L(),Z(X,{key:0,class:ja("mr-2 "+t.iconClass)},{default:v(()=>[k(ie(t.icon),1)]),_:1},8,["class"])):he("",!0),k(" "+ie(t.text),1)]})]),_:2},1040,["color"])]),default:v(()=>[$("span",null,ie(t.tooltip),1)]),_:3},8,["location"]))}});/*!
|
|
64
|
-
* vue-router v4.5.0
|
|
65
|
-
* (c) 2024 Eduardo San Martin Morote
|
|
66
|
-
* @license MIT
|
|
67
|
-
*/const gl=typeof document<"u";function vO(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function vK(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&vO(e.default)}const Et=Object.assign;function Og(e,t){const n={};for(const r in t){const s=t[r];n[r]=Cs(s)?s.map(e):e(s)}return n}const Cc=()=>{},Cs=Array.isArray,yO=/#/g,yK=/&/g,bK=/\//g,wK=/=/g,SK=/\?/g,bO=/\+/g,_K=/%5B/g,kK=/%5D/g,wO=/%5E/g,xK=/%60/g,SO=/%7B/g,EK=/%7C/g,_O=/%7D/g,CK=/%20/g;function Ww(e){return encodeURI(""+e).replace(EK,"|").replace(_K,"[").replace(kK,"]")}function TK(e){return Ww(e).replace(SO,"{").replace(_O,"}").replace(wO,"^")}function Hy(e){return Ww(e).replace(bO,"%2B").replace(CK,"+").replace(yO,"%23").replace(yK,"%26").replace(xK,"`").replace(SO,"{").replace(_O,"}").replace(wO,"^")}function RK(e){return Hy(e).replace(wK,"%3D")}function PK(e){return Ww(e).replace(yO,"%23").replace(SK,"%3F")}function IK(e){return e==null?"":PK(e).replace(bK,"%2F")}function rd(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const AK=/\/$/,OK=e=>e.replace(AK,"");function Mg(e,t,n="/"){let r,s={},i="",o="";const a=t.indexOf("#");let l=t.indexOf("?");return a<l&&a>=0&&(l=-1),l>-1&&(r=t.slice(0,l),i=t.slice(l+1,a>-1?a:t.length),s=e(i)),a>-1&&(r=r||t.slice(0,a),o=t.slice(a,t.length)),r=LK(r??t,n),{fullPath:r+(i&&"?")+i+o,path:r,query:s,hash:rd(o)}}function MK(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function hk(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function DK(e,t,n){const r=t.matched.length-1,s=n.matched.length-1;return r>-1&&r===s&&fu(t.matched[r],n.matched[s])&&kO(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function fu(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function kO(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!$K(e[n],t[n]))return!1;return!0}function $K(e,t){return Cs(e)?pk(e,t):Cs(t)?pk(t,e):e===t}function pk(e,t){return Cs(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function LK(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 Gi={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var sd;(function(e){e.pop="pop",e.push="push"})(sd||(sd={}));var Tc;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Tc||(Tc={}));function FK(e){if(!e)if(gl){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),OK(e)}const NK=/^[^#]+#/;function VK(e,t){return e.replace(NK,"#")+t}function BK(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 Em=()=>({left:window.scrollX,top:window.scrollY});function UK(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=BK(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 mk(e,t){return(history.state?history.state.position-t:-1)+e}const zy=new Map;function HK(e,t){zy.set(e,t)}function zK(e){const t=zy.get(e);return zy.delete(e),t}let jK=()=>location.protocol+"//"+location.host;function xO(e,t){const{pathname:n,search:r,hash:s}=t,i=e.indexOf("#");if(i>-1){let a=s.includes(e.slice(i))?e.slice(i).length:1,l=s.slice(a);return l[0]!=="/"&&(l="/"+l),hk(l,"")}return hk(n,e)+r+s}function qK(e,t,n,r){let s=[],i=[],o=null;const a=({state:f})=>{const p=xO(e,location),g=n.value,m=t.value;let y=0;if(f){if(n.value=p,t.value=f,o&&o===g){o=null;return}y=m?f.position-m.position:0}else r(p);s.forEach(b=>{b(n.value,g,{delta:y,type:sd.pop,direction:y?y>0?Tc.forward:Tc.back:Tc.unknown})})};function l(){o=n.value}function u(f){s.push(f);const p=()=>{const g=s.indexOf(f);g>-1&&s.splice(g,1)};return i.push(p),p}function c(){const{history:f}=window;f.state&&f.replaceState(Et({},f.state,{scroll:Em()}),"")}function d(){for(const f of i)f();i=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",c)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",c,{passive:!0}),{pauseListeners:l,listen:u,destroy:d}}function gk(e,t,n,r=!1,s=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:s?Em():null}}function WK(e){const{history:t,location:n}=window,r={value:xO(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:jK()+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){const c=Et({},t.state,gk(s.value.back,l,s.value.forward,!0),u,{position:s.value.position});i(l,c,!0),r.value=l}function a(l,u){const c=Et({},s.value,t.state,{forward:l,scroll:Em()});i(c.current,c,!0);const d=Et({},gk(r.value,l,null),{position:c.position+1},u);i(l,d,!1),r.value=l}return{location:r,state:s,push:a,replace:o}}function GK(e){e=FK(e);const t=WK(e),n=qK(e,t.state,t.location,t.replace);function r(i,o=!0){o||n.pauseListeners(),history.go(i)}const s=Et({location:"",base:e,go:r,createHref:VK.bind(null,e)},t,n);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>t.state.value}),s}function KK(e){return typeof e=="string"||e&&typeof e=="object"}function EO(e){return typeof e=="string"||typeof e=="symbol"}const CO=Symbol("");var vk;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(vk||(vk={}));function hu(e,t){return Et(new Error,{type:e,[CO]:!0},t)}function vi(e,t){return e instanceof Error&&CO in e&&(t==null||!!(e.type&t))}const yk="[^/]+?",YK={sensitive:!1,strict:!1,start:!0,end:!0},XK=/[.+*?^${}()[\]/\\]/g;function QK(e,t){const n=Et({},YK,t),r=[];let s=n.start?"^":"";const i=[];for(const u of e){const c=u.length?[]:[90];n.strict&&!u.length&&(s+="/");for(let d=0;d<u.length;d++){const f=u[d];let p=40+(n.sensitive?.25:0);if(f.type===0)d||(s+="/"),s+=f.value.replace(XK,"\\$&"),p+=40;else if(f.type===1){const{value:g,repeatable:m,optional:y,regexp:b}=f;i.push({name:g,repeatable:m,optional:y});const w=b||yk;if(w!==yk){p+=10;try{new RegExp(`(${w})`)}catch(C){throw new Error(`Invalid custom RegExp for param "${g}" (${w}): `+C.message)}}let S=m?`((?:${w})(?:/(?:${w}))*)`:`(${w})`;d||(S=y&&u.length<2?`(?:/${S})`:"/"+S),y&&(S+="?"),s+=S,p+=20,y&&(p+=-8),m&&(p+=-20),w===".*"&&(p+=-50)}c.push(p)}r.push(c)}if(n.strict&&n.end){const u=r.length-1;r[u][r[u].length-1]+=.7000000000000001}n.strict||(s+="/?"),n.end?s+="$":n.strict&&!s.endsWith("/")&&(s+="(?:/|$)");const o=new RegExp(s,n.sensitive?"":"i");function a(u){const c=u.match(o),d={};if(!c)return null;for(let f=1;f<c.length;f++){const p=c[f]||"",g=i[f-1];d[g.name]=p&&g.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===0)c+=p.value;else if(p.type===1){const{value:g,repeatable:m,optional:y}=p,b=g in u?u[g]:"";if(Cs(b)&&!m)throw new Error(`Provided param "${g}" is an array but it is not repeatable (* or + modifiers)`);const w=Cs(b)?b.join("/"):b;if(!w)if(y)f.length<2&&(c.endsWith("/")?c=c.slice(0,-1):d=!0);else throw new Error(`Missing required param "${g}"`);c+=w}}return c||"/"}return{re:o,score:r,keys:i,parse:a,stringify:l}}function JK(e,t){let n=0;for(;n<e.length&&n<t.length;){const r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===80?-1:1:e.length>t.length?t.length===1&&t[0]===80?1:-1:0}function TO(e,t){let n=0;const r=e.score,s=t.score;for(;n<r.length&&n<s.length;){const i=JK(r[n],s[n]);if(i)return i;n++}if(Math.abs(s.length-r.length)===1){if(bk(r))return 1;if(bk(s))return-1}return s.length-r.length}function bk(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const ZK={type:0,value:""},e9=/[a-zA-Z0-9_]/;function t9(e){if(!e)return[[]];if(e==="/")return[[ZK]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(p){throw new Error(`ERR (${n})/"${u}": ${p}`)}let n=0,r=n;const s=[];let i;function o(){i&&s.push(i),i=[]}let a=0,l,u="",c="";function d(){u&&(n===0?i.push({type:0,value:u}):n===1||n===2||n===3?(i.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),i.push({type:1,value:u,regexp:c,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),u="")}function f(){u+=l}for(;a<e.length;){if(l=e[a++],l==="\\"&&n!==2){r=n,n=4;continue}switch(n){case 0:l==="/"?(u&&d(),o()):l===":"?(d(),n=1):f();break;case 4:f(),n=r;break;case 1:l==="("?n=2:e9.test(l)?f():(d(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--);break;case 2:l===")"?c[c.length-1]=="\\"?c=c.slice(0,-1)+l:n=3:c+=l;break;case 3:d(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--,c="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${u}"`),d(),o(),s}function n9(e,t,n){const r=QK(t9(e.path),n),s=Et(r,{record:e,parent:t,children:[],alias:[]});return t&&!s.record.aliasOf==!t.record.aliasOf&&t.children.push(s),s}function r9(e,t){const n=[],r=new Map;t=kk({strict:!1,end:!0,sensitive:!1},t);function s(d){return r.get(d)}function i(d,f,p){const g=!p,m=Sk(d);m.aliasOf=p&&p.record;const y=kk(t,d),b=[m];if("alias"in d){const C=typeof d.alias=="string"?[d.alias]:d.alias;for(const _ of C)b.push(Sk(Et({},m,{components:p?p.record.components:m.components,path:_,aliasOf:p?p.record:m})))}let w,S;for(const C of b){const{path:_}=C;if(f&&_[0]!=="/"){const R=f.record.path,T=R[R.length-1]==="/"?"":"/";C.path=f.record.path+(_&&T+_)}if(w=n9(C,f,y),p?p.alias.push(w):(S=S||w,S!==w&&S.alias.push(w),g&&d.name&&!_k(w)&&o(d.name)),RO(w)&&l(w),m.children){const R=m.children;for(let T=0;T<R.length;T++)i(R[T],w,p&&p.children[T])}p=p||w}return S?()=>{o(S)}:Cc}function o(d){if(EO(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=o9(d,n);n.splice(f,0,d),d.record.name&&!_k(d)&&r.set(d.record.name,d)}function u(d,f){let p,g={},m,y;if("name"in d&&d.name){if(p=r.get(d.name),!p)throw hu(1,{location:d});y=p.record.name,g=Et(wk(f.params,p.keys.filter(S=>!S.optional).concat(p.parent?p.parent.keys.filter(S=>S.optional):[]).map(S=>S.name)),d.params&&wk(d.params,p.keys.map(S=>S.name))),m=p.stringify(g)}else if(d.path!=null)m=d.path,p=n.find(S=>S.re.test(m)),p&&(g=p.parse(m),y=p.record.name);else{if(p=f.name?r.get(f.name):n.find(S=>S.re.test(f.path)),!p)throw hu(1,{location:d,currentLocation:f});y=p.record.name,g=Et({},f.params,d.params),m=p.stringify(g)}const b=[];let w=p;for(;w;)b.unshift(w.record),w=w.parent;return{name:y,path:m,params:g,matched:b,meta:i9(b)}}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 wk(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function Sk(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:s9(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 s9(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 _k(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function i9(e){return e.reduce((t,n)=>Et(t,n.meta),{})}function kk(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function o9(e,t){let n=0,r=t.length;for(;n!==r;){const i=n+r>>1;TO(e,t[i])<0?r=i:n=i+1}const s=a9(e);return s&&(r=t.lastIndexOf(s,r-1)),r}function a9(e){let t=e;for(;t=t.parent;)if(RO(t)&&TO(e,t)===0)return t}function RO({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function l9(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;s<r.length;++s){const i=r[s].replace(bO," "),o=i.indexOf("="),a=rd(o<0?i:i.slice(0,o)),l=o<0?null:rd(i.slice(o+1));if(a in t){let u=t[a];Cs(u)||(u=t[a]=[u]),u.push(l)}else t[a]=l}return t}function xk(e){let t="";for(let n in e){const r=e[n];if(n=RK(n),r==null){r!==void 0&&(t+=(t.length?"&":"")+n);continue}(Cs(r)?r.map(i=>i&&Hy(i)):[r&&Hy(r)]).forEach(i=>{i!==void 0&&(t+=(t.length?"&":"")+n,i!=null&&(t+="="+i))})}return t}function u9(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=Cs(r)?r.map(s=>s==null?null:""+s):r==null?r:""+r)}return t}const c9=Symbol(""),Ek=Symbol(""),Cm=Symbol(""),Gw=Symbol(""),jy=Symbol("");function Yu(){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 oo(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(hu(4,{from:n,to:t})):f instanceof Error?l(f):KK(f)?l(hu(2,{from:t,to:f})):(o&&r.enterCallbacks[s]===o&&typeof f=="function"&&o.push(f),a())},c=i(()=>e.call(r&&r.instances[s],t,n,u));let d=Promise.resolve(c);e.length<3&&(d=d.then(u)),d.catch(f=>l(f))})}function Dg(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(vO(l)){const c=(l.__vccOpts||l)[t];c&&i.push(oo(c,n,r,o,a,s))}else{let u=l();i.push(()=>u.then(c=>{if(!c)throw new Error(`Couldn't resolve component "${a}" at "${o.path}"`);const d=vK(c)?c.default:c;o.mods[a]=c,o.components[a]=d;const p=(d.__vccOpts||d)[t];return p&&oo(p,n,r,o,a,s)()}))}}return i}function Ck(e){const t=Ke(Cm),n=Ke(Gw),r=I(()=>{const l=Q(e.to);return t.resolve(l)}),s=I(()=>{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(fu.bind(null,c));if(f>-1)return f;const p=Tk(l[u-2]);return u>1&&Tk(c)===p&&d[d.length-1].path!==p?d.findIndex(fu.bind(null,l[u-2])):f}),i=I(()=>s.value>-1&&m9(n.params,r.value.params)),o=I(()=>s.value>-1&&s.value===n.matched.length-1&&kO(n.params,r.value.params));function a(l={}){if(p9(l)){const u=t[Q(e.replace)?"replace":"push"](Q(e.to)).catch(Cc);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>u),u}return Promise.resolve()}return{route:r,href:I(()=>r.value.href),isActive:i,isExactActive:o,navigate:a}}function d9(e){return e.length===1?e[0]:e}const f9=De({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"}},useLink:Ck,setup(e,{slots:t}){const n=mn(Ck(e)),{options:r}=Ke(Cm),s=I(()=>({[Rk(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[Rk(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&d9(t.default(n));return e.custom?i:Ir("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},i)}}}),h9=f9;function p9(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 m9(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(!Cs(s)||s.length!==r.length||r.some((i,o)=>i!==s[o]))return!1}return!0}function Tk(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Rk=(e,t,n)=>e??t??n,g9=De({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=Ke(jy),s=I(()=>e.route||r.value),i=Ke(Ek,0),o=I(()=>{let u=Q(i);const{matched:c}=s.value;let d;for(;(d=c[u])&&!d.components;)u++;return u}),a=I(()=>s.value.matched[o.value]);Wt(Ek,I(()=>o.value+1)),Wt(c9,a),Wt(jy,s);const l=B();return xe(()=>[l.value,a.value,e.name],([u,c,d],[f,p,g])=>{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||!fu(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 Pk(n.default,{Component:f,route:u});const p=d.props[c],g=p?p===!0?u.params:typeof p=="function"?p(u):p:null,y=Ir(f,Et({},g,t,{onVnodeUnmounted:b=>{b.component.isUnmounted&&(d.instances[c]=null)},ref:l}));return Pk(n.default,{Component:y,route:u})||y}}});function Pk(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const v9=g9;function y9(e){const t=r9(e.routes,e),n=e.parseQuery||l9,r=e.stringifyQuery||xk,s=e.history,i=Yu(),o=Yu(),a=Yu(),l=Oe(Gi);let u=Gi;gl&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=Og.bind(null,ee=>""+ee),d=Og.bind(null,IK),f=Og.bind(null,rd);function p(ee,me){let ne,U;return EO(ee)?(ne=t.getRecordMatcher(ee),U=me):U=ee,t.addRoute(U,ne)}function g(ee){const me=t.getRecordMatcher(ee);me&&t.removeRoute(me)}function m(){return t.getRoutes().map(ee=>ee.record)}function y(ee){return!!t.getRecordMatcher(ee)}function b(ee,me){if(me=Et({},me||l.value),typeof ee=="string"){const N=Mg(n,ee,me.path),K=t.resolve({path:N.path},me),de=s.createHref(N.fullPath);return Et(N,K,{params:f(K.params),hash:rd(N.hash),redirectedFrom:void 0,href:de})}let ne;if(ee.path!=null)ne=Et({},ee,{path:Mg(n,ee.path,me.path).path});else{const N=Et({},ee.params);for(const K in N)N[K]==null&&delete N[K];ne=Et({},ee,{params:d(N)}),me.params=d(me.params)}const U=t.resolve(ne,me),Fe=ee.hash||"";U.params=c(f(U.params));const at=MK(r,Et({},ee,{hash:TK(Fe),path:U.path})),F=s.createHref(at);return Et({fullPath:at,hash:Fe,query:r===xk?u9(ee.query):ee.query||{}},U,{redirectedFrom:void 0,href:F})}function w(ee){return typeof ee=="string"?Mg(n,ee,l.value.path):Et({},ee)}function S(ee,me){if(u!==ee)return hu(8,{from:me,to:ee})}function C(ee){return T(ee)}function _(ee){return C(Et(w(ee),{replace:!0}))}function R(ee){const me=ee.matched[ee.matched.length-1];if(me&&me.redirect){const{redirect:ne}=me;let U=typeof ne=="function"?ne(ee):ne;return typeof U=="string"&&(U=U.includes("?")||U.includes("#")?U=w(U):{path:U},U.params={}),Et({query:ee.query,hash:ee.hash,params:U.path!=null?{}:ee.params},U)}}function T(ee,me){const ne=u=b(ee),U=l.value,Fe=ee.state,at=ee.force,F=ee.replace===!0,N=R(ne);if(N)return T(Et(w(N),{state:typeof N=="object"?Et({},Fe,N.state):Fe,force:at,replace:F}),me||ne);const K=ne;K.redirectedFrom=me;let de;return!at&&DK(r,U,ne)&&(de=hu(16,{to:K,from:U}),te(U,U,!0,!1)),(de?Promise.resolve(de):P(K,U)).catch(le=>vi(le)?vi(le,2)?le:G(le):q(le,K,U)).then(le=>{if(le){if(vi(le,2))return T(Et({replace:F},w(le.to),{state:typeof le.to=="object"?Et({},Fe,le.to.state):Fe,force:at}),me||K)}else le=O(K,U,!0,F,Fe);return M(K,U,le),le})}function x(ee,me){const ne=S(ee,me);return ne?Promise.reject(ne):Promise.resolve()}function E(ee){const me=pe.values().next().value;return me&&typeof me.runWithContext=="function"?me.runWithContext(ee):ee()}function P(ee,me){let ne;const[U,Fe,at]=b9(ee,me);ne=Dg(U.reverse(),"beforeRouteLeave",ee,me);for(const N of U)N.leaveGuards.forEach(K=>{ne.push(oo(K,ee,me))});const F=x.bind(null,ee,me);return ne.push(F),oe(ne).then(()=>{ne=[];for(const N of i.list())ne.push(oo(N,ee,me));return ne.push(F),oe(ne)}).then(()=>{ne=Dg(Fe,"beforeRouteUpdate",ee,me);for(const N of Fe)N.updateGuards.forEach(K=>{ne.push(oo(K,ee,me))});return ne.push(F),oe(ne)}).then(()=>{ne=[];for(const N of at)if(N.beforeEnter)if(Cs(N.beforeEnter))for(const K of N.beforeEnter)ne.push(oo(K,ee,me));else ne.push(oo(N.beforeEnter,ee,me));return ne.push(F),oe(ne)}).then(()=>(ee.matched.forEach(N=>N.enterCallbacks={}),ne=Dg(at,"beforeRouteEnter",ee,me,E),ne.push(F),oe(ne))).then(()=>{ne=[];for(const N of o.list())ne.push(oo(N,ee,me));return ne.push(F),oe(ne)}).catch(N=>vi(N,8)?N:Promise.reject(N))}function M(ee,me,ne){a.list().forEach(U=>E(()=>U(ee,me,ne)))}function O(ee,me,ne,U,Fe){const at=S(ee,me);if(at)return at;const F=me===Gi,N=gl?history.state:{};ne&&(U||F?s.replace(ee.fullPath,Et({scroll:F&&N&&N.scroll},Fe)):s.push(ee.fullPath,Fe)),l.value=ee,te(ee,me,ne,F),G()}let A;function D(){A||(A=s.listen((ee,me,ne)=>{if(!ae.listening)return;const U=b(ee),Fe=R(U);if(Fe){T(Et(Fe,{replace:!0,force:!0}),U).catch(Cc);return}u=U;const at=l.value;gl&&HK(mk(at.fullPath,ne.delta),Em()),P(U,at).catch(F=>vi(F,12)?F:vi(F,2)?(T(Et(w(F.to),{force:!0}),U).then(N=>{vi(N,20)&&!ne.delta&&ne.type===sd.pop&&s.go(-1,!1)}).catch(Cc),Promise.reject()):(ne.delta&&s.go(-ne.delta,!1),q(F,U,at))).then(F=>{F=F||O(U,at,!1),F&&(ne.delta&&!vi(F,8)?s.go(-ne.delta,!1):ne.type===sd.pop&&vi(F,20)&&s.go(-1,!1)),M(U,at,F)}).catch(Cc)}))}let H=Yu(),z=Yu(),Y;function q(ee,me,ne){G(ee);const U=z.list();return U.length?U.forEach(Fe=>Fe(ee,me,ne)):console.error(ee),Promise.reject(ee)}function V(){return Y&&l.value!==Gi?Promise.resolve():new Promise((ee,me)=>{H.add([ee,me])})}function G(ee){return Y||(Y=!ee,D(),H.list().forEach(([me,ne])=>ee?ne(ee):me()),H.reset()),ee}function te(ee,me,ne,U){const{scrollBehavior:Fe}=e;if(!gl||!Fe)return Promise.resolve();const at=!ne&&zK(mk(ee.fullPath,0))||(U||!ne)&&history.state&&history.state.scroll||null;return At().then(()=>Fe(ee,me,at)).then(F=>F&&UK(F)).catch(F=>q(F,ee,me))}const W=ee=>s.go(ee);let J;const pe=new Set,ae={currentRoute:l,listening:!0,addRoute:p,removeRoute:g,clearRoutes:t.clearRoutes,hasRoute:y,getRoutes:m,resolve:b,options:e,push:C,replace:_,go:W,back:()=>W(-1),forward:()=>W(1),beforeEach:i.add,beforeResolve:o.add,afterEach:a.add,onError:z.add,isReady:V,install(ee){const me=this;ee.component("RouterLink",h9),ee.component("RouterView",v9),ee.config.globalProperties.$router=me,Object.defineProperty(ee.config.globalProperties,"$route",{enumerable:!0,get:()=>Q(l)}),gl&&!J&&l.value===Gi&&(J=!0,C(s.location).catch(Fe=>{}));const ne={};for(const Fe in Gi)Object.defineProperty(ne,Fe,{get:()=>l.value[Fe],enumerable:!0});ee.provide(Cm,me),ee.provide(Gw,Ap(ne)),ee.provide(jy,l);const U=ee.unmount;pe.add(ee),ee.unmount=function(){pe.delete(ee),pe.size<1&&(u=Gi,A&&A(),A=null,l.value=Gi,J=!1,Y=!1),U()}}};function oe(ee){return ee.reduce((me,ne)=>me.then(()=>E(ne)),Promise.resolve())}return ae}function b9(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=>fu(u,a))?r.push(a):n.push(a));const l=e.matched[o];l&&(t.matched.find(u=>fu(u,l))||s.push(l))}return[n,r,s]}function qo(){return Ke(Cm)}function PO(e){return Ke(Gw)}const w9={class:"text-center"},S9={class:"float-end"},_9=De({__name:"PrintJobsMenu",setup(e){const t=nr(),n=B(""),r=B(!1),s=I(()=>t.printersWithJob.filter(a=>{var p,g,m,y;const l=(g=(p=a.job)==null?void 0:p.job)==null?void 0:g.file.name,u=(l==null?void 0:l.toLowerCase())||"",c=((m=a.printer.printerURL)==null?void 0:m.toLowerCase())||"",d=((y=a.printer.name)==null?void 0:y.toLowerCase())||"",f=`${u} ${c} ${d}`;return!n.value||f.includes(n.value.toLowerCase())})),i=I(()=>s.value.length||0);function o(a){return a?a==null?void 0:a.toFixed(0):""}return xe(r,()=>{n.value=""}),(a,l)=>(L(),ye("div",w9,[h(Wd,{modelValue:Q(r),"onUpdate:modelValue":l[3]||(l[3]=u=>Xe(r)?r.value=u:null),"close-on-content-click":!1,"nudge-width":400,location:"bottom right","offset-x":"","offset-y":"",transition:"slide-x-transition"},{activator:v(({props:u})=>[h(re,ve({color:Q(i)?"green":"secondary",dark:""},u),{default:v(()=>[$("span",null," Print jobs "+ie(Q(i)?`(${Q(i)})`:""),1),h(X,{end:""},{default:v(()=>l[4]||(l[4]=[k(" work ")])),_:1})]),_:2},1040,["color"])]),default:v(()=>[h(bt,{class:"d-flex flex-column","min-width":"300"},{default:v(()=>[h(Ft,{style:{"overflow-y":"hidden","flex-shrink":"0"}},{default:v(()=>[h(Le,null,{prepend:v(()=>[h(lt,{class:"font-weight-bold",color:"primary",size:"44"},{default:v(()=>[k(ie(Q(i)),1)]),_:1})]),default:v(()=>[h(ut,null,{default:v(()=>[l[7]||(l[7]=k(" Print Jobs ")),$("span",S9,[h(re,{variant:"tonal",onClick:l[0]||(l[0]=u=>r.value=!1)},{default:v(()=>[h(X,null,{default:v(()=>l[5]||(l[5]=[k("close")])),_:1}),l[6]||(l[6]=k("Close "))]),_:1})])]),_:1}),h(cu,{class:"mt-2"},{default:v(()=>[h(ct,{modelValue:Q(n),"onUpdate:modelValue":l[1]||(l[1]=u=>Xe(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(fn),h(Ft,{style:{"overflow-y":"auto","flex-shrink":"1"}},{default:v(()=>[Q(i)?he("",!0):(L(),Z(Le,{key:0},{default:v(()=>l[8]||(l[8]=[k(" No active prints ")])),_:1})),(L(!0),ye(Ce,null,qt(Q(s),({printer:u,job:c})=>(L(),Z(Le,{key:u.id,lines:"two"},{prepend:v(()=>[h(lt,{size:"70"},{default:v(()=>{var d;return[h(Od,{"model-value":(d=c==null?void 0:c.progress)==null?void 0:d.completion,width:5,color:"green",size:"50"},{default:v(()=>{var f;return[k(ie(o((f=c.progress)==null?void 0:f.completion)+"%"||""),1)]}),_:2},1032,["model-value"])]}),_:2},1024)]),default:v(()=>[h(ut,null,{default:v(()=>{var d,f;return[k(ie((f=(d=c.job)==null?void 0:d.file)==null?void 0:f.name),1)]}),_:2},1024),h(vt,null,{default:v(()=>[k(" Elapsed: "+ie(Math.round((c==null?void 0:c.progress.printTime)??0/60))+" minutes ",1),l[9]||(l[9]=$("br",null,null,-1)),k(" Printer: "+ie(u.name),1)]),_:2},1024)]),_:2},1024))),128))]),_:1}),h(Dn,null,{default:v(()=>[h(vn),h(re,{onClick:l[2]||(l[2]=u=>r.value=!1)},{default:v(()=>l[10]||(l[10]=[k(" Close ")])),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])]))}}),Kw=Ts("profile",{state:()=>({username:null,isDemoUser:null,userId:null}),actions:{async getProfile(){return await Zr.getProfile().then(e=>{this.username=e.username,this.userId=e.id,this.isDemoUser=e.isDemoUser})}}}),zt={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 k9(e,t){return e.push({name:t})}async function IO(e){if(e.currentRoute.value.path==="/login"){console.log("routeToLogin: already at login page");return}return k9(e,zt.Login)}const Ik=!0,x9=()=>Object.freeze({apiKeyLength:43,maxPort:65535,maxPrinterNameLength:25,maxPrinterGroupNameLength:30,maxPrinterGroupLocationX:4,maxPrinterGroupLocationY:4,minPrinterFloorNameLength:3,minUsernameLength:3}),ai=Object.create(null);ai.open="0";ai.close="1";ai.ping="2";ai.pong="3";ai.message="4";ai.upgrade="5";ai.noop="6";const ph=Object.create(null);Object.keys(ai).forEach(e=>{ph[ai[e]]=e});const qy={type:"error",data:"parser error"},AO=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",OO=typeof ArrayBuffer=="function",MO=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Yw=({type:e,data:t},n,r)=>AO&&t instanceof Blob?n?r(t):Ak(t,r):OO&&(t instanceof ArrayBuffer||MO(t))?n?r(t):Ak(new Blob([t]),r):r(ai[e]+(t||"")),Ak=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Ok(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let $g;function E9(e,t){if(AO&&e.data instanceof Blob)return e.data.arrayBuffer().then(Ok).then(t);if(OO&&(e.data instanceof ArrayBuffer||MO(e.data)))return t(Ok(e.data));Yw(e,!1,n=>{$g||($g=new TextEncoder),t($g.encode(n))})}const Mk="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ac=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<Mk.length;e++)ac[Mk.charCodeAt(e)]=e;const C9=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=ac[e.charCodeAt(r)],o=ac[e.charCodeAt(r+1)],a=ac[e.charCodeAt(r+2)],l=ac[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},T9=typeof ArrayBuffer=="function",Xw=(e,t)=>{if(typeof e!="string")return{type:"message",data:DO(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:R9(e.substring(1),t)}:ph[n]?e.length>1?{type:ph[n],data:e.substring(1)}:{type:ph[n]}:qy},R9=(e,t)=>{if(T9){const n=C9(e);return DO(n,t)}else return{base64:!0,data:e}},DO=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},$O="",P9=(e,t)=>{const n=e.length,r=new Array(n);let s=0;e.forEach((i,o)=>{Yw(i,!1,a=>{r[o]=a,++s===n&&t(r.join($O))})})},I9=(e,t)=>{const n=e.split($O),r=[];for(let s=0;s<n.length;s++){const i=Xw(n[s],t);if(r.push(i),i.type==="error")break}return r};function A9(){return new TransformStream({transform(e,t){E9(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 Lg;function Cf(e){return e.reduce((t,n)=>t+n.length,0)}function Tf(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 O9(e,t){Lg||(Lg=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(Cf(n)<1)break;const l=Tf(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(Cf(n)<2)break;const l=Tf(n,2);s=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(Cf(n)<8)break;const l=Tf(n,8),u=new DataView(l.buffer,l.byteOffset,l.length),c=u.getUint32(0);if(c>Math.pow(2,21)-1){a.enqueue(qy);break}s=c*Math.pow(2,32)+u.getUint32(4),r=3}else{if(Cf(n)<s)break;const l=Tf(n,s);a.enqueue(Xw(i?l:Lg.decode(l),t)),r=0}if(s===0||s>e){a.enqueue(qy);break}}}})}const LO=4;function gn(e){if(e)return M9(e)}function M9(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 Tm=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),ns=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),D9="arraybuffer";function FO(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const $9=ns.setTimeout,L9=ns.clearTimeout;function Rm(e,t){t.useNativeTimers?(e.setTimeoutFn=$9.bind(ns),e.clearTimeoutFn=L9.bind(ns)):(e.setTimeoutFn=ns.setTimeout.bind(ns),e.clearTimeoutFn=ns.clearTimeout.bind(ns))}const F9=1.33;function N9(e){return typeof e=="string"?V9(e):Math.ceil((e.byteLength||e.size)*F9)}function V9(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 NO(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function B9(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function U9(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 H9 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Qw extends gn{constructor(t){super(),this.writable=!1,Rm(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 H9(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=Xw(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=B9(t);return n.length?"?"+n:""}}class z9 extends Qw{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)};I9(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,P9(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]=NO()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let VO=!1;try{VO=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const j9=VO;function q9(){}class W9 extends z9{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 Ml=class mh extends gn{constructor(t,n,r){super(),this.createRequest=t,Rm(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=FO(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=mh.requestsCount++,mh.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=q9,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete mh.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()}};Ml.requestsCount=0;Ml.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Dk);else if(typeof addEventListener=="function"){const e="onpagehide"in ns?"pagehide":"unload";addEventListener(e,Dk,!1)}}function Dk(){for(let e in Ml.requests)Ml.requests.hasOwnProperty(e)&&Ml.requests[e].abort()}const G9=function(){const e=BO({xdomain:!1});return e&&e.responseType!==null}();class K9 extends W9{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=G9&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Ml(BO,this.uri(),t)}}function BO(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||j9))return new XMLHttpRequest}catch{}if(!t)try{return new ns[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const UO=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Y9 extends Qw{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=UO?{}:FO(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;Yw(r,this.supportsBinary,i=>{try{this.doWrite(r,i)}catch{}s&&Tm(()=>{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]=NO()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Fg=ns.WebSocket||ns.MozWebSocket;class X9 extends Y9{createSocket(t,n,r){return UO?new Fg(t,n,r):n?new Fg(t,n):new Fg(t)}doWrite(t,n){this.ws.send(n)}}class Q9 extends Qw{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=O9(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),s=A9();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&&Tm(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const J9={websocket:X9,webtransport:Q9,polling:K9},Z9=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,eY=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Wy(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=Z9.exec(e||""),i={},o=14;for(;o--;)i[eY[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=tY(i,i.path),i.queryKey=nY(i,i.query),i}function tY(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 nY(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,i){s&&(n[s]=i)}),n}const Gy=typeof addEventListener=="function"&&typeof removeEventListener=="function",gh=[];Gy&&addEventListener("offline",()=>{gh.forEach(e=>e())},!1);class Eo extends gn{constructor(t,n){if(super(),this.binaryType=D9,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=Wy(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=Wy(n.host).host);Rm(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=U9(this.opts.query)),Gy&&(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"})},gh.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=LO,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+=N9(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,Tm(()=>{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(),Gy&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=gh.indexOf(this._offlineEventListener);r!==-1&&gh.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Eo.protocol=LO;class rY 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 sY=class extends rY{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=>J9[s]).filter(s=>!!s)),super(t,r)}};function iY(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=Wy(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 oY=typeof ArrayBuffer=="function",aY=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,HO=Object.prototype.toString,lY=typeof Blob=="function"||typeof Blob<"u"&&HO.call(Blob)==="[object BlobConstructor]",uY=typeof File=="function"||typeof File<"u"&&HO.call(File)==="[object FileConstructor]";function Jw(e){return oY&&(e instanceof ArrayBuffer||aY(e))||lY&&e instanceof Blob||uY&&e instanceof File}function vh(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(vh(e[n]))return!0;return!1}if(Jw(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return vh(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&vh(e[n]))return!0;return!1}function cY(e){const t=[],n=e.data,r=e;return r.data=Ky(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Ky(e,t){if(!e)return e;if(Jw(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]=Ky(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]=Ky(e[r],t));return n}return e}function dY(e,t){return e.data=Yy(e.data,t),delete e.attachments,e}function Yy(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]=Yy(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Yy(e[n],t));return e}const fY=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],hY=5;var ht;(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"})(ht||(ht={}));class pY{constructor(t){this.replacer=t}encode(t){return(t.type===ht.EVENT||t.type===ht.ACK)&&vh(t)?this.encodeAsBinary({type:t.type===ht.EVENT?ht.BINARY_EVENT:ht.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===ht.BINARY_EVENT||t.type===ht.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=cY(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}function $k(e){return Object.prototype.toString.call(e)==="[object Object]"}class Zw 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===ht.BINARY_EVENT;r||n.type===ht.BINARY_ACK?(n.type=r?ht.EVENT:ht.ACK,this.reconstructor=new mY(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Jw(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(ht[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===ht.BINARY_EVENT||r.type===ht.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(Zw.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 ht.CONNECT:return $k(n);case ht.DISCONNECT:return n===void 0;case ht.CONNECT_ERROR:return typeof n=="string"||$k(n);case ht.EVENT:case ht.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&fY.indexOf(n[0])===-1);case ht.ACK:case ht.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class mY{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=dY(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const gY=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Zw,Encoder:pY,get PacketType(){return ht},protocol:hY},Symbol.toStringTag,{value:"Module"}));function ys(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const vY=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class zO 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=[ys(t,"open",this.onopen.bind(this)),ys(t,"packet",this.onpacket.bind(this)),ys(t,"error",this.onerror.bind(this)),ys(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(vY.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:ht.EVENT,data:n};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const c=this.ids++,d=n.pop();this._registerAckCallback(c,d),o.id=c}const a=(s=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||s===void 0?void 0:s.writable,l=this.connected&&!(!((i=this.io.engine)===null||i===void 0)&&i._hasPingExpired());return this.flags.volatile&&!a||(l?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(t,n){var r;const s=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(s===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&this.sendBuffer.splice(a,1);n.call(this,new Error("operation has timed out"))},s),o=(...a)=>{this.io.clearTimeoutFn(i),n.apply(this,a)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...n){return new Promise((r,s)=>{const i=(o,a)=>o?s(o):r(a);i.withError=!0,n.push(i),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((s,...i)=>r!==this._queue[0]?void 0:(s!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(s)):(this._queue.shift(),n&&n(null,...i)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:ht.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 ht.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 ht.EVENT:case ht.BINARY_EVENT:this.onevent(t);break;case ht.ACK:case ht.BINARY_ACK:this.onack(t);break;case ht.DISCONNECT:this.ondisconnect();break;case ht.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:ht.ACK,id:t,data:s}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:ht.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 Lu(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}Lu.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};Lu.prototype.reset=function(){this.attempts=0};Lu.prototype.setMin=function(e){this.ms=e};Lu.prototype.setMax=function(e){this.max=e};Lu.prototype.setJitter=function(e){this.jitter=e};class Xy 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,Rm(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 Lu({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||gY;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 sY(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const s=ys(n,"open",function(){r.onopen(),t&&t()}),i=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},o=ys(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(ys(t,"ping",this.onping.bind(this)),ys(t,"data",this.ondata.bind(this)),ys(t,"error",this.onerror.bind(this)),ys(t,"close",this.onclose.bind(this)),ys(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){Tm(()=>{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 zO(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 Xu={};function yh(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=iY(e,t.path||"/socket.io"),r=n.source,s=n.id,i=n.path,o=Xu[s]&&i in Xu[s].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return a?l=new Xy(r,t):(Xu[s]||(Xu[s]=new Xy(r,t)),l=Xu[s]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(yh,{Manager:Xy,Socket:zO,io:yh,connect:yh});let Xt=null;const kr=mn({connected:!1,setup:!1,id:""});function yY(e,t){if(kr.setup)throw new Error("Socket already set up");kr.setup=!1,Xt=yh(e,{auth:t!=null&&t.length?{token:t}:void 0}),kr.setup=!0,Xt.on("connect",()=>{kr.id=Xt.id||"",kr.connected=!0}),Xt.on("disconnect",()=>{kr.id="",kr.connected=!1})}function bY(){kr.connected=!1,Xt==null||Xt.close(),Xt==null||Xt.open()}function wY(){Xt&&Xt.close(),Xt=null,kr.setup=!1,kr.connected=!1,kr.id=""}function SY(){if(!Xt)return console.warn("Socket not set-up"),{setup:!1};const e={setup:!0,active:Xt.active,connected:Xt.connected,id:Xt.id,recovered:Xt.recovered};return console.warn(e),e}const _Y=ce({scrollTarget:{type:String},scrollThreshold:{type:[String,Number],default:300}},"scroll");function kY(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{canScroll:n}=t;let r=0,s=0;const i=B(null),o=Oe(0),a=Oe(0),l=Oe(0),u=Oe(!1),c=Oe(!1),d=I(()=>Number(e.scrollThreshold)),f=I(()=>Tr((d.value-o.value)/d.value||0)),p=()=>{const g=i.value;if(!g||n&&!n.value)return;r=o.value,o.value="window"in g?g.pageYOffset:g.scrollTop;const m=g instanceof Window?document.documentElement.scrollHeight:g.scrollHeight;if(s!==m){s=m;return}c.value=o.value<r,l.value=Math.abs(o.value-d.value)};return xe(c,()=>{a.value=a.value||o.value}),xe(u,()=>{a.value=0}),St(()=>{xe(()=>e.scrollTarget,g=>{var y;const m=g?document.querySelector(g):window;m&&m!==i.value&&((y=i.value)==null||y.removeEventListener("scroll",p),i.value=m,i.value.addEventListener("scroll",p,{passive:!0}))},{immediate:!0})}),Pn(()=>{var g;(g=i.value)==null||g.removeEventListener("scroll",p)}),n&&xe(n,p,{immediate:!0}),{scrollThreshold:d,currentScroll:o,currentThreshold:l,isScrollActive:u,scrollRatio:f,isScrollingUp:c,savedScroll:a}}const xY=ce({scrollBehavior:String,modelValue:{type:Boolean,default:!0},location:{type:String,default:"top",validator:e=>["top","bottom"].includes(e)},...gO(),...AA(),..._Y(),height:{type:[Number,String],default:64}},"VAppBar"),jO=ke()({name:"VAppBar",props:xY(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=B(),s=rt(e,"modelValue"),i=I(()=>{var S;const w=new Set(((S=e.scrollBehavior)==null?void 0:S.split(" "))??[]);return{hide:w.has("hide"),fullyHide:w.has("fully-hide"),inverted:w.has("inverted"),collapse:w.has("collapse"),elevate:w.has("elevate"),fadeImage:w.has("fade-image")}}),o=I(()=>{const w=i.value;return w.hide||w.fullyHide||w.inverted||w.collapse||w.elevate||w.fadeImage||!s.value}),{currentScroll:a,scrollThreshold:l,isScrollingUp:u,scrollRatio:c}=kY(e,{canScroll:o}),d=I(()=>i.value.hide||i.value.fullyHide),f=I(()=>e.collapse||i.value.collapse&&(i.value.inverted?c.value>0:c.value===0)),p=I(()=>e.flat||i.value.fullyHide&&!s.value||i.value.elevate&&(i.value.inverted?a.value>0:a.value===0)),g=I(()=>i.value.fadeImage?i.value.inverted?1-c.value:c.value:void 0),m=I(()=>{var C,_;if(i.value.hide&&i.value.inverted)return 0;const w=((C=r.value)==null?void 0:C.contentHeight)??0,S=((_=r.value)==null?void 0:_.extensionHeight)??0;return d.value?a.value<l.value||i.value.fullyHide?w+S:w:w+S});qr(I(()=>!!e.scrollBehavior),()=>{Un(()=>{d.value?i.value.inverted?s.value=a.value>l.value:s.value=u.value||a.value<l.value:s.value=!0})});const{ssrBootStyles:y}=qd(),{layoutItemStyles:b}=MA({id:e.name,order:I(()=>parseInt(e.order,10)),position:Te(e,"location"),layoutSize:m,elementSize:Oe(void 0),active:s,absolute:Te(e,"absolute")});return Pe(()=>{const w=mr.filterProps(e);return h(mr,ve({ref:r,class:["v-app-bar",{"v-app-bar--bottom":e.location==="bottom"},e.class],style:[{...b.value,"--v-toolbar-image-opacity":g.value,height:void 0,...y.value},e.style]},w,{collapse:f.value,flat:p.value}),n)}),{}}}),EY=ce({...jT({icon:"$menu",variant:"text"})},"VAppBarNavIcon"),CY=ke()({name:"VAppBarNavIcon",props:EY(),setup(e,t){let{slots:n}=t;return Pe(()=>h(re,ve(e,{class:["v-app-bar-nav-icon"]}),n)),{}}}),TY={key:1,class:"text-uppercase text--white"},RY={key:3,class:"ml-2"},PY={key:4,class:"ml-2"},IY=De({__name:"TopBar",setup(e){const t=Kw(),n=as(),r=qo(),s=[{title:"Open Profile",icon:"person",path:"/settings/account"}],i=B(Date.now());tF(()=>{i.value=Date.now()},1e3);const o=I(()=>{var d;if(!((d=n.tokenClaims)!=null&&d.exp))return"";const c=n.tokenClaims.exp-i.value/1e3;return`${Math.round(c)}s`}),a=I(()=>t.username),l=I(()=>n.isDemoMode);async function u(){await n.logout(!0),await IO(r)}return(c,d)=>{const f=gK,p=mK;return L(),Z(jO,{elevation:"0"},{default:v(()=>[h(Rn,{class:"text-uppercase text-white"},{default:v(()=>d[1]||(d[1]=[$("span",{class:"font-weight-light"}," FDM ",-1),$("strong",null," Monster ",-1)])),_:1}),l.value?(L(),Z(vn,{key:0})):he("",!0),l.value?(L(),ye("h2",TY," DEMO MODE ")):he("",!0),h(vn),h(_9),Q(n).hasAuthToken&&!Q(n).isLoginExpired?(L(),Z(Wd,{key:2,"close-on-content-click":!1,location:"bottom right","open-on-hover":"",transition:"slide-y-transition"},{activator:v(({props:g})=>[h(re,ve({class:"ml-2",color:"secondary",theme:"dark"},g),{default:v(()=>[h(X,{class:"mr-2"},{default:v(()=>d[2]||(d[2]=[k("person")])),_:1}),k(" "+ie(a.value),1)]),_:2},1040)]),default:v(()=>[h(Ft,null,{default:v(()=>[(L(),ye(Ce,null,qt(s,(g,m)=>h(Le,{key:m,to:g.path,title:g.title,"prepend-avatar":g.icon,link:""},null,8,["to","title","prepend-avatar"])),64))]),_:1})]),_:1})):he("",!0),Q(Ik)&&o.value?(L(),ye("span",RY," AuthExp "+ie(o.value),1)):he("",!0),Q(Ik)?(L(),ye("span",PY,[$("small",null," S"+ie(Q(kr).setup?1:0)+" C"+ie(Q(kr).connected?1:0)+" "+ie(Q(kr).id),1)])):he("",!0),Q(n).loginRequired===!0?(L(),Z(f,{key:5,tooltip:"Go back to login",text:"Logout",color:"secondary",icon:"logout",onClick:d[0]||(d[0]=g=>u())})):he("",!0),Q(n).loginRequired===!0?(L(),Z(re,{key:6,class:"ml-2"},{default:v(()=>[h(X,{class:"mr-2"},{default:v(()=>d[3]||(d[3]=[k("logout")])),_:1}),d[4]||(d[4]=k(" Logout "))]),_:1})):he("",!0),h(p)]),_:1})}}}),qO="/assets/logo-CJVdjy51.png",AY=De({__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)=>(L(),Z(Ow,{permanent:"",rail:""},{default:v(()=>[h(CY,{class:"ml-1 mt-2"},{default:v(()=>[h(hi,{alt:"FDM Monster Logo",src:Q(qO),class:"shrink mr-1 pt-3 ml-1",transition:"scale-transition",width:"40"},null,8,["src"])]),_:1}),h(fn),h(Ft,{density:"compact",nav:""},{default:v(()=>[(L(),ye(Ce,null,qt(t,([s,i,o],a)=>h(Le,{key:a,to:o,"prepend-icon":s,title:i,density:"comfortable","router-link":""},null,8,["to","prepend-icon","title"])),64))]),_:1})]),_:1}))}});function OY(e){const t=Oe(e());let n=-1;function r(){clearInterval(n)}function s(){r(),At(()=>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 yn(r),{clear:r,time:t,start:i,reset:s}}const MY=ce({multiLine:Boolean,text:String,timer:[Boolean,String],timeout:{type:[Number,String],default:5e3},vertical:Boolean,...Uo({location:"bottom"}),...wu(),...$n(),...As(),...Mt(),...Rs(Dd({transition:"v-snackbar-transition"}),["persistent","noClickAnimation","scrim","scrollStrategy"])},"VSnackbar"),eS=ke()({name:"VSnackbar",props:MY(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=rt(e,"modelValue"),{positionClasses:s}=Su(e),{scopeId:i}=ku(),{themeClasses:o}=Kt(e),{colorClasses:a,colorStyles:l,variantClasses:u}=Wa(e),{roundedClasses:c}=Hn(e),d=OY(()=>Number(e.timeout)),f=B(),p=B(),g=Oe(!1),m=Oe(0),y=B(),b=Ke(ed,void 0);qr(()=>!!b,()=>{const M=OA();Un(()=>{y.value=M.mainStyles.value})}),xe(r,S),xe(()=>e.timeout,S),St(()=>{r.value&&S()});let w=-1;function S(){d.reset(),window.clearTimeout(w);const M=Number(e.timeout);if(!r.value||M===-1)return;const O=Mb(p.value);d.start(O),w=window.setTimeout(()=>{r.value=!1},M)}function C(){d.reset(),window.clearTimeout(w)}function _(){g.value=!0,C()}function R(){g.value=!1,S()}function T(M){m.value=M.touches[0].clientY}function x(M){Math.abs(m.value-M.changedTouches[0].clientY)>50&&(r.value=!1)}function E(){g.value&&R()}const P=I(()=>e.location.split(" ").reduce((M,O)=>(M[`v-snackbar--${O}`]=!0,M),{}));return Pe(()=>{const M=Di.filterProps(e),O=!!(n.default||n.text||e.text);return h(Di,ve({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},P.value,s.value,e.class],style:[y.value,e.style]},M,{modelValue:r.value,"onUpdate:modelValue":A=>r.value=A,contentProps:ve({class:["v-snackbar__wrapper",o.value,a.value,c.value,u.value],style:[l.value],onPointerenter:_,onPointerleave:R},M.contentProps),persistent:!0,noClickAnimation:!0,scrim:!1,scrollStrategy:"none",_disableGlobalStack:!0,onTouchstartPassive:T,onTouchend:x,onAfterLeave:E},i),{default:()=>{var A,D;return[Bo(!1,"v-snackbar"),e.timer&&!g.value&&h("div",{key:"timer",class:"v-snackbar__timer"},[h(eu,{ref:p,color:typeof e.timer=="string"?e.timer:"info",max:e.timeout,"model-value":d.time.value},null)]),O&&h("div",{key:"content",class:"v-snackbar__content",role:"status","aria-live":"polite"},[((A=n.text)==null?void 0:A.call(n))??e.text,(D=n.default)==null?void 0:D.call(n)]),n.actions&&h(It,{defaults:{VBtn:{variant:"text",ripple:!1,slim:!0}}},{default:()=>[h("div",{class:"v-snackbar__actions"},[n.actions({isActive:r})])]})]},activator:n.activator})}),zi({},f)}}),DY={style:{width:"100%"}},$Y={class:"font-weight-bold text-button"},LY=De({__name:"AppProgressSnackbar",setup(e){const t=Ot(),n=B(!1),r=B(""),s=B([]),i=B(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 St(()=>{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,g=o(c);if(g)Math.min(100,d)>=g.value&&(g.expiresAt=Date.now()+1500,g.value=d,g.completed=p);else{if(d>=100)return;a(c,f,d,!1,Date.now()+1500)}r.value="Uploading files"})}),(u,c)=>(L(),Z(eS,{modelValue:n.value,"onUpdate:modelValue":c[1]||(c[1]=d=>n.value=d),timeout:i.value,absolute:"",location:"bottom right",class:"ma-3 elevation-24","min-width":"450px","multi-line":"",rounded:"pill",style:{"z-index":"1000"}},{default:v(()=>[h(ot,null,{default:v(()=>[h(He,{cols:"2"},{default:v(()=>[h(re,{icon:"file_upload",size:"large"})]),_:1}),h(He,{class:"d-flex align-center flex-row",cols:"8"},{default:v(()=>[$("div",DY,[$("span",$Y,ie(r.value),1),(L(!0),ye(Ce,null,qt(s.value,(d,f)=>(L(),ye("div",{key:f,class:"mb-2"},[d.completed?(L(),Z(X,{key:0},{default:v(()=>c[2]||(c[2]=[k("check")])),_:1})):d.timeoutAt?(L(),Z(X,{key:1},{default:v(()=>c[3]||(c[3]=[k("pause")])),_:1})):(L(),Z(X,{key:2},{default:v(()=>c[4]||(c[4]=[k("hourglass_bottom")])),_:1})),k(" "+ie(d.title)+" "+ie((d.completed?100:d.value).toFixed(1))+"% ",1),c[5]||(c[5]=$("br",null,null,-1)),(L(),Z(eu,{key:d.key,"model-value":d.completed?100:d.value,color:d.timeoutAt?"red":"success"},null,8,["model-value","color"]))]))),128))])]),_:1}),h(He,{cols:"1"},{default:v(()=>[h(re,{icon:"close",size:"large",onClick:c[0]||(c[0]=d=>n.value=!1)})]),_:1})]),_:1})]),_:1},8,["modelValue","timeout"]))}}),FY={class:"font-weight-bold text-button"},NY={key:0},VY=De({__name:"AppErrorSnackbar",setup(e){const t=Ot(),n=B(-1),r=B(!1),s=B(""),i=B("");return St(()=>{t.onErrorMessage(o=>{s.value=o.title,i.value=o.subtitle??"",r.value=!0,n.value=o.timeout??1e4})}),(o,a)=>(L(),Z(eS,{modelValue:r.value,"onUpdate:modelValue":a[1]||(a[1]=l=>r.value=l),timeout:n.value,absolute:"",location:"bottom",class:"ml-16 mb-16 ma-3 elevation-24",color:"error-darken-1",rounded:"pill","multi-line":"",style:{"z-index":"1000"},width:"450"},{default:v(()=>[h(ot,null,{default:v(()=>[h(He,{cols:"2"},{default:v(()=>[h(re,{icon:"error"})]),_:1}),h(He,{class:"d-flex align-center flex-row",cols:"8"},{default:v(()=>{var l;return[$("div",null,[$("span",FY,ie(s.value),1),(l=i.value)!=null&&l.length?(L(),ye("div",NY,ie(i.value),1)):he("",!0)])]}),_:1}),h(He,{cols:"1"},{default:v(()=>[h(re,{icon:"close",onClick:a[0]||(a[0]=l=>r.value=!1)})]),_:1})]),_:1})]),_:1},8,["modelValue","timeout"]))}}),BY={class:"font-weight-bold text-button"},UY={key:0},HY=De({__name:"AppInfoSnackbar",setup(e){const t=Ot(),n=B(!1),r=B(""),s=B(""),i=B(2e3),o=B(!1);return St(()=>{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)=>(L(),Z(eS,{modelValue:n.value,"onUpdate:modelValue":l[1]||(l[1]=u=>n.value=u),absolute:"",location:"bottom",color:o.value?"warning darken-2":"success",class:"ma-3 elevation-24",rounded:"pill",timeout:i.value,style:{"z-index":"1000"},"multi-line":""},{default:v(()=>[h(ot,null,{default:v(()=>[h(He,{cols:"2"},{default:v(()=>[h(re,{icon:"info"})]),_:1}),h(He,{cols:"8",class:"d-flex align-center flex-row"},{default:v(()=>{var u;return[$("div",null,[$("span",BY,ie(r.value),1),(u=s.value)!=null&&u.length?(L(),ye("div",UY,ie(s.value),1)):he("",!0)])]}),_:1}),h(He,{cols:"2"},{default:v(()=>[h(re,{icon:"close",onClick:l[0]||(l[0]=u=>n.value=!1)})]),_:1})]),_:1})]),_:1},8,["modelValue","color","timeout"]))}}),tS=Ts("Uploads",{state:()=>({queuedUploads:[],failedUploads:[],uploadingNow:!1}),getters:{hasPendingUploads(e){var t;return((t=e.queuedUploads)==null?void 0:t.length)>0},isUploadingNow(e){return e.uploadingNow},nextUpload(e){return e.queuedUploads[0]}},actions:{queueUploads(e){this.failedUploads=[],this.queuedUploads.push(...e)},cancelUploads(){this.queuedUploads=[],this.failedUploads=[]},async handleNextUpload(){var r;const e=Ot();if(!((r=this.queuedUploads)!=null&&r.length))return;this.uploadingNow=!0;const{file:t,printer:n}=this.nextUpload;this.queuedUploads.splice(0,1);try{await xo.uploadFile(n,t)}catch(s){if(s.isAxiosError){const i={file:t,printer:n,error:s};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}}}),zY="/img/OIG.JYDC2RaWdz7g9.jpg",Wo=(e,t)=>{const n=e.__vccOpts||e;for(const[r,s]of t)n[r]=s;return n},jY=e=>Math.random()*e,qY={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:jY,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 WY(e,t,n,r,s,i){return n.loading?(L(),ye("div",{key:0,style:ii(i.getWrapperStyle())},[(L(),ye(Ce,null,qt(9,o=>$("div",{key:o,style:ii(i.getCircleStyle(i.random(100)))},null,4)),64))],4)):he("",!0)}const WO=Wo(qY,[["render",WY]]);function GO(e){const t=dt();t.getOptions().enabled=e,console.warn("Sentry enabled:",e)}const KO=e=>new Promise(t=>setTimeout(t,e));class GY{constructor(){ge(this,"printerStore",Lt());ge(this,"floorStore",qi());ge(this,"printerStateStore",nr());ge(this,"testPrinterStore",qw());ge(this,"snackbar",Ot())}socketState(){return SY()}async setupSocketConnection(){console.debug("Setting up socket.io client");const t=await jI(),n=as();n.loadTokens(),yY(t,n.loginRequired?n.token:void 0),Xt==null||Xt.on("legacy-update",r=>this.onMessage(JSON.parse(r))),Xt==null||Xt.on("test-printer-state",r=>{this.testPrinterStore.saveEvent(r),console.log(r)})}disconnect(){wY()}reconnect(){Xt&&(console.debug("Resetting socket.io client connection"),bY())}onMessage(t){var n,r,s,i;((n=t.trackedUploads.current)!=null&&n.length||(r=t.trackedUploads.failed)!=null&&r.length)&&(console.debug("[SocketIO] trackedUploads message received"),t.trackedUploads.current.forEach(o=>{var a;this.snackbar.openProgressMessage(o.correlationToken,o.multerFile.originalname,(((a=o.progress)==null?void 0:a.percent)||0)*100,!1)})),(s=t.floors)!=null&&s.length&&this.floorStore.saveFloors(t.floors),(i=t.printers)!=null&&i.length&&this.printerStore.setPrinters(t.printers),t.socketStates&&this.printerStateStore.setSocketStates(t.socketStates),t.printerEvents&&this.printerStateStore.setPrinterEvents(t.printerEvents)}}const KY={key:1,style:{margin:"50px"}},YY={class:"mt-2 mb-2"},XY={key:0,class:"mt-2 mb-2"},QY={key:1,class:"mt-2 mb-2"},JY={key:2,style:{animation:"fadeIn 0.75s"}},ZY=De({__name:"AppLoader",setup(e){const t=as(),n=Ds(),r=ji(),s=Kw(),i=B(!1),o=qo(),a=B(""),l=B(!0),u=B(),c=B(),d=B(),f=Ot(),p=new GY;function g(){window.location.reload()}function m(){navigator.clipboard.writeText(JSON.stringify(u.value)),f.openInfoMessage({title:"Copied",subtitle:"Error copied to clipboard"})}function y(T,x=""){T?(a.value=x,u.value=null,c.value=null,d.value=null):a.value="",i.value=T}async function b(){var T;try{await n.loadSettings(),await r.loadFeatures(),await s.getProfile();const x=(T=n.serverSettings)==null?void 0:T.sentryDiagnosticsEnabled;GO(!!x)}catch(x){console.log("Error when loading settings.",x),f.openErrorMessage({title:"Error",subtitle:"Error when loading settings, features and/or profile."}),si(x)}p.socketState().setup?p.reconnect():await p.setupSocketConnection(),y(!1)}return Ur("auth:permission-denied").on(async T=>{console.log("[AppLoader] Permission denied, going to permission denied page"),y(!0,"Permission denied"),await o.push({name:zt.PermissionDenied,query:{roles:T==null?void 0:T.roles,page:String(o.currentRoute.value.name),permissions:T==null?void 0:T.permissions,error:T==null?void 0:T.error,url:T==null?void 0:T.url}}),y(!1)}),Ur("auth:failure").on(async T=>{console.debug(`[AppLoader] Event received: 'auth:failure', going back to login, context: ${T}`),y(!0,"Authentication failed, going back to login"),o.currentRoute.value.name!==zt.Login&&await o.push({name:zt.Login}),y(!1)}),Ur("auth:login").on(async()=>{console.debug("[AppLoader] Event received: 'auth:login', loading app"),y(!0,"Loading app"),await b()}),Ur(`auth:${xr.AccountNotVerified}`).on(async()=>{console.debug(`[AppLoader] Event received: 'auth:${xr.AccountNotVerified}', going to login`),f.error("Account not verified, please ask an administrator to verify your account."),y(!0,"Account not verified, please ask an administrator to verify your account."),o.currentRoute.value.name!==zt.Login&&await o.push({name:zt.Login}),y(!1)}),Ur(`auth:${xr.PasswordChangeRequired}`).on(async()=>{console.debug(`[AppLoader] Event received: 'auth:${xr.PasswordChangeRequired}', going to login`),f.error("Password change required, please change your password."),y(!0,"Password change required, please change your password."),o.currentRoute.value.name!==zt.Login&&await o.push({name:zt.Login}),y(!1)}),Fp(()=>{p&&p.disconnect()}),Lp(async()=>{var M,O;l.value=!0;const T=["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"],x=T[Math.floor(Math.random()*T.length)];y(!0,x);try{await vo.test()}catch(A){l.value=!1,u.value=A,c.value="api/test",si(A);return}const{loginRequired:E,wizardState:P}=await t.checkAuthenticationRequirements();if(!P.wizardCompleted){console.debug("[AppLoader] Wizard not completed, going to wizard"),await t.logout(!1),o.currentRoute.value.name!==zt.FirstTimeSetup&&await o.replace({name:zt.FirstTimeSetup}),y(!1);return}if(!E)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"),y(!1);y(!0,"Refreshing login"),console.debug("[AppLoader] Verifying or refreshing login once");try{const{success:A,handled:D}=await t.verifyOrRefreshLoginOnceOrLogout();if(D){console.debug("[AppLoader] received handled event, hiding overlay");return}if(!A){console.debug("[AppLoader] No success refreshing"),y(!0,"Login expired, going back to login"),await KO(500),o.currentRoute.value.name!==zt.Login&&await o.push({name:zt.Login}),y(!1);return}}catch(A){console.log("[AppLoader] Error when refreshing login",A),l.value=!1,u.value=A.message,c.value=(M=A.config)==null?void 0:M.url,d.value=(O=A.response)==null?void 0:O.data,si(A);return}console.debug("[AppLoader] Loading app"),await b()}),(T,x)=>(L(),ye(Ce,null,[h(Di,{modelValue:i.value,"onUpdate:modelValue":x[2]||(x[2]=E=>i.value=E),opacity:"0.98",style:{"z-index":"7"}},{default:v(()=>[l.value?(L(),Z(WO,{key:0,size:20,class:"ma-auto",color:"#a70015"})):he("",!0),x[19]||(x[19]=$("br",null,null,-1)),u.value?(L(),ye("div",KY,[x[16]||(x[16]=$("h1",null,"FDM Monster Server Error",-1)),x[17]||(x[17]=$("p",null," Did not expect this answer from the server. Please check your configuration and logs. ",-1)),h(up,{class:"pa-4 rounded",color:"grey-darken-2",width:"80%"},{default:v(()=>[x[11]||(x[11]=k(" Details: ")),$("div",YY,ie(JSON.stringify(u.value,null,4)),1),c.value?(L(),ye("div",XY," Original URL: "+ie(c.value),1)):he("",!0),d.value?(L(),ye("div",QY," Response body: "+ie(d.value),1)):he("",!0),x[12]||(x[12]=$("br",null,null,-1)),h(re,{class:"mb-2",color:"secondary",onClick:x[0]||(x[0]=E=>m())},{default:v(()=>[h(X,{class:"mr-2"},{default:v(()=>x[3]||(x[3]=[k("content_copy")])),_:1}),x[4]||(x[4]=k(" Copy error details "))]),_:1}),x[13]||(x[13]=$("br",null,null,-1)),h(re,{color:"primary mb-2",onClick:x[1]||(x[1]=E=>g())},{default:v(()=>[h(X,{class:"mr-2"},{default:v(()=>x[5]||(x[5]=[k("refresh")])),_:1}),x[6]||(x[6]=k(" reload the page "))]),_:1}),x[14]||(x[14]=$("br",null,null,-1)),h(re,{color:"darken-2 mb-2",href:"https://docs.fdm-monster.net",style:{color:"white"},target:"_blank"},{default:v(()=>[h(X,{class:"mr-2"},{default:v(()=>x[7]||(x[7]=[k("menu_book")])),_:1}),x[8]||(x[8]=k(" view documentation "))]),_:1}),x[15]||(x[15]=$("br",null,null,-1)),h(re,{color:"purple-darken-4",href:"https://discord.gg/mwA8uP8CMc",style:{color:"white"},target:"_blank"},{default:v(()=>[h(X,{class:"mr-2"},{default:v(()=>x[9]||(x[9]=[k("chat")])),_:1}),x[10]||(x[10]=k(" join our Discord "))]),_:1})]),_:1}),x[18]||(x[18]=$("img",{class:"justify-center align-center align-content-center rounded-pill mt-8 ma-4",src:zY,style:{opacity:"0.9"},width:"400"},null,-1))])):he("",!0),l.value?(L(),ye("div",JY,ie(a.value),1)):he("",!0)]),_:1},8,["modelValue"]),i.value?he("",!0):Np(T.$slots,"default",{key:0})],64))}});async function eX(){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 tX=ce({...Ue(),...IA({fullHeight:!0}),...Mt()},"VApp"),nX=ke()({name:"VApp",props:tX(),setup(e,t){let{slots:n}=t;const r=Kt(e),{layoutClasses:s,getLayoutItem:i,items:o,layoutRef:a}=DA(e),{rtlClasses:l}=$r();return Pe(()=>{var u;return h("div",{ref:a,class:["v-application",r.themeClasses.value,s.value,l.value,e.class],style:[e.style]},[h("div",{class:"v-application__wrap"},[(u=n.default)==null?void 0:u.call(n)])])}),{getLayoutItem:i,items:o,theme:r}}}),rX=ce({scrollable:Boolean,...Ue(),...Mr(),...wt({tag:"main"})},"VMain"),sX=ke()({name:"VMain",props:rX(),setup(e,t){let{slots:n}=t;const{dimensionStyles:r}=Dr(e),{mainStyles:s}=OA(),{ssrBootStyles:i}=qd();return Pe(()=>h(e.tag,{class:["v-main",{"v-main--scrollable":e.scrollable},e.class],style:[s.value,i.value,r.value,e.style]},{default:()=>{var o,a;return[e.scrollable?h("div",{class:"v-main__scroller"},[(o=n.default)==null?void 0:o.call(n)]):(a=n.default)==null?void 0:a.call(n)]}})),{}}}),iX=De({__name:"App",setup(e){const t=tS(),n=as(),r=t.queuedUploads;return xe(r,async()=>{await t.handleNextUpload()}),St(()=>{eX(),console.debug(`App.vue mounted. Logged in: ${n.hasAuthToken}, Expired: ${n.isLoginExpired}`)}),(s,i)=>{const o=HY,a=VY,l=LY,u=AY,c=IY,d=Vn("router-view"),f=fK,p=eK,g=_7,m=w7,y=v7,b=h7,w=JG,S=kG,C=fG,_=zW,R=aW;return L(),Z(nX,null,{default:v(()=>[h(o),h(a),h(l),Q(n).hasAuthToken&&!Q(n).isLoginExpired||!Q(n).loginRequired?(L(),Z(u,{key:0})):he("",!0),Q(n).hasAuthToken&&!Q(n).isLoginExpired||!Q(n).loginRequired?(L(),Z(c,{key:1})):he("",!0),h(ZY,null,{default:v(()=>[h(sX,null,{default:v(()=>[h(d)]),_:1})]),_:1}),h(f),h(p),h(g),h(m),h(y),h(b),h(w),h(S),h(C),h(_),h(R)]),_:1})}}}),nS="/img/logo.svg";class YO extends vr{static async postQuickStopM112Command(t){const n=Ae.sendQuickStopM112Route(t);return await this.post(n)}}const Pm=Ts("GridStore",{state:()=>({gridEditMode:!1})}),oX={class:"small-resized-font"},aX={key:0,class:"float-right d-none d-xl-inline"},lX={key:1,class:"float-end"},uX={class:"pl-5 pr-5",color:"primary"},cX={key:0},dX={key:1},fX={key:2},hX={class:"xsmall-resized-font"},Lk="rgba(100,100,100,0.1)",pX=De({__name:"PrinterGridTile",props:{printer:{type:Object,required:!1},x:{type:Number,required:!0},y:{type:Number,required:!0}},setup(e){const t=e,n=Lt(),r=nr(),s=qi(),i=ji(),o=Ds(),a=Pm(),l=en(tn.PrinterControlDialog),u=en(tn.AddOrUpdatePrinterDialog),c=Ot(),d=I(()=>{var O;return(O=t.printer)==null?void 0:O.id}),f=I(()=>d.value?n.isSelectedPrinter(d.value):!1),p=I(()=>{var O;return((O=n.selectedPrinters)==null?void 0:O.length)&&!f.value}),g=I(()=>i.hasFeature("printerControlApi")),m=I(()=>o.largeTiles),y=I(()=>{if(!d.value)return;const O=n.printer(d.value);if(!O)return;const A=r.printerEventsById[d.value],D=r.socketStatesById[d.value];return qI(O,D,A)}),b=I(()=>{const O=y.value;return O&&O.rgb||Lk}),w=I(()=>{if(d.value)return r.printerJobsById[d.value]}),S=I(()=>{if(d.value)return r.printingFilePathsByPrinterId[d.value]}),C=()=>{n.setSideNavPrinter(t.printer)},_=async()=>{d.value&&(await jt.refreshSocket(d.value),c.openInfoMessage({title:"Refreshing OctoPrint connection state"}))},R=()=>{t.printer&&jt.openPrinterURL(t.printer.printerURL)},T=()=>{n.setUpdateDialogPrinter(t.printer),u.openDialog()},x=async()=>{if(!d.value)throw new Error("PrinterId not set, cant open dialog");await l.openDialog({printerId:d})},E=async()=>{d.value&&confirm("Are you sure to abort the print in Quick Stop mode? Please reconnect after.")&&await YO.postQuickStopM112Command(d.value)},P=async()=>{d.value&&await jt.sendPrinterConnectCommand(d.value)},M=async()=>{var O;if(!(!t.printer||!d.value)){if(a.gridEditMode){const A=(O=s.selectedFloor)==null?void 0:O.id;if(!A)throw new Error("Cant clear printer, floor not selected");await es.deletePrinterFromFloor(A,d.value);return}n.toggleSelectedPrinter(t.printer)}};return(O,A)=>{const D=hr("drop-upload"),H=hr("drop-printer-position");return Jt((L(),ye("div",null,[Jt((L(),Z(bt,{class:ja([{"tile-large":m.value,"tile-selected":f.value,"tile-unselected":p.value,"tile-setup":e.printer},"tile"]),disabled:!e.printer,style:ii({"background-color":!Q(a).gridEditMode||!e.printer?b.value:"rgba(1,1,1,0)"}),variant:"outlined",tile:"",onClick:A[10]||(A[10]=z=>M())},{default:v(()=>{var z,Y,q,V;return[(z=y.value)!=null&&z.text.includes("API")?(L(),Z(X,{key:0,color:"primary",size:"70",style:{opacity:"0.2",position:"absolute",top:"5%",right:"10%"}},{default:v(()=>A[11]||(A[11]=[k(" wifi_off ")])),_:1})):he("",!0),(Y=y.value)!=null&&Y.text.includes("USB")?(L(),Z(X,{key:1,color:"primary",size:"70",style:{opacity:"0.2",position:"absolute",top:"5%",right:"10%"}},{default:v(()=>A[12]||(A[12]=[k(" usb_off ")])),_:1})):he("",!0),(q=e.printer)!=null&&q.id?(L(),Z(Tn,{key:2,class:"tile-inner fill-height"},{default:v(()=>{var G,te,W,J,pe,ae;return[$("small",oX,ie((G=e.printer)==null?void 0:G.name),1),h(Wd,{"offset-y":""},{activator:v(({props:oe})=>[h(re,ve({class:"float-right d-inline d-xl-none"},oe),{default:v(()=>[h(X,null,{default:v(()=>A[13]||(A[13]=[k("more_vert")])),_:1})]),_:2},1040)]),default:v(()=>[h(Ft,null,{default:v(()=>[h(Le,{"close-on-click":!0,onClick:A[0]||(A[0]=oe=>C())},{default:v(()=>[h(X,null,{default:v(()=>A[14]||(A[14]=[k("info")])),_:1}),A[15]||(A[15]=k(" Details "))]),_:1}),g.value?(L(),Z(Le,{key:0,"close-on-click":!0,onClick:A[1]||(A[1]=oe=>x())},{default:v(()=>[h(X,null,{default:v(()=>A[16]||(A[16]=[k("open_with")])),_:1}),A[17]||(A[17]=k(" Control "))]),_:1})):he("",!0),h(Le,{"close-on-click":!0,onClick:A[2]||(A[2]=oe=>R())},{default:v(()=>[h(X,null,{default:v(()=>A[18]||(A[18]=[k("directions")])),_:1}),A[19]||(A[19]=k(" Visit OctoPrint "))]),_:1}),h(Le,{"close-on-click":!0,onClick:A[3]||(A[3]=oe=>T())},{default:v(()=>[h(X,null,{default:v(()=>A[20]||(A[20]=[k("settings")])),_:1}),A[21]||(A[21]=k(" Edit Printer "))]),_:1}),h(Le,{"close-on-click":!0,onClick:A[4]||(A[4]=oe=>E())},{default:v(()=>[h(X,null,{default:v(()=>A[22]||(A[22]=[k("stop")])),_:1}),A[23]||(A[23]=k(" Quick stop "))]),_:1})]),_:1})]),_:1}),Q(a).gridEditMode?(L(),ye("div",lX,[$("strong",uX,[h(X,null,{default:v(()=>A[32]||(A[32]=[k("disabled_visible")])),_:1}),A[33]||(A[33]=k(" Click to clear "))])])):(L(),ye("div",aX,[!Q(r).isPrinterOperational((te=e.printer)==null?void 0:te.id)&&Q(r).isApiResponding((W=e.printer)==null?void 0:W.id)?(L(),Z(re,{key:0,onClick:A[5]||(A[5]=Dt(oe=>P(),["prevent","stop"]))},{default:v(()=>[h(X,null,{default:v(()=>A[24]||(A[24]=[k("usb")])),_:1})]),_:1})):he("",!0),g.value&&Q(r).isPrinterOperational((J=e.printer)==null?void 0:J.id)?(L(),Z(xt,{key:1,location:"bottom"},{activator:v(({props:oe})=>[h(re,ve({elevation:"4",size:"36"},oe,{onClick:A[6]||(A[6]=Dt(ee=>x(),["prevent","stop"]))}),{default:v(()=>[h(X,null,{default:v(()=>A[25]||(A[25]=[k("open_with")])),_:1})]),_:2},1040)]),default:v(()=>A[26]||(A[26]=[$("span",null," Control your printer head or extruder. ",-1)])),_:1})):he("",!0),Q(r).isPrinterOperational((pe=e.printer)==null?void 0:pe.id)?(L(),Z(xt,{key:2,location:"bottom"},{activator:v(({props:oe})=>[h(re,ve({elevation:"4",size:"36"},oe,{onClick:A[7]||(A[7]=Dt(ee=>E(),["prevent","stop"]))}),{default:v(()=>[h(X,null,{default:v(()=>A[27]||(A[27]=[k("dangerous")])),_:1})]),_:2},1040)]),default:v(()=>A[28]||(A[28]=[$("span",null," Send a quick stop, causing USB to be disconnected. ",-1)])),_:1})):he("",!0),e.printer.enabled&&Q(r).isPrinterNotOnline(e.printer.id)?(L(),Z(xt,{key:3,location:"bottom"},{activator:v(({props:oe})=>[h(re,ve({elevation:"4",size:"36"},oe,{onClick:A[8]||(A[8]=Dt(ee=>_(),["prevent","stop"]))}),{default:v(()=>[h(X,null,{default:v(()=>A[29]||(A[29]=[k("autorenew")])),_:1})]),_:2},1040)]),default:v(()=>A[30]||(A[30]=[$("span",null," Retry connecting to OctoPrint API ",-1)])),_:1})):he("",!0),h(re,{elevation:"5",onClick:A[9]||(A[9]=Dt(oe=>C(),["prevent","stop"]))},{default:v(()=>[h(X,null,{default:v(()=>A[31]||(A[31]=[k("menu_open")])),_:1})]),_:1})])),A[39]||(A[39]=$("br",null,null,-1)),h(xt,{disabled:!((ae=e.printer)!=null&&ae.disabledReason),"close-delay":"100",color:"danger","open-delay":"0",location:"top"},{activator:v(({props:oe})=>{var ee,me,ne;return[$("small",ve({class:"xsmall-resized-font text--secondary d-lg-inline d-none"},oe),[(ee=e.printer)!=null&&ee.disabledReason?(L(),ye("span",cX,[A[35]||(A[35]=$("small",null," MAINTENANCE ",-1)),h(X,{class:"d-none d-xl-inline",color:"primary",size:"small"},{default:v(()=>A[34]||(A[34]=[k(" info ")])),_:1})])):(L(),ye("span",dX,[$("small",null,ie((ne=(me=y.value)==null?void 0:me.text)==null?void 0:ne.toUpperCase()),1)]))],16)]}),default:v(()=>[A[36]||(A[36]=k(" Maintenance reason: ")),A[37]||(A[37]=$("br",null,null,-1)),k(" "+ie(e.printer.disabledReason),1)]),_:1},8,["disabled"]),m.value&&S.value?(L(),ye("small",fX,[A[38]||(A[38]=$("strong",null," File: ",-1)),k(" "+ie(S.value),1)])):he("",!0)]}),_:1})):Q(a).gridEditMode?(L(),Z(Tn,{key:3},{default:v(()=>[h(X,{size:"48"},{default:v(()=>A[40]||(A[40]=[k("add")])),_:1}),A[41]||(A[41]=k(" Place printer "))]),_:1})):he("",!0),(V=w.value)!=null&&V.progress?(L(),Z(eu,{key:4,"model-value":w.value.progress.completion,absolute:"",bottom:"",color:"green",height:"13"},{default:v(()=>{var G,te,W,J,pe;return[$("span",hX,ie(m.value?(te=(G=w.value)==null?void 0:G.progress)!=null&&te.completion?((pe=(J=(W=w.value)==null?void 0:W.progress)==null?void 0:J.completion)==null?void 0:pe.toFixed(1))+"%":"-":S.value),1)]}),_:1},8,["model-value"])):he("",!0)]}),_:1},8,["class","disabled","style"])),[[D,{printers:[e.printer]}]])])),[[H,{x:e.x,y:e.y,printerSet:e.printer}]])}}}),XO="FDM-Monster-Client-Vue2";var QO=(e=>(e.PRINTER_PLACE="PRINTER_PLACE",e))(QO||{});function mX(e){var t,n;return!((t=e==null?void 0:e.appId)!=null&&t.length)||!((n=e==null?void 0:e.intent)!=null&&n.length)?!1:e.appId===XO&&e.intent==="PRINTER_PLACE"}const gX=ce({color:String,density:String,...Ue()},"VBannerActions"),vX=ke()({name:"VBannerActions",props:gX(),setup(e,t){let{slots:n}=t;return Ar({VBtn:{color:e.color,density:e.density,slim:!0,variant:"text"}}),Pe(()=>{var r;return h("div",{class:["v-banner-actions",e.class],style:e.style},[(r=n.default)==null?void 0:r.call(n)])}),{}}}),yX=vu("v-banner-text"),bX=ce({avatar:String,bgColor:String,color:String,icon:Je,lines:String,stacked:Boolean,sticky:Boolean,text:String,...fs(),...Ue(),...Or(),...Mr(),...Ka({mobile:null}),...ps(),...Uo(),...wu(),...$n(),...wt(),...Mt()},"VBanner"),JO=ke()({name:"VBanner",props:bX(),setup(e,t){let{slots:n}=t;const{backgroundColorClasses:r,backgroundColorStyles:s}=fr(e,"bgColor"),{borderClasses:i}=Ps(e),{densityClasses:o}=hs(e),{displayClasses:a,mobile:l}=ci(e),{dimensionStyles:u}=Dr(e),{elevationClasses:c}=Is(e),{locationStyles:d}=Ga(e),{positionClasses:f}=Su(e),{roundedClasses:p}=Hn(e),{themeClasses:g}=Kt(e),m=Te(e,"color"),y=Te(e,"density");Ar({VBannerActions:{color:m,density:y}}),Pe(()=>{const b=!!(e.text||n.text),w=!!(e.avatar||e.icon),S=!!(w||n.prepend);return h(e.tag,{class:["v-banner",{"v-banner--stacked":e.stacked||l.value,"v-banner--sticky":e.sticky,[`v-banner--${e.lines}-line`]:!!e.lines},g.value,r.value,i.value,o.value,a.value,c.value,f.value,p.value,e.class],style:[s.value,u.value,d.value,e.style],role:"banner"},{default:()=>{var C;return[S&&h("div",{key:"prepend",class:"v-banner__prepend"},[n.prepend?h(It,{key:"prepend-defaults",disabled:!w,defaults:{VAvatar:{color:m.value,density:y.value,icon:e.icon,image:e.avatar}}},n.prepend):h(lt,{key:"prepend-avatar",color:m.value,density:y.value,icon:e.icon,image:e.avatar},null)]),h("div",{class:"v-banner__content"},[b&&h(yX,{key:"text"},{default:()=>{var _;return[((_=n.text)==null?void 0:_.call(n))??e.text]}}),(C=n.default)==null?void 0:C.call(n)]),n.actions&&h(vX,{key:"actions"},n.actions)]}})})}}),wX={class:"printer-grid-container"},SX=De({__name:"PrinterGrid",props:{gap:{type:String,default:"4px"}},setup(e){const t=Lt(),n=qi(),r=Ds(),s=Pm();St(async()=>{await t.loadPrinters(),await n.loadFloors()});const i=e,o=I(()=>n.gridSortedPrinters),a=I(()=>r.gridCols),l=I(()=>r.gridRows),u=I(()=>l.value*a.value),c=I(()=>({display:"grid",gridTemplateColumns:`repeat(${a.value}, 1fr)`,gap:i.gap})),d=m=>m%a.value,f=m=>Math.floor(m/a.value);function p(m,y){y.dataTransfer&&m.id&&y.dataTransfer.setData("text",JSON.stringify({appId:XO,intent:QO.PRINTER_PLACE,printerId:m.id}))}function g(m,y){var S;const b=m,w=y;if(!(!((S=o.value)!=null&&S.length)||!o.value[b]))return o.value[b][w]}return(m,y)=>(L(),ye("div",null,[Q(s).gridEditMode?(L(),Z(JO,{key:0},{default:v(()=>[h(ot,{style:{"margin-bottom":"-5px"}},{default:v(()=>[h(He,null,{default:v(()=>[$("span",null," Drag "+ie(Q(n).floorlessPrinters.length)+" unplaced printer(s) from here to place it on the grid. ",1),h(ap,null,{default:v(()=>[(L(!0),ye(Ce,null,qt(Q(n).floorlessPrinters,b=>(L(),Z(Sn,{key:b.id,draggable:"",size:"small",style:{cursor:"move"},onDragstart:w=>p(b,w)},{default:v(()=>[k(ie(b.name),1)]),_:2},1032,["onDragstart"]))),128))]),_:1})]),_:1}),h(He,null,{default:v(()=>[$("div",null,[y[2]||(y[2]=k(" Clear printers by clicking on ")),$("strong",null,[h(X,null,{default:v(()=>y[0]||(y[0]=[k("disabled_visible")])),_:1}),y[1]||(y[1]=k(" Click to clear "))])])]),_:1})]),_:1})]),_:1})):he("",!0),$("div",wX,[$("div",{class:"printer-grid",style:ii(c.value)},[(L(!0),ye(Ce,null,qt(u.value,b=>(L(),ye("div",{key:`printer-${d(b-1)}-${f(b-1)}`,class:"printer-cell"},[h(pX,{printer:g(d(b-1),f(b-1)),x:d(b-1),y:f(b-1)},null,8,["printer","x","y"])]))),128))],4)]),y[3]||(y[3]=$("img",{alt:"FDM Monster Background",class:"grid-bg-img align-content-center",src:nS,style:{opacity:"0.08","pointer-events":"none"}},null,-1))]))}}),_X=Wo(SX,[["__scopeId","data-v-f4e959e4"]]);function kX(e,t){return e?t.map(n=>({file:n,printer:e})):[]}function ZO(e,t){return!(e!=null&&e.length)||!t?[]:e.map(n=>({file:t,printer:n}))}const xX=ce({indeterminate:Boolean,inset:Boolean,flat:Boolean,loading:{type:[Boolean,String],default:!1},...el(),...km()},"VSwitch"),hp=ke()({name:"VSwitch",inheritAttrs:!1,props:xX(),emits:{"update:focused":e=>!0,"update:modelValue":e=>!0,"update:indeterminate":e=>!0},setup(e,t){let{attrs:n,slots:r}=t;const s=rt(e,"indeterminate"),i=rt(e,"modelValue"),{loaderClasses:o}=Md(e),{isFocused:a,focus:l,blur:u}=Du(e),c=B(),d=kt&&window.matchMedia("(forced-colors: active)").matches,f=I(()=>typeof e.loading=="string"&&e.loading!==""?e.loading:e.color),p=gr(),g=I(()=>e.id||`switch-${p}`);function m(){s.value&&(s.value=!1)}function y(b){var w,S;b.stopPropagation(),b.preventDefault(),(S=(w=c.value)==null?void 0:w.input)==null||S.click()}return Pe(()=>{const[b,w]=qa(n),S=us.filterProps(e),C=Ba.filterProps(e);return h(us,ve({class:["v-switch",{"v-switch--flat":e.flat},{"v-switch--inset":e.inset},{"v-switch--indeterminate":s.value},o.value,e.class]},b,S,{modelValue:i.value,"onUpdate:modelValue":_=>i.value=_,id:g.value,focused:a.value,style:e.style}),{...r,default:_=>{let{id:R,messagesId:T,isDisabled:x,isReadonly:E,isValid:P}=_;const M={model:i,isValid:P};return h(Ba,ve({ref:c},C,{modelValue:i.value,"onUpdate:modelValue":[O=>i.value=O,m],id:R.value,"aria-describedby":T.value,type:"checkbox","aria-checked":s.value?"mixed":void 0,disabled:x.value,readonly:E.value,onFocus:l,onBlur:u},w),{...r,default:O=>{let{backgroundColorClasses:A,backgroundColorStyles:D}=O;return h("div",{class:["v-switch__track",d?void 0:A.value],style:D.value,onClick:y},[r["track-true"]&&h("div",{key:"prepend",class:"v-switch__track-true"},[r["track-true"](M)]),r["track-false"]&&h("div",{key:"append",class:"v-switch__track-false"},[r["track-false"](M)])])},input:O=>{let{inputNode:A,icon:D,backgroundColorClasses:H,backgroundColorStyles:z}=O;return h(Ce,null,[A,h("div",{class:["v-switch__thumb",{"v-switch__thumb--filled":D||e.loading},e.inset||d?void 0:H.value],style:e.inset?void 0:z.value},[r.thumb?h(It,{defaults:{VIcon:{icon:D,size:"x-small"}}},{default:()=>[r.thumb({...M,icon:D})]}):h(O2,null,{default:()=>[e.loading?h(qp,{name:"v-switch",active:!0,color:P.value===!1?void 0:f.value},{default:Y=>r.loader?r.loader(Y):h(Od,{active:Y.isActive,color:Y.color,indeterminate:!0,size:"16",width:"2"},null)}):D&&h(X,{key:String(D),icon:D,size:"x-small"},null)]})])])}})}})}),{}}}),EX={class:"d-flex flex-wrap gap-2"},CX={class:"pr-2"},TX={class:"pr-2"},RX={class:"pr-2"},PX={class:"pr-2"},IX={class:"pr-2"},AX={class:"ma-4 pt-6"},OX=De({__name:"HomeToolbar",setup(e){const t=Lt(),n=nr(),r=qi(),s=Pm(),i=B(0),o=I(()=>r.floors);function a(l){r.changeSelectedFloorByIndex(l),i.value=l}return(l,u)=>(L(),Z(mr,{flat:""},{default:v(()=>{var c;return[h(RT,{"model-value":i.value,class:"ml-7",mandatory:"",rounded:"","onUpdate:modelValue":a},{default:v(()=>[(L(!0),ye(Ce,null,qt(o.value,d=>(L(),Z(re,{key:d.id,size:"small"},{default:v(()=>[h(X,null,{default:v(()=>u[2]||(u[2]=[k("layers")])),_:1}),k(" "+ie(d.name),1)]),_:2},1024))),128))]),_:1},8,["model-value"]),(c=Q(t).printers)!=null&&c.length?he("",!0):(L(),Z(re,{key:0,class:"mt-0 ml-6",color:"primary",to:"/printers"},{default:v(()=>u[3]||(u[3]=[k(" You have no printers. Click here to start! ")])),_:1})),Q(r).floorlessPrinters.length?(L(),Z(nn,{key:1,class:"ml-4"},{default:v(()=>[h(X,null,{default:v(()=>u[4]||(u[4]=[k("warning")])),_:1}),k(" "+ie(Q(r).floorlessPrinters.length)+" unplaced printer(s)! ",1)]),_:1})):he("",!0),h(vn),$("span",EX,[$("span",CX,[h(X,null,{default:v(()=>u[5]||(u[5]=[k("print")])),_:1}),k(" "+ie(Q(n).printingCount),1)]),$("span",TX,[h(X,null,{default:v(()=>u[6]||(u[6]=[k("ac_unit")])),_:1}),k(" "+ie(Q(n).operationalNotPrintingCount),1)]),$("span",RX,[h(X,null,{default:v(()=>u[7]||(u[7]=[k("handyman")])),_:1}),k(" "+ie(Q(t).maintenanceCount),1)]),$("span",PX,[h(X,null,{default:v(()=>u[8]||(u[8]=[k("usb_off")])),_:1}),k(" "+ie(Q(t).disconnectedCount),1)]),$("span",IX,[h(X,null,{default:v(()=>u[9]||(u[9]=[k("print_disabled")])),_:1}),k(" "+ie(Q(t).disabledCount),1)])]),h(re,{elevation:"2",small:"",class:"ml-6",icon:"",onClick:u[0]||(u[0]=d=>Q(en)(Q(tn).GridSettingsDialog).openDialog())},{default:v(()=>[h(X,null,{default:v(()=>u[10]||(u[10]=[k("settings")])),_:1})]),_:1}),$("div",AX,[h(hp,{modelValue:Q(s).gridEditMode,"onUpdate:modelValue":u[1]||(u[1]=d=>Q(s).gridEditMode=d),label:"Grid Edit Mode"},null,8,["modelValue"])])]}),_:1}))}}),MX={class:"pl-1"},DX=De({__name:"PrinterGridView",setup(e){const t=Pm(),n=Lt(),r=nr(),s=tS(),i=ji(),o=Ot(),a=B(void 0),l=I(()=>i.hasFeature("batchReprintCalls")),u=I(()=>n.selectedPrinters.length>0),c=I(()=>n.selectedPrinters),d=B(null),f=()=>{d.value&&(d.value.value="",a.value=void 0)},p=()=>{n.clearSelectedPrinters()},g=async()=>{var C;const S=await en(tn.BatchReprintDialog).handleAsync((C=n.selectedPrinters)==null?void 0:C.map(_=>_.id));console.log("[PrinterGridView] Dialog completed",S)},m=()=>{const S=c.value,C=S.filter(T=>r.isApiResponding(T.id));if(!a.value)return;const _=S.length-C.length;_>0&&o.openInfoMessage({title:`${_} printers inaccessible`,subtitle:"These were skipped from uploading."});const R=ZO(C,a.value);s.queueUploads(R),d.value&&(d.value.value=""),p()},y=()=>{d.value&&d.value.files?a.value=d.value.files[0]:a.value=void 0},b=S=>{n.toggleSelectedPrinter(S)},w=S=>{jt.openPrinterURL(S.printerURL)};return(S,C)=>{const _=hr("drop-upload");return L(),ye("div",null,[h(OX),Q(t).gridEditMode?he("",!0):Jt((L(),Z(JO,{key:0},{default:v(()=>[h(ot,{style:{"margin-bottom":"-5px"}},{default:v(()=>[h(He,{style:{padding:"5px 0 0 15px"}},{default:v(()=>[h(ap,{class:"d-inline-block"},{default:v(()=>[c.value.length===0?(L(),Z(Sn,{key:0,size:"small"},{default:v(()=>C[6]||(C[6]=[k(" No selected printers ")])),_:1})):he("",!0),(L(!0),ye(Ce,null,qt(c.value,R=>(L(),Z(Sn,{key:R.id,closable:"",color:"primary",size:"small",onClick:T=>w(R),"onClick:close":T=>b(R)},{default:v(()=>[k(ie(R.name),1)]),_:2},1032,["onClick","onClick:close"]))),128))]),_:1})]),_:1}),h(He,{align:"right",style:{padding:"0"}},{default:v(()=>[a.value?(L(),Z(ap,{key:0,class:"float-end"},{default:v(()=>[h(Sn,{closable:"","onClick:close":C[0]||(C[0]=R=>f())},{default:v(()=>[k(ie(a.value.name)+" ",1),$("strong",MX,ie(Q(_A)(a.value.size)),1)]),_:1})]),_:1})):he("",!0),C[12]||(C[12]=$("br",null,null,-1)),l.value?(L(),Z(re,{key:1,disabled:!u.value,color:"primary",size:"x-small",onClick:C[1]||(C[1]=R=>g())},{default:v(()=>[h(X,{class:"pr-2",size:"small"},{default:v(()=>C[7]||(C[7]=[k(" refresh ")])),_:1}),C[8]||(C[8]=k(" Batch reprint "))]),_:1},8,["disabled"])):he("",!0),h(re,{color:u.value?"primary":"secondary",class:"ml-2",size:"x-small",onClick:C[2]||(C[2]=R=>p())},{default:v(()=>[h(X,{class:"pr-2",size:"small"},{default:v(()=>C[9]||(C[9]=[k(" delete ")])),_:1}),k(" Clear all ("+ie(c.value.length)+") ",1)]),_:1},8,["color"]),h(re,{class:"ml-2",color:"primary",size:"x-small",onClick:C[3]||(C[3]=R=>{var T;return(T=S.$refs.fileUpload)==null?void 0:T.click()})},{default:v(()=>C[10]||(C[10]=[k(" Select gcode file ")])),_:1}),h(re,{disabled:!a.value,class:"ml-2 mr-5",color:"green",size:"x-small",onClick:C[4]||(C[4]=R=>m())},{default:v(()=>C[11]||(C[11]=[k(" Upload gcode file ")])),_:1},8,["disabled"]),$("input",{ref_key:"fileUpload",ref:d,multiple:!1,accept:".gcode",style:{display:"none"},type:"file",onChange:C[5]||(C[5]=R=>y())},null,544)]),_:1})]),_:1})]),_:1})),[[_,{printers:c.value}]]),h(_X,{class:"ma-2"})])}}}),$X=De({name:"RefreshFilesAction",components:{},props:{printer:Object},setup:()=>({printersStore:Lt()}),methods:{async getFiles(){this.printer&&await this.printersStore.loadPrinterFiles(this.printer.id)}}});function LX(e,t,n,r,s,i){return L(),Z(re,{color:"secondary",onClick:t[0]||(t[0]=o=>e.getFiles())},{default:v(()=>[h(X,null,{default:v(()=>t[1]||(t[1]=[k("refresh")])),_:1}),t[2]||(t[2]=$("span",{class:"d-none d-lg-inline"}," Refresh files ",-1))]),_:1})}const eM=Wo($X,[["render",LX]]),FX=De({name:"PrinterDetails",components:{RefreshFilesAction:eM},props:{printer:Object},setup:()=>({printersStore:Lt(),printerStateStore:nr()}),data:()=>({dragging:!1}),computed:{printerId(){var e;return(e=this.printer)==null?void 0:e.id},socketState(){var e;if(this.printerId)return(e=this.printerStateStore.socketStatesById[this.printerId])==null?void 0:e.socket},apiState(){var e;if(this.printerId)return(e=this.printerStateStore.socketStatesById[this.printerId])==null?void 0:e.api},printerTextState(){var e,t,n;if(this.printerId)return(n=(t=(e=this.printerStateStore.printerEventsById[this.printerId])==null?void 0:e.current)==null?void 0:t.payload)==null?void 0:n.state.text}}});function NX(e,t,n,r,s,i){const o=eM,a=hr("drop-upload");return e.printer?Jt((L(),Z(Tn,{key:0,style:ii(e.dragging?"background-color:red":""),transition:"scale-transition"},{default:v(()=>[h(ot,null,{default:v(()=>[h(He,null,{default:v(()=>[k(" Name: "+ie(e.printer.name)+" ",1),t[0]||(t[0]=$("br",null,null,-1)),k(" URL: "+ie(e.printer.printerURL)+" ",1),t[1]||(t[1]=$("br",null,null,-1)),t[2]||(t[2]=k(" Host: ")),h(Sn,{size:"small"},{default:v(()=>[k(ie(e.apiState),1)]),_:1}),t[3]||(t[3]=$("br",null,null,-1)),t[4]||(t[4]=k(" WebSocket: ")),h(Sn,{size:"small"},{default:v(()=>[k(ie(e.socketState),1)]),_:1}),t[5]||(t[5]=$("br",null,null,-1)),t[6]||(t[6]=k(" Printer: ")),h(Sn,{size:"small"},{default:v(()=>[k(ie(e.printerTextState),1)]),_:1})]),_:1}),h(He,null,{default:v(()=>[h(o,{printer:e.printer,class:"d-flex justify-end"},null,8,["printer"])]),_:1})]),_:1})]),_:1},8,["style"])),[[a,{printers:[e.printer]}]]):he("",!0)}const VX=Wo(FX,[["render",NX]]),BX=De({__name:"PrinterUrlAction",props:{printer:{}},setup(e){const t=e;async function n(){jt.openPrinterURL(t.printer.printerURL)}return(r,s)=>(L(),Z(re,{color:"secondary",rounded:"",size:"small",onClickCapture:s[0]||(s[0]=Dt(i=>n(),["stop"]))},{default:v(()=>[h(X,null,{default:v(()=>s[1]||(s[1]=[k("directions")])),_:1})]),_:1}))}}),UX=De({name:"PrinterSettingsAction",props:{printer:Object},computed:{printerId(){return this.printer.id}},methods:{openSettings(){this.$emit("update:show",this.printer.id)}}});function HX(e,t,n,r,s,i){return L(),Z(re,{color:"secondary",class:"ma-2",size:"small",rounded:"",onClickCapture:t[0]||(t[0]=Dt(o=>e.openSettings(),["stop"]))},{default:v(()=>[h(X,null,{default:v(()=>t[1]||(t[1]=[k("settings")])),_:1})]),_:1})}const zX=Wo(UX,[["render",HX]]),jX=ce({bordered:Boolean,color:String,content:[Number,String],dot:Boolean,floating:Boolean,icon:Je,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(),...Uo({location:"top end"}),...$n(),...wt(),...Mt(),...xu({transition:"scale-rotate-transition"})},"VBadge"),tM=ke()({name:"VBadge",inheritAttrs:!1,props:jX(),setup(e,t){const{backgroundColorClasses:n,backgroundColorStyles:r}=fr(Te(e,"color")),{roundedClasses:s}=Hn(e),{t:i}=Gr(),{textColorClasses:o,textColorStyles:a}=Es(Te(e,"textColor")),{themeClasses:l}=ZF(),{locationStyles:u}=Ga(e,!0,c=>(e.floating?e.dot?2:4:e.dot?8:12)+(["top","bottom"].includes(c)?+(e.offsetY??0):["left","right"].includes(c)?+(e.offsetX??0):0));return Pe(()=>{const c=Number(e.content),d=!e.max||isNaN(c)?e.content:c<=+e.max?c:`${e.max}+`,[f,p]=kv(t.attrs,["aria-atomic","aria-label","aria-live","role","title"]);return h(e.tag,ve({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]},p,{style:e.style}),{default:()=>{var g,m;return[h("div",{class:"v-badge__wrapper"},[(m=(g=t.slots).default)==null?void 0:m.call(g),h(ti,{transition:e.transition},{default:()=>{var y,b;return[Jt(h("span",ve({class:["v-badge__badge",l.value,n.value,s.value,o.value],style:[r.value,a.value,e.inline?{}:u.value],"aria-atomic":"true","aria-label":i(e.label,c),"aria-live":"polite",role:"status"},f),[e.dot?void 0:t.slots.badge?(b=(y=t.slots).badge)==null?void 0:b.call(y):e.icon?h(X,{icon:e.icon},null):d]),[[No,e.modelValue]])]}})])]}})}),{}}}),qX=De({__name:"PrinterConnectionAction",props:{printer:{}},setup(e){const t=e,n=nr();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 jt.sendPrinterDisconnectCommand(t.printer.id);await jt.sendPrinterConnectCommand(t.printer.id)}return(o,a)=>o.printer.enabled?(L(),Z(tM,{key:0,color:r()?"green":"red",class:"pa-2"},{badge:v(()=>[r()?(L(),Z(X,{key:0},{default:v(()=>a[0]||(a[0]=[k("check")])),_:1})):(L(),Z(X,{key:1},{default:v(()=>a[1]||(a[1]=[k("close")])),_:1}))]),default:v(()=>[h(re,{disabled:s(),color:"secondary",rounded:"",size:"small",onClick:Dt(i,["stop"])},{default:v(()=>[h(X,null,{default:v(()=>a[2]||(a[2]=[k("usb")])),_:1})]),_:1},8,["disabled"])]),_:1},8,["color"])):he("",!0)}}),WX=De({__name:"PrinterQuickStopAction",props:{printer:{}},setup(e){const t=e;async function n(){confirm("Are you sure to abort the print? Please reconnect after.")&&await YO.postQuickStopM112Command(t.printer.id)}return(r,s)=>r.printer.enabled?(L(),Z(tM,{key:0,class:"ma-2"},{badge:v(()=>[h(X,null,{default:v(()=>s[0]||(s[0]=[k("bolt")])),_:1})]),default:v(()=>[h(re,{color:"secondary",size:"small",rounded:"",onClick:Dt(n,["stop"])},{default:v(()=>[h(X,null,{default:v(()=>s[1]||(s[1]=[k("dangerous")])),_:1})]),_:1})]),_:1})):he("",!0)}});class nM extends vr{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 GX=De({__name:"SyncPrinterNameAction",props:{printer:{}},setup(e){const t=e,n=Ot();async function r(){await nM.syncPrinterName(t.printer.id),n.openInfoMessage({title:"Synced printer name to OctoPrint"})}return(s,i)=>(L(),Z(xt,{location:"top"},{activator:v(({props:o})=>[h(re,ve(o,{color:"secondary",size:"small",rounded:"",onClickCapture:i[0]||(i[0]=Dt(a=>r(),["stop"]))}),{default:v(()=>[h(X,null,{default:v(()=>i[1]||(i[1]=[k("badge")])),_:1})]),_:2},1040)]),default:v(()=>i[2]||(i[2]=[k(" Set OctoPrints name to the FDM Monster Name ")])),_:1}))}}),KX=De({__name:"PrinterCreateAction",props:{floorId:{},floorX:{},floorY:{}},setup(e){const t=e,n=en(tn.AddOrUpdatePrinterDialog);function r(){n.openDialog(t)}return(s,i)=>(L(),Z(re,{class:"ms-4",color:"secondary",icon:"delete",rounded:"",onClickCapture:i[0]||(i[0]=Dt(o=>r(),["stop"]))},{default:v(()=>[h(X,null,{default:v(()=>i[1]||(i[1]=[k("add")])),_:1})]),_:1}))}}),YX=De({__name:"PrinterDeleteAction",props:{printer:{}},setup(e){const t=e,n=Lt(),r=nr();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)=>(L(),Z(re,{class:"ms-4",color:"secondary",size:"small",rounded:"",onClick:Dt(s,["prevent","stop"])},{default:v(()=>[h(X,null,{default:v(()=>o[0]||(o[0]=[k("delete")])),_:1})]),_:1}))}});class ll extends vr{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 XX=(e,t,n)=>e==null||t==null?-1:e.toString().toLocaleLowerCase().indexOf(t.toString().toLocaleLowerCase()),QX=ce({customFilter:Function,customKeyFilter:Object,filterKeys:[Array,String],filterMode:{type:String,default:"intersection"},noFilter:Boolean},"filter");function JX(e,t,n){var a;const r=[],s=(n==null?void 0:n.default)??XX,i=n!=null&&n.filterKeys?On(n.filterKeys):!1,o=Object.keys((n==null?void 0:n.customKeyFilter)??{}).length;if(!(e!=null&&e.length))return r;e:for(let l=0;l<e.length;l++){const[u,c=u]=On(e[l]),d={},f={};let p=-1;if((t||o>0)&&!(n!=null&&n.noFilter)){if(typeof u=="object"){const y=i||Object.keys(c);for(const b of y){const w=Qn(c,b),S=(a=n==null?void 0:n.customKeyFilter)==null?void 0:a[b];if(p=S?S(w,t,u):s(w,t,u),p!==-1&&p!==!1)S?d[b]=p:f[b]=p;else if((n==null?void 0:n.filterMode)==="every")continue e}}else p=s(u,t,u),p!==-1&&p!==!1&&(f.title=p);const g=Object.keys(f).length,m=Object.keys(d).length;if(!g&&!m||(n==null?void 0:n.filterMode)==="union"&&m!==o&&!g||(n==null?void 0:n.filterMode)==="intersection"&&(m!==o||!g))continue}r.push({index:l,matches:{...f,...d}})}return r}function ZX(e,t,n,r){const s=B([]),i=B(new Map),o=I(()=>r!=null&&r.transform?Q(t).map(l=>[l,r.transform(l)]):Q(t));Un(()=>{const l=typeof n=="function"?n():Q(n),u=typeof l!="string"&&typeof l!="number"?"":String(l),c=JX(o.value,u,{customKeyFilter:{...e.customKeyFilter,...Q(r==null?void 0:r.customKeyFilter)},default:e.customFilter,filterKeys:e.filterKeys,filterMode:e.filterMode,noFilter:e.noFilter}),d=Q(t),f=[],p=new Map;c.forEach(g=>{let{index:m,matches:y}=g;const b=d[m];f.push(b),p.set(b.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 eQ=ce({expandOnClick:Boolean,showExpand:Boolean,expanded:{type:Array,default:()=>[]}},"DataTable-expand"),rM=Symbol.for("vuetify:datatable:expanded");function tQ(e){const t=Te(e,"expandOnClick"),n=rt(e,"expanded",e.expanded,a=>new Set(a),a=>[...a.values()]);function r(a,l){const u=new Set(n.value);l?u.add(a.value):u.delete(a.value),n.value=u}function s(a){return n.value.has(a.value)}function i(a){r(a,!s(a))}const o={expand:r,expanded:n,expandOnClick:t,isExpanded:s,toggleExpand:i};return Wt(rM,o),o}function sM(){const e=Ke(rM);if(!e)throw new Error("foo");return e}const nQ=ce({groupBy:{type:Array,default:()=>[]}},"DataTable-group"),iM=Symbol.for("vuetify:data-table-group");function rQ(e){return{groupBy:rt(e,"groupBy")}}function sQ(e){const{disableSort:t,groupBy:n,sortBy:r}=e,s=B(new Set),i=I(()=>n.value.map(c=>({...c,order:c.order??!1})).concat(t!=null&&t.value?[]:r.value));function o(c){return s.value.has(c.id)}function a(c){const d=new Set(s.value);o(c)?d.delete(c.id):d.add(c.id),s.value=d}function l(c){function d(f){const p=[];for(const g of f.items)"type"in g&&g.type==="group"?p.push(...d(g)):p.push(g);return p}return d({type:"group",items:c,id:"dummy",key:"dummy",value:"dummy",depth:0})}const u={sortByWithGroups:i,toggleGroup:a,opened:s,groupBy:n,extractRows:l,isGroupOpen:o};return Wt(iM,u),u}function oM(){const e=Ke(iM);if(!e)throw new Error("Missing group!");return e}function iQ(e,t){if(!e.length)return[];const n=new Map;for(const r of e){const s=Ma(r.raw,t);n.has(s)||n.set(s,[]),n.get(s).push(r)}return n}function aM(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=iQ(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?aM(a,o,n+1,c):a,type:"group"})}),i}function lM(e,t){const n=[];for(const r of e)"type"in r&&r.type==="group"?(r.value!=null&&n.push(r),(t.has(r.id)||r.value==null)&&n.push(...lM(r.items,t))):n.push(r);return n}function oQ(e,t,n){return{flatItems:I(()=>{if(!t.value.length)return e.value;const s=aM(e.value,t.value.map(i=>i.key));return lM(s,n.value)})}}function aQ(e){let{page:t,itemsPerPage:n,sortBy:r,groupBy:s,search:i}=e;const o=sn("VDataTable"),a=I(()=>({page:t.value,itemsPerPage:n.value,sortBy:r.value,groupBy:s.value,search:i.value}));let l=null;xe(a,()=>{Vo(l,a.value)||(l&&l.search!==a.value.search&&(t.value=1),o.emit("update:options",a.value),l=a.value)},{deep:!0,immediate:!0})}const lQ=ce({page:{type:[Number,String],default:1},itemsPerPage:{type:[Number,String],default:10}},"DataTable-paginate"),uM=Symbol.for("vuetify:data-table-pagination");function uQ(e){const t=rt(e,"page",void 0,r=>+(r??1)),n=rt(e,"itemsPerPage",void 0,r=>+(r??10));return{page:t,itemsPerPage:n}}function cQ(e){const{page:t,itemsPerPage:n,itemsLength:r}=e,s=I(()=>n.value===-1?0:n.value*(t.value-1)),i=I(()=>n.value===-1?r.value:Math.min(r.value,s.value+n.value)),o=I(()=>n.value===-1||r.value===0?1:Math.ceil(r.value/n.value));xe([t,o],()=>{t.value>o.value&&(t.value=o.value)});function a(f){n.value=f,t.value=1}function l(){t.value=Tr(t.value+1,1,o.value)}function u(){t.value=Tr(t.value-1,1,o.value)}function c(f){t.value=Tr(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 Wt(uM,d),d}function dQ(){const e=Ke(uM);if(!e)throw new Error("Missing pagination!");return e}function fQ(e){const t=sn("usePaginatedItems"),{items:n,startIndex:r,stopIndex:s,itemsPerPage:i}=e,o=I(()=>i.value<=0?n.value:n.value.slice(r.value,s.value));return xe(o,a=>{t.emit("update:currentItems",a)}),{paginatedItems:o}}const hQ={showSelectAll:!1,allSelected:()=>[],select:e=>{var r;let{items:t,value:n}=e;return new Set(n?[(r=t[0])==null?void 0:r.value]:[])},selectAll:e=>{let{selected:t}=e;return t}},cM={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 cM.select({items:n,value:t,selected:r})}},dM={showSelectAll:!0,allSelected:e=>{let{allItems:t}=e;return t},select:e=>{let{items:t,value:n,selected:r}=e;for(const s of t)n?r.add(s.value):r.delete(s.value);return r},selectAll:e=>{let{value:t,allItems:n,selected:r}=e;return dM.select({items:n,value:t,selected:r})}},pQ=ce({showSelect:Boolean,selectStrategy:{type:[String,Object],default:"page"},modelValue:{type:Array,default:()=>[]},valueComparator:{type:Function,default:Vo}},"DataTable-select"),fM=Symbol.for("vuetify:data-table-selection");function mQ(e,t){let{allItems:n,currentPage:r}=t;const s=rt(e,"modelValue",e.modelValue,b=>new Set(On(b).map(w=>{var S;return((S=n.value.find(C=>e.valueComparator(w,C.value)))==null?void 0:S.value)??w})),b=>[...b.values()]),i=I(()=>n.value.filter(b=>b.selectable)),o=I(()=>r.value.filter(b=>b.selectable)),a=I(()=>{if(typeof e.selectStrategy=="object")return e.selectStrategy;switch(e.selectStrategy){case"single":return hQ;case"all":return dM;case"page":default:return cM}});function l(b){return On(b).every(w=>s.value.has(w.value))}function u(b){return On(b).some(w=>s.value.has(w.value))}function c(b,w){const S=a.value.select({items:b,value:w,selected:new Set(s.value)});s.value=S}function d(b){c([b],!l([b]))}function f(b){const w=a.value.selectAll({value:b,allItems:i.value,currentPage:o.value,selected:new Set(s.value)});s.value=w}const p=I(()=>s.value.size>0),g=I(()=>{const b=a.value.allSelected({allItems:i.value,currentPage:o.value});return!!b.length&&l(b)}),m=I(()=>a.value.showSelectAll),y={toggleSelect:d,select:c,selectAll:f,isSelected:l,isSomeSelected:u,someSelected:p,allSelected:g,showSelectAll:m};return Wt(fM,y),y}function Im(){const e=Ke(fM);if(!e)throw new Error("Missing selection!");return e}const gQ=ce({sortBy:{type:Array,default:()=>[]},customKeySort:Object,multiSort:Boolean,mustSort:Boolean},"DataTable-sort"),hM=Symbol.for("vuetify:data-table-sort");function vQ(e){const t=rt(e,"sortBy"),n=Te(e,"mustSort"),r=Te(e,"multiSort");return{sortBy:t,mustSort:n,multiSort:r}}function yQ(e){const{sortBy:t,mustSort:n,multiSort:r,page:s}=e,i=l=>{if(l.key==null)return;let u=t.value.map(d=>({...d}))??[];const c=u.find(d=>d.key===l.key);c?c.order==="desc"?n.value?c.order="asc":u=u.filter(d=>d.key!==l.key):c.order="desc":r.value?u=[...u,{key:l.key,order:"asc"}]:u=[{key:l.key,order:"asc"}],t.value=u,s&&(s.value=1)};function o(l){return!!t.value.find(u=>u.key===l.key)}const a={sortBy:t,toggleSort:i,isSorted:o};return Wt(hM,a),a}function pM(){const e=Ke(hM);if(!e)throw new Error("Missing sort!");return e}function bQ(e,t,n,r){const s=Gr();return{sortedItems:I(()=>{var o,a;return n.value.length?wQ(t.value,n.value,s.current.value,{transform:r==null?void 0:r.transform,sortFunctions:{...e.customKeySort,...(o=r==null?void 0:r.sortFunctions)==null?void 0:o.value},sortRawFunctions:(a=r==null?void 0:r.sortRawFunctions)==null?void 0:a.value}):t.value})}}function wQ(e,t,n,r){const s=new Intl.Collator(n,{sensitivity:"accent",usage:"sort"});return e.map(o=>[o,r!=null&&r.transform?r.transform(o):o]).sort((o,a)=>{var l,u;for(let c=0;c<t.length;c++){let d=!1;const f=t[c].key,p=t[c].order??"asc";if(p===!1)continue;let g=Ma(o[1],f),m=Ma(a[1],f),y=o[0].raw,b=a[0].raw;if(p==="desc"&&([g,m]=[m,g],[y,b]=[b,y]),(l=r==null?void 0:r.sortRawFunctions)!=null&&l[f]){const w=r.sortRawFunctions[f](y,b);if(w==null)continue;if(d=!0,w)return w}if((u=r==null?void 0:r.sortFunctions)!=null&&u[f]){const w=r.sortFunctions[f](g,m);if(w==null)continue;if(d=!0,w)return w}if(!d){if(g instanceof Date&&m instanceof Date)return g.getTime()-m.getTime();if([g,m]=[g,m].map(w=>w!=null?w.toString().toLocaleLowerCase():w),g!==m)return rf(g)&&rf(m)?0:rf(g)?-1:rf(m)?1:!isNaN(g)&&!isNaN(m)?Number(g)-Number(m):s.compare(g,m)}}return 0}).map(o=>{let[a]=o;return a})}function SQ(){const e=B([]);SC(()=>e.value=[]);function t(n,r){e.value[r]=n}return{refs:e,updateRef:t}}const _Q=ce({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:Je,default:"$first"},prevIcon:{type:Je,default:"$prev"},nextIcon:{type:Je,default:"$next"},lastIcon:{type:Je,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,...fs(),...Ue(),...Or(),...ps(),...$n(),...bu(),...wt({tag:"nav"}),...Mt(),...As({variant:"text"})},"VPagination"),Fk=ke()({name:"VPagination",props:_Q(),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=rt(e,"modelValue"),{t:i,n:o}=Gr(),{isRtl:a}=$r(),{themeClasses:l}=Kt(e),{width:u}=ci(),c=Oe(-1);Ar(void 0,{scoped:!0});const{resizeRef:d}=Da(x=>{if(!x.length)return;const{target:E,contentRect:P}=x[0],M=E.querySelector(".v-pagination__list > *");if(!M)return;const O=P.width,A=M.offsetWidth+parseFloat(getComputedStyle(M).marginRight)*2;c.value=m(O,A)}),f=I(()=>parseInt(e.length,10)),p=I(()=>parseInt(e.start,10)),g=I(()=>e.totalVisible!=null?parseInt(e.totalVisible,10):c.value>=0?c.value:m(u.value,58));function m(x,E){const P=e.showFirstLastPage?5:3;return Math.max(0,Math.floor(+((x-E*P)/E).toFixed(2)))}const y=I(()=>{if(f.value<=0||isNaN(f.value)||f.value>Number.MAX_SAFE_INTEGER)return[];if(g.value<=0)return[];if(g.value===1)return[s.value];if(f.value<=g.value)return vl(f.value,p.value);const x=g.value%2===0,E=x?g.value/2:Math.floor(g.value/2),P=x?E:E+1,M=f.value-E;if(P-s.value>=0)return[...vl(Math.max(1,g.value-1),p.value),e.ellipsis,f.value];if(s.value-M>=(x?1:0)){const O=g.value-1,A=f.value-O+p.value;return[p.value,e.ellipsis,...vl(O,A)]}else{const O=Math.max(1,g.value-3),A=O===1?s.value:s.value-Math.ceil(O/2)+p.value;return[p.value,e.ellipsis,...vl(O,A),e.ellipsis,f.value]}});function b(x,E,P){x.preventDefault(),s.value=E,P&&r(P,E)}const{refs:w,updateRef:S}=SQ();Ar({VPaginationBtn:{color:Te(e,"color"),border:Te(e,"border"),density:Te(e,"density"),size:Te(e,"size"),variant:Te(e,"variant"),rounded:Te(e,"rounded"),elevation:Te(e,"elevation")}});const C=I(()=>y.value.map((x,E)=>{const P=M=>S(M,E);if(typeof x=="string")return{isActive:!1,key:`ellipsis-${E}`,page:x,props:{ref:P,ellipsis:!0,icon:!0,disabled:!0}};{const M=x===s.value;return{isActive:M,key:x,page:o(x),props:{ref:P,ellipsis:!1,icon:!0,disabled:!!e.disabled||+e.length<2,color:M?e.activeColor:e.color,"aria-current":M,"aria-label":i(M?e.currentPageAriaLabel:e.pageAriaLabel,x),onClick:O=>b(O,x)}}}})),_=I(()=>{const x=!!e.disabled||s.value<=p.value,E=!!e.disabled||s.value>=p.value+f.value-1;return{first:e.showFirstLastPage?{icon:a.value?e.lastIcon:e.firstIcon,onClick:P=>b(P,p.value,"first"),disabled:x,"aria-label":i(e.firstAriaLabel),"aria-disabled":x}:void 0,prev:{icon:a.value?e.nextIcon:e.prevIcon,onClick:P=>b(P,s.value-1,"prev"),disabled:x,"aria-label":i(e.previousAriaLabel),"aria-disabled":x},next:{icon:a.value?e.prevIcon:e.nextIcon,onClick:P=>b(P,s.value+1,"next"),disabled:E,"aria-label":i(e.nextAriaLabel),"aria-disabled":E},last:e.showFirstLastPage?{icon:a.value?e.firstIcon:e.lastIcon,onClick:P=>b(P,p.value+f.value-1,"last"),disabled:E,"aria-label":i(e.lastAriaLabel),"aria-disabled":E}:void 0}});function R(){var E;const x=s.value-p.value;(E=w.value[x])==null||E.$el.focus()}function T(x){x.key===w_.left&&!e.disabled&&s.value>+e.start?(s.value=s.value-1,At(R)):x.key===w_.right&&!e.disabled&&s.value<p.value+f.value-1&&(s.value=s.value+1,At(R))}return Pe(()=>h(e.tag,{ref:d,class:["v-pagination",l.value,e.class],style:e.style,role:"navigation","aria-label":i(e.ariaLabel),onKeydown:T,"data-test":"v-pagination-root"},{default:()=>[h("ul",{class:"v-pagination__list"},[e.showFirstLastPage&&h("li",{key:"first",class:"v-pagination__first","data-test":"v-pagination-first"},[n.first?n.first(_.value.first):h(re,ve({_as:"VPaginationBtn"},_.value.first),null)]),h("li",{key:"prev",class:"v-pagination__prev","data-test":"v-pagination-prev"},[n.prev?n.prev(_.value.prev):h(re,ve({_as:"VPaginationBtn"},_.value.prev),null)]),C.value.map((x,E)=>h("li",{key:x.key,class:["v-pagination__item",{"v-pagination__item--is-active":x.isActive}],"data-test":"v-pagination-item"},[n.item?n.item(x):h(re,ve({_as:"VPaginationBtn"},x.props),{default:()=>[x.page]})])),h("li",{key:"next",class:"v-pagination__next","data-test":"v-pagination-next"},[n.next?n.next(_.value.next):h(re,ve({_as:"VPaginationBtn"},_.value.next),null)]),e.showFirstLastPage&&h("li",{key:"last",class:"v-pagination__last","data-test":"v-pagination-last"},[n.last?n.last(_.value.last):h(re,ve({_as:"VPaginationBtn"},_.value.last),null)])])]})),{}}}),mM=ce({prevIcon:{type:Je,default:"$prev"},nextIcon:{type:Je,default:"$next"},firstIcon:{type:Je,default:"$first"},lastIcon:{type:Je,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"),Nk=ke()({name:"VDataTableFooter",props:mM(),setup(e,t){let{slots:n}=t;const{t:r}=Gr(),{page:s,pageCount:i,startIndex:o,stopIndex:a,itemsLength:l,itemsPerPage:u,setItemsPerPage:c}=dQ(),d=I(()=>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 Pe(()=>{var p;const f=Fk.filterProps(e);return h("div",{class:"v-data-table-footer"},[(p=n.prepend)==null?void 0:p.call(n),h("div",{class:"v-data-table-footer__items-per-page"},[h("span",null,[r(e.itemsPerPageText)]),h(Oo,{items:d.value,modelValue:u.value,"onUpdate:modelValue":g=>c(Number(g)),density:"compact",variant:"outlined","hide-details":!0},null)]),h("div",{class:"v-data-table-footer__info"},[h("div",null,[r(e.pageText,l.value?o.value+1:0,a.value,l.value)])]),h("div",{class:"v-data-table-footer__pagination"},[h(Fk,ve({modelValue:s.value,"onUpdate:modelValue":g=>s.value=g,density:"comfortable","first-aria-label":e.firstPageLabel,"last-aria-label":e.lastPageLabel,length:i.value,"next-aria-label":e.nextPageLabel,"previous-aria-label":e.prevPageLabel,rounded:!0,"show-first-last-page":!0,"total-visible":e.showCurrentPage?1:0,variant:"plain"},f),null)])])}),{}}}),pp=qF({align:{type:String,default:"start"},fixed:Boolean,fixedOffset:[Number,String],height:[Number,String],lastFixed:Boolean,noPadding:Boolean,tag:String,width:[Number,String],maxWidth:[Number,String],nowrap:Boolean},(e,t)=>{let{slots:n}=t;const r=e.tag??"td";return h(r,{class:["v-data-table__td",{"v-data-table-column--fixed":e.fixed,"v-data-table-column--last-fixed":e.lastFixed,"v-data-table-column--no-padding":e.noPadding,"v-data-table-column--nowrap":e.nowrap},`v-data-table-column--align-${e.align}`],style:{height:Ve(e.height),width:Ve(e.width),maxWidth:Ve(e.maxWidth),left:Ve(e.fixedOffset||null)}},{default:()=>{var s;return[(s=n.default)==null?void 0:s.call(n)]}})}),kQ=ce({headers:Array},"DataTable-header"),gM=Symbol.for("vuetify:data-table-headers"),vM={title:"",sortable:!1},xQ={...vM,width:48};function EQ(){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 Qy(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)Qy(n,t);return t}function yM(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&&yM(n.children,t);return t}function CQ(e){if(e.key){if(e.key==="data-table-group")return vM;if(["data-table-expand","data-table-select"].includes(e.key))return xQ}}function rS(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.children?Math.max(t,...e.children.map(n=>rS(n,t+1))):t}function TQ(e){let t=!1;function n(i){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(i)if(o&&(i.fixed=!0),i.fixed)if(i.children)for(let a=i.children.length-1;a>=0;a--)n(i.children[a],!0);else t?isNaN(+i.width)&&(`${i.key}`,void 0):i.lastFixed=!0,t=!0;else if(i.children)for(let a=i.children.length-1;a>=0;a--)n(i.children[a]);else t=!1}for(let i=e.length-1;i>=0;i--)n(e[i]);function r(i){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(!i)return o;if(i.children){i.fixedOffset=o;for(const a of i.children)o=r(a,o)}else i.fixed&&(i.fixedOffset=o,o+=parseFloat(i.width||"0")||0);return o}let s=0;for(const i of e)s=r(i,s)}function RQ(e,t){const n=[];let r=0;const s=EQ(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-rS(u);if(a.push({...u,rowspan:d??1,colspan:u.children?Qy(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=>Qy(o)).flat(),headers:n}}function bM(e){const t=[];for(const n of e){const r={...CQ(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 PQ(e,t){const n=B([]),r=B([]),s=B({}),i=B({}),o=B({});Un(()=>{var m,y,b;const u=(e.headers||Object.keys(e.items[0]??{}).map(w=>({key:w,title:li(w)}))).slice(),c=yM(u);(m=t==null?void 0:t.groupBy)!=null&&m.value.length&&!c.has("data-table-group")&&u.unshift({key:"data-table-group",title:"Group"}),(y=t==null?void 0:t.showSelect)!=null&&y.value&&!c.has("data-table-select")&&u.unshift({key:"data-table-select"}),(b=t==null?void 0:t.showExpand)!=null&&b.value&&!c.has("data-table-expand")&&u.push({key:"data-table-expand"});const d=bM(u);TQ(d);const f=Math.max(...d.map(w=>rS(w)))+1,p=RQ(d,f);n.value=p.headers,r.value=p.columns;const g=p.headers.flat(1);for(const w of g)w.key&&(w.sortable&&(w.sort&&(s.value[w.key]=w.sort),w.sortRaw&&(i.value[w.key]=w.sortRaw)),w.filter&&(o.value[w.key]=w.filter))});const a={headers:n,columns:r,sortFunctions:s,sortRawFunctions:i,filterFunctions:o};return Wt(gM,a),a}function Am(){const e=Ke(gM);if(!e)throw new Error("Missing headers!");return e}const wM=ce({color:String,sticky:Boolean,disableSort:Boolean,multiSort:Boolean,sortAscIcon:{type:Je,default:"$sortAsc"},sortDescIcon:{type:Je,default:"$sortDesc"},headerProps:{type:Object},...Ka(),...jp()},"VDataTableHeaders"),Vk=ke()({name:"VDataTableHeaders",props:wM(),setup(e,t){let{slots:n}=t;const{t:r}=Gr(),{toggleSort:s,sortBy:i,isSorted:o}=pM(),{someSelected:a,allSelected:l,selectAll:u,showSelectAll:c}=Im(),{columns:d,headers:f}=Am(),{loaderClasses:p}=Md(e);function g(x,E){if(!(!e.sticky&&!x.fixed))return{position:"sticky",left:x.fixed?Ve(x.fixedOffset):void 0,top:e.sticky?`calc(var(--v-table-header-height) * ${E})`:void 0}}function m(x){const E=i.value.find(P=>P.key===x.key);return E?E.order==="asc"?e.sortAscIcon:e.sortDescIcon:e.sortAscIcon}const{backgroundColorClasses:y,backgroundColorStyles:b}=fr(e,"color"),{displayClasses:w,mobile:S}=ci(e),C=I(()=>({headers:f.value,columns:d.value,toggleSort:s,isSorted:o,sortBy:i.value,someSelected:a.value,allSelected:l.value,selectAll:u,getSortIcon:m})),_=I(()=>["v-data-table__th",{"v-data-table__th--sticky":e.sticky},w.value,p.value]),R=x=>{let{column:E,x:P,y:M}=x;const O=E.key==="data-table-select"||E.key==="data-table-expand",A=ve(e.headerProps??{},E.headerProps??{});return h(pp,ve({tag:"th",align:E.align,class:[{"v-data-table__th--sortable":E.sortable&&!e.disableSort,"v-data-table__th--sorted":o(E),"v-data-table__th--fixed":E.fixed},..._.value],style:{width:Ve(E.width),minWidth:Ve(E.minWidth),maxWidth:Ve(E.maxWidth),...g(E,M)},colspan:E.colspan,rowspan:E.rowspan,onClick:E.sortable?()=>s(E):void 0,fixed:E.fixed,nowrap:E.nowrap,lastFixed:E.lastFixed,noPadding:O},A),{default:()=>{var z;const D=`header.${E.key}`,H={column:E,selectAll:u,isSorted:o,toggleSort:s,sortBy:i.value,someSelected:a.value,allSelected:l.value,getSortIcon:m};return n[D]?n[D](H):E.key==="data-table-select"?((z=n["header.data-table-select"])==null?void 0:z.call(n,H))??(c.value&&h(du,{modelValue:l.value,indeterminate:a.value&&!l.value,"onUpdate:modelValue":u},null)):h("div",{class:"v-data-table-header__content"},[h("span",null,[E.title]),E.sortable&&!e.disableSort&&h(X,{key:"icon",class:"v-data-table-header__sort-icon",icon:m(E)},null),e.multiSort&&o(E)&&h("div",{key:"badge",class:["v-data-table-header__sort-badge",...y.value],style:b.value},[i.value.findIndex(Y=>Y.key===E.key)+1])])}})},T=()=>{const x=ve(e.headerProps??{}??{}),E=I(()=>d.value.filter(M=>(M==null?void 0:M.sortable)&&!e.disableSort)),P=I(()=>{if(d.value.find(O=>O.key==="data-table-select")!=null)return l.value?"$checkboxOn":a.value?"$checkboxIndeterminate":"$checkboxOff"});return h(pp,ve({tag:"th",class:[..._.value],colspan:f.value.length+1},x),{default:()=>[h("div",{class:"v-data-table-header__content"},[h(Oo,{chips:!0,class:"v-data-table__td-sort-select",clearable:!0,density:"default",items:E.value,label:r("$vuetify.dataTable.sortBy"),multiple:e.multiSort,variant:"underlined","onClick:clear":()=>i.value=[],appendIcon:P.value,"onClick:append":()=>u(!l.value)},{...n,chip:M=>{var O;return h(Sn,{onClick:(O=M.item.raw)!=null&&O.sortable?()=>s(M.item.raw):void 0,onMousedown:A=>{A.preventDefault(),A.stopPropagation()}},{default:()=>[M.item.title,h(X,{class:["v-data-table__td-sort-icon",o(M.item.raw)&&"v-data-table__td-sort-icon-active"],icon:m(M.item.raw),size:"small"},null)]})}})])]})};Pe(()=>S.value?h("tr",null,[h(T,null,null)]):h(Ce,null,[n.headers?n.headers(C.value):f.value.map((x,E)=>h("tr",null,[x.map((P,M)=>h(R,{column:P,x:M,y:E},null))])),e.loading&&h("tr",{class:"v-data-table-progress"},[h("th",{colspan:d.value.length},[h(qp,{name:"v-data-table-progress",absolute:!0,active:!0,color:typeof e.loading=="boolean"?void 0:e.loading,indeterminate:!0},{default:n.loader})])])]))}}),IQ=ce({item:{type:Object,required:!0}},"VDataTableGroupHeaderRow"),AQ=ke()({name:"VDataTableGroupHeaderRow",props:IQ(),setup(e,t){let{slots:n}=t;const{isGroupOpen:r,toggleGroup:s,extractRows:i}=oM(),{isSelected:o,isSomeSelected:a,select:l}=Im(),{columns:u}=Am(),c=I(()=>i([e.item]));return()=>h("tr",{class:"v-data-table-group-header-row",style:{"--v-data-table-group-header-row-depth":e.item.depth}},[u.value.map(d=>{var f,p;if(d.key==="data-table-group"){const g=r(e.item)?"$expand":"$next",m=()=>s(e.item);return((f=n["data-table-group"])==null?void 0:f.call(n,{item:e.item,count:c.value.length,props:{icon:g,onClick:m}}))??h(pp,{class:"v-data-table-group-header-row__column"},{default:()=>[h(re,{size:"small",variant:"text",icon:g,onClick:m},null),h("span",null,[e.item.value]),h("span",null,[k("("),c.value.length,k(")")])]})}if(d.key==="data-table-select"){const g=o(c.value),m=a(c.value)&&!g,y=b=>l(c.value,b);return((p=n["data-table-select"])==null?void 0:p.call(n,{props:{modelValue:g,indeterminate:m,"onUpdate:modelValue":y}}))??h("td",null,[h(du,{modelValue:g,indeterminate:m,"onUpdate:modelValue":y},null)])}return h("td",null,null)})])}}),OQ=ce({index:Number,item:Object,cellProps:[Object,Function],onClick:Bn(),onContextmenu:Bn(),onDblclick:Bn(),...Ka()},"VDataTableRow"),MQ=ke()({name:"VDataTableRow",props:OQ(),setup(e,t){let{slots:n}=t;const{displayClasses:r,mobile:s}=ci(e,"v-data-table__tr"),{isSelected:i,toggleSelect:o,someSelected:a,allSelected:l,selectAll:u}=Im(),{isExpanded:c,toggleExpand:d}=sM(),{toggleSort:f,sortBy:p,isSorted:g}=pM(),{columns:m}=Am();Pe(()=>h("tr",{class:["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,b)=>{const w=e.item,S=`item.${y.key}`,C=`header.${y.key}`,_={index:e.index,item:w.raw,internalItem:w,value:Ma(w.columns,y.key),column:y,isSelected:i,toggleSelect:o,isExpanded:c,toggleExpand:d},R={column:y,selectAll:u,isSorted:g,toggleSort:f,sortBy:p.value,someSelected:a.value,allSelected:l.value,getSortIcon:()=>""},T=typeof e.cellProps=="function"?e.cellProps({index:_.index,item:_.item,internalItem:_.internalItem,value:_.value,column:y}):e.cellProps,x=typeof y.cellProps=="function"?y.cellProps({index:_.index,item:_.item,internalItem:_.internalItem,value:_.value}):y.cellProps;return h(pp,ve({align:y.align,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,lastFixed:y.lastFixed,maxWidth:s.value?void 0:y.maxWidth,noPadding:y.key==="data-table-select"||y.key==="data-table-expand",nowrap:y.nowrap,width:s.value?void 0:y.width},T,x),{default:()=>{var P,M,O,A,D;if(n[S]&&!s.value)return(P=n[S])==null?void 0:P.call(n,_);if(y.key==="data-table-select")return((M=n["item.data-table-select"])==null?void 0:M.call(n,_))??h(du,{disabled:!w.selectable,modelValue:i([w]),onClick:Dt(()=>o(w),["stop"])},null);if(y.key==="data-table-expand")return((O=n["item.data-table-expand"])==null?void 0:O.call(n,_))??h(re,{icon:c(w)?"$collapse":"$expand",size:"small",variant:"text",onClick:Dt(()=>d(w),["stop"])},null);const E=ie(_.value);return s.value?h(Ce,null,[h("div",{class:"v-data-table__td-title"},[((A=n[C])==null?void 0:A.call(n,R))??y.title]),h("div",{class:"v-data-table__td-value"},[((D=n[S])==null?void 0:D.call(n,_))??E])]):E}})})]))}}),SM=ce({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],...Ka()},"VDataTableRows"),Bk=ke()({name:"VDataTableRows",inheritAttrs:!1,props:SM(),setup(e,t){let{attrs:n,slots:r}=t;const{columns:s}=Am(),{expandOnClick:i,toggleExpand:o,isExpanded:a}=sM(),{isSelected:l,toggleSelect:u}=Im(),{toggleGroup:c,isGroupOpen:d}=oM(),{t:f}=Gr(),{mobile:p}=ci(e);return Pe(()=>{var g,m;return e.loading&&(!e.items.length||r.loading)?h("tr",{class:"v-data-table-rows-loading",key:"loading"},[h("td",{colspan:s.value.length},[((g=r.loading)==null?void 0:g.call(r))??f(e.loadingText)])]):!e.loading&&!e.items.length&&!e.hideNoData?h("tr",{class:"v-data-table-rows-no-data",key:"no-data"},[h("td",{colspan:s.value.length},[((m=r["no-data"])==null?void 0:m.call(r))??f(e.noDataText)])]):h(Ce,null,[e.items.map((y,b)=>{var C;if(y.type==="group"){const _={index:b,item:y,columns:s.value,isExpanded:a,toggleExpand:o,isSelected:l,toggleSelect:u,toggleGroup:c,isGroupOpen:d};return r["group-header"]?r["group-header"](_):h(AQ,ve({key:`group-header_${y.id}`,item:y},V_(n,":group-header",()=>_)),r)}const w={index:b,item:y.raw,internalItem:y,columns:s.value,isExpanded:a,toggleExpand:o,isSelected:l,toggleSelect:u},S={...w,props:ve({key:`item_${y.key??y.index}`,onClick:i.value?()=>{o(y)}:void 0,index:b,item:y,cellProps:e.cellProps,mobile:p.value},V_(n,":row",()=>w),typeof e.rowProps=="function"?e.rowProps({item:w.item,index:w.index,internalItem:w.internalItem}):e.rowProps)};return h(Ce,{key:S.props.key},[r.item?r.item(S):h(MQ,S.props,r),a(y)&&((C=r["expanded-row"])==null?void 0:C.call(r,w))])})])}),{}}}),_M=ce({fixedHeader:Boolean,fixedFooter:Boolean,height:[Number,String],hover:Boolean,...Ue(),...Or(),...wt(),...Mt()},"VTable"),Jy=ke()({name:"VTable",props:_M(),setup(e,t){let{slots:n,emit:r}=t;const{themeClasses:s}=Kt(e),{densityClasses:i}=hs(e);return Pe(()=>h(e.tag,{class:["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},s.value,i.value,e.class],style:e.style},{default:()=>{var o,a,l;return[(o=n.top)==null?void 0:o.call(n),n.default?h("div",{class:"v-table__wrapper",style:{height:Ve(e.height)}},[h("table",null,[n.default()])]):(a=n.wrapper)==null?void 0:a.call(n),(l=n.bottom)==null?void 0:l.call(n)]}})),{}}}),DQ=ce({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 $Q(e,t,n,r){const s=e.returnObject?t:Qn(t,e.itemValue),i=Qn(t,e.itemSelectable,!0),o=r.reduce((a,l)=>(l.key!=null&&(a[l.key]=Qn(t,l.value)),a),{});return{type:"item",key:e.returnObject?Qn(t,e.itemValue):s,index:n,value:s,selectable:i,columns:o,raw:t}}function LQ(e,t,n){return t.map((r,s)=>$Q(e,r,s,n))}function FQ(e,t){return{items:I(()=>LQ(e,e.items,t.value))}}const NQ=ce({...SM(),hideDefaultBody:Boolean,hideDefaultFooter:Boolean,hideDefaultHeader:Boolean,width:[String,Number],search:String,...eQ(),...nQ(),...kQ(),...DQ(),...pQ(),...gQ(),...wM(),..._M()},"DataTable"),VQ=ce({...lQ(),...NQ(),...QX(),...mM()},"VDataTable"),BQ=ke()({name:"VDataTable",props:VQ(),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}=rQ(e),{sortBy:i,multiSort:o,mustSort:a}=vQ(e),{page:l,itemsPerPage:u}=uQ(e),{disableSort:c}=Fo(e),{columns:d,headers:f,sortFunctions:p,sortRawFunctions:g,filterFunctions:m}=PQ(e,{groupBy:s,showSelect:Te(e,"showSelect"),showExpand:Te(e,"showExpand")}),{items:y}=FQ(e,d),b=Te(e,"search"),{filteredItems:w}=ZX(e,y,b,{transform:ee=>ee.columns,customKeyFilter:m}),{toggleSort:S}=yQ({sortBy:i,multiSort:o,mustSort:a,page:l}),{sortByWithGroups:C,opened:_,extractRows:R,isGroupOpen:T,toggleGroup:x}=sQ({groupBy:s,sortBy:i,disableSort:c}),{sortedItems:E}=bQ(e,w,C,{transform:ee=>({...ee.raw,...ee.columns}),sortFunctions:p,sortRawFunctions:g}),{flatItems:P}=oQ(E,s,_),M=I(()=>P.value.length),{startIndex:O,stopIndex:A,pageCount:D,setItemsPerPage:H}=cQ({page:l,itemsPerPage:u,itemsLength:M}),{paginatedItems:z}=fQ({items:P,startIndex:O,stopIndex:A,itemsPerPage:u}),Y=I(()=>R(z.value)),{isSelected:q,select:V,selectAll:G,toggleSelect:te,someSelected:W,allSelected:J}=mQ(e,{allItems:y,currentPage:Y}),{isExpanded:pe,toggleExpand:ae}=tQ(e);aQ({page:l,itemsPerPage:u,sortBy:i,groupBy:s,search:b}),Ar({VDataTableRows:{hideNoData:Te(e,"hideNoData"),noDataText:Te(e,"noDataText"),loading:Te(e,"loading"),loadingText:Te(e,"loadingText")}});const oe=I(()=>({page:l.value,itemsPerPage:u.value,sortBy:i.value,pageCount:D.value,toggleSort:S,setItemsPerPage:H,someSelected:W.value,allSelected:J.value,isSelected:q,select:V,selectAll:G,toggleSelect:te,isExpanded:pe,toggleExpand:ae,isGroupOpen:T,toggleGroup:x,items:Y.value.map(ee=>ee.raw),internalItems:Y.value,groupedItems:z.value,columns:d.value,headers:f.value}));return Pe(()=>{const ee=Nk.filterProps(e),me=Vk.filterProps(e),ne=Bk.filterProps(e),U=Jy.filterProps(e);return h(Jy,ve({class:["v-data-table",{"v-data-table--show-select":e.showSelect,"v-data-table--loading":e.loading},e.class],style:e.style},U),{top:()=>{var Fe;return(Fe=r.top)==null?void 0:Fe.call(r,oe.value)},default:()=>{var Fe,at,F,N,K,de;return r.default?r.default(oe.value):h(Ce,null,[(Fe=r.colgroup)==null?void 0:Fe.call(r,oe.value),!e.hideDefaultHeader&&h("thead",{key:"thead"},[h(Vk,me,r)]),(at=r.thead)==null?void 0:at.call(r,oe.value),!e.hideDefaultBody&&h("tbody",null,[(F=r["body.prepend"])==null?void 0:F.call(r,oe.value),r.body?r.body(oe.value):h(Bk,ve(n,ne,{items:z.value}),r),(N=r["body.append"])==null?void 0:N.call(r,oe.value)]),(K=r.tbody)==null?void 0:K.call(r,oe.value),(de=r.tfoot)==null?void 0:de.call(r,oe.value)])},bottom:()=>r.bottom?r.bottom(oe.value):!e.hideDefaultFooter&&h(Ce,null,[h(fn,null,null),h(Nk,ee,{prepend:r["footer.prepend"]})])})}),{}}}),UQ=ce({...Ue(),...G6()},"VForm"),sS=ke()({name:"VForm",props:UQ(),emits:{"update:modelValue":e=>!0,submit:e=>!0},setup(e,t){let{slots:n,emit:r}=t;const s=K6(e),i=B();function o(l){l.preventDefault(),s.reset()}function a(l){const u=l,c=s.validate();u.then=c.then.bind(c),u.catch=c.catch.bind(c),u.finally=c.finally.bind(c),r("submit",u),u.defaultPrevented||c.then(d=>{var p;let{valid:f}=d;f&&((p=i.value)==null||p.submit())}),u.preventDefault()}return Pe(()=>{var l;return h("form",{ref:i,class:["v-form",e.class],style:e.style,novalidate:!0,onReset:o,onSubmit:a},[(l=n.default)==null?void 0:l.call(n,s)])}),zi(s,i)}}),HQ=ce({disabled:Boolean,modelValue:{type:Boolean,default:null},...Hb()},"VHover"),Uk=ke()({name:"VHover",props:HQ(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:n}=t;const r=rt(e,"modelValue"),{runOpenDelay:s,runCloseDelay:i}=zb(e,o=>!e.disabled&&(r.value=o));return()=>{var o;return(o=n.default)==null?void 0:o.call(n,{isHovering:r.value,props:{onMouseenter:s,onMouseleave:i}})}}}),zQ={class:"mt-4 mb-4"},jQ={key:0},qQ={key:1},WQ={key:0},GQ={key:1},KQ=["colspan"],YQ=De({__name:"PrintersView",setup(e){const t=Ot(),n=Lt(),r=B(!1),s=nr(),i=qi(),o=ji(),a=en(tn.AddOrUpdatePrinterDialog),l=B([]),u=B([]),c=B(""),d=B(""),f=B(),p=B(""),g=B([]),m=I(()=>o.hasFeature("printerGroupsApi")),y=I(()=>[{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 b(){return r.value=!0,await o.loadFeatures(),o.hasFeature("printerGroupsApi")&&(l.value=await ll.getGroupsWithPrinters()),r.value=!1,l}const w=jw({queryKey:["printerGroups"],queryFn:b}),S=I(()=>{var J;if(!o.hasFeature("printerGroupsApi")||!((J=u.value)!=null&&J.length))return n.printers;const W=u.value.flatMap(pe=>pe.printers.map(ae=>ae.printerId))||[];return n.printers.filter(pe=>W.includes(pe.id))}),C=I(()=>s.printerCurrentEventReceivedAtById),_=I(()=>{if(!(!f.value&&f.value!==0))return l.value[f.value]}),R=W=>W?(Date.now()-W)/1e3:void 0,T=W=>l.value.filter(J=>J.printers.find(pe=>pe.printerId===W)),x=W=>l.value.filter(J=>!J.printers.find(pe=>pe.printerId===W)),E=W=>i.floorOfPrinter(W),P=W=>{n.setUpdateDialogPrinter(W),a.openDialog(W)},M=()=>{a.openDialog()},O=(W,J)=>{if(console.log(W,J),J.isExpanded){const pe=g.value.findIndex(ae=>ae===W.id);g.value.splice(pe,1)}else g.value.push(W.id.toString())},A=()=>{en(tn.ImportOctoFarmDialog).openDialog()},D=()=>{en(tn.YamlImportExport).openDialog()},H=async()=>{var W,J;if(!((J=(W=c.value)==null?void 0:W.trim())!=null&&J.length))throw new Error("Please set a non-empty group name");await ll.createGroup(c.value.trim()),await w.refetch(),c.value="",t.info("Created group")},z=()=>{var W;_.value&&(d.value=(W=_.value)==null?void 0:W.name)},Y=async W=>{var pe,ae;if(!(W!=null&&W.id))throw new Error("Group id was not defined");if(!l.value.find(oe=>oe.id===W.id))throw new Error("Group was not found, please reload the page");if(!((ae=(pe=d.value)==null?void 0:pe.trim())!=null&&ae.length))throw new Error("Please set a non-empty group name");await ll.updateGroupName(W.id,d.value.trim()),await w.refetch()},q=async W=>{const J=l.value.find(ae=>ae.id===W);if(!J)throw new Error("Group was not found, please reload the page");const pe=J.printers.length;pe>0&&!confirm(`This group contains ${pe} printers, are you sure to delete it?`)||(await ll.deleteGroup(W),await w.refetch(),t.info("Deleted group"))},V=async(W,J)=>{await ll.addPrinterToGroup(W,J),await w.refetch(),t.info("Added printer to group")},G=async(W,J)=>{await ll.deletePrinterFromGroup(W,J),await w.refetch(),t.info("Removed printer from group")},te=async W=>{if(!W.id)throw new Error("Printer ID not set, cant toggle enabled");W.enabled=!W.enabled,await jt.toggleEnabled(W.id,W.enabled)};return(W,J)=>{const pe=Vn("v-list-item-group");return L(),ye("div",null,[h(bt,null,{default:v(()=>[h(on,null,{default:v(()=>[J[11]||(J[11]=k(" Printers ")),h(vn),m.value&&l.value.length?(L(),Z(Oo,{key:0,modelValue:u.value,"onUpdate:modelValue":J[0]||(J[0]=ae=>u.value=ae),multiple:"",items:l.value,"item-title":"name","return-object":!0,placeholder:"Select group to filter by","prepend-icon":"filter_list",label:"Filter by groups"},null,8,["modelValue","items"])):he("",!0),h(ct,{modelValue:p.value,"onUpdate:modelValue":J[1]||(J[1]=ae=>p.value=ae),class:"p-2",clearable:"",label:"Printer search","prepend-icon":"search","single-line":""},null,8,["modelValue"])]),_:1}),h(Q(BQ),{expanded:g.value,headers:y.value,items:S.value,search:p.value,"single-expand":"",class:"elevation-1","item-key":"id","show-expand":"","onClick:row":O},_C({"no-data":v(()=>[$("div",zQ,[S.value.length===0?(L(),ye("h3",jQ," No printer has been created yet. Create one here: ")):(L(),ye("h3",qQ," No printer has been found. Adjust your filters or search criteria. ")),h(KX)])]),top:v(()=>[h(mr,{flat:""},{default:v(()=>[h(Rn,null,{default:v(()=>[k(" Showing "+ie(S.value.length||0)+" printers ",1)]),_:1}),h(re,{class:"ml-3",variant:"outlined",type:"button",onClick:J[2]||(J[2]=ae=>A())},{default:v(()=>[h(X,null,{default:v(()=>J[12]||(J[12]=[k("publish")])),_:1}),J[13]||(J[13]=k(" Import OctoFarm Printers "))]),_:1}),h(re,{class:"ml-3",variant:"outlined",type:"button",onClick:J[3]||(J[3]=ae=>M())},{default:v(()=>[h(X,null,{default:v(()=>J[14]||(J[14]=[k("add")])),_:1}),J[15]||(J[15]=k(" Create Printer "))]),_:1}),h(re,{class:"ml-3",color:"primary",type:"button",onClick:J[4]||(J[4]=ae=>D())},{default:v(()=>[h(X,null,{default:v(()=>J[16]||(J[16]=[k("publish")])),_:1}),J[17]||(J[17]=k(" Import/Export YAML "))]),_:1}),h(vn)]),_:1})]),"item.enabled":v(({item:ae})=>[h(hp,{modelValue:ae.enabled,"onUpdate:modelValue":oe=>ae.enabled=oe,color:"primary",inset:"",onClickCapture:Dt(oe=>te(ae),["stop"])},{default:v(()=>[k(ie(ae.enabled),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onClickCapture"])]),"item.printerType":v(({item:ae})=>[k(ie(Q(EA)(ae.printerType)),1)]),"item.name":v(({item:ae})=>[h(Sn,null,{default:v(()=>[k(ie(ae.name||ae.printerURL),1)]),_:2},1024)]),"item.floor":v(({item:ae})=>[ae.id?(L(),Z(Sn,{key:0},{default:v(()=>{var oe;return[k(ie((oe=E(ae.id))==null?void 0:oe.name),1)]}),_:2},1024)):he("",!0)]),"item.actions":v(({item:ae})=>[h(BX,{printer:ae},null,8,["printer"]),h(qX,{printer:ae},null,8,["printer"]),h(WX,{printer:ae},null,8,["printer"]),h(GX,{printer:ae},null,8,["printer"]),h(YX,{printer:ae},null,8,["printer"]),h(zX,{printer:ae,"onUpdate:show":oe=>P(ae)},null,8,["printer","onUpdate:show"])]),"item.socketupdate":v(({item:ae})=>[C.value[ae.id]?(L(),ye("span",WQ," Updated "+ie(R(C.value[ae.id]))+" seconds ago ",1)):(L(),ye("span",GQ," No update received (silence) "))]),"expanded-row":v(({item:ae,columns:oe})=>[$("td",{colspan:oe.length},[h(VX,{printer:ae},null,8,["printer"])],8,KQ)]),_:2},[m.value?{name:"item.group",fn:v(({item:ae})=>[(L(!0),ye(Ce,null,qt(T(ae.id),oe=>(L(),Z(Sn,{key:oe.id,closable:"",size:"small",class:"ml-2","onClick:close":ee=>G(oe.id,ae.id)},{default:v(()=>[k(ie(oe.name),1)]),_:2},1032,["onClick:close"]))),128)),h(Wd,{"offset-y":""},{activator:v(({props:oe})=>[h(Sn,ve({disabled:!l.value.length,class:"ml-2",size:"small"},oe),{default:v(()=>[h(X,{size:"small"},{default:v(()=>J[18]||(J[18]=[k("add")])),_:1})]),_:2},1040,["disabled"])]),default:v(()=>[h(Ft,{density:"compact",style:{border:"1px solid dimgray"}},{default:v(()=>[h(os,null,{default:v(()=>J[19]||(J[19]=[k(" ADD TO GROUP ")])),_:1}),h(pe,null,{default:v(()=>[(L(!0),ye(Ce,null,qt(x(ae.id),(oe,ee)=>(L(),Z(Le,{key:ee,onClick:me=>V(oe.id,ae.id)},{default:v(()=>[h(ut,null,{default:v(()=>[k(ie(oe.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?(L(),Z(bt,{key:0,class:"mt-4"},{default:v(()=>[h(on,null,{default:v(()=>J[20]||(J[20]=[k(" Printer Groups ")])),_:1}),h(Zt,null,{default:v(()=>[J[26]||(J[26]=$("h3",null,"Existing groups:",-1)),h(Tn,null,{default:v(()=>[h(ap,{modelValue:f.value,"onUpdate:modelValue":[J[5]||(J[5]=ae=>f.value=ae),J[6]||(J[6]=ae=>z())],"selected-class":"primary--text",column:""},{default:v(()=>[(L(!0),ye(Ce,null,qt(l.value,ae=>(L(),Z(Sn,{key:ae.id,size:"small",closable:"",class:"mr-3","onClick:close":oe=>q(ae.id)},{default:v(()=>[k(ie(ae.name),1)]),_:2},1032,["onClick:close"]))),128))]),_:1},8,["modelValue"])]),_:1}),J[27]||(J[27]=$("h3",{class:"mt-3"},"Update group name",-1)),h(Tn,null,{default:v(()=>[_.value?he("",!0):(L(),Z(nn,{key:0},{default:v(()=>J[21]||(J[21]=[k(" Select a group to update its name. ")])),_:1})),h(ct,{modelValue:d.value,"onUpdate:modelValue":J[7]||(J[7]=ae=>d.value=ae),disabled:!_.value,label:"Group Name",placeholder:"Type group name here"},{default:v(()=>J[22]||(J[22]=[k(" Name ")])),_:1},8,["modelValue","disabled"]),h(re,{onClick:J[8]||(J[8]=ae=>Y(_.value))},{default:v(()=>J[23]||(J[23]=[k(" Update name ")])),_:1})]),_:1}),J[28]||(J[28]=$("h3",{class:"mt-3"},"Add group",-1)),h(Tn,null,{default:v(()=>[h(ct,{modelValue:c.value,"onUpdate:modelValue":J[9]||(J[9]=ae=>c.value=ae),label:"Group Name",placeholder:"Type group name here"},{default:v(()=>J[24]||(J[24]=[k(" Name ")])),_:1},8,["modelValue"]),h(re,{onClick:J[10]||(J[10]=ae=>H())},{default:v(()=>J[25]||(J[25]=[k(" Create new group ")])),_:1})]),_:1})]),_:1})]),_:1})):he("",!0)])}}}),XQ=De({__name:"SettingsView",setup(e){const t=B([{title:"Grid",icon:"grid_on",path:"/settings/grid",divider:!1},{title:"Floors",icon:"house_siding",path:"/settings/floors",divider:!0},{title:"OctoPrint",icon:"image",path:"/settings/octoprint",divider:!1},{title:"Emergency Commands",icon:"warning",path:"/settings/emergency-commands",divider:!0},{title:"Users",icon:"group",path:"/settings/user-management",divider:!1},{title:"Account",icon:"account_circle",path:"/settings/account",divider:!1},{title:"Server Protection",icon:"security",path:"/settings/server-protection",divider:!0},{title:"Software Upgrade",icon:"upgrade",path:"/settings/software-upgrade",divider:!1},{title:"Diagnostics",icon:"bug_report",path:"/settings/diagnostics",divider:!1},{title:"Experimental",icon:"settings_applications",path:"/settings/experimental",divider:!1}]);return(n,r)=>{const s=Vn("router-view");return L(),ye("div",null,[h(ot,{"no-gutters":""},{default:v(()=>[h(Ow,{permanent:!0},{default:v(()=>[h(Le,null,{default:v(()=>[h(ut,{class:"text-h6"},{default:v(()=>r[0]||(r[0]=[k(" Settings ")])),_:1}),h(vt,null,{default:v(()=>r[1]||(r[1]=[k(" Adjust your Fdm Monster ")])),_:1})]),_:1}),h(fn),h(Ft,{density:"compact",nav:""},{default:v(()=>[(L(!0),ye(Ce,null,qt(Q(t),i=>(L(),Z(Le,{key:i.title,to:i.path,link:"","prepend-icon":i.icon,title:i.title,"router-link":"",style:ii(i.divider?"border-bottom: 1px solid gray":"")},null,8,["to","prepend-icon","title","style"]))),128))]),_:1})]),_:1}),h(He,null,{default:v(()=>[h(s)]),_:1})]),_:1})])}}});function QQ(e){const t=new Date(e);return new Intl.DateTimeFormat("default",{dateStyle:"long"}).format(t)}const JQ={key:0,class:"text--primary float-end mr-5 mt-2"},ZQ={class:"text-grey-darken-4"},eJ={key:0,class:"text-success"},tJ={key:1,class:"text-error"},nJ={key:0},rJ={key:0},sJ={key:0},iJ={key:1},oJ={key:0},aJ={key:1},lJ=De({__name:"UserManagementSettings",setup(e){const t=Ot(),n=B(!1),r=B(),s=B([]),i=B([]);async function o(){n.value=!0;try{r.value=await Zr.getProfile(),i.value=await Zr.listRoles(),s.value=await Zr.listUsers()}catch(m){throw n.value=!1,console.error(m),m}return n.value=!1,{users:s,roles:i,profile:r}}const a=jw({queryKey:["userRolesProfile"],queryFn:o});function l(m){return m.map(y=>{var b;return(b=i.value.find(w=>w.id==y))==null?void 0:b.name})}function u(m){var y;return m.id==((y=r.value)==null?void 0:y.id)}async function c(m){if(confirm(`Are you sure you want to delete ${m.username}?`)){try{n.value=!0,await Zr.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 Zr.setUserVerified(m.id,y),await a.refetch()}catch(b){throw n.value=!1,console.error(b),b}n.value=!1,t.info(y?`User ${m.username} verified`:`User ${m.username} unverified`)}}async function f(m,y=!0){var b;if((b=r.value)!=null&&b.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 Zr.setRootUser(m.id,y),await a.refetch()}catch(w){throw n.value=!1,console.error(w),w}n.value=!1,t.info(y?`User ${m.username} 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 Zr.setUserRoles(m.id,m.roles),await a.refetch(),t.info(`Roles updated for ${m.username}`)}catch(y){throw n.value=!1,console.error(y),t.error(`Failed to update roles for ${m.username}`),y}n.value=!1}async function g(){await en(tn.CreateUserDialog).openDialog()}return(m,y)=>{const b=Vn("v-list-item-content");return L(),Z(bt,null,{default:v(()=>[h(mr,{color:"primary"},{default:v(()=>{var w;return[h(lt,null,{default:v(()=>[h(X,null,{default:v(()=>y[1]||(y[1]=[k("settings")])),_:1})]),_:1}),h(Rn,null,{default:v(()=>y[2]||(y[2]=[k(" Users ")])),_:1}),h(vn),h(re,{disabled:!((w=r.value)!=null&&w.isRootUser),class:"mt-2",color:"primary",onClick:y[0]||(y[0]=S=>g())},{default:v(()=>[h(X,{class:"mr-2"},{default:v(()=>y[3]||(y[3]=[k("verified_user")])),_:1}),y[4]||(y[4]=$("span",null,"Create verified user",-1))]),_:1},8,["disabled"])]}),_:1}),n.value?(L(),Z(WO,{key:0,size:20,color:"#a70015",style:{margin:"250px",position:"absolute"}})):he("",!0),h(Ft,{lines:"three"},{default:v(()=>[h(os,null,{default:v(()=>y[5]||(y[5]=[k(" Showing all users ")])),_:1}),(L(!0),ye(Ce,null,qt(s.value,(w,S)=>(L(),Z(Le,{key:S,class:"pl-6",style:{"max-width":"800px","border-top":"1px solid grey","border-bottom":"1px solid grey"}},{default:v(()=>[h(b,{class:ja(u(w)?"pl-6 grey darken-3":"pl-6 grey darken-4")},{default:v(()=>[h(ut,null,{default:v(()=>[k(" User '"+ie(w.username)+"' ",1),u(w)?(L(),ye("strong",JQ," Your account ")):he("",!0)]),_:2},1024),h(vt),$("span",ZQ,[$("ul",null,[$("li",null,[w.isVerified?(L(),ye("span",eJ," Account verified ")):(L(),ye("span",tJ," Account not verified "))]),$("li",null,"Created at "+ie(Q(QQ)(w.createdAt)),1),w.isDemoUser?(L(),ye("li",nJ,"Demo user account")):he("",!0),$("li",null,[y[7]||(y[7]=k(" Role(s) ")),$("ul",null,[w.isRootUser?(L(),ye("li",rJ,[h(Sn,{class:"mb-2 mt-2",size:"small"},{default:v(()=>y[6]||(y[6]=[k(" OWNER ")])),_:1})])):he("",!0),(L(!0),ye(Ce,null,qt(l(w.roles),C=>(L(),ye("li",{key:C},[h(Sn,{class:"mb-2 mt-2",size:"small"},{default:v(()=>[k(ie(C),1)]),_:2},1024)]))),128))])])])])]),_:2},1032,["class"]),h(cu,null,{default:v(()=>{var C,_;return[h(re,{disabled:u(w)||w.isRootUser,color:w.isVerified?"error darken-4":"success",onClick:R=>d(w,!w.isVerified)},{default:v(()=>[h(X,{class:"mr-2"},{default:v(()=>y[8]||(y[8]=[k("shield")])),_:1}),w.isVerified?he("",!0):(L(),ye("span",sJ," Verify account ")),w.isVerified?(L(),ye("span",iJ," Un-verify account ")):he("",!0)]),_:2},1032,["disabled","color","onClick"]),h(re,{color:w.isRootUser?"error darken-4":"success",disabled:u(w)||!((C=r.value)!=null&&C.isRootUser),class:"mt-2",onClick:R=>f(w,!w.isRootUser)},{default:v(()=>[h(X,{class:"mr-2"},{default:v(()=>y[9]||(y[9]=[k("key")])),_:1}),w.isRootUser?(L(),ye("span",oJ," Remove owner ")):he("",!0),w.isRootUser?he("",!0):(L(),ye("span",aJ," Set owner "))]),_:2},1032,["color","disabled","onClick"]),(_=r.value)!=null&&_.isRootUser?(L(),Z(Oo,{key:0,items:i.value.map(R=>({text:R.name,value:R.id})),modelValue:w.roles,"onUpdate:modelValue":R=>w.roles=R,multiple:"",label:"Select roles",onChange:R=>p(w),class:"pt-6",style:{width:"15rem"}},null,8,["items","modelValue","onUpdate:modelValue","onChange"])):he("",!0),h(re,{disabled:u(w)||w.isRootUser,class:"mt-2",color:"error-darken-2",onClick:R=>c(w)},{default:v(()=>[h(X,{class:"mr-2"},{default:v(()=>y[10]||(y[10]=[k("delete")])),_:1}),y[11]||(y[11]=k(" Delete "))]),_:2},1032,["disabled","onClick"])]}),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1})}}}),uJ=De({name:"FdmSettings",props:{},setup:()=>({settingsStore:Ds(),printersStore:Lt(),snackbar:Ot(),printerStateStore:nr()}),data:()=>({fileHandlingSettings:{autoRemoveOldFilesBeforeUpload:!1,autoRemoveOldFilesAtBoot:!1,autoRemoveOldFilesCriteriumDays:7}}),computed:{},watch:{},async created(){const e=await Fn.getSettings();this.fileHandlingSettings=e.printerFileClean},mounted(){},methods:{async updateTimeoutSettings(){var e,t,n;if(!((t=(e=this.settingsStore.settings)==null?void 0:e.timeout)!=null&&t.apiTimeout)){this.snackbar.error("Timeout not set");return}this.settingsStore.settings.timeout.apiTimeout<1e3?this.snackbar.error("Timeout is too low - please set it to at least 1000 milliseconds"):(await this.settingsStore.updateTimeoutSettings((n=this.settingsStore.settings)==null?void 0:n.timeout),this.snackbar.info("Timeout settings updated"))},async setFileCleanSettings(){const e=await Fn.setFileCleanSettings(this.fileHandlingSettings);this.fileHandlingSettings=e.printerFileClean},async purgeFiles(){await xo.purgeFiles(),this.snackbar.openInfoMessage({title:"Successfully purged all references to printer files!"})},async bulkDisableGCodeAnalysis(){const e=this.printerStateStore.onlinePrinters;this.snackbar.openInfoMessage({title:`Trying to disable gcode analysis for ${e.length} online printers.`});for(const t of Object.values(e))await nM.setGCodeAnalysis(t.id,!1);this.snackbar.openInfoMessage({title:`Finished disabling gcode analysis for ${e.length} online printers.`})}}});function cJ(e,t,n,r,s,i){return L(),Z(bt,null,{default:v(()=>[h(mr,{color:"primary"},{default:v(()=>[h(lt,null,{default:v(()=>[h(X,null,{default:v(()=>t[8]||(t[8]=[k("settings")])),_:1})]),_:1}),h(Rn,null,{default:v(()=>t[9]||(t[9]=[k(" OctoPrint Settings ")])),_:1})]),_:1}),h(Ft,{lines:"three"},{default:v(()=>[h(Le,null,{default:v(()=>[h(ut,null,{default:v(()=>t[10]||(t[10]=[k(" Pre-upload file cleanup ")])),_:1}),h(vt,null,{default:v(()=>[t[12]||(t[12]=k(" Automatically cleanup old files to ensure the SD card has enough space. ")),t[13]||(t[13]=$("br",null,null,-1)),h(En,{modelValue:e.fileHandlingSettings.autoRemoveOldFilesBeforeUpload,"onUpdate:modelValue":t[0]||(t[0]=o=>e.fileHandlingSettings.autoRemoveOldFilesBeforeUpload=o),label:"Remove old file before upload"},null,8,["modelValue"]),h(ct,{modelValue:e.fileHandlingSettings.autoRemoveOldFilesCriteriumDays,"onUpdate:modelValue":t[1]||(t[1]=o=>e.fileHandlingSettings.autoRemoveOldFilesCriteriumDays=o),disabled:!e.fileHandlingSettings.autoRemoveOldFilesBeforeUpload,label:"Amount of days to keep files",min:"0",variant:"outlined",type:"number"},null,8,["modelValue","disabled"]),h(En,{modelValue:e.fileHandlingSettings.autoRemoveOldFilesAtBoot,"onUpdate:modelValue":t[2]||(t[2]=o=>e.fileHandlingSettings.autoRemoveOldFilesAtBoot=o),label:"Remove old files when (re)booting the server"},null,8,["modelValue"]),h(re,{color:"primary",onClick:t[3]||(t[3]=o=>e.setFileCleanSettings())},{default:v(()=>t[11]||(t[11]=[k(" save file clean settings ")])),_:1})]),_:1})]),_:1}),h(Le,null,{default:v(()=>{var o;return[h(ut,null,{default:v(()=>t[14]||(t[14]=[k(" Connection Timeout ")])),_:1}),(o=e.settingsStore.settings)!=null&&o.timeout?(L(),Z(vt,{key:0},{default:v(()=>[t[16]||(t[16]=k(" The connection timeout is the amount of time in milliseconds that the server will wait for OctoPrint to respond before giving up ")),h(ct,{modelValue:e.settingsStore.settings.timeout.apiTimeout,"onUpdate:modelValue":t[4]||(t[4]=a=>e.settingsStore.settings.timeout.apiTimeout=a),label:"Connection Timeout",min:"0",variant:"outlined",type:"number"},null,8,["modelValue"]),h(re,{color:"primary",onClick:t[5]||(t[5]=a=>e.updateTimeoutSettings())},{default:v(()=>t[15]||(t[15]=[k(" save connection timeout ")])),_:1})]),_:1})):he("",!0)]}),_:1}),h(Le,null,{default:v(()=>[h(ut,null,{default:v(()=>t[17]||(t[17]=[k(" Clean file references ")])),_:1}),h(vt,null,{default:v(()=>[t[19]||(t[19]=k(" Clear out the file references for all printers - this does not remove them from OctoPrint! ")),t[20]||(t[20]=$("br",null,null,-1)),h(re,{color:"primary",onClick:t[6]||(t[6]=o=>e.purgeFiles())},{default:v(()=>t[18]||(t[18]=[k(" Purge file references ")])),_:1})]),_:1})]),_:1}),h(Le,null,{default:v(()=>[h(ut,null,{default:v(()=>t[21]||(t[21]=[k(" Disable inefficient GCode analysis ")])),_:1}),h(vt,null,{default:v(()=>[t[23]||(t[23]=k(" Disable GCode analysis on all printers at once, preventing CPU intensive and inaccurate time/size estimates. ")),t[24]||(t[24]=$("br",null,null,-1)),h(re,{color:"primary",onClick:t[7]||(t[7]=o=>e.bulkDisableGCodeAnalysis())},{default:v(()=>t[22]||(t[22]=[k(" Bulk disable GCode Analysis ")])),_:1})]),_:1})]),_:1})]),_:1})]),_:1})}const dJ=Wo(uJ,[["render",cJ]]),kM=De({__name:"SettingsToolbar",props:["icon","title"],setup(e){const t=e;return(n,r)=>(L(),Z(mr,null,{default:v(()=>[h(lt,null,{default:v(()=>[h(X,null,{default:v(()=>[k(ie(t.icon),1)]),_:1})]),_:1}),h(Rn,null,{default:v(()=>[k(ie(t.title),1)]),_:1}),Np(n.$slots,"default")]),_:3}))}}),fJ=De({name:"FloorSettings",props:{},setup:()=>({printersStore:Lt(),floorStore:qi(),addOrUpdateFloorDialog:en(tn.AddOrUpdateFloorDialog),snackbar:Ot()}),data:()=>({selectedItem:0,editedFloorName:"",editedFloorNumber:0}),computed:{floors(){return this.floorStore.floors},selectedFloor(){return this.floorStore.floors[this.selectedItem]},showAddedPrinters(){var e;return((e=this.selectedFloor.printers)==null?void 0:e.length)+1}},methods:{printerInFloor(e,t){if(!(e!=null&&e.printers))return;const n=e.printers[t-1];if(n)return this.printersStore.printer(n.printerId)},async createFloor(){await this.addOrUpdateFloorDialog.openDialog()},setEditedPrinterFloorName(){this.editedFloorName=this.selectedFloor.name},setEditedPrinterFloorNumber(){this.editedFloorNumber=this.selectedFloor.floor},async updatePrinterFloorName(){var t;if(!((t=this.selectedFloor)!=null&&t.id))return;const{id:e}=this.selectedFloor;await this.floorStore.updateFloorName({floorId:e,name:this.editedFloorName}),this.snackbar.info("Floor name updated")},async updatePrinterFloorNumber(){var t;if(!((t=this.selectedFloor)!=null&&t.id))return;const{id:e}=this.selectedFloor;await this.floorStore.updateFloorNumber({floorId:e,floorNumber:this.editedFloorNumber}),this.snackbar.info("Floor level updated"),this.selectedItem=-1},async clickDeleteFloor(){var e;(e=this.selectedFloor)!=null&&e.id&&(await this.floorStore.deleteFloor(this.selectedFloor.id),this.snackbar.info("Floor deleted"))},async deletePrinterFromFloor(e,t){const n=this.printerInFloor(e,t);!(e!=null&&e.id)||!(n!=null&&n.id)||(await this.floorStore.deletePrinterFromFloor({floorId:e.id,printerId:n.id}),this.snackbar.info("Printer removed from floor"))}}}),hJ={key:1};function pJ(e,t,n,r,s,i){const o=kM,a=Vn("v-list-item-action-text"),l=Vn("v-list-item-group"),u=Vn("v-edit-dialog"),c=Vn("v-list-item-content");return L(),Z(bt,null,{default:v(()=>[h(o,{icon:"house_siding",title:"Floors"}),h(Ft,{subheader:"",lines:"three"},{default:v(()=>[h(os,null,{default:v(()=>t[7]||(t[7]=[k("Floors")])),_:1}),h(Le,null,{default:v(()=>[h(ut,null,{default:v(()=>t[8]||(t[8]=[k(" Create new floor ")])),_:1}),h(vt,null,{default:v(()=>[t[10]||(t[10]=k(" Creates an empty department/floor to view printer groups ")),t[11]||(t[11]=$("br",null,null,-1)),h(re,{color:"primary",onClick:t[0]||(t[0]=d=>e.createFloor())},{default:v(()=>t[9]||(t[9]=[k(" Create floor ")])),_:1})]),_:1})]),_:1})]),_:1}),h(fn),h(ot,{"no-gutters":""},{default:v(()=>[h(He,null,{default:v(()=>[h(Ft,{density:"compact"},{default:v(()=>[h(l,{modelValue:e.selectedItem,"onUpdate:modelValue":t[1]||(t[1]=d=>e.selectedItem=d)},{default:v(()=>[(L(!0),ye(Ce,null,qt(e.floors,d=>(L(),Z(Le,{key:d.id},{default:v(()=>[h(ut,null,{default:v(()=>[k(ie(d.name),1)]),_:2},1024),h(vt,null,{default:v(()=>[k(ie(d.printers.length||0)+" assigned ",1)]),_:2},1024),h(a,null,{default:v(()=>[k(" Floor number: "+ie(d.floor),1)]),_:2},1024)]),_:2},1024))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),h(He,null,{default:v(()=>[h(mr,null,{default:v(()=>[h(Uk,null,{default:v(({isHovering:d,props:f})=>[h(Rn,iv(Ih(f)),{default:v(()=>[e.selectedFloor?(L(),Z(u,{key:0,onOpen:e.setEditedPrinterFloorName,onSave:e.updatePrinterFloorName},{input:v(()=>[h(ct,{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:v(()=>[h(re,{color:"secondary"},{default:v(()=>[d?(L(),Z(X,{key:0,size:"small"},{default:v(()=>t[12]||(t[12]=[k(" edit ")])),_:1})):he("",!0),k(" "+ie(e.selectedFloor.name),1)]),_:2},1024)]),_:2},1032,["onOpen","onSave"])):(L(),ye("span",hJ," Select a floor on the left "))]),_:2},1040)]),_:1}),h(Uk,null,{default:v(({isHovering:d,props:f})=>[h(Rn,iv(Ih(f)),{default:v(()=>[e.selectedFloor?(L(),Z(u,{key:0,onOpen:e.setEditedPrinterFloorNumber,onSave:e.updatePrinterFloorNumber},{input:v(()=>[h(ct,{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:v(()=>[h(re,{color:"secondary"},{default:v(()=>[d?(L(),Z(X,{key:0,size:"small"},{default:v(()=>t[13]||(t[13]=[k(" edit ")])),_:1})):he("",!0),k(" "+ie(e.selectedFloor.floor),1)]),_:2},1024)]),_:2},1032,["onOpen","onSave"])):he("",!0)]),_:2},1040)]),_:1}),h(vn),e.selectedFloor?(L(),Z(re,{key:0,color:"primary",onClick:t[6]||(t[6]=d=>e.clickDeleteFloor())},{default:v(()=>[h(X,null,{default:v(()=>t[14]||(t[14]=[k("delete")])),_:1}),t[15]||(t[15]=k(" Delete floor "))]),_:1})):he("",!0)]),_:1}),e.selectedFloor?(L(),Z(Ft,{key:0},{default:v(()=>[(L(!0),ye(Ce,null,qt(e.showAddedPrinters,d=>(L(),Z(Le,{key:d},{default:v(()=>[e.printerInFloor(e.selectedFloor,d)?(L(),Z(c,{key:0},{default:v(()=>[h(ut,null,{default:v(()=>{var f;return[k(ie((f=e.printerInFloor(e.selectedFloor,d))==null?void 0:f.name),1)]}),_:2},1024)]),_:2},1024)):he("",!0),e.printerInFloor(e.selectedFloor,d)?(L(),Z(cu,{key:1},{default:v(()=>[h(re,{onClick:f=>e.deletePrinterFromFloor(e.selectedFloor,d)},{default:v(()=>[h(X,null,{default:v(()=>t[16]||(t[16]=[k("close")])),_:1}),t[17]||(t[17]=k(" Clear "))]),_:2},1032,["onClick"])]),_:2},1024)):he("",!0)]),_:2},1024))),128))]),_:1})):he("",!0)]),_:1})]),_:1})]),_:1})}const mJ=Wo(fJ,[["render",pJ]]),gJ="/img/DavidZwart.jpg",xM="0.0.12",vJ={key:0},yJ={key:1},bJ=De({__name:"AboutView",setup(e){const t=B(""),n=B(""),r=B(xM);return St(async()=>{const s=await vo.getVersion();t.value=s.version,n.value=s.monsterPi}),(s,i)=>(L(),Z(bt,null,{default:v(()=>[h(on,null,{default:v(()=>i[0]||(i[0]=[k(" About FDM Monster"),$("strong",null," © ",-1)])),_:1}),h(Zt,null,{default:v(()=>i[1]||(i[1]=[k(" The first prototype of FDM Monster"),$("strong",null," © ",-1),k(" was created by David Zwart in 2021 in collaboration with "),$("strong",null,[$("a",{href:"https://mtb3d.com"}," MTB3D ")],-1),k(". This open-source prototype proved a strong factor in process and logistics optimization for a 3D Printing company with 100+ printers. Due to it's success, we decided to keep it open-source and free! ")])),_:1}),h(Zt,null,{default:v(()=>[i[4]||(i[4]=k(" The latest 3D Printing Farm server named FDM Monster has been tested for 2 years using a custom image for running 4 OctoPrint images on a Raspberry Pi. ")),i[5]||(i[5]=$("br",null,null,-1)),i[6]||(i[6]=k(" This version uses the famous ")),i[7]||(i[7]=$("a",{href:"https://nodejs.org/en",target:"_blank"},[$("strong",null," Node.js framework ")],-1)),i[8]||(i[8]=k(" together with Awilix and ExpressJS for its server, and ")),i[9]||(i[9]=$("a",{href:"https://vuejs.org/",target:"_blank"},[$("strong",null," Vue 2 ")],-1)),i[10]||(i[10]=k(" and ")),i[11]||(i[11]=$("a",{href:"https://next.vuetifyjs.com/",target:"_blank"},[$("strong",null," Vuetify 2 ")],-1)),i[12]||(i[12]=k(" to set a base for FDM Monster Client")),i[13]||(i[13]=$("strong",null," © ",-1)),i[14]||(i[14]=k(" - the webapp. ")),i[15]||(i[15]=$("br",null,null,-1)),i[16]||(i[16]=$("br",null,null,-1)),$("strong",null," Your server's version is: "+ie(t.value),1),i[17]||(i[17]=$("br",null,null,-1)),$("strong",null," Your clients's version is: "+ie(r.value),1),i[18]||(i[18]=$("br",null,null,-1)),n.value?(L(),ye("strong",vJ,[k(" Your MonsterPi version is: "+ie(n.value),1),i[2]||(i[2]=$("br",null,null,-1))])):(L(),ye("strong",yJ," No MonsterPi distro detected. ")),i[19]||(i[19]=$("br",null,null,-1)),h(re,{class:"mt-3",variant:"outlined",to:"/settings/software-upgrade"},{default:v(()=>i[3]||(i[3]=[k(" Visit Upgrade Settings ")])),_:1})]),_:1}),h(on,null,{default:v(()=>i[20]||(i[20]=[k(" Documentation ")])),_:1}),h(Zt,null,{default:v(()=>[$("strong",null,[h(re,{color:"primary",href:"https://docs.fdm-monster.net",style:{color:"white"},target:"_blank"},{default:v(()=>[h(X,{class:"mr-2"},{default:v(()=>i[21]||(i[21]=[k("menu_book")])),_:1}),i[22]||(i[22]=k(" FDM Monster documentation site "))]),_:1})]),i[23]||(i[23]=$("br",null,null,-1))]),_:1}),h(on,null,{default:v(()=>[i[25]||(i[25]=k(" Bug reports ")),h(X,null,{default:v(()=>i[24]||(i[24]=[k("bug")])),_:1})]),_:1}),h(Zt,null,{default:v(()=>i[26]||(i[26]=[k(" Did you find a bug, or a feature that needs work? We would love to hear about it! "),$("br",null,null,-1),$("strong",null," We have multiple ways to report it: ",-1),$("h3",null,[$("ul",{class:"ml-5"},[$("li",null,"Mail to davidzwa@gmail.com"),$("li",null,[$("a",{href:"https://discord.gg/mwA8uP8CMc",style:{color:"white"},target:"_blank"}," Discord server ")]),$("li",null,[$("strong",null,[$("a",{href:"https://github.com/fdm-monster/fdm-monster/issues",style:{color:"white"},target:"_blank"},[k(" FDM Monster "),$("strong",null," © "),k(" Github Issues ")])])]),$("li",null,[$("a",{href:"https://fdm-monster.net",style:{color:"white"},target:"_blank"}," Website ")])])],-1)])),_:1}),h(on,null,{default:v(()=>i[27]||(i[27]=[k(" About me ")])),_:1}),h(Zt,null,{default:v(()=>i[28]||(i[28]=[$("img",{src:gJ,width:"150px"},null,-1),$("h4",{class:"mt-2"},[$("a",{href:"https://www.linkedin.com/in/david-zwart-88514083/",style:{color:"white"},target:"_blank"}," LinkedIn "),$("a",{class:"ml-2",href:"https://github.com/davidzwa",style:{color:"white"},target:"_blank"}," Github Profile ")],-1),k(" David Zwart MSc., post-graduate from the TU Delft (Embedded Systems), author of FDM Monster"),$("strong",null," © ",-1)])),_:1})]),_:1}))}});/*!
|
|
68
|
-
* @kurkle/color v0.3.2
|
|
69
|
-
* https://github.com/kurkle/color#readme
|
|
70
|
-
* (c) 2023 Jukka Kurkela
|
|
71
|
-
* Released under the MIT License
|
|
72
|
-
*/function Gd(e){return e+.5|0}const yo=(e,t,n)=>Math.max(Math.min(e,n),t);function lc(e){return yo(Gd(e*2.55),0,255)}function Co(e){return yo(Gd(e*255),0,255)}function Ci(e){return yo(Gd(e/2.55)/100,0,1)}function Hk(e){return yo(Gd(e*100),0,100)}const Xr={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},Zy=[..."0123456789ABCDEF"],wJ=e=>Zy[e&15],SJ=e=>Zy[(e&240)>>4]+Zy[e&15],Rf=e=>(e&240)>>4===(e&15),_J=e=>Rf(e.r)&&Rf(e.g)&&Rf(e.b)&&Rf(e.a);function kJ(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&Xr[e[1]]*17,g:255&Xr[e[2]]*17,b:255&Xr[e[3]]*17,a:t===5?Xr[e[4]]*17:255}:(t===7||t===9)&&(n={r:Xr[e[1]]<<4|Xr[e[2]],g:Xr[e[3]]<<4|Xr[e[4]],b:Xr[e[5]]<<4|Xr[e[6]],a:t===9?Xr[e[7]]<<4|Xr[e[8]]:255})),n}const xJ=(e,t)=>e<255?t(e):"";function EJ(e){var t=_J(e)?wJ:SJ;return e?"#"+t(e.r)+t(e.g)+t(e.b)+xJ(e.a,t):void 0}const CJ=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function EM(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 TJ(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 RJ(e,t,n){const r=EM(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 PJ(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 iS(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=PJ(n,r,s,c,i),l=l*60+.5),[l|0,u||0,a]}function oS(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(Co)}function aS(e,t,n){return oS(EM,e,t,n)}function IJ(e,t,n){return oS(RJ,e,t,n)}function AJ(e,t,n){return oS(TJ,e,t,n)}function CM(e){return(e%360+360)%360}function OJ(e){const t=CJ.exec(e);let n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?lc(+t[5]):Co(+t[5]));const s=CM(+t[2]),i=+t[3]/100,o=+t[4]/100;return t[1]==="hwb"?r=IJ(s,i,o):t[1]==="hsv"?r=AJ(s,i,o):r=aS(s,i,o),{r:r[0],g:r[1],b:r[2],a:n}}function MJ(e,t){var n=iS(e);n[0]=CM(n[0]+t),n=aS(n),e.r=n[0],e.g=n[1],e.b=n[2]}function DJ(e){if(!e)return;const t=iS(e),n=t[0],r=Hk(t[1]),s=Hk(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${s}%, ${Ci(e.a)})`:`hsl(${n}, ${r}%, ${s}%)`}const zk={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"},jk={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 $J(){const e={},t=Object.keys(jk),n=Object.keys(zk);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,zk[i]);i=parseInt(jk[o],16),e[a]=[i>>16&255,i>>8&255,i&255]}return e}let Pf;function LJ(e){Pf||(Pf=$J(),Pf.transparent=[0,0,0,0]);const t=Pf[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const FJ=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function NJ(e){const t=FJ.exec(e);let n=255,r,s,i;if(t){if(t[7]!==r){const o=+t[7];n=t[8]?lc(o):yo(o*255,0,255)}return r=+t[1],s=+t[3],i=+t[5],r=255&(t[2]?lc(r):yo(r,0,255)),s=255&(t[4]?lc(s):yo(s,0,255)),i=255&(t[6]?lc(i):yo(i,0,255)),{r,g:s,b:i,a:n}}}function VJ(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${Ci(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const Ng=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,ul=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function BJ(e,t,n){const r=ul(Ci(e.r)),s=ul(Ci(e.g)),i=ul(Ci(e.b));return{r:Co(Ng(r+n*(ul(Ci(t.r))-r))),g:Co(Ng(s+n*(ul(Ci(t.g))-s))),b:Co(Ng(i+n*(ul(Ci(t.b))-i))),a:e.a+n*(t.a-e.a)}}function If(e,t,n){if(e){let r=iS(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=aS(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function TM(e,t){return e&&Object.assign(t||{},e)}function qk(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=Co(e[3]))):(t=TM(e,{r:0,g:0,b:0,a:1}),t.a=Co(t.a)),t}function UJ(e){return e.charAt(0)==="r"?NJ(e):OJ(e)}class id{constructor(t){if(t instanceof id)return t;const n=typeof t;let r;n==="object"?r=qk(t):n==="string"&&(r=kJ(t)||LJ(t)||UJ(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=TM(this._rgb);return t&&(t.a=Ci(t.a)),t}set rgb(t){this._rgb=qk(t)}rgbString(){return this._valid?VJ(this._rgb):void 0}hexString(){return this._valid?EJ(this._rgb):void 0}hslString(){return this._valid?DJ(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=BJ(this._rgb,t._rgb,n)),this}clone(){return new id(this.rgb)}alpha(t){return this._rgb.a=Co(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=Gd(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 If(this._rgb,2,t),this}darken(t){return If(this._rgb,2,-t),this}saturate(t){return If(this._rgb,1,t),this}desaturate(t){return If(this._rgb,1,-t),this}rotate(t){return MJ(this._rgb,t),this}}/*!
|
|
73
|
-
* Chart.js v4.4.7
|
|
74
|
-
* https://www.chartjs.org
|
|
75
|
-
* (c) 2024 Chart.js Contributors
|
|
76
|
-
* Released under the MIT License
|
|
77
|
-
*/function yi(){}const HJ=(()=>{let e=0;return()=>e++})();function Qt(e){return e==null}function _n(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 _t(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function cs(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Us(e,t){return cs(e)?e:t}function Pt(e,t){return typeof e>"u"?t:e}const zJ=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function Yt(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function Rt(e,t,n,r){let s,i,o;if(_n(e))for(i=e.length,s=0;s<i;s++)t.call(n,e[s],s);else if(_t(e))for(o=Object.keys(e),i=o.length,s=0;s<i;s++)t.call(n,e[o[s]],o[s])}function mp(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 gp(e){if(_n(e))return e.map(gp);if(_t(e)){const t=Object.create(null),n=Object.keys(e),r=n.length;let s=0;for(;s<r;++s)t[n[s]]=gp(e[n[s]]);return t}return e}function RM(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function jJ(e,t,n,r){if(!RM(e))return;const s=t[e],i=n[e];_t(s)&&_t(i)?od(s,i,r):t[e]=gp(i)}function od(e,t,n){const r=_n(t)?t:[t],s=r.length;if(!_t(e))return e;n=n||{};const i=n.merger||jJ;let o;for(let a=0;a<s;++a){if(o=r[a],!_t(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 Rc(e,t){return od(e,t,{merger:qJ})}function qJ(e,t,n){if(!RM(e))return;const r=t[e],s=n[e];_t(r)&&_t(s)?Rc(r,s):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=gp(s))}const Wk={"":e=>e,x:e=>e.x,y:e=>e.y};function WJ(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 GJ(e){const t=WJ(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function pu(e,t){return(Wk[t]||(Wk[t]=GJ(t)))(e)}function lS(e){return e.charAt(0).toUpperCase()+e.slice(1)}const ad=e=>typeof e<"u",Mo=e=>typeof e=="function",Gk=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function KJ(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const rr=Math.PI,To=2*rr,vp=Number.POSITIVE_INFINITY,YJ=rr/180,Ss=rr/2,Zo=rr/4,Kk=rr*2/3,eb=Math.log10,Ro=Math.sign;function bh(e,t,n){return Math.abs(e-t)<n}function Yk(e){const t=Math.round(e);e=bh(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(eb(e))),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function XJ(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 yp(e){return!isNaN(parseFloat(e))&&isFinite(e)}function QJ(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function JJ(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 fa(e){return e*(rr/180)}function ZJ(e){return e*(180/rr)}function Xk(e){if(!cs(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function eZ(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*rr&&(i+=To),{angle:i,distance:s}}function tZ(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function ea(e){return(e%To+To)%To}function nZ(e,t,n,r){const s=ea(e),i=ea(t),o=ea(n),a=ea(i-s),l=ea(o-s),u=ea(s-i),c=ea(s-o);return s===i||s===o||r&&i===o||a>l&&u<c}function _s(e,t,n){return Math.max(t,Math.min(n,e))}function rZ(e){return _s(e,-32768,32767)}function El(e,t,n,r=1e-6){return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function uS(e,t,n){n=n||(o=>e[o]<t);let r=e.length-1,s=0,i;for(;r-s>1;)i=s+r>>1,n(i)?s=i:r=i;return{lo:s,hi:r}}const tb=(e,t,n,r)=>uS(e,n,r?s=>{const i=e[s][t];return i<n||i===n&&e[s+1][t]===n}:s=>e[s][t]<n),sZ=(e,t,n)=>uS(e,n,r=>e[r][t]>=n);function iZ(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 PM=["push","pop","shift","splice","unshift"];function oZ(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),PM.forEach(n=>{const r="_onData"+lS(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 Qk(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)&&(PM.forEach(i=>{delete e[i]}),delete e._chartjs)}function IM(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const AM=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function OM(e,t){let n=[],r=!1;return function(...s){n=s,r||(r=!0,AM.call(window,()=>{r=!1,e.apply(t,n)}))}}function aZ(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}const cS=e=>e==="start"?"left":e==="end"?"right":"center",Wn=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,lZ=(e,t,n,r)=>e===(r?"left":"right")?n:e==="center"?(t+n)/2:t,Af=e=>e===0||e===1,Jk=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*To/n)),Zk=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*To/n)+1,Pc={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*Ss)+1,easeOutSine:e=>Math.sin(e*Ss),easeInOutSine:e=>-.5*(Math.cos(rr*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=>Af(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=>Af(e)?e:Jk(e,.075,.3),easeOutElastic:e=>Af(e)?e:Zk(e,.075,.3),easeInOutElastic(e){return Af(e)?e:e<.5?.5*Jk(e*2,.1125,.45):.5+.5*Zk(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-Pc.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?Pc.easeInBounce(e*2)*.5:Pc.easeOutBounce(e*2-1)*.5+.5};function MM(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function ex(e){return MM(e)?e:new id(e)}function Vg(e){return MM(e)?e:new id(e).saturate(.5).darken(.1).hexString()}const uZ=["x","y","borderWidth","radius","tension"],cZ=["color","borderColor","backgroundColor"];function dZ(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:cZ},numbers:{type:"number",properties:uZ}}),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 fZ(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const tx=new Map;function hZ(e,t){t=t||{};const n=e+JSON.stringify(t);let r=tx.get(n);return r||(r=new Intl.NumberFormat(e,t),tx.set(n,r)),r}function DM(e,t,n){return hZ(t,n).format(e)}const $M={values(e){return _n(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=pZ(e,n)}const o=eb(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),DM(e,r,l)},logarithmic(e,t,n){if(e===0)return"0";const r=n[t].significand||e/Math.pow(10,Math.floor(eb(e)));return[1,2,3,5,10,15].includes(r)||t>.8*n.length?$M.numeric.call(this,e,t,n):""}};function pZ(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 LM={formatters:$M};function mZ(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:LM.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 za=Object.create(null),nb=Object.create(null);function Ic(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 Bg(e,t,n){return typeof t=="string"?od(Ic(e,t),n):od(Ic(e,""),t)}class gZ{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)=>Vg(s.backgroundColor),this.hoverBorderColor=(r,s)=>Vg(s.borderColor),this.hoverColor=(r,s)=>Vg(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 Bg(this,t,n)}get(t){return Ic(this,t)}describe(t,n){return Bg(nb,t,n)}override(t,n){return Bg(za,t,n)}route(t,n,r,s){const i=Ic(this,t),o=Ic(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 _t(l)?Object.assign({},u,l):Pt(l,u)},set(l){this[a]=l}}})}apply(t){t.forEach(n=>n(this))}}var hn=new gZ({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[dZ,fZ,mZ]);function vZ(e){return!e||Qt(e.size)||Qt(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function nx(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 ta(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 rx(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function sx(e,t,n,r){FM(e,t,n,r,null)}function FM(e,t,n,r,s){let i,o,a,l,u,c,d,f;const p=t.pointStyle,g=t.rotation,m=t.radius;let y=(g||0)*YJ;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,To):e.arc(n,r,m,0,To),e.closePath();break;case"triangle":c=s?s/2:m,e.moveTo(n+Math.sin(y)*c,r-Math.cos(y)*m),y+=Kk,e.lineTo(n+Math.sin(y)*c,r-Math.cos(y)*m),y+=Kk,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+Zo)*l,d=Math.cos(y+Zo)*(s?s/2-u:l),a=Math.sin(y+Zo)*l,f=Math.sin(y+Zo)*(s?s/2-u:l),e.arc(n-d,r-a,u,y-rr,y-Ss),e.arc(n+f,r-o,u,y-Ss,y),e.arc(n+d,r+a,u,y,y+Ss),e.arc(n-f,r+o,u,y+Ss,y+rr),e.closePath();break;case"rect":if(!g){l=Math.SQRT1_2*m,c=s?s/2:l,e.rect(n-c,r-l,2*c,2*l);break}y+=Zo;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+=Zo;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+=Zo,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 NM(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 dS(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function fS(e){e.restore()}function yZ(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),Qt(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 bZ(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 wZ(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function ld(e,t,n,r,s,i={}){const o=_n(t)?t:[t],a=i.strokeWidth>0&&i.strokeColor!=="";let l,u;for(e.save(),e.font=s.string,yZ(e,i),l=0;l<o.length;++l)u=o[l],i.backdrop&&wZ(e,i.backdrop),a&&(i.strokeColor&&(e.strokeStyle=i.strokeColor),Qt(i.strokeWidth)||(e.lineWidth=i.strokeWidth),e.strokeText(u,n,r,i.maxWidth)),e.fillText(u,n,r,i.maxWidth),bZ(e,n,r,u,i),r+=Number(s.lineHeight);e.restore()}function bp(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*rr,rr,!0),e.lineTo(n,r+i-o.bottomLeft),e.arc(n+o.bottomLeft,r+i-o.bottomLeft,o.bottomLeft,rr,Ss,!0),e.lineTo(n+s-o.bottomRight,r+i),e.arc(n+s-o.bottomRight,r+i-o.bottomRight,o.bottomRight,Ss,0,!0),e.lineTo(n+s,r+o.topRight),e.arc(n+s-o.topRight,r+o.topRight,o.topRight,0,-Ss,!0),e.lineTo(n+o.topLeft,r)}const SZ=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,_Z=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function kZ(e,t){const n=(""+e).match(SZ);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 xZ=e=>+e||0;function VM(e,t){const n={},r=_t(t),s=r?Object.keys(t):t,i=_t(e)?r?o=>Pt(e[o],e[t[o]]):o=>e[o]:()=>e;for(const o of s)n[o]=xZ(i(o));return n}function BM(e){return VM(e,{top:"y",right:"x",bottom:"y",left:"x"})}function Dl(e){return VM(e,["topLeft","topRight","bottomLeft","bottomRight"])}function ds(e){const t=BM(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function er(e,t){e=e||{},t=t||hn.font;let n=Pt(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let r=Pt(e.style,t.style);r&&!(""+r).match(_Z)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const s={family:Pt(e.family,t.family),lineHeight:kZ(Pt(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:Pt(e.weight,t.weight),string:""};return s.string=vZ(s),s}function Of(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 EZ(e,t,n){const{min:r,max:s}=e,i=zJ(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 Fu(e,t){return Object.assign(Object.create(e),t)}function hS(e,t=[""],n,r,s=()=>e[0]){const i=n||e;typeof r>"u"&&(r=jM("_fallback",e));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:i,_fallback:r,_getTarget:s,override:a=>hS([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 HM(a,l,()=>MZ(l,t,e,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(a,l){return ox(a).includes(l)},ownKeys(a){return ox(a)},set(a,l,u){const c=a._storage||(a._storage=s());return a[l]=c[l]=u,delete a._keys,!0}})}function mu(e,t,n,r){const s={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:UM(e,r),setContext:i=>mu(e,i,n,r),override:i=>mu(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 HM(i,o,()=>TZ(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 UM(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:Mo(n)?n:()=>n,isIndexable:Mo(r)?r:()=>r}}const CZ=(e,t)=>e?e+lS(t):t,pS=(e,t)=>_t(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function HM(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const r=n();return e[t]=r,r}function TZ(e,t,n){const{_proxy:r,_context:s,_subProxy:i,_descriptors:o}=e;let a=r[t];return Mo(a)&&o.isScriptable(t)&&(a=RZ(t,a,e,n)),_n(a)&&a.length&&(a=PZ(t,a,e,o.isIndexable)),pS(t,a)&&(a=mu(a,s,i&&i[t],o)),a}function RZ(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),pS(e,l)&&(l=mS(s._scopes,s,e,l)),l}function PZ(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(_t(t[0])){const l=t,u=s._scopes.filter(c=>c!==l);t=[];for(const c of l){const d=mS(u,s,e,c);t.push(mu(d,i,o&&o[e],a))}}return t}function zM(e,t,n){return Mo(e)?e(t,n):e}const IZ=(e,t)=>e===!0?t:typeof e=="string"?pu(t,e):void 0;function AZ(e,t,n,r,s){for(const i of t){const o=IZ(n,i);if(o){e.add(o);const a=zM(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 mS(e,t,n,r){const s=t._rootScopes,i=zM(t._fallback,n,r),o=[...e,...s],a=new Set;a.add(r);let l=ix(a,o,n,i||n,r);return l===null||typeof i<"u"&&i!==n&&(l=ix(a,o,i,l,r),l===null)?!1:hS(Array.from(a),[""],s,i,()=>OZ(t,n,r))}function ix(e,t,n,r,s){for(;n;)n=AZ(e,t,n,r,s);return n}function OZ(e,t,n){const r=e._getTarget();t in r||(r[t]={});const s=r[t];return _n(s)&&_t(n)?n:s||{}}function MZ(e,t,n,r){let s;for(const i of t)if(s=jM(CZ(i,e),n),typeof s<"u")return pS(e,s)?mS(n,r,e,s):s}function jM(e,t){for(const n of t){if(!n)continue;const r=n[e];if(typeof r<"u")return r}}function ox(e){let t=e._keys;return t||(t=e._keys=DZ(e._scopes)),t}function DZ(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 gS(){return typeof window<"u"&&typeof document<"u"}function vS(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function wp(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 Om=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function $Z(e,t){return Om(e).getPropertyValue(t)}const LZ=["top","right","bottom","left"];function Ia(e,t,n){const r={};n=n?"-"+n:"";for(let s=0;s<4;s++){const i=LZ[s];r[i]=parseFloat(e[t+"-"+i+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const FZ=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function NZ(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:s,offsetY:i}=r;let o=!1,a,l;if(FZ(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 oa(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,s=Om(n),i=s.boxSizing==="border-box",o=Ia(s,"padding"),a=Ia(s,"border","width"),{x:l,y:u,box:c}=NZ(e,n),d=o.left+(c&&a.left),f=o.top+(c&&a.top);let{width:p,height:g}=t;return i&&(p-=o.width+a.width,g-=o.height+a.height),{x:Math.round((l-d)/p*n.width/r),y:Math.round((u-f)/g*n.height/r)}}function VZ(e,t,n){let r,s;if(t===void 0||n===void 0){const i=e&&vS(e);if(!i)t=e.clientWidth,n=e.clientHeight;else{const o=i.getBoundingClientRect(),a=Om(i),l=Ia(a,"border","width"),u=Ia(a,"padding");t=o.width-u.width-l.width,n=o.height-u.height-l.height,r=wp(a.maxWidth,i,"clientWidth"),s=wp(a.maxHeight,i,"clientHeight")}}return{width:t,height:n,maxWidth:r||vp,maxHeight:s||vp}}const Mf=e=>Math.round(e*10)/10;function BZ(e,t,n,r){const s=Om(e),i=Ia(s,"margin"),o=wp(s.maxWidth,e,"clientWidth")||vp,a=wp(s.maxHeight,e,"clientHeight")||vp,l=VZ(e,t,n);let{width:u,height:c}=l;if(s.boxSizing==="content-box"){const f=Ia(s,"border","width"),p=Ia(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=Mf(Math.min(u,o,l.maxWidth)),c=Mf(Math.min(c,a,l.maxHeight)),u&&!c&&(c=Mf(u/2)),(t!==void 0||n!==void 0)&&r&&l.height&&c>l.height&&(c=l.height,u=Mf(Math.floor(c*r))),{width:u,height:c}}function ax(e,t,n){const r=t||1,s=Math.floor(e.height*r),i=Math.floor(e.width*r);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const o=e.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${e.height}px`,o.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||o.height!==s||o.width!==i?(e.currentDevicePixelRatio=r,o.height=s,o.width=i,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}const UZ=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};gS()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e}();function lx(e,t){const n=$Z(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}const HZ=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}}},zZ=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function $l(e,t,n){return e?HZ(t,n):zZ()}function qM(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 WM(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}/*!
|
|
78
|
-
* Chart.js v4.4.7
|
|
79
|
-
* https://www.chartjs.org
|
|
80
|
-
* (c) 2024 Chart.js Contributors
|
|
81
|
-
* Released under the MIT License
|
|
82
|
-
*/class jZ{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=AM.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 Si=new jZ;const ux="transparent",qZ={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=ex(e||ux),s=r.valid&&ex(t||ux);return s&&s.valid?s.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class WZ{constructor(t,n,r,s){const i=n[r];s=Of([t.to,s,i,t.from]);const o=Of([t.from,i,s]);this._active=!0,this._fn=t.fn||qZ[t.type||typeof o],this._easing=Pc[t.easing]||Pc.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=Of([t.to,n,s,t.from]),this._from=Of([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 GM{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!_t(t))return;const n=Object.keys(hn.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(s=>{const i=t[s];if(!_t(i))return;const o={};for(const a of n)o[a]=i[a];(_n(i.properties)&&i.properties||[s]).forEach(a=>{(a===s||!r.has(a))&&r.set(a,o)})})}_animateOptions(t,n){const r=n.options,s=KZ(t,r);if(!s)return[];const i=this._createAnimations(s,r);return r.$shared&&GZ(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 WZ(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 Si.add(this._chart,r),!0}}function GZ(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 KZ(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 cx(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 YZ(e,t,n){if(n===!1)return!1;const r=cx(e,n),s=cx(t,n);return{top:s.end,right:r.end,bottom:s.start,left:r.start}}function XZ(e){let t,n,r,s;return _t(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 KM(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 dx(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],cs(u)&&(i||t===0||Ro(t)===Ro(u))&&(t+=u)}return!c&&!r.all?0:t}function QZ(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 Ug(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function JZ(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function ZZ(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 eee(e,t,n){const r=e[t]||(e[t]={});return r[n]||(r[n]={})}function fx(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 hx(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=JZ(i,o,r),d=t.length;let f;for(let p=0;p<d;++p){const g=t[p],{[l]:m,[u]:y}=g,b=g._stacks||(g._stacks={});f=b[u]=eee(s,c,m),f[a]=y,f._top=fx(f,o,!0,r.type),f._bottom=fx(f,o,!1,r.type);const w=f._visualValues||(f._visualValues={});w[a]=y}}function Hg(e,t){const n=e.scales;return Object.keys(n).filter(r=>n[r].axis===t).shift()}function tee(e,t){return Fu(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function nee(e,t,n){return Fu(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function Qu(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 zg=e=>e==="reset"||e==="none",px=(e,t)=>t?e:Object.assign({},e),ree=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:KM(n,!0),values:null};class Ac{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=Ug(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&&Qu(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),s=(d,f,p,g)=>d==="x"?f:d==="r"?g:p,i=n.xAxisID=Pt(r.xAxisID,Hg(t,"x")),o=n.yAxisID=Pt(r.yAxisID,Hg(t,"y")),a=n.rAxisID=Pt(r.rAxisID,Hg(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&&Qk(this._data,this),t._stacked&&Qu(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(_t(n)){const s=this._cachedMeta;this._data=QZ(n,s)}else if(r!==n){if(r){Qk(r,this);const s=this._cachedMeta;Qu(s),s._parsed=[]}n&&Object.isExtensible(n)&&oZ(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=Ug(n.vScale,n),n.stack!==r.stack&&(s=!0,Qu(n),n.stack=r.stack),this._resyncElements(t),(s||i!==n._stacked)&&(hx(this,n._parsed),n._stacked=Ug(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{_n(s[t])?f=this.parseArrayData(r,s,t,n):_t(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&&hx(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,g;for(f=0,p=s;f<p;++f)g=f+r,d[f]={[a]:c||i.parse(u[g],g),[l]:o.parse(n[g],g)};return d}parseArrayData(t,n,r,s){const{xScale:i,yScale:o}=t,a=new Array(s);let l,u,c,d;for(l=0,u=s;l<u;++l)c=l+r,d=n[c],a[l]={x:i.parse(d[0],c),y:o.parse(d[1],c)};return a}parseObjectData(t,n,r,s){const{xScale:i,yScale:o}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,u=new Array(s);let c,d,f,p;for(c=0,d=s;c<d;++c)f=c+r,p=n[f],u[c]={x:i.parse(pu(p,a),f),y:o.parse(pu(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:KM(s,!0),values:n._stacks[t.axis]._visualValues};return dx(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=dx(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=ree(n,r,this.chart),u={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:d}=ZZ(a);let f,p;function g(){p=s[f];const m=p[a.axis];return!cs(p[t.axis])||c>m||d<m}for(f=0;f<o&&!(!g()&&(this.updateRangeFromParsed(u,t,p,l),i));++f);if(i){for(f=o-1;f>=0;--f)if(!g()){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],cs(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=XZ(Pt(this.options.clip,YZ(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=nee(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=tee(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&&ad(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(hn.elements[t]),g=()=>this.getContext(r,s,n),m=u.resolveNamedOptions(f,p,g,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 GM(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||zg(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){zg(s)?Object.assign(t,r):this._resolveAnimations(n,s).update(t,r)}updateSharedOptions(t,n,r){t&&!zg(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&&Qu(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])}}ge(Ac,"defaults",{}),ge(Ac,"datasetElementType",null),ge(Ac,"dataElementType",null);function see(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=IM(r.sort((s,i)=>s-i))}return e._cache.$bar}function iee(e){const t=e.iScale,n=see(t,e.type);let r=t._length,s,i,o,a;const l=()=>{o===32767||o===-32768||(ad(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 oee(e,t,n,r){const s=n.barThickness;let i,o;return Qt(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 aee(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 lee(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 YM(e,t,n,r){return _n(e)?lee(e,t,n,r):t[n.axis]=n.parse(e,r),t}function mx(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(YM(f,d,i,u));return l}function jg(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function uee(e,t,n){return e!==0?Ro(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function cee(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 dee(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}=cee(e);s==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===r?s=u:(n._bottom||0)===r?s=c:(i[gx(c,o,a,l)]=!0,s=u)),i[gx(s,o,a,l)]=!0,e.borderSkipped=i}function gx(e,t,n,r){return r?(e=fee(e,t,n),e=vx(e,n,t)):e=vx(e,t,n),e}function fee(e,t,n){return e===t?n:e===n?t:e}function vx(e,t,n){return e==="start"?t:e==="end"?n:e}function hee(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class wh extends Ac{parsePrimitiveData(t,n,r,s){return mx(t,n,r,s)}parseArrayData(t,n,r,s){return mx(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,g,m;for(f=r,p=r+s;f<p;++f)m=n[f],g={},g[i.axis]=i.parse(pu(m,u),f),d.push(YM(pu(m,c),g,o,f));return d}updateRangeFromParsed(t,n,r,s){super.updateRangeFromParsed(t,n,r,s);const i=r._custom;i&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,i.min),t.max=Math.max(t.max,i.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:r,vScale:s}=n,i=this.getParsed(t),o=i._custom,a=jg(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 g=this.getParsed(p),m=i||Qt(g[a.axis])?{base:l,head:l}:this._calculateBarValuePixels(p),y=this._calculateBarIndexPixels(p,c),b=(g._stacks||{})[a.axis],w={horizontal:u,base:m.base,enableBorderRadius:!b||jg(g._custom)||o===b._top||o===b._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&&(w.options=d||this.resolveDataElementOptions(p,t[p].active?"active":s));const S=w.options||t[p].options;dee(w,S,b,o),hee(w,S,c.ratio),this.updateElement(t[p],p,w,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(Qt(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}_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||iee(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=jg(u);let d=l[n.axis],f=0,p=r?this.applyStack(n,l,r):d,g,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=!Qt(i)&&!c?i:f;let b=n.getPixelForValue(y);if(this.chart.getDataVisibility(t)?g=n.getPixelForValue(f+p):g=b,m=g-b,Math.abs(m)<o){m=uee(m,n,a)*o,d===a&&(b-=m/2);const w=n.getPixelForDecimal(0),S=n.getPixelForDecimal(1),C=Math.min(w,S),_=Math.max(w,S);b=Math.max(Math.min(b,_),C),g=b+m,r&&!c&&(l._stacks[n.axis]._visualValues[s]=n.getValueForPixel(g)-n.getValueForPixel(b))}if(b===n.getPixelForValue(a)){const w=Ro(m)*n.getLineWidthForValue(a)/2;b+=w,m-=w}return{size:m,base:b,head:g,center:g+m/2}}_calculateBarIndexPixels(t,n){const r=n.scale,s=this.options,i=s.skipNull,o=Pt(s.maxBarThickness,1/0);let a,l;if(n.grouped){const u=i?this._getStackCount(t):n.stackCount,c=s.barThickness==="flex"?aee(t,n,s,u):oee(t,n,s,u),d=this._getStackIndex(this.index,this._cachedMeta.stack,i?t:void 0);a=c.start+c.chunk*d+c.chunk/2,l=Math.min(o,c.chunk*c.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)}}ge(wh,"id","bar"),ge(wh,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),ge(wh,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});function na(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class yS{constructor(t){ge(this,"options");this.options=t||{}}static override(t){Object.assign(yS.prototype,t)}init(){}formats(){return na()}parse(){return na()}format(){return na()}add(){return na()}diff(){return na()}startOf(){return na()}endOf(){return na()}}var pee={_date:yS};function mee(e,t,n,r){const{controller:s,data:i,_sorted:o}=e,a=s._cachedMeta.iScale;if(a&&t===a.axis&&t!=="r"&&o&&i.length){const l=a._reversePixels?sZ:tb;if(r){if(s._sharedOptions){const u=i[0],c=typeof u.getRange=="function"&&u.getRange(t);if(c){const d=l(i,t,n-c),f=l(i,t,n+c);return{lo:d.lo,hi:f.hi}}}}else return l(i,t,n)}return{lo:0,hi:i.length-1}}function Kd(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}=mee(i[a],t,o,s);for(let p=d;p<=f;++p){const g=c[p];g.skip||r(g,u,p)}}}function gee(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 qg(e,t,n,r,s){const i=[];return!s&&!e.isPointInArea(t)||Kd(e,n,t,function(a,l,u){!s&&!NM(a,e.chartArea,0)||a.inRange(t.x,t.y,r)&&i.push({element:a,datasetIndex:l,index:u})},!0),i}function vee(e,t,n,r){let s=[];function i(o,a,l){const{startAngle:u,endAngle:c}=o.getProps(["startAngle","endAngle"],r),{angle:d}=eZ(o,{x:t.x,y:t.y});nZ(d,u,c)&&s.push({element:o,datasetIndex:a,index:l})}return Kd(e,n,t,i),s}function yee(e,t,n,r,s,i){let o=[];const a=gee(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 g=c.getCenterPoint(s);if(!(!!i||e.isPointInArea(g))&&!p)return;const y=a(t,g);y<l?(o=[{element:c,datasetIndex:d,index:f}],l=y):y===l&&o.push({element:c,datasetIndex:d,index:f})}return Kd(e,n,t,u),o}function Wg(e,t,n,r,s,i){return!i&&!e.isPointInArea(t)?[]:n==="r"&&!r?vee(e,t,n,s):yee(e,t,n,r,s,i)}function yx(e,t,n,r,s){const i=[],o=n==="x"?"inXRange":"inYRange";let a=!1;return Kd(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 bee={evaluateInteractionItems:Kd,modes:{index(e,t,n,r){const s=oa(t,e),i=n.axis||"x",o=n.includeInvisible||!1,a=n.intersect?qg(e,s,i,r,o):Wg(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=oa(t,e),i=n.axis||"xy",o=n.includeInvisible||!1;let a=n.intersect?qg(e,s,i,r,o):Wg(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=oa(t,e),i=n.axis||"xy",o=n.includeInvisible||!1;return qg(e,s,i,r,o)},nearest(e,t,n,r){const s=oa(t,e),i=n.axis||"xy",o=n.includeInvisible||!1;return Wg(e,s,i,n.intersect,r,o)},x(e,t,n,r){const s=oa(t,e);return yx(e,s,"x",n.intersect,r)},y(e,t,n,r){const s=oa(t,e);return yx(e,s,"y",n.intersect,r)}}};const XM=["left","top","right","bottom"];function Ju(e,t){return e.filter(n=>n.pos===t)}function bx(e,t){return e.filter(n=>XM.indexOf(n.pos)===-1&&n.box.axis===t)}function Zu(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 wee(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 See(e){const t={};for(const n of e){const{stack:r,pos:s,stackWeight:i}=n;if(!r||!XM.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 _ee(e,t){const n=See(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 kee(e){const t=wee(e),n=Zu(t.filter(u=>u.box.fullSize),!0),r=Zu(Ju(t,"left"),!0),s=Zu(Ju(t,"right")),i=Zu(Ju(t,"top"),!0),o=Zu(Ju(t,"bottom")),a=bx(t,"x"),l=bx(t,"y");return{fullSize:n,leftAndTop:r.concat(i),rightAndBottom:s.concat(l).concat(o).concat(a),chartArea:Ju(t,"chartArea"),vertical:r.concat(s).concat(l),horizontal:i.concat(o).concat(a)}}function wx(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function QM(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 xee(e,t,n,r){const{pos:s,box:i}=n,o=e.maxPadding;if(!_t(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&&QM(o,i.getPadding());const a=Math.max(0,t.outerWidth-wx(o,e,"left","right")),l=Math.max(0,t.outerHeight-wx(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 Eee(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 Cee(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 uc(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,Cee(a.horizontal,t));const{same:d,other:f}=xee(t,n,a,r);u|=d&&s.length,c=c||f,l.fullSize||s.push(a)}return u&&uc(s,t,n,r)||c}function Df(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 Sx(e,t,n,r){const s=n.padding;let{x:i,y:o}=t;for(const a of e){const l=a.box,u=r[a.stack]||{count:1,placed:0,weight:1},c=a.stackWeight/u.weight||1;if(a.horizontal){const d=t.w*c,f=u.size||l.height;ad(u.start)&&(o=u.start),l.fullSize?Df(l,s.left,o,n.outerWidth-s.right-s.left,f):Df(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;ad(u.start)&&(i=u.start),l.fullSize?Df(l,i,s.top,f,n.outerHeight-s.bottom-s.top):Df(l,i,t.top+u.placed,f,d),u.start=i,u.placed+=d,i=l.right}}t.x=i,t.y=o}var rs={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=ds(e.options.layout.padding),i=Math.max(t-s.width,0),o=Math.max(n-s.height,0),a=kee(e.boxes),l=a.vertical,u=a.horizontal;Rt(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);QM(f,ds(r));const p=Object.assign({maxPadding:f,w:i,h:o,x:s.left,y:s.top},s),g=_ee(l.concat(u),d);uc(a.fullSize,p,d,g),uc(l,p,d,g),uc(u,p,d,g)&&uc(l,p,d,g),Eee(p),Sx(a.leftAndTop,p,d,g),p.x+=p.w,p.y+=p.h,Sx(a.rightAndBottom,p,d,g),e.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},Rt(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 JM{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 Tee extends JM{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Sh="$chartjs",Ree={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},_x=e=>e===null||e==="";function Pee(e,t){const n=e.style,r=e.getAttribute("height"),s=e.getAttribute("width");if(e[Sh]={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",_x(s)){const i=lx(e,"width");i!==void 0&&(e.width=i)}if(_x(r))if(e.style.height==="")e.height=e.width/(t||2);else{const i=lx(e,"height");i!==void 0&&(e.height=i)}return e}const ZM=UZ?{passive:!0}:!1;function Iee(e,t,n){e&&e.addEventListener(t,n,ZM)}function Aee(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,ZM)}function Oee(e,t){const n=Ree[e.type]||e.type,{x:r,y:s}=oa(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:s!==void 0?s:null}}function Sp(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function Mee(e,t,n){const r=e.canvas,s=new MutationObserver(i=>{let o=!1;for(const a of i)o=o||Sp(a.addedNodes,r),o=o&&!Sp(a.removedNodes,r);o&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}function Dee(e,t,n){const r=e.canvas,s=new MutationObserver(i=>{let o=!1;for(const a of i)o=o||Sp(a.removedNodes,r),o=o&&!Sp(a.addedNodes,r);o&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}const ud=new Map;let kx=0;function eD(){const e=window.devicePixelRatio;e!==kx&&(kx=e,ud.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function $ee(e,t){ud.size||window.addEventListener("resize",eD),ud.set(e,t)}function Lee(e){ud.delete(e),ud.size||window.removeEventListener("resize",eD)}function Fee(e,t,n){const r=e.canvas,s=r&&vS(r);if(!s)return;const i=OM((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),$ee(e,i),o}function Gg(e,t,n){n&&n.disconnect(),t==="resize"&&Lee(e)}function Nee(e,t,n){const r=e.canvas,s=OM(i=>{e.ctx!==null&&n(Oee(i,e))},e);return Iee(r,t,s),s}class Vee extends JM{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(Pee(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[Sh])return!1;const r=n[Sh].initial;["height","width"].forEach(i=>{const o=r[i];Qt(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[Sh],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const s=t.$proxies||(t.$proxies={}),o={attach:Mee,detach:Dee,resize:Fee}[n]||Nee;s[n]=o(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),s=r[n];if(!s)return;({attach:Gg,detach:Gg,resize:Gg}[n]||Aee)(t,n,s),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,s){return BZ(t,n,r,s)}isAttached(t){const n=t&&vS(t);return!!(n&&n.isConnected)}}function Bee(e){return!gS()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?Tee:Vee}var qf;let Nu=(qf=class{constructor(){ge(this,"x");ge(this,"y");ge(this,"active",!1);ge(this,"options");ge(this,"$animations")}tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return yp(this.x)&&yp(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}},ge(qf,"defaults",{}),ge(qf,"defaultRoutes"),qf);function Uee(e,t){const n=e.options.ticks,r=Hee(e),s=Math.min(n.maxTicksLimit||r,r),i=n.major.enabled?jee(t):[],o=i.length,a=i[0],l=i[o-1],u=[];if(o>s)return qee(t,u,i,o/s),u;const c=zee(i,t,s);if(o>0){let d,f;const p=o>1?Math.round((l-a)/(o-1)):null;for($f(t,u,c,Qt(p)?0:a-p,a),d=0,f=o-1;d<f;d++)$f(t,u,c,i[d],i[d+1]);return $f(t,u,c,l,Qt(p)?t.length:l+p),u}return $f(t,u,c),u}function Hee(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 zee(e,t,n){const r=Wee(e),s=t.length/n;if(!r)return Math.max(s,1);const i=XJ(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 jee(e){const t=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}function qee(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 $f(e,t,n,r,s){const i=Pt(r,0),o=Math.min(Pt(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 Wee(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 Gee=e=>e==="left"?"right":e==="right"?"left":e,xx=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,Ex=(e,t)=>Math.min(t||e,e);function Cx(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 Kee(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 Yee(e,t){Rt(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 ec(e){return e.drawTicks?e.tickLength:0}function Tx(e,t){if(!e.display)return 0;const n=er(e.font,t),r=ds(e.padding);return(_n(e.text)?e.text.length:1)*n.lineHeight+r.height}function Xee(e,t){return Fu(e,{scale:t,type:"scale"})}function Qee(e,t,n){return Fu(e,{tick:n,index:t,type:"tick"})}function Jee(e,t,n){let r=cS(e);return(n&&t!=="right"||!n&&t==="right")&&(r=Gee(r)),r}function Zee(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,g;const m=o-s,y=a-i;if(e.isHorizontal()){if(p=Wn(r,i,a),_t(n)){const b=Object.keys(n)[0],w=n[b];g=c[b].getPixelForValue(w)+m-t}else n==="center"?g=(u.bottom+u.top)/2+m-t:g=xx(e,n,t);f=a-i}else{if(_t(n)){const b=Object.keys(n)[0],w=n[b];p=c[b].getPixelForValue(w)-y+t}else n==="center"?p=(u.left+u.right)/2-y+t:p=xx(e,n,t);g=Wn(r,o,s),d=n==="left"?-Ss:Ss}return{titleX:p,titleY:g,maxWidth:f,rotation:d}}class Vu extends Nu{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=Us(t,Number.POSITIVE_INFINITY),n=Us(n,Number.NEGATIVE_INFINITY),r=Us(r,Number.POSITIVE_INFINITY),s=Us(s,Number.NEGATIVE_INFINITY),{min:Us(t,r),max:Us(n,s),minDefined:cs(t),maxDefined:cs(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:Us(n,Us(r,n)),max:Us(r,Us(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(){Yt(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=EZ(this,i,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?Cx(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=Uee(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(){Yt(this.options.afterUpdate,[this])}beforeSetDimensions(){Yt(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(){Yt(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),Yt(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Yt(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=Yt(n.callback,[i.value,r,t],this)}afterTickToLabelConversion(){Yt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Yt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,r=Ex(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=_s(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-ec(t.grid)-n.padding-Tx(t.title,this.chart.options.font),u=Math.sqrt(d*d+f*f),o=ZJ(Math.min(Math.asin(_s((c.highest.height+6)/a,-1,1)),Math.asin(_s(l/u,-1,1))-Math.asin(_s(f/u,-1,1)))),o=Math.max(s,Math.min(i,o))),this.labelRotation=o}afterCalculateLabelRotation(){Yt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Yt(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=Tx(s,n.options.font);if(a?(t.width=this.maxWidth,t.height=ec(i)+l):(t.height=this.maxHeight,t.width=ec(i)+l),r.display&&this.ticks.length){const{first:u,last:c,widest:d,highest:f}=this._getLabelSizes(),p=r.padding*2,g=fa(this.labelRotation),m=Math.cos(g),y=Math.sin(g);if(a){const b=r.mirror?0:y*d.width+m*f.height;t.height=Math.min(this.maxHeight,t.height+b+p)}else{const b=r.mirror?0:m*d.width+y*f.height;t.width=Math.min(this.maxWidth,t.width+b+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(){Yt(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++)Qt(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=Cx(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/Ex(n,r));let u=0,c=0,d,f,p,g,m,y,b,w,S,C,_;for(d=0;d<n;d+=l){if(g=t[d].label,m=this._resolveTickFontOptions(d),s.font=y=m.string,b=i[y]=i[y]||{data:{},gc:[]},w=m.lineHeight,S=C=0,!Qt(g)&&!_n(g))S=nx(s,b.data,b.gc,S,g),C=w;else if(_n(g))for(f=0,p=g.length;f<p;++f)_=g[f],!Qt(_)&&!_n(_)&&(S=nx(s,b.data,b.gc,S,_),C+=w);o.push(S),a.push(C),u=Math.max(S,u),c=Math.max(C,c)}Yee(i,n);const R=o.indexOf(u),T=a.indexOf(c),x=E=>({width:o[E]||0,height:a[E]||0});return{first:x(0),last:x(n-1),widest:x(R),highest:x(T),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 rZ(this._alignToPixels?ta(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=Qee(this.getContext(),t,r))}return this.$context||(this.$context=Xee(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=fa(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=ec(i),p=[],g=a.setContext(this.getContext()),m=g.display?g.width:0,y=m/2,b=function(z){return ta(r,z,m)};let w,S,C,_,R,T,x,E,P,M,O,A;if(o==="top")w=b(this.bottom),T=this.bottom-f,E=w-y,M=b(t.top)+y,A=t.bottom;else if(o==="bottom")w=b(this.top),M=t.top,A=b(t.bottom)-y,T=w+y,E=this.top+f;else if(o==="left")w=b(this.right),R=this.right-f,x=w-y,P=b(t.left)+y,O=t.right;else if(o==="right")w=b(this.left),P=t.left,O=b(t.right)-y,R=w+y,x=this.left+f;else if(n==="x"){if(o==="center")w=b((t.top+t.bottom)/2+.5);else if(_t(o)){const z=Object.keys(o)[0],Y=o[z];w=b(this.chart.scales[z].getPixelForValue(Y))}M=t.top,A=t.bottom,T=w+y,E=T+f}else if(n==="y"){if(o==="center")w=b((t.left+t.right)/2);else if(_t(o)){const z=Object.keys(o)[0],Y=o[z];w=b(this.chart.scales[z].getPixelForValue(Y))}R=w-y,x=R-f,P=t.left,O=t.right}const D=Pt(s.ticks.maxTicksLimit,d),H=Math.max(1,Math.ceil(d/D));for(S=0;S<d;S+=H){const z=this.getContext(S),Y=i.setContext(z),q=a.setContext(z),V=Y.lineWidth,G=Y.color,te=q.dash||[],W=q.dashOffset,J=Y.tickWidth,pe=Y.tickColor,ae=Y.tickBorderDash||[],oe=Y.tickBorderDashOffset;C=Kee(this,S,l),C!==void 0&&(_=ta(r,C,V),u?R=x=P=O=_:T=E=M=A=_,p.push({tx1:R,ty1:T,tx2:x,ty2:E,x1:P,y1:M,x2:O,y2:A,width:V,color:G,borderDash:te,borderDashOffset:W,tickWidth:J,tickColor:pe,tickBorderDash:ae,tickBorderDashOffset:oe}))}return this._ticksLength=d,this._borderValue=w,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=ec(r.grid),p=f+c,g=d?-c:p,m=-fa(this.labelRotation),y=[];let b,w,S,C,_,R,T,x,E,P,M,O,A="middle";if(s==="top")R=this.bottom-g,T=this._getXAxisLabelAlignment();else if(s==="bottom")R=this.top+g,T=this._getXAxisLabelAlignment();else if(s==="left"){const H=this._getYAxisLabelAlignment(f);T=H.textAlign,_=H.x}else if(s==="right"){const H=this._getYAxisLabelAlignment(f);T=H.textAlign,_=H.x}else if(n==="x"){if(s==="center")R=(t.top+t.bottom)/2+p;else if(_t(s)){const H=Object.keys(s)[0],z=s[H];R=this.chart.scales[H].getPixelForValue(z)+p}T=this._getXAxisLabelAlignment()}else if(n==="y"){if(s==="center")_=(t.left+t.right)/2-p;else if(_t(s)){const H=Object.keys(s)[0],z=s[H];_=this.chart.scales[H].getPixelForValue(z)}T=this._getYAxisLabelAlignment(f).textAlign}n==="y"&&(l==="start"?A="top":l==="end"&&(A="bottom"));const D=this._getLabelSizes();for(b=0,w=a.length;b<w;++b){S=a[b],C=S.label;const H=i.setContext(this.getContext(b));x=this.getPixelForTick(b)+i.labelOffset,E=this._resolveTickFontOptions(b),P=E.lineHeight,M=_n(C)?C.length:1;const z=M/2,Y=H.color,q=H.textStrokeColor,V=H.textStrokeWidth;let G=T;o?(_=x,T==="inner"&&(b===w-1?G=this.options.reverse?"left":"right":b===0?G=this.options.reverse?"right":"left":G="center"),s==="top"?u==="near"||m!==0?O=-M*P+P/2:u==="center"?O=-D.highest.height/2-z*P+P:O=-D.highest.height+P/2:u==="near"||m!==0?O=P/2:u==="center"?O=D.highest.height/2-z*P:O=D.highest.height-M*P,d&&(O*=-1),m!==0&&!H.showLabelBackdrop&&(_+=P/2*Math.sin(m))):(R=x,O=(1-M)*P/2);let te;if(H.showLabelBackdrop){const W=ds(H.backdropPadding),J=D.heights[b],pe=D.widths[b];let ae=O-W.top,oe=0-W.left;switch(A){case"middle":ae-=J/2;break;case"bottom":ae-=J;break}switch(T){case"center":oe-=pe/2;break;case"right":oe-=pe;break;case"inner":b===w-1?oe-=pe:b>0&&(oe-=pe/2);break}te={left:oe,top:ae,width:pe+W.width,height:J+W.height,color:H.backdropColor}}y.push({label:C,font:E,textOffset:O,options:{rotation:m,color:Y,strokeColor:q,strokeWidth:V,textAlign:G,textBaseline:A,translation:[_,R],backdrop:te}})}return y}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-fa(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=ta(t,this.left,o)-o/2,c=ta(t,this.right,a)+a/2,d=f=l):(d=ta(t,this.top,o)-o/2,f=ta(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&&dS(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;ld(r,u,0,c,l,a)}s&&fS(r)}drawTitle(){const{ctx:t,options:{position:n,title:r,reverse:s}}=this;if(!r.display)return;const i=er(r.font),o=ds(r.padding),a=r.align;let l=i.lineHeight/2;n==="bottom"||n==="center"||_t(n)?(l+=o.bottom,_n(r.text)&&(l+=i.lineHeight*(r.text.length-1))):l+=o.top;const{titleX:u,titleY:c,maxWidth:d,rotation:f}=Zee(this,l,n,a);ld(t,r.text,0,0,i,{color:r.color,maxWidth:d,rotation:f,textAlign:Jee(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=Pt(t.grid&&t.grid.z,-1),s=Pt(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Vu.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 er(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Lf{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;nte(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,ete(t,o,r),this.override&&hn.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 hn[s]&&(delete hn[s][r],this.override&&delete za[r])}}function ete(e,t,n){const r=od(Object.create(null),[n?hn.get(n):{},hn.get(t),e.defaults]);hn.set(t,r),e.defaultRoutes&&tte(t,e.defaultRoutes),e.descriptors&&hn.describe(t,e.descriptors)}function tte(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(".");hn.route(i,s,l,a)})}function nte(e){return"id"in e&&"defaults"in e}class rte{constructor(){this.controllers=new Lf(Ac,"datasets",!0),this.elements=new Lf(Nu,"elements"),this.plugins=new Lf(Object,"plugins"),this.scales=new Lf(Vu,"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):Rt(s,o=>{const a=r||this._getRegistryForType(o);this._exec(t,a,o)})})}_exec(t,n,r){const s=lS(t);Yt(r["before"+s],[],r),n[t](r),Yt(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 Ws=new rte;class ste{constructor(){this._init=[]}notify(t,n,r,s){n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const i=s?this._descriptors(t).filter(s):this._descriptors(t),o=this._notify(i,t,n,r);return n==="afterDestroy"&&(this._notify(i,t,"stop"),this._notify(this._init,t,"uninstall")),o}_notify(t,n,r,s){s=s||{};for(const i of t){const o=i.plugin,a=o[r],l=[n,s,i.options];if(Yt(a,l,o)===!1&&s.cancelable)return!1}return!0}invalidate(){Qt(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=Pt(r.options&&r.options.plugins,{}),i=ite(r);return s===!1&&!n?[]:ate(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 ite(e){const t={},n=[],r=Object.keys(Ws.plugins.items);for(let i=0;i<r.length;i++)n.push(Ws.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 ote(e,t){return!t&&e===!1?null:e===!0?{}:e}function ate(e,{plugins:t,localIds:n},r,s){const i=[],o=e.getContext();for(const a of t){const l=a.id,u=ote(r[l],s);u!==null&&i.push({plugin:a,options:lte(e.config,{plugin:a,local:n[l]},u,o)})}return i}function lte(e,{plugin:t,local:n},r,s){const i=e.pluginScopeKeys(t),o=e.getOptionScopes(r,i);return n&&t.defaults&&o.push(t.defaults),e.createResolver(o,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function rb(e,t){const n=hn.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function ute(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function cte(e,t){return e===t?"_index_":"_value_"}function Rx(e){if(e==="x"||e==="y"||e==="r")return e}function dte(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function sb(e,...t){if(Rx(e))return e;for(const n of t){const r=n.axis||dte(n.position)||e.length>1&&Rx(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Px(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function fte(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 Px(e,"x",n[0])||Px(e,"y",n[0])}return{}}function hte(e,t){const n=za[e.type]||{scales:{}},r=t.scales||{},s=rb(e.type,t),i=Object.create(null);return Object.keys(r).forEach(o=>{const a=r[o];if(!_t(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=sb(o,a,fte(o,e),hn.scales[a.type]),u=cte(l,s),c=n.scales||{};i[o]=Rc(Object.create(null),[{axis:l},a,c[l],c[u]])}),e.data.datasets.forEach(o=>{const a=o.type||e.type,l=o.indexAxis||rb(a,t),c=(za[a]||{}).scales||{};Object.keys(c).forEach(d=>{const f=ute(d,l),p=o[f+"AxisID"]||f;i[p]=i[p]||Object.create(null),Rc(i[p],[{axis:f},r[p],c[d]])})}),Object.keys(i).forEach(o=>{const a=i[o];Rc(a,[hn.scales[a.type],hn.scale])}),i}function tD(e){const t=e.options||(e.options={});t.plugins=Pt(t.plugins,{}),t.scales=hte(e,t)}function nD(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function pte(e){return e=e||{},e.data=nD(e.data),tD(e),e}const Ix=new Map,rD=new Set;function Ff(e,t){let n=Ix.get(e);return n||(n=t(),Ix.set(e,n),rD.add(n)),n}const tc=(e,t,n)=>{const r=pu(t,n);r!==void 0&&e.add(r)};class mte{constructor(t){this._config=pte(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=nD(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(),tD(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Ff(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return Ff(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return Ff(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return Ff(`${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=>tc(l,t,d))),c.forEach(d=>tc(l,s,d)),c.forEach(d=>tc(l,za[i]||{},d)),c.forEach(d=>tc(l,hn,d)),c.forEach(d=>tc(l,nb,d))});const u=Array.from(l);return u.length===0&&u.push(Object.create(null)),rD.has(n)&&o.set(n,u),u}chartOptionScopes(){const{options:t,type:n}=this;return[t,za[n]||{},hn.datasets[n]||{},{type:n},hn,nb]}resolveNamedOptions(t,n,r,s=[""]){const i={$shared:!0},{resolver:o,subPrefixes:a}=Ax(this._resolverCache,t,s);let l=o;if(vte(o,n)){i.$shared=!1,r=Mo(r)?r():r;const u=this.createResolver(t,r,a);l=mu(o,r,u)}for(const u of n)i[u]=l[u];return i}createResolver(t,n,r=[""],s){const{resolver:i}=Ax(this._resolverCache,t,r);return _t(n)?mu(i,n,void 0,s):i}}function Ax(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:hS(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},r.set(s,i)),i}const gte=e=>_t(e)&&Object.getOwnPropertyNames(e).some(t=>Mo(e[t]));function vte(e,t){const{isScriptable:n,isIndexable:r}=UM(e);for(const s of t){const i=n(s),o=r(s),a=(o||i)&&e[s];if(i&&(Mo(a)||gte(a))||o&&_n(a))return!0}return!1}var yte="4.4.7";const bte=["top","bottom","left","right","chartArea"];function Ox(e,t){return e==="top"||e==="bottom"||bte.indexOf(e)===-1&&t==="x"}function Mx(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function Dx(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),Yt(n&&n.onComplete,[e],t)}function wte(e){const t=e.chart,n=t.options.animation;Yt(n&&n.onProgress,[e],t)}function sD(e){return gS()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const _h={},$x=e=>{const t=sD(e);return Object.values(_h).filter(n=>n.canvas===t).pop()};function Ste(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 _te(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}function Nf(e,t,n){return e.options.clip?e[n]:t[n]}function kte(e,t){const{xScale:n,yScale:r}=e;return n&&r?{left:Nf(n,t,"left"),right:Nf(n,t,"right"),top:Nf(r,t,"top"),bottom:Nf(r,t,"bottom")}:t}var Ki;let Mm=(Ki=class{static register(...t){Ws.add(...t),Lx()}static unregister(...t){Ws.remove(...t),Lx()}constructor(t,n){const r=this.config=new mte(n),s=sD(t),i=$x(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||Bee(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=HJ(),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 ste,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=aZ(d=>this.update(d),o.resizeDelay||0),this._dataChanges=[],_h[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Si.listen(this,"complete",Dx),Si.listen(this,"progress",wte),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:s,_aspectRatio:i}=this;return Qt(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 Ws}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():ax(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return rx(this.canvas,this.ctx),this}stop(){return Si.stop(this),this}resize(t,n){Si.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,ax(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),Yt(r.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Rt(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=sb(o,a),u=l==="r",c=l==="x";return{options:a,dposition:u?"chartArea":c?"bottom":"left",dtype:u?"radialLinear":c?"category":"linear"}}))),Rt(i,o=>{const a=o.options,l=a.id,u=sb(l,a),c=Pt(a.type,o.dtype);(a.position===void 0||Ox(a.position,u)!==Ox(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=Ws.getScale(c);d=new f({id:l,type:c,ctx:this.ctx,chart:this}),r[d.id]=d}d.init(a,t)}),Rt(s,(o,a)=>{o||delete r[a]}),Rt(r,o=>{rs.configure(this,o,o.options),rs.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(Mx("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((r,s)=>{n.filter(i=>i===r._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,s;for(this._removeUnreferencedMetasets(),r=0,s=n.length;r<s;r++){const i=n[r];let o=this.getDatasetMeta(r);const a=i.type||this.config.type;if(o.type&&o.type!==a&&(this._destroyDatasetMeta(r),o=this.getDatasetMeta(r)),o.type=a,o.indexAxis=i.indexAxis||rb(a,this.options),o.order=i.order||0,o.index=r,o.label=""+i.label,o.visible=this.isDatasetVisible(r),o.controller)o.controller.updateIndex(r),o.controller.linkScales();else{const l=Ws.getController(a),{datasetElementType:u,dataElementType:c}=hn.datasets[a];Object.assign(l,{dataElementType:Ws.getElement(c),datasetElementType:u&&Ws.getElement(u)}),o.controller=new l(this,r),t.push(o.controller)}}return this._updateMetasets(),t}_resetElements(){Rt(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||Rt(i,u=>{u.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Mx("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){Rt(this.scales,t=>{rs.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!Gk(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;Ste(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(!Gk(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;rs.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],Rt(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,Mo(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&&(Si.has(this)?this.attached&&!Si.running(this)&&Si.start(this):(this.draw(),Dx({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=t._clip,s=!r.disabled,i=kte(t,this.chartArea),o={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(s&&dS(n,{left:r.left===!1?0:i.left-r.left,right:r.right===!1?this.width:i.right+r.right,top:r.top===!1?0:i.top-r.top,bottom:r.bottom===!1?this.height:i.bottom+r.bottom}),t.controller.draw(),s&&fS(n),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(t){return NM(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,s){const i=bee.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=Fu(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);ad(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(),Si.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(),rx(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete _h[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)};Rt(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(){Rt(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},Rt(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}});!mp(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=KJ(t),u=_te(t,this._lastEvent,r,l);r&&(this._lastEvent=null,Yt(i.onHover,[t,a,this],this),l&&Yt(i.onClick,[t,a,this],this));const c=!mp(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)}},ge(Ki,"defaults",hn),ge(Ki,"instances",_h),ge(Ki,"overrides",za),ge(Ki,"registry",Ws),ge(Ki,"version",yte),ge(Ki,"getChart",$x),Ki);function Lx(){return Rt(Mm.instances,e=>e._plugins.invalidate())}function iD(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 bo(e,t,n,r){return e?0:_s(t,n,r)}function xte(e,t,n){const r=e.options.borderWidth,s=e.borderSkipped,i=BM(r);return{t:bo(s.top,i.top,0,n),r:bo(s.right,i.right,0,t),b:bo(s.bottom,i.bottom,0,n),l:bo(s.left,i.left,0,t)}}function Ete(e,t,n){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),s=e.options.borderRadius,i=Dl(s),o=Math.min(t,n),a=e.borderSkipped,l=r||_t(s);return{topLeft:bo(!l||a.top||a.left,i.topLeft,0,o),topRight:bo(!l||a.top||a.right,i.topRight,0,o),bottomLeft:bo(!l||a.bottom||a.left,i.bottomLeft,0,o),bottomRight:bo(!l||a.bottom||a.right,i.bottomRight,0,o)}}function Cte(e){const t=iD(e),n=t.right-t.left,r=t.bottom-t.top,s=xte(e,n/2,r/2),i=Ete(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 Kg(e,t,n,r){const s=t===null,i=n===null,a=e&&!(s&&i)&&iD(e,r);return a&&(s||El(t,a.left,a.right))&&(i||El(n,a.top,a.bottom))}function Tte(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function Rte(e,t){e.rect(t.x,t.y,t.w,t.h)}function Yg(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 kh extends Nu{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}=Cte(this),a=Tte(o.radius)?bp:Rte;t.save(),(o.w!==i.w||o.h!==i.h)&&(t.beginPath(),a(t,Yg(o,n,i)),t.clip(),a(t,Yg(i,-n,o)),t.fillStyle=r,t.fill("evenodd")),t.beginPath(),a(t,Yg(i,n)),t.fillStyle=s,t.fill(),t.restore()}inRange(t,n,r){return Kg(this,t,n,r)}inXRange(t,n){return Kg(this,t,null,n)}inYRange(t,n){return Kg(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}}ge(kh,"id","bar"),ge(kh,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),ge(kh,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});const Fx=(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)}},Pte=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class Nx extends Nu{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=Yt(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=er(r.font),i=s.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=Fx(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((g,m)=>{const y=r+n/2+i.measureText(g.text).width;(m===0||u[u.length-1]+y+2*a>o)&&(d+=c,u[u.length-(m>0?0:1)]=0,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,g=0,m=0;return this.legendItems.forEach((y,b)=>{const{itemWidth:w,itemHeight:S}=Ite(r,n,i,y,s);b>0&&p+S+2*a>c&&(d+=f+a,u.push({width:f,height:p}),g+=f+a,m++,f=p=0),l[b]={left:g,top:p,col:m,width:w,height:S},f=Math.max(f,w),p+=S+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=$l(i,this.left,this.width);if(this.isHorizontal()){let a=0,l=Wn(r,this.left+s,this.right-this.lineWidths[a]);for(const u of n)a!==u.row&&(a=u.row,l=Wn(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=Wn(r,this.top+t+s,this.bottom-this.columnSizes[a].height);for(const u of n)u.col!==a&&(a=u.col,l=Wn(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;dS(t,this),this._draw(),fS(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:s}=this,{align:i,labels:o}=t,a=hn.color,l=$l(t.rtl,this.left,this.width),u=er(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:g,boxHeight:m,itemHeight:y}=Fx(o,d),b=function(R,T,x){if(isNaN(g)||g<=0||isNaN(m)||m<0)return;s.save();const E=Pt(x.lineWidth,1);if(s.fillStyle=Pt(x.fillStyle,a),s.lineCap=Pt(x.lineCap,"butt"),s.lineDashOffset=Pt(x.lineDashOffset,0),s.lineJoin=Pt(x.lineJoin,"miter"),s.lineWidth=E,s.strokeStyle=Pt(x.strokeStyle,a),s.setLineDash(Pt(x.lineDash,[])),o.usePointStyle){const P={radius:m*Math.SQRT2/2,pointStyle:x.pointStyle,rotation:x.rotation,borderWidth:E},M=l.xPlus(R,g/2),O=T+f;FM(s,P,M,O,o.pointStyleWidth&&g)}else{const P=T+Math.max((d-m)/2,0),M=l.leftForLtr(R,g),O=Dl(x.borderRadius);s.beginPath(),Object.values(O).some(A=>A!==0)?bp(s,{x:M,y:P,w:g,h:m,radius:O}):s.rect(M,P,g,m),s.fill(),E!==0&&s.stroke()}s.restore()},w=function(R,T,x){ld(s,x.text,R,T+y/2,u,{strikethrough:x.hidden,textAlign:l.textAlign(x.textAlign)})},S=this.isHorizontal(),C=this._computeTitleHeight();S?p={x:Wn(i,this.left+c,this.right-r[0]),y:this.top+c+C,line:0}:p={x:this.left+c,y:Wn(i,this.top+C+c,this.bottom-n[0].height),line:0},qM(this.ctx,t.textDirection);const _=y+c;this.legendItems.forEach((R,T)=>{s.strokeStyle=R.fontColor,s.fillStyle=R.fontColor;const x=s.measureText(R.text).width,E=l.textAlign(R.textAlign||(R.textAlign=o.textAlign)),P=g+f+x;let M=p.x,O=p.y;l.setWidth(this.width),S?T>0&&M+P+c>this.right&&(O=p.y+=_,p.line++,M=p.x=Wn(i,this.left+c,this.right-r[p.line])):T>0&&O+_>this.bottom&&(M=p.x=M+n[p.line].width+c,p.line++,O=p.y=Wn(i,this.top+C+c,this.bottom-n[p.line].height));const A=l.x(M);if(b(A,O,R),M=lZ(E,M+g+f,S?M+P:this.right,t.rtl),w(l.x(M),O,R),S)p.x+=P+c;else if(typeof R.text!="string"){const D=u.lineHeight;p.y+=oD(R,D)+c}else p.y+=_}),WM(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=er(n.font),s=ds(n.padding);if(!n.display)return;const i=$l(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=Wn(t.align,d,this.right-f);else{const g=this.columnSizes.reduce((m,y)=>Math.max(m,y.height),0);c=u+Wn(t.align,this.top,this.bottom-g-t.labels.padding-this._computeTitleHeight())}const p=Wn(a,d,d+f);o.textAlign=i.textAlign(cS(a)),o.textBaseline="middle",o.strokeStyle=n.color,o.fillStyle=n.color,o.font=r.string,ld(o,n.text,p,c,r)}_computeTitleHeight(){const t=this.options.title,n=er(t.font),r=ds(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,s,i;if(El(t,this.left,this.right)&&El(n,this.top,this.bottom)){for(i=this.legendHitBoxes,r=0;r<i.length;++r)if(s=i[r],El(t,s.left,s.left+s.width)&&El(n,s.top,s.top+s.height))return this.legendItems[r]}return null}handleEvent(t){const n=this.options;if(!Mte(t.type,n))return;const r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const s=this._hoveredItem,i=Pte(s,r);s&&!i&&Yt(n.onLeave,[t,s,this],this),this._hoveredItem=r,r&&!i&&Yt(n.onHover,[t,r,this],this)}else r&&Yt(n.onClick,[t,r,this],this)}}function Ite(e,t,n,r,s){const i=Ate(r,e,t,n),o=Ote(s,r,t.lineHeight);return{itemWidth:i,itemHeight:o}}function Ate(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 Ote(e,t,n){let r=e;return typeof t.text!="string"&&(r=oD(t,n)),r}function oD(e,t){const n=e.text?e.text.length:0;return t*n}function Mte(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var Dte={id:"legend",_element:Nx,start(e,t,n){const r=e.legend=new Nx({ctx:e.ctx,options:n,chart:e});rs.configure(e,r,n),rs.addBox(e,r)},stop(e){rs.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;rs.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=ds(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 aD extends Nu{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=_n(r.text)?r.text.length:1;this._padding=ds(r.padding);const i=s*er(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=Wn(a,r,i),d=n+t,u=i-r):(o.position==="left"?(c=r+t,d=Wn(a,s,n),l=rr*-.5):(c=i-t,d=Wn(a,n,s),l=rr*.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=er(n.font),i=r.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:l,rotation:u}=this._drawArgs(i);ld(t,n.text,0,0,r,{color:n.color,maxWidth:l,rotation:u,textAlign:cS(n.align),textBaseline:"middle",translation:[o,a]})}}function $te(e,t){const n=new aD({ctx:e.ctx,options:t,chart:e});rs.configure(e,n,t),rs.addBox(e,n),e.titleBlock=n}var Lte={id:"title",_element:aD,start(e,t,n){$te(e,n)},stop(e){const t=e.titleBlock;rs.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;rs.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const cc={average(e){if(!e.length)return!1;let t,n,r=new Set,s=0,i=0;for(t=0,n=e.length;t<n;++t){const a=e[t].element;if(a&&a.hasValue()){const l=a.tooltipPosition();r.add(l.x),s+=l.y,++i}}return i===0||r.size===0?!1:{x:[...r].reduce((a,l)=>a+l)/r.size,y:s/i}},nearest(e,t){if(!e.length)return!1;let n=t.x,r=t.y,s=Number.POSITIVE_INFINITY,i,o,a;for(i=0,o=e.length;i<o;++i){const l=e[i].element;if(l&&l.hasValue()){const u=l.getCenterPoint(),c=tZ(t,u);c<s&&(s=c,a=l)}}if(a){const l=a.tooltipPosition();n=l.x,r=l.y}return{x:n,y:r}}};function zs(e,t){return t&&(_n(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function _i(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
|
|
83
|
-
`)>-1?e.split(`
|
|
84
|
-
`):e}function Fte(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 Vx(e,t){const n=e.chart.ctx,{body:r,footer:s,title:i}=e,{boxWidth:o,boxHeight:a}=t,l=er(t.bodyFont),u=er(t.titleFont),c=er(t.footerFont),d=i.length,f=s.length,p=r.length,g=ds(t.padding);let m=g.height,y=0,b=r.reduce((C,_)=>C+_.before.length+_.lines.length+_.after.length,0);if(b+=e.beforeBody.length+e.afterBody.length,d&&(m+=d*u.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),b){const C=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;m+=p*C+(b-p)*l.lineHeight+(b-1)*t.bodySpacing}f&&(m+=t.footerMarginTop+f*c.lineHeight+(f-1)*t.footerSpacing);let w=0;const S=function(C){y=Math.max(y,n.measureText(C).width+w)};return n.save(),n.font=u.string,Rt(e.title,S),n.font=l.string,Rt(e.beforeBody.concat(e.afterBody),S),w=t.displayColors?o+2+t.boxPadding:0,Rt(r,C=>{Rt(C.before,S),Rt(C.lines,S),Rt(C.after,S)}),w=0,n.font=c.string,Rt(e.footer,S),n.restore(),y+=g.width,{width:y,height:m}}function Nte(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function Vte(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 Bte(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"),Vte(u,e,t,n)&&(u="center"),u}function Bx(e,t,n){const r=n.yAlign||t.yAlign||Nte(e,n);return{xAlign:n.xAlign||t.xAlign||Bte(e,t,n,r),yAlign:r}}function Ute(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function Hte(e,t,n){let{y:r,height:s}=e;return t==="top"?r+=n:t==="bottom"?r-=s+n:r-=s/2,r}function Ux(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}=Dl(o);let g=Ute(t,a);const m=Hte(t,l,u);return l==="center"?a==="left"?g+=u:a==="right"&&(g-=u):a==="left"?g-=Math.max(c,f)+s:a==="right"&&(g+=Math.max(d,p)+s),{x:_s(g,0,r.width-t.width),y:_s(m,0,r.height-t.height)}}function Vf(e,t,n){const r=ds(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function Hx(e){return zs([],_i(e))}function zte(e,t,n){return Fu(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function zx(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const lD={beforeTitle:yi,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:yi,beforeBody:yi,beforeLabel:yi,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 Qt(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:yi,afterBody:yi,beforeFooter:yi,footer:yi,afterFooter:yi};function br(e,t,n,r){const s=e[t].call(n,r);return typeof s>"u"?lD[t].call(n,r):s}class ib extends Nu{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 GM(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(i)),i}getContext(){return this.$context||(this.$context=zte(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,s=br(r,"beforeTitle",this,t),i=br(r,"title",this,t),o=br(r,"afterTitle",this,t);let a=[];return a=zs(a,_i(s)),a=zs(a,_i(i)),a=zs(a,_i(o)),a}getBeforeBody(t,n){return Hx(br(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,s=[];return Rt(t,i=>{const o={before:[],lines:[],after:[]},a=zx(r,i);zs(o.before,_i(br(a,"beforeLabel",this,i))),zs(o.lines,br(a,"label",this,i)),zs(o.after,_i(br(a,"afterLabel",this,i))),s.push(o)}),s}getAfterBody(t,n){return Hx(br(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,s=br(r,"beforeFooter",this,t),i=br(r,"footer",this,t),o=br(r,"afterFooter",this,t);let a=[];return a=zs(a,_i(s)),a=zs(a,_i(i)),a=zs(a,_i(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(Fte(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))),Rt(a,c=>{const d=zx(t.callbacks,c);s.push(br(d,"labelColor",this,c)),i.push(br(d,"labelPointStyle",this,c)),o.push(br(d,"labelTextColor",this,c))}),this.labelColors=s,this.labelPointStyles=i,this.labelTextColors=o,this.dataPoints=a,a}update(t,n){const r=this.options.setContext(this.getContext()),s=this._active;let i,o=[];if(!s.length)this.opacity!==0&&(i={opacity:0});else{const a=cc[r.position].call(this,s,this._eventPosition);o=this._createItems(r),this.title=this.getTitle(o,r),this.beforeBody=this.getBeforeBody(o,r),this.body=this.getBody(o,r),this.afterBody=this.getAfterBody(o,r),this.footer=this.getFooter(o,r);const l=this._size=Vx(this,r),u=Object.assign({},a,l),c=Bx(this.chart,r,u),d=Ux(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}=Dl(a),{x:f,y:p}=t,{width:g,height:m}=n;let y,b,w,S,C,_;return i==="center"?(C=p+m/2,s==="left"?(y=f,b=y-o,S=C+o,_=C-o):(y=f+g,b=y+o,S=C-o,_=C+o),w=y):(s==="left"?b=f+Math.max(l,c)+o:s==="right"?b=f+g-Math.max(u,d)-o:b=this.caretX,i==="top"?(S=p,C=S-o,y=b-o,w=b+o):(S=p+m,C=S+o,y=b+o,w=b-o),_=S),{x1:y,x2:b,x3:w,y1:S,y2:C,y3:_}}drawTitle(t,n,r){const s=this.title,i=s.length;let o,a,l;if(i){const u=$l(r.rtl,this.x,this.width);for(t.x=Vf(this,r.titleAlign,r),n.textAlign=u.textAlign(r.titleAlign),n.textBaseline="middle",o=er(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=er(i.bodyFont),d=Vf(this,"left",i),f=s.x(d),p=l<c.lineHeight?(c.lineHeight-l)/2:0,g=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,b=g+l/2;t.strokeStyle=i.multiKeyBackground,t.fillStyle=i.multiKeyBackground,sx(t,m,y,b),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,sx(t,m,y,b)}else{t.lineWidth=_t(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),b=Dl(o.borderRadius);Object.values(b).some(w=>w!==0)?(t.beginPath(),t.fillStyle=i.multiKeyBackground,bp(t,{x:m,y:g,w:u,h:l,radius:b}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),bp(t,{x:y,y:g+1,w:u-2,h:l-2,radius:b}),t.fill()):(t.fillStyle=i.multiKeyBackground,t.fillRect(m,g,u,l),t.strokeRect(m,g,u,l),t.fillStyle=o.backgroundColor,t.fillRect(y,g+1,u-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:s}=this,{bodySpacing:i,bodyAlign:o,displayColors:a,boxHeight:l,boxWidth:u,boxPadding:c}=r,d=er(r.bodyFont);let f=d.lineHeight,p=0;const g=$l(r.rtl,this.x,this.width),m=function(x){n.fillText(x,g.x(t.x+p),t.y+f/2),t.y+=f+i},y=g.textAlign(o);let b,w,S,C,_,R,T;for(n.textAlign=o,n.textBaseline="middle",n.font=d.string,t.x=Vf(this,y,r),n.fillStyle=r.bodyColor,Rt(this.beforeBody,m),p=a&&y!=="right"?o==="center"?u/2+c:u+2+c:0,C=0,R=s.length;C<R;++C){for(b=s[C],w=this.labelTextColors[C],n.fillStyle=w,Rt(b.before,m),S=b.lines,a&&S.length&&(this._drawColorBox(n,t,C,g,r),f=Math.max(d.lineHeight,l)),_=0,T=S.length;_<T;++_)m(S[_]),f=d.lineHeight;Rt(b.after,m)}p=0,f=d.lineHeight,Rt(this.afterBody,m),t.y-=i}drawFooter(t,n,r){const s=this.footer,i=s.length;let o,a;if(i){const l=$l(r.rtl,this.x,this.width);for(t.x=Vf(this,r.footerAlign,r),t.y+=r.footerMarginTop,n.textAlign=l.textAlign(r.footerAlign),n.textBaseline="middle",o=er(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:g}=Dl(s.cornerRadius);n.fillStyle=s.backgroundColor,n.strokeStyle=s.borderColor,n.lineWidth=s.borderWidth,n.beginPath(),n.moveTo(a+d,l),o==="top"&&this.drawCaret(t,n,r,s),n.lineTo(a+u-f,l),n.quadraticCurveTo(a+u,l,a+u,l+f),o==="center"&&i==="right"&&this.drawCaret(t,n,r,s),n.lineTo(a+u,l+c-g),n.quadraticCurveTo(a+u,l+c,a+u-g,l+c),o==="bottom"&&this.drawCaret(t,n,r,s),n.lineTo(a+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=cc[t.position].call(this,this._active,this._eventPosition);if(!o)return;const a=this._size=Vx(this,t),l=Object.assign({},o,this._size),u=Bx(n,t,l),c=Ux(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=ds(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),qM(t,n.textDirection),i.y+=o.top,this.drawTitle(i,t,n),this.drawBody(i,t,n),this.drawFooter(i,t,n),WM(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=!mp(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||!mp(o,i)||a;return l&&(this._active=o,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,r,s){const i=this.options;if(t.type==="mouseout")return[];if(!s)return n.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const o=this.chart.getElementsAtEventForMode(t,i.mode,i,r);return i.reverse&&o.reverse(),o}_positionChanged(t,n){const{caretX:r,caretY:s,options:i}=this,o=cc[i.position].call(this,t,n);return o!==!1&&(r!==o.x||s!==o.y)}}ge(ib,"positioners",cc);var jte={id:"tooltip",_element:ib,positioners:cc,afterInit(e,t,n){n&&(e.tooltip=new ib({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:lD},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 qte=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function Wte(e,t,n,r){const s=e.indexOf(t);if(s===-1)return qte(e,t,n,r);const i=e.lastIndexOf(t);return s!==i?n:s}const Gte=(e,t)=>e===null?null:_s(Math.round(e),0,t);function jx(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class ob extends Vu{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(Qt(t))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===t?n:Wte(r,t,Pt(n,t),this._addedLabels),Gte(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 jx.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}}ge(ob,"id","category"),ge(ob,"defaults",{ticks:{callback:jx}});function Kte(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,g=c-1,{min:m,max:y}=t,b=!Qt(o),w=!Qt(a),S=!Qt(u),C=(y-m)/(d+1);let _=Yk((y-m)/g/p)*p,R,T,x,E;if(_<1e-14&&!b&&!w)return[{value:m},{value:y}];E=Math.ceil(y/_)-Math.floor(m/_),E>g&&(_=Yk(E*_/g/p)*p),Qt(l)||(R=Math.pow(10,l),_=Math.ceil(_*R)/R),s==="ticks"?(T=Math.floor(m/_)*_,x=Math.ceil(y/_)*_):(T=m,x=y),b&&w&&i&&QJ((a-o)/i,_/1e3)?(E=Math.round(Math.min((a-o)/_,c)),_=(a-o)/E,T=o,x=a):S?(T=b?o:T,x=w?a:x,E=u-1,_=(x-T)/E):(E=(x-T)/_,bh(E,Math.round(E),_/1e3)?E=Math.round(E):E=Math.ceil(E));const P=Math.max(Xk(_),Xk(T));R=Math.pow(10,Qt(l)?P:l),T=Math.round(T*R)/R,x=Math.round(x*R)/R;let M=0;for(b&&(f&&T!==o?(n.push({value:o}),T<o&&M++,bh(Math.round((T+M*_)*R)/R,o,qx(o,C,e))&&M++):T<o&&M++);M<E;++M){const O=Math.round((T+M*_)*R)/R;if(w&&O>a)break;n.push({value:O})}return w&&f&&x!==a?n.length&&bh(n[n.length-1].value,a,qx(a,C,e))?n[n.length-1].value=a:n.push({value:a}):(!w||x===a)&&n.push({value:x}),n}function qx(e,t,{horizontal:n,minRotation:r}){const s=fa(r),i=(n?Math.sin(s):Math.cos(s))||.001,o=.75*t*(""+e).length;return Math.min(t/i,o)}class Yte extends Vu{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 Qt(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=Kte(s,i);return t.bounds==="ticks"&&JJ(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 DM(t,this.chart.options.locale,this.options.ticks.format)}}class ab extends Yte{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=cs(t)?t:0,this.max=cs(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=fa(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}}ge(ab,"id","linear"),ge(ab,"defaults",{ticks:{callback:LM.formatters.numeric}});const Dm={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}},Er=Object.keys(Dm);function Wx(e,t){return e-t}function Gx(e,t){if(Qt(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)),cs(o)||(o=typeof r=="string"?n.parse(o,r):n.parse(o)),o===null?null:(s&&(o=s==="week"&&(yp(i)||i===!0)?n.startOf(o,"isoWeek",i):n.startOf(o,s)),+o)}function Kx(e,t,n,r){const s=Er.length;for(let i=Er.indexOf(e);i<s-1;++i){const o=Dm[Er[i]],a=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((n-t)/(a*o.size))<=r)return Er[i]}return Er[s-1]}function Xte(e,t,n,r,s){for(let i=Er.length-1;i>=Er.indexOf(n);i--){const o=Er[i];if(Dm[o].common&&e._adapter.diff(s,r,o)>=t-1)return o}return Er[n?Er.indexOf(n):0]}function Qte(e){for(let t=Er.indexOf(e)+1,n=Er.length;t<n;++t)if(Dm[Er[t]].common)return Er[t]}function Yx(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:r,hi:s}=uS(n,t),i=n[r]>=t?n[r]:n[s];e[i]=!0}}function Jte(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 Xx(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:Jte(e,r,s,n)}class _p extends Vu{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 pee._date(t.adapters.date);s.init(n),Rc(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:Gx(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=cs(s)&&!isNaN(s)?s:+n.startOf(Date.now(),r),i=cs(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=iZ(s,i,o);return this._unit=n.unit||(r.autoSkip?Kx(n.minUnit,this.min,this.max,this._getLabelCapacity(i)):Xte(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:Qte(this._unit),this.initOffsets(s),t.reverse&&a.reverse(),Xx(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=_s(n,0,o),r=_s(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||Kx(i.minUnit,n,r,this._getLabelCapacity(n)),a=Pt(s.ticks.stepSize,1),l=o==="week"?i.isoWeekday:!1,u=yp(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 g=s.ticks.source==="data"&&this.getDataTimestamps();for(f=d,p=0;f<r;f=+t.add(f,a,o),p++)Yx(c,f,g);return(f===r||s.bounds==="ticks"||p===1)&&Yx(c,f,g),Object.keys(c).sort(Wx).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 Yt(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=fa(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,Xx(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(Gx(this,s[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return IM(t.sort(Wx))}}ge(_p,"id","time"),ge(_p,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function Bf(e,t,n){let r=0,s=e.length-1,i,o,a,l;n?(t>=e[r].pos&&t<=e[s].pos&&({lo:r,hi:s}=tb(e,"pos",t)),{pos:i,time:a}=e[r],{pos:o,time:l}=e[s]):(t>=e[r].time&&t<=e[s].time&&({lo:r,hi:s}=tb(e,"time",t)),{time:i,pos:a}=e[r],{time:o,pos:l}=e[s]);const u=o-i;return u?a+(l-a)*(t-i)/u:a}class Qx extends _p{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=Bf(n,this.min),this._tableRange=Bf(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(Bf(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return Bf(this._table,r*this._tableRange+this._minPos,!0)}}ge(Qx,"id","timeseries"),ge(Qx,"defaults",_p.defaults);const uD={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},Zte={ariaLabel:{type:String},ariaDescribedby:{type:String}},ene={type:{type:String,required:!0},destroyDelay:{type:Number,default:0},...uD,...Zte},tne=jC[0]==="2"?(e,t)=>Object.assign(e,{attrs:t}):(e,t)=>Object.assign(e,t);function cl(e){return xd(e)?Be(e):e}function nne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e;return xd(t)?new Proxy(e,{}):e}function rne(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function cD(e,t){e.labels=t}function dD(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 sne(e,t){const n={labels:[],datasets:[]};return cD(n,e.labels),dD(n,e.datasets,t),n}const ine=De({props:ene,setup(e,t){let{expose:n,slots:r}=t;const s=B(null),i=Oe(null);n({chart:i});const o=()=>{if(!s.value)return;const{type:u,data:c,options:d,plugins:f,datasetIdKey:p}=e,g=sne(c,p),m=nne(g,c);i.value=new Mm(s.value,{type:u,data:m,options:{...d},plugins:f})},a=()=>{const u=Be(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 St(o),Fp(a),xe([()=>e.options,()=>e.data],(u,c)=>{let[d,f]=u,[p,g]=c;const m=Be(i.value);if(!m)return;let y=!1;if(d){const b=cl(d),w=cl(p);b&&b!==w&&(rne(m,b),y=!0)}if(f){const b=cl(f.labels),w=cl(g.labels),S=cl(f.datasets),C=cl(g.datasets);b!==w&&(cD(m.config.data,b),y=!0),S&&S!==C&&(dD(m.config.data,S,e.datasetIdKey),y=!0)}y&&At(()=>{l(m)})},{deep:!0}),()=>Ir("canvas",{role:"img",ariaLabel:e.ariaLabel,ariaDescribedby:e.ariaDescribedby,ref:s},[Ir("p",{},[r.default?r.default():""])])}});function one(e,t){return Mm.register(t),De({props:uD,setup(n,r){let{expose:s}=r;const i=Oe(null),o=a=>{i.value=a==null?void 0:a.chart};return s({chart:i}),()=>Ir(ine,tne({ref:o},{type:e,...n}))}})}const ane=one("bar",wh),lne={class:"ma-3"},une={class:"ml-6"},cne={class:"ml-7 mt-3"},dne={key:0},fne={key:2},hne=De({__name:"EmergencyCommands",setup(e){Mm.register(ob,ab,kh,Lte,jte,Dte);const t=Lt(),n=ji(),r=B(!1),s=B([]),i=B([]),o=B(NaN),a=B(NaN),l=B(NaN),u=B({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=I(()=>n.hasFeature("batchConnectUsbCalls")),f=I(()=>n.hasFeature("batchConnectSocketCalls"));async function p(){const w=t.printers.map(T=>T.id),S=await xl.batchSettingsGet(w),C=S.map(T=>{var x,E;return((E=(x=T.value)==null?void 0:x.appearance)==null?void 0:E.name)||"ERROR"});i.value=S.filter(T=>!T.success).map(T=>({message:T.error}));const _=S.map(T=>T.time),R=S.map(T=>{var x,E;return((E=(x=T.value)==null?void 0:x.appearance)==null?void 0:E.name)??""});o.value=_.reduce((T,x)=>T+x,0)/_.length,l.value=Math.min(..._),a.value=Math.max(..._),u.value={labels:R,datasets:[{label:"OctoPrint Settings response times (ms)",data:_,borderColor:"#FF6384",backgroundColor:"#ffffff"}]},await KO(500),r.value=!0,s.value=C}async function g(){await td.restartServer()}async function m(w){if(!confirm("Are you sure you want to toggle all printers?"))return;const S=t.printers.map(C=>C.id);await xl.batchToggleEnabled(S,w)}async function y(){if(!confirm("Are you sure you want to connect all USBs?"))return;const w=t.printers.map(S=>S.id);await xl.batchConnectUsb(w)}async function b(){if(!confirm("Are you sure you want to connect all sockets?"))return;const w=t.printers.map(S=>S.id);await xl.batchConnectSocket(w)}return(w,S)=>(L(),Z(bt,null,{default:v(()=>[h(mr,{color:"primary"},{default:v(()=>[h(lt,null,{default:v(()=>[h(X,null,{default:v(()=>S[6]||(S[6]=[k("settings")])),_:1})]),_:1}),h(Rn,null,{default:v(()=>S[7]||(S[7]=[k(" Emergency Commands ")])),_:1})]),_:1}),h(Ft,{subheader:"",lines:"three"},{default:v(()=>[h(os,null,{default:v(()=>S[8]||(S[8]=[k(" Emergency Commands to rectify problematic situations ")])),_:1}),h(Le,null,{default:v(()=>[h(ut,null,{default:v(()=>S[9]||(S[9]=[k(" Server commands ")])),_:1}),h(vt,null,{default:v(()=>[S[11]||(S[11]=k(" Restart the server ")),S[12]||(S[12]=$("br",null,null,-1)),h(re,{color:"primary",disabled:"",onClick:S[0]||(S[0]=C=>g())},{default:v(()=>S[10]||(S[10]=[k(" Restart server (does not work yet) ")])),_:1})]),_:1})]),_:1}),h(Le,null,{default:v(()=>[h(ut,null,{default:v(()=>S[13]||(S[13]=[k(" Batch disabling ")])),_:1}),h(vt,null,{default:v(()=>[S[15]||(S[15]=k(" Disable all printers in batch (will not affect print) ")),S[16]||(S[16]=$("br",null,null,-1)),h(re,{color:"primary",onClick:S[1]||(S[1]=C=>m(!1))},{default:v(()=>S[14]||(S[14]=[k(" Batch disable ")])),_:1})]),_:1})]),_:1}),h(Le,null,{default:v(()=>[h(ut,null,{default:v(()=>S[17]||(S[17]=[k(" Batch enabling ")])),_:1}),h(vt,null,{default:v(()=>[S[19]||(S[19]=k(" Enabling all printers in batch (will not affect print and it will skip printers in maintenance mode) ")),S[20]||(S[20]=$("br",null,null,-1)),h(re,{color:"primary",onClick:S[2]||(S[2]=C=>m(!0))},{default:v(()=>S[18]||(S[18]=[k(" Batch enable ")])),_:1})]),_:1})]),_:1}),h(Le,null,{default:v(()=>[h(ut,null,{default:v(()=>S[21]||(S[21]=[k(" Batch USB connect ")])),_:1}),h(vt,null,{default:v(()=>[S[26]||(S[26]=k(" Connect all USB devices ")),S[27]||(S[27]=$("br",null,null,-1)),h(re,{disabled:!d.value,color:"primary",onClick:S[3]||(S[3]=C=>y())},{default:v(()=>[h(X,{class:"mr-2"},{default:v(()=>S[22]||(S[22]=[k("usb")])),_:1}),S[23]||(S[23]=k(" Connect USBs "))]),_:1},8,["disabled"]),d.value?he("",!0):(L(),Z(nn,{key:0},{default:v(()=>[h(X,{class:"mr-2"},{default:v(()=>S[24]||(S[24]=[k("warning")])),_:1}),S[25]||(S[25]=k(" This feature is not available, please update the FDM Monster server "))]),_:1}))]),_:1}),h(vt,{class:"mt-2"},{default:v(()=>[S[30]||(S[30]=k(" Connect all Sockets ")),S[31]||(S[31]=$("br",null,null,-1)),h(re,{disabled:!f.value,color:"primary",onClick:S[4]||(S[4]=C=>b())},{default:v(()=>[h(X,{class:"mr-2"},{default:v(()=>S[28]||(S[28]=[k("hub")])),_:1}),S[29]||(S[29]=k(" Connect Sockets "))]),_:1},8,["disabled"])]),_:1}),f.value?he("",!0):(L(),Z(nn,{key:0},{default:v(()=>[h(X,{class:"mr-2"},{default:v(()=>S[32]||(S[32]=[k("warning")])),_:1}),S[33]||(S[33]=k(" This feature is not available, please update the FDM Monster server "))]),_:1}))]),_:1})]),_:1}),$("div",lne,[h(nn,null,{default:v(()=>S[34]||(S[34]=[k(" Test all OctoPrint response times ")])),_:1}),$("div",une,[h(re,{color:"primary",onClick:S[5]||(S[5]=C=>p())},{default:v(()=>S[35]||(S[35]=[k(" Measure response times ")])),_:1})]),$("div",cne,[r.value?(L(),ye("span",dne," Response times: ")):he("",!0),r.value?(L(),Z(Q(ane),{key:1,data:u.value,options:c,height:"40"},null,8,["data"])):(L(),ye("span",fne," A graph will be shown, presenting the times in milliseconds (ms) "))])])]),_:1}))}}),pne={class:"text-center"},mne=De({__name:"NotFoundView",setup(e){const t=qo(),n=()=>{t.go(-1)};return(r,s)=>(L(),Z(Tn,null,{default:v(()=>[s[6]||(s[6]=$("h2",{class:"text-center mt-lg-12"},"This page was not found.",-1)),s[7]||(s[7]=$("h1",{class:"text-center"},": (",-1)),s[8]||(s[8]=$("br",null,null,-1)),$("h4",pne,[h(re,{class:"align-center",color:"primary",to:"/",variant:"elevated"},{default:v(()=>[h(X,{class:"mr-2"},{default:v(()=>s[1]||(s[1]=[k("home")])),_:1}),s[2]||(s[2]=k(" Go home "))]),_:1}),s[5]||(s[5]=$("span",{class:"pa-5"}," or ",-1)),h(re,{class:"align-center",variant:"elevated",onClick:s[0]||(s[0]=i=>n())},{default:v(()=>[h(X,{class:"mr-2"},{default:v(()=>s[3]||(s[3]=[k("arrow_left")])),_:1}),s[4]||(s[4]=k(" Go back "))]),_:1})])]),_:1}))}}),gne={key:0},vne={key:1},yne={key:2},bne={key:3},wne={key:4},Sne=De({__name:"PermissionDenied",setup(e){const t=PO(),n=I(()=>t.query);return(r,s)=>(L(),Z(Tn,{"fill-height":"",fluid:""},{default:v(()=>[h(jO,{color:"primary"},{default:v(()=>[h(Rn,{class:"text-uppercase text-white"},{default:v(()=>s[0]||(s[0]=[$("span",{class:"font-weight-light"}," FDM ",-1),$("strong",null," Monster ",-1)])),_:1})]),_:1}),s[11]||(s[11]=$("img",{alt:"FDM Monster Background",class:"grid-bg-img align-content-center",src:nS,style:{opacity:"0.06"}},null,-1)),h(xm,{"align-center":"",column:"","justify-center":""},{default:v(()=>[h(bt,{class:"flex align-center justify-center pa-lg-16 pa-sm-10",style:{width:"80%"}},{default:v(()=>[h(on,null,{default:v(()=>[h(X,{class:"mr-4",size:"50"},{default:v(()=>s[1]||(s[1]=[k(" lock ")])),_:1}),s[2]||(s[2]=$("h3",null,"Permission Denied",-1))]),_:1}),h(bm,{class:"mt-1"},{default:v(()=>s[3]||(s[3]=[k(" You do not have permission to access a specific resource on this page. ")])),_:1}),n.value?(L(),Z(Zt,{key:0},{default:v(()=>{var i,o;return[n.value.page?(L(),ye("div",gne,[s[4]||(s[4]=k(" Page: ")),$("strong",null,ie((i=n.value)==null?void 0:i.page),1)])):he("",!0),n.value.permissions?(L(),ye("div",vne,[s[5]||(s[5]=k(" Required permission(s): ")),(L(!0),ye(Ce,null,qt(n.value.permissions,a=>(L(),ye("strong",{key:a},ie(a),1))),128))])):he("",!0),n.value.roles?(L(),ye("div",yne,[s[6]||(s[6]=k(" Usable roles: ")),$("strong",null,ie((o=n.value.roles)==null?void 0:o.join(", ")),1)])):he("",!0),n.value.url?(L(),ye("div",bne,[s[7]||(s[7]=k(" Problematic API path: ")),$("strong",null,ie(n.value.url),1)])):he("",!0),n.value.error?(L(),ye("div",wne,[s[8]||(s[8]=k(" Error: ")),$("strong",null,ie(n.value.error),1)])):he("",!0)]}),_:1})):he("",!0),h(Dn,{class:"mt-6"},{default:v(()=>[h(re,{class:"align-center",color:"primary",to:"/",variant:"elevated"},{default:v(()=>[h(X,{class:"mr-2"},{default:v(()=>s[9]||(s[9]=[k("home")])),_:1}),s[10]||(s[10]=k(" Go home "))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}))}}),_ne=De({__name:"Logo",setup(e){return(t,n)=>(L(),Z(hi,{src:Q(qO),class:"shrink mr-1 pt-3 ml-1",contain:"",style:{opacity:"0.85"},width:"150"},null,8,["src"]))}}),kne=De({__name:"LoginForm",setup(e){const t=as(),n=B(""),r=B(""),s=B(!1),i=B(""),o=qo(),a=PO(),l=B(!1),u=Ur("auth:login"),c=Ot(),d=I(()=>{var m;return((m=r.value??"")==null?void 0:m.length)<3||(i.value??"").length<3});St(async()=>{if(t.loadTokens(),await t.checkAuthenticationRequirements(),t.loginRequired===!1)return console.debug("LoginView, no login required, redirecting to",a.query.redirect,"or home"),u.emit(!0),await g();if(!t.hasRefreshToken)return;await t.verifyOrRefreshLoginOnceOrLogout()&&await g()});async function f(){return await o.push({name:zt.Registration})}async function p(){var m,y,b,w;try{l.value=!0,await t.login(r.value,i.value),t.lastLogoutReason=null,i.value="",l.value=!1}catch(S){if(l.value=!1,((m=S==null?void 0:S.response)==null?void 0:m.status)===401){i.value="";const C=(b=(y=S==null?void 0:S.response)==null?void 0:y.data)==null?void 0:b.reasonCode,_=Gb(C);C===xr.AccountNotVerified?c.error(_,"Please ask your administrator to verify your account and try again."):C===xr.PasswordChangeRequired&&c.error(_,"Your password needs to be changed. This feature is sadly not finished"),n.value=_;return}c.openErrorMessage({title:"Error logging in",subtitle:"Please test your connection and try again."}),n.value="Error logging in - status code "+((w=S==null?void 0:S.response)==null?void 0:w.status),i.value="";return}return n.value="",u.emit(!0),await g()}async function g(){const m=a.query.redirect;if(m){console.debug("[LoginForm] Redirecting to ",m),await o.push({path:m});return}else{console.debug("[LoginForm] Redirecting to home"),await o.push({name:zt.Home});return}}return(m,y)=>(L(),Z(bt,{class:"pa-4",elevation:"10",style:{"border-radius":"10px"}},{default:v(()=>[h(Zt,null,{default:v(()=>[h(sS,null,{default:v(()=>[y[7]||(y[7]=$("label",null," Username ",-1)),h(ct,{modelValue:r.value,"onUpdate:modelValue":y[0]||(y[0]=b=>r.value=b),autofocus:"",name:"login",placeholder:"Username","prepend-icon":"person",type:"text",variant:"underlined",onKeyup:y[1]||(y[1]=yv(b=>d.value||p(),["enter"]))},null,8,["modelValue"]),h(ct,{id:"password",modelValue:i.value,"onUpdate:modelValue":y[2]||(y[2]=b=>i.value=b),"append-icon":s.value?"visibility_off":"visibility",type:s.value?"text":"password",label:"Password",name:"password",password:"","prepend-icon":"lock",variant:"underlined","onClick:append":y[3]||(y[3]=b=>s.value=!s.value),onKeyup:y[4]||(y[4]=yv(b=>d.value||p(),["enter"]))},null,8,["modelValue","append-icon","type"]),n.value?(L(),Z(nn,{key:0,class:"mt-6",color:"error",density:"compact",variant:"outlined"},{default:v(()=>[k(ie(n.value),1)]),_:1})):he("",!0),Q(t).lastLogoutReason?(L(),Z(nn,{key:1,class:"mt-6",color:"error-darken-1",density:"compact",variant:"outlined"},{default:v(()=>[k(" Reason for automatic logout: "+ie(Q(t).lastLogoutReason),1)]),_:1})):he("",!0)]),_:1})]),_:1}),h(Dn,null,{default:v(()=>[h(re,{loading:l.value,class:"pa-4",color:"primary",size:"lg",variant:"flat",style:{width:"100%"},onClick:y[5]||(y[5]=b=>p())},{default:v(()=>y[8]||(y[8]=[k(" Login ")])),_:1},8,["loading"])]),_:1}),h(Dn,null,{default:v(()=>[h(re,{disabled:!Q(t).registration,class:"pa-4",size:"lg",variant:"flat",style:{width:"100%"},onClick:y[6]||(y[6]=b=>f())},{default:v(()=>[k(" Register new account "+ie(Q(t).registration?"":"(not enabled)")+" ",1),h(X,{class:"pl-5",icon:"right"})]),_:1},8,["disabled"])]),_:1})]),_:1}))}}),xne={class:"d-flex align-center",style:{"min-height":"calc(100vh - 148px)"}},Ene={class:"pt-6 pl-6 d-flex flex-column align-center"},Cne=De({__name:"LoginView",setup(e){return(t,n)=>{const r=_ne;return L(),Z(ot,{class:"position-relative","no-gutters":""},{default:v(()=>[h(He,{cols:"12",lg:"12"},{default:v(()=>[h(Tn,null,{default:v(()=>[$("div",xne,[h(ot,{justify:"center",class:"align-content-center"},{default:v(()=>[$("div",Ene,[h(r),h(Rn,{class:"text-uppercase text-red"},{default:v(()=>n[0]||(n[0]=[$("strong",null," FDM ",-1),$("strong",null," Monster ",-1)])),_:1}),h(Rn,{class:"mt-lg-6 mt-sm-5 mb-md-5"},{default:v(()=>n[1]||(n[1]=[k(" Login to your account ")])),_:1}),h(bm,{class:"text-grey mb-md-5"},{default:v(()=>n[2]||(n[2]=[k(" Welcome back! Please enter your details ")])),_:1})]),h(He,{cols:"12",md:"12"},{default:v(()=>[h(kne,{class:"login-card"})]),_:1})]),_:1})])]),_:1})]),_:1})]),_:1})}}}),Tne={class:"d-flex flex-column align-center"},Rne=De({__name:"RegistrationForm",setup(e){const t=as(),n=qo(),r=B(""),s=B(""),i=B(!1),o=B(!1),a=B(""),l=B(""),u=B(!1),c=Ot();async function d(){return await n.push({name:zt.Login})}const f=I(()=>{var g;return((g=s.value??"")==null?void 0:g.length)<3||(a.value??"").length<3||a.value!=l.value});St(async()=>{await t.logout(),await t.checkAuthenticationRequirements(),t.registration||(c.info("Registration is disabled, please contact your administrator"),await n.push({name:zt.Login}))});async function p(){var g;try{u.value=!0,await sa.registerAccount(s.value,a.value),u.value=!1}catch(m){if(u.value=!1,((g=m==null?void 0:m.response)==null?void 0:g.status)===401){r.value="Invalid credentials";return}c.openErrorMessage({title:"Error logging in",subtitle:"Please test your connection and try again."});return}r.value="",c.info("Account created, please login"),await d()}return(g,m)=>{const y=Vn("v-flex");return L(),Z(Tn,{"fill-height":"",fluid:""},{default:v(()=>[h(xm,{"align-content-center":"","justify-center":""},{default:v(()=>[h(y,{class:"d-flex flex-column align-content-center",md4:"",sm8:"",style:{"max-width":"450px","margin-top":"10%"},xs12:""},{default:v(()=>[$("div",Tne,[h(hi,{src:require("@/assets/logo.png"),class:"shrink mr-1 pt-3 ml-1",contain:"",style:{opacity:"0.85"},width:"150"},null,8,["src"]),h(Rn,{class:"text-uppercase text-red"},{default:v(()=>m[8]||(m[8]=[$("strong",null," FDM ",-1),$("strong",null," Monster ",-1)])),_:1}),h(Rn,{class:"mt-lg-6 mt-sm-5"},{default:v(()=>m[9]||(m[9]=[k(" Register new account ")])),_:1}),h(bm,{class:"text-grey"},{default:v(()=>m[10]||(m[10]=[k(" Welcome! Please register your guest account ")])),_:1})]),h(bt,{class:"elevation-4 pa-4",style:{"border-radius":"10px"}},{default:v(()=>[h(Zt,null,{default:v(()=>[h(sS,null,{default:v(()=>[m[11]||(m[11]=$("label",null," Username ",-1)),h(ct,{modelValue:s.value,"onUpdate:modelValue":m[0]||(m[0]=b=>s.value=b),rules:[b=>!!b||"Username is required",b=>((b==null?void 0:b.length)??0)>=3||"Username must be of length 3 or greater",b=>!b.toLowerCase().includes("admin")||"Username may not contain the word admin",b=>!b.toLowerCase().includes("root")||"Username may not contain the word root",b=>b.toLowerCase()!=="demo"||"Username may not equal the word demo"],autofocus:"",name:"login",label:"Username","prepend-icon":"person",type:"text"},null,8,["modelValue","rules"]),h(ct,{id:"password",modelValue:a.value,"onUpdate:modelValue":m[1]||(m[1]=b=>a.value=b),"append-icon":i.value?"visibility":"visibility_off",type:i.value?"text":"password",label:"Password",name:"password",rules:[b=>!!b||"Password is required",b=>!!b&&(b==null?void 0:b.length)>=8||"Password must be of length 8 or greater"],password:"","prepend-icon":"lock","onClick:append":m[2]||(m[2]=b=>i.value=!i.value)},null,8,["modelValue","append-icon","type","rules"]),h(ct,{id:"password",modelValue:l.value,"onUpdate:modelValue":m[3]||(m[3]=b=>l.value=b),"append-icon":o.value?"visibility":"visibility_off",type:o.value?"text":"password",rules:[b=>!!b||"Repeated password is required",b=>b===a.value||"Passwords are not equal"],label:"Repeated Password",name:"password",password:"","prepend-icon":"lock","onClick:append":m[4]||(m[4]=b=>o.value=!o.value),onKeyup:m[5]||(m[5]=yv(b=>f.value||p(),["enter"]))},null,8,["modelValue","append-icon","type","rules"]),r.value?(L(),Z(nn,{key:0,class:"mt-6",color:"error",density:"compact",variant:"outlined"},{default:v(()=>[k(ie(r.value),1)]),_:1})):he("",!0)]),_:1})]),_:1}),h(Dn,null,{default:v(()=>[h(re,{loading:u.value,class:"pa-4",color:"primary",size:"large",style:{width:"100%"},onClick:m[6]||(m[6]=b=>p())},{default:v(()=>m[12]||(m[12]=[k(" Register account ")])),_:1},8,["loading"])]),_:1}),h(Dn,null,{default:v(()=>[h(re,{style:{width:"100%"},class:"pa-4",size:"large",onClick:m[7]||(m[7]=b=>d())},{default:v(()=>[h(X,{class:"mr-2"},{default:v(()=>m[13]||(m[13]=[k("arrow_left")])),_:1}),m[14]||(m[14]=k("Back to Login "))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})}}}),Pne=De({__name:"RegistrationView",setup(e){return(t,n)=>(L(),Z(Tn,{"fill-height":"",fluid:""},{default:v(()=>[h(xm,{"align-center":"","justify-center":""},{default:v(()=>[h(Rne)]),_:1})]),_:1}))}}),Ine=["src"],Ane=De({__name:"CameraGridView",setup(e){const t=Lt(),n=en(tn.AddOrUpdateCameraDialog),s=jw({queryKey:["cameraStream"],queryFn:async()=>(await cp.listCameraStreams()).map(c=>({printer:t.printers.find(d=>d.id===c.printerId),cameraStream:c}))}),i=Y7({mutationFn:u=>cp.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)=>(L(),ye("div",null,[h(mr,null,{default:v(()=>[h(Rn,{class:"mr-4"},{default:v(()=>c[1]||(c[1]=[k(" Camera Overview ")])),_:1}),h(re,{color:"primary",onClick:c[0]||(c[0]=d=>o())},{default:v(()=>[h(X,{class:"mr-2"},{default:v(()=>c[2]||(c[2]=[k("add")])),_:1}),c[3]||(c[3]=k(" Add camera "))]),_:1})]),_:1}),h(ot,{class:"ma-0"},{default:v(()=>[(L(!0),ye(Ce,null,qt(Q(s).data.value,d=>(L(),ye("div",{key:d.cameraStream.id,class:"ma-4",style:{border:"1px solid grey",margin:"0"},width:"300"},[h(bt,{class:"pb-2 pl-2 pr-2",width:"300"},{default:v(()=>{var f;return[h(on,null,{default:v(()=>{var p;return[d.cameraStream.printerId?(L(),Z(X,{key:0,class:"mr-2",size:"small"},{default:v(()=>c[4]||(c[4]=[k(" print ")])),_:1})):(L(),Z(X,{key:1,class:"mr-2",size:"small"},{default:v(()=>c[5]||(c[5]=[k(" camera_alt ")])),_:1})),k(" "+ie((d==null?void 0:d.cameraStream.name)??((p=d==null?void 0:d.printer)==null?void 0:p.name)??"Camera"),1)]}),_:2},1024),$("img",{src:(f=d.cameraStream)==null?void 0:f.streamURL,width:"100%"},null,8,Ine),c[10]||(c[10]=$("br",null,null,-1)),h(re,{class:"mr-1",size:"small",onClick:p=>a(d.cameraStream.id)},{default:v(()=>[h(X,{class:"mr-2"},{default:v(()=>c[6]||(c[6]=[k("edit")])),_:1}),c[7]||(c[7]=k(" Update "))]),_:2},1032,["onClick"]),h(re,{size:"small",onClick:p=>l(d.cameraStream.id)},{default:v(()=>[h(X,{class:"mr-2"},{default:v(()=>c[8]||(c[8]=[k("delete")])),_:1}),c[9]||(c[9]=k(" Delete "))]),_:2},1032,["onClick"])]}),_:2},1024)]))),128))]),_:1})]))}}),One="/img/OIG.jpg";class Mne extends vr{static async postFirstTimeSetup(t){const n=Ae.completeFirstTimeSetupRoute;return await this.post(n,t)}}const Dne={class:"mt-6 border_all"},$ne={class:"d-flex flex-row align-center"},Lne={class:"d-flex flex-row align-center"},Fne={class:"d-flex flex-row align-center"},Nne={class:"d-flex flex-row align-center"},Vne={class:"mt-4"},Bne={class:"mt-4"},Une={class:"mt-14"},Hne={class:"mb-5 mt-10"},zne={class:"mt-14"},jne=De({__name:"FirstTimeSetupView",setup(e){const t=qo(),n=Ot(),r=B(!1),s=as(),i=B({loginRequired:!0,registration:!1}),o=B({rootUsername:"admin",rootPassword:"",rootPassword2:""}),a=B(1);St(async()=>{var c;await s.checkAuthenticationRequirements(),(c=s.wizardState)!=null&&c.wizardCompleted&&(n.info("Setup already completed."),s.loginRequired?await t.push({name:"Login"}):await t.push({name:"Home"}))});async function l(){if(!r.value){n.error("Please fill out all required fields.");return}const c=i.value,d=o.value;await Mne.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=Vn("v-stepper-step"),p=Vn("v-stepper-content"),g=Vn("v-stepper-items");return L(),Z(Tn,null,{default:v(()=>[d[46]||(d[46]=$("img",{alt:"FDM Monster Background",class:"grid-bg-img align-content-center",src:nS,style:{opacity:"0.08"}},null,-1)),h(ZA,{modelValue:a.value,"onUpdate:modelValue":d[10]||(d[10]=m=>a.value=m),class:"bg-grey-darken-4"},{default:v(()=>[h(Nw,null,{default:v(()=>[h(f,{complete:a.value>1,step:"1"},{default:v(()=>d[11]||(d[11]=[k(" Introduction ")])),_:1},8,["complete"]),h(fn),h(f,{complete:a.value>2,step:"2"},{default:v(()=>d[12]||(d[12]=[k(" Login and registration ")])),_:1},8,["complete"]),h(fn),h(f,{step:"3"},{default:v(()=>d[13]||(d[13]=[k(" Summary ")])),_:1})]),_:1}),h(g,null,{default:v(()=>[h(p,{class:"align-content-center align-center text-center",step:"1"},{default:v(()=>[d[17]||(d[17]=$("div",{class:"align-content-center align-center text-center"},[$("img",{class:"rounded-pill ma-4",src:One,style:{opacity:"0.7"},width:"400"}),k(" /> "),$("h1",null,"FDM Monster"),$("small",null," This server is still unconfigured. ")],-1)),h(re,{class:"mt-14 mb-14",color:"primary",onClick:d[0]||(d[0]=m=>a.value=2)},{default:v(()=>d[14]||(d[14]=[k(" Start Setup ")])),_:1}),$("div",Dne,[h(X,{class:"mr-6"},{default:v(()=>d[15]||(d[15]=[k("question_mark")])),_:1}),d[16]||(d[16]=$("small",null,[k(" If you have questions at any point, reach out on "),$("a",{href:"https://github.com/fdm-monster/fdm-monster/issues"}," Github "),k(" or on "),$("a",{href:"https://discord.gg/mwA8uP8CMc"}," Discord "),k(". ")],-1))])]),_:1}),h(p,{class:"align-content-center align-center text-center",step:"2"},{default:v(()=>[$("h4",null,[h(X,{class:"mr-2"},{default:v(()=>d[18]||(d[18]=[k("settings")])),_:1}),d[19]||(d[19]=k(" Login"))]),h(sS,{modelValue:r.value,"onUpdate:modelValue":d[6]||(d[6]=m=>r.value=m)},{default:v(()=>[h(hp,{modelValue:i.value.loginRequired,"onUpdate:modelValue":d[1]||(d[1]=m=>i.value.loginRequired=m),class:"mt-5"},{message:v(()=>[$("span",$ne,[h(X,{color:i.value.loginRequired?"success":"",disabled:!i.value.loginRequired,class:"ml-3 mr-3"},{default:v(()=>d[20]||(d[20]=[k(" check ")])),_:1},8,["color","disabled"]),d[21]||(d[21]=k(" Login is required. "))]),$("span",Lne,[h(X,{color:i.value.loginRequired?"":"error",disabled:i.value.loginRequired,class:"ml-3 mr-3"},{default:v(()=>d[22]||(d[22]=[k(" close ")])),_:1},8,["color","disabled"]),d[23]||(d[23]=k(" No login is required. The admin role is assumed. "))])]),label:v(()=>d[24]||(d[24]=[k(" Enable Login ")])),_:1},8,["modelValue"]),i.value.loginRequired?he("",!0):(L(),Z(nn,{key:0,color:"error-darken-4"},{default:v(()=>d[25]||(d[25]=[k(" You might be exposing your FDM Monster server publicly. Please take care evaluating the "),$("strong",null," Enable Login ",-1),k(" option. ")])),_:1})),h(hp,{modelValue:i.value.registration,"onUpdate:modelValue":d[2]||(d[2]=m=>i.value.registration=m),class:"mt-10 mb-10"},{message:v(()=>[$("span",Fne,[h(X,{color:i.value.registration?"success":"",disabled:!i.value.registration,class:"ml-3 mr-3"},{default:v(()=>d[26]||(d[26]=[k(" check ")])),_:1},8,["color","disabled"]),d[27]||(d[27]=k(" Accounts can be registered with a guest role. "))]),$("span",Nne,[h(X,{color:i.value.registration?"":"error",disabled:i.value.registration,class:"ml-3 mr-3"},{default:v(()=>d[28]||(d[28]=[k(" close ")])),_:1},8,["color","disabled"]),d[29]||(d[29]=k(" No other accounts can be registered. "))])]),label:v(()=>d[30]||(d[30]=[k(" Enable Registration ")])),_:1},8,["modelValue"]),h(fn),$("h4",Vne,[h(X,{class:"mr-2"},{default:v(()=>d[31]||(d[31]=[k("shield")])),_:1}),d[32]||(d[32]=k(" Admin account "))]),h(ct,{modelValue:o.value.rootUsername,"onUpdate:modelValue":d[3]||(d[3]=m=>o.value.rootUsername=m),rules:[m=>!!m||"Username is required"],class:"mt-5",label:"Username","prepend-icon":"person"},{prepend:v(()=>[h(X,null,{default:v(()=>d[33]||(d[33]=[k("person")])),_:1})]),_:1},8,["modelValue","rules"]),h(ct,{modelValue:o.value.rootPassword,"onUpdate:modelValue":d[4]||(d[4]=m=>o.value.rootPassword=m),type:"password","prepend-icon":"lock",rules:[m=>!!m||"Password is required",m=>!!m&&(m==null?void 0:m.length)>=8||"Password must be of length 8 or greater"],class:"mt-5",label:"Password"},{prepend:v(()=>[h(X,null,{default:v(()=>d[34]||(d[34]=[k("password")])),_:1})]),_:1},8,["modelValue","rules"]),h(ct,{modelValue:o.value.rootPassword2,"onUpdate:modelValue":d[5]||(d[5]=m=>o.value.rootPassword2=m),type:"password","prepend-icon":"lock",rules:[m=>!!m||"Repeated password is required",m=>m===o.value.rootPassword||"Passwords are not equal"],class:"mt-5",label:"Repeated Password"},{prepend:v(()=>[h(X,null,{default:v(()=>d[35]||(d[35]=[k("password")])),_:1})]),_:1},8,["modelValue","rules"])]),_:1},8,["modelValue"]),$("div",Bne,[h(re,{class:"mr-4",onClick:d[7]||(d[7]=m=>a.value=1)},{default:v(()=>d[36]||(d[36]=[k(" Back ")])),_:1}),h(re,{disabled:!r.value,color:"primary",onClick:d[8]||(d[8]=m=>l())},{default:v(()=>d[37]||(d[37]=[k(" Verify & Submit ")])),_:1},8,["disabled"])]),h(fn,{class:"mt-4"}),$("div",Une,[h(X,{class:"mr-6"},{default:v(()=>d[38]||(d[38]=[k("question_mark")])),_:1}),d[39]||(d[39]=$("small",null,[k(" If you have questions at any point, reach out on "),$("a",{href:"https://github.com/fdm-monster/fdm-monster/issues"}," Github "),k(" or on "),$("a",{href:"https://discord.gg/mwA8uP8CMc"}," Discord "),k(". ")],-1))])]),_:1}),h(p,{class:"align-content-center align-center text-center",step:"3"},{default:v(()=>[$("div",Hne,[h(X,{size:"100",class:"mr-5",color:"green circle"},{default:v(()=>d[40]||(d[40]=[k(" check_circle ")])),_:1}),d[41]||(d[41]=k(" Setup Completed "))]),d[45]||(d[45]=$("br",null,null,-1)),h(re,{color:"primary",class:"mr-4",onClick:d[9]||(d[9]=m=>u())},{default:v(()=>d[42]||(d[42]=[k(" Let's continue ")])),_:1}),$("div",zne,[h(X,{class:"mr-6"},{default:v(()=>d[43]||(d[43]=[k("question_mark")])),_:1}),d[44]||(d[44]=$("small",null,[k(" If you have questions at any point, reach out on "),$("a",{href:"https://github.com/fdm-monster/fdm-monster/issues"}," Github "),k(" or on "),$("a",{href:"https://discord.gg/mwA8uP8CMc"}," Discord "),k(". ")],-1))])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})}}}),qne={class:"ml-4 mb-4"},Wne={class:"ml-4 mb-4"},Gne=De({__name:"AccountSettings",setup(e){const t=Ds(),n=Kw(),r=as(),s=qo(),i=Ot(),o=B(),a=B(""),l=B({username:"",newPassword:"",oldPassword:"",repeatPassword:""});St(async()=>{var d;await t.loadSettings(),o.value=(d=t.settings)==null?void 0:d.server.loginRequired,await n.getProfile(),l.value.username=n.username,a.value=n.userId});async function u(){var d,f;if(!((f=(d=a.value)==null?void 0:d.toString())!=null&&f.length)){i.openErrorMessage({title:"User not loaded"});return}await Zr.changeUsername(a.value,l.value.username),await n.getProfile(),l.value.username=n.username,i.openInfoMessage({title:"Username changed"})}async function c(){var d,f;if(!((f=(d=a.value)==null?void 0:d.toString())!=null&&f.length)){i.openErrorMessage({title:"User not loaded"});return}if(l.value.newPassword!==l.value.repeatPassword){i.openErrorMessage({title:"Passwords do not match"});return}await Zr.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 IO(s)}return(d,f)=>{const p=Vn("v-list-item-content"),g=Vn("v-list-item-action-text");return L(),Z(bt,null,{default:v(()=>[h(mr,{color:"primary"},{default:v(()=>[h(lt,null,{default:v(()=>[h(X,null,{default:v(()=>f[6]||(f[6]=[k("account_circle")])),_:1})]),_:1}),h(Rn,null,{default:v(()=>f[7]||(f[7]=[k(" Account Settings ")])),_:1})]),_:1}),h(Ft,{subheader:"",lines:"three"},{default:v(()=>[h(Le,null,{default:v(()=>[o.value?he("",!0):(L(),Z(p,{key:0},{default:v(()=>[h(nn,{color:"primary"},{default:v(()=>f[8]||(f[8]=[k(" Login is currently disabled. To adjust your username and password, please enable that setting at the Server Protection settings page. Then log in and visit this page. ")])),_:1})]),_:1}))]),_:1})]),_:1}),h(Ft,{subheader:"",lines:"three"},{default:v(()=>[h(Le,null,{default:v(()=>[h(ut,null,{default:v(()=>f[9]||(f[9]=[k(" Username ")])),_:1}),h(g,null,{default:v(()=>[h(ct,{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}),$("div",qne,[h(re,{disabled:!o.value,color:"primary",onClick:f[1]||(f[1]=m=>u())},{default:v(()=>f[10]||(f[10]=[k(" Change username ")])),_:1},8,["disabled"])]),h(fn),f[14]||(f[14]=$("br",null,null,-1)),h(Le,null,{default:v(()=>[h(ut,null,{default:v(()=>f[11]||(f[11]=[k(" Old Password ")])),_:1}),h(g,null,{default:v(()=>[h(ct,{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(Le,null,{default:v(()=>[h(ut,null,{default:v(()=>f[12]||(f[12]=[k(" New Password ")])),_:1}),h(g,null,{default:v(()=>[h(ct,{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(Le,null,{default:v(()=>[h(ut,null,{default:v(()=>f[13]||(f[13]=[k(" Repeat New Password ")])),_:1}),h(g,null,{default:v(()=>[h(ct,{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}),$("div",Wne,[h(re,{disabled:!o.value,color:"primary",onClick:f[5]||(f[5]=m=>c())},{default:v(()=>f[15]||(f[15]=[k(" Change password ")])),_:1},8,["disabled"])]),h(fn)]),_:1})}}}),Kne=De({__name:"GridSettings",setup(e){return(t,n)=>(L(),Z(ot,null,{default:v(()=>[h(He,{cols:"12"},{default:v(()=>[h(bt,null,{default:v(()=>[h(kM,{icon:"grid_on",title:"Grid"}),h(eO)]),_:1})]),_:1})]),_:1}))}}),Yne=De({__name:"ServerProtectionSettings",setup(e){const t=qo(),n=Ot(),r=as(),s=B(""),i=B(!1),o=B(!1),a=B(3200),l=B(!1),u=B(-1),c=B(14);async function d(){var S;const b=await Fn.getSettings();i.value=b.server.loginRequired,o.value=b.server.registration,s.value=((S=b.connection)==null?void 0:S.clientIp)??"127.0.0.1";const w=await Fn.getSettingsSensitive();a.value=w.credentials.jwtExpiresIn/60,l.value=w.credentials.refreshTokenAttempts!==-1,u.value=w.credentials.refreshTokenAttempts,c.value=w.credentials.refreshTokenExpiry/24/3600}St(async()=>{await d()});function f(){l.value||(u.value=-1)}async function p(){const b=i.value;!b&&!confirm("Disabling login will expose your server. Continue?")||(await Fn.updateLoginRequiredSettings(b),await r.logout(!0),await r.checkAuthenticationRequirements(),b?await t.push({name:zt.Login}):await t.push({name:zt.Home}),n.info("Login Required settings updated"))}async function g(){await Fn.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(b=!0){if(a.value<2||a.value>120)throw new Error("JWT Expiry must be between 2 and 120 minutes");if(l.value&&(u.value<50||u.value>1e3))throw new Error("Refresh Token Attempts must be between 50 and 1000");if(c.value<1||c.value>30)throw new Error("Refresh Token Expiry must be between 1 and 30 days");await Fn.updateCredentialSettings(a.value*60,u.value,c.value*24*3600),n.info("Login expiry settings updated")}return(b,w)=>(L(),Z(bt,null,{default:v(()=>[h(mr,{color:"primary"},{default:v(()=>[h(lt,null,{default:v(()=>[h(X,null,{default:v(()=>w[11]||(w[11]=[k("settings")])),_:1})]),_:1}),h(Rn,null,{default:v(()=>w[12]||(w[12]=[k(" Server Protection Settings ")])),_:1})]),_:1}),h(Ft,{lines:"three"},{default:v(()=>[h(Le,null,{default:v(()=>[h(ut,null,{default:v(()=>w[13]||(w[13]=[k(" Login Required ")])),_:1}),h(vt,null,{default:v(()=>[h(ot,null,{default:v(()=>[h(He,{cols:"12",md:"2"},{default:v(()=>[h(En,{modelValue:i.value,"onUpdate:modelValue":w[0]||(w[0]=S=>i.value=S),label:"Require Login"},null,8,["modelValue"])]),_:1})]),_:1}),h(ot,null,{default:v(()=>[h(He,null,{default:v(()=>[h(re,{color:"primary",onClick:w[1]||(w[1]=S=>p())},{default:v(()=>w[14]||(w[14]=[k(" save login required setting ")])),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),h(Le,null,{default:v(()=>[h(ut,null,{default:v(()=>w[15]||(w[15]=[k(" Registration Enabled ")])),_:1}),h(vt,null,{default:v(()=>[h(ot,null,{default:v(()=>[h(He,{cols:"12",md:"2"},{default:v(()=>[h(En,{modelValue:o.value,"onUpdate:modelValue":w[2]||(w[2]=S=>o.value=S),label:"Enable Registration"},null,8,["modelValue"])]),_:1})]),_:1}),h(ot,null,{default:v(()=>[h(He,null,{default:v(()=>[h(re,{color:"primary",onClick:w[3]||(w[3]=S=>g())},{default:v(()=>w[16]||(w[16]=[k(" save registration enabled setting ")])),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),h(Le,null,{default:v(()=>[h(ut,null,{default:v(()=>w[17]||(w[17]=[k(" Login Expiry Settings (advanced) ")])),_:1}),h(vt,null,{default:v(()=>[h(ot,null,{default:v(()=>[h(He,{cols:"12",md:"2"},{default:v(()=>[h(ct,{modelValue:a.value,"onUpdate:modelValue":w[4]||(w[4]=S=>a.value=S),rules:[S=>!!S&&S>=2&&S<=120],label:"JWT Expiry (minutes)"},null,8,["modelValue","rules"])]),_:1})]),_:1}),h(ot,null,{default:v(()=>[h(He,{cols:"12",md:"2"},{default:v(()=>[h(En,{modelValue:l.value,"onUpdate:modelValue":[w[5]||(w[5]=S=>l.value=S),w[6]||(w[6]=S=>f())],label:"Enable Refresh Token Attempts"},null,8,["modelValue"])]),_:1})]),_:1}),h(ot,null,{default:v(()=>[h(He,{cols:"12",md:"2"},{default:v(()=>[h(ct,{modelValue:u.value,"onUpdate:modelValue":w[7]||(w[7]=S=>u.value=S),disabled:!l.value,rules:[S=>!!S&&S>=50],label:"Refresh Token Attempts (disabled: -1)",type:"number"},null,8,["modelValue","disabled","rules"])]),_:1})]),_:1}),h(ot,null,{default:v(()=>[h(He,{cols:"12",md:"2"},{default:v(()=>[h(ct,{modelValue:c.value,"onUpdate:modelValue":w[8]||(w[8]=S=>c.value=S),rules:[S=>!!S&&S>=1&&S<=30],label:"Refresh Token Expiry (days)"},null,8,["modelValue","rules"])]),_:1})]),_:1}),h(nn,{color:"secondary"},{default:v(()=>[h(X,null,{default:v(()=>w[18]||(w[18]=[k("info")])),_:1}),w[19]||(w[19]=k(" Be cautious, setting the wrong expiry could make you lose access to the server or make your user experience highly degraded! "))]),_:1}),h(ot,null,{default:v(()=>[h(He,null,{default:v(()=>[h(re,{color:"primary",onClick:w[9]||(w[9]=S=>y())},{default:v(()=>w[20]||(w[20]=[k(" save login expiry settings ")])),_:1}),h(re,{color:"default",onClick:w[10]||(w[10]=S=>m())},{default:v(()=>w[21]||(w[21]=[k(" reset to default ")])),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}))}});var lb={exports:{}};const Xne="2.0.0",fD=256,Qne=Number.MAX_SAFE_INTEGER||9007199254740991,Jne=16,Zne=fD-6,ere=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var $m={MAX_LENGTH:fD,MAX_SAFE_COMPONENT_LENGTH:Jne,MAX_SAFE_BUILD_LENGTH:Zne,MAX_SAFE_INTEGER:Qne,RELEASE_TYPES:ere,SEMVER_SPEC_VERSION:Xne,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Xg={};const tre=typeof process=="object"&&Xg&&Xg.NODE_DEBUG&&/\bsemver\b/i.test(Xg.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var Lm=tre;(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:s}=$m,i=Lm;t=e.exports={};const o=t.re=[],a=t.safeRe=[],l=t.src=[],u=t.t={};let c=0;const d="[a-zA-Z0-9-]",f=[["\\s",1],["\\d",s],[d,r]],p=m=>{for(const[y,b]of f)m=m.split(`${y}*`).join(`${y}{0,${b}}`).split(`${y}+`).join(`${y}{1,${b}}`);return m},g=(m,y,b)=>{const w=p(y),S=c++;i(m,S,y),u[m]=S,l[S]=y,o[S]=new RegExp(y,b?"g":void 0),a[S]=new RegExp(w,b?"g":void 0)};g("NUMERICIDENTIFIER","0|[1-9]\\d*"),g("NUMERICIDENTIFIERLOOSE","\\d+"),g("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${d}*`),g("MAINVERSION",`(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})`),g("MAINVERSIONLOOSE",`(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})`),g("PRERELEASEIDENTIFIER",`(?:${l[u.NUMERICIDENTIFIER]}|${l[u.NONNUMERICIDENTIFIER]})`),g("PRERELEASEIDENTIFIERLOOSE",`(?:${l[u.NUMERICIDENTIFIERLOOSE]}|${l[u.NONNUMERICIDENTIFIER]})`),g("PRERELEASE",`(?:-(${l[u.PRERELEASEIDENTIFIER]}(?:\\.${l[u.PRERELEASEIDENTIFIER]})*))`),g("PRERELEASELOOSE",`(?:-?(${l[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[u.PRERELEASEIDENTIFIERLOOSE]})*))`),g("BUILDIDENTIFIER",`${d}+`),g("BUILD",`(?:\\+(${l[u.BUILDIDENTIFIER]}(?:\\.${l[u.BUILDIDENTIFIER]})*))`),g("FULLPLAIN",`v?${l[u.MAINVERSION]}${l[u.PRERELEASE]}?${l[u.BUILD]}?`),g("FULL",`^${l[u.FULLPLAIN]}$`),g("LOOSEPLAIN",`[v=\\s]*${l[u.MAINVERSIONLOOSE]}${l[u.PRERELEASELOOSE]}?${l[u.BUILD]}?`),g("LOOSE",`^${l[u.LOOSEPLAIN]}$`),g("GTLT","((?:<|>)?=?)"),g("XRANGEIDENTIFIERLOOSE",`${l[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),g("XRANGEIDENTIFIER",`${l[u.NUMERICIDENTIFIER]}|x|X|\\*`),g("XRANGEPLAIN",`[v=\\s]*(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:${l[u.PRERELEASE]})?${l[u.BUILD]}?)?)?`),g("XRANGEPLAINLOOSE",`[v=\\s]*(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:${l[u.PRERELEASELOOSE]})?${l[u.BUILD]}?)?)?`),g("XRANGE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAIN]}$`),g("XRANGELOOSE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAINLOOSE]}$`),g("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),g("COERCE",`${l[u.COERCEPLAIN]}(?:$|[^\\d])`),g("COERCEFULL",l[u.COERCEPLAIN]+`(?:${l[u.PRERELEASE]})?(?:${l[u.BUILD]})?(?:$|[^\\d])`),g("COERCERTL",l[u.COERCE],!0),g("COERCERTLFULL",l[u.COERCEFULL],!0),g("LONETILDE","(?:~>?)"),g("TILDETRIM",`(\\s*)${l[u.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",g("TILDE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAIN]}$`),g("TILDELOOSE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAINLOOSE]}$`),g("LONECARET","(?:\\^)"),g("CARETTRIM",`(\\s*)${l[u.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",g("CARET",`^${l[u.LONECARET]}${l[u.XRANGEPLAIN]}$`),g("CARETLOOSE",`^${l[u.LONECARET]}${l[u.XRANGEPLAINLOOSE]}$`),g("COMPARATORLOOSE",`^${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]})$|^$`),g("COMPARATOR",`^${l[u.GTLT]}\\s*(${l[u.FULLPLAIN]})$|^$`),g("COMPARATORTRIM",`(\\s*)${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]}|${l[u.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",g("HYPHENRANGE",`^\\s*(${l[u.XRANGEPLAIN]})\\s+-\\s+(${l[u.XRANGEPLAIN]})\\s*$`),g("HYPHENRANGELOOSE",`^\\s*(${l[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[u.XRANGEPLAINLOOSE]})\\s*$`),g("STAR","(<|>)?=?\\s*\\*"),g("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),g("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(lb,lb.exports);var Yd=lb.exports;const nre=Object.freeze({loose:!0}),rre=Object.freeze({}),sre=e=>e?typeof e!="object"?nre:e:rre;var bS=sre;const Jx=/^[0-9]+$/,hD=(e,t)=>{const n=Jx.test(e),r=Jx.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1},ire=(e,t)=>hD(t,e);var pD={compareIdentifiers:hD,rcompareIdentifiers:ire};const Uf=Lm,{MAX_LENGTH:Zx,MAX_SAFE_INTEGER:Hf}=$m,{safeRe:eE,t:tE}=Yd,ore=bS,{compareIdentifiers:dl}=pD;let are=class js{constructor(t,n){if(n=ore(n),t instanceof js){if(t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>Zx)throw new TypeError(`version is longer than ${Zx} characters`);Uf("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;const r=t.trim().match(n.loose?eE[tE.LOOSE]:eE[tE.FULL]);if(!r)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>Hf||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Hf||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Hf||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){const i=+s;if(i>=0&&i<Hf)return i}return s}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(Uf("SemVer.compare",this.version,this.options,t),!(t instanceof js)){if(typeof t=="string"&&t===this.version)return 0;t=new js(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof js||(t=new js(t,this.options)),dl(this.major,t.major)||dl(this.minor,t.minor)||dl(this.patch,t.patch)}comparePre(t){if(t instanceof js||(t=new js(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let n=0;do{const r=this.prerelease[n],s=t.prerelease[n];if(Uf("prerelease compare",n,r,s),r===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(r===void 0)return-1;if(r===s)continue;return dl(r,s)}while(++n)}compareBuild(t){t instanceof js||(t=new js(t,this.options));let n=0;do{const r=this.build[n],s=t.build[n];if(Uf("build compare",n,r,s),r===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(r===void 0)return-1;if(r===s)continue;return dl(r,s)}while(++n)}inc(t,n,r){switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,r),this.inc("pre",n,r);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,r),this.inc("pre",n,r);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const s=Number(r)?1:0;if(!n&&r===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[s];else{let i=this.prerelease.length;for(;--i>=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(n===this.prerelease.join(".")&&r===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(s)}}if(n){let i=[n,s];r===!1&&(i=[n]),dl(this.prerelease[0],n)===0?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var yr=are;const nE=yr,lre=(e,t,n=!1)=>{if(e instanceof nE)return e;try{return new nE(e,t)}catch(r){if(!n)return null;throw r}};var Bu=lre;const ure=Bu,cre=(e,t)=>{const n=ure(e,t);return n?n.version:null};var dre=cre;const fre=Bu,hre=(e,t)=>{const n=fre(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null};var pre=hre;const rE=yr,mre=(e,t,n,r,s)=>{typeof n=="string"&&(s=r,r=n,n=void 0);try{return new rE(e instanceof rE?e.version:e,n).inc(t,r,s).version}catch{return null}};var gre=mre;const sE=Bu,vre=(e,t)=>{const n=sE(e,null,!0),r=sE(t,null,!0),s=n.compare(r);if(s===0)return null;const i=s>0,o=i?n:r,a=i?r:n,l=!!o.prerelease.length;if(!!a.prerelease.length&&!l)return!a.patch&&!a.minor?"major":o.patch?"patch":o.minor?"minor":"major";const c=l?"pre":"";return n.major!==r.major?c+"major":n.minor!==r.minor?c+"minor":n.patch!==r.patch?c+"patch":"prerelease"};var yre=vre;const bre=yr,wre=(e,t)=>new bre(e,t).major;var Sre=wre;const _re=yr,kre=(e,t)=>new _re(e,t).minor;var xre=kre;const Ere=yr,Cre=(e,t)=>new Ere(e,t).patch;var Tre=Cre;const Rre=Bu,Pre=(e,t)=>{const n=Rre(e,t);return n&&n.prerelease.length?n.prerelease:null};var Ire=Pre;const iE=yr,Are=(e,t,n)=>new iE(e,n).compare(new iE(t,n));var $s=Are;const Ore=$s,Mre=(e,t,n)=>Ore(t,e,n);var Dre=Mre;const $re=$s,Lre=(e,t)=>$re(e,t,!0);var Fre=Lre;const oE=yr,Nre=(e,t,n)=>{const r=new oE(e,n),s=new oE(t,n);return r.compare(s)||r.compareBuild(s)};var wS=Nre;const Vre=wS,Bre=(e,t)=>e.sort((n,r)=>Vre(n,r,t));var Ure=Bre;const Hre=wS,zre=(e,t)=>e.sort((n,r)=>Hre(r,n,t));var jre=zre;const qre=$s,Wre=(e,t,n)=>qre(e,t,n)>0;var Fm=Wre;const Gre=$s,Kre=(e,t,n)=>Gre(e,t,n)<0;var SS=Kre;const Yre=$s,Xre=(e,t,n)=>Yre(e,t,n)===0;var mD=Xre;const Qre=$s,Jre=(e,t,n)=>Qre(e,t,n)!==0;var gD=Jre;const Zre=$s,ese=(e,t,n)=>Zre(e,t,n)>=0;var _S=ese;const tse=$s,nse=(e,t,n)=>tse(e,t,n)<=0;var kS=nse;const rse=mD,sse=gD,ise=Fm,ose=_S,ase=SS,lse=kS,use=(e,t,n,r)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof n=="object"&&(n=n.version),e===n;case"!==":return typeof e=="object"&&(e=e.version),typeof n=="object"&&(n=n.version),e!==n;case"":case"=":case"==":return rse(e,n,r);case"!=":return sse(e,n,r);case">":return ise(e,n,r);case">=":return ose(e,n,r);case"<":return ase(e,n,r);case"<=":return lse(e,n,r);default:throw new TypeError(`Invalid operator: ${t}`)}};var vD=use;const cse=yr,dse=Bu,{safeRe:zf,t:jf}=Yd,fse=(e,t)=>{if(e instanceof cse)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;t=t||{};let n=null;if(!t.rtl)n=e.match(t.includePrerelease?zf[jf.COERCEFULL]:zf[jf.COERCE]);else{const l=t.includePrerelease?zf[jf.COERCERTLFULL]:zf[jf.COERCERTL];let u;for(;(u=l.exec(e))&&(!n||n.index+n[0].length!==e.length);)(!n||u.index+u[0].length!==n.index+n[0].length)&&(n=u),l.lastIndex=u.index+u[1].length+u[2].length;l.lastIndex=-1}if(n===null)return null;const r=n[2],s=n[3]||"0",i=n[4]||"0",o=t.includePrerelease&&n[5]?`-${n[5]}`:"",a=t.includePrerelease&&n[6]?`+${n[6]}`:"";return dse(`${r}.${s}.${i}${o}${a}`,t)};var hse=fse;class pse{constructor(){this.max=1e3,this.map=new Map}get(t){const n=this.map.get(t);if(n!==void 0)return this.map.delete(t),this.map.set(t,n),n}delete(t){return this.map.delete(t)}set(t,n){if(!this.delete(t)&&n!==void 0){if(this.map.size>=this.max){const s=this.map.keys().next().value;this.delete(s)}this.map.set(t,n)}return this}}var mse=pse,Qg,aE;function Ls(){if(aE)return Qg;aE=1;const e=/\s+/g;class t{constructor(H,z){if(z=s(z),H instanceof t)return H.loose===!!z.loose&&H.includePrerelease===!!z.includePrerelease?H:new t(H.raw,z);if(H instanceof i)return this.raw=H.value,this.set=[[H]],this.formatted=void 0,this;if(this.options=z,this.loose=!!z.loose,this.includePrerelease=!!z.includePrerelease,this.raw=H.trim().replace(e," "),this.set=this.raw.split("||").map(Y=>this.parseRange(Y.trim())).filter(Y=>Y.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const Y=this.set[0];if(this.set=this.set.filter(q=>!m(q[0])),this.set.length===0)this.set=[Y];else if(this.set.length>1){for(const q of this.set)if(q.length===1&&y(q[0])){this.set=[q];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let H=0;H<this.set.length;H++){H>0&&(this.formatted+="||");const z=this.set[H];for(let Y=0;Y<z.length;Y++)Y>0&&(this.formatted+=" "),this.formatted+=z[Y].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(H){const Y=((this.options.includePrerelease&&p)|(this.options.loose&&g))+":"+H,q=r.get(Y);if(q)return q;const V=this.options.loose,G=V?l[u.HYPHENRANGELOOSE]:l[u.HYPHENRANGE];H=H.replace(G,O(this.options.includePrerelease)),o("hyphen replace",H),H=H.replace(l[u.COMPARATORTRIM],c),o("comparator trim",H),H=H.replace(l[u.TILDETRIM],d),o("tilde trim",H),H=H.replace(l[u.CARETTRIM],f),o("caret trim",H);let te=H.split(" ").map(ae=>w(ae,this.options)).join(" ").split(/\s+/).map(ae=>M(ae,this.options));V&&(te=te.filter(ae=>(o("loose invalid filter",ae,this.options),!!ae.match(l[u.COMPARATORLOOSE])))),o("range list",te);const W=new Map,J=te.map(ae=>new i(ae,this.options));for(const ae of J){if(m(ae))return[ae];W.set(ae.value,ae)}W.size>1&&W.has("")&&W.delete("");const pe=[...W.values()];return r.set(Y,pe),pe}intersects(H,z){if(!(H instanceof t))throw new TypeError("a Range is required");return this.set.some(Y=>b(Y,z)&&H.set.some(q=>b(q,z)&&Y.every(V=>q.every(G=>V.intersects(G,z)))))}test(H){if(!H)return!1;if(typeof H=="string")try{H=new a(H,this.options)}catch{return!1}for(let z=0;z<this.set.length;z++)if(A(this.set[z],H,this.options))return!0;return!1}}Qg=t;const n=mse,r=new n,s=bS,i=Nm(),o=Lm,a=yr,{safeRe:l,t:u,comparatorTrimReplace:c,tildeTrimReplace:d,caretTrimReplace:f}=Yd,{FLAG_INCLUDE_PRERELEASE:p,FLAG_LOOSE:g}=$m,m=D=>D.value==="<0.0.0-0",y=D=>D.value==="",b=(D,H)=>{let z=!0;const Y=D.slice();let q=Y.pop();for(;z&&Y.length;)z=Y.every(V=>q.intersects(V,H)),q=Y.pop();return z},w=(D,H)=>(o("comp",D,H),D=R(D,H),o("caret",D),D=C(D,H),o("tildes",D),D=x(D,H),o("xrange",D),D=P(D,H),o("stars",D),D),S=D=>!D||D.toLowerCase()==="x"||D==="*",C=(D,H)=>D.trim().split(/\s+/).map(z=>_(z,H)).join(" "),_=(D,H)=>{const z=H.loose?l[u.TILDELOOSE]:l[u.TILDE];return D.replace(z,(Y,q,V,G,te)=>{o("tilde",D,Y,q,V,G,te);let W;return S(q)?W="":S(V)?W=`>=${q}.0.0 <${+q+1}.0.0-0`:S(G)?W=`>=${q}.${V}.0 <${q}.${+V+1}.0-0`:te?(o("replaceTilde pr",te),W=`>=${q}.${V}.${G}-${te} <${q}.${+V+1}.0-0`):W=`>=${q}.${V}.${G} <${q}.${+V+1}.0-0`,o("tilde return",W),W})},R=(D,H)=>D.trim().split(/\s+/).map(z=>T(z,H)).join(" "),T=(D,H)=>{o("caret",D,H);const z=H.loose?l[u.CARETLOOSE]:l[u.CARET],Y=H.includePrerelease?"-0":"";return D.replace(z,(q,V,G,te,W)=>{o("caret",D,q,V,G,te,W);let J;return S(V)?J="":S(G)?J=`>=${V}.0.0${Y} <${+V+1}.0.0-0`:S(te)?V==="0"?J=`>=${V}.${G}.0${Y} <${V}.${+G+1}.0-0`:J=`>=${V}.${G}.0${Y} <${+V+1}.0.0-0`:W?(o("replaceCaret pr",W),V==="0"?G==="0"?J=`>=${V}.${G}.${te}-${W} <${V}.${G}.${+te+1}-0`:J=`>=${V}.${G}.${te}-${W} <${V}.${+G+1}.0-0`:J=`>=${V}.${G}.${te}-${W} <${+V+1}.0.0-0`):(o("no pr"),V==="0"?G==="0"?J=`>=${V}.${G}.${te}${Y} <${V}.${G}.${+te+1}-0`:J=`>=${V}.${G}.${te}${Y} <${V}.${+G+1}.0-0`:J=`>=${V}.${G}.${te} <${+V+1}.0.0-0`),o("caret return",J),J})},x=(D,H)=>(o("replaceXRanges",D,H),D.split(/\s+/).map(z=>E(z,H)).join(" ")),E=(D,H)=>{D=D.trim();const z=H.loose?l[u.XRANGELOOSE]:l[u.XRANGE];return D.replace(z,(Y,q,V,G,te,W)=>{o("xRange",D,Y,q,V,G,te,W);const J=S(V),pe=J||S(G),ae=pe||S(te),oe=ae;return q==="="&&oe&&(q=""),W=H.includePrerelease?"-0":"",J?q===">"||q==="<"?Y="<0.0.0-0":Y="*":q&&oe?(pe&&(G=0),te=0,q===">"?(q=">=",pe?(V=+V+1,G=0,te=0):(G=+G+1,te=0)):q==="<="&&(q="<",pe?V=+V+1:G=+G+1),q==="<"&&(W="-0"),Y=`${q+V}.${G}.${te}${W}`):pe?Y=`>=${V}.0.0${W} <${+V+1}.0.0-0`:ae&&(Y=`>=${V}.${G}.0${W} <${V}.${+G+1}.0-0`),o("xRange return",Y),Y})},P=(D,H)=>(o("replaceStars",D,H),D.trim().replace(l[u.STAR],"")),M=(D,H)=>(o("replaceGTE0",D,H),D.trim().replace(l[H.includePrerelease?u.GTE0PRE:u.GTE0],"")),O=D=>(H,z,Y,q,V,G,te,W,J,pe,ae,oe)=>(S(Y)?z="":S(q)?z=`>=${Y}.0.0${D?"-0":""}`:S(V)?z=`>=${Y}.${q}.0${D?"-0":""}`:G?z=`>=${z}`:z=`>=${z}${D?"-0":""}`,S(J)?W="":S(pe)?W=`<${+J+1}.0.0-0`:S(ae)?W=`<${J}.${+pe+1}.0-0`:oe?W=`<=${J}.${pe}.${ae}-${oe}`:D?W=`<${J}.${pe}.${+ae+1}-0`:W=`<=${W}`,`${z} ${W}`.trim()),A=(D,H,z)=>{for(let Y=0;Y<D.length;Y++)if(!D[Y].test(H))return!1;if(H.prerelease.length&&!z.includePrerelease){for(let Y=0;Y<D.length;Y++)if(o(D[Y].semver),D[Y].semver!==i.ANY&&D[Y].semver.prerelease.length>0){const q=D[Y].semver;if(q.major===H.major&&q.minor===H.minor&&q.patch===H.patch)return!0}return!1}return!0};return Qg}var Jg,lE;function Nm(){if(lE)return Jg;lE=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(">")))}}Jg=t;const n=bS,{safeRe:r,t:s}=Yd,i=vD,o=Lm,a=yr,l=Ls();return Jg}const gse=Ls(),vse=(e,t,n)=>{try{t=new gse(t,n)}catch{return!1}return t.test(e)};var Vm=vse;const yse=Ls(),bse=(e,t)=>new yse(e,t).set.map(n=>n.map(r=>r.value).join(" ").trim().split(" "));var wse=bse;const Sse=yr,_se=Ls(),kse=(e,t,n)=>{let r=null,s=null,i=null;try{i=new _se(t,n)}catch{return null}return e.forEach(o=>{i.test(o)&&(!r||s.compare(o)===-1)&&(r=o,s=new Sse(r,n))}),r};var xse=kse;const Ese=yr,Cse=Ls(),Tse=(e,t,n)=>{let r=null,s=null,i=null;try{i=new Cse(t,n)}catch{return null}return e.forEach(o=>{i.test(o)&&(!r||s.compare(o)===1)&&(r=o,s=new Ese(r,n))}),r};var Rse=Tse;const Zg=yr,Pse=Ls(),uE=Fm,Ise=(e,t)=>{e=new Pse(e,t);let n=new Zg("0.0.0");if(e.test(n)||(n=new Zg("0.0.0-0"),e.test(n)))return n;n=null;for(let r=0;r<e.set.length;++r){const s=e.set[r];let i=null;s.forEach(o=>{const a=new Zg(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!i||uE(a,i))&&(i=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),i&&(!n||uE(n,i))&&(n=i)}return n&&e.test(n)?n:null};var Ase=Ise;const Ose=Ls(),Mse=(e,t)=>{try{return new Ose(e,t).range||"*"}catch{return null}};var Dse=Mse;const $se=yr,yD=Nm(),{ANY:Lse}=yD,Fse=Ls(),Nse=Vm,cE=Fm,dE=SS,Vse=kS,Bse=_S,Use=(e,t,n,r)=>{e=new $se(e,r),t=new Fse(t,r);let s,i,o,a,l;switch(n){case">":s=cE,i=Vse,o=dE,a=">",l=">=";break;case"<":s=dE,i=Bse,o=cE,a="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Nse(e,t,r))return!1;for(let u=0;u<t.set.length;++u){const c=t.set[u];let d=null,f=null;if(c.forEach(p=>{p.semver===Lse&&(p=new yD(">=0.0.0")),d=d||p,f=f||p,s(p.semver,d.semver,r)?d=p:o(p.semver,f.semver,r)&&(f=p)}),d.operator===a||d.operator===l||(!f.operator||f.operator===a)&&i(e,f.semver))return!1;if(f.operator===l&&o(e,f.semver))return!1}return!0};var xS=Use;const Hse=xS,zse=(e,t,n)=>Hse(e,t,">",n);var jse=zse;const qse=xS,Wse=(e,t,n)=>qse(e,t,"<",n);var Gse=Wse;const fE=Ls(),Kse=(e,t,n)=>(e=new fE(e,n),t=new fE(t,n),e.intersects(t,n));var Yse=Kse;const Xse=Vm,Qse=$s;var Jse=(e,t,n)=>{const r=[];let s=null,i=null;const o=e.sort((c,d)=>Qse(c,d,n));for(const c of o)Xse(c,t,n)?(i=c,s||(s=c)):(i&&r.push([s,i]),i=null,s=null);s&&r.push([s,null]);const a=[];for(const[c,d]of r)c===d?a.push(c):!d&&c===o[0]?a.push("*"):d?c===o[0]?a.push(`<=${d}`):a.push(`${c} - ${d}`):a.push(`>=${c}`);const l=a.join(" || "),u=typeof t.raw=="string"?t.raw:String(t);return l.length<u.length?l:t};const hE=Ls(),ES=Nm(),{ANY:ev}=ES,nc=Vm,CS=$s,Zse=(e,t,n={})=>{if(e===t)return!0;e=new hE(e,n),t=new hE(t,n);let r=!1;e:for(const s of e.set){for(const i of t.set){const o=tie(s,i,n);if(r=r||o!==null,o)continue e}if(r)return!1}return!0},eie=[new ES(">=0.0.0-0")],pE=[new ES(">=0.0.0")],tie=(e,t,n)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===ev){if(t.length===1&&t[0].semver===ev)return!0;n.includePrerelease?e=eie:e=pE}if(t.length===1&&t[0].semver===ev){if(n.includePrerelease)return!0;t=pE}const r=new Set;let s,i;for(const p of e)p.operator===">"||p.operator===">="?s=mE(s,p,n):p.operator==="<"||p.operator==="<="?i=gE(i,p,n):r.add(p.semver);if(r.size>1)return null;let o;if(s&&i){if(o=CS(s.semver,i.semver,n),o>0)return null;if(o===0&&(s.operator!==">="||i.operator!=="<="))return null}for(const p of r){if(s&&!nc(p,String(s),n)||i&&!nc(p,String(i),n))return null;for(const g of t)if(!nc(p,String(g),n))return!1;return!0}let a,l,u,c,d=i&&!n.includePrerelease&&i.semver.prerelease.length?i.semver:!1,f=s&&!n.includePrerelease&&s.semver.prerelease.length?s.semver:!1;d&&d.prerelease.length===1&&i.operator==="<"&&d.prerelease[0]===0&&(d=!1);for(const p of t){if(c=c||p.operator===">"||p.operator===">=",u=u||p.operator==="<"||p.operator==="<=",s){if(f&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===f.major&&p.semver.minor===f.minor&&p.semver.patch===f.patch&&(f=!1),p.operator===">"||p.operator===">="){if(a=mE(s,p,n),a===p&&a!==s)return!1}else if(s.operator===">="&&!nc(s.semver,String(p),n))return!1}if(i){if(d&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===d.major&&p.semver.minor===d.minor&&p.semver.patch===d.patch&&(d=!1),p.operator==="<"||p.operator==="<="){if(l=gE(i,p,n),l===p&&l!==i)return!1}else if(i.operator==="<="&&!nc(i.semver,String(p),n))return!1}if(!p.operator&&(i||s)&&o!==0)return!1}return!(s&&u&&!i&&o!==0||i&&c&&!s&&o!==0||f||d)},mE=(e,t,n)=>{if(!e)return t;const r=CS(e.semver,t.semver,n);return r>0?e:r<0||t.operator===">"&&e.operator===">="?t:e},gE=(e,t,n)=>{if(!e)return t;const r=CS(e.semver,t.semver,n);return r<0?e:r>0||t.operator==="<"&&e.operator==="<="?t:e};var nie=Zse;const tv=Yd,vE=$m,rie=yr,yE=pD,sie=Bu,iie=dre,oie=pre,aie=gre,lie=yre,uie=Sre,cie=xre,die=Tre,fie=Ire,hie=$s,pie=Dre,mie=Fre,gie=wS,vie=Ure,yie=jre,bie=Fm,wie=SS,Sie=mD,_ie=gD,kie=_S,xie=kS,Eie=vD,Cie=hse,Tie=Nm(),Rie=Ls(),Pie=Vm,Iie=wse,Aie=xse,Oie=Rse,Mie=Ase,Die=Dse,$ie=xS,Lie=jse,Fie=Gse,Nie=Yse,Vie=Jse,Bie=nie;var rc={parse:sie,valid:iie,clean:oie,inc:aie,diff:lie,major:uie,minor:cie,patch:die,prerelease:fie,compare:hie,rcompare:pie,compareLoose:mie,compareBuild:gie,sort:vie,rsort:yie,gt:bie,lt:wie,eq:Sie,neq:_ie,gte:kie,lte:xie,cmp:Eie,coerce:Cie,Comparator:Tie,Range:Rie,satisfies:Pie,toComparators:Iie,maxSatisfying:Aie,minSatisfying:Oie,minVersion:Mie,validRange:Die,outside:$ie,gtr:Lie,ltr:Fie,intersects:Nie,simplifyRange:Vie,subset:Bie,SemVer:rie,re:tv.re,src:tv.src,tokens:tv.t,SEMVER_SPEC_VERSION:vE.SEMVER_SPEC_VERSION,RELEASE_TYPES:vE.RELEASE_TYPES,compareIdentifiers:yE.compareIdentifiers,rcompareIdentifiers:yE.rcompareIdentifiers};const Uie={key:0},Hie={key:1},zie={key:0},jie=De({__name:"SoftwareUpgradeSettings",setup(e){const t=B(""),n=B(!0),r=B(!1),s=B(!1),i=B(""),o=B(""),a=B(xM),l=B(),u=B(),c=B(),d=B(!1),f=B([]),p=ji();St(async()=>{var P;await g();const E=await vo.getVersion();i.value=E.version,o.value=((P=E.monsterPi)==null?void 0:P.trim())||""});async function g(){if(n.value=!0,t.value="",r.value=!1,p.hasFeature("githubRateLimitApi"))try{const E=await vo.getGithubRateLimit();if(E.rate.remaining===0){const M=new Date(E.rate.reset).toLocaleTimeString(),O=E.rate.reset*1e3-Date.now(),A=Math.ceil(O/6e4);t.value=`Server has reached a rate limit of the Github API. This limit will be reset at ${M} (in ${A} minutes)`,n.value=!1,r.value=!0;return}}catch{n.value=!1;return}try{const E=await vo.getClientReleases();l.value=E.current,u.value=E.minimum,f.value=E.releases}catch(E){t.value="An error occurred loading the releases: "+E.message}finally{n.value=!1}}const m=I(()=>f.value.filter(E=>{const P=rc.minor(E.tag_name)===rc.minor(u.value.tag_name),M=C(E),O=E.draft;return P&&(b()||d.value||!M)&&!O})),y=I(()=>b());function b(){const E=l.value;return C(E)}function w(E){return T(E)||!R(E,l.value)||_(E)}function S(E){const P=C(E)?`${E.tag_name}, unstable`:E.tag_name;return T(E)?`${P}, currently installed`:_(E)?`${P}, below minimum`:R(E,l.value)?P:`${P}, downgrade not allowed`}function C(E){var P;return(P=E==null?void 0:E.tag_name)!=null&&P.length?E.prerelease||E.tag_name.includes("rc")||E.tag_name.includes("unstable"):!1}function _(E){return rc.compare(E.tag_name,u.value.tag_name)===-1}function R(E,P){if(!P)throw new Error("No current release is known, cannot compare.");return s.value?!0:rc.compare(E.tag_name,P.tag_name)!==-1&&rc.compare(E.tag_name,u.value.tag_name)!==-1}function T(E){var P;return E.tag_name===((P=l.value)==null?void 0:P.tag_name)}async function x(E){confirm("Are you sure? This might cause breaking changes, if the server is outdated")&&(await vo.updateClientDistGithub(E,s.value),location.reload())}return(E,P)=>(L(),Z(bt,null,{default:v(()=>[h(mr,{color:"primary"},{default:v(()=>[h(lt,null,{default:v(()=>[h(X,null,{default:v(()=>P[5]||(P[5]=[k("upgrade")])),_:1})]),_:1}),h(Rn,null,{default:v(()=>P[6]||(P[6]=[k(" Software Upgrade ")])),_:1})]),_:1}),h(Ft,{lines:"three"},{default:v(()=>[h(Le,null,{default:v(()=>[h(ut,null,{default:v(()=>P[7]||(P[7]=[k(" Current versions in use: ")])),_:1}),h(vt,null,{default:v(()=>[k(" Your server's version is: "+ie(i.value),1)]),_:1}),h(vt,null,{default:v(()=>[k(" Your client's version is: "+ie(a.value),1)]),_:1}),h(vt,null,{default:v(()=>[o.value?(L(),ye("div",Uie,[P[8]||(P[8]=k(" MonsterPi: ")),P[9]||(P[9]=$("div",null,"Your MonsterPi version is:",-1)),k(" "+ie(o.value),1)])):(L(),ye("div",Hie,P[10]||(P[10]=[k(" MonsterPi: "),$("div",null,"No MonsterPi distro was detected.",-1)])))]),_:1})]),_:1})]),_:1}),h(fn),h(Ft,{subheader:"",lines:"three"},{default:v(()=>[h(Le,null,{default:v(()=>[h(ut,null,{default:v(()=>P[11]||(P[11]=[k(" Server upgrade ")])),_:1}),h(vt,null,{default:v(()=>P[12]||(P[12]=[k(" Please visit "),$("a",{href:"https://docs.fdm-monster.net/docs/installing/"}," the installation documentation ",-1),k(" for instructions on how to upgrade the server. ")])),_:1})]),_:1})]),_:1}),h(fn),h(Ft,{lines:"three"},{default:v(()=>[h(Le,null,{default:v(()=>[h(ut,null,{default:v(()=>P[13]||(P[13]=[k(" Client upgrade ")])),_:1}),h(vt,null,{default:v(()=>P[14]||(P[14]=[k(" Please visit "),$("a",{href:"https://docs.fdm-monster.net/docs/configuration/updating_client_bundle"}," the installation documentation ",-1),k(" for instructions on how to upgrade the client bundle. ")])),_:1}),h(vt,null,{default:v(()=>P[15]||(P[15]=[k(" Upgrade the client webapp for quickly retrieving small fixes and features ")])),_:1})]),_:1}),h(Le,null,{default:v(()=>{var M,O,A;return[h(ut,null,{default:v(()=>P[16]||(P[16]=[k(" Select a release to upgrade to: ")])),_:1}),h(vt,{class:"mt-2"},{default:v(()=>{var D;return[k(" Minimum required version: "+ie((D=u.value)==null?void 0:D.tag_name),1)]}),_:1}),n.value?(L(),ye("span",zie,[h(nn,null,{default:v(()=>P[17]||(P[17]=[k(" Loading releases... ")])),_:1})])):he("",!0),!n.value&&!((M=m.value)!=null&&M.length)?(L(),Z(nn,{key:1},{default:v(()=>P[18]||(P[18]=[k(" No releases to show. ")])),_:1})):he("",!0),h(zA,{modelValue:c.value,"onUpdate:modelValue":P[0]||(P[0]=D=>c.value=D)},{default:v(()=>[(L(!0),ye(Ce,null,qt(m.value,D=>(L(),Z(Ey,{key:D.tag_name,disabled:w(D),label:S(D),value:D.tag_name},null,8,["disabled","label","value"]))),128))]),_:1},8,["modelValue"]),$("div",null,[d.value?(L(),Z(nn,{key:0,color:"primary","max-width":"500px"},{default:v(()=>P[19]||(P[19]=[k(" You are viewing prereleases, please install such versions at your own risk! ")])),_:1})):he("",!0)]),$("div",null,[h(En,{modelValue:s.value,"onUpdate:modelValue":P[1]||(P[1]=D=>s.value=D),label:"Allow downgrade"},null,8,["modelValue"]),h(En,{modelValue:d.value,"onUpdate:modelValue":P[2]||(P[2]=D=>d.value=D),disabled:y.value,label:y.value?"Show prerelease versions (Currently already on prerelease version)":"Show prerelease versions"},null,8,["modelValue","disabled","label"])]),h(re,{class:"mt-2 mr-4",color:"secondary",onClick:P[3]||(P[3]=D=>g())},{default:v(()=>P[20]||(P[20]=[k(" Reload release version list ")])),_:1}),h(re,{disabled:!((O=c.value)!=null&&O.length)||c.value===((A=l.value)==null?void 0:A.tag_name),class:"mt-2",color:"primary",variant:"flat",onClick:P[4]||(P[4]=D=>x(c.value))},{default:v(()=>[h(X,null,{default:v(()=>P[21]||(P[21]=[k("upgrade")])),_:1}),P[22]||(P[22]=k(" Upgrade/downgrade client "))]),_:1},8,["disabled"])]}),_:1})]),_:1})]),_:1}))}}),qie=De({__name:"DiagnosticsSettings",setup(e){const t=Ot(),n=Ds(),r=B(!1),s=B(!1),i=B(!1),o=B(!1);St(async()=>{var f,p,g,m;const d=await vo.getFeatures();r.value=((f=d.anonymousDiagnosticsToggle)==null?void 0:f.available)||!1,s.value=((p=d.logDumpZip)==null?void 0:p.available)||!1,i.value=((g=d.clearLogFiles)==null?void 0:g.available)||!1,await n.loadSettings(),o.value=((m=n.serverSettings)==null?void 0:m.sentryDiagnosticsEnabled)||!1});async function a(){await Fn.setSentryDiagnosticsSettings(o.value),GO(o.value)}async function l(){const d=`Test Error ${Date.now()} Sentry enabled: ${o.value}`;try{throw new Error(d)}catch(f){si(f),t.openInfoMessage({title:"Test report was sent",subtitle:`Content: ${d}`})}}async function u(){await td.downloadLogDump()}async function c(){await td.clearLogFilesOlderThanWeek(),t.openInfoMessage({title:"Action success",subtitle:"Log files older than a week have been deleted"})}return(d,f)=>(L(),Z(bt,null,{default:v(()=>[h(mr,{color:"primary"},{default:v(()=>[h(lt,null,{default:v(()=>[h(X,null,{default:v(()=>f[5]||(f[5]=[k("bug_report")])),_:1})]),_:1}),h(Rn,null,{default:v(()=>f[6]||(f[6]=[k(" Diagnostics ")])),_:1})]),_:1}),h(Ft,{subheader:"",lines:"three"},{default:v(()=>[h(os,null,{default:v(()=>f[7]||(f[7]=[k(" Diagnostics to provide bug reports to the developers of this software ")])),_:1}),r.value?(L(),Z(Le,{key:0},{default:v(()=>[h(ut,null,{default:v(()=>f[8]||(f[8]=[k(" Remote Sentry diagnostic reports: ")])),_:1}),h(vt,null,{default:v(()=>[h(En,{modelValue:o.value,"onUpdate:modelValue":f[0]||(f[0]=p=>o.value=p),label:"Enable remote Sentry diagnostic reports"},null,8,["modelValue"])]),_:1}),h(vt,null,{default:v(()=>[h(re,{color:"primary",onClick:f[1]||(f[1]=p=>a())},{default:v(()=>[h(X,{class:"pr-2"},{default:v(()=>f[9]||(f[9]=[k("save")])),_:1}),f[10]||(f[10]=k(" Save "))]),_:1}),h(re,{color:"secondary",onClick:f[2]||(f[2]=p=>l())},{default:v(()=>[h(X,{class:"pr-2"},{default:v(()=>f[11]||(f[11]=[k("bug_report")])),_:1}),f[12]||(f[12]=k(" Test Error "))]),_:1})]),_:1})]),_:1})):he("",!0),h(fn),s.value?(L(),Z(Le,{key:1},{default:v(()=>[h(ut,null,{default:v(()=>f[13]||(f[13]=[k(" Logs Dump ")])),_:1}),h(vt,null,{default:v(()=>f[14]||(f[14]=[k(" Download a .zip file containing all logs from the server ")])),_:1}),h(vt,null,{default:v(()=>[f[17]||(f[17]=$("br",null,null,-1)),h(re,{color:"primary",onClick:f[3]||(f[3]=p=>u())},{default:v(()=>[h(X,null,{default:v(()=>f[15]||(f[15]=[k("download")])),_:1}),f[16]||(f[16]=k(" Download Log Files (.zip) "))]),_:1})]),_:1})]),_:1})):he("",!0),s.value?(L(),Z(Le,{key:2},{default:v(()=>[h(ut,null,{default:v(()=>f[18]||(f[18]=[k(" Clear log files ")])),_:1}),h(vt,null,{default:v(()=>[f[21]||(f[21]=$("br",null,null,-1)),h(re,{color:"default",onClick:f[4]||(f[4]=p=>c())},{default:v(()=>[h(X,null,{default:v(()=>f[19]||(f[19]=[k("download")])),_:1}),f[20]||(f[20]=k(" Clear log files older than a week "))]),_:1})]),_:1})]),_:1})):he("",!0)]),_:1})]),_:1}))}});class Wie extends vr{static async getCompletions(){const t=`${Ae.printCompletionRoute}`;return await this.get(t)}}const bD=De({__name:"PrintStatistics",setup(e){const t=B([]),n=B([]),r=B(""),s=Lt(),i=qi();St(async()=>{await o()}),xe([()=>r.value],()=>{u()});const o=async()=>{t.value=[],n.value=[],t.value=await Wie.getCompletions(),u()},a=c=>s.printer(c),l=c=>i.floorOfPrinter(c),u=()=>{var p;const c=s.printers.map(g=>g.id),d=c.length?t.value.filter(g=>c.includes(g.printerId)):t.value,f=(p=r.value)!=null&&p.length?d.filter(g=>{const m=s.printers.find(y=>y.id===g.printerId);return m?(m.name+m.printerURL).toLowerCase().includes(r.value.toLowerCase()):!1}):d;n.value=f.sort((g,m)=>g.failureCount===m.failureCount?g.printCount>m.printCount?-1:1:g.failureCount>m.failureCount?-1:1)};return(c,d)=>(L(),Z(up,{height:"100%",width:"100%"},{default:v(()=>[h(Tn,null,{default:v(()=>[h(ot,null,{default:v(()=>[h(He,null,{default:v(()=>[h(X,null,{default:v(()=>d[2]||(d[2]=[k("filter_list")])),_:1}),d[3]||(d[3]=k(" Filter by printer name (optional) "))]),_:1}),h(He,null,{default:v(()=>[h(ct,{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(nn,null,{default:v(()=>[d[5]||(d[5]=k(" Please reload here if you want updated results: ")),h(re,{color:"primary",size:"x-small",onClick:d[1]||(d[1]=f=>o())},{default:v(()=>d[4]||(d[4]=[k(" Reload ")])),_:1})]),_:1}),h(Jy,{dark:""},{default:v(()=>[d[11]||(d[11]=$("thead",null,[$("tr",null,[$("th",{class:"text-left"},"Printer name"),$("th",{class:"text-left"},"Floor"),$("th",{class:"text-left"},"Fail/ Success/ Total"),$("th",{class:"text-left"},"Last success"),$("th",{class:"text-left"},"Last failure"),$("th",{class:"text-left"},"Successes (week/48H/24H)"),$("th",{class:"text-left"},"Failures (week/48H/24H)")])],-1)),$("tbody",null,[(L(!0),ye(Ce,null,qt(n.value,f=>{var p,g,m,y;return L(),ye("tr",{key:f.printerId},[$("td",null,ie(((p=a(f.printerId))==null?void 0:p.name)??"?"),1),$("td",null,ie(((g=l(f.printerId))==null?void 0:g.name)??"?"),1),$("td",null,[k(" × "+ie(f.failureCount)+" / 🗸 "+ie(f.successCount)+" ",1),$("strong",null," ~"+ie(f.printCount),1)]),$("td",null,ie(Date.now()-((m=f.lastSuccess)==null?void 0:m.createdAt)||"-"),1),$("td",null,[h(xt,{location:"bottom"},_C({default:v(()=>{var b,w,S,C;return[$("span",null,[k(ie(((b=f.lastFailure)==null?void 0:b.status)||"-")+" ",1),d[7]||(d[7]=$("br",null,null,-1)),k(" "+ie((w=f.lastFailure)==null?void 0:w.createdAt)+" ",1),d[8]||(d[8]=$("br",null,null,-1)),$("small",null,ie((S=f.lastFailure)==null?void 0:S.fileName),1),d[9]||(d[9]=$("br",null,null,-1)),$("strong",null,ie((C=f.lastFailure)==null?void 0:C.completionLog),1),d[10]||(d[10]=$("br",null,null,-1))])]}),_:2},[(y=f.lastFailure)!=null&&y.status?{name:"activator",fn:v(({props:b})=>[h(X,ve({ref_for:!0},b),{default:v(()=>d[6]||(d[6]=[k("info")])),_:2},1040)]),key:"0"}:void 0]),1024)]),$("td",null,ie(f.successEventsLastWeek)+" "+ie(f.successEventsLast48H)+" "+ie(f.successEventsLast24H),1),$("td",null,ie(f.failureEventsLastWeek)+" "+ie(f.failureEventsLast48H)+" "+ie(f.failureEventsLast24H),1)])}),128))])]),_:1})]),_:1}))}}),Gie=De({name:"PrintStatisticsView",components:{PrintStatistics:bD}});function Kie(e,t,n,r,s,i){const o=bD;return L(),Z(Tn,null,{default:v(()=>[h(o)]),_:1})}const Yie=Wo(Gie,[["render",Kie]]),Xie=De({__name:"ExperimentalSettings",setup(e){const t=B(!1),n=B(!1),r=B(!1);async function s(){const l=await Fn.getSettings();t.value=l.server.experimentalMoonrakerSupport,n.value=l.server.experimentalTypeormSupport,r.value=l.server.experimentalClientSupport}St(async()=>{await s()});const i=async()=>{await Fn.updateExperimentalMoonrakerSupport(t.value),await Fn.updateExperimentalClientSupport(r.value),await s()},o=async()=>{await Fn.updateExperimentalMoonrakerSupport(!1),await Fn.updateExperimentalClientSupport(!1),await s()},a=async()=>{await Fn.updateExperimentalClientSupport(r.value),window.location.reload()};return(l,u)=>(L(),Z(ot,null,{default:v(()=>[h(He,{cols:"12"},{default:v(()=>[h(bt,null,{default:v(()=>[h(on,null,{default:v(()=>u[3]||(u[3]=[$("h2",null,"Settings",-1)])),_:1}),h(Zt,null,{default:v(()=>[h(ot,null,{default:v(()=>[h(He,{cols:"12",md:"6"},{default:v(()=>[h(bt,null,{default:v(()=>[h(on,null,{default:v(()=>[$("h3",null,[u[6]||(u[6]=k(" Experimental Features ")),h(xt,{bottom:""},{activator:v(({props:c})=>[h(X,ve({class:"help-icon"},c),{default:v(()=>u[4]||(u[4]=[k("help_outline")])),_:2},1040)]),default:v(()=>[u[5]||(u[5]=$("span",{class:"tooltip-content"}," Moonraker support is currently in beta, use at your own risk. ",-1))]),_:1})])]),_:1}),h(Zt,null,{default:v(()=>[h(En,{modelValue:t.value,"onUpdate:modelValue":u[0]||(u[0]=c=>t.value=c),label:"Enable Experimental Moonraker Support","hide-details":""},{label:v(()=>u[7]||(u[7]=[$("span",null,"Enable Experimental Moonraker Support",-1)])),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),h(He,{cols:"12",md:"6"},{default:v(()=>[h(bt,null,{default:v(()=>[h(on,null,{default:v(()=>[$("h3",null,[u[10]||(u[10]=k(" Database Settings ")),h(xt,{bottom:""},{activator:v(({props:c})=>[h(X,iv(Ih(c)),{default:v(()=>u[8]||(u[8]=[k("help_outline")])),_:2},1040)]),default:v(()=>[u[9]||(u[9]=$("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(Zt,null,{default:v(()=>[h(En,{modelValue:n.value,"onUpdate:modelValue":u[1]||(u[1]=c=>n.value=c),label:"Enable TypeORM Support","hide-details":"",disabled:""},{label:v(()=>u[11]||(u[11]=[$("span",null,"Enable TypeORM Support",-1)])),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),h(He,{cols:"12",md:"6"},{default:v(()=>[h(bt,null,{default:v(()=>[h(on,null,{default:v(()=>[$("h3",null,[u[14]||(u[14]=k(" Experimental Features ")),h(xt,{bottom:""},{activator:v(({props:c})=>[h(X,ve({class:"help-icon"},c),{default:v(()=>u[12]||(u[12]=[k("help_outline")])),_:2},1040)]),default:v(()=>[u[13]||(u[13]=$("span",{class:"tooltip-content"}," Enables the next version of the FDM Monster UI (experimental). ",-1))]),_:1})])]),_:1}),h(Zt,null,{default:v(()=>[h(En,{modelValue:r.value,"onUpdate:modelValue":u[2]||(u[2]=c=>r.value=c),label:"Enable Next Client Version (Experimental)","hide-details":"",onChange:a},{label:v(()=>u[15]||(u[15]=[$("span",null,"Enable Next Client Version (Experimental)",-1)])),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),h(Dn,null,{default:v(()=>[h(vn),h(re,{color:"primary",onClick:i},{default:v(()=>u[16]||(u[16]=[k("Save Settings")])),_:1}),h(re,{onClick:o},{default:v(()=>u[17]||(u[17]=[k("Reset to Default")])),_:1})]),_:1})]),_:1})]),_:1})]),_:1}))}}),jn={requiresAuth:!0},nv={requiresAuth:!1},TS=y9({history:GK("/"),routes:[{path:"/",name:zt.Home,meta:jn,component:DX},{path:"/first-time-setup",name:zt.FirstTimeSetup,meta:nv,component:jne},{path:"/login",name:zt.Login,meta:nv,component:Cne},{path:"/registration",name:zt.Registration,meta:nv,component:Pne},{path:"/printers",name:zt.PrintersView,meta:jn,component:YQ},{path:"/cameras",name:zt.CameraGridView,component:Ane},{path:"/settings",component:XQ,meta:jn,children:[{path:"",meta:jn,redirect:"/settings/grid"},{path:"account",meta:jn,component:Gne},{path:"server-protection",meta:jn,component:Yne},{path:"grid",meta:jn,component:Kne},{path:"floors",meta:jn,component:mJ},{path:"user-management",meta:jn,component:lJ},{path:"octoprint",meta:jn,component:dJ},{path:"emergency-commands",meta:jn,component:hne},{path:"software-upgrade",meta:jn,component:jie},{path:"diagnostics",meta:jn,component:qie},{path:"experimental",meta:jn,component:Xie}]},{path:"/statistics",name:zt.PrintStatistics,meta:jn,component:Yie},{path:"/about",name:"About",component:bJ},{path:"/permission-denied",name:zt.PermissionDenied,meta:jn,component:Sne},{path:"/:pathMatch(.*)*",name:"NotFound",component:mne}]});TS.beforeEach(async(e,t,n)=>{var s,i;const r=as();if(!((s=e==null?void 0:e.meta)!=null&&s.requiresAuth)||r.loginRequired===!1)return console.debug(`No auth required on route ${e.fullPath}`),n();if(console.debug(`Auth required on route ${e.fullPath} (loginRequired=${r.loginRequired}, registration=${r.registration}, wizardState=${r.wizardState}, requiresAuth=${(i=e==null?void 0:e.meta)==null?void 0:i.requiresAuth})`),r.loadTokens(),!r.hasAuthToken&&!r.hasRefreshToken){if(console.debug("Not logged in, redirecting to login page"),t.path=="/login")throw new Error("Already on login page, cannot redirect");return n({path:"/login",query:{redirect:e.fullPath}})}return n()});const Qie={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",eyeDropper:"colorize"},Jie={component:e=>Ir(a2,{...e,class:"material-icons"})};function wD(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{blueprint:t,...n}=e,r=Zn(t,n),{aliases:s={},components:i={},directives:o={}}=r,a=HF(r.defaults),l=X2(r.display,r.ssr),u=JF(r.theme),c=u2(r.icons),d=v2(r.locale),f=L6(r.date,d),p=Hq(r.goTo,d);return{install:m=>{for(const y in o)m.directive(y,o[y]);for(const y in i)m.component(y,i[y]);for(const y in s)m.component(y,gu({...s[y],name:y,aliasName:s[y].name}));if(u.install(m),m.provide(Zl,a),m.provide(Dv,l),m.provide(Bc,u),m.provide(Rv,c),m.provide(Vh,d),m.provide($6,f.options),m.provide(ek,f.instance),m.provide(YI,p),kt&&r.ssr)if(m.$nuxt)m.$nuxt.hook("app:suspense:resolve",()=>{l.update()});else{const{mount:y}=m;m.mount=function(){const b=y(...arguments);return At(()=>l.update()),m.mount=y,b}}gr.reset(),m.mixin({computed:{$vuetify(){return mn({defaults:fl.call(this,Zl),display:fl.call(this,Dv),theme:fl.call(this,Bc),icons:fl.call(this,Rv),locale:fl.call(this,Vh),date:fl.call(this,ek)})}}})},defaults:a,display:l,theme:u,icons:c,locale:d,date:f,goTo:p}}const Zie="3.7.4";wD.version=Zie;function fl(e){var r,s;const t=this.$,n=((r=t.parent)==null?void 0:r.provides)??((s=t.vnode.appContext)==null?void 0:s.provides);if(n&&e in n)return n[e]}const eoe=wD({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:Qie,sets:{md:Jie}}}),toe=WL();function noe(e){e.use(eoe).use(G7).use(toe)}const bE=(e,t,n)=>{const r=Lt(),s=tS(),i=Ot();if(t!=null&&t.length){const o=t.length===1,a=t[0];e.ondrop=async l=>{var f;l.preventDefault(),e.style.border=kp;const u=(f=l.dataTransfer)==null?void 0:f.files;if(!(u!=null&&u.length))return;const c=[...Array.from(u)];let d=[];if(o){const p=c.length===1?c[0].name:null;console.debug("Single printer upload mode",t.length,c.length,p),d=kX(a,c)}else{if(c.length>1)throw"Cannot upload multiple files to multiple printers";console.debug("Multi printer upload mode",t.length,c.length);const p=c[0];d=ZO(t,p)}s.queueUploads(d),r.clearSelectedPrinters()}}else e.ondrop=async o=>{o.preventDefault(),e.style.border=kp,i.openInfoMessage({title:"No action performed",subtitle:"Please select one or more printers",warning:!0})}},kp="1px solid #2b2a27",roe="background-color 0.5s ease",wE="1px solid red";function soe(){return{mounted:(e,t,n)=>{var r;e.style.border=kp,e.style.transition=roe,e.ondragenter=s=>{s.preventDefault(),e.style.border=wE},e.ondragover=s=>{s.preventDefault(),e.style.border=wE},e.ondragleave=s=>{s.preventDefault(),e.style.border=kp},bE(e,(r=t.value)==null?void 0:r.printers,n.appContext)},beforeUpdate:(e,t,n)=>{bE(e,t.value,n.appContext)}}}const rv="1px solid #2b2a27",ioe="1px solid gray",SE=(e,t,n)=>{const r=t==null?void 0:t.printerSet,s=qi();if(r){e.ondrop=null,e.ondragover=null,e.ondragleave=null;return}e.style.border=rv,e.ondrop=async i=>{var d;if(e.style.border=rv,i.preventDefault(),!i.dataTransfer)return;const o=i.dataTransfer.getData("text"),a=JSON.parse(o);if(!mX(a)){console.debug("Drop not recognized",a);return}const u=(d=s.selectedFloor)==null?void 0:d.id;if(!u)throw new Error("Floor is not set");const c=a.printerId;if(!c)throw new Error("PrinterId was not provided");await es.addPrinterToFloor(u,{printerId:c,x:t.x,y:t.y})},e.ondragover=i=>{i!=null&&i.dataTransfer&&(i.dataTransfer&&Array.from(i.dataTransfer.items).filter(o=>o.kind==="file").length||(e.style.border=ioe,i.preventDefault()))},e.ondragleave=i=>{e.style.border=rv,i.preventDefault()}};function ooe(){return{mounted:(e,t,n)=>{SE(e,t.value,n.appContext)},beforeUpdate:(e,t,n)=>{SE(e,t.value,n.appContext)}}}const Go=HL(iX);console.log("[DEV: false][PROD: true]","0.0.12");wq({app:Go,dsn:"https://f64683e8d1cb4ac291434993cff1bf9b@o4503975545733120.ingest.sentry.io/4503975546912768",integrations:[kq({router:TS}),q8()],release:"0.0.12",environment:"production",enabled:!0,tracesSampleRate:1,replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1});Go.config.errorHandler=e=>{var t;if(e instanceof PR){console.error(`An error was caught [${e.name}]:
|
|
85
|
-
${e.message}
|
|
86
|
-
${(t=e.config)==null?void 0:t.url}
|
|
87
|
-
${e.stack}`),Ot().openErrorMessage({title:"An error occurred",subtitle:e.message,timeout:5e3});return}else console.error(`An error was caught [${e.name}]:
|
|
88
|
-
${e.message}
|
|
89
|
-
${e.stack}`);Ot().openErrorMessage({title:"An error occurred",subtitle:e.message,timeout:5e3}),si(e)};Go.directive("drop-upload",soe());Go.directive("drop-printer-position",ooe());noe(Go);Go.provide("appConstants",x9());Go.use(TS);Go.mount("#app");
|
|
90
|
-
//# sourceMappingURL=index-gnyRPCyk.js.map
|